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

Goal sequents #1689

Merged
merged 35 commits into from
Aug 26, 2022
Merged

Goal sequents #1689

merged 35 commits into from
Aug 26, 2022

Conversation

robdockins
Copy link
Contributor

CF #1685

@robdockins
Copy link
Contributor Author

CI failure looks like out-of-memory again

@robdockins robdockins force-pushed the rwd/goal-sequents branch 2 times, most recently from f328f68 to dfdcbf7 Compare June 30, 2022 21:41
@robdockins
Copy link
Contributor Author

CI problem on AWS-LC still appears to be out-of-memory. Lazy LLVM loading seems like it doesn't help for this workload. Perhaps #1697 will make a difference.

@robdockins robdockins force-pushed the rwd/goal-sequents branch 2 times, most recently from d3597dc to c8760a0 Compare July 6, 2022 16:47
@robdockins robdockins force-pushed the rwd/goal-sequents branch 2 times, most recently from 3dbcd8f to 3b14346 Compare August 8, 2022 20:57
joint count of the size of terms appearing in sequents.
proper pretty-printing support for sequents.
These prevent the rewriter from continuting to rewrite
in the result.
Notably, add the ability to perform rewrites using local
sequent assumptions.
This is useful to save on resident memory for verification conditions,
which are never directly used to prove later theorems.
This avoids entering the statements of verification conditions
into the "theorem database", and tracks data about their proofs
separately. This is primarily to avoid retaining the terms representing
these conditions throughout the run of a proof, as the VCs can get
quite large, and are never directly used in the proof of another
theorem.
to the old `goal_assume` tactic. It was never much used, and
the use-cases it aimed to serve are better handled by sequents.
Reimplement `goal_insert` based on cut. This tactic was removed
in an earlier phase, but here we can add it back fairly easily.

Add the ability to apply local hypotheses in addition to theorems,
via `goal_apply_hyp`.

Add the ability to specialize a local hypothesis via `goal_specialize_hyp`.
This is especially useful for specializing an inductive hypothesis in
the (unfortunatly common) case where solvers cannot figure out the correct
instantiations.

The `split_goal` tactic now works on hypotheses that represent SAWCore
implications (i.e., nondependent functions between Props), which provides
the standard modus ponens rule.
induction principle for natural numbers, and for bitvectors.

This adds no additional axioms over those alreay present in the
system.
Copy link
Contributor

@RyanGlScott RyanGlScott left a comment

Choose a reason for hiding this comment

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

I've taken a look over everything except SAWScript.Builtins and SAWScript.Proof. More reviewing to come later.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
src/SAWScript/VerificationSummary.hs Outdated Show resolved Hide resolved
src/SAWScript/Crucible/Common/MethodSpec.hs Outdated Show resolved Hide resolved
src/SAWScript/Crucible/JVM/Builtins.hs Show resolved Hide resolved
saw-core-what4/src/Verifier/SAW/Simulator/What4.hs Outdated Show resolved Hide resolved
saw-core/prelude/Prelude.sawcore Outdated Show resolved Hide resolved
saw-core/src/Verifier/SAW/SATQuery.hs Outdated Show resolved Hide resolved
saw-core/src/Verifier/SAW/SATQuery.hs Outdated Show resolved Hide resolved
saw-core/src/Verifier/SAW/SharedTerm.hs Outdated Show resolved Hide resolved
src/SAWScript/Builtins.hs Show resolved Hide resolved
src/SAWScript/Builtins.hs Outdated Show resolved Hide resolved
src/SAWScript/Builtins.hs Show resolved Hide resolved
src/SAWScript/Builtins.hs Outdated Show resolved Hide resolved
src/SAWScript/Builtins.hs Show resolved Hide resolved
src/SAWScript/Proof.hs Outdated Show resolved Hide resolved
src/SAWScript/Proof.hs Outdated Show resolved Hide resolved
src/SAWScript/Proof.hs Outdated Show resolved Hide resolved
src/SAWScript/Proof.hs Outdated Show resolved Hide resolved
src/SAWScript/Proof.hs Outdated Show resolved Hide resolved
robdockins and others added 12 commits August 26, 2022 09:28
proof would force a sequent normalization.  This was to account for
the case where the "enable_sequent_goals" option was set, which
requires a little additional work to match up the statement of a
lemma with the initial sequent that was proved.

However, in some cases, this normalization step can be quite expensive,
so now we only insert this additional normalization step when the
sequent goals option is active.
Minor other docuemenation tweaks.
Also! Fix a bug in the tactic for applying local hypotheses. Previously
it would only generate a single subgoal, even if the applied hypotheses
generated more than that. This would lead to prematurely-finished proofs
and evidence checking failures.
in the external API of the Proof module.

We still need to correct the terminology within the module itself.
right-hand side of a sequent, reserving the term "goal" for
an entire sequent.
@robdockins
Copy link
Contributor Author

With the exception of opening tickets regarding some of the things mentioned above, I think this PR is ready to go.

src/SAWScript/Proof.hs Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants