Fix explorer mode for basic-1 and string-literal constraints#17
Merged
Conversation
TraceParser was escaping every " in branch constraints to \", which
produced invalid SMT-LIB and made Z3 reject any path constraint that
contained a string literal. The old SolverHandler.string_to_expr
masked it with s.replace('\\', ''), but the rewritten solve() path
(via ConstraintCache.parse_smt_string) has no such workaround, so the
underlying bug now surfaces for any String input compared to a literal.
Remove the bogus escape; keep the newline strip.
Also wire basic-1's run.sh through SimpleDriver: use the explorer's
.venv interpreter, pass --mode simple and --classpath ., and add
-Dsolver.mode=HTTP in SimpleDriver.build_command so constraints reach
the explorer over HTTP (TargetDriver already had this; SimpleDriver
was missing it). Finally, derive symbolic-variable types from the
input name (java/lang/String_0 -> java/lang/String) instead of
inp.type, which doesn't line up with the DataTypes enum for
non-primitive sorts.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
TraceParser was escaping every " in branch constraints to ", which produced invalid SMT-LIB and made Z3 reject any path constraint that contained a string literal. The old SolverHandler.string_to_expr masked it with s.replace('\', ''), but the rewritten solve() path (via ConstraintCache.parse_smt_string) has no such workaround, so the underlying bug now surfaces for any String input compared to a literal. Remove the bogus escape; keep the newline strip.
Also wire basic-1's run.sh through SimpleDriver: use the explorer's .venv interpreter, pass --mode simple and --classpath ., and add -Dsolver.mode=HTTP in SimpleDriver.build_command so constraints reach the explorer over HTTP (TargetDriver already had this; SimpleDriver was missing it). Finally, derive symbolic-variable types from the input name (java/lang/String_0 -> java/lang/String) instead of inp.type, which doesn't line up with the DataTypes enum for non-primitive sorts.