summaryrefslogtreecommitdiff
path: root/src/theory/strings/infer_info.cpp
AgeCommit message (Collapse)Author
2021-08-16[Strings] Make fact detection more robust (#7007)Andres Noetzli
Currently, our check for whether an inference is a fact or a lemma involves checking whether the kind of the conclusion is a conjunction or a disjunction. However, this does not take into account inferences of other kinds such as ites, which is a problem because they require a decision from the SAT solver. This commit changes the condition to check the theory of the conclusion. If the conclusion belongs to the theory of strings, it considers it as a fact.
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-03-08Do not process conjunctions as facts in strings (#6065)Andrew Reynolds
This changes things so we process inferences with AND conclusions as lemmas always. This fixes #6056, that benchmark times out.
2021-02-19Refactoring theory inference process (#5920)Andrew Reynolds
This PR refactors TheoryInference so that it is not responsible for calling back into InferenceManager, instead it sets data so that InferenceManagerBuffered has enough information to do this itself. It also makes the decision of whether to cache lemmas in theory inference manager a global choice per-theory instead of per-lemma.
2021-02-11Add InferenceId member to TheoryInference, adapt all derived classes. (#5894)Gereon Kremer
This PR adds a new InferenceId member to the TheoryInference class. All classes derived from TheoryInference are adapted accordingly.
2021-02-11Merge InferenceIds into one enum (#5892)Gereon Kremer
This PR is the first step in consolidating the various variants of Inferences, InferenceIds and InferenceManagers of the theories. It merges all InferencedIds into one global enum and makes all theories use them.
2021-02-08Fix disequality between seq.unit terms (#5880)Andrew Reynolds
This adds a missing inference for disequality between seq.unit terms, which was not handled previously. Fixes #5666.
2021-01-08Rename getAntecedent to getPremises (#5754)mudathirmahgoub
Changes: renamed d_new_skolem to d_newSkolem renamed d_ant to d_premises (antecedent is usually used with consequent, and premise is used with conclusion)
2020-12-16Renamed InferInfo::getAntecedant to InferInfo::getAntecedent (#5683)mudathirmahgoub
Renamed InferInfo::getAntecedant to InferInfo::getAntecedent
2020-10-29(proof-new) Update the strings inference manager for proofs (#5220)Andrew Reynolds
This updates the inference manager in strings in two ways: (1) It now inherits from InferenceManagerBuffered, meaning that the custom methods for process the current pending lemma/fact vectors are removed in favor of the standard ones. (2) It has support for proof generation via the InferProofCons utility. This PR standardizes three methods processFact, processLemma, and processConflict which take InferInfo and processes any string-specific behavior pertaining to processing facts, lemmas and conflicts with the inference manager. These methods are intended to preserve the previous behavior of this class.
2020-09-22Update copyright header script to support CMake and Python files (#5067)Mathias Preiner
This PR updates the update-copyright.pl script to also update/add copyright headers to CMake specific files. It further fixes a small typo in the header.
2020-08-17(proof-new) Prepare the theory of strings for proof reconstruction (#4885)Andrew Reynolds
This updates the internal data structure for strings inferences "InferInfo" such that it is amenable to proof reconstruction. Currently, the explanation for a conclusion is in two parts: (1) d_ant, the antecedents that can be explained by the current equality engine, (2) d_antn, the antecedents that cannot. For proof reconstruction, the order of some antecedents matters. This is difficult with the above data structure since elements in these two vectors are not given an ordering relative to each other. After this PR, we store: (1) d_ant, all antecedants, which are ordered in a way that is amenable to proofs (to be introduced on following PRs), (2) d_noExplain, the subset of d_ant that cannot be explained by the current equality engine. This PR modifies calls to InferenceManager in preparation for extending it with a proof reconstructor InferProofCons which will convert strings::InferInfo into instructions for building ProofNode.
2020-07-17(proof-new) Updates to strings core solver (#4642)Andrew Reynolds
This updates the core strings solver in preparation for proofs. The main changes include: The addition of the strings PfRule enum values. The definition of a "getConclusion" static method, used by the core solver, and to be used in the future by the strings proof checker. This includes several optional forms of lemmas, which are added as options in this PR. Major simplifications to our inference schemas for disequality handling (a STRING_DECOMPOSE inference rule). Note this is the only significant intended behavioral change in this PR. Minor updates to the form of inferences send to inference manager, for instance to orient equalities in the expected way, and to reorder assumptions. These changes are done for uniformity and make the strings proof reconstruction from inference steps easier.
2020-07-01 Inferences and model construction taking into account seq.unit (#4607)Andrew Reynolds
Towards theory of sequences. This makes the strings solver handle seq.unit, which requires two new inferences and updates to its model construction. It also fixes a bug in the best content heuristic, which previously failed to update the best score.
2020-06-16Update copyright headers.Aina Niemetz
2020-05-20Normal form equality conflicts and uniqueness check (#4497)Andrew Reynolds
This adds a new inference schema to strings that was discovered by the internal proof checker. It says that we are in conflict when an equality between the normal forms of two terms in the same equivalence class rewrites to false. It also improves the efficiency of processing normal forms by only considering normal forms that are unique up to rewriting.
2020-04-20Refactor inference manager in strings to be amenable to proofs (#4363)Andrew Reynolds
This is a key refactoring towards proofs for strings. This ensures that InferInfo is maintained until just before facts, lemmas and conflicts are processed. This allows us both to: (1) track more accurate stats and debug information, (2) have enough information to ensure that proofs can be constructed at the moment facts, lemmas, and conflicts are processed. Changes in this PR: PendingInfer and InferInfo were merged, CoreInferInfo is now the previous equivalent of InferInfo, extended with core-solver-specific information, which is only used by CoreSolver. sendInference( const InferInfo& info, ... ) is now the central method for sending inferences which is called by the other variants, not the other way around. sendLemma is inlined into sendInference(...) for clarity. doPendingLemmas and doPendingFacts are extended to process the side effects of the inference infos. There is actually a further issue with pending inferences related to eagerly processing the side effect of CoreInferInfo before we know the lemma is sent. I believe this issue does not occur in practice based on our strategy. Further refactoring could tighten this, e.g. virtual void InferInfo::processSideEffect. I will do this in another PR. Further refactoring can address whether asLemma should be a field of InferInfo (it probably should), and whether we should explicitly check for AND in conclusions instead of making it the responsibility of the user of this class.
2020-04-06Enum for all remaining string inferences (#4220)Andrew Reynolds
Merges the Flat Form inferences enum into Inferences. Adds documentation for (most of) these inferences. Removes the old infrastructure for inferences based on a debug string in InferenceManager.
2020-04-06Refactor disequality processing in string solver (#4209)Andres Noetzli
This commit refactors disequality processing in the core string solver. It also adds statistics for the inferences and splits in those methods. No semantic changes intended.
2020-04-02Introduce enums for all string inferences, excluding the core solver (#4195)Andrew Reynolds
Introduce enum values for all calls to sendInference outside of the core solver. This included some minor refactoring.
2020-03-28Enumeration for String rewrites (#4173)Andrew Reynolds
In preparation for string proof infrastructure. This introduces an enumeration type to track string rewrites. It also makes inference printing more consistent.
2020-03-25Support async-signal-safe printing of inferences (#4148)Andres Noetzli
Commit c9b7c3d introduced code for counting the number of string inferences done per type of inference. However, it did not add support for printing the inference names in an async-signal-safe manner via safe_print() (note that printing in signal handlers is done differently from the regular stats printing). This commit adds the corresponding code, s.t. we get the inference names when printing the stats when CVC4 is interrupted or crashes.
2020-03-22Collect statistics about normal form inferences (#4127)Andres Noetzli
This commit adds code to count the number of inferences made of each inference type for normal form inferences. It extends the Inference enum in `infer_info.h` and adds two new `sendInference()` methods in the `InferenceManager` to send and count inferences that have a corresonding entry in the `Inference` enum.
2020-02-11Remove `--strings-binary-csp` option (#3743)Andres Noetzli
2019-08-23 Infer emptiness instead of splitting when a string equality rewrites to a ↵Andrew Reynolds
constant (#3218)
2019-07-25Split infer info data structure in strings (#3107)Andrew Reynolds
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback