summaryrefslogtreecommitdiff
path: root/src/theory/strings
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-03-10 13:07:39 -0600
committerGitHub <noreply@github.com>2021-03-10 13:07:39 -0600
commit99acb6adc4858e9228a75283c0d4a640ce7cc812 (patch)
tree4427782f5823505831ba11bd1915a17f10caeed1 /src/theory/strings
parent132504c9f255fdb2c31b9a43bb3b9513db41afc1 (diff)
(proof-new) Update ppRewrite to use skolem lemmas (#6102)
This is required for proofs. The internal calculus no longer uses witness forms for reasoning, and hence we cannot return witness terms in ppRewrite. This is required to fix a debug failure, as well as making life easier on external proof conversions. As a result of this PR, for example, given (P a) as input to ppRewrite, previous we returned: (P (witness ((x T)) (A x))) now we return: (P k), with skolem lemma ( (A k), k ) Followup PRs will remove the use of WITNESS in ppRewrite (e.g. in sets and strings); this PR modifies arithmetic to not return WITNESS in response to ppRewrite.
Diffstat (limited to 'src/theory/strings')
-rw-r--r--src/theory/strings/theory_strings.cpp3
-rw-r--r--src/theory/strings/theory_strings.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/theory/strings/theory_strings.cpp b/src/theory/strings/theory_strings.cpp
index 73f78bddd..7f838e411 100644
--- a/src/theory/strings/theory_strings.cpp
+++ b/src/theory/strings/theory_strings.cpp
@@ -986,7 +986,7 @@ void TheoryStrings::checkRegisterTermsNormalForms()
}
}
-TrustNode TheoryStrings::ppRewrite(TNode atom)
+TrustNode TheoryStrings::ppRewrite(TNode atom, std::vector<SkolemLemma>& lems)
{
Trace("strings-ppr") << "TheoryStrings::ppRewrite " << atom << std::endl;
if (atom.getKind() == STRING_FROM_CODE)
@@ -1001,6 +1001,7 @@ TrustNode TheoryStrings::ppRewrite(TNode atom)
Node k = nm->mkBoundVar(nm->stringType());
Node bvl = nm->mkNode(BOUND_VAR_LIST, k);
Node emp = Word::mkEmptyWord(atom.getType());
+ // TODO: use skolem manager
Node ret = nm->mkNode(
WITNESS,
bvl,
diff --git a/src/theory/strings/theory_strings.h b/src/theory/strings/theory_strings.h
index 5293a95b8..12f644fb4 100644
--- a/src/theory/strings/theory_strings.h
+++ b/src/theory/strings/theory_strings.h
@@ -114,7 +114,7 @@ class TheoryStrings : public Theory {
/** called when a new equivalence class is created */
void eqNotifyNewClass(TNode t);
/** preprocess rewrite */
- TrustNode ppRewrite(TNode atom) override;
+ TrustNode ppRewrite(TNode atom, std::vector<SkolemLemma>& lems) override;
/** Collect model values in m based on the relevant terms given by termSet */
bool collectModelValues(TheoryModel* m,
const std::set<Node>& termSet) override;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback