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

Path sat fix #873

Merged
merged 5 commits into from
Oct 23, 2020
Merged

Path sat fix #873

merged 5 commits into from
Oct 23, 2020

Conversation

robdockins
Copy link
Contributor

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.

Copy link
Contributor

@andreistefanescu andreistefanescu left a comment

Choose a reason for hiding this comment

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

neat!

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

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

_checkSat is in scope

Copy link
Contributor Author

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.

Copy link
Contributor

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

@@ -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
Copy link
Contributor

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

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.

2 participants