Provide more debug information #208
Merged
CatarinaGamboa merged 4 commits intomainfrom May 5, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances LiquidJava’s debug output during refinement subtyping checks, aiming to make SMT discharge easier to understand by adding structured “[INFO]” and “[SMT]” logs and printing solver outcomes/counterexamples.
Changes:
- Introduces a centralized
DebugLogutility to format and gate debug-mode verification logs. - Extends SMT/subtyping call paths with a
silentflag to suppress nested/duplicate debug output where needed. - Expands ANSI color support in
Colorsto support the new log formatting.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
liquidjava-verifier/src/main/java/liquidjava/smt/SMTEvaluator.java |
Adds debug logging hooks around SMT discharge and solver outcomes; introduces silent overload. |
liquidjava-verifier/src/main/java/liquidjava/processor/refinement_checker/VCChecker.java |
Routes subtype checks through a shared discharge helper and adds higher-level debug context logging. |
liquidjava-verifier/src/main/java/liquidjava/processor/refinement_checker/TypeChecker.java |
Threads silent through state SMT checks. |
liquidjava-verifier/src/main/java/liquidjava/processor/refinement_checker/object_checkers/AuxStateHandler.java |
Uses silent=true for an internal state check to avoid noisy debug output. |
liquidjava-verifier/src/main/java/liquidjava/diagnostics/DebugLog.java |
New centralized debug logging implementation for SMT/subtyping verification. |
liquidjava-verifier/src/main/java/liquidjava/diagnostics/Colors.java |
Adds more ANSI color constants and changes how escape codes are represented. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public SMTResult verifySubtype(Predicate subRef, Predicate supRef, Context context, boolean silent) | ||
| throws Exception { | ||
| if (!silent) { | ||
| DebugLog.smtStart(subRef, supRef); |
rcosta358
approved these changes
May 5, 2026
5bf0390 to
aff60f1
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
aff60f1 to
a0723f8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous debug information was not sufficient.
Now we provide more, with the verification conditions used per each variable refinement we got, and with counter example when it fails.
We'be also added coloring and links available.
