summaryrefslogtreecommitdiff
path: root/src/smt/smt_engine.cpp
AgeCommit message (Collapse)Author
2012-06-18bugfix, enable only QF_LRA, not other arithKshitij Bansal
2012-06-18QF_LRA, Quantifiers: enable use decision for (only for) stopping searchKshitij Bansal
2012-06-17QF_AUFLIA: enable use decision for (only for) stopping searchKshitij Bansal
2012-06-17enabling theoryof=term for quantifiers with sharingDejan Jovanović
disableing one test case in equantifiers/decision that runs long
2012-06-17Removed assertion that can failClark Barrett
2012-06-16This is an attempt to fix the bug in the justification heuristic. TheKshitij Bansal
other minor change is removing dependency of header file in theory_engine.h It fixes all known wrong answers in QF_BV and QF_AUFBV. It doesn't fix a wrong answer for QF_AUFLIA -- it is currently unclear what is the cause of this bug, could be sharing. Performance impact (turns out) is none on QF_BV and QF_AUFBV (except, of course, those for which the answer was wrong earlier; and also perhaps one or two off-cases) The issue was with how the infinite loop in justification stuff was prevented. To keep it short, I skip what was wrong earlier, and this is what is done now: * whenever an atomic formula is seen, a list of pairs of <IteSkolemVariable, AssertionCorrespondingToIteSkolem> is created for each skolem occuring in the atom. * we iterate over this list, doing the following: check if skolem is marked as visited. if not, mark visited, recurse, when back unmark. I lied, I will tell you what was being done earlier was -- 1. the check for not being visited was being done in each recursive call, not just for atoms. 2. The AssertionCorrespondingToIteSkolem was being used to check if something is visited and not IteSkolemVariable. I don't know if this makes any difference, but anyhow, I think this is cleaner & clearer, so I keep this.
2012-06-16changing theoryOf in shared mode with arrays to move equalities to arraysDejan Jovanović
disabled in bitvectors due to non-stably infinite problems the option to enable it is --theoryof-mode=term
2012-06-16Fixing if condition for trivial equalities in arithmetic. Also some ↵Tim King
whitespace issues in smt_engine.cpp.
2012-06-15Fixes some assertion failuresClark Barrett
2012-06-15Fix for incompleteness bug with decision engine: repeated simplificationClark Barrett
could introduce additional assertions that were not beign processed by the decision engine. Now these assertions are merged in with pre-ITE-removal assertions, ensuring the decision engine sees them.
2012-06-15one bug fixedKshitij Bansal
2012-06-14WIPKshitij Bansal
2012-06-14add failing regression, move error upKshitij Bansal
2012-06-14New substitutions implementation - fixes performance issue seen in nonclausalClark Barrett
simplification for some benchmarks
2012-06-14Removed an assertion, unneeded header fileClark Barrett
2012-06-14some changes to make CVC4 work nicely with trace executor for application ↵Morgan Deters
track; (set-option :print-success true) supported, (exit) causes immediate exit regardless of EOF, etc.
2012-06-14making --simplification=none the default for quantified logics; this a ↵Morgan Deters
request from andy. evidence of performance improvement: http://church.cims.nyu.edu/regress-results/compare_jobs.php?job_id=4516&reference_id=4475&p=5
2012-06-14bug ifx, mvKshitij Bansal
2012-06-14restore destruction of stuff in driverKshitij Bansal
2012-06-14This commit:Kshitij Bansal
* enables decision heuristic (justification) for QF_BV and QF_AUFBV * disables a failing regression in aufbv (because of equality engine assert failure trigerred by above change) * moves around the init procedure smt_engine * destruction time issues because of moving this -- still to be fixed, currently get around by not destucting stuff in driver
2012-06-14Brings the tuning branch into trunk. This includes the changes from ↵Tim King
restricted-simplex.
2012-06-12Moved some things around in the preprocessor. Now theory preprocessing getsClark Barrett
called before ite simplification unless arithrewriteequality is on
2012-06-12cleanup of exit mechanism when decisionEngine is on\n\n fixes some bugs we ↵Kshitij Bansal
were seeing in quantifiers+decision stuff
2012-06-12Fixed compile errorClark Barrett
2012-06-12Enabling constant propagationClark Barrett
2012-06-12Adding constant propagation code - needs more testing - off by defaultClark Barrett
2012-06-09Turning on unconstrained simp for QF_AUFBVClark Barrett
2012-06-08Merge from decision branch (till r3663)Kshitij Bansal
(no performace or search behavior changes expected)
2012-06-07LogicInfo locking implemented, and some initialization-order issues in ↵Morgan Deters
SmtEngine resolved. ALL_SUPPORTED and QF_ALL_SUPPORTED logics now supported by SMT-LIB parsers. In SMT-LIBv2, if a (set-logic..) command is missing, ALL_SUPPORTED is assumed, and a warning is issued, as discussed on the cvc4-devel mailing list.
2012-06-06Don't ever call nonclausalSimplify if simplificationMode = NONE (even ifClark Barrett
repeatSimp is true)
2012-06-06removing std::cout from trunkMorgan Deters
2012-06-04Added preprocessing pass that propagates unconstrained values - solves all ofClark Barrett
the unconstrained examples in QF_AUFBV/brummayerbiere3 - should also help generally on at least BV and maybe others. Off by default for now - results are mixed and it's hard to evaluate with so many existing assertion failures and segfaults - will re-evaluate once those are fixed
2012-06-01add a global user-context push/pop in smt engine, just like clark's addition ↵Morgan Deters
the other day of a push/pop of the sat context
2012-05-31Fixed bug in bv: one more case where non-shared equality was getting propagatedClark Barrett
Added a global push and pop around solving - fixes an assertion failure when TNodes are still around in a CDHashMap at destruction time.
2012-05-30Added BitwiseEq bitvector rewriteClark Barrett
Added option "--repeat-simp" which repeats nonclausal simplification: 4 times, twice before ite removal and twice after Enabled these options (plus ite-simp) on QF_AUFBV, obtaining significant speedup on dwp examples
2012-05-15This commit removes the CONST_INTEGER kind from nodes. This code comes from ↵Tim King
the branch arithmetic/remove_const_int.
2012-05-14fixes for shared term registration. previously the type was not considered ↵Dejan Jovanović
when looking at theories of the term and for a term like read(a, f(x)) the term f(x) would not be registered to arithmetic in AUFLIA. this fixies the issue of bug 330 and moves it to some other assertion fail.
2012-05-13fixing build warningsDejan Jovanović
2012-05-11Disabled arith-rewrite-equalities by default unless in a pure arithmetic theoryClark Barrett
2012-05-11Added some ITE rewrites,Clark Barrett
Added ITE simplifier - on by default only for QF_LIA benchmarks Fixed one bug in arrays Added negate() to node.h - it returns kind == NOT ? kind[0] : kind.notNode()
2012-05-09* simplifying equality engine interfaceDejan Jovanović
* notifications are now through the interface subclass instead of a template * notifications include constants being merged * changed contextNotifyObj::notify to contextNotifyObj::contextNotifyPop so it's more descriptive and doesn't clutter methods when subclassed * sat solver now has explicit methods to make true and false constants * 0-level literals are removed from explanations of propagations
2012-05-09Merge from decision branch (ITE support)Kshitij Bansal
Major changes from last merge * ITEs supported * Don't share theory lemmas to DE, only assertions Should probably be noted that 'make regress' doesn't quite pass with --decision=justification. Throws off search in couple of arith benchmarks. No serious performance changes expected. Keep an eye.
2012-04-30Added map from skolem variables to new ite formulas in ite removal.Clark Barrett
d_sharedTermsExist is now set based on logicInfo instead of dynamically when shared terms are found.
2012-04-28New LogicInfo functionality.Morgan Deters
src/theory/logic_info.{h,cpp} contains the CVC4::LogicInfo class, which keeps track of which theories are active (which should remain constant throughout the life of an SmtEngine) and other details (like integers, reals, linear/nonlinear, etc.). This class has a default constructor which is the most all-inclusive logic. Alternatively, this class can be constructed from an SMT-LIB logic string (the empty string gives the same as "QF_SAT"). Once constructed, theories can be enabled or disabled, quantifiers flipped on and off, integers flipped on and off, etc. At any point an SMT-LIB-like logic string can be extracted. The SmtEngine keeps a LogicInfo for itself and shares with the TheoryEngine (and, in turn, the theories) only a const reference to it. This ensures that the logic info doesn't mutate over the course of the run. As part of this commit, the TheoryEngine's old notion of "active theories" has been completely removed. As a result, SMT benchmarks that are incorrectly tagged with a logic will assert-fail or worse. (We should probably fail more gracefully in this case.) One such example was bug303.smt2, which used UF reasoning but was tagged QF_LIA. This has been fixed.
2012-04-23Merge from decision branch -- partially working justification heuristicKshitij Bansal
Overview of changes * command line option --decision={internal,justification} * justification heuristic handles all operators except ITEs revelant stats: decision::jh::* * if decisionEngine has solved the problem PropEngine returns unknown and smtEngine queries DE to get the answer relevant stat: smt::resultSource * there are known bugs Full list of commits being merged r3330 use CD data structures in JH r3329 add command-line option --decision=MODE r3328 timer stat, other fixes r3326 more trace r3325 enable implies, iff, xor (no further regression losses) r3324 feed decision engine lemmas, changes to quitting mechanism r3322 In progress r3321 more fixes... r3318 bugfix1 (69 more to go) r3317 Handle other boolean operators in JH (except ITE) r3316 mechanism for DE to stopSearch r3315 merge from trunk + JH translation continuation r3275 change option to enable JH by default[A
2012-04-17A dummy decision engine. Expected performance impact: none.Kshitij Bansal
Adds DecisionEngine and an abstract class DecisionStrategy which other strategies will derive from eventually. Full revision summary of merged commits: r3241 merge from trunk r3240 fix r3239 WIP r3238 JH, CVC3 code: 5% done -- 5% translated r3237 JH groundwork r3236 make make regrss pass r3234 hueristic->heuristic r3229 JustificationHeuristic: EOD-WIP r3228 DecisionEngine: hookup assetions r3227 move ITE outside simplifyAssertions r3226 DecisionStrategy abstract class r3222 DecisionEngine: begin
2012-04-17Merges branches/arithmetic/atom-database r2979 through 3247 into trunk. ↵Tim King
Below is a highlight of the changes: - This introduces a new normal form to arithmetic. -- Equalities and disequalities are in solved form. Roughly speaking this means: (= x (+ y z)) is in normal form. (See the comments in normal_form.h for what this formally requires.) -- The normal form for inequality atoms always uses GEQ and GT instead of GEQ and LEQ. Integer atoms always use GEQ. - Constraint was added to TheoryArith. -- A constraint is a triple of (k x v) where: --- k is the type of the constraint (either LowerBound, UpperBound, Equality or Disequality), --- x is an ArithVar, and --- v is a DeltaRational value. -- Constraints are always attached to a ConstraintDatabase. -- A Constraint has its negation in the ConstraintDatabase [at least for now]. -- Every constraint belongs to a set of constraints for each ArithVar sorted by the delta rational values. -- This set can be iterated over and provides efficient access to other constraints for this variable. -- A literal may be attached to a constraint. -- Constraints with attached literals may be marked as being asserted to the theory (sat context dependent). -- Constraints can be propagated. -- Every constraint has a proof (sat context dependent). -- Proofs can be explained for either conflicts or propagations (if the node was propagated). (These proofs may be different.) -- Equalities and disequalities can be marked as being split (user context dependent) - This removes and replaces: -- src/theory/arith/arith_prop_manager.* -- src/theory/arith/atom_database.* -- src/theory/arith/ordered_set.h - Added isZero(), isOne() and isNegativeOne() to Rational and Integer. - Added operator+ to CDList::const_iterator. - Added const_iterator to CDQueue. - Changes to regression tests.
2012-04-11merge from arrays-clark branchMorgan Deters
2012-04-06* Fix ITEs and functions in CVC language printer.Morgan Deters
* Permit "BOOL = BOOL" in CVC language parser (auto-replaced with IFF internally, except in strict mode). * SExpr atoms now can be string-, integer-, or rational-valued. * SmtEngine::setInfo(":status", ...) now properly dumps a SetBenchmarkStatusCommand rather than a SetInfoCommand. * Some dumping fixes (resolves bug 313)
2012-04-02fix for cvc4_logic dumpKshitij Bansal
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback