Skip to content

Commit 7fea34e

Browse files
committed
initialization: fix a couple inconsistencies in the datalog rules
unifiy some variable and predicate names between the rules and the datafrog code
1 parent b00db2e commit 7fea34e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

polonius-engine/src/output/initialization.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,26 @@ fn compute_transitive_paths<T: FactTypes>(
5151
// ancestor_path(Parent, Child) :- child_path(Child, Parent).
5252
ancestor_path.extend(child_path.iter().map(|&(child, parent)| (parent, child)));
5353

54-
// path_moved_at(Path, Point) :- path_moved_at_base(path, point).
54+
// path_moved_at(Path, Point) :- path_moved_at_base(Path, Point).
5555
path_moved_at.insert(path_moved_at_base.into());
5656

57-
// path_assigned_at(Path, Point) :- path_assigned_at_base(path, Point).
57+
// path_assigned_at(Path, Point) :- path_assigned_at_base(Path, Point).
5858
path_assigned_at.insert(path_assigned_at_base.into());
5959

60-
// path_accessed_at(Path, Point) :- path_accessed_at_base(path, Point).
60+
// path_accessed_at(Path, Point) :- path_accessed_at_base(Path, Point).
6161
path_accessed_at.insert(path_accessed_at_base.into());
6262

6363
// path_begins_with_var(Path, Var) :- path_is_var(Path, Var).
6464
path_begins_with_var.insert(path_is_var.into_iter().collect());
6565

6666
while iteration.changed() {
67-
// ancestor(Grandparent, Child) :-
68-
// ancestor(Parent, Child),
69-
// child(Parent, Grandparent).
67+
// ancestor_path(Grandparent, Child) :-
68+
// ancestor_path(Parent, Child),
69+
// child_path(Parent, Grandparent).
7070
ancestor_path.from_join(
7171
&ancestor_path,
7272
&child_path,
73-
|&_mother, &daughter, &grandmother| (grandmother, daughter),
73+
|&_parent, &child, &grandparent| (grandparent, child),
7474
);
7575

7676
// moving a path moves its children

0 commit comments

Comments
 (0)