Skip to content

Commit 51858fa

Browse files
committed
Requested Change
1 parent c23424f commit 51858fa

2 files changed

Lines changed: 2 additions & 21 deletions

File tree

liquidjava-verifier/src/main/java/liquidjava/diagnostics/DebugLog.java

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import liquidjava.rj_language.ast.BinaryExpression;
1111
import liquidjava.rj_language.ast.Expression;
1212
import liquidjava.rj_language.ast.GroupExpression;
13-
import liquidjava.rj_language.opt.derivation_node.ValDerivationNode;
1413
import liquidjava.smt.Counterexample;
1514
import liquidjava.utils.Utils;
1615
import spoon.reflect.cu.SourcePosition;
@@ -135,23 +134,8 @@ public static void simplification(Expression input, Expression output) {
135134
if (!enabled()) {
136135
return;
137136
}
138-
System.out.println(SMP_TAG + " Simplified " + Colors.CYAN + input + Colors.RESET + " to " + Colors.YELLOW
139-
+ output + Colors.RESET);
140-
}
141-
142-
/**
143-
* Print every assignment returned by the solver before error reporting filters the user-facing counterexample down
144-
* to the variables mentioned in the diagnostic.
145-
*/
146-
public static void counterexample(Counterexample counterexample) {
147-
if (!enabled() || counterexample == null || counterexample.assignments().isEmpty()) {
148-
return;
149-
}
150-
System.out
151-
.println(SMP_TAG
152-
+ " Counterexample: " + Colors.RED + counterexample.assignments().stream()
153-
.map(a -> a.first() + " = " + a.second()).collect(Collectors.joining(" && "))
154-
+ Colors.RESET);
137+
System.out.println(SMP_TAG + " Before simplification: " + Colors.YELLOW + input + Colors.RESET);
138+
System.out.println(SMP_TAG + " After simplification: " + Colors.BOLD_YELLOW + output + Colors.RESET);
155139
}
156140

157141
private static String plainLabel(VCImplication node) {

liquidjava-verifier/src/main/java/liquidjava/diagnostics/errors/RefinementError.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import java.util.List;
55
import java.util.stream.Collectors;
66

7-
import liquidjava.diagnostics.DebugLog;
87
import liquidjava.diagnostics.TranslationTable;
98
import liquidjava.rj_language.ast.Expression;
109
import liquidjava.rj_language.ast.formatter.VariableFormatter;
@@ -44,8 +43,6 @@ public String getCounterExampleString() {
4443
if (counterexample == null || counterexample.assignments().isEmpty())
4544
return null;
4645

47-
DebugLog.counterexample(counterexample);
48-
4946
List<String> foundVarNames = new ArrayList<>();
5047
found.getValue().getVariableNames(foundVarNames);
5148
// also keep resolved static-final constants (e.g. Integer.MAX_VALUE) referenced by either side of the

0 commit comments

Comments
 (0)