Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -252,20 +252,6 @@ private VCImplication joinPredicates(Predicate expectedType, List<RefinedVariabl

VCImplication firstSi = null;
VCImplication lastSi = null;
// Check
for (RefinedVariable var : mainVars) { // join main refinements of mainVars
Copy link
Copy Markdown
Collaborator Author

@rcosta358 rcosta358 Jun 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change order so variables are introduced before other refinements use them.

addMap(var, map);
VCImplication si = new VCImplication(var.getName(), var.getType(), var.getMainRefinement());
if (lastSi != null) {
lastSi.setNext(si);
lastSi = si;
}
if (firstSi == null) {
firstSi = si;
lastSi = si;
}
}

for (RefinedVariable var : vars) { // join refinements of vars
addMap(var, map);

Expand All @@ -289,6 +275,19 @@ && hasDependencyCycle(lastInst.get(), var.getName(), vars, new HashSet<>()))
lastSi = si;
}
}

for (RefinedVariable var : mainVars) { // join main refinements of mainVars
addMap(var, map);
VCImplication si = new VCImplication(var.getName(), var.getType(), var.getMainRefinement());
if (lastSi != null) {
lastSi.setNext(si);
lastSi = si;
}
if (firstSi == null) {
firstSi = si;
lastSi = si;
}
}
VCImplication cSMT = new VCImplication(new Predicate());
if (firstSi != null) {
cSMT = firstSi.clone();
Expand Down Expand Up @@ -331,6 +330,8 @@ private void getVariablesFromContext(List<String> lvars, List<RefinedVariable> a
.filter(rv -> !allVars.contains(rv)).forEach(rv -> {
allVars.add(rv);
recAuxGetVars(rv, allVars);
allVars.remove(rv);
allVars.add(rv);
Comment on lines +333 to +334
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark rv as seen first to avoid recursive cycles, then move it after the variables it uses.

});
}

Expand Down
Loading