Skip to content

Commit f5b880e

Browse files
clear debug info
1 parent f7adec3 commit f5b880e

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,15 @@ public static boolean smtEnabled() {
5050
* Set by {@link #smtStart} (the structured / flat VC printers) and consumed by {@link #smtRawQuery}. Lets the
5151
* low-level Z3 boundary trace skip a query that a higher layer already printed in full, so {@code -a} shows every
5252
* query exactly once. Single-threaded: each {@code smtStart} is immediately followed by one {@code solver.check()}.
53+
* Callers that may abort a structured check before {@code solver.check()} (e.g. a translation failure) must clear
54+
* the flag via {@link #clearStructuredQueryPending} so suppression cannot leak onto the next, unrelated query.
5355
*/
5456
private static boolean structuredQueryPending = false;
5557

58+
public static void clearStructuredQueryPending() {
59+
structuredQueryPending = false;
60+
}
61+
5662
/**
5763
* Catch-all trace emitted at the actual {@code solver.check()} boundary so {@code -a} / {@code -d} show EVERY query
5864
* sent to Z3 — including those that bypass the structured {@link #smtStart} path (the simplifier's implication

liquidjava-verifier/src/main/java/liquidjava/smt/SMTEvaluator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ public SMTResult verifySubtype(Predicate subRef, Predicate supRef, Context conte
6565
e.printStackTrace();
6666
} catch (Z3Exception e) {
6767
throw new Z3Exception(e.getLocalizedMessage());
68+
} finally {
69+
DebugLog.clearStructuredQueryPending();
6870
}
6971
return SMTResult.ok();
7072
}

0 commit comments

Comments
 (0)