Search in sources :

Example 26 with Rule

use of com.vaticle.typedb.core.logic.Rule in project grakn by graknlabs.

the class UnifyRelationConcludableTest method unUnify_produces_cartesian_named_types.

@Test
public void unUnify_produces_cartesian_named_types() {
    String conjunction = "{$r ($role: $x) isa $rel;}";
    Set<Concludable> concludables = Concludable.create(resolvedConjunction(conjunction, logicMgr));
    Concludable.Relation queryConcludable = concludables.iterator().next().asRelation();
    Rule rule = createRule("people-are-self-friends", "{ $x isa person; }", " (friend: $x) isa friendship ", logicMgr);
    List<Unifier> unifiers = queryConcludable.unify(rule.conclusion(), conceptMgr).toList();
    assertEquals(1, unifiers.size());
    Unifier unifier = unifiers.get(0);
    // test filter allows a valid answer
    Relation friendship = instanceOf("friendship").asRelation();
    Thing person = instanceOf("person");
    addRolePlayer(friendship, "friend", person);
    Map<Variable, Concept> concepts = map(pair(Variable.anon(0), friendship), pair(Variable.name("x"), person), pair(Variable.label("friendship"), friendship.getType()), pair(Variable.label("friendship:friend"), friendship.getType().getRelates("friend")));
    List<ConceptMap> unified = unifier.unUnify(concepts, new Unifier.Requirements.Instance(map())).toList();
    assertEquals(6, unified.size());
    Set<Map<String, String>> expected = set(new HashMap<String, String>() {

        {
            put("$rel", "friendship");
            put("$role", "friendship:friend");
        }
    }, new HashMap<String, String>() {

        {
            put("$rel", "friendship");
            put("$role", "relation:role");
        }
    }, new HashMap<String, String>() {

        {
            put("$rel", "relation");
            put("$role", "friendship:friend");
        }
    }, new HashMap<String, String>() {

        {
            put("$rel", "relation");
            put("$role", "relation:role");
        }
    }, new HashMap<String, String>() {

        {
            put("$rel", "thing");
            put("$role", "friendship:friend");
        }
    }, new HashMap<String, String>() {

        {
            put("$rel", "thing");
            put("$role", "relation:role");
        }
    });
    Set<Map<String, String>> actual = new HashSet<>();
    iterate(unified).forEachRemaining(answer -> {
        actual.add(new HashMap<String, String>() {

            {
                put("$rel", answer.get("rel").asType().getLabel().name());
                put("$role", answer.get("role").asType().getLabel().scopedName());
            }
        });
    });
    assertEquals(expected, actual);
}
Also used : Concept(com.vaticle.typedb.core.concept.Concept) Variable(com.vaticle.typedb.core.traversal.common.Identifier.Variable) Relation(com.vaticle.typedb.core.concept.thing.Relation) Rule(com.vaticle.typedb.core.logic.Rule) Util.createRule(com.vaticle.typedb.core.logic.resolvable.Util.createRule) ConceptMap(com.vaticle.typedb.core.concept.answer.ConceptMap) Map(java.util.Map) ConceptMap(com.vaticle.typedb.core.concept.answer.ConceptMap) HashMap(java.util.HashMap) Thing(com.vaticle.typedb.core.concept.thing.Thing) HashSet(java.util.HashSet) Test(org.junit.Test)

Example 27 with Rule

use of com.vaticle.typedb.core.logic.Rule in project grakn by graknlabs.

the class UnifyRelationConcludableTest method relation_player_role_unifies_rule_relation_repeated_variable_role.

// [many2many]
@Test
public void relation_player_role_unifies_rule_relation_repeated_variable_role() {
    String conjunction = "{ ($role: $p) isa employment; }";
    Set<Concludable> concludables = Concludable.create(resolvedConjunction(conjunction, logicMgr));
    Concludable.Relation queryConcludable = concludables.iterator().next().asRelation();
    Rule rule = createRule("two-people-are-employed", "{ $x isa person; $y isa person; $employment type employment; " + "$employee type employment:employee; $employer type employment:employer; }", "($employee: $x, $employee: $y) isa $employment", logicMgr);
    FunctionalIterator<Unifier> unifier = queryConcludable.unify(rule.conclusion(), conceptMgr);
    Set<Map<String, Set<String>>> result = unifier.map(u -> getStringMapping(u.mapping())).toSet();
    Set<Map<String, Set<String>>> expected = set(new HashMap<String, Set<String>>() {

        {
            put("$p", set("$x"));
            put("$role", set("$employee"));
            put("$_0", set("$_0"));
        }
    }, new HashMap<String, Set<String>>() {

        {
            put("$p", set("$y"));
            put("$role", set("$employee"));
            put("$_0", set("$_0"));
        }
    });
    assertEquals(expected, result);
}
Also used : Variable(com.vaticle.typedb.core.traversal.common.Identifier.Variable) MB(com.vaticle.typedb.core.common.collection.Bytes.MB) RelationType(com.vaticle.typedb.core.concept.type.RelationType) Util.getStringMapping(com.vaticle.typedb.core.logic.resolvable.Util.getStringMapping) Arguments(com.vaticle.typedb.core.common.parameters.Arguments) LogicManager(com.vaticle.typedb.core.logic.LogicManager) ThingType(com.vaticle.typedb.core.concept.type.ThingType) After(org.junit.After) Map(java.util.Map) Collections.list(com.vaticle.typedb.common.collection.Collections.list) Thing(com.vaticle.typedb.core.concept.thing.Thing) Path(java.nio.file.Path) TypeQL(com.vaticle.typeql.lang.TypeQL) AfterClass(org.junit.AfterClass) FunctionalIterator(com.vaticle.typedb.core.common.iterator.FunctionalIterator) CoreDatabaseManager(com.vaticle.typedb.core.database.CoreDatabaseManager) Options(com.vaticle.typedb.core.common.parameters.Options) Set(java.util.Set) ConceptMap(com.vaticle.typedb.core.concept.answer.ConceptMap) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) List(java.util.List) Assert.assertFalse(org.junit.Assert.assertFalse) TypeDBException(com.vaticle.typedb.core.common.exception.TypeDBException) CoreTransaction(com.vaticle.typedb.core.database.CoreTransaction) Collections.map(com.vaticle.typedb.common.collection.Collections.map) ConceptManager(com.vaticle.typedb.core.concept.ConceptManager) ILLEGAL_STATE(com.vaticle.typedb.core.common.exception.ErrorMessage.Internal.ILLEGAL_STATE) Util.resolvedConjunction(com.vaticle.typedb.core.logic.resolvable.Util.resolvedConjunction) BeforeClass(org.junit.BeforeClass) Collections.set(com.vaticle.typedb.common.collection.Collections.set) HashMap(java.util.HashMap) Concept(com.vaticle.typedb.core.concept.Concept) HashSet(java.util.HashSet) Lists(com.google.common.collect.Lists) Rule(com.vaticle.typedb.core.logic.Rule) Collections.pair(com.vaticle.typedb.common.collection.Collections.pair) Util.createRule(com.vaticle.typedb.core.logic.resolvable.Util.createRule) Label(com.vaticle.typedb.core.common.parameters.Label) Before(org.junit.Before) Conjunction(com.vaticle.typedb.core.pattern.Conjunction) Iterator(java.util.Iterator) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) IOException(java.io.IOException) RoleType(com.vaticle.typedb.core.concept.type.RoleType) CoreSession(com.vaticle.typedb.core.database.CoreSession) Relation(com.vaticle.typedb.core.concept.thing.Relation) Paths(java.nio.file.Paths) Iterators.iterate(com.vaticle.typedb.core.common.iterator.Iterators.iterate) AttributeType(com.vaticle.typedb.core.concept.type.AttributeType) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) Type(com.vaticle.typedb.core.concept.type.Type) Util(com.vaticle.typedb.core.test.integration.util.Util) Set(java.util.Set) HashSet(java.util.HashSet) Rule(com.vaticle.typedb.core.logic.Rule) Util.createRule(com.vaticle.typedb.core.logic.resolvable.Util.createRule) Map(java.util.Map) ConceptMap(com.vaticle.typedb.core.concept.answer.ConceptMap) HashMap(java.util.HashMap) Test(org.junit.Test)

Example 28 with Rule

use of com.vaticle.typedb.core.logic.Rule in project grakn by graknlabs.

the class UnifyRelationConcludableTest method relation_more_players_than_rule_relation_fails_unify.

@Test
public void relation_more_players_than_rule_relation_fails_unify() {
    String relationQuery = "{ (part-time-employee: $r, part-time-employer: $p, restriction: $q) isa part-time-employment; }";
    Set<Concludable> concludables = Concludable.create(resolvedConjunction(relationQuery, logicMgr));
    Concludable.Relation queryConcludable = concludables.iterator().next().asRelation();
    Rule rule = createRule("one-employee-one-employer", "{ $x isa person; $y isa organisation; " + "$employee type employment:employee; $employer type employment:employer; }", "($employee: $x, $employer: $y) isa employment", logicMgr);
    FunctionalIterator<Unifier> unifier = queryConcludable.unify(rule.conclusion(), conceptMgr);
    Set<Map<String, Set<String>>> result = unifier.map(u -> getStringMapping(u.mapping())).toSet();
    Set<Map<String, Set<String>>> expected = Collections.emptySet();
    assertEquals(expected, result);
}
Also used : Variable(com.vaticle.typedb.core.traversal.common.Identifier.Variable) MB(com.vaticle.typedb.core.common.collection.Bytes.MB) RelationType(com.vaticle.typedb.core.concept.type.RelationType) Util.getStringMapping(com.vaticle.typedb.core.logic.resolvable.Util.getStringMapping) Arguments(com.vaticle.typedb.core.common.parameters.Arguments) LogicManager(com.vaticle.typedb.core.logic.LogicManager) ThingType(com.vaticle.typedb.core.concept.type.ThingType) After(org.junit.After) Map(java.util.Map) Collections.list(com.vaticle.typedb.common.collection.Collections.list) Thing(com.vaticle.typedb.core.concept.thing.Thing) Path(java.nio.file.Path) TypeQL(com.vaticle.typeql.lang.TypeQL) AfterClass(org.junit.AfterClass) FunctionalIterator(com.vaticle.typedb.core.common.iterator.FunctionalIterator) CoreDatabaseManager(com.vaticle.typedb.core.database.CoreDatabaseManager) Options(com.vaticle.typedb.core.common.parameters.Options) Set(java.util.Set) ConceptMap(com.vaticle.typedb.core.concept.answer.ConceptMap) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) List(java.util.List) Assert.assertFalse(org.junit.Assert.assertFalse) TypeDBException(com.vaticle.typedb.core.common.exception.TypeDBException) CoreTransaction(com.vaticle.typedb.core.database.CoreTransaction) Collections.map(com.vaticle.typedb.common.collection.Collections.map) ConceptManager(com.vaticle.typedb.core.concept.ConceptManager) ILLEGAL_STATE(com.vaticle.typedb.core.common.exception.ErrorMessage.Internal.ILLEGAL_STATE) Util.resolvedConjunction(com.vaticle.typedb.core.logic.resolvable.Util.resolvedConjunction) BeforeClass(org.junit.BeforeClass) Collections.set(com.vaticle.typedb.common.collection.Collections.set) HashMap(java.util.HashMap) Concept(com.vaticle.typedb.core.concept.Concept) HashSet(java.util.HashSet) Lists(com.google.common.collect.Lists) Rule(com.vaticle.typedb.core.logic.Rule) Collections.pair(com.vaticle.typedb.common.collection.Collections.pair) Util.createRule(com.vaticle.typedb.core.logic.resolvable.Util.createRule) Label(com.vaticle.typedb.core.common.parameters.Label) Before(org.junit.Before) Conjunction(com.vaticle.typedb.core.pattern.Conjunction) Iterator(java.util.Iterator) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) IOException(java.io.IOException) RoleType(com.vaticle.typedb.core.concept.type.RoleType) CoreSession(com.vaticle.typedb.core.database.CoreSession) Relation(com.vaticle.typedb.core.concept.thing.Relation) Paths(java.nio.file.Paths) Iterators.iterate(com.vaticle.typedb.core.common.iterator.Iterators.iterate) AttributeType(com.vaticle.typedb.core.concept.type.AttributeType) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) Type(com.vaticle.typedb.core.concept.type.Type) Util(com.vaticle.typedb.core.test.integration.util.Util) Rule(com.vaticle.typedb.core.logic.Rule) Util.createRule(com.vaticle.typedb.core.logic.resolvable.Util.createRule) Map(java.util.Map) ConceptMap(com.vaticle.typedb.core.concept.answer.ConceptMap) HashMap(java.util.HashMap) Test(org.junit.Test)

Example 29 with Rule

use of com.vaticle.typedb.core.logic.Rule in project grakn by graknlabs.

the class UnifyRelationConcludableTest method relation_unifies_many_to_many_rule_relation_players.

@Test
public void relation_unifies_many_to_many_rule_relation_players() {
    String conjunction = "{ (employee: $p, employer: $p, employee: $q) isa employment; }";
    Set<Concludable> concludables = Concludable.create(resolvedConjunction(conjunction, logicMgr));
    Concludable.Relation queryConcludable = concludables.iterator().next().asRelation();
    Rule rule = createRule("two-people-are-employed-one-is-also-the-employer", "{ $x isa person; $y isa person; }", "(employee: $x, employer: $x, employee: $y) isa employment", logicMgr);
    List<Unifier> unifier = queryConcludable.unify(rule.conclusion(), conceptMgr).toList();
    List<Map<String, Set<String>>> result = iterate(unifier).map(u -> getStringMapping(u.mapping())).toList();
    List<Map<String, Set<String>>> expected = list(new HashMap<String, Set<String>>() {

        {
            put("$p", set("$x"));
            put("$q", set("$y"));
            put("$_0", set("$_0"));
        }
    }, new HashMap<String, Set<String>>() {

        {
            put("$p", set("$x", "$y"));
            put("$q", set("$x"));
            put("$_0", set("$_0"));
        }
    });
    assertEquals(expected, result);
}
Also used : Variable(com.vaticle.typedb.core.traversal.common.Identifier.Variable) MB(com.vaticle.typedb.core.common.collection.Bytes.MB) RelationType(com.vaticle.typedb.core.concept.type.RelationType) Util.getStringMapping(com.vaticle.typedb.core.logic.resolvable.Util.getStringMapping) Arguments(com.vaticle.typedb.core.common.parameters.Arguments) LogicManager(com.vaticle.typedb.core.logic.LogicManager) ThingType(com.vaticle.typedb.core.concept.type.ThingType) After(org.junit.After) Map(java.util.Map) Collections.list(com.vaticle.typedb.common.collection.Collections.list) Thing(com.vaticle.typedb.core.concept.thing.Thing) Path(java.nio.file.Path) TypeQL(com.vaticle.typeql.lang.TypeQL) AfterClass(org.junit.AfterClass) FunctionalIterator(com.vaticle.typedb.core.common.iterator.FunctionalIterator) CoreDatabaseManager(com.vaticle.typedb.core.database.CoreDatabaseManager) Options(com.vaticle.typedb.core.common.parameters.Options) Set(java.util.Set) ConceptMap(com.vaticle.typedb.core.concept.answer.ConceptMap) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) List(java.util.List) Assert.assertFalse(org.junit.Assert.assertFalse) TypeDBException(com.vaticle.typedb.core.common.exception.TypeDBException) CoreTransaction(com.vaticle.typedb.core.database.CoreTransaction) Collections.map(com.vaticle.typedb.common.collection.Collections.map) ConceptManager(com.vaticle.typedb.core.concept.ConceptManager) ILLEGAL_STATE(com.vaticle.typedb.core.common.exception.ErrorMessage.Internal.ILLEGAL_STATE) Util.resolvedConjunction(com.vaticle.typedb.core.logic.resolvable.Util.resolvedConjunction) BeforeClass(org.junit.BeforeClass) Collections.set(com.vaticle.typedb.common.collection.Collections.set) HashMap(java.util.HashMap) Concept(com.vaticle.typedb.core.concept.Concept) HashSet(java.util.HashSet) Lists(com.google.common.collect.Lists) Rule(com.vaticle.typedb.core.logic.Rule) Collections.pair(com.vaticle.typedb.common.collection.Collections.pair) Util.createRule(com.vaticle.typedb.core.logic.resolvable.Util.createRule) Label(com.vaticle.typedb.core.common.parameters.Label) Before(org.junit.Before) Conjunction(com.vaticle.typedb.core.pattern.Conjunction) Iterator(java.util.Iterator) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) IOException(java.io.IOException) RoleType(com.vaticle.typedb.core.concept.type.RoleType) CoreSession(com.vaticle.typedb.core.database.CoreSession) Relation(com.vaticle.typedb.core.concept.thing.Relation) Paths(java.nio.file.Paths) Iterators.iterate(com.vaticle.typedb.core.common.iterator.Iterators.iterate) AttributeType(com.vaticle.typedb.core.concept.type.AttributeType) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) Type(com.vaticle.typedb.core.concept.type.Type) Util(com.vaticle.typedb.core.test.integration.util.Util) Set(java.util.Set) HashSet(java.util.HashSet) Rule(com.vaticle.typedb.core.logic.Rule) Util.createRule(com.vaticle.typedb.core.logic.resolvable.Util.createRule) Map(java.util.Map) ConceptMap(com.vaticle.typedb.core.concept.answer.ConceptMap) HashMap(java.util.HashMap) Test(org.junit.Test)

Example 30 with Rule

use of com.vaticle.typedb.core.logic.Rule in project grakn by graknlabs.

the class UnifyRelationConcludableTest method relation_variable_role_unifies_many_to_many_rule_relation_roles.

// [multiple VARIABLE ROLE, many2many]
@Test
public void relation_variable_role_unifies_many_to_many_rule_relation_roles() {
    String conjunction = "{ ($role1: $p, $role1: $q, $role2: $q) isa employment; }";
    Set<Concludable> concludables = Concludable.create(resolvedConjunction(conjunction, logicMgr));
    Concludable.Relation queryConcludable = concludables.iterator().next().asRelation();
    Rule rule = createRule("two-people-are-employed-one-is-also-the-employer", "{ $x isa person; $y isa person; }", "(employee: $x, employer: $x, employee: $y) isa employment", logicMgr);
    FunctionalIterator<Unifier> unifier = queryConcludable.unify(rule.conclusion(), conceptMgr);
    Set<Map<String, Set<String>>> result = unifier.map(u -> getStringMapping(u.mapping())).toSet();
    Set<Map<String, Set<String>>> expected = set(new HashMap<String, Set<String>>() {

        {
            put("$p", set("$x"));
            put("$q", set("$x", "$y"));
            put("$role1", set("$_employment:employee"));
            put("$role2", set("$_employment:employer"));
            put("$_0", set("$_0"));
        }
    }, new HashMap<String, Set<String>>() {

        {
            put("$p", set("$x"));
            put("$q", set("$x", "$y"));
            put("$role1", set("$_employment:employee", "$_employment:employer"));
            put("$role2", set("$_employment:employee"));
            put("$_0", set("$_0"));
        }
    }, new HashMap<String, Set<String>>() {

        {
            put("$p", set("$y"));
            put("$q", set("$x"));
            put("$role1", set("$_employment:employee", "$_employment:employer"));
            put("$role2", set("$_employment:employee"));
            put("$_0", set("$_0"));
        }
    }, new HashMap<String, Set<String>>() {

        {
            put("$p", set("$y"));
            put("$q", set("$x"));
            put("$role1", set("$_employment:employee"));
            put("$role2", set("$_employment:employer"));
            put("$_0", set("$_0"));
        }
    });
    assertEquals(expected, result);
}
Also used : Variable(com.vaticle.typedb.core.traversal.common.Identifier.Variable) MB(com.vaticle.typedb.core.common.collection.Bytes.MB) RelationType(com.vaticle.typedb.core.concept.type.RelationType) Util.getStringMapping(com.vaticle.typedb.core.logic.resolvable.Util.getStringMapping) Arguments(com.vaticle.typedb.core.common.parameters.Arguments) LogicManager(com.vaticle.typedb.core.logic.LogicManager) ThingType(com.vaticle.typedb.core.concept.type.ThingType) After(org.junit.After) Map(java.util.Map) Collections.list(com.vaticle.typedb.common.collection.Collections.list) Thing(com.vaticle.typedb.core.concept.thing.Thing) Path(java.nio.file.Path) TypeQL(com.vaticle.typeql.lang.TypeQL) AfterClass(org.junit.AfterClass) FunctionalIterator(com.vaticle.typedb.core.common.iterator.FunctionalIterator) CoreDatabaseManager(com.vaticle.typedb.core.database.CoreDatabaseManager) Options(com.vaticle.typedb.core.common.parameters.Options) Set(java.util.Set) ConceptMap(com.vaticle.typedb.core.concept.answer.ConceptMap) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) List(java.util.List) Assert.assertFalse(org.junit.Assert.assertFalse) TypeDBException(com.vaticle.typedb.core.common.exception.TypeDBException) CoreTransaction(com.vaticle.typedb.core.database.CoreTransaction) Collections.map(com.vaticle.typedb.common.collection.Collections.map) ConceptManager(com.vaticle.typedb.core.concept.ConceptManager) ILLEGAL_STATE(com.vaticle.typedb.core.common.exception.ErrorMessage.Internal.ILLEGAL_STATE) Util.resolvedConjunction(com.vaticle.typedb.core.logic.resolvable.Util.resolvedConjunction) BeforeClass(org.junit.BeforeClass) Collections.set(com.vaticle.typedb.common.collection.Collections.set) HashMap(java.util.HashMap) Concept(com.vaticle.typedb.core.concept.Concept) HashSet(java.util.HashSet) Lists(com.google.common.collect.Lists) Rule(com.vaticle.typedb.core.logic.Rule) Collections.pair(com.vaticle.typedb.common.collection.Collections.pair) Util.createRule(com.vaticle.typedb.core.logic.resolvable.Util.createRule) Label(com.vaticle.typedb.core.common.parameters.Label) Before(org.junit.Before) Conjunction(com.vaticle.typedb.core.pattern.Conjunction) Iterator(java.util.Iterator) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) IOException(java.io.IOException) RoleType(com.vaticle.typedb.core.concept.type.RoleType) CoreSession(com.vaticle.typedb.core.database.CoreSession) Relation(com.vaticle.typedb.core.concept.thing.Relation) Paths(java.nio.file.Paths) Iterators.iterate(com.vaticle.typedb.core.common.iterator.Iterators.iterate) AttributeType(com.vaticle.typedb.core.concept.type.AttributeType) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) Type(com.vaticle.typedb.core.concept.type.Type) Util(com.vaticle.typedb.core.test.integration.util.Util) Set(java.util.Set) HashSet(java.util.HashSet) Rule(com.vaticle.typedb.core.logic.Rule) Util.createRule(com.vaticle.typedb.core.logic.resolvable.Util.createRule) Map(java.util.Map) ConceptMap(com.vaticle.typedb.core.concept.answer.ConceptMap) HashMap(java.util.HashMap) Test(org.junit.Test)

Aggregations

Rule (com.vaticle.typedb.core.logic.Rule)38 Test (org.junit.Test)37 Util.createRule (com.vaticle.typedb.core.logic.resolvable.Util.createRule)35 HashMap (java.util.HashMap)32 Set (java.util.Set)30 Concept (com.vaticle.typedb.core.concept.Concept)27 ConceptMap (com.vaticle.typedb.core.concept.answer.ConceptMap)27 ConceptManager (com.vaticle.typedb.core.concept.ConceptManager)15 Relation (com.vaticle.typedb.core.concept.thing.Relation)15 Thing (com.vaticle.typedb.core.concept.thing.Thing)15 RelationType (com.vaticle.typedb.core.concept.type.RelationType)15 LogicManager (com.vaticle.typedb.core.logic.LogicManager)15 Variable (com.vaticle.typedb.core.traversal.common.Identifier.Variable)15 HashSet (java.util.HashSet)15 Map (java.util.Map)15 AttributeType (com.vaticle.typedb.core.concept.type.AttributeType)14 RoleType (com.vaticle.typedb.core.concept.type.RoleType)14 Lists (com.google.common.collect.Lists)13 Collections.list (com.vaticle.typedb.common.collection.Collections.list)13 Collections.map (com.vaticle.typedb.common.collection.Collections.map)13