summaryrefslogtreecommitdiff
path: root/src/theory/trust_substitutions.cpp
AgeCommit message (Collapse)Author
2021-06-07(proof-new) Fix missing connection in trust substitution proofs (#6685)Andrew Reynolds
This PR fixes a missing connection in trust substitution proofs, which was the cause of open proofs when solved equalities from ppAssert were not justified by proofs. Also distinguishes TRUST_SUBS_EQ from TRUST_SUBS_MAP for clarity.
2021-05-07Simplifications to expand definitions (#6487)Andrew Reynolds
This removes the expandOnly flag from expandDefinitions. The use of expandOnly = true is equivalent to applying top-level substitutions only, which should be done explicitly via Env::getTopLevelSubstitutions. It updates the trust substitutions utility to distinguish apply vs applyTrusted for convenience for this purpose. This also breaks several dependencies in e.g. expand definitions module.
2021-04-30Use substitutions for implementing defined functions (#6437)Andrew Reynolds
This eliminates explicit tracking of defined functions, and instead makes define-fun add to preprocessing substitutions. In other words, the effect of: (define-fun f X t) is to add f -> (lambda X t) to the set of substitutions known by the preprocessor. This is essentially the same as when (= f (lambda X t)) was an equality solved by non-clausal simplification The motivation for this change is both uniformity and for performance, as fewer traversals of the input formula. In this PR: define-fun are now conceptually higher-order equalities provided to smt::Assertions. These assertions are always added as substitutions instead of being pushed to AssertionPipeline. Top-level substitutions are moved from PreprocessingContext to Env, since they must be accessed by Assertions. Proofs for this class are enabled dynamically during SmtEngine::finishInit. The expandDefinitions preprocessing step is replaced by apply-substs. The process assertions module no longer needs access to expand definitions. The proof manager does not require a special case of using the define-function maps. Define-function maps are eliminated from SmtEngine. Further work will reorganize the relationship between the expand definitions module and the rewriter, after which global calls to SmtEngine::expandDefinitions can be cleaned up. There is also further work necessary to better integrate theory expand definitions and top-level substitutions, which will be done on a followup PR.
2021-04-26Ensure dependency is tracked for all substitutions (#6438)Andrew Reynolds
This ensures that dependencies are tracked for all inferred substitutions, even if a trusted step is added. This is required to ensure unsat cores are sound when we use e.g. non-clausal simplification + unsat cores.
2021-04-23Add new substitution apply methods fixpoint, sequential, simultaneous (#6429)Andrew Reynolds
This adds various methods for applying substitution as an options to MACRO_SR_* rules. It extends the proof checker and the proof post processor to eliminate based on these types. It updates the trust substitutions utility used by non-clausal simplification to use fixed-point semantics for substitution, which is highly important for efficiency. As a result of this PR, we are orders of magnitude faster for checking proofs for problems where non-clausal substitution infers many substitutions. It also makes our regressions noticeably faster:
2021-04-22Make trust substitution map generate proofs lazily (#6379)Andrew Reynolds
This is work towards addressing a bottleneck when generating proofs for substitutions from non-clausal simplification. This makes the proof generation in trust substitution map lazy. Further work is required to allow an alternative fixpoint semantics for substitutions in the proof checker instead of the current sequential one.
2021-04-12Refactor and update copyright headers. (#6316)Aina Niemetz
2021-04-01Rename namespace CVC5 to cvc5. (#6258)Aina Niemetz
2021-03-31Rename namespace CVC4 to CVC5. (#6249)Aina Niemetz
2021-03-09Update copyright headers to 2021. (#6081)Aina Niemetz
2021-02-26Move (optional) rewrite from TrustSubstitutionMap to SubstitutionMap. (#5992)Gereon Kremer
This PR adds optional rewriting to the SubstitutionMap class. Before, only the new TrustSubstitutionMap added optional rewriting, leading to unexpected inconsistencies between the two. In particular, cases exist where the substitution and the rewriting cancel each other (see #5943). This PR moves the optional rewriting from TrustSubstitutionMap into SubstitutionMap. While the former enables it by default, it is disabled by default for the latter and thus does not change current behavior. We now use this new option in an assertion in the non-clausal simplification. Fixes #5943.
2020-12-23(proof-new) Miscelleneous fixes from proof-new (#5714)Andrew Reynolds
2020-12-02Update copyright headers.Aina Niemetz
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-10-20(proof-new) Update add lazy step interface in LazyCDProof (#5299)Andrew Reynolds
Ensuring closed proofs should not be enabled by default, it is actually not used very often as a whole. Moreover, the "trust id" argument is the most useful argument and hence should come as the 3rd argument. This updates all uses of addLazyStep for the change in interface, also changes term conversion generator which had a similar issue with default arguments. Notice that some calls to addLazyStep were checking closed but without providing a debug string, these I've left alone (they no longer check closed).
2020-10-18(proof-new) Implementation of trust substitution (#5276)Andrew Reynolds
Trust substitution is a data structure that is used throughout preprocessing for proofs. This adds its implementation.
2020-10-06(proof-new) Add interface for trusted substitution and update ppAssert (#5193)Andrew Reynolds
The current work on proof-new involves proofs for preprocessing. The biggest issue currently is that our preprocessing passes do not track proofs for substitutions. This adds a "trusted substitution" class with is a layer on substitution map. The proof aspect of this class is not yet implemented, this PR just adds its interface. This also updates Theory::ppAssert to take a TrustSubstitutionMap instead of a SubstitutionMap, since eventually we will require proofs to be provided for substitutions that are added to this map.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback