summaryrefslogtreecommitdiff
path: root/proofs
AgeCommit message (Collapse)Author
2020-02-22RIP th_lra.plf (#3796)Alex Ozdemir
Rest in Peace, old LRA signature.
2020-02-21Switch to th_lira.plf (#3741)Alex Ozdemir
Switches arith_proof.cpp from th_lra to th_lira. Changes: Eliminate the d_realMode hack. instead: modify printOwnedTermAsType prints as integers OR reals, depending on expectedType. simultaneously: write printOwnedTermAsType more concisely also: reimplement printOwnedSort. Change to the LIRA axioms: Because they reason about bound types using side conditions, we no longer need to worry about choosing the correct strictness for our axiom. This allows us to cut out a lot of code, rewriting & shrinking printTheoryLemmaProof. They also have different names. This requires us to change a lot of string literals enable proof-checking for many tests.
2020-02-21Remove IntReal tightening axioms from th_lira.plf (#3787)Alex Ozdemir
2020-02-10Add more IntReal predicates (#3731)Alex Ozdemir
2020-01-25Axioms for affine function bounds. Tests. (#3632)Alex Ozdemir
* Axioms for affine function bounds. Tests. * Apply suggestions from code review Co-Authored-By: yoni206 <yoni206@users.noreply.github.com> * Clarify descriptions of th_lira tests Thanks, Yoni! Co-authored-by: yoni206 <yoni206@users.noreply.github.com>
2020-01-21Types and side conditions for affine bounds (#3631)Alex Ozdemir
* Types and side conditions for affine bounds Bounds (being positive, non-negative) actually have an arithmetic. This PR defines that. Useful b/c Farkas proofs are basically just sums of bounded affine functions. * Address Yoni's comments. Thanks! * Moved a positivity-test to th_real * Describe what an affine bound is in better detail
2020-01-21Affine Axioms (#3630)Alex Ozdemir
Used for proving that real terms are affine functions of their variables.
2020-01-21Types & side-conditions for linear and affine fns (#3627)Alex Ozdemir
This commit introduces types for linear combinations of arith variables along with side conditions for their arithmetic. It does the same for affine functions. These primitives are ultimately used in our machinery for Farkas proofs.
2020-01-21Axioms (and side conditions) for tightening bounds (#3613)Alex Ozdemir
* Axioms (and side conditions) for tightening bounds * Side conditions for verifying floor/ceiling-like functions * Axioms for their correct execution * Axioms for bound tightening. * Apply suggestions from code review Co-Authored-By: yoni206 <yoni206@users.noreply.github.com> * Address Yoni's comments by addings documentation. Thanks Yoni! Co-authored-by: yoni206 <yoni206@users.noreply.github.com>
2020-01-17LIRA proof: Arithmetic predicates & reification thereof (#3612)Alex Ozdemir
* Merge branch 'master' into lira-pf-arith-pred * Shorten reify_arith_pred, thanks Yoni! Use recursion! * typo
2020-01-17LIRA sig: int, real terms, and conversions (#3610)Alex Ozdemir
* LIRA sig: int, real terms, and conversions * Address Yoni's comments. * Better description of "reify" functions * explicit (rather than implicit) `fail` when reifying integer division Co-authored-by: Andrew Reynolds <andrew.j.reynolds@gmail.com>
2019-12-06[proof] Eliminate side-condition from ER signature (#3230)Alex Ozdemir
* [proof] Eliminate the side condition in er.plf By tweaking the axioms a bit, I got rid of the lone SC in the Extended Resolution signature. * [proof] Changed er_proof.cpp in line with signature The new signature requires slightly different proof printing. * [proof] clang-format er_proof.cpp * Fix tests * [proof] Actually delete the SC * Apply suggestions from code review Co-Authored-By: yoni206 <yoni206@users.noreply.github.com> * Add LFSC-checking unit test for ER proof * Gate the lfsc invocation on the build system * Properly gate the lfsc check on the build system * gate the plf_signatures forward def on the build system
2019-11-18Signature documentation update (#3476)Alex Ozdemir
This comment was slightly out-of-date.
2019-08-05Fix drat signature wrt side condition return types. (#3160)Andrew Reynolds
2019-06-05DRAT-Optimization (#2971)Alex Ozdemir
This commit enables DRAT-optimization, which consists of two sub-processes: 1. removing unnecessary instructions from DRAT-proofs and 2. not proving clauses which are not needed by DRAT proofs. These changes have the effect of dramatically shortening some some bit-vector proofs. Specifically, proofs using lemmas in the ER, DRAT, and LRAT formats, since proofs in any of these formats are derived from a (now optimized!) DRAT proof produced by CryptoMiniSat. What follows is a description of the main parts of this PR: ## DRAT Optimization The DRAT-optimization is done by `drat-trim`, which is bundled with `drat2er`. The (new) function `ClausalBitVectorProof::optimizeDratProof` is our interface to the optimization machinery, and most of the new logic in this PR is in that function. ## CNF Representation The ability to not prove unused clauses requires a slight architectural change as well. In particular, we need to be able to describe **which** subset of the original clause set actually needs to be proved. To facilitate this, when the clause set for CryptoMiniSat is first formed it is represented as a (a) map from clause indices to clauses and (b) a list of indices. Then, when the CNF is optimized, we temporarily store a new list of the clauses in the optimized formula. This change in representation requires a number of small tweaks throughout the code. ## Small Fixes to Signatures When we decided to check and accept two different kinds of DRAT, some of our DRAT-checking broke. In particular, when supporting one kind of DRAT, it is okay to `fail` (crash) when a proof fails to check. If you're supporting two kinds of DRAT, crashing in response to the first checker rejecting the proof denies the second checker an opportunity to check the proof. This PR tweaks the signatures slightly (and soundly!) to do something else instead of `fail`ing.
2019-06-04Enable proof checking for QF_LRA benchmarks (#2928)Andres Noetzli
Due to issues in the current proof code, this commit also disables proof checking for five QF_LRA benchmarks (see issue #2855).
2019-03-29removing deprecated rewriting signature / example (#2906)Haniel Barbosa
2019-03-28fix ex_bv.plf (#2905)Haniel Barbosa
2019-03-16Enable CryptoMiniSat-backed BV proofs (#2847)Alex Ozdemir
* Connect the plumbing so that BV proofs are enabled when using CryptoMiniSat * Also fixed a bug in CNF-proof generation * Specifically, CNF proofs broke when proving tautological clauses. Now they don't.
2019-01-24Extended DRAT signature to operational DRAT (#2815)Alex Ozdemir
* Extended DRAT signature to operational DRAT The DRAT signature now supports both operational and specified DRAT. That is, either kind of proof will be accepted. The goal of this implementation of operational DRAT was to re-use as much of the specified DRAT machinery as possible. However, by writing a separate operational signature, we could make it much more efficient (after all, operational DRAT came about because of a push for efficient cheking). You can run the new AND old DRAT tests by running ``` lfscc sat.plf smt.plf lrat.plf drat.plf drat_test.plf ``` * Apply suggestions from code review (Yoni) Co-Authored-By: alex-ozdemir <aozdemir@hmc.edu>
2019-01-16Bugfix: LFSC clause equality (#2801)Alex Ozdemir
* Bugfix: LFSC clause equality My implementation of clause equality had an undocumented assumption that the clauses didn't have any duplicate literals. Now that assumption is gone, and the tests suite has been expanded. * Added an empty clause test * Typo fix: Yoni Co-Authored-By: alex-ozdemir <aozdemir@hmc.edu> * Address Yoni's comments * Remove a duplicate clause_eq test. * Add an ordering clause_eq test. * Improve the documentation of clause_eq.
2019-01-15Extended Resolution Signature (#2788)Alex Ozdemir
* Extended Resolution Signature While extended resolution is a fairly general technique, the paper "Extended Resolution Simulates DRAT" / the drat2er uses exactly one new type of rule: definitions of the form new <=> old v (~l_1 ^ ~l_2 ^ ... ^ ~l_n) This PR adds axioms supporting this kind of definition, and adds a test making use of those new axioms. The axioms support the following ideas: 1. Introducing a **fresh** variable, defined in the form above 2. Clausifying that definition to produce proofs of $$ n + 2 $$ new clauses in the form of two clauses, and a cnf with $$ n $$ clauses 3. An axiom for unrolling the proof of the cnf into proofs of the original clauses. * Addressing Yoni's comments 1. Added a new (trivial) test 2. Improved a bunch of documentation * Update proofs/signatures/er.plf Co-Authored-By: alex-ozdemir <aozdemir@hmc.edu> * Removed references to RATs from the signature There are still a few references in the header comment. * Aside on continuations * Scrap the elision annotations
2018-12-16DRAT Signature (#2757)Alex Ozdemir
* DRAT signature Added the DRAT signature to CVC4. We'll need this in order to compare three BV proof pipelines: 1. DRAT -> Resolution -> Check 2. DRAT -> LRAT -> Check 3. DRAT -> Check (this one!) Tested the signature using the attached test file. i.e. running ``` lfscc sat.plf smt.plf lrat.plf drat.plf drat_test.plf ``` * Added type annotations for tests * Respond to Yoni's review * Apply Yoni's suggestions from code review Documentation polish Co-Authored-By: alex-ozdemir <aozdemir@hmc.edu> * Whoops, missed a spot or two
2018-12-11[LRA proof] More complete LRA example proofs. (#2722)Alex Ozdemir
* [LRA proof] Refine "poly" and "term Real" distinction Short Version: Refined the LRA signature and used the refined version to write two new test proofs which are close to interface compatible with the LRA proofs that CVC4 will produce. Love Version: LRA proofs have the following interface: * Given predicates between real terms * Prove bottom However, even though the type of the interface does not express this, the predicates are **linear bounds**, not arbitrary real bounds. Thus LRA proofs have the following structure: 1. Prove that the input predicates are equivalent to a set of linear bounds. 2. Use the linear bounds to prove bottom using farkas coefficients. Notice that the distinction between linear bounds (associated in the signature with the string "poly") and real predicates (which relate "term Real"s to one another) matters quite a bit. We have certain inds of axioms for one, and other axioms for the other. The signature used to muddy this distinction using a constructor called "term_poly" which converted between them. I decided it was better to buy into the distinction fully. Now all of the axioms for step (2) use the linear bounds and axioms for step (1) use both kinds of bounds, which makes sense because step (1) is basically a conversion. Also had to add an axiom or two, because some were missing. * Update proofs/signatures/th_lra.plf Co-Authored-By: alex-ozdemir <aozdemir@hmc.edu> * Improved test readability, removed unused axioms The LRA proof tests did not have appropriate documentation, and did not specify **what** they proved. Now they each have a header comment stating their premises and conclusion, and that conclusion is enforced by a type annotation in the test. The LRA signature included some unused axioms concerning `poly_term`. Now they've been removed. Credits to Yoni for noticing both problems.
2018-12-11[LRAT] signature robust against duplicate literals (#2743)Alex Ozdemir
* [LRAT] signature robust against duplicate literals The LRAT signature previously had complex, surprising, and occasionally incorrect behavior when given clauses with duplicate literals. Now it does not. Now clauses have true set semantics, and clauses with duplicate literals are treated identically to those without. * Test with logically = but structurally != clauses.
2018-12-11LRAT signature (#2731)Alex Ozdemir
* LRAT signature Added an LRAT signature. It is almost entirely side-conditions, but it works. There is also a collection of tests for it. You can run them by invoking ``` lfscc smt.plf sat.plf lrat.plf lrat_test.plf ``` * Update proofs/signatures/lrat.plf per Yoni's suggestion. Co-Authored-By: alex-ozdemir <aozdemir@hmc.edu> * Responding to Yoni's comments. * Removed unused varaibles Some tests declared `var`s which were unused. Now they don't.
2018-11-27LRA proof signature fixes and a first proof for linear polynomials (#2713)Alex Ozdemir
* LRA proof signature fixes and a first proof The existing LRA signature had a few problems (e.g. referencing symbols that didn't exist, extra parentheses, etc). I patched it up and wrote an first example LRA proof. load `th_lra_test.plf` last to run that test. * Add dependency info to signatures I chose to indicate shallow dependencies only.
2018-10-19Remove autotools build system. (#2639)Mathias Preiner
2018-09-22cmake: Add make install rule.Mathias Preiner
2018-09-22cmake: Only build libcvc4 and libcvc4parser as libraries.Mathias Preiner
The sources of all previous libraries are now added to libcvc4 and built as libcvc4. This removes circular dependencies between libcvc4 and libexpr. Further, we now only have one parser library and don't build additional libraries for each language.
2018-09-22cmake: Add libsignatures for proofs.Mathias Preiner
2018-09-22cmake: .cpp generation done, .h generation not yet completeAina Niemetz
2018-09-22cmake: Added initial build infrastructure.Aina Niemetz
2018-04-02a formula should be an instance of itself (#1668)yoni206
Proof checking failed when applying the instantiation rule so that the original formula and the instantiated formula are the same. Fixed using the new "ifequal" construct in lfsc.
2018-03-20correct instruction for running example (#1669)yoni206
2017-08-25Move LFSC checker out of the CVC repository. (#222)Aina Niemetz
LFSC now lives outside of the CVC4 repository and is not part of the CVC4 distribution anymore. As a consequence, we + Add --with-lfsc and --with-lfsc-directory as configure options. In the case where CVC4 has not been built with integrated LFSC, all code that interacts with LFSC is disabled. + Disable proof checking if CVC4_USE_LFSC is not defined. Configuring the build with --check-proofs but without --with-lfsc results in an error. + Do not call LFSC's cleanup function (but we should in the future). LFSC checker segfaults during cleanup on regression testcase regress0/bv/core/bitvec7.smt. Disabled call to lfscc_cleanup until the problem in lfscc is fixed. + Disable building with LFSC for the distcheck travis build since it is not part of the distribution anymore. Further, make distcheck with LFSC would require to call contrib/get-lfsc-checker before calling make check on the temp build (the build of the unpacked distribution tar ball).
2017-07-29Change remaining hash_set -> unordered_set (#208)Andres Noetzli
The nightly competition build has been failing due to a remaining use of hash_set in approx_simplex.cpp. This commit changes the remaining uses of hash_set to unordered_set. The remaining uses of hash_set were in LFSC. Switching to C++11 for LFSC required changing the configure.ac for LFSC to require C++11 support to make sure that it can be compiled independently from the rest of CVC4 (some of our Travis tests do that as well). To have the macros for these additional checks available, the commit adds a symlink to the files in config that contain the macros). I did not find a way to add macros from a parent's folder that did not break `make distcheck
2017-04-05Merge pull request #143 from FabianWolff/masterClark Barrett
Fix several spelling errors
2017-04-05[LFSC] Fix segfaultAndres Notzli
LFSC did not detect when the number of arguments provided to a side condition did not match the expected number of arguments, which could lead to out-of-bounds reads and writes. This commit adds a check and fixes one of the proof rules that provided the wrong number of arguments.
2017-04-05Fix several spelling errorsFabian Wolff
2017-03-17better support for proof production when encountering bool terms: handle the ↵guykatzz
new proof constructs generated by the equality engine. proof production for bool-array.smt2 passes
2017-03-09bug fixguykatzz
2017-03-09better proof support for bools and formulasguykatzz
2017-03-06Adding support for bool-to-bvClark Barrett
Squashed commit of the following: commit 5197a663eb262afbeb7740f53b5bd27479dccea0 Author: Clark Barrett <barrett@cs.stanford.edu> Date: Mon Mar 6 00:16:16 2017 -0800 Remove IFF case commit 2119b25a30ed42eca54f632e7232c9f76ae5755a Author: guykatzz <katz911@gmail.com> Date: Mon Feb 20 12:37:06 2017 -0800 proof support for bvcomp commit d8c0c0d2c9c92ce06a5033ec0f3f85ea7bda1a22 Author: Clark Barrett <barrett@cs.stanford.edu> Date: Fri Feb 17 21:09:04 2017 -0800 Added missing cases to operator<< for bv rewrite rules. commit 0ed797c31d0e66cadc35b2397716c841d1aff270 Author: Clark Barrett <barrett@cs.stanford.edu> Date: Fri Feb 17 11:43:51 2017 -0800 Added rewrite rules for new bitvector kinds. commit 3b23dffb317de5559f8a95118fef633f711c114a Author: Clark Barrett <barrett@cs.stanford.edu> Date: Mon Feb 13 14:41:49 2017 -0800 First draft of bool-to-bv pass.
2017-01-16[LFSC] Fix performance issues, more determinismAndres Notzli
For certain proofs, the performance was drastically different on different OSes. The cause for this difference was a pointer comparison in the deduplication in `Expr::defeq()`. Depending on how the OS allocated the memory, an expression `a` would get replaced with an equivalent expression `b` or vice versa, which in turn affected performance of `Expr::free_in()` dramatically (sub-second vs. >5 min running times). This commit makes the process more deterministic by using a heuristic that favors symbolic expressions and greedily tries to make small refcounts smaller when replacing, and changes `Expr::free_in()` to not repeatedly explore the same subexpressions.
2017-01-04Marking the proof signature files as non-executable.Tim King
2017-01-04Reverting two files encoding with DOS linebreaks back into using unix ↵Tim King
linebreaks.
2017-01-04Merge pull request #122 from 4tXJ7f/fix_lfsc_strAndrew Reynolds
[LFSC] Minor fixes/improvements
2016-12-28[LFSC] Minor fixes/improvementsAndres Notzli
- Avoid mixing new/delete with malloc/free - Remove reimplementation of strcmp - Add assertions
2016-12-28[LFSC] Fix memory leaks when creating CExprsfix_lfsc_mem_leaksAndres Notzli
In certain cases, LFSC was creating CExprs with the single-argument constructor, which allocates an array of one child, only to immediately replace it with a new array (without deleting the old one). Additionally, this commit fixes the construction of TYPE/KIND/MPZ/MPQ expressions (the null pointer is appended automatically by the single argument constructor, an array with two null pointer entries should not be necessary).
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback