summaryrefslogtreecommitdiff
path: root/src/theory
AgeCommit message (Collapse)Author
2017-10-20Make Sygus conjectures higher-order (#1244)Andrew Reynolds
* Represent sygus synthesis conjectures using higher-order quantification, remove associated hacks. * Minor fix * Fix bug in Node::hasBoundVar for non-ground operators. * Add regression. * Address review. * Apply clang format.
2017-10-19CBQI BV: Refactor solve_bv_constraint. (#1265)Aina Niemetz
This refactors function solve_bv_constraint to use a switch-case over kinds rather than an if-else chain.
2017-10-17Fixing 2 instances of an unused variable. (#1253)Tim King
2017-10-16Sygus enumerators to conjecture (#1237)Andrew Reynolds
* Initial revision of mapping sygus enumeration terms to CegConjectures. This will allow us to generalize conjecture-specific symmetry breaking. * Change function names, simplify. * Fix assertion, minor optimization * Cleanup, documentation, simplification. * Address review. * Apply clang format.
2017-10-13CBQI BV: Added EXTRACT handling. (#1240)Aina Niemetz
This adds inverse handling for BITVECTOR_EXTRACT. Fixes previously disabled regressions. These regressions are now enabled.
2017-10-12CBQI BV quick heuristics (#1239)Andrew Reynolds
Adds two heuristics for cbqi-bv, both disabled by default. The first optimistically solves for boundary points of inequalities. The second randomly interleaves inversion and value instantiations. Adds some newly solved regressions from SMT LIB.
2017-10-12Initial support for solving bit-vector inequalities (#1229)Andrew Reynolds
* Initial support for solving bit-vector inequalities in cegqi-bv using conversion to positive equality + model value slack. * Clang format, remove heuristic. * Update regressions. * Simplify interface for CegInstantiator
2017-10-11Enable regressions for CBQI BV and fix inverse for LSHR. (#1234)Aina Niemetz
This fixes and enables previously added regression tests for CBQI BV. It further removes one of the tests that was obsolete (since it goes through even without --cbqi-bv). This further fixes the inverse computation for BITVECTOR_LSHR, which was broken due to a mismatching bit-width when creating a shift node.
2017-10-11Add side conditions for UDIV_TOTAL, SHL, CONCAT. (#1224)Mathias Preiner
2017-10-11Cleaning up ProofArray class. (#1208)Tim King
2017-10-11Adds infrastructure for a rewriting pass in BvInstantiator::processAssertion ↵Andrew Reynolds
to remove non-invertible operators. Add regression. (#1222)
2017-10-10Ho node manager types (#1203)Andrew Reynolds
* Remove restrictions about function types * Introduce notion of first-class type, improve assertions, add comment on equality type rule. * Update comment
2017-10-10Fix memory leak in quantifiers engine (#1219)Andres Noetzli
Commit 96a0bc3b022b67b5ab79bf2ab087573c65a8d248 introduced a memory leak where d_quant_attr was not deleted when the QuantifiersEngine was destroyed. This commit fixes the issue by turning d_quant_attr into an std::unique_ptr.
2017-10-09Add skeleton of the FP theory solver (#1130)Martin
This commit adds the skeleton of the theory solver using a dummy version of the converter (fp_converter.{h,cpp}). The converter is a class that is used to produce bit-vector expressions equivalent to floating-point ones. The commit sets up the equality engine and the infrastructure for interacting with the main theory components. The majority of this code is still agnostic to how the conversion is actually implemented / what kind of theory solver this is. This is pretty much the template code you need to write any kind of theory solver. This includes equality reasoning and so should be able to solve some basic problems.
2017-10-09Split term database (#1206)Andrew Reynolds
* Move equality query to own file, move equality inference to quantifiers engine. * Move quantifiers attributes out of TermDb and into QuantAttribute. * Move term database sygus to quantifiers engine, move some attributes to quantifiers attributes header. * Split term database into term util. * Partial fix for #1205 that eliminates need for dependency in node.cpp. * Add more references to github issues.
2017-10-09CBQI BV: Add inverse for more operators. (#1213)Aina Niemetz
This implements side conditions and the instantiation via word-level inversion for operators BITVECTOR_AND, BITVECTOR_OR, BITVECTOR_UREM (Index=1), BITVECTOR_LSHR (index=0).
2017-10-05Ho model (#1120)Andrew Reynolds
* Update model construction for higher order. If HO_APPLY terms are present for a function, we use a curried (tree) model construction to avoid exponential size model representations for function definitions. * Update comments. * Change terminology in comment. * Improve comments.
2017-10-04Add mkZero, mkOne and mkUmulo to bv utils. (#1200)Aina Niemetz
This adds several utility functions for the theory BV. Function mkUmulo encodes an unsigned multiplication overflow detection operation, which we need for CBQI BV. In the future, we will introduce a Umulo node kind (and a corresponding bit-blasting strategy based on the encoding implemented in mkUmulo).
2017-10-04Ho quant util (#1119)Andrew Reynolds
Quantifiers utilities for higher-order. This makes the term indexing mechanisms in Term Database take into account equalities between functions, in which case the term indices for the two functions merges. Also adds required options and a minor utility for implementing app completion.
2017-10-03Move sygus grammar utilities to separate file. (#1184)Andrew Reynolds
* Move sygus grammar utilities to separate file. * Minor * Move includes
2017-10-02Unify hash functions for pairs (#1161)Andres Noetzli
CVC4 was implementing multiple, slightly different hash functions for pairs. With pull request #1157, we have a decent generic hash function for pairs. This commit replaces the existing hash function implementations with a typedef of the generic hash function.
2017-10-02Add 5 FP kinds for partial to total fn conversion (#1128)Martin
- Add new kinds for partially defined functions - Print the new kinds - Type rules for the new total kinds - Constant folding and rewrites for the new total kinds
2017-10-02Address comments from PR #1164. (#1174)Mathias Preiner
Make eliminateSkolemFunctions(...) iterative and some more minor fixes.
2017-10-01Removing throw specifiers from TypeEnumeratorBase's operator* and ↵Tim King
isFinished. (#1176) The throw specifier has been moved to a comment.f This allows for fixing several CIDs on FloatingPointEnumerator: 1457254, 1457258, 1457260, 1457269, 1457270, 1457274, and 1457275. This also has miscellaneous formatting, documentation and const labeling improvements.
2017-10-01CID 1457268: Initializing CegConjecture::d_syntax_guided to false. (#1181)Tim King
2017-10-01Refactor check function in last call effort of non-linear extension. (#1175)Andrew Reynolds
2017-09-30SyGuS streaming solution mode (#1131)Andrew Reynolds
* Refactor conjecture class in ce guided instantiation, move to own file. In preparation for sygus streaming mode. * Infrastructure for streaming guards, more cleanup. * Do explicit exclusion to move to next solution for sygus streaming option, now functional. More cleanup. * More cleanup, add comments. * Update comments * Optimizations for invariant synthesis. Fix corner case for single invocation inference, more encapsulation in single inv utility. Minor fix for variable elimination in quantifiers rewriter. * Fix makefile. * Cleanup. * Remove unused includes. * Minor
2017-09-29Move BvInverter class into separate file. (#1173)Mathias Preiner
2017-09-29Simplify representation of inversion Skolems for bv cegqi (#1164)Andrew Reynolds
* Simplify intermediate representation of inversion skolems for cegqi bit-vectors. Cache bv inversion status globally in QuantifierEngine. Generalize virtual term policy for marking eligible instantiation terms. Enable regression. * Enable other regression
2017-09-29Initial working version of BV word-level instantiation (#1158)Andrew Reynolds
* Initial work on BV CEGQI, still working on avoid circular dependencies with inversion skolems. * Guard by option, minor notes. * Minor * Minor fixes. * Minor
2017-09-28Cegqi refactor prep bv (#1155)Andrew Reynolds
* Preparing for bv instantiation, initial working version. * Undoing bv changes to break up into smaller commit.
2017-09-28Improve finite model finding for recursive predicates (#1150)Andrew Reynolds
* Optimization for model finding for recursive functions involving branching positions. Update documentation, add regressions. * Simplifications, update comments.
2017-09-27Minor fixes for partial quantifier elimination. (#1147)Andrew Reynolds
This forces "counterexample lemmas" (the formula B => ~phi[e] on page 23 of http://homepage.divms.uiowa.edu/~ajreynol/fmsd17-instla.pdf) to be added during TheoryQuantifiers::preRegisterTerm instead of at full effort check. This is required to ensure that CVC4's partial quantifier elimination algorithm produces correct results. Some background: "get-qe" and "get-qe-disjunct" are commands in the SMT2 parser. Here is how they can be used: [declarations] [assertions A] (get-qe (exists X F)) returns a ground formula F' such that A ^ F' and A ^ (exists X F) are equivalent. The command "get-qe-disjunct" provides an interface for doing an incremental version of "get-qe". [declarations] [assertions A] (get-qe-disjunct (exists X F)) returns a ground formula F1' such that A ^ F' implies A ^ (exists X F). It moreover has the property that if you call: [declarations] [assertions A] (assert F1') (get-qe-disjunct (exists X F)) this will give you a formula F2' where eventually: [declarations] [assertions A] (assert (not (or F1' ... Fn'))) (get-qe-disjunct (exists X F)) will either return "true" or "false", for some finite n. Here is an example that failed before this commit: (set-logic LIA) (declare-fun a () Int) (declare-fun b () Int) (declare-fun c () Int) (declare-fun d () Int) (assert (or (not (>= (+ a (* (- 1) b)) 1)) (not (>= (+ c (* (- 1) d)) 0)))) (get-qe-disjunct (exists ((x Int)) (and (> a b) (> c x) (> d x)))) This should return: (not (or (not (>= (+ a (* (- 1) b)) 1)) (>= (+ c (* (- 1) d)) 1))) Previously it was returning: false This is because the cbqi algorithm needs to assume the negation of the quantified formula we are doing qe on before it makes any decision. The get-qe-partial feature is being requested by Cesare and Daniel Larraz for Kind2. This improves our performance on quantified LIA/LRA: https://www.starexec.org/starexec/secure/details/job.jsp?id=24480 see CVC4-092617-2-fixQePartial
2017-09-27CEGQI for BV: Add inverse for BITVECTOR_MULT. (#1153)Aina Niemetz
This implements side conditions and the instantiation via word-level inversion for operator BITVECTOR_MULT.
2017-09-26Fix type checking of to_real (#1127)Martin Brain
to_real takes a single argument as given in kinds.
2017-09-26Improve FP rewriter: const folding, other (#1126)Martin Brain
2017-09-26Fixing CID 1362903: Initializing d_bvp to nullptr. (#1136)Tim King
2017-09-25Cegqi refactor substitutions (#1129)Andrew Reynolds
This refactors the apply substitution mechanism for counterexample-guided quantifier instantiation (CEGQI). Improvements to the code: (1) Methods have been added to the TermProperties class that summarize their theory-independent behavior (including "getModifiedTerm", "isBasic" etc.). For now, I have not made a "TermPropertiesArith" class yet since this will require more fundamental refactoring. (2) The terminology "has_coeff" is replaced "is_non_basic" throughout. (3) Added the applySubstitutionToLiteral method. (4) Both applySubstitution and applySubstitutionToLiteral are now private within CegInstantiator. This means that theory-specific instantiators do not need to implement custom ways of applying substitutions (previously the arithmetic instantiator was). (5) applySubstitutionToLiteral is automatically called on all literals (see line 297 of ceg_instantiator.cpp). This means that BvInstantiator::processAssertion is now called on substituted literals. So for instance if our context contains two literals: x = bv2, bvmul(x,y) = bv4 Say we are asked to solve for x first, and return the substitution {x -> bv2}, then if we are later asked to solve for y, we will call processAssertion for the literal bvmul(bv2,y)=bv4 (6) LIA-specific information "d_theta" in SolvedForm is encapsulated inside the class (with the understanding that this will be made virtual). This commit has no impact on quantified LIA / LRA: https://www.starexec.org/starexec/secure/details/job.jsp?id=24480 (see CVC4-092217-cegqiRefactorSubs)
2017-09-25Fix bug related to sort inference + subtypes. (#1125)Andrew Reynolds
2017-09-25Fixing CID 1362917: There was a branch where d_issup was not initialized. ↵Tim King
Switching members of InstantiationEngine to uniqur_ptr to simplify such cases. (#1133)
2017-09-25Fixing CID 1362895: Initializing d_bvp to nullptr. (#1137)Tim King
* Fixing CID 1362895: Initializing d_bvp to nullptr. Miscellaneous cleanup.
2017-09-21Sygus inv templ refactor (#1110)Andrew Reynolds
* Decouple single invocation techniques from deep embedding techniques. Embed templates for invariant synthesis into grammar instead of as a global substitution. Add regression. * Update comment on class * Cleanup * Comments for sygus type construction.
2017-09-20Extend quantifier-free UF solver to higher-order. This includes an ex… (#1100)Andrew Reynolds
* Extend quantifier-free UF solver to higher-order. This includes an extensionality inference, and lazy conversion from APPLY_UF to HO_APPLY terms.Implements collectModelInfo and theory combination for HO_APPLY terms. * Update comments, minor changes to functions. Update APPLY_UF skolem to be user-context dependent. * Remove unused NodeList
2017-09-19Add FP type enumerator and cardinality computer (#1104)Martin
2017-09-19Refactor cegqi instantiation infrastructure so that it is more independent ↵Andrew Reynolds
of instantiation for LIA. (#1111)
2017-09-14Make floating-point comparison operators chainable (#1101)Martin
Floating-point comparison operators are chainable according to the standard.
2017-09-14Remove unhandled subtypes (#1098)Andrew Reynolds
* Remove unhandled subtypes, which consequently makes typing rules uniformly stricter based on weakening the subtype relation. Ensure coercions in the smt2 and cvc parser for Real decimal constants whose type is Integer. Ensure type annotations are computed during preRewrite to ensure rewriting (which does not preserve types) does not impact term construction for parametric datatypes. This fixes issue #1048 (we now give an type exception). * Update unit test for parametric datatypes to reflect new subtyping relation. * Remove deprecated test. * Make array construction for lambdas work with new subtype relations to handle lambdas like (lambda ((x Int) (y Int)) (ite (= x 0) 0.5 0.0)).
2017-09-13Floating point symfpu support (#1093)Martin
Changes needed for the bit-blasting floating-point solver which are outside of it's area and / or applicable independently.
2017-09-13Add new kinds required for higher-order. (#1083)Andrew Reynolds
This consists of a binary apply symbol HO_APPLY that returns the result of applying its first argument to its second argument. Update the UF rewriter to ensure that non-standard APPLY_UF applications are rewritten into curried applications of HO_APPLY.
2017-09-13Add isConst check for lambda expressions. (#1084)Andrew Reynolds
Add isConst check for lambda expressions by conversions to and from an Array representation where isConst is implemented. This enables check-model to succeed on higher-order benchmarks. Change the builtin rewriter for lambda to attempt to put lambdas into constant form. Update regression.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback