Invariant Synthesis#120
Draft
maditaP wants to merge 11 commits into
Draft
Conversation
Switches from a pinned git revision to a local submodule path so the z3.rs sources are available for local modifications.
Adds a LitKind::Int variant, with parsing and SMT translation support.
Adds optional lower/upper bound ranges to parameters and variable declarations and restrict counterexamples to that range.
Adds a syn func declaration form for marking functions as synthesis targets.
Fully unwrapped nested casts in a single visitor pass.
Adds a nonneg_cast intrinsic that reinterprets a signed Int/Real as UInt/UReal. It's an unchecked cast that requires the user to ensure the validity themselves.
Adds SMT handlers for [cond] in Int, UInt, Real, and UReal contexts, encoding them as branch-on-condition with 0/1 values.
Introduces NeutralsRemover, which eliminates zero/infinity neutral elements using SMT-guided rewrites. Wires it into the quantitative proving pipeline and makes TyCtx references immutable throughout.
Adds a synth command that runs a counterexample-guided inductive synthesis (CEGIS) loop to find function bodies using templates.
Replaces the as_i64() fallback with string-based parsing of Z3's debug representation, handling integers and rationals that do not fit in a 64-bit signed integer.
Adds HeyVL test cases for invariant synthesis across four benchmark families: cegispro, ecoimp, polynomial, and seq_loops.
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.
Adds template-based CEGIS invariant synthesis (
caesar synth).Also adds: signed integer literals, range syntax for variables,
nonneg_cast, aNeutralsRemoveroptimizer, and a fix to z3rro model evaluation for large/negative values.Note: The z3.rs submodule switch was needed to use a newer Z3 version that fixes a bug affecting this feature. I'm not sure if this is the right way to do it.