typedb / typeql

TypeQL: the power of programming, in your database
https://typedb.com
Mozilla Public License 2.0
219 stars 46 forks source link

Grakn engine infer transitive rules automatically by default #123

Closed adiv5 closed 1 year ago

adiv5 commented 4 years ago

Problem to Solve

Would like the graql to infer transitive rules automatically after schema is loaded

Current Workaround

Currently using Rules to make transitive rules for entities. its painful if the no. of entities increase drastically

Proposed Solution

once Schema is loaded, an extra task will run to read those entities and form a transitive rule for all combinations. Ofcourse can make this optional functionality but worth investigating.

flyingsilverfin commented 3 years ago

Hi there - this issue is not clear: do you want to make all relations transitive by default? You can do that with

when {
  ($role-1: $a, $role-2: $b) isa $relation;
  ($role-2: $b, $role-3: $c) isa $relation;
} then {
  ($role-1: $a, $role-3: $c) isa $relation;
}
flyingsilverfin commented 1 year ago

Closing due to unclear intent and age.