summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-11-04Eliminate deprecated utility function from sygus (#3431)Andrew Reynolds
2019-11-01Fix non-termination in datatype type enumerator (#3369)Andrew Reynolds
2019-11-01Fix and refactor TheoryStrings::checkFlatForms() (#3326)Andres Noetzli
This commit fixes some minor (performance) issues in `TheoryStrings::checkFlatForms()`: The `inelig` vector was initialized with copies of the `start` element instead of all the elements before `start` and the `else` branch of `count == asize` was looping over all elements from `1` instead of `start + 1`. Additionally, this commit refactors the code to be a bit more readable.
2019-11-01Eagerly beta reduce during sygus to builtin term conversion (#3418)Andrew Reynolds
2019-10-31Rename datatypes sygus solver (#3417)Andrew Reynolds
2019-10-31Fix Unimplemented() macros missed in #3366. (#3424)Mathias Preiner
2019-10-30Unify CVC4_CHECK/CVC4_DCHECK/AlwaysAssert/Assert. (#3366)Mathias Preiner
2019-10-29Split some generic utilities from the non-linear extension (#3419)Andrew Reynolds
* Split arith util * Cleaner * cpp * Format * Minor
2019-10-28Fix for non-linear models (#3410)Andrew Reynolds
* Towards fix for non-linear models * Format * Fix * More * Improve * Format * More
2019-10-28Fix integer division rewrite (#3415)Andres Noetzli
2019-10-27Fix collect model info for higher-order (#3409)Andrew Reynolds
This ensures we add lemmas when collect model info fails for the higher order extension of UF. This fixes #3405 (that benchmark now answers unknown).
2019-10-27Fix global-declarations support (#3403)Andres Noetzli
2019-10-23Fixes for SyGuS + regular expressions (#3313)Andrew Reynolds
This commit fixes numerous issues involving the combination of SyGuS and regular expressions. Combining SyGuS and regular expressions may involve constructing regular expressions that are neither variables nor builtin regular expression operators. The code was not robust for this case, either throwing spurious assertion failures or having incorrect behavior.
2019-10-22Refactoring skolems for sets (#3381)Andrew Reynolds
This refactors skolems introduced in the theory of sets. This is analogous to how skolems are treated for the theory of strings. A key change that this commit enables is to identify "variable" sets based on those that weren't introduced by the SkolemCache (instead of via a check that their kind is `VARIABLE`, which is done currently and is error prone).
2019-10-22NodeValue: Eliminate redundant NBITS macros. (#3400)Aina Niemetz
Previously, the metakind header defined macros for the number of bits reserved for fields in the NodeValue "header" (for the reference count, the node kind, the number of children and the node id). These macros were redundant, since the only one using them was the NodeValue itself, which redefined them (while using them) as constants in the class. Additionally, MAX_CHILDREN was defined (using these macros) not only in the metakind header, but redefined in other places. This commit defines the above values as constexpr members of the NodeValue class and cleans up redundancy.
2019-10-20Cleaning-up the declaration of wrapped functions/methods, which have no ↵Andrew V. Jones
definitions (#3399) Signed-off-by: Andrew V. Jones <andrewvaughanj@gmail.com>
2019-10-18Update overflow check to handle negative numbers (#3396)makaimann
2019-10-17 Move datatype utility functions to own file (#3397)Andrew Reynolds
2019-10-16Solver state for theory of strings (#3181)Andrew Reynolds
This refactors the theory of strings to use a solver state object, which manages state information regarding assertions. It also deletes some unused/undefined functions in theory_strings.h. There are no major changes to the behavior of the code or its documentation in this PR. This is work towards #1881.
2019-10-15Fix line numbers in templates (#3391)Andres Noetzli
This commit updates the line numbers in templates to address warnings due to wrong line numbers.
2019-10-15Fix OOB access (#3383)Andres Noetzli
In theory_engine.cpp, we were calling `theoryOf()` with `THEORY_SAT_SOLVER` as the theory id. However, `THEORY_SAT_SOLVER` is defined as `THEORY_LAST` and thus out-of-bounds of the `d_theoryTable` defined in theory_engine.h (which is of size `THEORY_LAST`. This commit adds an assertion that detects the out-of-bound access and introduces a method to turn a theory id into a string which correctly handles `THEORY_SAT_SOLVER`.
2019-10-14Support UF in default sygus grammars (#3319)Andrew Reynolds
2019-10-14Apply sygus repair constant techniques restricted to refinement lemmas (#3386)Andrew Reynolds
2019-10-14Ensure lemmas from sygus repair const are guarded (#3385)Andrew Reynolds
2019-10-14Minor refactor in strings rewriter (#3387)Andrew Reynolds
2019-10-13Eliminate negative constant coefficients in div/mod (#2929)Andrew Reynolds
Fixes #1399.
2019-10-11Check that logic is set when synth-fun command is encountered (#3384)Andrew Reynolds
2019-10-11Add support for UBSan instrumentation (#3382)Andres Noetzli
This commit adds support for compiling CVC4 with UBSan instrumentation. The commit also adds a dummy version of `AigBitblaster`. Previously, when CVC4 was built without ABC, `AigBitblaster` was not fully defined (the class was declared but the implementation was not being compiled). This lead to missing RTTI information when compiling with UBSan instrumentation.
2019-10-10Make order of theories explicit in the source code. (#3379)Aina Niemetz
Fixes #2517. This makes the order of theories explicit in the source code rather than relying on the order defined via the build system. Previously, the build system ensured the order of the theories via the KINDS_FILES variable, which is a list of kinds files that is fed to code generation scripts (mkkind, mkmetakind, mkrewriter, mktheorytraits). The generated code critical to the order of theories w.r.t. soundess is the TheoryId enum, and the CVC4_FOR_EACH_THEORY macro. Ideally, we would want to get rid of the latter (ugly and error prone), which is not possible in the current configuration, and to be discussed in the future. This PR moves the TheoryID enum and related functions to theory/theory_id.h, and the CVC4_FOR_EACH_THEORY macro to theory/theory_engine.cpp, the only place where it is used. I ran it on whole SMT-LIB (non-incremental and incremental) and did not encounter any soundness issues. The only issue that did occur is not related to these changes, non-critical and known: #2993
2019-10-10Warning instead of assertion for failing propagating instance (#3380)Andrew Reynolds
2019-10-09NodeValue: Use 'using' instead of 'typedef'. (#3374)Aina Niemetz
2019-10-09NodeValue: Use fixed width return type for getRefCount(). (#3374)Aina Niemetz
2019-10-09Reorder NodeValue class according to our code style guidelines. (#3374)Aina Niemetz
2019-10-08Avoid printing success for `--force-logic` (#3363)Andres Noetzli
CVC4 was printing success when `--force-logic` was used because internally, `--force-logic` generates a `SetBenchmarkLogicCommand`. This caused issues with the SMT-COMP trace executor. This commit fixes the behavior by muting the command if it was not issued by the user. The issue was likely introduced with #3062.
2019-10-08New C++ API: Term: Add missing checks for null. (#3364)Aina Niemetz
Co-Authored-By: Andres Noetzli <andres.noetzli@gmail.com>
2019-10-08Limit cases of sygus inference based on type (#3370)Andrew Reynolds
This makes `--sygus-inference` a no-op for inputs where there is a free function whose sort cannot be handled in a sygus grammar. It also fixes an issue where skolem variables were not being treated as functions-to-synthesize. Fixes #3250 and fixes #3356.
2019-10-08Fix method for getting arithmetic function definition body (#3371)Andrew Reynolds
2019-10-08prefer prefix ++ operator for iteratorsPiotr Trojanek
Detected with cppcheck static analyser, which said: (performance) Prefer prefix ++/-- operators for non-primitive types. Reformat with clang-format as needed. Signed-off-by: Piotr Trojanek <piotr.trojanek@gmail.com>
2019-10-08pass parameters by reference where it affects performancePiotr Trojanek
Detected with cppcheck static analyser, which said: (performance) Function parameter should be passed by reference. Reformat with clang-format as needed. Signed-off-by: Piotr Trojanek <piotr.trojanek@gmail.com>
2019-10-08[CVC Parser] Add support for regular expressions (#3346)Andres Noetzli
2019-10-08Disallow --proof and --incremental (#3332)Andres Noetzli
2019-10-08Make ackermannization generally applicable rather than just BV (#3315)Ying Sheng
The ackermannization process is currently already support general theories rather than specifically for BV. In this pull request, an option has been added to turn on ackermannization independently.
2019-10-07New C++ API: Add Term::getId(). (#3360)Aina Niemetz
+ use explicit types in NodeValue + add unit test for Term::isParameterized() Co-Authored-By: makaimann <makaim@stanford.edu>
2019-10-07[SMT2 Parser] Move code of `rewriterulesCommand` (#3334)Andres Noetzli
This commit moves the code in `rewriterulesCommand` in the SMT2 parser to the `Smt2` class. Additionally, it creates a `boundVarList` rule to reduce code duplication.
2019-10-06Fix str to int reduction (#3358)Andrew Reynolds
This fixes a corner case of the str-to-int reduction for the case where the argument is the empty string. This fixes #3357.
2019-10-04Avoid duplicate lemmas in datatypes (#3310)Andrew Reynolds
We previously were sending e.g. dt.size >= 0 lemmas when size terms are pre-registered, which can happen multiple times in a user context. This ensures we cache whether a lemma is sent in a user-context dependent way in the datatypes solver. This ensures we don't send the same lemma twice for dt.size >= 0 lemmas.
2019-10-03Disable proofs for unsupported logics (#3327)yoni206
This commit makes CVC4 complain if the user asked for proofs for an unsupported logic (in this contest, ALL is considered unsupported). Changes in the regression script are introduced as well, in order to only request proofs for regressions in supported logics.
2019-10-03Add missing type definitions to CDHashMap iterator (#3330)Andres Noetzli
Our `CDMapBlack` test failed to compile with newer versions of libstdc++ because they require the `value_type` to be defined for the iterator (accessed via `std::iterator_traits`). Due to the implementation of `std::iterator_traits`, we also need to define `iterator_category`, `difference_type`, `pointer`, and `reference`.
2019-10-03[SMT2 Parser] Move code of `sygusCommand` (#3335)Andres Noetzli
This commit moves the code in `sygusCommand` in the SMT2 parser to the `Smt2` class. The original code was pushing and popping the current scope inline. This commit adds a class `SynthFunFactory` that takes care of that upon creation and destruction.
2019-10-02Fix compiler warning. (#3348)Aina Niemetz
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback