Skip to content

Commit 88ee721

Browse files
Name the value before a loop in a key as no variable can be named
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 7d3c887 commit 88ee721

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎liquidjava-verifier/src/main/java/liquidjava/processor/refinement_checker/LoopInvariants.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,11 @@ Set<String> inferred() {
9898
return candidates.stream().map(this::key).collect(Collectors.toSet());
9999
}
100100

101+
/** The text of a candidate, with each instance before the loop renamed to a name no Java variable has */
101102
private String key(Predicate candidate) {
102103
Predicate key = candidate;
103104
for (Map.Entry<String, String> entry : before.entrySet())
104-
key = key.substituteVariable(entry.getValue(), entry.getKey() + "_before");
105+
key = key.substituteVariable(entry.getValue(), entry.getKey() + "#before");
105106
return key.toString();
106107
}
107108

0 commit comments

Comments
 (0)