summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-11-22Fix quantifiers scope issue in strings preprocessor (#5491)Andrew Reynolds
Leads to free variables in assertions when using `str.<=` whose reduction uses EXISTS not FORALL. Fixes #5483.
2020-11-20Add posRewriteEqual to bags rewriter (#5498)mudathirmahgoub
This PR fixes #5460 by adding posRewriteEqual to bags rewriter
2020-11-20Rename symfpu_literal.(h.in|cpp) -> floatingpoint_literal_symfpu.(h.in|cpp). ↵Aina Niemetz
(#5502)
2020-11-20Rename floatingpoint.h.in -> floatingpoin.h. (#5500)Aina Niemetz
2020-11-20Fix remove term formula policy for terms beneath quantifiers (#5497)Andrew Reynolds
Now that extended arithmetic symbols are not eliminated during expandDefinitions, this allowed for a chain of events that would not apply theory preprocessing on certain terms. In particular, a term t would not have theory preprocessing applied to it if it was a strict subterm of ITE-term s that occurred in a term position in a quantified formula body, and s did not have free variables. In this case, term formula removal would add a lemma corresponding to the ITE skolem definition, whose subterms did not have theory preprocessing applied. This meant that a (div a d) term was not being preprocessed in #5482, leading to solution unsoundness. This changes the policy in term formula removal to be in sync with theory preprocessing: term formula removal and theory preprocessing only apply to terms that are not beneath quantifiers. In particular, this means that ground terms in quantifier bodies are left untouched until they are introduced e.g. by instantiation. This fixes the solution soundness issue (fixes #5482).
2020-11-20RoundingMode: Rename enum values to conform to code style guidelines. (#5494)Aina Niemetz
2020-11-20FloatingPoint: Separate out symFPU glue code. (#5492)Aina Niemetz
This works towards having the symFPU headers only included where it's absolutely needed (only in the .cpp files, not in any other headers). Note: src/util/floatingpoint.h.in will be converted to a regular .h file in the next step to simplify reviewing.
2020-11-20Fix #5493. (#5495)Aina Niemetz
2020-11-20Support nested quantifier elimination for get-qe command (#5490)Andrew Reynolds
Uses new nested-qe utility for eliminating nested quantification before doing quantifier elimination. Fixes CVC4/cvc4-wishues#26 Fixes #5484.
2020-11-20Updates to API in preparation for using symbol manager for model (#5481)Andrew Reynolds
printModel no longer makes sense if the list of declared symbols is managed outside the solver. Also, mkConst needs a variant to distinguish a provided name of "" vs. a name that is not provided.
2020-11-20Fix compiler warnings. (#5493)Aina Niemetz
2020-11-20Fix use of declaration sequence command in cvc parser (#5479)Andrew Reynolds
This is required to make the cvc parser work properly with the new version of getting models based on the symbol manager.
2020-11-20(proof-new) Replace LazyCDProofSet by generic CDProofSet (#5487)Gereon Kremer
This PR replaces the LazyCDProofSet, that was hardcoded to use LazyCDProof objects, by a templated CDProofSet.
2020-11-20Allow to pass ProofGenerator to arithmetic inference manager. (#5488)Gereon Kremer
This PR prepares the addition of proofs for the arithmetic theory by making addPendingArithLemma() accept a ProofGenerator*.
2020-11-19Enable new implementation of CEGQI based on nested quantifier elimination ↵Andrew Reynolds
(#5477) This replaces the old implementation of CEGQI based on nested quantifier elimination (--cegqi-nested-qe) with the new implementation. The previous implementation used some convoluted internal attributes to manage dependencies between quantified formulas, the new implementation is much simpler: it simply eliminates nested quantification eagerly. Fixes #5365, fixes #5279, fixes #4849, fixes #4433. This PR also required fixes related to how quantifier elimination is computed.
2020-11-19floatingpoint.h: Split in preparation to cleanly separate symFPU glue code. ↵Aina Niemetz
(#5478)
2020-11-19Use new let binding utility in smt2 printer (#5472)Andrew Reynolds
Also fixes some whitespace issues in printing quantified formulas.
2020-11-19Include stddef.h (needed for size_t) in cvc4_public.h (#5476)Aina Niemetz
This further removes obsolete explicit includes of stdint.h.
2020-11-19Add nested quantifier elimination module (#5422)Andrew Reynolds
This has static utilities for doing nested quantifier elimination and some data structures for maintaining a context-dependent set of quantified formulas that have been processed. This is work towards CVC4/cvc4-wishues#26, and work reimplementation of the option --ceqgi-nested-qe.
2020-11-19Fix issues related to eliminating extended arithmetic operators (#5475)Andrew Reynolds
This fixes 2 issues related to eliminating arithmetic operators: (1) counterexample lemmas in CEGQI were not being preprocessed (2) ensureLiteral was not doing term formula removal. This corrects these two issues. Now ensureLiteral does full theory preprocessing on the term we are ensuring literal for, meaning this may trigger lemmas if the term contains extended arithmetic operators like div. Fixes #5469, fixes #5470, fixes #5471. This adds --sygus-inst to 2 of these benchmarks which moreover makes them solvable. This also improves our assertions and trace messages.
2020-11-19Use symbol manager for unsat cores (#5468)Andrew Reynolds
This PR uses the symbol manager for handling names for unsat cores. This replaces interfaces in SmtEngine for managing expression names. It removes the SetExpressionName command.
2020-11-18Add -> operator overload for cd* iterators. (#5464)Mathias Preiner
2020-11-18Add let binding utility (#5444)Andrew Reynolds
This utility will replace the dagification visitor for printing lets for Node in the smt2 printer, and will be used further in e.g. LFSC proof printing.
2020-11-18Minor cleanup of SmtEngine (#5450)Andrew Reynolds
2020-11-18Do not expand definitions of extended arithmetic operators (#5433)Andrew Reynolds
This PR makes it so that extended arithmetic operators are not expanded during expand definitions. Instead they are eliminated at theory preprocessing, which occurs as the last step of preprocessing. The motivation for this is three fold: (1) Some quantified LIA benchmarks lead to CVC4 failing to eliminate div functions from quantifier instantiation, this leads to spurious logic failures. A regression is included, which now is correctly solved. (2) We should allow better rewriting and preprocessing for extended arithmetic functions, especially for div/mod which is important for many users of QF_NIA. (3) More generally,Theory::expandDefinitions will be deleted. All functionalities in expandDefinitions should move to Theory::ppRewrite. This changes impacts many benchmarks that involve non-linear and quantifiers: Many benchmarks (as expected) give a warning during check-models since (/ n 0) cannot be evaluated. I've added -q to disable these warnings. Fully addressing this is part of an agenda to improve our support for --check-models. Several fuzzing benchmarks involving NL+quantifiers now time out. However, several can be solved by --sygus-inst, which is now the preferred instantiation strategy for NL+quantifiers. 2 other non-linear regressions time out, which are disabled in this PR. one sygus-inference benchmark (regress1/sygus/issue3498.smt2), now correctly times out (previously it did not timeout since the preprocessor was unable to apply sygus-inference and resorted to normal methods, now sygus-inference can apply but as expected times out). Fixes #5237.
2020-11-18Use symbol manager for get assignment (#5451)Andrew Reynolds
This replaces the previous methods for get-assignment which involving making a DefinedNamedFunctIonCommand and storing the expression names map in the SmtEngine. Note: we now limit :named terms to those not beneath quantifiers and let-bindings.
2020-11-18Fix asan issues related to solver and symbol manager (#5457)Andrew Reynolds
Should fix the nightlies.
2020-11-17FloatingPoint: Use uint32_t instead of unsigned. (#5459)Aina Niemetz
2020-11-17FloatingPoint: Clean up and document header, format. (#5453)Aina Niemetz
This cleans up the src/util/floatingpoint.h.in header to conform to the code style guidelines of CVC4. This further attempts to fully document the header. The main changes (except for added documentation) are renames of member variables, getting rid of the redundant functions FloatingPointSize::exponent() and FloatingPointSize::significand(), and a more explicit naming of CVC4 wrapper types vs symFPU trait types. Else, it's mainly reordering and formatting.
2020-11-17Fix tangent plane lemmas (#5455)Gereon Kremer
The previous refactoring of tangent plane lemmas introduced incorrect lemmas. This PR fixes this issue and actually generated the lemmas described in the comment. Fixes #5452.
2020-11-16Refactor tangent plane lemmas (#5449)Gereon Kremer
The original lemma only proposed an implication for the tangent plane lemmas, while our implementation adds the inverse implication as well (in a somewhat verbose way). This PR replaces this by simply constructing the equivalence.
2020-11-16Cleaning up scopes in preparation for symbol manager (#5442)Andrew Reynolds
This changes the default of Parser::pushScope and prepares symbol manager further for maintaining expression names.
2020-11-16Improve accuracy of resource limitation (#4763)Gereon Kremer
The main goal of the resource limitation mechanism (via `--rlimit`) is to have a deterministic limitation on runtime. The ultimate goal would be that the actual runtime grows linearly with the spent resources. To achieve this, this PR does the following: - introduce new resources spent in places that are not yet covered - find resource weights that best approximate the runtime It provides a contrib script `learn_resource_weights.py` that uses statistics from a given benchmark run and uses linear regression to find good resource weights. The script also evaluates this estimate and identifies outliers, benchmarks for which this approximation is particularly bad. This probably indicates that on such a benchmark, some part of the code takes a significant amount of time but is not yet represented by a resource. Eventually, we should use the resulting resource weights as defaults for the options like `--rewrite-step`, `--theory-check-step`, etc.
2020-11-14Fix double conflict in extended string solver (#5435)Andrew Reynolds
Fixes #5384. Previously we were not breaking on conflict in all cases.
2020-11-14(proof-new) Proofs for non-clausal simplification (#5409)Andrew Reynolds
Adds proof support in non-clausal simplification, connecting the proofs from circuit propagator.
2020-11-13(proof-new) Enable proofs for datatypes (#5436)Andrew Reynolds
This enables initial proof support in datatypes, which includes connecting the inference-to-proof constructor to the inference manager and making the proper calls to the inference manager using TheoryDatatypes.
2020-11-13Model declarations printing options (#5432)yoni206
This PR relates to #4987 . Our plan is to: delete the model keyword avoid printing extra declarations by default wrap UF values with as expressions. This PR is step 2. It allows the user to choose the model printing style in case of uninterpreted elements: either using datatypes, or using declare-sorts and declare-funs or just using declare-funs. The default option, which is closest to the standard, is just using declare-funs. In step 3, these will be replaced by abstract values using as.
2020-11-13Add more features to symbol manager (#5434)Andrew Reynolds
This is in preparation for having the symbol manager manage expression names at the parser level instead of inside SmtEngine. This adds some necessary features regarding scopes and global declarations. This PR still does not change the behavior of the parser.
2020-11-12Make regular expression difference left associative (#5430)Andrew Reynolds
Fixes #5428.
2020-11-12Simplify sygus solver and sygus stream (#5389)Andrew Reynolds
This simplifies the sygus solver based on the fact that verification lemmas are always processed in a separate subsolver. In particular, this means that the implementation of --sygus-stream can be simplified signficantly.
2020-11-12Fix printing of define named function (#5425)Andrew Reynolds
Fixes the case where the type of the function is not a function type.
2020-11-12Models standard (#5415)yoni206
This PR relates to #4987 . Our plan is to: delete the model keyword avoid printing extra declarations by default wrap UF values with as expressions. This PR does step 1, and fixes regressions accordingly.
2020-11-12(proof-new) Separate explanation stages in proof equality engine (#5356)Andrew Reynolds
This fixes potential cycles in assertLemma commands in the proof equality engine by using separate proof data structures for the topmost 2 stages of proof generation for equality engine proofs. This fix is required to support datatype proofs for lemmas. This PR also removes support for the ProofStepBuffer interface in ProofEqEngine, since it is unused, and suffers similar issues and would require a different unique fix.
2020-11-12Fix redundant refinement lemma in sygus solver (#5399)Andrew Reynolds
This ensures we do manual exclusion of candidate solutions that have counterexamples that are repeated, in particular in the case where the synthesis conjecture has no free variables. This PR removes special casing for ground synthesis conjectures and fixes the exclusion during the refinement stage of sygus. This is a prerequisite for updating arithmetic to not eliminate extended operators at expand definitions, which forces this feature to be exercised in a number of regressions.
2020-11-12(proof-new) Proofs for skolemization (#5339)Andrew Reynolds
This adds support for proofs in the quantifiers module that performs skolemization. Also fixes a bug in the proof checker for skolemization.
2020-11-12(proof-new) Fix true explanations of propagations in pf equality engine (#5338)Andrew Reynolds
This ensures we construct proper proofs for propagations whose conclusions are of the form (=> true lit). Literals may be propagated with "true" as an explanation in datatypes, e.g. discriminators for datatypes with 1 constructor.
2020-11-12(proof-new) Improve printing and debugging for pedantic checking (#5337)Andrew Reynolds
This improves trace/error messages for proof-new-pedantic, and also merges the proof-new-pedantic-eager with the proof-new-eager-checking option.
2020-11-12(proof-new) Add datatypes inference to proof constructor (#5408)Andrew Reynolds
This adds the module that constructs proofs from inference steps. A followup PR will integrate proof support into the datatypes inference manager.
2020-11-12Make symbol manager context dependent (#5424)Andrew Reynolds
This follows a similar style to symbol_table.h/cpp. This is required since context dependent data structures are cvc4_private, and symbol manager is cvc4_public.
2020-11-11Move symbol manager to src/expr/ (#5420)Andrew Reynolds
This is required since symbol manager will use context dependent data structures (in its cpp). This is required since classes in src/parser/ are not allowed to include private headers.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback