Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support pair equality in rewriter. #2009

Merged
merged 2 commits into from Jan 16, 2024
Merged

Support pair equality in rewriter. #2009

merged 2 commits into from Jan 16, 2024

Conversation

andreistefanescu
Copy link
Contributor

No description provided.

Copy link
Contributor

@RyanGlScott RyanGlScott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add a test case for this? I'm thinking something like:

t <- prove_core z3 "(x : Vec 32 Bool) -> (y : Vec 32 Bool) -> EqTrue (pairEq (Vec 32 Bool) (Vec 32 Bool) (bvEq 32) (bvEq 32) (x, y) (x, y))";
print_term (rewrite (addsimp t empty_ss) {{ (27 : [8], 42 : [8]) }});

This currently fails on master:

$ ./bin/saw foo.saw 
[14:37:00.569] Loading file "/home/ryanscott/Documents/Hacking/Haskell/saw-script/foo.saw"
[14:37:00.578] Stack trace:
"addsimp" (/home/ryanscott/Documents/Hacking/Haskell/saw-script/foo.saw:2:22-2:29)
addsimp: theorem not an equation

But I believe it would work after this PR.

Copy link
Member

@kquick kquick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; happy to approve once you've had a chance to add a test.

@andreistefanescu andreistefanescu merged commit 9af2e0e into master Jan 16, 2024
38 checks passed
@andreistefanescu andreistefanescu deleted the pair_eq branch January 16, 2024 06:25
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.

None yet

3 participants