Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compute left closure
Browse files Browse the repository at this point in the history
Dmitry Ivanov committed Aug 19, 2024
1 parent 437fe09 commit e7de8cb
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1622,15 +1622,15 @@ public Delta visitTransitiveClosure(TransitiveClosure trans) {
}

private EventGraph computeTransitiveClosure(EventGraph oldOuter, EventGraph inner, boolean isMay) {
EventGraph next;
EventGraph outer = new EventGraph(oldOuter);
outer.addAll(inner);
for (EventGraph current = EventGraph.difference(inner, oldOuter); !current.isEmpty(); current = next) {
next = new EventGraph();
computeComposition(next, current, outer, isMay);
computeComposition(next, outer, current, isMay);
next.removeAll(outer);
outer.addAll(next);
EventGraph update = inner.filter(outer::add);
EventGraph updateComposition = new EventGraph();
computeComposition(updateComposition, update, oldOuter, isMay);
update.addAll(updateComposition.filter(outer::add));
while (!update.isEmpty()) {
EventGraph t = new EventGraph();
computeComposition(t, inner, update, isMay);
update = t.filter(outer::add);
}
return outer;
}

0 comments on commit e7de8cb

Please sign in to comment.