-
Notifications
You must be signed in to change notification settings - Fork 49
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
add support for bitwuzla #438
Conversation
(readout, writeout) <- createPipe | ||
let cmd | ||
= (proc (show solver) (fmap T.unpack $ solverArgs solver timeout)) | ||
{ std_in = CreatePipe | ||
, std_out = UseHandle writeout | ||
, std_err = UseHandle writeout | ||
} | ||
(Just stdin, Nothing, Nothing, process) <- createProcess cmd | ||
hSetBuffering stdin (BlockBuffering (Just 1000000)) | ||
let solverInstance = SolverInstance solver stdin stdout stderr process | ||
let solverInstance = SolverInstance solver stdin readout process |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sends stdout and stderr from the solvers into the same pipe so we can react to both when doing solver interaction...
@@ -160,11 +160,11 @@ declareIntermediates bufs stores = | |||
where | |||
compareFst (l, _) (r, _) = compare l r | |||
encodeBuf n expr = | |||
SMT2 ["(define-const buf" <> (fromString . show $ n) <> " Buf " <> exprToSMT expr <> ")\n"] mempty mempty mempty <> encodeBufLen n expr | |||
SMT2 ["(define-fun buf" <> (fromString . show $ n) <> "() Buf " <> exprToSMT expr <> ")\n"] mempty mempty mempty <> encodeBufLen n expr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why fun and not const? Is this bitwuzla related?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, bitwuzla doesn't support define-const
, and it's just a macro around define-fun
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Description
Adds support for Bitwuzla. This is the same as the old PR, but uses a new bitwuzla version (0.3.0), which has support for timeouts This pr also messes with the smt generation less (only real change is replacing
define-const
withdefine-fun
).It currently can't pass the full test suite (currently 9 failures due to issues support for comparison of constant arrays), but I enabled it for a few tests where it doesn't error out to make sure we're exercising it in CI.
Checklist