-
Notifications
You must be signed in to change notification settings - Fork 63
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
Path sat fix #873
Path sat fix #873
Conversation
596c489
to
8029801
Compare
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.
neat!
src/SAWScript/Crucible/LLVM/X86.hs
Outdated
@@ -277,7 +277,7 @@ crucible_llvm_verify_x86 bic opts (Some (llvmModule :: LLVMModule x)) path nm gl | |||
] | |||
|
|||
liftIO $ printOutLn opts Info "Examining specification to determine preconditions" | |||
methodSpec <- buildMethodSpec bic opts llvmModule nm (show addr) setup | |||
methodSpec <- buildMethodSpec bic opts {- TODO! checkSat -} llvmModule nm (show addr) setup |
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.
_checkSat
is in scope
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.
True, but the code otherwise ignores it, and the haddocks explicitly claim it isn't used. I don't know offhand if there is a deep reason path satisfiability was never hooked up for the X86 verification methods, or if it is only that we never got to it.
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.
let's hook it up, there isn't a reason not to use it
src/SAWScript/Crucible/LLVM/X86.hs
Outdated
@@ -427,7 +427,7 @@ buildMethodSpec :: | |||
LLVMCrucibleSetupM () -> | |||
TopLevel (MS.CrucibleMethodSpecIR LLVM) | |||
buildMethodSpec bic opts lm nm loc setup = | |||
setupLLVMCrucibleContext bic opts lm $ \cc -> do | |||
setupLLVMCrucibleContext bic opts False {- TODO! checkSat -} lm $ \cc -> do |
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.
False
is ok, the context is used only to initialize the method spec
Fixes the path satisfiability feature of
crucible_llvm_verify
.Previously, the backend integration code was not properly maintaining the state of the external solver when updating its internal bookeeping datastructures regarding path conditions. As a result, satisfiability checks were only considering the immediate condition being branched on, and not previous path conditions.