summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-07-24Rewrites for re.interreInterRewAndres Noetzli
2019-07-19SyGuS grammar refactor (#3100)yoni206
2019-07-19Fixes for sygus with datatypes (#3103)Andrew Reynolds
2019-07-19Fix case of unfolding negative membership in reg exp concatenation (#3101)Andrew Reynolds
2019-07-18Removing forward-declaration of undefined function ↵Andrew V. Jones
'registerForceLogicListener' (#3086)
2019-07-18Basic rewrites for tolower/toupper (#3095)Andrew Reynolds
2019-07-17Minor clean in strings. (#3093)Andrew Reynolds
2019-07-16Add support for str.tolower and str.toupper (#3092)Andrew Reynolds
2019-07-15 Add string rewrite to distribute character stars over concatenation (#3091)Andrew Reynolds
2019-07-08Towards refactoring relations (#3078)Andrew Reynolds
2019-07-05Refactor strings to use an inference manager object (#3076)Andrew Reynolds
2019-07-02Use unique_ptr for UF modules (#3080)Andrew Reynolds
2019-07-02Optimize DRAT optimization: clause matching (#3074)Alex Ozdemir
* improved proof production statistics This commit creates new statistics which will help us understand what is so expensive about proof production. There are already statistics for: * Net time spent building/printing the LFSC proof. * Size of the LFSC proof. This commit adds statistics for: * The time cost of DRAT optimization: * net time * tool time (drat-trim) * clause matching time (matching core clauses with input clauses) * Non-trivial because drat-trim can (and does) dedup and reorder literals * The advantage of DRAT optimization (proof/formula size before/after) * The time cost of DRAT translation [to LRAT or ER] (net time, tool time) * The time cost of skeleton traversal * The time cost of printing declatations * The time cost of printing CNF proofs * The time cost of printing theory lemmas * The time cost of printing final UNSAT proof. There is a method, toStream, which is responsible for much of proof production. The whole method was timed, but subsections were not. The timings above consider subsections of it. I also wanted to better understand the cost of DRAT optimization and translation. * [BV Proof] Optimize DRAT optimization tldr: I made a bad data-structure/algorithm choice when implementing part of DRAT/CNF-optimization, which consumed **a lot** of time on some bechmarks. This commit fixes that choice. Long Version: Set-Keyed Maps Considered Harmful ================================= Algorithmic Problem ------------------- The DRAT optimization process spits out a unsatifiable core of the CNF. The clauses in the core are all from the original formula, but their literals may have been reordered and deduplicated. We must match the old clauses with new ones, so we know which old clauses are in the core. Old (BAD) Solution ------------------ Before I didn't really think about this process very much. I built a solution in which clauses were canonically represented by hash sets of literals, and made a hash map from canonical clauses to clause indices into the original CNF. Problem With Old Solution ------------------------- In hindsight this was a bad idea. First, it required a new hash set to be heap-allocated for every clause in the CNF. Second, the map lookups required set-hashes (reasonable -- linear time, once) and hash-set equality (not reasonable -- quadratic time, multiple times) on every lookup. New Solution ------------ The ideal solution is probably to have the map from clauses to clause ids be something like a trie. STL doesn't have a trie, but representing clauses as sorted, deduped vectors of literal in a tree based on lexicographical comparison is pretty closed to this. On randomly chosen examples it seems to be a huge improvement over the old map-keyed-by-sets solution, and I'm in the process of running a full set of bechmarks. Also, we store pointers to the clauses already stored elsewhere in the proof, instead of allocating new memory for them. Future Work ----------- It may also be reasonable to do a hash map of sorted, deduped, vector clauses. I haven't tried this, yet (there's a TODO in the code). * Update src/proof/clausal_bitvector_proof.h Thanks andres! Co-Authored-By: Andres Noetzli <andres.noetzli@gmail.com> * Respond to Andres' Review: better use of CodeTimer * Removed commented code (Andres)
2019-07-01Refactoring of relevance vector in quantifiers (#3070)Andrew Reynolds
2019-07-01Support sygus version 2 format (#3066)Andrew Reynolds
2019-07-01 Split higher-order UF solver (#2890)Andrew Reynolds
2019-07-01Add higher-order elimination preprocessing pass (#2865)Andrew Reynolds
2019-06-28Make mkOpTerm const (#3072)makaimann
2019-06-27Variable elimination rewrite for quantified strings (#3071)Andrew Reynolds
2019-06-24Stratify unfolding of regular expressions based on polarity (#3067)Andrew Reynolds
2019-06-24Fix memory leak in unit test (#3068)Andres Noetzli
PR #3062 changed `Smt2::setLogic()` to return a heap-allocated command, which didn't get cleaned up by our `parser_black` unit test. This commit fixes the memory leak.
2019-06-21Add floating-point support in the Java API (#3063)Andres Noetzli
This commit adds support for the theory of floating-point numbers in the Java API. Previously, floating-point related classes were missing in the JAR. The commit also provides an example that showcases how to work with the theory of floating-point numbers through the API.
2019-06-21Fix and simplify handling of --force-logic (#3062)Andres Noetzli
The `--force-logic` command line argument can be used to override a logic specified in an input file or to set a logic when none is given. Before this commit, both the `SmtEngine` and the parser were aware of that argument. However, there were two issues if an input file didn't specify a logic but `--force-logic` was used: - Upon parsing `--force-logic`, the `SmtEngine` was informed about it and set the logic to the forced logic. Then, the parser detected that there was no `set-logic` command, so it set the logic to `ALL` and emitted a corresponding warning. Finally, `SmtEngine::setDefaults()` detected that `forceLogic` was set by the user and changed the logic back to the forced logic. The warning was confusing and setting the logic multiple times was not elegant. - For eager bit-blasting, the logic was checked before resetting the logic to the forced logic, so it would emit an error that eager bit-blasting couldn't be used with the logic (which was `ALL` at that point of the execution). This was a problem in the competition because our runscript parses the `set-logic` command to decide on the appropriate arguments to use and passes the logic to CVC4 via `--force-logic`. This commit moves the handling of `--force-logic` entirely into the parser. The rationale for that is that this is not an API-level issue (if you use the API you simply set the logic you want, forcing a different logic in addition doesn't make sense) and simplifies the handling of the option (no listeners need to be installed and the logic is set only once). This commit also removes the option to set the logic via `(set-option :cvc4-logic ...)` because it complicates matters (e.g. which method of setting the logic takes precedence?). For the CVC and the TPTP languages the commit creates a command to set the logic in `SmtEngine` when the logic is forced in the parser instead of relying on `SmtEngine` to figure it out itself.
2019-06-21Use TMPDIR environment variable for temp files (#2849)Andres Noetzli
Previously, we were just writing temporary files to `/tmp/` but this commit allows the user to use the `TMPDIR` environment variable to determine which directory the temporary file should be written to. The commit adds a helper function for this and also includes some minor cleanup of existing code.
2019-06-18 Strings: More aggressive skolem normalization (#2761)Andres Noetzli
This PR makes the skolem normalization in the string solver quite a bit more aggressive by reducing more skolems to prefix and suffix skolems. Experiments show that this PR significantly improves performance on CMU benchmarks.
2019-06-15Use Ubuntu 16.04 on Travis (#3059)Andres Noetzli
Travis has started to switch to Ubuntu 16.04 [0]. We were explicitly specifying 14.04 as the `dist` in our `.travis.yml`. This commit changes that specification to 16.04, updates the Java version, and removes a workaround for an old Travis issue. [0] https://changelog.travis-ci.com/xenial-as-the-default-build-environment-99476
2019-06-13Add lemma for the range of values of str.indexof (#3054)Andres Noetzli
This commit adds a lemma that the value of `str.indexof(x, y, n)` must be between -1 and `str.len(x)`.
2019-06-13 Shorten explanation for strings inference I_Norm_S (#3051)Andrew Reynolds
2019-06-12Fix warning (#3053)Haniel Barbosa
2019-06-12Refactor parser to define fewer tokens for symbols (#2936)Andres Noetzli
2019-06-11Disable dumping regression for non-dumping builds (#3046)Andres Noetzli
`let_shadowing.smt2` uses dumping to test our printing infrastructure. Since some builds do not support dumping, this commit disables that regression for non-dumping builds. Additionally, it enables an error message when trying to dump with a muzzled build and corrects the output of `--show-config` to indicate that muzzled builds cannot dump. Previously, the dumping output of a muzzled build was just silently empty. Most of the changes in `dump.cpp` are due to reformatting.
2019-06-11Fix compilation issue for Java bindings + CLN (#3045)Andres Noetzli
Fixes #3044. When using CLN instead of GMP, SWIG produces different Java files for the CLN classes. The bindings expected the GMP files even when building with CLN, so compilation failed. This commit fixes the issue by changing the list of files depending on whether we build with CLN or GMP.
2019-06-11NA Tangent reverse implication (#3050)Ahmed Irfan
2019-06-11 Minor cleaning of conflict-based instantiation (#2966)Andrew Reynolds
2019-06-11Do not require sygus constructors to be flattened (#3049)Andrew Reynolds
2019-06-11 Fix spurious assertion in get-value (#3052)Andrew Reynolds
2019-06-10Optimization for negative concatenation membership. (#3048)Andrew Reynolds
2019-06-10Optimization for strings normalize disequalities (#3047)Andrew Reynolds
2019-06-05Prevent letification from shadowing variables (#3042)Andres Noetzli
Fixes #3005. When printing nodes, we introduce `let` expressions on the fly. However, when doing that, we have to be careful that we don't shadow existing variables with the same name. When quantifiers are involved, we do not descend into the quantifiers to avoid letifying terms with bound variables that then go out of scope (see #1863). Thus, to avoid shadowing variables appearing in quantifiers, we have to collect all the variables appearing in that term to make sure that the let does not shadow them. In #3005, the issue was caused by a `let` that was introduced outside of a quantifier and then was shadowed in the body of the quantifier by another `let` introduced for that body.
2019-06-05DRAT-Optimization (#2971)Alex Ozdemir
This commit enables DRAT-optimization, which consists of two sub-processes: 1. removing unnecessary instructions from DRAT-proofs and 2. not proving clauses which are not needed by DRAT proofs. These changes have the effect of dramatically shortening some some bit-vector proofs. Specifically, proofs using lemmas in the ER, DRAT, and LRAT formats, since proofs in any of these formats are derived from a (now optimized!) DRAT proof produced by CryptoMiniSat. What follows is a description of the main parts of this PR: ## DRAT Optimization The DRAT-optimization is done by `drat-trim`, which is bundled with `drat2er`. The (new) function `ClausalBitVectorProof::optimizeDratProof` is our interface to the optimization machinery, and most of the new logic in this PR is in that function. ## CNF Representation The ability to not prove unused clauses requires a slight architectural change as well. In particular, we need to be able to describe **which** subset of the original clause set actually needs to be proved. To facilitate this, when the clause set for CryptoMiniSat is first formed it is represented as a (a) map from clause indices to clauses and (b) a list of indices. Then, when the CNF is optimized, we temporarily store a new list of the clauses in the optimized formula. This change in representation requires a number of small tweaks throughout the code. ## Small Fixes to Signatures When we decided to check and accept two different kinds of DRAT, some of our DRAT-checking broke. In particular, when supporting one kind of DRAT, it is okay to `fail` (crash) when a proof fails to check. If you're supporting two kinds of DRAT, crashing in response to the first checker rejecting the proof denies the second checker an opportunity to check the proof. This PR tweaks the signatures slightly (and soundly!) to do something else instead of `fail`ing.
2019-06-05Add support for SWIG 4 (#3041)Andres Noetzli
SWIG 4 seems to change the name for `std::map<CVC4::Expr, CVC4::Expr>` to include the implicit template argument for comparisons. To make the code compatible with both SWIG 4.0.0 and older versions, this commit creates an explicit instance of the template.
2019-06-04Enable proof checking for QF_LRA benchmarks (#2928)Andres Noetzli
Due to issues in the current proof code, this commit also disables proof checking for five QF_LRA benchmarks (see issue #2855).
2019-06-04Add check that result matches benchmark status (#3028)Andres Noetzli
This commit adds a check to make sure that the result of a `(check-sat)` call matches the expected result set via `(set-info :status ...)`. In doing so, it also fixes an issue where CVC4 would crash if asked for the unsat core after setting the status to `unsat` but before calling `(check-sat)` (see regression for concrete example). This happened because CVC4 was storing the expected result and the computed result both in the same variable (the expected result wasn't really being used though). This commit keeps track of the expected result and the computed result in separate variables to fix that issue.
2019-06-03[SMT-COMP] No unconstrained simp for QF_LIA UC (#3039)Andres Noetzli
`--unconstrained-simp` is not compatible with unsat cores.
2019-06-02[SMT-COMP] Increase sequential portfolio times (#3038)Andres Noetzli
This year's timeout is 40min up from 20min last year. This commit scales the timeouts accordingly.
2019-06-02[SMT-COMP 2019] Use lazy BV as backup for QF_UFBV (#3037)Andres Noetzli
We cannot Ackermannize all the QF_UFBV benchmarks due to uninterpreted sorts. This commit adds lazy bit-blasting as a backup strategy.
2019-06-02Enable SymFPU assertions in production (#3036)Andres Noetzli
This commit enables SymFPU assertions in production. The reason for this is that there are some known problems with certain bit-widths, so we prefer to be conservative. The commit also updates the run scripts for SMT-COMP 2019 to use `--fp-exp` since we have those additional checks in place now.
2019-06-02[SMT-COMP 2019] Update run script for unsat cores (#3034)Andres Noetzli
`--unconstrained-simp` is not compatible with unsat cores, so this commit removes it for QF_LRA. `--bitblast=eager` is not compatible with unsat cores for QF_UFBV because the dependencies are not tracked correctly in the Ackermannization preprocessing pass, so the commit changes the script to use the lazy BV solver instead. Strings need some additional options to use the correct theory symbols.
2019-06-02Add check for limit of number of node children (#3035)Andres Noetzli
This commit adds a check that makes sure that we do not try to create nodes with more children than the maxmimum number. This can currently happen when flattening nodes in QF_BV with lots of duplicate children.
2019-06-01Update QF_BV options for SMT-COMP 2019. (#3033)Aina Niemetz
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback