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

Cryptol generates SMT files that abc can't parse #436

Closed
jpziegler opened this issue Jul 22, 2017 · 7 comments
Closed

Cryptol generates SMT files that abc can't parse #436

jpziegler opened this issue Jul 22, 2017 · 7 comments
Assignees
Labels
bug Something not working correctly upstream Tracking bugs in external tools/libraries we depend on

Comments

@jpziegler
Copy link
Contributor

See issue #71 on abc's BitBucket. Apparently Cryptol sometimes generates arrays, which abc can't handle.

I'll post the relevant Cryptol code when I have the chance.

@atomb
Copy link
Contributor

atomb commented Jul 24, 2017

I suspect we could, when using ABC, pre-process the formulas to translate array operations into lower-level constructs. For other solvers, we probably want to leave the arrays in to take advantage of efficient built-in support for them.

@atomb
Copy link
Contributor

atomb commented Oct 25, 2019

Let's see if this is still a problem with What4 (#647). Otherwise it's an SBV-specific issue.

@robdockins robdockins added the bug Something not working correctly label Jun 5, 2020
@robdockins
Copy link
Contributor

Seems clear this is a bug, just not sure whose.

@robdockins
Copy link
Contributor

@jpziegler, it's been awhile now, but do you happen to still have the input that generated this bug? I'm not sure how to reproduce.

@weaversa
Copy link
Collaborator

weaversa commented Jul 3, 2020

@robdockins look no further than your own comment in #573

Cryptol> :s prover=abc
Cryptol> :prove \(r:[5]) (x:[32]) -> (x <<< r) >>> r == x

SBV exception:

*** Data.SBV: fd:15: hGetLine: end of file:
***
***    Sent      : (check-sat)
***
***    Executable: /Users/fett/local/bin/abc
***    Options   : -S "%blast; &sweep -C 5000; &syn4; &cec -s -m -C 2000"

The smt file contains the following offending lines:

; --- skolemized tables ---
(declare-fun table0 ((_ BitVec 5)) (_ BitVec 32))
(declare-fun table1 ((_ BitVec 5)) (_ BitVec 32))

@robdockins
Copy link
Contributor

Ah, what a coincidence! That explains that mystery. OK, this seems like an SBV bug then. I'll file an upstream ticket.

@robdockins robdockins added the upstream Tracking bugs in external tools/libraries we depend on label Jul 3, 2020
@robdockins robdockins self-assigned this Jul 16, 2021
@robdockins
Copy link
Contributor

PR #1234 added a w4-abc prover that communicates with ABC as an external process. Using this new prover setting, we can handle the example above.

Cryptol> :set prover=w4-abc
Cryptol> :prove \(r:[5]) (x:[32]) -> (x <<< r) >>> r == x
Q.E.D.
(Total Elapsed Time: 0.059s, using "ABC")

Nobody seems interested in fixing/working around the upstream bug that is causing this, so I think we are going to just close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something not working correctly upstream Tracking bugs in external tools/libraries we depend on
Projects
None yet
Development

No branches or pull requests

4 participants