-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More aggressive techniques for reconstructing proofs of strings inferences #10680
Conversation
@@ -74,7 +76,7 @@ bool TheoryProofStepBuffer::applyPredTransform(Node src, | |||
bool useExpected) | |||
{ | |||
// symmetric equalities | |||
if (d_autoSym && CDProof::isSame(src, tgt)) | |||
if (src == tgt || (d_autoSym && CDProof::isSame(src, tgt))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if d_autoSym is false wouldn't you want to add the symmetry step explicitly?
if (success) | ||
{ | ||
// If we were successful, now go back and justify the conversion to | ||
// original forms, which should be trivial. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please clarify
// see if src rewrites to (and ... tgt ...). In this case, we can | ||
// infer tgt via AND_ELIM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you give an insight why this may happen? Looks odd that it would.
if (!eqs[i][1].isConst() | ||
&& eqs[i][1].getKind() != Kind::STRING_CONCAT) | ||
{ | ||
subs.push_back(eqs[i][1].eqNode(eqs[i][0])); | ||
} | ||
else | ||
{ | ||
subs.push_back(eqs[i]); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!eqs[i][1].isConst() | |
&& eqs[i][1].getKind() != Kind::STRING_CONCAT) | |
{ | |
subs.push_back(eqs[i][1].eqNode(eqs[i][0])); | |
} | |
else | |
{ | |
subs.push_back(eqs[i]); | |
} | |
subs.push_back(!eqs[i][1].isConst() | |
&& eqs[i][1].getKind() != Kind::STRING_CONCAT | |
? eqs[i][1].eqNode(eqs[i][0]) | |
: eqs[i]); |
Also, can you add an insight of what is going on here?
} | ||
Trace("strings-ipc-prefix") << "- Via trans: " << curr << std::endl; | ||
} | ||
if (curr.isNull()) | ||
{ | ||
break; | ||
} | ||
std::reverse(subs.begin(), subs.end()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
A simpler alternative for #10680 that suffices for a problem set of interest.
Introduces a new utility method for inferring whether a predicate follows from another by substitution+rewriting+AND_ELIM.
Also adds missing cases of string inferences that were not covered by proof reconstruction.
This reduces the number of unjustified THEORY_INFERENCE in our regressions from 1820 -> 1810.