Investigate invalid model in mixed FP/Real logic triggered by string constraint with produce-proofs#8749
Draft
Investigate invalid model in mixed FP/Real logic triggered by string constraint with produce-proofs#8749
Conversation
Copilot
AI
changed the title
[WIP] Fix incorrect model in mixed FP/Real logic
Investigate invalid model in mixed FP/Real logic triggered by string constraint with produce-proofs
Feb 24, 2026
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.
Z3 returns
satwith a model-validation failure whenproduce-proofs=trueis combined with mixed FP/Real/Int logic and a string constraint like(assert (and x (= (str.from_int 0) "0"))). Removing either the string constraint orproduce-proofscauses Z3 to returnunknowninstead.Root Cause (Investigation)
mk_simplify_tactic(run first indefault_tacticbefore probe evaluation) folds(str.from_int 0)→"0", making(= "0" "0")→trueand dropping all string ops from the goal. Probes then see a formula with no strings.x8bridges both the BV/FP world (via(to_fp 8 24 RNE (to_real x8))) and the arith world (via(ite ... x8 1)). Withproduce-proofs=true, the BV model assigned tox8bytheory_fpacan diverge from the arith model, yielding an internally inconsistent model — e.g.x8=0, s(x)=0.0violating(+ (s 0.0) (ite fp-condition x8 1)) > 0.Status
This PR captures the investigation. The current codebase exhibits a related regression: both with and without the string constraint the solver runs indefinitely rather than returning
unknown. A targeted fix to enforce model consistency between the FP/BV and arithmetic theory models, or to conservatively blockqffplraselection when Int variables appear in FP coercions, is needed.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.