summaryrefslogtreecommitdiff
path: root/src/util
AgeCommit message (Collapse)Author
2018-03-23Remove abstract regular expression constant (#1698)Andrew Reynolds
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-03-05Add uniform way to serialize containers of Expr to stream. (#1638)Aina Niemetz
2018-02-27Improve rewriter for string indexof (#1592)Andrew Reynolds
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-23Split and document bitvector.h. (#1615)Aina Niemetz
2018-02-09Move BitVector specific funs from bv::utils to util/bitvector.h. (#1589)Aina Niemetz
2018-02-09Renaming CHECK to CVC4_CHECK. This avoids name collisions with other popular ↵Tim King
assertion macros. This name is likely temporary while Assert() is deprecated. (#1590)
2018-02-08Initializing Timer::d_wall_limit (CID 1362899). (#1573)Tim King
2018-02-07Adds a new CHECK macro that abort()s on failure. (#1532)Tim King
2018-02-05Aborting on errors in StatisticsRegistry::unregisterStat() instead of ↵Tim King
throwing exceptions. This is called from destructors and therefore it is inappropraiate to throw exceptions. This solution is temporary until Assert() is deprecated in favor of an aborting version. (#1539)
2018-02-02Restoring ostream format. Resolves a few CIDs 1362780. (#1543)Tim King
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-09Cleaning up throw specifiers on Exception and subclasses. (#1475)Tim King
2018-01-09Reorganized bitvector.h. (#1505)Aina Niemetz
2018-01-08Removing more miscellaneous throw specifiers. (#1488)Tim King
Removing more miscellaneous throw specifiers.
2018-01-07Removes RationalFromDoubleException. Replaces this with an explicit M… (#1476)Tim King
* Removes RationalFromDoubleException. Replaces this with an explicit Maybe<Rational> datatype. Makes Maybe<T> CVC4_PUBLIC. Updates the users of Rational::fromDouble(). Miscellaneous cleanup of ApproxSimplex.
2017-12-29Fix RNG for seed = 0. (#1459)Aina Niemetz
The default value for the seed for CVC4's RNG is 0. However, xorshift* requires a non-zero seed, else it generates only zero values. This fixes and prevents this behavior by resetting a given zero seed to ~0.
2017-11-17Add random number generator. (#1370)Aina Niemetz
This adds a deterministic (seeded) random number generator (RNG). It implements the xorshift* generator (see S. Vigna, An experimental exploration of Marsaglia's xorshift generators, scrambled. ACM Trans. Math. Softw. 42(4): 30:1-30:23, 2016).
2017-11-15Adding garbage collection for Proof objects. (#1294)Tim King
2017-11-09Add modular arithmetic operators. (#1321)Aina Niemetz
This adds functions on Integers to compute modular addition, multiplication and inverse. This is required for the Gaussian Elimination preprocessing pass for BV.
2017-11-07 Initialize TimerStat::d_start. (#1330)Tim King
* Initialize TimerStat::d_start. * 0 initializing d_data.
2017-11-06Add getValue() for Rational and Integer (GMP and CLN). (#1309)Aina Niemetz
Returns a copy of d_value to enable public access of GMP and CLN data.
2017-10-27Improve strings rewriter for contains (#1207)Andrew Reynolds
* Work on rewriter for string contains. * Add rewrites that mix str.to.int and str.contains. Documentation, add regression. * Minor * Minor * Address review, add a few TODOs. Improve some non-digit -> not is number. * Fix * Simplify. * Clang format, minor fixing of comments.
2017-10-25Use uintptr_t for pointer casts in Swig files (#1278)Andres Noetzli
CVC4's Swig interface files were casting pointers to longs in multiple instances. The problem with that is that on certain platforms *cough* Windows/MinGW *cough* long is only 32-bit even when compiling a 64-bit executable (they use the LLP64 data model). This made the compilation of language bindings fail with MinGW. This commit changes the types to uintptr_t defined in Swig's stdint.i.
2017-10-18Strings API escape sequences (#1245)Andrew Reynolds
* Argument for strings class to specify whether to process escape sequences. * Change default value on string constructor. * Make CVC4::String::toString symmetric to the constructor for CVC4::String, document. * Clang format.
2017-09-29Better hash function for pairs (#1157)Andres Noetzli
CVC4 was computing hashes for pairs of objects by simply XORing the hashes of the two objects. This commit implements a better way of combining hashes based on the FNV-1a hash algorithm. The algorithm is public domain.
2017-09-26Fix build for old GMP version (#1114)Andres Noetzli
Older versions of GMP in combination with newer versions of GCC and C++11 cause errors [0]. This commit adds the necessary includes of <cstddef>. [0] https://gcc.gnu.org/gcc-4.9/porting_to.html
2017-09-18Fix issue #1105 involving string to int (#1112)Andrew Reynolds
This was introduced by changing the implementation of "isNumber" in this commit: a94318b This fixes issue #1105.
2017-09-18Floating point symfpu support (#1103)Martin
- Update the parser to the new constant construction - Fix the problem with parsing +/-zero and remove some dead code - Extend the interface for literal floating-point values. - Add a constructor so that a parameteric operator structure can be created from a type - Add constructors so parametric operator constants can be easily converted - Update SMT2 printing so that it uses the informative output
2017-09-13Remove unused RecordSelect and TupleSelect (#1087)Andres Noetzli
Commit 62b673a6b8444c14c169a984dd6e3fc8f685851e remove most of the record/tuple infrastructure but did not remove the classes RecordSelect and TupleSelect which lead to issues with Java bindings (the references to the corresponding mkConst implementations could not be resolved). This commit removes the remaining traces of those classes.
2017-08-24Merge pull request #191 from timothy-king/cleanup-regexpAndrew Reynolds
Cleaning up the CVC4::String class.
2017-08-21Cleanup: use Assert rather than C assert. (#1052)Aina Niemetz
2017-08-17Remove unused SubrangeBound(s) classes (#221)Andres Noetzli
As discussed in pull request #220, commit 360d6ee8d3cdd5ddb47c328043eaed3a107b8db1 mostly got rid of SubrangeBound(s). There were still a few mentions of it left in the code, most of them commented out. The occurrences in expr.i and expr_manager.i, however, created issues with the Python wrapper. This commit removes the SubrangeBound(s) implementation and other leftovers.
2017-08-04Reorganized bitvector.hAina Niemetz
2017-08-04Fix commentsAina Niemetz
2017-08-04Fix typos in commentsAina Niemetz
2017-07-20Merge branch 'master' into cleanup-regexpTim King
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-17Fixing the order of the comparison operation.Tim King
2017-07-17Merge branch 'master' into cleanup-regexpTim King
2017-07-16Moving to static_assert now that c++11 is available.Tim King
2017-07-13Cleaning up the CVC4::String class.Tim King
2017-07-07Avoid invoking copy constructor when safe printing (#184)Andres Noetzli
When CVC4 gets interrupted, we use async-signal safe printing functions to print statistics. Unfortunately, the code for that was invoking copy constructors, which is problematic due to memory allocation; for example with statistics such as ReferenceStat<std::string>. This commit adds a getDataRef() method for statistics that returns a const reference to the object being printed such that the copy constructor is not called. Note: modifying getData() was unfortunately not an option because in the case of TimerStat, we can't return a reference to an object on the stack. We could remove the const modifier on getData() and use d_data to store the information but then we would have to remove it on safeFlushInformation() and potentially other methods as well, which seems like a worse solution.
2017-07-07Update copyright headers.Mathias Preiner
2017-07-07Use new copyright header format.Mathias Preiner
2017-05-15Minor fix in safe_print functionAndres Noetzli
This commit fixes two issues reported by Coverity: - Fixes the check whether the buffer is full in safe_print_hex - Removes dead code in safe_print for floating-point values Additionally, it fixes an issue reported by Andy where the names of the statistics were printed as "<unsupported>" due to calling the const char* version instead of the std::string version of safe_print. Finally, this fixes an issue where --segv-spin would not print the program name because it was a const char*. The program name is now stored as a string. NOTE: As a side effect, the last part also fixes Coverity issue 1362944, which has been in CVC4 for a long time.
2017-05-12Make signal handlers saferAndres Notzli
As reported in bug 769, the signal handlers currently use unsafe functions such as dynamic memory allocations and fprintf. This commit fixes the issue by introducing functions for printing statistics in signal handlers (functions with the `safe` prefix). It also avoids copying statistics, which further avoids dynamic memory allocation. The safe printing of statistics has some limitations (it does not support SExprStats or printing CVC4::Result), which should not matter much in practice. Printing statistics in a non-signal handler is not affected by these changes as that uses a separate code path (the functions without the `safe` prefix). Additional changes: - Remove ListStat as it is not used anywhere - Add unit test for safe printing statistics
2017-03-16Parsing support for SMT LIB 2.6. Minor fixes for printing datatypes. Fix for ↵ajreynol
mkGroundTerm for parametric datatypes. Minor change to run_regression to allow regressions to override input language. Minor refactoring to Cvc.g.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback