summaryrefslogtreecommitdiff
path: root/src/theory/bv/bitblast/lazy_bitblaster.cpp
AgeCommit message (Collapse)Author
2020-09-01Removes old proof code (#4964)Haniel Barbosa
This deletes much of the old proof code. Basically everything but the minimal necessary infra-structure for producing unsat cores. That includes dependency tracking in preprocessing, the prop engine proof and the unsat core computation code in the old proof manager. These should also go once we fully integrate into master the new proof infrastructure. It also cleans interfaces that were using old-proof-code-specific constructs (such as LemmaProofRecipe). When possible or when it made sense standalone local proof production code was kept, but deactivated (such is in the equality engine and in the arithmetic solver).
2020-08-31Simplify interface for computing relevant terms. (#4966)Andrew Reynolds
This is a followup to #4945 which simplifies the contract for computeRelevantTerms.
2020-07-07Transfer ownership of internal Options from NodeManager to SmtEngine (#4682)Andrew Reynolds
This PR decouples Options from NodeManager. Instead, options now live in SmtEngine. The changes that were required for this PR include: The main internal options object is now owned by SmtEngine instead of ExprManager. The ownership resource manager is moved from NodeManager to SmtEngine. Node manager listeners are deleted, timeouts and resource limits are set during SmtEngine::finishInit. A temporary hack was added to make the last constructed SmtEngine to be the one in scope. This ensures that options are in scope whenever an SmtEngine is created. The methods for invoking "subsolvers" (theory/smt_engine_subsolver.h,cpp) was simplified, as versions of these calls that change options do not have to clone a new copy of the ExprManager anymore. Resource manager was removed from the smt2 parser. Minor refactoring was done in SmtEngine to copy "original options" so that options are restored to their state after parsing command line options on reset. Updates to unit tests to ensure conformance to new options scoping.
2020-06-16Update copyright headers.Aina Niemetz
2020-06-16BV: Fix querying equality status in lazy bit-blaster. (#4618)Aina Niemetz
Fixes #4076. In the lazy bit-blaster, when querying the equality status, if the SAT solver has a full model, it is queried for the model values of the operands of the equality. However, the check if the bit-blaster has a full model did not consider the case where no assertions have yet been added, which leads to querying values of bits that are still unassigned in the SAT solver. Co-authored-by: <mathias.preiner@gmail.com>
2020-04-09Towards proper use of resource managers (#4233)Andrew Reynolds
Resource manager will be owned by SmtEngine in the future. This passes the resource manager cached by SmtEnginePrivate to the PropEngine created by SmtEngine instead of using the global pointer. It also makes a few preprocessing passes use the resource manager they already have access to and should use.
2020-02-19resource manager: Add statistic for every resource. (#3772)Mathias Preiner
This commit adds statistics for all resource steps. A resource statistic is incremented by 1 if the resource is spent (via `spendResource`). Fixes #3751.
2019-10-30Unify CVC4_CHECK/CVC4_DCHECK/AlwaysAssert/Assert. (#3366)Mathias Preiner
2019-03-26Update copyright headers.Aina Niemetz
2019-01-19Fix missing-override warning (#2811)Andres Noetzli
`TLazyBitblaster::setProofLog()` was defined even though the method was not virtual before PR #2808 and `TBitblaster` was implementing the same method. After that PR, which made the method virtual, GCC complained about a missing `override` keyword for `setProofLog()`. However, the method should have been removed (see [comment](https://github.com/CVC4/CVC4/pull/2786#discussion_r247299617)). This commit removes the function definition.
2019-01-14ClausalBitvectorProof (#2786)Alex Ozdemir
* [DRAT] ClausalBitvectorProof Created a class, `ClausalBitvectorProof`, which represents a bitvector proof of UNSAT using an underlying clausal technique (DRAT, LRAT, etc) It fits into the `BitvectorProof` class hierarchy like this: ``` BitvectorProof / \ / \ ClausalBitvectorProof ResolutionBitvectorProof ``` This change is a painful one because all of the following BV subsystems referenced ResolutionBitvectorProof (subsequently RBVP) or BitvectorProof (subsequently BVP): * CnfStream * SatSolver (specifically the BvSatSolver) * CnfProof * TheoryProof * TheoryBV * Both bitblasters And in particular, ResolutionBitvectorProof, the CnfStream, and the SatSolvers were tightly coupled. This means that references to and interactions with (R)BVP were pervasive. Nevertheless, an SMT developer must persist. The change summary: * Create a subclass of BVP, called ClausalBitvectorProof, which has most methods stubbed out. * Make a some modifications to BVP and ResolutionBitvectorProof as the natural division of labor between the different classes becomes clear. * Go through all the components in the first list and try to figure out which kind of BVP they should **actually** be interacting with, and how. Make tweaks accordingly. * Add a hook from CryptoMinisat which pipes the produced DRAT proof into the new ClausalBitvectorProof. * Add a debug statement to ClausalBitvectorProof which parses and prints that DRAT proof, for testing purposes. Test: * `make check` to verify that we didn't break any old stuff, including lazy BB, and eager BB when using bvminisat. * `cvc4 --dump-proofs --bv-sat-solver=cryptominisat --bitblast=eager -d bv::clausal test/regress/regress0/bv/ackermann2.smt2`, and see that 1. It crashed with "Unimplemented" 2. Right before that it prints out the (textual) DRAT proof. * Remove 2 unneeded methods * Missed a rename * Typos Thanks Andres! Co-Authored-By: alex-ozdemir <aozdemir@hmc.edu> * Address Andres comments * Reorder members of TBitblaster
2018-12-03Bit vector proof superclass (#2599)Alex Ozdemir
* Split BitvectorProof into a sub/superclass The superclass contains general printing knowledge. The subclass contains CNF or Resolution-specific knowledge. * Renames & code moves * Nits cleaned in prep for PR * Moved CNF-proof from ResolutionBitVectorProof to BitVectorProof Since DRAT BV proofs will also contain a CNF-proof, the CNF proof should be stored in `BitVectorProof`. * Unique pointers, comments, and code movement. Adjusted the distribution of code between BVP and RBVP. Notably, put the CNF proof in BVP because it isn't resolution-specific. Added comments to the headers of both files -- mostly BVP. Changed two owned pointers into unique_ptr. BVP's pointer to a CNF proof RBVP's pointer to a resolution proof BVP: `BitVectorProof` RBVP: `ResolutionBitVectorProof` * clang-format * Undo manual copyright modification * s/superclass/base class/ Co-Authored-By: alex-ozdemir <aozdemir@hmc.edu> * make LFSCBitVectorProof::printOwnedSort public * Andres's Comments Mostly cleaning up (or trying to clean up) includes. * Cleaned up one header cycle However, this only allowed me to move the forward-decl, not eliminate it, because there were actually two underlying include cycles that the forward-decl solved. * Added single _s to header gaurds * Fix Class name in debug output Credits to Andres Co-Authored-By: alex-ozdemir <aozdemir@hmc.edu> * Reordered methods in BitVectorProof per original ordering
2018-06-25Updated copyright headers.Aina Niemetz
2018-04-02Reorganize bitblaster code. (#1695)Mathias Preiner
This splits bitblaster_template.h into the separate header files {aig,eager,lazy}_bitblaster.h and bitblaster.h (the template class TBitblaster). All the bitblaster related code is moved into the sub-directory bitblast/.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback