summaryrefslogtreecommitdiff
path: root/src/theory/bv
AgeCommit message (Collapse)Author
2018-03-20Add support for CaDiCaL as eager BV SAT solver. (#1675)Mathias Preiner
2018-03-09Some minor cleanup in bv::utils. (#1663)Aina Niemetz
2018-03-06Make statistics output consistent. (#1647)Mathias Preiner
* Fixes --hide-zero-stats (and really skips the 0 values) * Removes the additional newline after each statistic * Introduces theory::getStatsPrefix(TheoryId) to generate consistent prefixes for statistics based on the theory id (e.g., THEORY_BV -> "theory::bv").
2018-03-05Enable -Wsuggest-override by default. (#1643)Mathias Preiner
Adds missing override keywords.
2018-02-23Add unit tests for BitVector, minor BV rewrite fix (#1622)Andres Noetzli
This commit adds unit tests for the BitVector class and adds some additional argument checks. Additionally, it fixes a minor issue in the ZeroExtendUltConst rule if the zero_extend was by 0 bits. In that case, the rule was calling BitVector::extract() with high < low.
2018-02-20Improve documentation of bv::utils::isCoreTerm (#1617)Aina Niemetz
2018-02-20Moved and simplified bv::utils::intersect. (#1614)Aina Niemetz
Tested against the recursive implementation with a temporary assertion on regression tests with --bv-eq-slicer=auto.
2018-02-20Unrecursified and merged bv::utils::is(Core|Equality)Term. (#1605)Aina Niemetz
This unrecursifies and merges bv::utils::isCoreTerm and bv::utils::isEqualityTerm to avoid code duplication. In the best case, the recursive implementation visits less nodes. This can be achieved with the non-recursive implementation, however, at the cost of increased code complexity. In practice, on QF_BV the new implementation slightly improves performance. Tested against the recursive implementation with a temporary assertion on regression tests (bv::utils::isCoreTerm was tested with --bv-eq-slicer=auto). Further tested on QF_BV with a TO of 300s (slight performance improvement).
2018-02-16bv::utils::mk(And|Or) Do not return true if size of vector is 0. (#1613)Aina Niemetz
2018-02-15Removed bv::utils::mkConjunction (redundant). (#1610)Aina Niemetz
2018-02-15Fix corner case for rewrite of mult by pow 2 (#1601)Andrew Reynolds
2018-02-13Remove unused cd_set_collection.h (#1606)Andres Noetzli
2018-02-13Moved (unrecursified) bv::utils::collectVars. (#1602)Aina Niemetz
2018-02-11Move (unrecursified) bv::utils::numNodes to lazy_bitblaster.cpp. (#1594)Aina Niemetz
This unrecursifies and moves bv::utils::numNodes to an unnamed namespace in lazy_bitblaster.cpp (only place where it is used). Tested against the recursive implementation (with a temporary Assertion) on regression tests.
2018-02-09Move BitVector specific funs from bv::utils to util/bitvector.h. (#1589)Aina Niemetz
2018-02-09Remove mkNode from bv::utils (#1587)Aina Niemetz
2018-02-09Removing an always true comparison (unsigned) >= 0u. (#1582)Tim King
2018-02-08Clean up bv utils (part one). (#1580)Aina Niemetz
This is part one of an effort to clean up bv utils. It addresses review comments not addressed in #1566 (changes of moved code), removes unused functions and moves a helper to compute the gcd over Index.
2018-02-08Updated copyrightAina Niemetz
2018-02-08Simplify and cleanup bv::utils::mkConjunction. (#1571)Aina Niemetz
2018-02-07Use template for bv::utils::mkOr. (#1570)Aina Niemetz
2018-02-07Adds a new CHECK macro that abort()s on failure. (#1532)Tim King
2018-02-07Use template for bv::utils::mkAnd. (#1569)Aina Niemetz
2018-02-06Renamed bv::utils::isBVGroundTerm to isBvConstTerm. (#1568)Aina Niemetz
2018-02-06Split and document theory_bv_utils. (#1566)Aina Niemetz
This moves the implementation from the header to the .cpp file. It further documents all functions in the header file.
2018-02-06Resolving warnings from -Winconsistent-missing-override on clang. (#1563)Tim King
2018-02-06Fix two multiply-by-constant corner cases for bv rewriter (#1562)Andrew Reynolds
2018-01-15Removing more miscellaneous throw specifiers. (#1509)Tim King
Removing more miscellaneous throw specifiers. Also fixing the spelling of amount in several places.
2018-01-08Removing more miscellaneous throw specifiers. (#1488)Tim King
Removing more miscellaneous throw specifiers.
2018-01-08Add bv util mkConst(unsigned, Integer&). (#1499)Aina Niemetz
2018-01-05Add special {SGE,SGT,NE}_UDIV1 side conditions for BV of size 1. (#1483)Mathias Preiner
This commit further fixes some other issues with bit-vectors of size 1.
2018-01-02Rewrites for BitVector multiplication (#1465)Andrew Reynolds
2017-12-20Add rewriting rule for ranking benchmarks. (#1448)Mathias Preiner
2017-12-08Add CEGQI BV linearization of additions and equalities over additions. (#1417)Mathias Preiner
Adds support for linearizing additions w.r.t. to a variable. For example, a * x + b + c * d * -x = e + x is rewritten to x * (a - c * d - 1) = e - b. This also adds an additional rewriting rule x * x = x --> x < 2.
2017-12-08Fixed side conditions for CBQI BV, added unit tests. (#1434)Aina Niemetz
This fixes the side conditions for BITVECTOR_UREM_TOTAL, BITVECTOR_UDIV_TOTAL, BITVECTOR_LSHR, BITVECTOR_ASHR, BITVECTOR_SHL. It refactors side condition generation for better readability and unit testing. It further adds unit tests for all side conditions we generate in order to check if they too weak or to restrictive (which may result in unsound behavior). This is achieved by checking the following two implications: not (exists x. s * x = t => SC) ... if sat, SC is too restrictive not (SC => exists x. s * x = t) ... if sat SC is too weak This simplifies to checking not (SC <=> exists x. s * x = t).
2017-12-08Make collect model info return a Bool (#1421)Andrew Reynolds
2017-11-30Add Gaussian Elimination as a preprocessing pass for BV. (#1342)Aina Niemetz
This adds Gaussian Elimination as a preprocessing pass for BV. Gaussian Elimination is only applied if the given bit-width guarantees that no overflows can occur.
2017-11-29Adding missing break statements. CID 1362756. (#1394)Tim King
2017-10-20Add rewriting rules for Eq/Ult with sign_extend and constants. (#1258)Mathias Preiner
2017-10-20Simplify atoms introduced while bitblasting. (#1267)Mathias Preiner
If a newly introduced atom is not rewritten it can happen that the literals of both the original atom and the rewritten atom end up in the CNF. However, only the original atom has a BB definition and the literal of the rewritten atom is unconstrained (no BB definition).
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-09-26Fixing CID 1362903: Initializing d_bvp to nullptr. (#1136)Tim King
2017-09-25Fixing CID 1362895: Initializing d_bvp to nullptr. (#1137)Tim King
* Fixing CID 1362895: Initializing d_bvp to nullptr. Miscellaneous cleanup.
2017-08-31Replace CVC4_THREADLOCAL in interactive_shell (#1065)Andres Noetzli
Commit 546d795470ca7c30fc62fe9b6c7b8e5838e1eed4 caused our nightly builds to fail because it did not replace CVC4_THREADLOCAL with CVC4_THREAD_LOCAL in interactive_shell. This commit fixes the issue and adds readline to Travis, s.t. readline related code gets compiled as part of our CI tests.
2017-08-23Fix typosAndres Noetzli
2017-08-21Cleanup: use Assert rather than C assert. (#1052)Aina Niemetz
2017-08-09Remove AigBitblaster implementation if ABC is not compiled (#212)Mathias Preiner
* Guard use of AigBitblaster with CVC4_USE_ABC. This removes the Unreachable() implementation of AigBitblaster in case CVC4 is not compiled with ABC support.
2017-08-09Fix Assertion (compiler warning) in theory/bv/theory_bv.cppAina Niemetz
2017-07-20Moving from the gnu extensions for hash maps to the c++11 hash mapsTim King
* Replacing __gnu_cxx::hash_map with std::unordered_map. * Replacing __gnu_cxx::hash_set with std::unordered_set. * Replacing __gnu_cxx::hash with std::hash. * Adding missing includes.
2017-07-07Update copyright headers.Mathias Preiner
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback