-
Notifications
You must be signed in to change notification settings - Fork 62
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
Introduce Prop
newtype wrapper for Term
s representing propositions as types
#614
Conversation
Other functions are renamed according to their saw-script names.
A "proposition" is defined as a `Term` whose saw-core type is `sort n` for some `n`. Also fix `split_goal` tactic, which expected a goal in the wrong representation.
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!
printOutLnTop Warn $ "WARNING: assuming goal " ++ goalName goal ++ " is valid" | ||
let stats = solverStats "ADMITTED" (scSharedSize (goalTerm goal)) | ||
return (SV.Valid stats, stats, Nothing) | ||
assumeValid = |
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.
mixing code formatting changes with functional changes makes the functional changes harder to review. In general, avoid formatting changes of code you are not changing in other ways, or at least move all code formatting changes in separate commits, so they can be skipped during code review
-- satisfiability using ABC. | ||
satABC :: ProofScript SV.SatResult | ||
satABC = do | ||
-- | Bit-blast a proposition and check its validity using ABC. |
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.
nice that these renames are in a separate commit
do let (args, concl) = asPiList goal | ||
p <- asEqTrue concl | ||
p' <- scNot sc p | ||
p' <- scNot sc p -- is this right? |
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 looks right
This branch attempts to clean up some of the unclear conventions about how various functions expect
Term
arguments to encode logical propositions. Now we can use typeProp
to unambiguously indicate that we will encode universal quantification with Pi types, andEqTrue
to lift booleans to typesort 0
.This branch also includes a fix for #613, which is one of those bugs caused by disagreement between conventions for variable quantification and logical negation for prove vs sat.