Skip to content

Invariant Synthesis#120

Draft
maditaP wants to merge 11 commits into
moves-rwth:mainfrom
maditaP:rebased/invariant-synthesis
Draft

Invariant Synthesis#120
maditaP wants to merge 11 commits into
moves-rwth:mainfrom
maditaP:rebased/invariant-synthesis

Conversation

@maditaP

@maditaP maditaP commented Jun 17, 2026

Copy link
Copy Markdown

Adds template-based CEGIS invariant synthesis (caesar synth).

Also adds: signed integer literals, range syntax for variables, nonneg_cast, a NeutralsRemover optimizer, 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.

maditaP added 11 commits June 17, 2026 12:04
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.
@maditaP maditaP changed the title Rebased/invariant synthesis Invariant Synthesis Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant