File tree Expand file tree Collapse file tree
liquidjava-verifier/src/main/java/liquidjava Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import java .util .Objects ;
44
55import liquidjava .rj_language .Predicate ;
6+ import liquidjava .rj_language .opt .VCSimplification ;
67import liquidjava .utils .Utils ;
78import spoon .reflect .reference .CtTypeReference ;
89
@@ -85,6 +86,10 @@ public String toString() {
8586 return String .format ("%-20s %s" , "" , refinement .toString ());
8687 }
8788
89+ public VCImplication simplify () {
90+ return VCSimplification .simplifyToFixedPoint (this );
91+ }
92+
8893 public Predicate toConjunctions () {
8994 Predicate c = new Predicate ();
9095 if (name == null && type == null && next == null )
Original file line number Diff line number Diff line change 88public class VCSimplification {
99
1010 /**
11- * Applies all available simplification steps to a VC chain
11+ * Applies all available simplification steps to a VC chain until a fixed point is reached
1212 */
1313 public static VCImplication simplifyToFixedPoint (VCImplication implication ) {
1414 if (implication == null )
@@ -18,8 +18,8 @@ public static VCImplication simplifyToFixedPoint(VCImplication implication) {
1818 VCImplication current = implication .clone ();
1919 while (true ) {
2020 VCImplication simplified = simplifyOnce (current );
21- if (current .equals (simplified )) // fixed point reached
22- return simplified ;
21+ if (current .equals (simplified ))
22+ return simplified ; // fixed point reached
2323 current = simplified ;
2424 }
2525 }
You can’t perform that action at this time.
0 commit comments