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

Clash with reserved word in AbstractBuf leads to SMT2 error #139

Closed
msooseth opened this issue Dec 19, 2022 · 0 comments · Fixed by #143
Closed

Clash with reserved word in AbstractBuf leads to SMT2 error #139

msooseth opened this issue Dec 19, 2022 · 0 comments · Fixed by #143
Assignees
Labels
bug Something isn't working

Comments

@msooseth
Copy link
Collaborator

msooseth commented Dec 19, 2022

Example to reproduce is to go into cabal repl test and then:

a = ReadWord (Lit 0x18) (AbstractBuf "as")
b = ReadWord (Lit 0x32) (AbstractBuf "bimm")
checkEquiv a b
Error "Unable to parse solver output: (error \"line 225 column 16: invalid constant declaration, symbol expected\")"

Notice the AbstractBuf "as" which is what triggers the error. What happens in the SMT2 is that we have a buffer declared as:

(declare-const as (Array (_ BitVec 256) (_ BitVec 8)))

But as is a reserved word in SMT2. This could happen with others, e.g. buffer, or select etc. We likely want to have them numbered. I'll try to fix this and see how it goes :)

Not a huge blocker, just a minor bug. It was found by quickcheck, actually. One of the builds failed and I was curious why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant