Closed mezpusz closed 2 months ago
Debug tests were run, so far no assrtion violations. Correctness checks have been performed with the current SAT subsumption, showing that there is (i) no unsoundness, but (ii) code tree subsumption cannot detect set-based subsumption resolution, only multiset-based.
Surely it can - we did it ages ago. The only difference is the interpretation of the instruction in charge of setting the literal in the query clause. For multisets, you iterate through previously untried literals. For sets, you iterate through all literals.
A
This looks awesome. Thank you, @mezpusz .
Even before checking the code change in full, I suggest we make -cts on
the default.
Surely it can - we did it ages ago. The only difference is the interpretation of the instruction in charge of setting the literal in the query clause. For multisets, you iterate through previously untried literals. For sets, you iterate through all literals. A
Thanks, it's good to know that it should work. Then perhaps a subsequent PR could fix this, I'm not sure at this point where this should happen in the current code.
This looks awesome. Thank you, @mezpusz .
Even before checking the code change in full, I suggest we make
-cts on
the default.
I agree, and big thanks to whoever implemented this in the first place. 🙂 Additionally, since the SAT subsumption cross-check on top is relatively cheap after we have found an instance, maybe we could add that as a permanent debug check to make sure no bugs creep in.
Just to make it clear: set subsumption is super incomplete. Set subsumption can be used for subsumption resolution because it always resolves away a literal, so it creates a strictly smaller clause.
A
On Wed, 18 Sept 2024 at 13:51, Márton Hajdu @.***> wrote:
@.**** commented on this pull request.
In Shell/ConditionalRedundancyHandler.cpp https://github.com/vprover/vampire/pull/605#discussion_r1764914317:
for (const auto& t : ts) {
if (t.isVar()) {
- unsigned var=t.var();
- unsigned* varNumPtr;
- if (cctx.varMap.getValuePtr(var,varNumPtr)) {
- *varNumPtr=cctx.nextVarNum++;
- code.push(CodeOp::getTermOp(ASSIGN_VAR, *varNumPtr));
- } else {
- code.push(CodeOp::getTermOp(CHECK_VAR, *varNumPtr));
- }
- }
- else {
- ASS(t.isTerm());
- compileTerm(t.term(), code, cctx, false);
- compiler.handleVar(t.var());
- continue;
— Reply to this email directly, view it on GitHub https://github.com/vprover/vampire/pull/605#discussion_r1764914317, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVY4BKNVQ6NCOSEUYEY3LTZXFSLDAVCNFSM6AAAAABONCYNASVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMJSGQ2TKMBZGE . You are receiving this because you commented.Message ID: @.***>
In #265 I removed a dead file called CTFwSubsAndRes
which looks a bit like your CodeTreeForwardSubsumptionAndResolution
. I think your new shiny code is probably better but might be worth a look to see if you forgot anything.
In #265 I removed a dead file called
CTFwSubsAndRes
which looks a bit like yourCodeTreeForwardSubsumptionAndResolution
. I think your new shiny code is probably better but might be worth a look to see if you forgot anything.
Thanks, that's a good suggestion! I have checked the code, fortunately it looks very similar, apart from (i) setting the age of the result for some reason and (ii) doing something with Clause::_auxData
. I believe none of these are necessary anymore, but let me know what you think.
Agreed. Whatever auxData
is I'm happy it's dead, but maybe the age needs to be set: @quickbeam123 is the resident expert, I think.
Revival of code tree subsumption. The following fixes were necessary:
LIT_END
was not set properly in the code tree forILStruct
objects.FlatTerm
andCodeStack
to avoid unsoundness in the two-variable equality case. Some refactors were necessary to do this cleanly.Debug tests were run, so far no assrtion violations. Correctness checks have been performed with the current SAT subsumption, showing that there is (i) no unsoundness, but (ii) code tree subsumption cannot detect set-based subsumption resolution, only multiset-based.
The final experimental data:
In parentheses the number of uniques are shown of master to codetree, regression to codetree and codetree to master, respectively.