Shepherding #1107: Fix SMT translation of integer literals#1123
Closed
aqjune-aws wants to merge 2 commits intomainfrom
Closed
Shepherding #1107: Fix SMT translation of integer literals#1123aqjune-aws wants to merge 2 commits intomainfrom
aqjune-aws wants to merge 2 commits intomainfrom
Conversation
Contributor
Author
|
I will confirm the internal benchmark result and proceed -> The internal benchmark didn't regress |
Contributor
|
Closing as #1107 has been merged. |
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.
--- This is a verbatim copy from #1107 ---
Issue #, if available:
N/A. Found while working on leanprover/cslib#539.
Description of changes:
This fixes SMT translation of integer literals. Previously, Strata.DL.SMT.Translate.translateTerm translated .prim (.int x) as having Lean type Prop; this PR changes it to Int.
This matters for integer-valued SMT ite terms. In CSLib/Boole (Check: leanprover/cslib#539), an expression like:
if i + 1 == n then 0 else i + 1
was producing a VC elaboration error because the branch literal 0 had type Int but was expected to have type Prop.
This PR also adds a regression test covering an integer-valued SMT ite.
Checks run:
Let me know if you have any questions!
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.