From 15efd7c42603a627cd75bbd099f671fb21f86cff Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Thu, 9 Mar 2023 16:22:26 +0100 Subject: [PATCH 01/56] Merge induction-recursive-functions-refactor onto parametric-datatypes --- CMakeLists.txt | 6 + Forwards.hpp | 1 + Indexing/ResultSubstitution.hpp | 12 + Indexing/SubstitutionTree_FastInst.cpp | 9 +- .../BackwardSubsumptionDemodulation.cpp | 33 - Inferences/FnDefRewriting.cpp | 278 +++++++++ Inferences/FnDefRewriting.hpp | 50 ++ Inferences/Induction.cpp | 540 +++++++++++++---- Inferences/Induction.hpp | 99 ++- Kernel/FormulaUnit.hpp | 8 +- Kernel/Inference.cpp | 14 +- Kernel/Inference.hpp | 9 +- Kernel/InferenceStore.cpp | 5 +- Kernel/Problem.cpp | 7 + Kernel/Problem.hpp | 3 + Kernel/Renaming.hpp | 2 + Lib/Metaiterators.hpp | 33 + Makefile | 2 + Parse/SMTLIB2.cpp | 2 +- Saturation/SaturationAlgorithm.cpp | 11 + Saturation/SaturationAlgorithm.hpp | 5 +- Shell/FunctionDefinitionHandler.cpp | 566 ++++++++++++++++++ Shell/FunctionDefinitionHandler.hpp | 124 ++++ Shell/Options.cpp | 13 +- Shell/Options.hpp | 7 + Shell/Preprocess.cpp | 5 + Shell/Skolem.cpp | 2 +- Shell/TermAlgebra.cpp | 76 +++ Shell/TermAlgebra.hpp | 2 + Test/GenerationTester.hpp | 4 + Test/SyntaxSugar.hpp | 11 + UnitTests/tFnDefRewriting.cpp | 127 ++++ UnitTests/tFunctionDefinitionHandler.cpp | 285 +++++++++ UnitTests/tInduction.cpp | 135 ++++- UnitTests/tInductionGeneralization.cpp | 109 ++++ UnitTests/tTermAlgebra.cpp | 76 +++ 36 files changed, 2485 insertions(+), 186 deletions(-) create mode 100644 Inferences/FnDefRewriting.cpp create mode 100644 Inferences/FnDefRewriting.hpp create mode 100644 Shell/FunctionDefinitionHandler.cpp create mode 100644 Shell/FunctionDefinitionHandler.hpp create mode 100644 UnitTests/tFnDefRewriting.cpp create mode 100644 UnitTests/tFunctionDefinitionHandler.cpp create mode 100644 UnitTests/tInductionGeneralization.cpp create mode 100644 UnitTests/tTermAlgebra.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 89e8d0481..775dd841a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -401,6 +401,7 @@ set(VAMPIRE_INFERENCE_SOURCES Inferences/ExtensionalityResolution.cpp Inferences/Factoring.cpp Inferences/FastCondensation.cpp + Inferences/FnDefRewriting.cpp Inferences/FOOLParamodulation.cpp Inferences/ForwardDemodulation.cpp Inferences/ForwardLiteralRewriting.cpp @@ -558,6 +559,7 @@ set(VAMPIRE_SHELL_SOURCES Shell/FunctionDefinition.cpp Shell/GeneralSplitting.cpp Shell/GoalGuessing.cpp + Shell/FunctionDefinitionHandler.cpp Shell/InequalitySplitting.cpp Shell/InterpolantMinimizer.cpp Shell/Interpolants.cpp @@ -745,6 +747,10 @@ set(UNIT_TESTS UnitTests/tIterator.cpp UnitTests/tOption.cpp UnitTests/tStack.cpp + UnitTests/tInductionGeneralization.cpp + UnitTests/tTermAlgebra.cpp + UnitTests/tFnDefRewriting.cpp + UnitTests/tFunctionDefinitionHandler.cpp ) source_group(unit_tests FILES ${UNIT_TESTS}) diff --git a/Forwards.hpp b/Forwards.hpp index 3e3a246b7..ef8e2f32e 100644 --- a/Forwards.hpp +++ b/Forwards.hpp @@ -194,6 +194,7 @@ namespace Shell class Options; class Property; class Statistics; +class FunctionDefinitionHandler; } #endif /* __Forwards__ */ diff --git a/Indexing/ResultSubstitution.hpp b/Indexing/ResultSubstitution.hpp index e6cb32978..084cecca0 100644 --- a/Indexing/ResultSubstitution.hpp +++ b/Indexing/ResultSubstitution.hpp @@ -126,6 +126,18 @@ class ResultSubstitution virtual TermList applyToBoundQuery(TermList t) { return applyToQuery(t); } + /** + * Apply substitution to query term that fulfills the condition, + * that all its variables are bound to some term of the result. + * + * Applying this substitution makes sense, when + * @b isIdentityOnResultWhenQueryBound() method returns true, + * as then there is no need to apply the substitution to any + * result terms. + */ + virtual Literal* applyToBoundQuery(Literal* lit) + { return applyToQuery(lit); } + /** * Return true if, when the substitution is applied to a query * term through the @b applyToBoundQuery function, the corresponding diff --git a/Indexing/SubstitutionTree_FastInst.cpp b/Indexing/SubstitutionTree_FastInst.cpp index 898650ce4..9a988e487 100644 --- a/Indexing/SubstitutionTree_FastInst.cpp +++ b/Indexing/SubstitutionTree_FastInst.cpp @@ -244,11 +244,18 @@ class SubstitutionTree::InstMatcher::Substitution TermList applyToBoundQuery(TermList t) override { - CALL("SubstitutionTree::InstMatcher::Substitution::applyToBoundQuery"); + CALL("SubstitutionTree::InstMatcher::Substitution::applyToBoundQuery(TermList)"); return SubstHelper::apply(t, *this); } + Literal* applyToBoundQuery(Literal* lit) + { + CALL("SubstitutionTree::InstMatcher::Substitution::applyToBoundQuery(Literal*)"); + + return SubstHelper::apply(lit, *this); + } + TermList apply(unsigned var) { CALL("SubstitutionTree::InstMatcher::Substitution::apply"); diff --git a/Inferences/BackwardSubsumptionDemodulation.cpp b/Inferences/BackwardSubsumptionDemodulation.cpp index 70383e263..82edbd215 100644 --- a/Inferences/BackwardSubsumptionDemodulation.cpp +++ b/Inferences/BackwardSubsumptionDemodulation.cpp @@ -78,39 +78,6 @@ void BackwardSubsumptionDemodulation::detach() } -template -class STLIterator -{ - private: - Iterator begin; - Iterator end; - - public: - using value_type = typename Iterator::value_type; - DECL_ELEMENT_TYPE(value_type); - - STLIterator(Iterator begin, Iterator end) - : begin(begin), end(end) - { } - - bool hasNext() { - return begin != end; - } - - value_type next() { - value_type x = *begin; - ++begin; - return x; - } -}; - -template -STLIterator getSTLIterator(Iterator begin, Iterator end) -{ - return STLIterator(begin, end); -} - - void BackwardSubsumptionDemodulation::perform(Clause* sideCl, BwSimplificationRecordIterator& simplifications) { CALL("BackwardSubsumptionDemodulation::perform"); diff --git a/Inferences/FnDefRewriting.cpp b/Inferences/FnDefRewriting.cpp new file mode 100644 index 000000000..bdac4f573 --- /dev/null +++ b/Inferences/FnDefRewriting.cpp @@ -0,0 +1,278 @@ +/* + * This file is part of the source code of the software program + * Vampire. It is protected by applicable + * copyright laws. + * + * This source code is distributed under the licence found here + * https://vprover.github.io/license.html + * and in the source directory + */ +/** + * @file FnDefRewriting.cpp + * Implements class FnDefRewriting. + */ + +#include "Lib/Metaiterators.hpp" +#include "Lib/PairUtils.hpp" + +#include "Kernel/Clause.hpp" +#include "Kernel/EqHelper.hpp" +#include "Kernel/Inference.hpp" +#include "Kernel/Ordering.hpp" +#include "Kernel/SortHelper.hpp" +#include "Kernel/Term.hpp" +#include "Kernel/TermIterators.hpp" + +#include "Indexing/IndexManager.hpp" + +#include "Saturation/SaturationAlgorithm.hpp" + +#include "Shell/Options.hpp" +#include "Shell/FunctionDefinitionHandler.hpp" + +#include "FnDefRewriting.hpp" + +#if VDEBUG +#include +using namespace std; +#endif + +using namespace Inferences; +using namespace Lib; +using namespace Kernel; +using namespace Saturation; + +struct FnDefRewriting::GeneralizationsFn { + GeneralizationsFn(FunctionDefinitionHandler *index) : _index(index) {} + VirtualIterator, TermQueryResult>> operator()(pair arg) + { + CALL("FnDefRewriting::GeneralizationsFn()"); + return pvi(pushPairIntoRightIterator(arg, _index->getGeneralizations(arg.second))); + } + +private: + FunctionDefinitionHandler *_index; +}; + +struct FnDefRewriting::RewriteableSubtermsFn { + VirtualIterator> operator()(Literal *lit) + { + CALL("FnDefRewriting::RewriteableSubtermsFn()"); + NonVariableIterator nvi(lit); + return pvi(pushPairIntoRightIterator(lit, + getUniquePersistentIteratorFromPtr(&nvi))); + } +}; + +struct FnDefRewriting::ForwardResultFn { + ForwardResultFn(Clause *cl) : _cl(cl) {} + + Clause* operator()(pair, TermQueryResult> arg) + { + CALL("FnDefRewriting::ForwardResultFn()"); + + TermQueryResult &qr = arg.second; + bool temp; + return FnDefRewriting::perform(_cl, arg.first.first, arg.first.second, qr.clause, + qr.literal, qr.term, qr.substitution, false, temp, + Inference(GeneratingInference2(InferenceRule::FNDEF_REWRITING, _cl, qr.clause))); + } +private: + Clause *_cl; +}; + +ClauseIterator FnDefRewriting::generateClauses(Clause *premise) +{ + CALL("FnDefRewriting::generateClauses"); + + auto itf1 = premise->iterLits(); + + // Get an iterator of pairs of selected literals and rewritable subterms + // of those literals. Here all subterms of a literal are rewritable. + auto itf2 = getMapAndFlattenIterator(itf1, RewriteableSubtermsFn()); + + // Get clauses with a function definition literal whose lhs is a generalization of the rewritable subterm, + // returns a pair with the original pair and the generalization result (includes substitution) + auto itf3 = getMapAndFlattenIterator(itf2, GeneralizationsFn(GeneratingInferenceEngine::_salg->getFunctionDefinitionHandler())); + + //Perform forward rewriting + auto it = pvi(getMappingIterator(itf3, ForwardResultFn(premise))); + // Remove null elements + return pvi(getFilteredIterator(it, NonzeroFn())); +} + +bool FnDefRewriting::perform(Clause* cl, Clause*& replacement, ClauseIterator& premises) +{ + CALL("FnDefRewriting::perform/1"); + auto salg = ForwardSimplificationEngine::_salg; + + Ordering& ordering = salg->getOrdering(); + + static DHSet attempted; + attempted.reset(); + + unsigned cLen = cl->length(); + for (unsigned li = 0; li < cLen; li++) { + Literal* lit = (*cl)[li]; + NonVariableIterator it(lit); + while (it.hasNext()) { + TermList trm = it.next(); + if (!attempted.insert(trm)) { + it.right(); + continue; + } + + bool toplevelCheck = salg->getOptions().demodulationRedundancyCheck() && + lit->isEquality() && (trm==*lit->nthArgument(0) || trm==*lit->nthArgument(1)); + + auto git = salg->getFunctionDefinitionHandler()->getGeneralizations(trm); + while (git.hasNext()) { + TermQueryResult qr = git.next(); + if (qr.clause->length() != 1) { + continue; + } + auto rhs = EqHelper::getOtherEqualitySide(qr.literal, qr.term); + if (Ordering::isGorGEorE(ordering.compare(rhs,qr.term))) { + continue; + } + bool isEqTautology = false; + auto res = FnDefRewriting::perform(cl, lit, trm, qr.clause, qr.literal, qr.term, qr.substitution, toplevelCheck, + isEqTautology, Inference(SimplifyingInference2(InferenceRule::FNDEF_DEMODULATION, cl, qr.clause)), salg); + if (!res && !isEqTautology) { + continue; + } + if (!isEqTautology) { + replacement = res; + } + premises = pvi(getSingletonIterator(qr.clause)); + return true; + } + } + } + + return false; +} + +Clause *FnDefRewriting::perform( + Clause *rwClause, Literal *rwLit, TermList rwTerm, + Clause *eqClause, Literal *eqLit, TermList eqLHS, + ResultSubstitutionSP subst, bool toplevelCheck, bool& isEqTautology, + const Inference& inf, SaturationAlgorithm* salg) +{ + CALL("FnDefRewriting::perform/2"); + + if (SortHelper::getTermSort(rwTerm, rwLit) != SortHelper::getEqualityArgumentSort(eqLit)) { + // sorts don't match + return 0; + } + + ASS(!eqLHS.isVar()); + + TermList tgtTerm = EqHelper::getOtherEqualitySide(eqLit, eqLHS); + + TermList tgtTermS; + if (!subst->isIdentityOnQueryWhenResultBound()) { + //When we apply substitution to the rhs, we get a term, that is + //a variant of the term we'd like to get, as new variables are + //produced in the substitution application. + TermList lhsSBadVars = subst->applyToResult(eqLHS); + TermList rhsSBadVars = subst->applyToResult(tgtTerm); + Renaming rNorm, qNorm, qDenorm; + rNorm.normalizeVariables(lhsSBadVars); + qNorm.normalizeVariables(tgtTerm); + qDenorm.makeInverse(qNorm); + ASS_EQ(rwTerm, qDenorm.apply(rNorm.apply(lhsSBadVars))); + tgtTermS = qDenorm.apply(rNorm.apply(rhsSBadVars)); + } + else { + tgtTermS = subst->applyToBoundResult(tgtTerm); + } + + if (toplevelCheck) { + Ordering& ordering = salg->getOrdering(); + TermList other=EqHelper::getOtherEqualitySide(rwLit, rwTerm); + Ordering::Result tord = ordering.compare(tgtTermS, other); + if (tord != Ordering::LESS && tord != Ordering::LESS_EQ) { + Literal* eqLitS = subst->applyToBoundResult(eqLit); + bool isMax=true; + for (unsigned i = 0; i < rwClause->length(); i++) { + if (rwLit == (*rwClause)[i]) { + continue; + } + if (ordering.compare(eqLitS, (*rwClause)[i]) == Ordering::LESS) { + isMax=false; + break; + } + } + if (isMax) { + return 0; + } + } + } + + Literal *tgtLitS = EqHelper::replace(rwLit, rwTerm, tgtTermS); + if (EqHelper::isEqTautology(tgtLitS)) { + isEqTautology = true; + return 0; + } + + unsigned rwLength = rwClause->length(); + unsigned eqLength = eqClause->length(); + unsigned newLength = rwLength + eqLength - 1; + + Clause *res = new (newLength) Clause(newLength, inf); + + static bool doSimS = env.options->simulatenousSuperposition(); + (*res)[0] = tgtLitS; + + unsigned next = 1; + for (unsigned i = 0; i < rwLength; i++) { + Literal *curr = (*rwClause)[i]; + if (curr != rwLit) { + if (doSimS) { + curr = EqHelper::replace(curr, rwTerm, tgtTermS); + } + + if (EqHelper::isEqTautology(curr)) { + isEqTautology = true; + res->destroy(); + return 0; + } + + (*res)[next++] = curr; + } + } + + { + for (unsigned i = 0; i < eqLength; i++) { + Literal *curr = (*eqClause)[i]; + if (curr != eqLit) { + Literal *currAfter; + if (!subst->isIdentityOnQueryWhenResultBound()) { + // same as above for RHS + TermList lhsSBadVars = subst->applyToResult(eqLHS); + Literal *currSBadVars = subst->applyToResult(curr); + Renaming rNorm, qNorm, qDenorm; + rNorm.normalizeVariables(lhsSBadVars); + qNorm.normalizeVariables(curr); + qDenorm.makeInverse(qNorm); + ASS_EQ(rwTerm, qDenorm.apply(rNorm.apply(lhsSBadVars))); + currAfter = qDenorm.apply(rNorm.apply(currSBadVars)); + } + else { + currAfter = subst->applyToBoundResult(curr); + } + + if (EqHelper::isEqTautology(currAfter)) { + isEqTautology = true; + res->destroy(); + return 0; + } + + (*res)[next++] = currAfter; + } + } + } + + return res; +} diff --git a/Inferences/FnDefRewriting.hpp b/Inferences/FnDefRewriting.hpp new file mode 100644 index 000000000..7dc593340 --- /dev/null +++ b/Inferences/FnDefRewriting.hpp @@ -0,0 +1,50 @@ +/* + * This file is part of the source code of the software program + * Vampire. It is protected by applicable + * copyright laws. + * + * This source code is distributed under the licence found here + * https://vprover.github.io/license.html + * and in the source directory + */ +/** + * @file FnDefRewriting.hpp + * Defines class FnDefRewriting. + */ + +#ifndef __FnDefRewriting__ +#define __FnDefRewriting__ + +#include "Forwards.hpp" + +namespace Inferences { + +using namespace Kernel; +using namespace Shell; + +class FnDefRewriting + : public GeneratingInferenceEngine + , public ForwardSimplificationEngine + { +public: + CLASS_NAME(FnDefRewriting); + USE_ALLOCATOR(FnDefRewriting); + + ClauseIterator generateClauses(Clause *premise) override; + bool perform(Clause* cl, Clause*& replacement, ClauseIterator& premises) override; + +private: + static Clause *perform( + Clause *rwClause, Literal *rwLiteral, TermList rwTerm, + Clause *eqClause, Literal *eqLiteral, TermList eqLHS, + ResultSubstitutionSP subst, bool toplevelCheck, + bool& isEqTautology, const Inference& inf, SaturationAlgorithm* salg = nullptr); + + struct ForwardResultFn; + struct RewriteableSubtermsFn; + struct GeneralizationsFn; +}; + +}; // namespace Inferences + +#endif /* __FnDefRewriting__ */ diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index a3105232e..4787989da 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -43,27 +43,52 @@ namespace Inferences using namespace Kernel; using namespace Lib; -Term* getPlaceholderForTerm(Term* t) +TermList ActiveOccurrenceIterator::next() +{ + CALL("ActiveOccurrenceIterator::next"); + + Term* t = _stack.pop(); + auto f = t->functor(); + auto lit = t->isLiteral(); + InductionTemplate* templ = _fnDefHandler ? + _fnDefHandler->getInductionTemplate(f, !lit) : nullptr; + if (templ) { + auto& actPos = templ->inductionPositions(); + for (unsigned i = 0; i < t->arity(); i++) { + if (actPos[i]) { + _stack.push(t->nthArgument(i)->term()); + } + } + } else { + for (unsigned i = 0; i < t->arity(); i++) { + _stack.push(t->nthArgument(i)->term()); + } + } + return TermList(t); +} + +Term* getPlaceholderForTerm(const vvector& ts, unsigned i) { CALL("getPlaceholderForTerm"); - static DHMap placeholders; - TermList srt = SortHelper::getResultSort(t); - if(!placeholders.find(srt)){ - unsigned fresh = env.signature->addFreshFunction(0,(srt.toString() + "_placeholder").c_str()); + static DHMap,Term*> placeholders; + TermList srt = SortHelper::getResultSort(ts[i]); + auto p = make_pair(srt,i); + if(!placeholders.find(p)){ + unsigned fresh = env.signature->addFreshFunction(0,(srt.toString() + "_placeholder" + Int::toString(i)).c_str()); env.signature->getFunction(fresh)->setType(OperatorType::getConstantsType(srt)); auto res = Term::createConstant(fresh); - placeholders.insert(srt,res); + placeholders.insert(p,res); return res; } - return placeholders.get(srt); + return placeholders.get(p); } TermList TermReplacement::transformSubterm(TermList trm) { CALL("TermReplacement::transformSubterm"); - if(trm.isTerm() && trm.term()==_o){ - return _r; + if(trm.isTerm() && _m.count(trm.term())){ + return _m.at(trm.term()); } return trm; } @@ -74,8 +99,9 @@ TermList SkolemSquashingTermReplacement::transformSubterm(TermList trm) if(trm.isTerm()) { auto t = trm.term(); - if (t==_o){ - return _r; + auto it = _m.find(t); + if (it != _m.end()){ + return it->second; } unsigned f = t->functor(); if (env.signature->getFunction(f)->skolem()) { @@ -107,19 +133,25 @@ Formula* InductionContext::getFormula(TermReplacement& tr, bool opposite) const return JunctionFormula::generalJunction(opposite ? Connective::OR : Connective::AND, argLists); } -Formula* InductionContext::getFormula(TermList r, bool opposite, Substitution* subst) const +Formula* InductionContext::getFormula(const vvector& r, bool opposite, Substitution* subst) const { CALL("InductionContext::getFormula/2"); - - TermReplacement tr(getPlaceholderForTerm(_indTerm), r); - if (subst) { - ASS(r.isVar()); - subst->bind(r.var(), getPlaceholderForTerm(_indTerm)); + ASS_EQ(_indTerms.size(), r.size()); + + vmap replacementMap; + for (unsigned i = 0; i < _indTerms.size(); i++) { + auto ph = getPlaceholderForTerm(_indTerms,i); + replacementMap.insert(make_pair(ph,r[i])); + if (subst) { + ASS(r[i].isVar()); + subst->bind(r[i].var(), ph); + } } + TermReplacement tr(replacementMap); return getFormula(tr, opposite); } -Formula* InductionContext::getFormulaWithSquashedSkolems(TermList r, bool opposite, +Formula* InductionContext::getFormulaWithSquashedSkolems(const vvector& r, bool opposite, unsigned& var, VList** varList, Substitution* subst) const { CALL("InductionContext::getFormulaWithSquashedSkolems"); @@ -128,12 +160,19 @@ Formula* InductionContext::getFormulaWithSquashedSkolems(TermList r, bool opposi if (!strengthenHyp) { return getFormula(r, opposite, subst); } - SkolemSquashingTermReplacement tr(getPlaceholderForTerm(_indTerm), r, var); + vmap replacementMap; + for (unsigned i = 0; i < _indTerms.size(); i++) { + auto ph = getPlaceholderForTerm(_indTerms,i); + replacementMap.insert(make_pair(ph,r[i])); + if (subst) { + ASS(r[i].isVar()); + subst->bind(r[i].var(), ph); + } + } + SkolemSquashingTermReplacement tr(replacementMap, var); unsigned temp = var; auto res = getFormula(tr, opposite); if (subst) { - ASS(r.isVar()); - subst->bind(r.var(), getPlaceholderForTerm(_indTerm)); DHMap::Iterator it(tr._tv); while (it.hasNext()) { unsigned v; @@ -152,15 +191,24 @@ Formula* InductionContext::getFormulaWithSquashedSkolems(TermList r, bool opposi return res; } +vmap getContextReplacementMap(const InductionContext& context, bool inverse = false) { + vmap m; + for (unsigned i = 0; i < context._indTerms.size(); i++) { + auto ph = getPlaceholderForTerm(context._indTerms,i); + m.insert(make_pair(inverse ? ph : context._indTerms[i], inverse ? context._indTerms[i] : ph)); + } + return m; +} + ContextReplacement::ContextReplacement(const InductionContext& context) - : TermReplacement(context._indTerm, TermList(getPlaceholderForTerm(context._indTerm))), + : TermReplacement(getContextReplacementMap(context)), _context(context), _used(false) {} InductionContext ContextReplacement::next() { CALL("ContextReplacement::next"); ASS(hasNext()); - InductionContext context(_context._indTerm); + InductionContext context(_context._indTerms); for (const auto& kv : _context._cls) { for (const auto& lit : kv.second) { auto tlit = transform(lit); @@ -173,34 +221,128 @@ InductionContext ContextReplacement::next() return context; } -ContextReplacement* ContextSubsetReplacement::instance(const InductionContext& context, const Options& opt) +ActiveOccurrenceContextReplacement::ActiveOccurrenceContextReplacement( + const InductionContext& context, FunctionDefinitionHandler* fnDefHandler) + : ContextReplacement(context), + _fnDefHandler(fnDefHandler), + _iteration(_context._indTerms.size(),0), + _matchCount(_context._indTerms.size(),0), + _hasNonActive(false) +{} + +TermList ActiveOccurrenceContextReplacement::transformSubterm(TermList trm) { - CALL("ContextSubsetReplacement::instance"); - if (opt.inductionGen()) { - return new ContextSubsetReplacement(context, opt.maxInductionGenSubsetSize()); + CALL("ActiveOccurrenceContextReplacement::transformSubterm"); + if (trm.isTerm()) { + auto it = std::find(_context._indTerms.begin(), _context._indTerms.end(), trm.term()); + if (it != _context._indTerms.end()) { + auto i = it - _context._indTerms.begin(); + if (1 & (_iteration[i] >> _matchCount[i]++)) { + return _m.at(trm.term()); + } + } } - return new ContextReplacement(context); + return trm; } -ContextSubsetReplacement::ContextSubsetReplacement(const InductionContext& context, const unsigned maxSubsetSize) - : ContextReplacement(context), _occurrences(0), _maxSubsetSize(maxSubsetSize), _ready(false) +InductionContext ActiveOccurrenceContextReplacement::next() { + CALL("ActiveOccurrenceContextReplacement::next"); + ASS(hasNext()); + _used = true; + InductionContext context(_context._indTerms); for (const auto& kv : _context._cls) { for (const auto& lit : kv.second) { - _occurrences += lit->countSubtermOccurrences(TermList(_context._indTerm)); + for (unsigned i = 0; i < _iteration.size(); i++) { + _iteration[i] = 0; + _matchCount[i] = 0; + } + Stack> stack(8); + stack.push(make_pair(lit,true)); + while (stack.isNonEmpty()) { + auto kv = stack.pop(); + auto t = kv.first; + auto active = kv.second; + auto f = t->functor(); + auto lit = t->isLiteral(); + auto templ = _fnDefHandler->getInductionTemplate(f, !lit); + for (unsigned k = 0; k < t->arity(); k++) { + stack.push(make_pair(t->nthArgument(k)->term(), + active && templ ? templ->inductionPositions()[k] : active)); + } + auto it = std::find(_context._indTerms.begin(), _context._indTerms.end(), t); + if (it != _context._indTerms.end()) { + auto idx = it - _context._indTerms.begin(); + _iteration[idx] = (_iteration[idx] << 1) | active; + if (!active) { + _hasNonActive = true; + } + } + } + auto tlit = transform(lit); + if (tlit != lit) { + context.insert(kv.first, tlit); + } } } - _maxIterations = pow(2, _occurrences); + return context; +} + +VirtualIterator contextReplacementInstance(const InductionContext& context, const Options& opt, FunctionDefinitionHandler* fnDefHandler) +{ + CALL("ContextSubsetReplacement::instance"); + auto ctx = context; + auto res = VirtualIterator::getEmpty(); + if (opt.inductionOnActiveOccurrences()) { + ActiveOccurrenceContextReplacement aor(context, fnDefHandler); + ASS(aor.hasNext()); + ctx = aor.next(); + res = pvi(getSingletonIterator(ctx)); + if (!aor.hasNonActive()) { + return res; + } + } + return pvi(getConcatenatedIterator(res, vi(opt.inductionGen() + ? new ContextSubsetReplacement(ctx, opt.maxInductionGenSubsetSize()) + : new ContextReplacement(ctx)))); +} + +ContextSubsetReplacement::ContextSubsetReplacement(const InductionContext& context, const unsigned maxSubsetSize) + : ContextReplacement(context), + _iteration(context._indTerms.size(),1), // we want to exclude empty subset, so set all to 1 + _maxIterations(context._indTerms.size(),0), + _matchCount(context._indTerms.size(),0), + _maxSubsetSize(maxSubsetSize), + _ready(false), _done(false) +{ + for (unsigned i = 0; i < _context._indTerms.size(); i++) { + unsigned occurrences = 0; + for (const auto& kv : _context._cls) { + for (const auto& lit : kv.second) { + occurrences += lit->countSubtermOccurrences(TermList(_context._indTerms[i])); + } + } + _maxIterations[i] = pow(2, occurrences); + if (_maxIterations[i] > _maxOccurrences) { + _iteration[i] = _maxIterations[i]-1; + } + } + while (!_done && shouldSkipIteration()) { + stepIteration(); + } + _ready = true; } TermList ContextSubsetReplacement::transformSubterm(TermList trm) { CALL("ContextSubsetReplacement::transformSubterm"); - if (trm.isTerm() && trm.term() == _context._indTerm){ - // Replace either if there are too many occurrences to try all possibilities, - // or if the bit in _iteration corresponding to this match is set to 1. - if ((_occurrences > _maxOccurrences) || (1 & (_iteration >> _matchCount++))) { - return _r; + if (trm.isTerm()) { + auto it = std::find(_context._indTerms.begin(), _context._indTerms.end(), trm.term()); + if (it != _context._indTerms.end()) { + auto i = it - _context._indTerms.begin(); + if (1 & (_iteration[i] >> _matchCount[i]++)) { + return _m.at(trm.term()); + } } } return trm; @@ -210,35 +352,43 @@ bool ContextSubsetReplacement::hasNext() { CALL("ContextSubsetReplacement::hasNext"); if (_ready) { - return hasNextInner(); + return !_done; } _ready = true; // Increment _iteration, since it either is 0, or was already used. - _iteration++; - unsigned setBits = BitUtils::oneBits(_iteration); - // Skip this iteration if not all bits are set, but more than maxSubset are set. - while (hasNextInner() && - ((_maxSubsetSize > 0) && (setBits < _occurrences) && (setBits > _maxSubsetSize))) { - _iteration++; - setBits = BitUtils::oneBits(_iteration); - } - if (!hasNextInner() || - ((_occurrences > _maxOccurrences) && (_iteration > 1))) { - // All combinations were already returned. - return false; + // _iteration++; + // unsigned setBits = BitUtils::oneBits(_iteration); + // // Skip this iteration if not all bits are set, but more than maxSubset are set. + // while (hasNextInner() && + // ((_maxSubsetSize > 0) && (setBits < _occurrences) && (setBits > _maxSubsetSize))) { + // _iteration++; + // setBits = BitUtils::oneBits(_iteration); + stepIteration(); + while (!_done && shouldSkipIteration()) { + stepIteration(); } - return true; + return !_done; } InductionContext ContextSubsetReplacement::next() { CALL("ContextSubsetReplacement::next"); ASS(_ready); - InductionContext context(_context._indTerm); - _matchCount = 0; + InductionContext context(_context._indTerms); + for (unsigned i = 0; i < _context._indTerms.size(); i++) { + _matchCount[i] = 0; + } for (const auto& kv : _context._cls) { for (const auto& lit : kv.second) { auto tlit = transform(lit); - if (tlit != lit) { + // check if tlit has placeholders + bool found = false; + for (unsigned i = 0; i < _context._indTerms.size(); i++) { + if (tlit->containsSubterm(TermList(getPlaceholderForTerm(_context._indTerms,i)))) { + found = true; + break; + } + } + if (found) { context.insert(kv.first, tlit); } } @@ -247,6 +397,40 @@ InductionContext ContextSubsetReplacement::next() { return context; } +bool ContextSubsetReplacement::shouldSkipIteration() const +{ + CALL("ContextSubsetReplacement::shouldSkipIteration"); + const bool subsetSizeCheck = _maxSubsetSize > 0; + for (unsigned i = 0; i < _iteration.size(); i++) { + unsigned setBits = __builtin_popcount(_iteration[i]); + // never skip no generalization + if (_iteration[i] == _maxIterations[i]-1) { + continue; + } + if (subsetSizeCheck && setBits > _maxSubsetSize) { + return true; + } + } + return false; +} + +void ContextSubsetReplacement::stepIteration() +{ + CALL("ContextSubsetReplacement::stepIteration"); + for (unsigned i = 0; i < _iteration.size(); i++) { + if (_maxIterations[i] > _maxOccurrences) { + continue; + } + _iteration[i]++; + if (_iteration[i] < _maxIterations[i]) { + return; + } else { + _iteration[i] = 1; + } + } + _done = true; +} + void Induction::attach(SaturationAlgorithm* salg) { CALL("Induction::attach"); @@ -281,8 +465,8 @@ ClauseIterator Induction::generateClauses(Clause* premise) { CALL("Induction::generateClauses"); - return pvi(InductionClauseIterator(premise, InductionHelper(_comparisonIndex, _inductionTermIndex), getOptions(), - _structInductionTermIndex, _formulaIndex)); + return pvi(InductionClauseIterator(premise, InductionHelper(_comparisonIndex, _inductionTermIndex), + _salg, _structInductionTermIndex, _formulaIndex)); } void InductionClauseIterator::processClause(Clause* premise) @@ -320,13 +504,18 @@ struct InductionContextFn { InductionContextFn(Clause* premise, Literal* lit) : _premise(premise), _lit(lit) {} - VirtualIterator operator()(pair> arg) { + VirtualIterator operator()(pair, VirtualIterator> arg) { auto indDepth = _premise->inference().inductionDepth(); // heuristic 2 if (indDepth) { auto res = VirtualIterator::getEmpty(); + // TODO make this work for multiple induction terms + if (arg.first.size() > 1) { + return res; + } + auto indTerm = arg.first[0]; // check for complex term and non-equality - if (_lit->isEquality() || !arg.first->arity()) { + if (_lit->isEquality() || !indTerm->arity()) { return res; } while (arg.second.hasNext()) { @@ -350,8 +539,8 @@ struct InductionContextFn // - no other non-equal pair of terms have been processed (match) // - one of them contains the other and the contained one is the induction term if (match || - !((st1.containsSubterm(st2) && st2.term() == arg.first) || - (st2.containsSubterm(st1) && st1.term() == arg.first))) + !((st1.containsSubterm(st2) && st2.term() == indTerm) || + (st2.containsSubterm(st1) && st1.term() == indTerm))) { match = false; break; @@ -406,22 +595,64 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) } if (lit->ground()) { - Set ta_terms; Set int_terms; + vmap,vvector>>> ta_terms; + + auto templ = _fnDefHandler ? + _fnDefHandler->getInductionTemplate(lit->functor(), false) : nullptr; + if (templ) { + vvector indTerms; + if (templ->matchesTerm(lit, indTerms)) { + vvector typeArgs; //(lit->numTypeArguments()); + for (unsigned i = 0; i < lit->numTypeArguments(); i++) { + typeArgs.push_back(lit->nthArgument(i)->term()); + } + auto it = ta_terms.find(indTerms); + if (it == ta_terms.end()) { + it = ta_terms.insert(make_pair(indTerms,vvector>>())).first; + } + it->second.push_back(make_pair(templ,typeArgs)); + } + } - NonVariableNonTypeIterator it(lit); + VirtualIterator it; + if (_opt.inductionOnActiveOccurrences()) { + it = vi(new ActiveOccurrenceIterator(lit, _fnDefHandler)); + } else { + it = vi(new NonVariableNonTypeIterator(lit)); + } while(it.hasNext()){ TermList ts = it.next(); auto t = ts.term(); - - if(InductionHelper::isInductionTermFunctor(t->functor())){ + auto f = t->functor(); + if(InductionHelper::isInductionTermFunctor(f)){ if(InductionHelper::isStructInductionOn() && InductionHelper::isStructInductionTerm(t)){ - ta_terms.insert(t); + vvector indTerms = { ts.term() }; + auto it = ta_terms.find(indTerms); + if (it == ta_terms.end()) { + ta_terms.insert(make_pair(indTerms,vvector>>())); + } } if(InductionHelper::isIntInductionOneOn() && InductionHelper::isIntInductionTermListInLiteral(ts, lit)){ int_terms.insert(t); } } + auto templ = _fnDefHandler ? + _fnDefHandler->getInductionTemplate(f, true) : nullptr; + if (templ) { + vvector indTerms; + if (templ->matchesTerm(ts.term(), indTerms)) { + vvector typeArgs; //(t->numTypeArguments()); + for (unsigned i = 0; i < t->numTypeArguments(); i++) { + typeArgs.push_back(t->nthArgument(i)->term()); + } + auto it = ta_terms.find(indTerms); + if (it == ta_terms.end()) { + it = ta_terms.insert(make_pair(indTerms,vvector>>())).first; + } + it->second.push_back(make_pair(templ,typeArgs)); + } + } } if (InductionHelper::isInductionLiteral(lit)) { @@ -430,7 +661,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) Term* t = citer1.next(); auto leBound = iterTraits(_helper.getLess(t)).collect(); auto grBound = iterTraits(_helper.getGreater(t)).collect(); - auto indLitsIt = vi(ContextSubsetReplacement::instance(InductionContext(t, lit, premise), _opt)); + auto indLitsIt = contextReplacementInstance(InductionContext({ t }, lit, premise), _opt, _fnDefHandler); while (indLitsIt.hasNext()) { auto ctx = indLitsIt.next(); // process lower bounds @@ -477,11 +708,18 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) } } // collect term queries for each induction term - auto sideLitsIt = VirtualIterator>::getEmpty(); + auto sideLitsIt = VirtualIterator,TermQueryResultIterator>>::getEmpty(); if (_opt.nonUnitInduction()) { - sideLitsIt = pvi(iterTraits(Set::Iterator(ta_terms)) - .map([this](Term* arg) { - return make_pair(arg, _structInductionTermIndex->getGeneralizations(TermList(arg), true)); + sideLitsIt = pvi(iterTraits(getSTLIterator(ta_terms.begin(), ta_terms.end())) + .map([](pair,vvector>>> kv){ + return kv.first; + }) + .map([this](vvector ts) { + auto res = TermQueryResultIterator::getEmpty(); + for (const auto& t : ts) { + res = pvi(getConcatenatedIterator(res, _structInductionTermIndex->getGeneralizations(TermList(t), false))); + } + return make_pair(ts, res); })); } // put clauses from queries into contexts alongside with the given clause and induction term @@ -489,7 +727,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) .flatMap(InductionContextFn(premise, lit)) // generalize all contexts if needed .flatMap([this](const InductionContext& arg) { - return vi(ContextSubsetReplacement::instance(arg, _opt)); + return contextReplacementInstance(arg, _opt, _fnDefHandler); }) // filter out the ones without the premise, or only one literal .filter([&premise](const InductionContext& arg) { @@ -504,13 +742,13 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) return hasPremise && cnt > 1; }); // collect contexts for single-literal induction with given clause - auto indCtxSingle = iterTraits(Set::Iterator(ta_terms)) - .map([&lit,&premise](Term* arg) { - return InductionContext(arg, lit, premise); + auto indCtxSingle = iterTraits(getSTLIterator(ta_terms.begin(), ta_terms.end())) + .map([&lit,&premise](pair,vvector>>> arg) { + return InductionContext(arg.first, lit, premise); }) // generalize all contexts if needed .flatMap([this](const InductionContext& arg) { - return vi(ContextSubsetReplacement::instance(arg, _opt)); + return contextReplacementInstance(arg, _opt, _fnDefHandler); }); auto indCtxIt = iterTraits(getConcatenatedIterator(sideLitsIt2, indCtxSingle)) // filter out the ones without an induction literal @@ -532,17 +770,26 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) _opt.structInduction() == Options::StructuralInductionKind::ALL; static bool three = _opt.structInduction() == Options::StructuralInductionKind::THREE || _opt.structInduction() == Options::StructuralInductionKind::ALL; + static bool rec = _opt.structInduction() == Options::StructuralInductionKind::RECURSION || + _opt.structInduction() == Options::StructuralInductionKind::ALL; InductionFormulaIndex::Entry* e; // generate formulas and add them to index if not done already if (_formulaIndex.findOrInsert(ctx, e)) { - if(one){ - performStructInductionOne(ctx,e); - } - if(two){ - performStructInductionTwo(ctx,e); + if (ctx._indTerms.size() == 1) { + if(one){ + performStructInductionOne(ctx,e); + } + if(two){ + performStructInductionTwo(ctx,e); + } + if(three){ + performStructInductionThree(ctx,e); + } } - if(three){ - performStructInductionThree(ctx,e); + if (rec) { + for (const auto& kv : ta_terms.at(ctx._indTerms)) { + performRecursionInduction(ctx, kv.first, kv.second, e); + } } } // resolve the formulas with the premises @@ -575,10 +822,10 @@ void InductionClauseIterator::processIntegerComparison(Clause* premise, Literal* return tqr.clause != premise; }) .map([&indt](const TermQueryResult& tqr) { - return InductionContext(indt, tqr.literal, tqr.clause); + return InductionContext({ indt }, tqr.literal, tqr.clause); }) .flatMap([this](const InductionContext& arg) { - return vi(ContextSubsetReplacement::instance(arg, _opt)); + return contextReplacementInstance(arg, _opt, _fnDefHandler); }); TermQueryResult b(bound, lit, premise); // loop over literals containing the current induction term @@ -633,7 +880,10 @@ ClauseStack InductionClauseIterator::produceClauses(Formula* hypothesis, Inferen cnf.clausify(NNF::ennf(fu), hyp_clauses); switch (rule) { - case InferenceRule::STRUCT_INDUCTION_AXIOM: + case InferenceRule::STRUCT_INDUCTION_AXIOM_ONE: + case InferenceRule::STRUCT_INDUCTION_AXIOM_TWO: + case InferenceRule::STRUCT_INDUCTION_AXIOM_THREE: + case InferenceRule::STRUCT_INDUCTION_AXIOM_RECURSION: env.statistics->structInduction++; break; case InferenceRule::INT_INF_UP_INDUCTION_AXIOM: @@ -682,7 +932,8 @@ ClauseStack InductionClauseIterator::produceClauses(Formula* hypothesis, Inferen void InductionClauseIterator::resolveClauses(InductionContext context, InductionFormulaIndex::Entry* e, const TermQueryResult* bound1, const TermQueryResult* bound2) { static unsigned less = env.signature->getInterpretingSymbol(Theory::INT_LESS); - static TermList ph(getPlaceholderForTerm(context._indTerm)); + ASS_EQ(context._indTerms.size(), 1); + static TermList ph(getPlaceholderForTerm(context._indTerms,0)); // lower bound if (bound1) { auto lhs = bound1->literal->polarity() ? bound1->term : ph; @@ -842,7 +1093,7 @@ Clause* resolveClausesHelper(const InductionContext& context, const Stack(curr,subst)); } else { (*res)[next] = curr; @@ -857,7 +1108,7 @@ Clause* resolveClausesHelper(const InductionContext& context, const Stacklength(); i++) { bool copyCurr = true; for (const auto& lit : kv.second) { - TermReplacement tr(getPlaceholderForTerm(context._indTerm),TermList(context._indTerm)); + TermReplacement tr(getContextReplacementMap(context, /*inverse=*/true)); auto rlit = tr.transform(lit); if (rlit == (*kv.first)[i]) { copyCurr = false; @@ -883,8 +1134,13 @@ void InductionClauseIterator::resolveClauses(const ClauseStack& cls, const Induc bool generalized = false; for (const auto& kv : context._cls) { for (const auto& lit : kv.second) { - if (lit->containsSubterm(TermList(context._indTerm))) { - generalized = true; + for (const auto& t : context._indTerms) { + if (lit->containsSubterm(TermList(t))) { + generalized = true; + break; + } + } + if (generalized) { break; } } @@ -903,11 +1159,11 @@ void InductionClauseIterator::resolveClauses(const ClauseStack& cls, const Induc while(cit.hasNext()){ IntUnionFind::ElementIterator eIt = cit.next(); _clauses.push(resolveClausesHelper(context, cls, eIt, subst, generalized, applySubst)); - if(_opt.showInduction()){ + // if(_opt.showInduction()){ env.beginOutput(); env.out() << "[Induction] generate " << _clauses.top()->toString() << endl; env.endOutput(); - } + // } } } @@ -956,18 +1212,18 @@ void InductionClauseIterator::performIntInduction(const InductionContext& contex TermList y(1,false); // create L[b1] - Formula* Lb1 = context.getFormula(b1,true); + Formula* Lb1 = context.getFormula({ b1 },true); // create L[X] - Formula* Lx = context.getFormula(x,true); + Formula* Lx = context.getFormula({ x },true); // create L[Y] Substitution subst; - Formula* Ly = context.getFormula(y,true,&subst); + Formula* Ly = context.getFormula({ y },true,&subst); // create L[X+1] or L[X-1] TermList fpo(Term::create2(env.signature->getInterpretingSymbol(Theory::INT_PLUS),x,one)); - Formula* Lxpo = context.getFormula(fpo,true); + Formula* Lxpo = context.getFormula({ fpo },true); static unsigned less = env.signature->getInterpretingSymbol(Theory::INT_LESS); // create X>=b1 (which is ~XgetTermAlgebraOfSort(sort); unsigned numTypeArgs = sort.term()->arity(); @@ -1058,12 +1315,12 @@ void InductionClauseIterator::performStructInductionOne(const InductionContext& } // if hypothesis strengthening is on, this replaces the Skolems with fresh variables auto right = context.getFormulaWithSquashedSkolems( - TermList(Term::create(con->functor(),(unsigned)argTerms.size(), argTerms.begin())), true, var); + { TermList(Term::create(con->functor(),(unsigned)argTerms.size(), argTerms.begin())) }, true, var); FormulaList* args = FormulaList::empty(); TermStack::Iterator tvit(ta_vars); while(tvit.hasNext()){ auto hypVars = VList::empty(); - auto hyp = context.getFormulaWithSquashedSkolems(tvit.next(),true,var,&hypVars); + auto hyp = context.getFormulaWithSquashedSkolems({ tvit.next() },true,var,&hypVars); // quantify each hypotheses with variables replacing Skolems explicitly if (hypVars) { hyp = new QuantifiedFormula(Connective::FORALL, hypVars, SList::empty(), hyp); @@ -1076,12 +1333,12 @@ void InductionClauseIterator::performStructInductionOne(const InductionContext& ASS(formulas); Formula* indPremise = JunctionFormula::generalJunction(Connective::AND,formulas); Substitution subst; - auto conclusion = context.getFormulaWithSquashedSkolems(TermList(var++,false), true, var, nullptr, &subst); + auto conclusion = context.getFormulaWithSquashedSkolems({ TermList(var++,false) }, true, var, nullptr, &subst); Formula* hypothesis = new BinaryFormula(Connective::IMP, Formula::quantify(indPremise), Formula::quantify(conclusion)); - auto cls = produceClauses(hypothesis, InferenceRule::STRUCT_INDUCTION_AXIOM, context); + auto cls = produceClauses(hypothesis, InferenceRule::STRUCT_INDUCTION_AXIOM_ONE, context); e->add(std::move(cls), std::move(subst)); } @@ -1094,7 +1351,8 @@ void InductionClauseIterator::performStructInductionTwo(const InductionContext& { CALL("InductionClauseIterator::performStructInductionTwo"); - TermList sort = SortHelper::getResultSort(context._indTerm); + ASS_EQ(context._indTerms.size(), 1); + TermList sort = SortHelper::getResultSort(context._indTerms[0]); TermAlgebra* ta = env.signature->getTermAlgebraOfSort(sort); unsigned numTypeArgs = sort.term()->arity(); @@ -1103,7 +1361,7 @@ void InductionClauseIterator::performStructInductionTwo(const InductionContext& unsigned var = 1; // if hypothesis strengthening is on, this replaces the Skolems with fresh variables auto mainVars = VList::singleton(y.var()); - auto Ly = context.getFormulaWithSquashedSkolems(y,false,var,&mainVars); + auto Ly = context.getFormulaWithSquashedSkolems({ y },false,var,&mainVars); // for each constructor and destructor make // ![Z] : y = cons(Z,dec(y)) -> ( ~L[dec1(y)] & ~L[dec2(y)] @@ -1139,7 +1397,7 @@ void InductionClauseIterator::performStructInductionTwo(const InductionContext& while(tit.hasNext()){ TermList djy = tit.next(); auto hypVars = VList::empty(); - auto f = context.getFormulaWithSquashedSkolems(djy,true,var,&hypVars); + auto f = context.getFormulaWithSquashedSkolems({ djy },true,var,&hypVars); if (hypVars) { f = new QuantifiedFormula(Connective::FORALL, hypVars, SList::empty(), f); } @@ -1158,11 +1416,11 @@ void InductionClauseIterator::performStructInductionTwo(const InductionContext& : Ly); Substitution subst; - auto conclusion = context.getFormulaWithSquashedSkolems(TermList(var++, false), true, var, nullptr, &subst); + auto conclusion = context.getFormulaWithSquashedSkolems({ TermList(var++, false) }, true, var, nullptr, &subst); FormulaList* orf = FormulaList::cons(exists,FormulaList::singleton(Formula::quantify(conclusion))); Formula* hypothesis = new JunctionFormula(Connective::OR,orf); - auto cls = produceClauses(hypothesis, InferenceRule::STRUCT_INDUCTION_AXIOM, context); + auto cls = produceClauses(hypothesis, InferenceRule::STRUCT_INDUCTION_AXIOM_TWO, context); e->add(std::move(cls), std::move(subst)); } @@ -1180,7 +1438,8 @@ void InductionClauseIterator::performStructInductionThree(const InductionContext { CALL("InductionClauseIterator::performStructInductionThree"); - TermList sort = SortHelper::getResultSort(context._indTerm); + ASS_EQ(context._indTerms.size(), 1); + TermList sort = SortHelper::getResultSort(context._indTerms[0]); TermAlgebra* ta = env.signature->getTermAlgebraOfSort(sort); unsigned numTypeArgs = sort.term()->arity(); @@ -1191,7 +1450,7 @@ void InductionClauseIterator::performStructInductionThree(const InductionContext unsigned vars = 3; // if hypothesis strengthening is on, this replaces the Skolems with fresh variables auto mainVars = VList::singleton(y.var()); - auto Ly = context.getFormulaWithSquashedSkolems(y,false,vars,&mainVars); + auto Ly = context.getFormulaWithSquashedSkolems({ y },false,vars,&mainVars); // make smallerThanY unsigned sty = env.signature->addFreshPredicate(1,"smallerThan"); @@ -1262,7 +1521,7 @@ void InductionClauseIterator::performStructInductionThree(const InductionContext // now !z : smallerThanY(z) => ~L[z] Formula* smallerImpNL = Formula::quantify(new BinaryFormula(Connective::IMP, new AtomicFormula(Literal::create1(sty,true,z)), - context.getFormulaWithSquashedSkolems(z,true,vars))); + context.getFormulaWithSquashedSkolems({ z },true,vars))); FormulaList::push(smallerImpNL,conjunction); // quantify with mainVars explicitly @@ -1270,11 +1529,67 @@ void InductionClauseIterator::performStructInductionThree(const InductionContext new JunctionFormula(Connective::AND,conjunction)); Substitution subst; - auto conclusion = context.getFormulaWithSquashedSkolems(x,true,vars,nullptr,&subst); + auto conclusion = context.getFormulaWithSquashedSkolems({ x },true,vars,nullptr,&subst); FormulaList* orf = FormulaList::cons(exists,FormulaList::singleton(Formula::quantify(conclusion))); Formula* hypothesis = new JunctionFormula(Connective::OR,orf); - auto cls = produceClauses(hypothesis, InferenceRule::STRUCT_INDUCTION_AXIOM, context); + auto cls = produceClauses(hypothesis, InferenceRule::STRUCT_INDUCTION_AXIOM_THREE, context); + e->add(std::move(cls), std::move(subst)); +} + +void InductionClauseIterator::performRecursionInduction(const InductionContext& context, const InductionTemplate* templ, const vvector& typeArgs, InductionFormulaIndex::Entry* e) +{ + CALL("InductionClauseIterator::performRecursionInduction"); + + unsigned var = 0; + FormulaList* formulas = FormulaList::empty(); + vvector ts(context._indTerms.size(), TermList()); + auto& indPos = templ->inductionPositions(); + auto header = templ->branches().begin()->_header; + Substitution typeSubst; + ASS_EQ(typeArgs.size(),header->numTypeArguments()); + for (unsigned i = 0; i < header->numTypeArguments(); i++) { + auto arg = *header->nthArgument(i); + ASS(arg.isVar()); + typeSubst.bind(arg.var(),typeArgs[i]); + } + + for (const auto& b : templ->branches()) { + Renaming rn(var); + rn.normalizeVariables(b._header); + auto header = rn.apply(b._header->apply(typeSubst)); + unsigned j = 0; + for (unsigned i = 0; i < header->arity(); i++) { + if (indPos[i]) { + ts[j++] = *header->nthArgument(i); + } + } + auto right = context.getFormula(ts, true); + FormulaList* hyps = FormulaList::empty(); + for (const auto& r : b._recursiveCalls) { + j = 0; + auto rr = rn.apply(r->apply(typeSubst)); + for (unsigned i = 0; i < rr->arity(); i++) { + if (indPos[i]) { + ts[j++] = *rr->nthArgument(i); + } + } + FormulaList::push(context.getFormula(ts,true),hyps); + } + FormulaList::push(hyps ? + new BinaryFormula(Connective::IMP,JunctionFormula::generalJunction(Connective::AND,hyps),right) : right, formulas); + var = rn.nextVar(); + } + ASS(formulas); + Formula* indPremise = JunctionFormula::generalJunction(Connective::AND,formulas); + Substitution subst; + for (auto& t : ts) { + t = TermList(var++,false); + } + auto conclusion = context.getFormula(ts, true, &subst); + Formula* hypothesis = new BinaryFormula(Connective::IMP, Formula::quantify(indPremise), Formula::quantify(conclusion)); + + auto cls = produceClauses(hypothesis, InferenceRule::STRUCT_INDUCTION_AXIOM_RECURSION, context); e->add(std::move(cls), std::move(subst)); } @@ -1290,7 +1605,8 @@ void InductionClauseIterator::performStructInductionThree(const InductionContext bool InductionClauseIterator::notDoneInt(InductionContext context, Literal* bound1, Literal* bound2, InductionFormulaIndex::Entry*& e) { CALL("InductionClauseIterator::notDoneInt"); - TermList ph(getPlaceholderForTerm(context._indTerm)); + ASS_EQ(context._indTerms.size(), 1); + TermList ph(getPlaceholderForTerm(context._indTerms,0)); Literal* b1 = nullptr; Literal* b2 = nullptr; if (bound1) { diff --git a/Inferences/Induction.hpp b/Inferences/Induction.hpp index c9c3b81a9..733299120 100644 --- a/Inferences/Induction.hpp +++ b/Inferences/Induction.hpp @@ -31,6 +31,10 @@ #include "Lib/DHSet.hpp" #include "Lib/List.hpp" +#include "Saturation/SaturationAlgorithm.hpp" + +#include "Shell/FunctionDefinitionHandler.hpp" + #include "InductionHelper.hpp" #include "InferenceEngine.hpp" @@ -39,22 +43,42 @@ namespace Inferences using namespace Kernel; using namespace Saturation; +using namespace Shell; +using namespace Lib; + +class ActiveOccurrenceIterator + : public IteratorCore +{ +public: + ActiveOccurrenceIterator(Term* term, FunctionDefinitionHandler* fnDefHandler) + : _stack(8), _fnDefHandler(fnDefHandler) + { + _stack.push(term); + ASS(term->ground()); + ActiveOccurrenceIterator::next(); + } + + bool hasNext() override { return !_stack.isEmpty(); } + TermList next() override; +private: + Stack _stack; + FunctionDefinitionHandler* _fnDefHandler; +}; -Term* getPlaceholderForTerm(Term* t); +Term* getPlaceholderForTerm(const vvector& ts, unsigned i); class TermReplacement : public TermTransformer { public: - TermReplacement(Term* o, TermList r) : _o(o), _r(r) {} + TermReplacement(const vmap& m) : _m(m) {} TermList transformSubterm(TermList trm) override; protected: - Term* _o; - TermList _r; + vmap _m; }; class SkolemSquashingTermReplacement : public TermReplacement { public: - SkolemSquashingTermReplacement(Term* o, TermList r, unsigned& var) - : TermReplacement(o, r), _v(var) {} + SkolemSquashingTermReplacement(const vmap& m, unsigned& var) + : TermReplacement(m), _v(var) {} TermList transformSubterm(TermList trm) override; DHMap _tv; // maps terms to their variable replacement private: @@ -62,10 +86,12 @@ class SkolemSquashingTermReplacement : public TermReplacement { }; struct InductionContext { - explicit InductionContext(Term* t) - : _indTerm(t) {} - InductionContext(Term* t, Literal* l, Clause* cl) - : InductionContext(t) + explicit InductionContext(vvector&& ts) + : _indTerms(ts) {} + explicit InductionContext(const vvector& ts) + : _indTerms(ts) {} + InductionContext(const vvector& ts, Literal* l, Clause* cl) + : InductionContext(ts) { insert(cl, l); } @@ -76,13 +102,15 @@ struct InductionContext { node->second.push(lit); } - Formula* getFormula(TermList r, bool opposite, Substitution* subst = nullptr) const; - Formula* getFormulaWithSquashedSkolems(TermList r, bool opposite, unsigned& var, + Formula* getFormula(const vvector& r, bool opposite, Substitution* subst = nullptr) const; + Formula* getFormulaWithSquashedSkolems(const vvector& r, bool opposite, unsigned& var, VList** varList = nullptr, Substitution* subst = nullptr) const; vstring toString() const { vstringstream str; - str << *_indTerm << endl; + for (const auto& indt : _indTerms) { + str << *indt << endl; + } for (const auto& kv : _cls) { str << *kv.first << endl; for (const auto& lit : kv.second) { @@ -92,7 +120,7 @@ struct InductionContext { return str.str(); } - Term* _indTerm = nullptr; + vvector _indTerms; // One could induct on all literals of a clause, but if a literal // doesn't contain the induction term, it just introduces a couple // of tautologies and duplicate literals (a hypothesis clause will @@ -117,14 +145,29 @@ class ContextReplacement protected: InductionContext _context; -private: bool _used; }; +class ActiveOccurrenceContextReplacement + : public ContextReplacement { +public: + ActiveOccurrenceContextReplacement(const InductionContext& context, FunctionDefinitionHandler* fnDefHandler); + InductionContext next() override; + bool hasNonActive() const { return _hasNonActive; } + +protected: + TermList transformSubterm(TermList trm) override; + +private: + FunctionDefinitionHandler* _fnDefHandler; + vvector _iteration; + vvector _matchCount; + bool _hasNonActive; +}; + class ContextSubsetReplacement : public ContextReplacement { public: - static ContextReplacement* instance(const InductionContext& context, const Options& opt); ContextSubsetReplacement(const InductionContext& context, const unsigned maxSubsetSize); bool hasNext() override; @@ -134,18 +177,17 @@ class ContextSubsetReplacement TermList transformSubterm(TermList trm) override; private: - bool hasNextInner() const { - return _iteration < _maxIterations; - } + bool shouldSkipIteration() const; + void stepIteration(); // _iteration serves as a map of occurrences to replace - unsigned _iteration = 0; - unsigned _maxIterations; + vvector _iteration; + vvector _maxIterations; // Counts how many occurrences were already encountered in one transformation - unsigned _matchCount = 0; - unsigned _occurrences; - const unsigned _maxOccurrences = 20; + vvector _matchCount; + const unsigned _maxOccurrences = 1 << 20; const unsigned _maxSubsetSize; bool _ready; + bool _done; }; class Induction @@ -174,16 +216,17 @@ class Induction TermIndex* _inductionTermIndex = nullptr; TermIndex* _structInductionTermIndex = nullptr; InductionFormulaIndex _formulaIndex; + InductionFormulaIndex _recFormulaIndex; }; class InductionClauseIterator { public: // all the work happens in the constructor! - InductionClauseIterator(Clause* premise, InductionHelper helper, const Options& opt, + InductionClauseIterator(Clause* premise, InductionHelper helper, SaturationAlgorithm* salg, TermIndex* structInductionTermIndex, InductionFormulaIndex& formulaIndex) - : _helper(helper), _opt(opt), _structInductionTermIndex(structInductionTermIndex), - _formulaIndex(formulaIndex) + : _helper(helper), _opt(salg->getOptions()), _structInductionTermIndex(structInductionTermIndex), + _formulaIndex(formulaIndex), _fnDefHandler(salg->getFunctionDefinitionHandler()) { processClause(premise); } @@ -213,6 +256,7 @@ class InductionClauseIterator void performStructInductionOne(const InductionContext& context, InductionFormulaIndex::Entry* e); void performStructInductionTwo(const InductionContext& context, InductionFormulaIndex::Entry* e); void performStructInductionThree(const InductionContext& context, InductionFormulaIndex::Entry* e); + void performRecursionInduction(const InductionContext& context, const InductionTemplate* templ, const vvector& typeArgs, InductionFormulaIndex::Entry* e); bool notDoneInt(InductionContext context, Literal* bound1, Literal* bound2, InductionFormulaIndex::Entry*& e); @@ -221,6 +265,7 @@ class InductionClauseIterator const Options& _opt; TermIndex* _structInductionTermIndex; InductionFormulaIndex& _formulaIndex; + FunctionDefinitionHandler* _fnDefHandler; }; }; diff --git a/Kernel/FormulaUnit.hpp b/Kernel/FormulaUnit.hpp index e73a721b4..5a8b62cf4 100644 --- a/Kernel/FormulaUnit.hpp +++ b/Kernel/FormulaUnit.hpp @@ -37,9 +37,10 @@ class FormulaUnit { public: /** New unit of a given kind */ - FormulaUnit(Formula* f,const Inference& inf) + FormulaUnit(Formula* f,const Inference& inf, bool functionDefinition = false) : Unit(FORMULA,inf), - _formula(f), _cachedColor(COLOR_INVALID), _cachedWeight(0) + _formula(f), _cachedColor(COLOR_INVALID), _cachedWeight(0), + _functionDefinition(functionDefinition) {} void destroy(); @@ -56,6 +57,8 @@ class FormulaUnit Color getColor(); unsigned weight(); + bool isFunctionDefinition() const + { return _functionDefinition; } CLASS_NAME(FormulaUnit); USE_ALLOCATOR(FormulaUnit); @@ -66,6 +69,7 @@ class FormulaUnit Color _cachedColor; unsigned _cachedWeight; + bool _functionDefinition; }; // class FormulaUnit diff --git a/Kernel/Inference.cpp b/Kernel/Inference.cpp index ffe6eab42..c599cb82b 100644 --- a/Kernel/Inference.cpp +++ b/Kernel/Inference.cpp @@ -741,6 +741,10 @@ vstring Kernel::ruleName(InferenceRule rule) return "subsumption resolution"; case InferenceRule::SUPERPOSITION: return "superposition"; + case InferenceRule::FNDEF_REWRITING: + return "fn def rewriting"; + case InferenceRule::FNDEF_DEMODULATION: + return "fn def demodulation"; case InferenceRule::CONSTRAINED_SUPERPOSITION: return "constrained superposition"; case InferenceRule::EQUALITY_FACTORING: @@ -910,8 +914,14 @@ vstring Kernel::ruleName(InferenceRule rule) return "finite model not found : exhaustively excluded all possible domain size assignments"; case InferenceRule::ARITHMETIC_SUBTERM_GENERALIZATION: return "arithmetic subterm generalization"; - case InferenceRule::STRUCT_INDUCTION_AXIOM: - return "structural induction hypothesis"; + case InferenceRule::STRUCT_INDUCTION_AXIOM_ONE: + return "structural induction hypothesis (one)"; + case InferenceRule::STRUCT_INDUCTION_AXIOM_TWO: + return "structural induction hypothesis (two)"; + case InferenceRule::STRUCT_INDUCTION_AXIOM_THREE: + return "structural induction hypothesis (three)"; + case InferenceRule::STRUCT_INDUCTION_AXIOM_RECURSION: + return "structural induction hypothesis (recursion)"; case InferenceRule::INT_INF_UP_INDUCTION_AXIOM: return "integer induction hypothesis (up, infinite interval)"; case InferenceRule::INT_INF_DOWN_INDUCTION_AXIOM: diff --git a/Kernel/Inference.hpp b/Kernel/Inference.hpp index 437f0de4c..48c0e4c14 100644 --- a/Kernel/Inference.hpp +++ b/Kernel/Inference.hpp @@ -262,6 +262,8 @@ enum class InferenceRule : unsigned char { BOOL_SIMP, + FNDEF_DEMODULATION, + INTERNAL_SIMPLIFYING_INFERNCE_LAST, @@ -278,6 +280,8 @@ enum class InferenceRule : unsigned char { CONSTRAINED_FACTORING, /** superposition inference */ SUPERPOSITION, + /** function definition rewriting inference */ + FNDEF_REWRITING, /** superposition with constraints */ CONSTRAINED_SUPERPOSITION, /** equality factoring inference */ @@ -449,7 +453,10 @@ enum class InferenceRule : unsigned char { CHOICE_AXIOM, /* Structural induction hypothesis*/ - STRUCT_INDUCTION_AXIOM, + STRUCT_INDUCTION_AXIOM_ONE, + STRUCT_INDUCTION_AXIOM_TWO, + STRUCT_INDUCTION_AXIOM_THREE, + STRUCT_INDUCTION_AXIOM_RECURSION, /* Integer induction hypothesis for infinite intervals */ INT_INF_UP_INDUCTION_AXIOM, INT_INF_DOWN_INDUCTION_AXIOM, diff --git a/Kernel/InferenceStore.cpp b/Kernel/InferenceStore.cpp index e74823215..c6629f74d 100644 --- a/Kernel/InferenceStore.cpp +++ b/Kernel/InferenceStore.cpp @@ -333,7 +333,10 @@ struct InferenceStore::ProofPrinter // ; // } switch (rule) { - case InferenceRule::STRUCT_INDUCTION_AXIOM: + case InferenceRule::STRUCT_INDUCTION_AXIOM_ONE: + case InferenceRule::STRUCT_INDUCTION_AXIOM_TWO: + case InferenceRule::STRUCT_INDUCTION_AXIOM_THREE: + case InferenceRule::STRUCT_INDUCTION_AXIOM_RECURSION: env.statistics->structInductionInProof++; break; case InferenceRule::INT_INF_UP_INDUCTION_AXIOM: diff --git a/Kernel/Problem.cpp b/Kernel/Problem.cpp index 97087b6f5..f35054623 100644 --- a/Kernel/Problem.cpp +++ b/Kernel/Problem.cpp @@ -262,6 +262,13 @@ void Problem::addPartiallyEliminatedPredicate(unsigned pred, Unit* definition) _partiallyDeletedPredicates.insert(pred,definition); } +void Problem::addFunctionDefinitionHandler(Shell::FunctionDefinitionHandler* handler) +{ + CALL("Problem::addFunctionDefinitionHandler"); + + _fnDefHandler = handler; +} + /** * Recalculate the property from the current set of formulas */ diff --git a/Kernel/Problem.hpp b/Kernel/Problem.hpp index 0b4a3c191..fcb10cd41 100644 --- a/Kernel/Problem.hpp +++ b/Kernel/Problem.hpp @@ -83,10 +83,12 @@ class Problem { void addEliminatedFunction(unsigned func, Literal* definition); void addEliminatedPredicate(unsigned pred, Unit* definition); void addPartiallyEliminatedPredicate(unsigned pred, Unit* definition); + void addFunctionDefinitionHandler(FunctionDefinitionHandler* handler); DHMap getEliminatedFunctions(){ return _deletedFunctions; } DHMap getEliminatedPredicates(){ return _deletedPredicates; } DHMap getPartiallyEliminatedPredicates(){ return _partiallyDeletedPredicates;} + FunctionDefinitionHandler* getFunctionDefinitionHandler(){ return _fnDefHandler; } bool isPropertyUpToDate() const { return _propertyValid; } @@ -194,6 +196,7 @@ class Problem { DHMap _deletedFunctions; DHMap _deletedPredicates; DHMap _partiallyDeletedPredicates; + FunctionDefinitionHandler* _fnDefHandler; bool _hadIncompleteTransformation; diff --git a/Kernel/Renaming.hpp b/Kernel/Renaming.hpp index 7f9f3b086..38b267425 100644 --- a/Kernel/Renaming.hpp +++ b/Kernel/Renaming.hpp @@ -77,6 +77,8 @@ class Renaming { void normalizeVariables(const Term* t); void normalizeVariables(TermList t); void makeInverse(const Renaming& orig); + unsigned nextVar() const + { return _nextVar; } static Literal* normalize(Literal* l); static Term* normalize(Term* t); diff --git a/Lib/Metaiterators.hpp b/Lib/Metaiterators.hpp index cc174c24d..75da1eccf 100644 --- a/Lib/Metaiterators.hpp +++ b/Lib/Metaiterators.hpp @@ -1867,4 +1867,37 @@ IterTraits iterTraits(Iter i) } +template +class STLIterator +{ + private: + Iterator begin; + Iterator end; + + public: + using value_type = typename Iterator::value_type; + DECL_ELEMENT_TYPE(value_type); + + STLIterator(Iterator begin, Iterator end) + : begin(begin), end(end) + { } + + bool hasNext() { + return begin != end; + } + + value_type next() { + value_type x = *begin; + ++begin; + return x; + } +}; + +template +STLIterator getSTLIterator(Iterator begin, Iterator end) +{ + return STLIterator(begin, end); +} + + #endif /* __Metaiterators__ */ diff --git a/Makefile b/Makefile index 6e79bb5a1..f335fbb9a 100644 --- a/Makefile +++ b/Makefile @@ -273,6 +273,7 @@ VINF_OBJ=Inferences/BackwardDemodulation.o\ Inferences/SubVarSup.o\ Inferences/Factoring.o\ Inferences/FastCondensation.o\ + Inferences/FnDefRewriting.o\ Inferences/FOOLParamodulation.o\ Inferences/Injectivity.o\ Inferences/ForwardDemodulation.o\ @@ -350,6 +351,7 @@ VS_OBJ = Shell/AnswerExtractor.o\ Shell/EqualityProxyMono.o\ Shell/Flattening.o\ Shell/FunctionDefinition.o\ + Shell/FunctionDefinitionHandler.o\ Shell/GeneralSplitting.o\ Shell/GoalGuessing.o\ Shell/InequalitySplitting.o\ diff --git a/Parse/SMTLIB2.cpp b/Parse/SMTLIB2.cpp index 513d165c5..a0987b462 100644 --- a/Parse/SMTLIB2.cpp +++ b/Parse/SMTLIB2.cpp @@ -830,7 +830,7 @@ void SMTLIB2::readDefineFun(const vstring& name, LExprList* iArgs, LExpr* oSort, Formula* fla = new AtomicFormula(Literal::createEquality(true,lhs,rhs,rangeSort)); - FormulaUnit* fu = new FormulaUnit(fla, FromInput(UnitInputType::ASSUMPTION)); + FormulaUnit* fu = new FormulaUnit(fla, FromInput(UnitInputType::ASSUMPTION), true /*isFunctionDefinition*/); UnitList::push(fu, _formulas); } diff --git a/Saturation/SaturationAlgorithm.cpp b/Saturation/SaturationAlgorithm.cpp index dae29878b..249f09c82 100644 --- a/Saturation/SaturationAlgorithm.cpp +++ b/Saturation/SaturationAlgorithm.cpp @@ -61,6 +61,7 @@ #include "Inferences/FOOLParamodulation.hpp" #include "Inferences/Injectivity.hpp" #include "Inferences/Factoring.hpp" +#include "Inferences/FnDefRewriting.hpp" #include "Inferences/ForwardDemodulation.hpp" #include "Inferences/ForwardLiteralRewriting.hpp" #include "Inferences/ForwardSubsumptionAndResolution.hpp" @@ -338,6 +339,11 @@ void SaturationAlgorithm::tryUpdateFinalClauseCount() } } +void SaturationAlgorithm::setFunctionDefinitionHandler(FunctionDefinitionHandler* fnDefHandler) +{ + _fnDefHandler = fnDefHandler; +} + /** * Return true if the run of the prover so far is complete */ @@ -1543,6 +1549,7 @@ SaturationAlgorithm* SaturationAlgorithm::createFromOptions(Problem& prb, const if(opt.splitting()){ res->_splitter = new Splitter(); } + res->_fnDefHandler = prb.getFunctionDefinitionHandler(); // create generating inference engine CompositeGIE* gie=new CompositeGIE(); @@ -1633,6 +1640,10 @@ SaturationAlgorithm* SaturationAlgorithm::createFromOptions(Problem& prb, const gie->addFront(new InjectivityGIE()); } } + if (env.options->functionDefinitionRewriting()) { + gie->addFront(new FnDefRewriting()); + res->addForwardSimplifierToFront(new FnDefRewriting()); + } CompositeSGI* sgi = new CompositeSGI(); sgi->push(gie); diff --git a/Saturation/SaturationAlgorithm.hpp b/Saturation/SaturationAlgorithm.hpp index 4af640ae1..c82bb72f1 100644 --- a/Saturation/SaturationAlgorithm.hpp +++ b/Saturation/SaturationAlgorithm.hpp @@ -48,6 +48,7 @@ using namespace Lib; using namespace Kernel; using namespace Indexing; using namespace Inferences; +using namespace Shell; class ConsequenceFinder; class LabelFinder; @@ -127,6 +128,8 @@ class SaturationAlgorithm : public MainLoop static void tryUpdateFinalClauseCount(); Splitter* getSplitter() { return _splitter; } + FunctionDefinitionHandler* getFunctionDefinitionHandler() { return _fnDefHandler.ptr(); } + void setFunctionDefinitionHandler(FunctionDefinitionHandler* fnDefHandler); protected: virtual void init(); @@ -218,7 +221,7 @@ class SaturationAlgorithm : public MainLoop SymElOutput* _symEl; AnswerLiteralManager* _answerLiteralManager; Instantiation* _instantiation; - + ScopedPtr _fnDefHandler; SubscriptionData _passiveContRemovalSData; SubscriptionData _activeContRemovalSData; diff --git a/Shell/FunctionDefinitionHandler.cpp b/Shell/FunctionDefinitionHandler.cpp new file mode 100644 index 000000000..57510f520 --- /dev/null +++ b/Shell/FunctionDefinitionHandler.cpp @@ -0,0 +1,566 @@ +/* + * This file is part of the source code of the software program + * Vampire. It is protected by applicable + * copyright laws. + * + * This source code is distributed under the licence found here + * https://vprover.github.io/license.html + * and in the source directory + */ + +#include "FunctionDefinitionHandler.hpp" +#include "Inferences/InductionHelper.hpp" + +#include "Kernel/Matcher.hpp" +#include "Kernel/TermIterators.hpp" +#include "Kernel/FormulaUnit.hpp" +#include "Kernel/Signature.hpp" +#include "Kernel/SubstHelper.hpp" +#include "Kernel/Problem.hpp" +#include "Kernel/SubformulaIterator.hpp" + +#include "Lib/Hash.hpp" +#include "Lib/SharedSet.hpp" + +using namespace Inferences; +using namespace Kernel; +using namespace Lib; + +namespace Shell { + +void FunctionDefinitionHandler::preprocess(Problem& prb) +{ + CALL("FunctionDefinitionHandler::preprocess(Problem&)"); + UnitList::DelIterator it(prb.units()); + while (it.hasNext()) { + auto u = it.next(); + if (u->isClause()) { + continue; + } + auto fu = static_cast(u); + if (fu->isFunctionDefinition()) { + // if the definition could be processed and the function axioms + // will be used as rewrite rules, we remove the unit + Stack branches; + if (preprocess(fu->formula(), branches)) { + addFunction(branches, u); + if (env.options->functionDefinitionRewriting()) { + it.del(); + } + } + } + } +} + +bool FunctionDefinitionHandler::preprocess(Formula* f, Stack& branches) +{ + CALL("FunctionDefinitionHandler::preprocess(Formula*, Stack& branches)"); + ASS_EQ(f->connective(), LITERAL); + + auto l = f->literal(); + ASS(l->isEquality()); + + //TODO handle predicate definitions as well + ASS(l->nthArgument(0)->isTerm()); + auto header = l->nthArgument(0)->term(); + if (header->isSpecial()) { + // literal headers are nicely packed into multiple layers + ASS_EQ(header->getSpecialData()->getType(), Term::SF_FORMULA); + auto of = header->getSpecialData()->getFormula(); + ASS_EQ(of->connective(), LITERAL); + header = of->literal(); + } + Stack todos; + todos.push({ + .header = header, + .body = *l->nthArgument(1), + .literals = LiteralStack() + }); + while (todos.isNonEmpty()) { + auto b = todos.pop(); + if (b.body.isVar() || !b.body.term()->isSpecial()) { + branches.push(std::move(b)); + continue; + } + auto t = b.body.term(); + Term::SpecialTermData *sd = t->getSpecialData(); + switch (sd->getType()) { + case Term::SF_FORMULA: { + // only the atoms of formula bodies of bool + // functions are interesting, so save them + ASS(header->isLiteral()); + auto f = sd->getFormula(); + SubformulaIterator sfit(f); + while(sfit.hasNext()) { + Formula* sf = sfit.next(); + if(sf->connective()==LITERAL) { + Literal* l = sf->literal(); + b.literals.push(Literal::positiveLiteral(l)); + } + } + // f->collectAtoms(b.literals); + branches.push(std::move(b)); + break; + } + case Term::SF_LET: + case Term::SF_LET_TUPLE: + case Term::SF_TUPLE: { + return false; + } + + case Term::SF_ITE: { + auto cf = sd->getCondition(); + switch (cf->connective()) + { + case LITERAL: { + auto l = cf->literal(); + todos.push(addCondition(Literal::complementaryLiteral(l), b, *t->nthArgument(0))); + todos.push(addCondition(l, b, *t->nthArgument(1))); + break; + } + default: { + return false; + } + } + break; + } + + case Term::SF_MATCH: { + auto matched = *t->nthArgument(0); + for (unsigned int i = 1; i < t->arity(); i += 2) { + todos.push(substituteBoundVariable(matched.var(), *t->nthArgument(i), b, *t->nthArgument(i+1))); + } + break; + } + + default: + ASSERTION_VIOLATION_REP(t->toString()); + } + } + return true; +} + +void FunctionDefinitionHandler::addFunction(const Stack& branches, Unit* unit) +{ + CALL("FunctionDefinitionHandler::addFunction"); + ASS_REP(branches.isNonEmpty(), unit->toString()); + + auto fn = branches[0].header->functor(); + auto isLit = branches[0].header->isLiteral(); + auto symb = isLit ? env.signature->getPredicate(fn) : env.signature->getFunction(fn); + auto sort = isLit ? symb->predType()->result() : symb->fnType()->result(); + auto templ = new InductionTemplate(branches[0].header); + for (auto& b : branches) { + // handle for induction + vvector recursiveCalls; + if (isLit) { + for(const auto& lit : b.literals) { + if (!lit->isEquality() && fn == lit->functor()) { + recursiveCalls.push_back(lit->isPositive() ? lit : Literal::complementaryLiteral(lit)); + } + } + if (static_cast(b.header)->isNegative()) { + b.header = Literal::complementaryLiteral(static_cast(b.header)); + } + } else { + if (b.body.isTerm()) { + NonVariableIterator it(b.body.term(), true); + while (it.hasNext()) { + auto st = it.next(); + if (st.term()->functor() == fn) { + recursiveCalls.push_back(st.term()); + } + } + } + } + templ->addBranch(std::move(recursiveCalls), b.header); + + // handle for rewriting + if (!isLit && env.options->functionDefinitionRewriting()) { + auto mainLit = Literal::createEquality(true, TermList(b.header), b.body, sort); + b.literals.push(mainLit); + auto rwCl = Clause::fromStack(b.literals, FormulaTransformation(InferenceRule::CLAUSIFY,unit)); + rwCl->setSplits(SplitSet::getEmpty()); + rwCl->incRefCnt(); + _is.insert(TermList(b.header), mainLit, rwCl); + } + } + if (templ->finalize()) { + if (env.options->showInduction()){ + env.beginOutput(); + env.out() << "[Induction] " << (isLit ? "predicate " : "function ") << symb->name() << endl; + env.out() << ", with induction template: " << templ->toString() << endl; + env.endOutput(); + } + ALWAYS(_templates.insert(make_pair(make_pair(fn,!isLit), templ)).second); + } +} + +FunctionDefinitionHandler::Branch FunctionDefinitionHandler::substituteBoundVariable(unsigned var, TermList t, const Branch& b, TermList body) +{ + Substitution subst; + subst.bind(var, t); + + auto bn = b; + bn.body = SubstHelper::apply(body, subst); + bn.header = SubstHelper::apply(bn.header, subst); + for (auto& lit : bn.literals) { + lit = SubstHelper::apply(lit, subst); + } + return bn; +} + +FunctionDefinitionHandler::Branch FunctionDefinitionHandler::addCondition(Literal* lit, const Branch& b, TermList body) +{ + if (lit->isEquality() && lit->isNegative()) { + TermList lhs = *lit->nthArgument(0); + TermList rhs = *lit->nthArgument(1); + if (lhs.isVar() || rhs.isVar()) { + if (lhs.isTerm() && rhs.isVar()) { + swap(lhs,rhs); + } + return substituteBoundVariable(lhs.var(), rhs, b, body); + } + } + auto bn = b; + bn.body = body; + bn.literals.push(lit); + return bn; +} + +bool InductionTemplate::finalize() { + CALL("InductionTemplate::finalize"); + + if (!checkWellFoundedness() || !checkUsefulness()) { + return false; + } + + checkWellDefinedness(); + return true; +} + +void InductionTemplate::checkWellDefinedness() +{ + CALL("InductionTemplate::checkWellDefinedness"); + + vvector cases; + for (auto& b : _branches) { + cases.push_back(b._header); + } + vvector> missingCases; + InductionPreprocessor::checkWellDefinedness(cases, missingCases); + + if (!missingCases.empty()) { + if (env.options->showInduction()) { + env.beginOutput(); + env.out() << "% Warning: adding missing cases to template " << toString(); + } + for (const auto& m : missingCases) { + Stack args; + ASS_EQ(m.size(), _arity); + for(const auto& arg : m) { + args.push(arg); + } + Term* t; + if (_isLit) { + t = Literal::create(static_cast(_branches[0]._header), args.begin()); + } else { + t = Term::create(_functor, _arity, args.begin()); + } + addBranch(vvector(), std::move(t)); + } + if (env.options->showInduction()) { + env.out() << ". New template is " << toString() << endl; + env.endOutput(); + } + } +} + +bool InductionTemplate::matchesTerm(Term* t, vvector& inductionTerms) const +{ + CALL("InductionTemplate::matchesTerm"); + ASS(t->ground()); + inductionTerms.clear(); + for (unsigned i = 0; i < t->arity(); i++) { + auto arg = t->nthArgument(i)->term(); + auto f = arg->functor(); + if (_indPos[i]) { + if (!InductionHelper::isInductionTermFunctor(f) || + !InductionHelper::isStructInductionOn() || + !InductionHelper::isStructInductionTerm(arg)) { + return false; + } + auto it = std::find(inductionTerms.begin(),inductionTerms.end(),arg); + if (it != inductionTerms.end()) { + return false; + } + inductionTerms.push_back(arg); + } + } + return !inductionTerms.empty(); +} + +bool InductionTemplate::Branch::contains(const InductionTemplate::Branch& other) const +{ + CALL("InductionTemplate::Branch::contains"); + + RobSubstitution subst; + if (!subst.match(TermList(_header), 0, TermList(other._header), 1)) { + return false; + } + + for (auto recCall2 : other._recursiveCalls) { + bool found = false; + for (auto recCall1 : _recursiveCalls) { + Term* l1; + Term* l2; + if (_header->isLiteral()) { + l1 = subst.apply(static_cast(recCall1), 0); + l2 = subst.apply(static_cast(recCall2), 1); + } else { + l1 = subst.apply(TermList(recCall1), 0).term(); + l2 = subst.apply(TermList(recCall2), 1).term(); + } + if (l1 == l2) { + found = true; + break; + } + } + if (!found) { + return false; + } + } + return true; +} + +bool InductionTemplate::checkUsefulness() const +{ + CALL("InductionTemplate::checkUsefulness"); + + // discard templates without inductive argument positions: + // this happens either when there are no recursive calls + // or none of the arguments change in any recursive call + bool discard = true; + for (const auto& p : _indPos) { + if (p) { + discard = false; + } + } + return !discard; +} + +bool InductionTemplate::checkWellFoundedness() +{ + CALL("InductionTemplate::checkWellFoundedness"); + + // fill in bit vector of induction variables + vvector> relatedTerms; + for (auto& b : _branches) { + for (auto& r : b._recursiveCalls) { + relatedTerms.push_back(make_pair(b._header, r)); + for (unsigned i = 0; i < _arity; i++) { + if (env.signature->isTermAlgebraSort(_type->arg(i))) { + _indPos[i] = _indPos[i] || (*b._header->nthArgument(i) != *r->nthArgument(i)); + } + } + } + } + return true; + // return InductionPreprocessor::checkWellFoundedness(relatedTerms); +} + +InductionTemplate::InductionTemplate(const Term* t) + : _functor(t->functor()), _arity(t->arity()), _isLit(t->isLiteral()), + _type(_isLit ? env.signature->getPredicate(_functor)->predType() + : env.signature->getFunction(_functor)->fnType()), + _branches(), _indPos(_arity, false) {} + +void InductionTemplate::addBranch(vvector&& recursiveCalls, Term* header) +{ + CALL("InductionTemplate::addBranch"); + + ASS(header->arity() == _arity && header->isLiteral() == _isLit && header->functor() == _functor); + Branch branch(std::move(recursiveCalls), std::move(header)); + for (auto b : _branches) { + if (b.contains(branch)) { + return; + } + } + _branches.erase(remove_if(_branches.begin(), _branches.end(), + [&branch](const Branch& b) { + return branch.contains(b); + }), _branches.end()); + _branches.push_back(std::move(branch)); +} + +vstring InductionTemplate::toString() const +{ + vstringstream str; + str << "Branches: "; + unsigned n = 0; + for (const auto& b : _branches) { + if (!b._recursiveCalls.empty()) { + str << "("; + unsigned n = 0; + for (const auto& r : b._recursiveCalls) { + str << *r; + if (++n < b._recursiveCalls.size()) { + str << " & "; + } + } + str << ") => "; + } + str << *b._header; + if (++n < _branches.size()) { + str << "; "; + } + } + str << " with positions: ("; + for (unsigned i = 0; i < _arity; i++) { + if (_indPos[i]) { + str << "i"; + } else { + str << "0"; + } + if (i+1 < _arity) { + str << ","; + } + } + str << ")"; + return str.str(); +} + +bool checkWellFoundednessHelper(const vvector>& relatedTerms, + const vset& indices, const vset& positions) +{ + CALL("checkWellFoundednessHelper"); + + if (indices.empty()) { + return true; + } + if (positions.empty()) { + return false; + } + for (const auto& p : positions) { + vset newInd; + bool canOrder = true; + for (const auto& i : indices) { + auto arg1 = *relatedTerms[i].first->nthArgument(p); + auto arg2 = *relatedTerms[i].second->nthArgument(p); + if (arg1 == arg2) { + newInd.insert(i); + } else if (!arg1.containsSubterm(arg2)) { + canOrder = false; + break; + } + } + if (canOrder) { + auto newPos = positions; + newPos.erase(p); + if (checkWellFoundednessHelper(relatedTerms, newInd, newPos)) { + return true; + } + } + } + return false; +} + +bool InductionPreprocessor::checkWellFoundedness(const vvector>& relatedTerms) +{ + CALL("static InductionPreprocessor::checkWellFoundedness"); + + if (relatedTerms.empty()) { + return true; + } + auto t = relatedTerms[0].first; + bool isFun = !t->isLiteral(); + auto fn = t->functor(); + auto arity = t->arity(); + OperatorType* type; + if (isFun) { + type = env.signature->getFunction(fn)->fnType(); + } else { + type = env.signature->getPredicate(fn)->predType(); + } + vset positions; + for (unsigned i = 0; i < arity; i++) { + if (env.signature->isTermAlgebraSort(type->arg(i))) { + positions.insert(i); + } + } + vset indices; + for (unsigned i = 0; i < relatedTerms.size(); i++) { + indices.insert(i); + } + return checkWellFoundednessHelper(relatedTerms, indices, positions); +} + +bool InductionPreprocessor::checkWellDefinedness(const vvector& cases, vvector>& missingCases) +{ + CALL("InductionPreprocessor::checkWellFoundedness"); + return true; + + // if (cases.empty()) { + // return false; + // } + // missingCases.clear(); + // auto arity = cases[0]->arity(); + // if (arity == 0) { + // return true; + // } + // vvector> availableTermsLists; + // availableTermsLists.emplace_back(arity); + // unsigned var = 0; + // for (unsigned i = 0; i < arity; i++) { + // availableTermsLists.back()[i].push(TermList(var++, false)); + // } + + // for (auto& c : cases) { + // vvector> nextAvailableTermsLists; + // for (unsigned i = 0; i < arity; i++) { + // auto arg = *c->nthArgument(i); + // // we check lazily for non-term algebra sort non-variables + // if (arg.isTerm() && env.signature->isTermAlgebraSort(SortHelper::getResultSort(arg.term()))) { + // auto tempLists = availableTermsLists; + // for (auto& availableTerms : tempLists) { + // TermAlgebra::excludeTermFromAvailables(availableTerms[i], arg, var); + // } + // nextAvailableTermsLists.insert(nextAvailableTermsLists.end(), + // tempLists.begin(), tempLists.end()); + // } else { + // for (const auto& availableTerms : availableTermsLists) { + // if (!availableTerms[i].isEmpty()) { + // break; + // } + // } + // } + // } + // availableTermsLists = nextAvailableTermsLists; + // } + + // for (const auto& availableTerms : availableTermsLists) { + // bool valid = true; + // vvector> argTuples(1); + // for (const auto& v : availableTerms) { + // if (v.isEmpty()) { + // valid = false; + // break; + // } + // vvector> temp; + // for (const auto& e : v) { + // for (auto a : argTuples) { + // a.push_back(e); + // temp.push_back(a); + // } + // } + // argTuples = temp; + // } + // if (valid) { + // missingCases.insert(missingCases.end(), + // argTuples.begin(), argTuples.end()); + // } + // } + // return missingCases.empty(); +} + +} // Shell diff --git a/Shell/FunctionDefinitionHandler.hpp b/Shell/FunctionDefinitionHandler.hpp new file mode 100644 index 000000000..17fd7a296 --- /dev/null +++ b/Shell/FunctionDefinitionHandler.hpp @@ -0,0 +1,124 @@ +/* + * This file is part of the source code of the software program + * Vampire. It is protected by applicable + * copyright laws. + * + * This source code is distributed under the licence found here + * https://vprover.github.io/license.html + * and in the source directory + */ +/** + * @file FunctionDefinitionHandler.hpp + * Defines helper classes for induction templates and preprocessing + */ + +#ifndef __FunctionDefinitionHandler__ +#define __FunctionDefinitionHandler__ + +#include "Forwards.hpp" +#include "Indexing/TermSubstitutionTree.hpp" +#include "Kernel/TermTransformer.hpp" +#include "TermAlgebra.hpp" +#include "Lib/STL.hpp" + +namespace Shell { + +using namespace Indexing; +using namespace Kernel; +using namespace Lib; + +/** + * Corresponds to the branches of a function definition. + * Stores the branches and the active positions + * (i.e. the changing arguments) of the function. + */ +struct InductionTemplate { + CLASS_NAME(InductionTemplate); + USE_ALLOCATOR(InductionTemplate); + InductionTemplate(const Term* t); + + void addBranch(vvector&& recursiveCalls, Term* header); + bool finalize(); + const vvector& inductionPositions() const { return _indPos; } + bool matchesTerm(Term* t, vvector& inductionTerms) const; + + /** + * Stores the template for a recursive case + * This includes: + * - the step case + * - the recursive calls + * (if not present it is a base case) + */ + struct Branch { + Branch(vvector&& recursiveCalls, Term*&& header) + : _recursiveCalls(recursiveCalls), _header(header) {} + + bool contains(const Branch& other) const; + + vvector _recursiveCalls; + Term* _header; + }; + + const vvector& branches() const { return _branches; } + + vstring toString() const; + + const unsigned _functor; + const unsigned _arity; + const bool _isLit; + const OperatorType* _type; + +private: + bool checkUsefulness() const; + bool checkWellFoundedness(); + void checkWellDefinedness(); + + vvector _branches; + vvector _indPos; +}; + +class FunctionDefinitionHandler +{ +public: + CLASS_NAME(FunctionDefinitionHandler); + USE_ALLOCATOR(FunctionDefinitionHandler); + + struct Branch { + Term* header; + TermList body; + LiteralStack literals; + }; + + void preprocess(Problem& prb); + bool preprocess(Formula* f, Stack& branches); + void addFunction(const Stack& branches, Unit* unit); + + TermQueryResultIterator getGeneralizations(TermList t) { + return _is.getGeneralizations(t, true); + } + + InductionTemplate* getInductionTemplate(unsigned fn, bool trueFun) { + auto it = _templates.find(make_pair(fn, trueFun)); + return it == _templates.end() ? nullptr : it->second; + } + +private: + Branch substituteBoundVariable(unsigned var, TermList t, const Branch& b, TermList body); + Branch addCondition(Literal* lit, const Branch& b, TermList body); + + TermSubstitutionTree _is; + vmap, InductionTemplate*> _templates; +}; + +/** + * This class generates the induction templates based on + * the marked recursive function definitions from the parser. + */ +struct InductionPreprocessor { + static bool checkWellFoundedness(const vvector>& relatedTerms); + static bool checkWellDefinedness(const vvector& cases, vvector>& missingCases); +}; + +} // Shell + +#endif diff --git a/Shell/Options.cpp b/Shell/Options.cpp index 12e79f78b..0b4199c55 100644 --- a/Shell/Options.cpp +++ b/Shell/Options.cpp @@ -1304,7 +1304,7 @@ void Options::init() //_induction.setRandomChoices _structInduction = ChoiceOptionValue("structural_induction_kind","sik", - StructuralInductionKind::ONE,{"one","two","three","all"}); + StructuralInductionKind::ONE,{"one","two","three","recursion","all"}); _structInduction.description="The kind of structural induction applied"; _structInduction.tag(OptionTag::INFERENCES); _structInduction.onlyUsefulWith(Or(_induction.is(equal(Induction::STRUCTURAL)),_induction.is(equal(Induction::BOTH)))); @@ -1377,6 +1377,11 @@ void Options::init() _inductionOnComplexTerms.onlyUsefulWith(_induction.is(notEqual(Induction::NONE))); _lookup.insert(&_inductionOnComplexTerms); + _functionDefinitionRewriting = BoolOptionValue("function_definition_rewriting","fnrw",false); + _functionDefinitionRewriting.description = "Use function definitions as rewrite rules with the intended orientation rather than the term ordering one"; + _functionDefinitionRewriting.tag(OptionTag::INFERENCES); + _lookup.insert(&_functionDefinitionRewriting); + _integerInductionDefaultBound = BoolOptionValue("int_induction_default_bound","intinddb",false); _integerInductionDefaultBound.description = "Always apply integer induction with bound 0"; _integerInductionDefaultBound.tag(OptionTag::INFERENCES); @@ -1458,6 +1463,12 @@ void Options::init() _nonUnitInduction.reliesOn(_induction.is(notEqual(Induction::NONE))); _lookup.insert(&_nonUnitInduction); + _inductionOnActiveOccurrences = BoolOptionValue("induction_on_active_occurrences","indao",false); + _inductionOnActiveOccurrences.description = "Only use induction terms from active occurrences, generalize over active occurrences"; + _inductionOnActiveOccurrences.tag(OptionTag::INFERENCES); + _inductionOnActiveOccurrences.reliesOn(_induction.is(notEqual(Induction::NONE))); + _lookup.insert(&_inductionOnActiveOccurrences); + _instantiation = ChoiceOptionValue("instantiation","inst",Instantiation::OFF,{"off","on"}); _instantiation.description = "Heuristically instantiate variables. Often wastes a lot of effort. Consider using thi instead."; _instantiation.tag(OptionTag::INFERENCES); diff --git a/Shell/Options.hpp b/Shell/Options.hpp index 2d76db699..7100f22d3 100644 --- a/Shell/Options.hpp +++ b/Shell/Options.hpp @@ -235,6 +235,7 @@ class Options ONE, TWO, THREE, + RECURSION, ALL }; enum class IntInductionKind : unsigned int { @@ -2340,15 +2341,18 @@ bool _hard; bool inductionNegOnly() const { return _inductionNegOnly.actualValue; } bool inductionUnitOnly() const { return _inductionUnitOnly.actualValue; } bool inductionGen() const { return _inductionGen.actualValue; } + bool inductionGenHeur() const { return _inductionGenHeur.actualValue; } bool inductionStrengthenHypothesis() const { return _inductionStrengthenHypothesis.actualValue; } unsigned maxInductionGenSubsetSize() const { return _maxInductionGenSubsetSize.actualValue; } bool inductionOnComplexTerms() const {return _inductionOnComplexTerms.actualValue;} + bool functionDefinitionRewriting() const { return _functionDefinitionRewriting.actualValue; } bool integerInductionDefaultBound() const { return _integerInductionDefaultBound.actualValue; } IntegerInductionInterval integerInductionInterval() const { return _integerInductionInterval.actualValue; } IntegerInductionLiteralStrictness integerInductionStrictnessEq() const {return _integerInductionStrictnessEq.actualValue; } IntegerInductionLiteralStrictness integerInductionStrictnessComp() const {return _integerInductionStrictnessComp.actualValue; } IntegerInductionTermStrictness integerInductionStrictnessTerm() const {return _integerInductionStrictnessTerm.actualValue; } bool nonUnitInduction() const { return _nonUnitInduction.actualValue; } + bool inductionOnActiveOccurrences() const { return _inductionOnActiveOccurrences.actualValue; } float instGenBigRestartRatio() const { return _instGenBigRestartRatio.actualValue; } bool instGenPassiveReactivation() const { return _instGenPassiveReactivation.actualValue; } @@ -2654,15 +2658,18 @@ bool _hard; BoolOptionValue _inductionNegOnly; BoolOptionValue _inductionUnitOnly; BoolOptionValue _inductionGen; + BoolOptionValue _inductionGenHeur; BoolOptionValue _inductionStrengthenHypothesis; UnsignedOptionValue _maxInductionGenSubsetSize; BoolOptionValue _inductionOnComplexTerms; + BoolOptionValue _functionDefinitionRewriting; BoolOptionValue _integerInductionDefaultBound; ChoiceOptionValue _integerInductionInterval; ChoiceOptionValue _integerInductionStrictnessEq; ChoiceOptionValue _integerInductionStrictnessComp; ChoiceOptionValue _integerInductionStrictnessTerm; BoolOptionValue _nonUnitInduction; + BoolOptionValue _inductionOnActiveOccurrences; StringOptionValue _latexOutput; BoolOptionValue _latexUseDefaultSymbols; diff --git a/Shell/Preprocess.cpp b/Shell/Preprocess.cpp index e33d65a83..59c62845c 100644 --- a/Shell/Preprocess.cpp +++ b/Shell/Preprocess.cpp @@ -33,6 +33,7 @@ #include "Flattening.hpp" #include "FunctionDefinition.hpp" #include "GeneralSplitting.hpp" +#include "FunctionDefinitionHandler.hpp" #include "InequalitySplitting.hpp" #include "InterpretedNormalizer.hpp" #include "Naming.hpp" @@ -139,6 +140,10 @@ void Preprocess::preprocess(Problem& prb) } } + auto fnDefHandler = new FunctionDefinitionHandler(); + fnDefHandler->preprocess(prb); + prb.addFunctionDefinitionHandler(fnDefHandler); + if (prb.hasFOOL() || prb.higherOrder()) { // This is the point to extend the signature with $$true and $$false // If we don't have fool then these constants get in the way (a lot) diff --git a/Shell/Skolem.cpp b/Shell/Skolem.cpp index 74ddada8e..d06cdf789 100644 --- a/Shell/Skolem.cpp +++ b/Shell/Skolem.cpp @@ -561,7 +561,7 @@ Formula* Skolem::skolemise (Formula* f) } #if VDEBUG - ASS(first_pass || sym == last_sym+1); + // ASS(first_pass || sym == last_sym+1); last_sym = sym; #endif // in case we are reusing and there is more than one f->vars() in the block diff --git a/Shell/TermAlgebra.cpp b/Shell/TermAlgebra.cpp index 4dee498db..4781117d2 100644 --- a/Shell/TermAlgebra.cpp +++ b/Shell/TermAlgebra.cpp @@ -11,6 +11,9 @@ #include "Kernel/Formula.hpp" #include "Kernel/FormulaUnit.hpp" #include "Kernel/Inference.hpp" +#include "Kernel/Matcher.hpp" +#include "Kernel/SortHelper.hpp" +#include "Kernel/SubstHelper.hpp" #include "Kernel/Signature.hpp" #include "Kernel/SubstHelper.hpp" @@ -246,6 +249,79 @@ void TermAlgebra::getTypeSub(Term* sort, Substitution& subst) } } +class Binder +{ +public: + TermList apply(unsigned var) { + TermList res; + if(!_map.find(var, res)) { + res = TermList(var, false); + } + return res; + } + + bool bind(unsigned var, TermList term) + { + TermList* aux; + return _map.getValuePtr(var,aux,term) || *aux==term; + } + + void specVar(unsigned var, TermList term) + { ASSERTION_VIOLATION; } + + DHMap _map; +}; + +void TermAlgebra::excludeTermFromAvailables(TermStack& availables, TermList e, unsigned& var) +{ + ASS(e.isTerm() && !e.term()->isLiteral()); + NonVariableIterator nvi(e.term(), true); + while (nvi.hasNext()) { + auto symb = env.signature->getFunction(nvi.next().term()->functor()); + if (!symb->termAlgebraCons() && !symb->termAlgebraDest()) { + return; // we cannot exclude anything non-ctor/dtor + } + } + TermStack temp; + while (availables.isNonEmpty()) { + auto p = availables.pop(); + Binder subst; + // if e is an instance of p, the remaining + // instances of p are added + if (MatchingUtils::matchTerms(p, e, subst)) { + auto items = subst._map.items(); + Substitution s; + while (items.hasNext()) { + auto kv = items.next(); + s.reset(); + if (kv.second.isTerm()) { + const auto ta = env.signature->getTermAlgebraOfSort(SortHelper::getResultSort(kv.second.term())); + if (!ta) { + continue; // not term algebra sort + } + TermStack argTerms; + for (unsigned i = 0; i < ta->nConstructors(); i++) { + TermAlgebraConstructor *c = ta->constructor(i); + argTerms.reset(); + + for (unsigned j = 0; j < c->arity(); j++) { + argTerms.push(TermList(var++, false)); + } + + s.rebind(kv.first, TermList(Term::create(c->functor(), argTerms.size(), argTerms.begin()))); + availables.push(SubstHelper::apply(p, s)); + } + } + } + } + // otherwise if p is not an instance of e, p is added back + else if (!MatchingUtils::matchTerms(e, p, subst)) { + temp.push(p); + } + } + availables.loadFromIterator(temp.iter()); +} + std::ostream& operator<<(std::ostream& out, TermAlgebraConstructor const& self) { return out << "ctor " << env.signature->getFunction(self.functor())->name(); } diff --git a/Shell/TermAlgebra.hpp b/Shell/TermAlgebra.hpp index 7baf8891e..a0594cce4 100644 --- a/Shell/TermAlgebra.hpp +++ b/Shell/TermAlgebra.hpp @@ -164,6 +164,8 @@ namespace Shell { unsigned getSubtermPredicate(); void getTypeSub(Kernel::Term* t, Kernel::Substitution& subst); + static void excludeTermFromAvailables(Kernel::TermStack& availables, Kernel::TermList e, unsigned& var); + friend std::ostream& operator<<(std::ostream& out, TermAlgebra const& self); private: TermList _sort; diff --git a/Test/GenerationTester.hpp b/Test/GenerationTester.hpp index b9fc94feb..04e4f193a 100644 --- a/Test/GenerationTester.hpp +++ b/Test/GenerationTester.hpp @@ -63,6 +63,7 @@ class TestCase; template class GenerationTester { +protected: Rule _rule; public: @@ -87,6 +88,7 @@ class TestCase Stack _context; bool _premiseRedundant; Stack _indices; + std::function _setup = [](SaturationAlgorithm&){}; OptionMap _options; Stack _preConditions; Stack _postConditions; @@ -119,6 +121,7 @@ class TestCase BUILDER_METHOD(bool, premiseRedundant) BUILDER_METHOD(SimplifyingGeneratingInference*, rule) BUILDER_METHOD(Stack, indices) + BUILDER_METHOD(std::function, setup) BUILDER_METHOD(OptionMap, options) BUILDER_METHOD(Stack, preConditions) BUILDER_METHOD(Stack, postConditions) @@ -135,6 +138,7 @@ class TestCase env.options->set(kv.first, kv.second); } MockedSaturationAlgorithm alg(p, o); + _setup(alg); SimplifyingGeneratingInference& rule = *_rule.unwrapOrElse([&](){ return &simpl._rule; }); rule.setTestIndices(_indices); rule.InferenceEngine::attach(&alg); diff --git a/Test/SyntaxSugar.hpp b/Test/SyntaxSugar.hpp index b2dd4455b..512ff962c 100644 --- a/Test/SyntaxSugar.hpp +++ b/Test/SyntaxSugar.hpp @@ -32,8 +32,10 @@ #include "Indexing/TermSharing.hpp" #include "Kernel/Signature.hpp" +#include "Kernel/TermIterators.hpp" #include "Kernel/OperatorType.hpp" #include "Shell/TermAlgebra.hpp" +#include "Shell/FunctionDefinitionHandler.hpp" #define __TO_SORT_RAT RationalConstantType::getSort() #define __TO_SORT_INT IntegerConstantType::getSort() @@ -431,6 +433,11 @@ class Lit l._selected = true; return l; } + + TermSugar wrapInTerm() + { + return TermSugar(TermList(_lit)); + } }; inline TermSugar frac(int a, int b) @@ -689,6 +696,10 @@ inline Stack clauses(std::initializer_list> } inline void createTermAlgebra(SortSugar sort, initializer_list fs) { + // avoid redeclaration + if (env.signature->isTermAlgebraSort(sort.sugaredExpr())) { + return; + } using namespace Shell; diff --git a/UnitTests/tFnDefRewriting.cpp b/UnitTests/tFnDefRewriting.cpp new file mode 100644 index 000000000..8924be3e7 --- /dev/null +++ b/UnitTests/tFnDefRewriting.cpp @@ -0,0 +1,127 @@ +/* + * This file is part of the source code of the software program + * Vampire. It is protected by applicable + * copyright laws. + * + * This source code is distributed under the licence found here + * https://vprover.github.io/license.html + * and in the source directory + */ + + +#include "Test/UnitTesting.hpp" +#include "Test/SyntaxSugar.hpp" +#include "Test/TestUtils.hpp" +#include "Test/GenerationTester.hpp" + +#include "Kernel/FormulaUnit.hpp" + +#include "Shell/FunctionDefinitionHandler.hpp" + +#include "Inferences/FnDefRewriting.hpp" + +using namespace Test; + +REGISTER_GEN_TESTER(FnDefRewriting) + +/** + * NECESSARY: We neet to tell the tester which syntax sugar to import for creating terms & clauses. + * See Test/SyntaxSugar.hpp for which kinds of syntax sugar are available + */ +#define MY_SYNTAX_SUGAR \ + DECL_DEFAULT_VARS \ + DECL_SORT(s) \ + DECL_CONST(b, s) \ + DECL_FUNC(r, {s}, s) \ + DECL_TERM_ALGEBRA(s, {b, r}) \ + DECL_FUNC(f, {s, s}, s) \ + DECL_FUNC(g, {s}, s) \ + DECL_PRED(p, {s}) + +auto setup = [](SaturationAlgorithm& salg) { + __ALLOW_UNUSED(MY_SYNTAX_SUGAR); + salg.setFunctionDefinitionHandler(new Shell::FunctionDefinitionHandler()); + + std::initializer_list>>> functionDefs = + { + { + { f(b,y), y, { } }, + { f(r(x),y), f(x,r(y)), { x != b() } }, + { f(r(x),y), f(x,y), { x == r(b()) } }, + }, + { + { g(b()), f(b(),b()), { } }, + { g(r(r(x))),f(r(x),g(x)), { p(x), x != b() } }, + } + }; + auto fu = new FormulaUnit(nullptr, FromInput(UnitInputType::AXIOM)); + for (const auto& fd : functionDefs) { + Stack st; + for (const auto& t : fd) { + LiteralStack lits; + for (const auto& l : get<2>(t)) { + lits.push(l); + } + st.push({ get<0>(t).sugaredExpr().term(), get<1>(t).sugaredExpr(), lits }); + } + salg.getFunctionDefinitionHandler()->addFunction(st, fu); + } +}; + +TEST_GENERATION(test_01, + Generation::TestCase() + .setup(setup) + .input( clause({ b != f(b, y), p(x) })) + .expected(exactly( + clause({ b != y, p(x) }) + )) + ) + +TEST_GENERATION(test_02, + Generation::TestCase() + .setup(setup) + .input( clause({ g(b) == g(r(x)), p(x) })) + .expected(exactly( + clause({ f(b,b) == g(r(x)), p(x) }) + )) + ) + +// no rewrites (matching is used instead of unification) +TEST_GENERATION(test_03, + Generation::TestCase() + .setup(setup) + .input( clause({ g(r(x)) == f(x, r(x)) })) + .expected(none()) + ) + +// multiple rewritten positions in a literal and multiple rewrite rules +TEST_GENERATION(test_04, + Generation::TestCase() + .setup(setup) + .input( clause({ f(r(b),f(b, y)) == f(y, r(y)) })) + .expected({ + clause({ f(r(b),y) == f(y, r(y)) }), + clause({ f(b,f(b, y)) == f(y, r(y)), b == r(b)}), + clause({ f(b,r(f(b, y))) == f(y, r(y)), b != b}) + }) + ) + +// each literal is rewritten in a clause +TEST_GENERATION(test_05, + Generation::TestCase() + .setup(setup) + .input( clause({ g(r(r(r(b)))) != b, g(b) == b })) + .expected({ + clause({ f(r(r(b)),g(r(b))) != b, g(b) == b, p(r(b)), r(b) != b() }), + clause({ g(r(r(r(b)))) != b, f(b,b) != b }) + }) + ) + +// equational tautologies are discarded +TEST_GENERATION(test_06, + Generation::TestCase() + .setup(setup) + .input( clause({ f(b,b) == b })) + .expected(none()) + ) diff --git a/UnitTests/tFunctionDefinitionHandler.cpp b/UnitTests/tFunctionDefinitionHandler.cpp new file mode 100644 index 000000000..069cfcddd --- /dev/null +++ b/UnitTests/tFunctionDefinitionHandler.cpp @@ -0,0 +1,285 @@ +/* + * This file is part of the source code of the software program + * Vampire. It is protected by applicable + * copyright laws. + * + * This source code is distributed under the licence found here + * https://vprover.github.io/license.html + * and in the source directory + */ + +#include "Test/UnitTesting.hpp" +#include "Test/SyntaxSugar.hpp" + +#include "Kernel/FormulaUnit.hpp" + +#include "Shell/FunctionDefinitionHandler.hpp" + +using namespace Shell; + +#define MY_SYNTAX_SUGAR \ + DECL_DEFAULT_VARS \ + DECL_VAR(x2, 2) \ + DECL_VAR(x3, 3) \ + DECL_VAR(x4, 4) \ + DECL_VAR(x5, 5) \ + DECL_VAR(x6, 6) \ + DECL_VAR(x7, 7) \ + DECL_VAR(x8, 8) \ + DECL_VAR(x9, 9) \ + DECL_VAR(x10, 10) \ + DECL_VAR(x11, 11) \ + DECL_SORT(s) \ + DECL_SORT(u) \ + DECL_CONST(b, s) \ + DECL_FUNC(r, {s}, s) \ + DECL_TERM_ALGEBRA(s, {b, r}) \ + DECL_CONST(b1, u) \ + DECL_CONST(b2, u) \ + DECL_FUNC(r1, {s, u}, u) \ + DECL_FUNC(r2, {u, s}, u) \ + DECL_TERM_ALGEBRA(u, {b1, b2, r1, r2}) \ + DECL_FUNC(f, {s, s}, s) \ + DECL_FUNC(g, {s}, s) \ + DECL_FUNC(h, {s, s, u}, u) \ + DECL_PRED(p, {s}) \ + DECL_PRED(q, {u, s}) + +using FunctionDefs = std::initializer_list>>>; + +inline void addFunctionDefs(FunctionDefinitionHandler& handler, FunctionDefs functionDefs) { + auto fu = new FormulaUnit(nullptr, FromInput(UnitInputType::AXIOM)); + for (const auto& fd : functionDefs) { + Stack st; + for (const auto& t : fd) { + LiteralStack lits; + for (const auto& l : get<2>(t)) { + lits.push(l); + } + st.push({ get<0>(t).sugaredExpr().term(), get<1>(t).sugaredExpr(), lits }); + } + handler.addFunction(st, fu); + } +} + +inline void checkTemplateBranches(FunctionDefinitionHandler& handler, const PredSugar& p, const vvector>>& v) { + auto templ = handler.getInductionTemplate(p.functor(), false); + ASS(templ); + auto b = templ->branches(); + ASS_EQ(b.size(), v.size()); + TermList t; + for (unsigned i = 0; i < b.size(); i++) { + ASS_REP(b[i]._header == v[i].first, b[i]._header->toString() + " " + v[i].first->toString()); + auto r = b[i]._recursiveCalls; + ASS_EQ(r.size(), v[i].second.size()); + for (unsigned j = 0; j < r.size(); j++) { + ASS_REP(r[j] == v[i].second[j], r[j]->toString() + " " + v[i].second[j]->toString()); + } + } +} + +inline void checkTemplateBranches(FunctionDefinitionHandler& handler, const FuncSugar& f, const vvector>>& p) { + auto templ = handler.getInductionTemplate(f.functor(), true); + ASS(templ); + auto b = templ->branches(); + ASS_EQ(b.size(), p.size()); + TermList t; + for (unsigned i = 0; i < b.size(); i++) { + ASS_EQ(b[i]._header, p[i].first.sugaredExpr().term()); + auto r = b[i]._recursiveCalls; + ASS_EQ(r.size(), p[i].second.size()); + for (unsigned j = 0; j < r.size(); j++) { + ASS_EQ(r[j], p[i].second[j].sugaredExpr().term()); + } + } +} + +// not well-founded functions +TEST_FUN(test_01) { + __ALLOW_UNUSED(MY_SYNTAX_SUGAR) + FunctionDefinitionHandler handler; + addFunctionDefs(handler, { + { { f(r(x), r(y)), f(f(x, r(r(y))), y), { } } }, + { { g(r(x)), g(f(x,x)), { } } }, + { { h(x, y, r1(x, z)), h(y, y, z), { } }, + { h(r(x), y, z), h(x, x, r2(y,z)), { } } }, + { { p(r(r(x))).wrapInTerm(), /*unused*/b(), { p(y) } } }, + { { q(r1(x,y),r(z)).wrapInTerm(), /*unused*/b(), { q(y,r(z)), g(b) == b, q(z,b) } } }, + }); + + ASS(!handler.getInductionTemplate(f.functor(), true)); + ASS(!handler.getInductionTemplate(g.functor(), true)); + ASS(!handler.getInductionTemplate(h.functor(), true)); + ASS(!handler.getInductionTemplate(p.functor(), false)); + ASS(!handler.getInductionTemplate(q.functor(), false)); +} + +// not useful functions (either no recursive calls or no argument changes in any recursive call) +TEST_FUN(test_02) { + __ALLOW_UNUSED(MY_SYNTAX_SUGAR) + FunctionDefinitionHandler handler; + addFunctionDefs(handler, { + { { f(x, r(y)), g(f(x, r(y))), { } }, + { f(x, b), b, { } } }, + { { g(x), b, { } } } + }); + + ASS(!handler.getInductionTemplate(f.functor(), true)); + ASS(!handler.getInductionTemplate(g.functor(), true)); +} + +// adds missing cases +TEST_FUN(test_03) { + __ALLOW_UNUSED(MY_SYNTAX_SUGAR) + FunctionDefinitionHandler handler; + addFunctionDefs(handler, { + { { f(r(x), r(y)), f(x,y), { } }, + { f(x,b), b, { } } }, + + { { g(r(r(x))), g(x), { } } }, + + { { h(b, x, y), b1, { } }, + { h(r(x), b, y), b2, { } }, + { h(r(x), b, r1(y,z)), h(x, b, z), { } } }, + + { { p(r(r(x))).wrapInTerm(), /*unused*/b(), { ~p(x) } }, + { p(b).wrapInTerm(), /*unused*/b(), { f(b,b) == b } } }, + + { { q(y,r(r(x))).wrapInTerm(), /*unused*/b(), { ~q(y,x) } }, + { (~q(r2(r1(x,y),z),b)).wrapInTerm(), /*unused*/b(), { } } } + }); + + checkTemplateBranches(handler, f, { + { f(r(x),r(y)), { f(x,y) } }, + { f(x,b), { } }, + { f(b,r(x4)), { } } // added + }); + + checkTemplateBranches(handler, g, { + { g(r(r(x))), { g(x) } }, + { g(b), { } }, // added + { g(r(b)), { } }, // added + }); + + checkTemplateBranches(handler, h, { + { h(b, x, y), { } }, + { h(r(x), b, y), { } }, + { h(r(x), b, r1(y,z)), { h(x, b, z) } }, + { h(r(x3), r(x4), x2), { } } // added + }); + + checkTemplateBranches(handler, p, { + { p(r(r(x))), { p(x) } }, + { p(b), { } }, + { p(r(b)), { } } // added + }); + + checkTemplateBranches(handler, q, { + { q(y,r(r(x))), { q(y,x) } }, + { q(r2(r1(x,y),z),b), { } }, + { q(b1,b), { } }, // added + { q(b2,b), { } }, // added + { q(r1(x4,x5),b), { } }, // added + { q(r2(b1,x7),b), { } }, // added + { q(r2(b2,x7),b), { } }, // added + { q(r2(r2(x10,x11),x7),b), { } }, // added + { q(x,r(b)), { } } // added + }); +} + +// correctly merges branches +TEST_FUN(test_04) { + __ALLOW_UNUSED(MY_SYNTAX_SUGAR) + FunctionDefinitionHandler handler; + addFunctionDefs(handler, { + { { f(r(x), r(y)), f(x,y), { } }, + { f(r(x),r(x)), f(x,x), { } }, + { f(b,x), b, { } }, + { f(r(x),b), g(x), { } } }, + + { { g(r(r(x))), g(r(x)), { } }, + { g(r(r(x))), g(x), { } }, + { g(r(b)), b, { } }, + { g(b), b, { } } }, + + { { h(b, x, y), b1, { } }, + { h(r(x), y, z), h(x, y, z), { } }, + { h(r(x), z, y), h(x, z, y), { } } }, + + { { p(r(r(x))).wrapInTerm(), /*unused*/b(), { ~p(x) } }, + { p(r(r(x))).wrapInTerm(), /*unused*/b(), { ~p(r(x)) } }, + { p(b).wrapInTerm(), /*unused*/b(), { } } }, + + { { (~q(y,r(x))).wrapInTerm(), /*unused*/b(), { ~q(y,x) } }, + { (~q(y,b)).wrapInTerm(), /*unused*/b(), { } }, + { q(z,r(b)).wrapInTerm(), /*unused*/b(), { q(z,b) } } } + }); + + checkTemplateBranches(handler, f, { + { f(r(x),r(y)), { f(x,y) } }, + { f(b,x), { } }, + { f(r(x),b), { } }, + }); + + checkTemplateBranches(handler, g, { + { g(r(r(x))), { g(r(x)) } }, + { g(r(r(x))), { g(x) } }, + { g(r(b)), { } }, + { g(b), { } }, + }); + + checkTemplateBranches(handler, h, { + { h(b, x, y), { } }, + { h(r(x), y, z), { h(x, y, z) } } + }); + + checkTemplateBranches(handler, p, { + { p(r(r(x))), { p(x) } }, + { p(r(r(x))), { p(r(x)) } }, + { p(b), { } }, + { p(r(b)), { } } + }); + + checkTemplateBranches(handler, q, { + { q(y,r(x)), { q(y,x) } }, + { q(y,b), { } } + }); +} + +// non-term-algebra sorts are ignored +TEST_FUN(test_05) { + __ALLOW_UNUSED(MY_SYNTAX_SUGAR) + DECL_SORT(t) \ + DECL_FUNC(f1, {t}, t) \ + DECL_PRED(p1, {t}) + FunctionDefinitionHandler handler; + addFunctionDefs(handler, { + { { f1(f1(x)), f1(x), { } } }, + { { p1(f1(x)).wrapInTerm(), /*unused*/b(), { p1(x) } } } + }); + + ASS(!handler.getInductionTemplate(f1.functor(), true)); + ASS(!handler.getInductionTemplate(p1.functor(), false)); +} + +// headers with non-term-algebra arguments are not discarded +// but trivial headers are added to ensure well-definedness +TEST_FUN(test_06) { + __ALLOW_UNUSED(MY_SYNTAX_SUGAR) + FunctionDefinitionHandler handler; + addFunctionDefs(handler, { + { { p(g(x)).wrapInTerm(), /*unused*/b(), { p(x) } } }, + { { f(r(x),g(y)), f(x,g(y)), { } } } + }); + + checkTemplateBranches(handler, p, { + { p(g(x)), { p(x) } }, + { p(x), { } }, + }); + + checkTemplateBranches(handler, f, { + { f(r(x),g(y)), { f(x,g(y)) } }, + { f(x,y), { } }, + }); +} diff --git a/UnitTests/tInduction.cpp b/UnitTests/tInduction.cpp index 67b12fe39..ae94ca37f 100644 --- a/UnitTests/tInduction.cpp +++ b/UnitTests/tInduction.cpp @@ -20,6 +20,8 @@ #include "Indexing/LiteralSubstitutionTree.hpp" #include "Indexing/TermIndex.hpp" #include "Indexing/TermSubstitutionTree.hpp" + +#include "Kernel/FormulaUnit.hpp" #include "Kernel/RobSubstitution.hpp" #include "Inferences/Induction.hpp" @@ -52,7 +54,7 @@ inline Clause* fromInduction(Clause* cl) { } InductionContext inductionContext(TermSugar t, std::initializer_list cls) { - InductionContext res(t.sugaredExpr().term()); + InductionContext res({ t.sugaredExpr().term() }); for (const auto& cl : cls) { for (unsigned i = 0; i < cl->length(); i++) { res.insert(cl, (*cl)[i]); @@ -236,7 +238,7 @@ class GenerationTesterInduction DECL_TERM_ALGEBRA(s, {b, r}) \ __ALLOW_UNUSED( \ auto r0 = r.dtor(0); \ - TermSugar ph_s(TermList(getPlaceholderForTerm(sK1.sugaredExpr().term()))); \ + TermSugar ph_s(TermList(getPlaceholderForTerm({ sK1.sugaredExpr().term() }, 0))); \ ) \ DECL_CONST(b1, u) \ DECL_CONST(b2, u) \ @@ -245,6 +247,7 @@ class GenerationTesterInduction DECL_TERM_ALGEBRA(u, {b1, b2, r1, r2}) \ DECL_FUNC(f, {s, s}, s) \ DECL_FUNC(g, {s}, s) \ + DECL_FUNC(h, {s, s}, s) \ DECL_PRED(p, {s}) \ DECL_PRED(p1, {s}) \ DECL_PRED(q, {u}) \ @@ -1116,6 +1119,132 @@ TEST_GENERATION_INDUCTION(test_33, }) ) +// +// FUNCTION DEFINITION TESTS +// + +auto setup = [](SaturationAlgorithm& salg) { + __ALLOW_UNUSED(MY_SYNTAX_SUGAR); + salg.setFunctionDefinitionHandler(new Shell::FunctionDefinitionHandler()); + + std::initializer_list>>> functionDefs = + { + { + { f(b,y), y, { } }, + { f(r(x),b), f(x,x), { } }, + { f(r(x),r(y)), h(f(x,g(y)),f(r(x),y)), { } }, + }, + { + { h(b,y), y, { } }, + { h(r(x),y), h(x,y), { } }, + }, + { + { p(b()).wrapInTerm(), b()/*unused*/, { } }, + { p(r(r(x))).wrapInTerm(), b()/*unused*/, { p(x), x != b() } }, + } + }; + auto fu = new FormulaUnit(nullptr, FromInput(UnitInputType::AXIOM)); + for (const auto& fd : functionDefs) { + Stack st; + for (const auto& t : fd) { + LiteralStack lits; + for (const auto& l : get<2>(t)) { + lits.push(l); + } + st.push({ get<0>(t).sugaredExpr().term(), get<1>(t).sugaredExpr(), lits }); + } + salg.getFunctionDefinitionHandler()->addFunction(st, fu); + } +}; + +TEST_GENERATION_INDUCTION(test_34, + Generation::TestCase() + .setup(setup) + .options({ + { "induction", "struct" }, + { "structural_induction_kind", "recursion" }, + }) + .indices(getIndices()) + .input( clause({ ~p(sK1) }) ) + .expected({ + clause({ ~p(b), ~p(r(b)), p(skx0) }), + clause({ ~p(b), ~p(r(b)), ~p(r(r(skx0))) }), + }) + ) + +TEST_GENERATION_INDUCTION(test_35, + Generation::TestCase() + .setup(setup) + .options({ + { "induction", "struct" }, + { "structural_induction_kind", "recursion" }, + }) + .indices(getIndices()) + .input( clause({ f(sK1,sK2) != g(sK2) }) ) + .expected({ + clause({ f(b,skx0) != g(skx0), f(skx1,skx1) == g(skx1), f(skx2,g(skx3)) == g(g(skx3)) }), + clause({ f(b,skx0) != g(skx0), f(r(skx1),b) != g(b), f(skx2,g(skx3)) == g(g(skx3)) }), + clause({ f(b,skx0) != g(skx0), f(skx1,skx1) == g(skx1), f(r(skx2),skx3) == g(skx3) }), + clause({ f(b,skx0) != g(skx0), f(r(skx1),b) != g(b), f(r(skx2),skx3) == g(skx3) }), + clause({ f(b,skx0) != g(skx0), f(skx1,skx1) == g(skx1), f(r(skx2),r(skx3)) != g(r(skx3)) }), + clause({ f(b,skx0) != g(skx0), f(r(skx1),b) != g(b), f(r(skx2),r(skx3)) != g(r(skx3)) }), + }) + ) + +// only schemes from active positions are picked up +// and there is one generalization only for active occurrences +TEST_GENERATION_INDUCTION(test_36, + Generation::TestCase() + .setup(setup) + .options({ + { "induction", "struct" }, + { "induction_on_active_occurrences", "on" }, + }) + .indices(getIndices()) + .input( clause({ h(h(sK1,sK2),f(sK3,sK4)) != g(sK4) }) ) + .expected({ + clause({ h(h(b,sK2),f(sK3,sK4)) != g(sK4), h(h(skx0,sK2),f(sK3,sK4)) == g(sK4) }), + clause({ h(h(b,sK2),f(sK3,sK4)) != g(sK4), h(h(r(skx0),sK2),f(sK3,sK4)) != g(sK4) }), + + clause({ h(h(sK1,sK2),f(sK3,b)) != g(b), h(h(sK1,sK2),f(sK3,skx1)) == g(skx1) }), + clause({ h(h(sK1,sK2),f(sK3,b)) != g(b), h(h(sK1,sK2),f(sK3,r(skx1))) != g(r(skx1)) }), + + clause({ h(h(sK1,sK2),f(sK3,sK4)) != g(b), h(h(sK1,sK2),f(sK3,sK4)) == g(skx1) }), + clause({ h(h(sK1,sK2),f(sK3,sK4)) != g(b), h(h(sK1,sK2),f(sK3,sK4)) != g(r(skx1)) }), + }) + ) + +// active occurrences are always inducted on in generalizations +TEST_GENERATION_INDUCTION(test_37, + Generation::TestCase() + .setup(setup) + .options({ + { "induction", "struct" }, + { "induction_on_active_occurrences", "on" }, + { "induction_gen", "on" }, + }) + .indices(getIndices()) + .input( clause({ h(h(sK1,sK1),sK1) != g(sK1) }) ) + .expected({ + clause({ h(h(b,sK1),sK1) != g(b), h(h(skx0,sK1),sK1) == g(skx0) }), + clause({ h(h(b,sK1),sK1) != g(b), h(h(r(skx0),sK1),sK1) != g(r(skx0)) }), + + clause({ h(h(b,b),sK1) != g(b), h(h(skx1,skx1),sK1) == g(skx1) }), + clause({ h(h(b,b),sK1) != g(b), h(h(r(skx1),r(skx1)),sK1) != g(r(skx1)) }), + + clause({ h(h(b,sK1),b) != g(b), h(h(skx2,sK1),skx2) == g(skx2) }), + clause({ h(h(b,sK1),b) != g(b), h(h(r(skx2),sK1),r(skx2)) != g(r(skx2)) }), + + clause({ h(h(b,b),b) != g(b), h(h(skx3,skx3),skx3) == g(skx3) }), + clause({ h(h(b,b),b) != g(b), h(h(r(skx3),r(skx3)),r(skx3)) != g(r(skx3)) }), + }) + ) + +// +// GENERALIZATION TESTS +// + // no generalization TEST_FUN(generalizations_01) { __ALLOW_UNUSED(MY_SYNTAX_SUGAR); @@ -1207,4 +1336,4 @@ TEST_FUN(generalizations_03) { f(f(f(ph_s,sK2),f(ph_s,ph_s)),f(f(ph_s,g(sK2)),f(f(ph_s,sK2),ph_s)))) }), }), }); -} \ No newline at end of file +} diff --git a/UnitTests/tInductionGeneralization.cpp b/UnitTests/tInductionGeneralization.cpp new file mode 100644 index 000000000..201af7044 --- /dev/null +++ b/UnitTests/tInductionGeneralization.cpp @@ -0,0 +1,109 @@ +/* + * This file is part of the source code of the software program + * Vampire. It is protected by applicable + * copyright laws. + * + * This source code is distributed under the licence found here + * https://vprover.github.io/license.html + * and in the source directory + */ + +#include "Test/UnitTesting.hpp" +/*#include "Shell/InductionSchemeGenerator.hpp" +#include "Inferences/GeneralInduction.hpp" + +using namespace Shell; +using namespace Inferences; + +void check_bits(Occurrences occ, unsigned c, unsigned m) { + while (m > 0) { + m >>= 1; + ASS_EQ(occ.pop_last(), c & 1); + c >>= 1; + } +} + +TEST_FUN(Occurrences1) { + Occurrences occ(1); + occ.add(0); + occ.add(1); + occ.add(1); + occ.add(0); + occ.add(0); + occ.finalize(); + const unsigned bits = 6; + ASS_EQ(occ.num_bits(), bits); + ASS_EQ(occ.num_set_bits(), 3); + check_bits(occ, 0b001101, (1 << bits)); + ASS(occ.next()); + check_bits(occ, 0b001111, (1 << bits)); + ASS(occ.next()); + check_bits(occ, 0b011101, (1 << bits)); + ASS(occ.next()); + check_bits(occ, 0b011111, (1 << bits)); + ASS(occ.next()); + check_bits(occ, 0b101101, (1 << bits)); + ASS(occ.next()); + check_bits(occ, 0b101111, (1 << bits)); + ASS(occ.next()); + check_bits(occ, 0b111101, (1 << bits)); + ASS(occ.next()); + check_bits(occ, 0b111111, (1 << bits)); + ASS(!occ.next()); +} + +TEST_FUN(OccurrenceMap1) { + Literal* l1 = reinterpret_cast(1); + Literal* l2 = reinterpret_cast(2); + Term* t1 = reinterpret_cast(1); + Term* t2 = reinterpret_cast(2); + OccurrenceMap occMap; + occMap.add(l1, t1, 1); + occMap.add(l1, t1, 1); + occMap.add(l1, t1, 0); + occMap.add(l1, t1, 0); + + occMap.add(l2, t2, 0); + occMap.add(l2, t2, 1); + occMap.add(l2, t2, 0); + occMap.add(l2, t2, 1); + + occMap.finalize(); + + auto check_next = [&l1, &l2, &t1, &t2](unsigned b1, unsigned b2, IteratorCore& occ) { + auto ng = occ.next(); + check_bits(ng._m.find(make_pair(l1, t1))->second, b1, (1 << 4)); + check_bits(ng._m.find(make_pair(l2, t2))->second, b2, (1 << 4)); + }; + + NoGeneralizationIterator ngit(occMap); + check_next(0b1111, 0b1111, ngit); + ASS(!ngit.hasNext()); + + GeneralizationIterator git1(occMap, false, false); + check_next(0b0011, 0b1010, git1); + check_next(0b0111, 0b1010, git1); + check_next(0b1011, 0b1010, git1); + check_next(0b1111, 0b1010, git1); + check_next(0b0011, 0b1011, git1); + check_next(0b0111, 0b1011, git1); + check_next(0b1011, 0b1011, git1); + check_next(0b1111, 0b1011, git1); + check_next(0b0011, 0b1110, git1); + check_next(0b0111, 0b1110, git1); + check_next(0b1011, 0b1110, git1); + check_next(0b1111, 0b1110, git1); + check_next(0b0011, 0b1111, git1); + check_next(0b0111, 0b1111, git1); + check_next(0b1011, 0b1111, git1); + check_next(0b1111, 0b1111, git1); + ASS(!git1.hasNext()); + + GeneralizationIterator git2(occMap, true, true); + check_next(0b0011, 0b1010, git2); + check_next(0b1111, 0b1010, git2); + check_next(0b0011, 0b1111, git2); + check_next(0b1111, 0b1111, git2); + ASS(!git2.hasNext()); +} + */ \ No newline at end of file diff --git a/UnitTests/tTermAlgebra.cpp b/UnitTests/tTermAlgebra.cpp new file mode 100644 index 000000000..90c6fc506 --- /dev/null +++ b/UnitTests/tTermAlgebra.cpp @@ -0,0 +1,76 @@ +/* + * This file is part of the source code of the software program + * Vampire. It is protected by applicable + * copyright laws. + * + * This source code is distributed under the licence found here + * https://vprover.github.io/license.html + * and in the source directory + */ + +#include "Test/UnitTesting.hpp" +#include "Test/SyntaxSugar.hpp" + +#include "Shell/TermAlgebra.hpp" + +using namespace Shell; + +#define DECL_VARS \ + __ALLOW_UNUSED( \ + DECL_VAR(x0,0) \ + DECL_VAR(x1,1) \ + DECL_VAR(x2,2) \ + DECL_VAR(x3,3) \ + DECL_VAR(x4,4) \ + DECL_VAR(x5,5) \ + DECL_VAR(x6,6) \ + DECL_VAR(x7,7)) + +TEST_FUN(excludeTermFromAvailables) { + DECL_VARS + DECL_SORT(ts) + DECL_SORT(nts) + DECL_CONST(b1, ts) + DECL_CONST(b2, ts) + DECL_FUNC(r1, {nts, ts}, ts) + DECL_FUNC(r2, {nts, ts}, ts) + DECL_TERM_ALGEBRA(ts, {b1, b2, r1, r2}) + DECL_CONST(f, ts) + + auto ta = env.signature->getTermAlgebraOfSort(ts.sugaredExpr()); + ASS(ta); + + TermStack a = { b1(), b2(), r1(x0, x1), r2(x2, x3) }; + unsigned var = 4; + + ta->excludeTermFromAvailables(a, b2(), var); + TermStack exp1 = { b1(), r1(x0, x1), r2(x2,x3) }; + ASS_EQ(a, exp1); + + ta->excludeTermFromAvailables(a, r2(x0,b1()), var); + TermStack exp2 = { b1(), r1(x0, x1), r2(x2,b2()), r2(x2,r1(x4,x5)), r2(x2,r2(x6,x7)) }; + ASS_EQ(a, exp2); + + // can't exclude non ctor or dtor terms + ta->excludeTermFromAvailables(a, r1(x0,f()), var); + ASS_EQ(a, exp2); +} + +TEST_FUN(excludeNested) { + DECL_VARS + DECL_SORT(ts) + DECL_SORT(nts) + DECL_CONST(b, ts) + DECL_FUNC(r, {nts, ts}, ts) + DECL_TERM_ALGEBRA(ts, {b, r}) + + auto ta = env.signature->getTermAlgebraOfSort(ts.sugaredExpr()); + ASS(ta); + + TermStack a = { x0 }; + unsigned var = 1; + + ta->excludeTermFromAvailables(a, r(x0,r(x1,r(x2,r(x3,x4)))), var); + TermStack exp1 = { b(), r(x1,b()), r(x1,r(x3,b())), r(x1,r(x3,r(x5,b()))) }; + ASS_EQ(a, exp1); +} From 239c1b9b352b7c2531b49b37ed979b98a6c78feb Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Thu, 6 Apr 2023 08:28:47 +0200 Subject: [PATCH 02/56] Some fixes (add these to parametric-datatypes eventually) --- Inferences/Induction.cpp | 4 ++-- Parse/SMTLIB2.cpp | 26 ++++++++++---------------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index 4787989da..3b0b13702 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -1159,11 +1159,11 @@ void InductionClauseIterator::resolveClauses(const ClauseStack& cls, const Induc while(cit.hasNext()){ IntUnionFind::ElementIterator eIt = cit.next(); _clauses.push(resolveClausesHelper(context, cls, eIt, subst, generalized, applySubst)); - // if(_opt.showInduction()){ + if(_opt.showInduction()){ env.beginOutput(); env.out() << "[Induction] generate " << _clauses.top()->toString() << endl; env.endOutput(); - // } + } } } diff --git a/Parse/SMTLIB2.cpp b/Parse/SMTLIB2.cpp index a0987b462..006e33a34 100644 --- a/Parse/SMTLIB2.cpp +++ b/Parse/SMTLIB2.cpp @@ -1536,15 +1536,9 @@ void SMTLIB2::parseMatchBegin(LExpr *exp) USER_ERROR_EXPR("Only function constructors are allowed: "+fst); } auto fn = env.signature->getFunction(sym.first); - unsigned i = 0; - // we need the type arguments in reverse order, - // so we push them on a stack and pop them - Stack st; - while (tRdr.hasNext() && i++ < fn->numTypeArguments()) { - st.push(tRdr.readNext()); - } - while (st.isNonEmpty()) { - _todo.push(make_pair(PO_PARSE_SORT, st.pop())); + for (unsigned i = 0; i < fn->numTypeArguments(); i++) { + ALWAYS(tRdr.hasNext()); + _todo.push(make_pair(PO_PARSE_SORT, tRdr.readNext())); } } pRdr.acceptEOL(); @@ -1578,7 +1572,7 @@ void SMTLIB2::parseMatchCaseStart(LExpr *exp) unsigned i = 0; Substitution subst; while (tRdr.hasNext()) { - auto arg = tRdr.readNext(); + auto argExp = tRdr.readNext(); ASS_L(i,type->arity()); if (i < type->numTypeArguments()) { if (_results.isEmpty() || _results.top().isSeparator()) { @@ -1590,12 +1584,12 @@ void SMTLIB2::parseMatchCaseStart(LExpr *exp) i++; continue; } - if (!arg->isAtom() || isAlreadyKnownSymbol(arg->str)) { - USER_ERROR_EXPR("Nested ctors ("+arg->toString()+") in match patterns are disallowed: '" + exp->toString() + "'"); + if (!argExp->isAtom() || isAlreadyKnownSymbol(argExp->str)) { + USER_ERROR_EXPR("Nested ctors ("+argExp->toString()+") in match patterns are disallowed: '" + exp->toString() + "'"); } // from the type arguments used in the matched term we instantiate the type of the other variables - if (!lookup->insert(arg->str, make_pair(TermList(_nextVar++, false), SubstHelper::apply(type->arg(i++), subst)))) { - USER_ERROR_EXPR("Variable '" + arg->str + "' has already been defined"); + if (!lookup->insert(argExp->str, make_pair(TermList(_nextVar++, false), SubstHelper::apply(type->arg(i++), subst)))) { + USER_ERROR_EXPR("Variable '" + argExp->str + "' has already been defined"); } } } @@ -1707,12 +1701,12 @@ void SMTLIB2::parseMatchEnd(LExpr *exp) if (varUsed) { Stack argTerms; // the number of type arguments for all ctors is the arity of the type - unsigned numTypeArgs = env.signature->getTypeCon(sort.term()->functor())->typeConType()->arity(); + unsigned numTypeArgs = env.signature->getTypeCon(matchedTermSort.term()->functor())->typeConType()->arity(); for (const auto &kv : ctorFunctors) { argTerms.reset(); for (unsigned j = 0; j < kv.second->arity(); j++) { if (j < numTypeArgs) { - argTerms.push(*sort.term()->nthArgument(j)); + argTerms.push(*matchedTermSort.term()->nthArgument(j)); } else { argTerms.push(TermList(_nextVar++, false)); } From 6d2fe8112b1a134aa92a6a3dd5c73ff4925812d2 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Wed, 31 May 2023 16:00:45 +0200 Subject: [PATCH 03/56] Enable some features --- Inferences/Induction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index 3b0b13702..41426408c 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -515,7 +515,7 @@ struct InductionContextFn } auto indTerm = arg.first[0]; // check for complex term and non-equality - if (_lit->isEquality() || !indTerm->arity()) { + if (_lit->isEquality()/* || !indTerm->arity() */) { return res; } while (arg.second.hasNext()) { @@ -776,9 +776,9 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) // generate formulas and add them to index if not done already if (_formulaIndex.findOrInsert(ctx, e)) { if (ctx._indTerms.size() == 1) { - if(one){ + // if(one){ performStructInductionOne(ctx,e); - } + // } if(two){ performStructInductionTwo(ctx,e); } From 1b51a807285368314dfdc1c7049309a380dc18ae Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Sat, 17 Jun 2023 12:06:39 +0200 Subject: [PATCH 04/56] Add some initial schedule --- CASC/Schedules.cpp | 103 ++++++++++++++++++++++++++++++--------------- 1 file changed, 68 insertions(+), 35 deletions(-) diff --git a/CASC/Schedules.cpp b/CASC/Schedules.cpp index 5adddaabb..43c9a2dbd 100644 --- a/CASC/Schedules.cpp +++ b/CASC/Schedules.cpp @@ -3103,44 +3103,77 @@ void Schedules::getIntegerInductionSchedule(const Shell::Property& property, Sch // ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- // ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- +// insertionsort/mset/conjecture: lrs+10_1_drc=encompass:ind=struct:sik=recursion:to=lpo:sos=theory:sstl=1:sp=occurrence:indao=on_89 +// insertionsort/mset/lemma1: lrs+10_1_drc=encompass:ind=struct:sik=recursion:to=lpo:sos=theory:sstl=1:sp=occurrence:indao=on_89 +// +// insertionsort/sortedness/conjecture: lrs+10_1_drc=encompass:ind=struct:sik=recursion:to=lpo:sos=theory:sstl=1:sp=occurrence:indao=on_89 +// insertionsort/sortedness/lemma1: lrs+1002_1_aac=none:anc=all:sac=on:ind=struct:thsq=on:to=lpo:nui=on:drc=encompass:sik=recursion:urr=on_89 +// +// mergesort/mset/conjecture: lrs+10_1_drc=encompass:ind=struct:sik=recursion:to=lpo:thsq=on:sp=occurrence_89 +// mergesort/mset/lemma1: ??? +// mergesort/mset/lemma2: lrs+10_1_drc=encompass:ind=struct:sik=recursion:to=lpo:thsq=on:sp=occurrence_89 +// mergesort/mset/lemma3: lrs+10_1_drc=encompass:ind=struct:sik=recursion:to=lpo:thsq=on:sp=occurrence_89 +// +// mergesort/sortedness/conjecture: lrs+10_1_drc=encompass:ind=struct:sik=recursion:to=lpo:thsq=on:sp=occurrence_89 +// mergesort/sortedness/lemma1: ??? +// mergesort/sortedness/lemma2: lrs+10_1_drc=encompass:ind=struct:sik=recursion:to=lpo:thsq=on:sp=occurrence:nui=on_89 +// +// quicksort/mset/conjecture: lrs+10_1_drc=encompass:ind=struct:sik=recursion:to=lpo:sos=theory:sstl=1:sp=occurrence:indao=on_89 +// quicksort/mset/lemma1: lrs+10_1_drc=encompass:ind=struct:sik=one:to=lpo:thsq=on:sp=occurrence_89 +// quicksort/mset/lemma2: lrs+10_1_drc=encompass:ind=struct:sik=one:to=lpo:sos=theory:sstl=1:sp=occurrence:indao=on_89 +// +// quicksort/sortedness/conjecture: lrs+10_1_drc=encompass:ind=struct:sik=recursion:to=lpo:thsq=on:sp=occurrence_89 +// quicksort/sortedness/lemma1: lrs+10_1_drc=encompass:ind=struct:sik=recursion:to=lpo:thsq=on:sp=occurrence:nui=on_89 +// quicksort/sortedness/lemma2: lrs+10_1_drc=encompass:ind=struct:sik=one:to=lpo:thsq=on:sp=occurrence_89 +// quicksort/sortedness/lemma3: lrs+10_1_drc=encompass:ind=struct:sik=one:to=lpo:thsq=on:sp=occurrence:indao=on_100 +// quicksort/sortedness/lemma4: lrs+10_1_drc=encompass:ind=struct:sik=recursion:to=lpo:thsq=on:sp=occurrence:nui=on:indao=on_89 +// quicksort/sortedness/lemma5: lrs+10_1_ind=struct:sos=theory:sstl=1:urr=on:nui=on:indao=on:sik=recursion:drc=encompass_89 +// quicksort/sortedness/lemma6: lrs+10_1_drc=encompass:ind=struct:sik=recursion:to=lpo:thsq=on:sp=occurrence:nui=on:indao=on_89 +// quicksort/sortedness/lemma7: lrs+10_1_drc=encompass:ind=struct:sik=one:to=lpo:thsq=on:sp=occurrence:indao=on:nui=on_89 + void Schedules::getStructInductionSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback) { // Empirically sorted (order somewhat guessed) - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1_89"); - quick.push("dis+1002_1_aac=none:anc=all:ind=struct:sos=theory:sac=on:sstl=1:to=lpo_30"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:to=lpo_89"); - quick.push("lrs+10_1_drc=off:ind=struct:to=lpo_89"); - quick.push("lrs+10_1_drc=off:ind=struct:sos=theory:sstl=1:to=lpo_89"); - quick.push("lrs+10_1_ind=struct:to=lpo_89"); - quick.push("lrs+10_1_av=off:br=off:ind=struct:urr=on_89"); - quick.push("lrs+10_1_drc=off:ind=struct_89"); - quick.push("lrs+10_1_drc=off:ind=struct:sos=theory:sstl=1_89"); - quick.push("lrs+10_1_ind=struct_89"); - // The rest - quick.push("lrs+10_1_drc=off:ind=struct:indoct=on:sos=theory:sstl=1:to=lpo_89"); - quick.push("lrs+10_1_drc=off:ind=struct:indoct=on:to=lpo_89"); - quick.push("lrs+10_1_ind=struct:indoct=on:sos=theory:sstl=1:to=lpo_89"); - quick.push("lrs+10_1_ind=struct:indoct=on:to=lpo_89"); - quick.push("lrs+10_1_drc=off:ind=struct:indoct=on:sos=theory:sstl=1_89"); - quick.push("lrs+10_1_drc=off:ind=struct:indoct=on_89"); - quick.push("lrs+10_1_ind=struct:indoct=on:sos=theory:sstl=1_89"); - quick.push("lrs+10_1_ind=struct:indoct=on_89"); - quick.push("lrs+10_1_drc=off:ind=struct:indgen=on:sos=theory:sstl=1:to=lpo_89"); - quick.push("lrs+10_1_drc=off:ind=struct:indgen=on:to=lpo_89"); - quick.push("lrs+10_1_ind=struct:indgen=on:sos=theory:sstl=1:to=lpo_89"); - quick.push("lrs+10_1_ind=struct:indgen=on:to=lpo_89"); - quick.push("lrs+10_1_drc=off:ind=struct:indgen=on:sos=theory:sstl=1_89"); - quick.push("lrs+10_1_drc=off:ind=struct:indgen=on_89"); - quick.push("lrs+10_1_ind=struct:indgen=on:sos=theory:sstl=1_89"); - quick.push("lrs+10_1_ind=struct:indgen=on_89"); - quick.push("lrs+10_1_drc=off:ind=struct:indgen=on:indoct=on:sos=theory:sstl=1:to=lpo_89"); - quick.push("lrs+10_1_drc=off:ind=struct:indgen=on:indoct=on:to=lpo_89"); - quick.push("lrs+10_1_ind=struct:indgen=on:indoct=on:sos=theory:sstl=1:to=lpo_89"); - quick.push("lrs+10_1_ind=struct:indgen=on:indoct=on:to=lpo_89"); - quick.push("lrs+10_1_drc=off:ind=struct:indgen=on:indoct=on:sos=theory:sstl=1_89"); - quick.push("lrs+10_1_drc=off:ind=struct:indgen=on:indoct=on_89"); - quick.push("lrs+10_1_ind=struct:indgen=on:indoct=on:sos=theory:sstl=1_89"); - quick.push("lrs+10_1_ind=struct:indgen=on:indoct=on_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=off:indao=on:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=off:indao=on:urr=on_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=off:indao=off:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=off:indao=off:urr=on_89"); + + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=on:indao=on:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=on:indao=on:urr=on_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=on:indao=off:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=on:indao=off:urr=on_89"); + + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=off:indao=on:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=off:indao=on:urr=on_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=off:indao=off:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=off:indao=off:urr=on_89"); + + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=on:indao=on:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=on:indao=on:urr=on_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=on:indao=off:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=on:indao=off:urr=on_89"); + + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=off:indao=on:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=off:indao=on:urr=on_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=off:indao=off:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=off:indao=off:urr=on_89"); + + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=on:indao=on:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=on:indao=on:urr=on_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=on:indao=off:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=on:indao=off:urr=on_89"); + + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=off:indao=on:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=off:indao=on:urr=on_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=off:indao=off:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=off:indao=off:urr=on_89"); + + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=on:indao=on:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=on:indao=on:urr=on_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=on:indao=off:urr=off_89"); + quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=on:indao=off:urr=on_89"); + quick.push("lrs+1002_1_aac=none:anc=all:sac=on:ind=struct:thsq=on:to=lpo:nui=on:drc=encompass:sik=recursion:urr=on_89"); fallback.push("lrs+10_1__50"); } From 25bb0a7a9a07fe2ea3a17548640f7e27a3977e80 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Wed, 8 Nov 2023 10:34:46 +0100 Subject: [PATCH 05/56] Parse define-funs-rec; fix crash with predicate dtors in Induction --- Inferences/Induction.cpp | 14 ++- Parse/SMTLIB2.cpp | 104 ++++++++++++++++++++ Parse/SMTLIB2.hpp | 9 +- checks/parse/smtlib2-mutual-recursion.smt2 | 108 +++++++++++++++++++++ checks/sanity | 1 + 5 files changed, 233 insertions(+), 3 deletions(-) create mode 100644 checks/parse/smtlib2-mutual-recursion.smt2 diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index fbcbc8feb..e71f1a581 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -1085,7 +1085,12 @@ void InductionClauseIterator::performStructInductionTwo(const InductionContext& TermStack dargTerms(numTypeArgs+1); dargTerms.loadFromIterator(Term::Iterator(sort.term())); dargTerms.push(y); - TermList djy(Term::create(dj,dargTerms.size(),dargTerms.begin())); + TermList djy; + if (con->argSort(j)==AtomicSort::boolSort()) { + djy = TermList(Term::createFormula(new AtomicFormula(Literal::create(dj,dargTerms.size(),true,false,dargTerms.begin())))); + } else { + djy = TermList(Term::create(dj,dargTerms.size(),dargTerms.begin())); + } argTerms.push(djy); if(con->argSort(j) == con->rangeSort()){ taTerms.push(djy); @@ -1175,7 +1180,12 @@ void InductionClauseIterator::performStructInductionThree(const InductionContext TermStack dargTerms(numTypeArgs+1); dargTerms.loadFromIterator(Term::Iterator(sort.term())); dargTerms.push(y); - TermList djy(Term::create(dj,dargTerms.size(),dargTerms.begin())); + TermList djy; + if (con->argSort(j)==AtomicSort::boolSort()) { + djy = TermList(Term::createFormula(new AtomicFormula(Literal::create(dj,dargTerms.size(),true,false,dargTerms.begin())))); + } else { + djy = TermList(Term::create(dj,dargTerms.size(),dargTerms.begin())); + } argTerms.push(djy); TermList xj(vars,false); varTerms.push(xj); diff --git a/Parse/SMTLIB2.cpp b/Parse/SMTLIB2.cpp index 25f504e3b..b6c9a0b0a 100644 --- a/Parse/SMTLIB2.cpp +++ b/Parse/SMTLIB2.cpp @@ -278,6 +278,15 @@ void SMTLIB2::readBenchmark(LExprList* bench) continue; } + if (ibRdr.tryAcceptAtom("define-funs-rec")) { + LExprList* declarations = ibRdr.readList(); + LExprList* definitions = ibRdr.readList(); + + readDefineFunsRec(declarations, definitions); + + continue; + } + if (ibRdr.tryAcceptAtom("assert")) { if (!ibRdr.hasNext()) { USER_ERROR_EXPR("assert expects a body"); @@ -841,6 +850,101 @@ void SMTLIB2::readDefineFun(const vstring& name, LExprList* iArgs, LExpr* oSort, UnitList::push(fu, _formulas); } +void SMTLIB2::readDefineFunsRec(LExprList* declsExpr, LExprList* defsExpr) +{ + struct Declaration { + DeclaredSymbol sym; + TermLookup* lookup; + TermList rangeSort; + TermStack args; + }; + Stack declarations; + + // first, declare all symbols + LispListReader declsRdr(declsExpr); + while (declsRdr.hasNext()) { + auto declExpr = declsRdr.next(); + if (!declExpr->isList()) { + USER_ERROR_EXPR("define-funs-rec expect a list of lists of declaration as its first argument"); + } + + Declaration decl; + LispListReader declRdr(declExpr->list); + vstring name = declRdr.readAtom(); + if (isAlreadyKnownSymbol(name)) { + USER_ERROR_EXPR("Redeclaring function symbol: "+name); + } + LExprList* iArgs = declRdr.readList(); + + decl.lookup = new TermLookup(); + + static TermStack argSorts; + argSorts.reset(); + + LispListReader iaRdr(iArgs); + while (iaRdr.hasNext()) { + LExprList* pair = iaRdr.readList(); + LispListReader pRdr(pair); + + vstring vName = pRdr.readAtom(); + TermList vSort = parseSort(pRdr.readNext()); + + pRdr.acceptEOL(); + + // the vars need not be fresh across multiple definition, but it does not hurt + TermList arg = TermList(_nextVar++, false); + decl.args.push(arg); + + if (!decl.lookup->insert(vName,make_pair(arg,vSort))) { + USER_ERROR_EXPR("Multiple occurrence of variable "+vName+" in the definition of function "+name); + } + + argSorts.push(vSort); + } + decl.rangeSort = parseSort(declRdr.readNext()); + decl.sym = declareFunctionOrPredicate(name, decl.rangeSort, argSorts, /*taArity=*/ 0); + + declarations.push(decl); + } + + // then, read all definitions + LispListReader defsRdr(defsExpr); + for (const auto& decl : declarations) { + if (!defsRdr.hasNext()) { + USER_ERROR_EXPR("Less definitions than declarations in define-funs-rec"); + } + auto def = defsRdr.next(); + _scopes.push(decl.lookup); + ParseResult res = parseTermOrFormula(def,false/*isSort*/); + + TermList rhs; + if (res.asTerm(rhs) != decl.rangeSort) { + USER_ERROR_EXPR("Defined function body "+def->toString()+" has different sort than declared "+decl.rangeSort.toString()); + } + + unsigned symbIdx = decl.sym.first; + ASS(decl.sym.second != SymbolType::TYPECON); + bool isTrueFun = decl.sym.second==SymbolType::FUNCTION; + + TermList lhs; + if (isTrueFun) { + lhs = TermList(Term::create(symbIdx,decl.args.size(),decl.args.begin())); + } else { + Formula* frm = new AtomicFormula(Literal::create(symbIdx,decl.args.size(),true,false,decl.args.begin())); + lhs = TermList(Term::createFormula(frm)); + } + + Formula* fla = new AtomicFormula(Literal::createEquality(true,lhs,rhs,decl.rangeSort)); + FormulaUnit* fu = new FormulaUnit(fla, FromInput(UnitInputType::ASSUMPTION)); + UnitList::push(fu, _formulas); + + delete _scopes.pop(); + } + if (defsRdr.hasNext()) { + USER_ERROR_EXPR("More definitions than declarations in define-funs-rec"); + } +} + void SMTLIB2::readTypeParameters(LispListReader& rdr, TermLookup* lookup, TermStack* ts) { if (!rdr.hasNext()) { diff --git a/Parse/SMTLIB2.hpp b/Parse/SMTLIB2.hpp index 703974880..425801ef8 100644 --- a/Parse/SMTLIB2.hpp +++ b/Parse/SMTLIB2.hpp @@ -237,11 +237,18 @@ class SMTLIB2 { void readDeclareFun(const vstring& name, LExprList* iSorts, LExpr* oSort, unsigned taArity); /** - * Handle "define-fun" entry. + * Handle "define-fun[-rec]" entry. * * Defining a function extends the signature and adds the new function's definition into _formulas. + * Additionally, the "define-fun-rec" variant allows the defined function to be present inside the definition, allowing recursion. */ void readDefineFun(const vstring& name, LExprList* iArgs, LExpr* oSort, LExpr* body, const TermStack& typeArgs, bool recursive); + /** + * Handle "define-funs-rec" entry. + * + * Same as "define-fun-rec" (see above), except it defines possibly multiple functions at the same time which can use each other. + */ + void readDefineFunsRec(LExprList* declarations, LExprList* definitions); void readDeclareDatatype(LExpr* sort, LExprList* datatype); diff --git a/checks/parse/smtlib2-mutual-recursion.smt2 b/checks/parse/smtlib2-mutual-recursion.smt2 new file mode 100644 index 000000000..367cd31d5 --- /dev/null +++ b/checks/parse/smtlib2-mutual-recursion.smt2 @@ -0,0 +1,108 @@ + +(declare-datatype nat ((zero) (s (s_0 nat)))) +(declare-datatype list ((nil) (cons (head nat) (tail list)))) +(declare-datatype pair ((pair2 (proj1-pair list) (proj2-pair list)))) + +(define-funs-rec + ((even + ((x nat)) Bool) + (odd + ((x nat)) Bool)) + ((match x ((zero true) + ((s z) (odd z)))) + (match x ((zero false) + ((s z) (even z)))))) + +(define-fun-rec take ((x nat) (y list)) list + (match x + ((zero nil) + ((s z) + (match y + ((nil nil) + ((cons z2 xs) (cons z2 (take z xs))))))))) +(define-fun-rec plus ((x nat) (y nat)) nat + (match x + ((zero y) + ((s z) (s (plus z y)))))) +(define-fun-rec minus ((x nat) (y nat)) nat + (match x + ((zero zero) + ((s z) + (match y + (((s y2) (minus z y2)) + (zero zero))))))) +(define-fun-rec third ((x nat)) nat + (match x + ((zero zero) + ((s y) + (match y + ((zero zero) + ((s z) + (match z + ((zero zero) + ((s x2) + (plus (s zero) + (third (minus x (s (s (s zero)))))))))))))))) +(define-fun-rec leq ((x nat) (y nat)) Bool + (match x + ((zero true) + ((s z) + (match y + ((zero false) + ((s x2) (leq z x2)))))))) +(define-fun-rec ordered ((x list)) Bool + (match x + ((nil true) + ((cons y z) + (match z + ((nil true) + ((cons y2 xs) (and (leq y y2) (ordered z))))))))) +(define-fun sort2 ((x nat) (y nat)) list + (ite + (leq x y) (cons x (cons y nil)) + (cons y (cons x nil)))) +(define-fun-rec length ((x list)) nat + (match x + ((nil zero) + ((cons y l) (plus (s zero) (length l)))))) +(define-fun-rec drop ((x nat) (y list)) list + (match x + ((zero y) + ((s z) + (match y + ((nil nil) + ((cons z2 xs1) (drop z xs1)))))))) +(define-fun splitAt ((x nat) (y list)) pair + (pair2 (take x y) (drop x y))) +(define-fun-rec ++ ((x list) (y list)) list + (match x + ((nil y) + ((cons z xs) (cons z (++ xs y)))))) +(define-fun-rec reverse ((x list)) list + (match x + ((nil nil) + ((cons y xs) (++ (reverse xs) (cons y nil)))))) +(define-funs-rec + ((nstooge1sort2 + ((x list)) list) + (nstoogesort + ((x list)) list) + (nstooge1sort1 + ((x list)) list)) + ((match (splitAt (third (length x)) (reverse x)) + (((pair2 ys1 zs1) (++ (nstoogesort zs1) (reverse ys1))))) + (match x + ((nil nil) + ((cons y z) + (match z + ((nil (cons y nil)) + ((cons y2 x2) + (match x2 + ((nil (sort2 y y2)) + ((cons x3 x4) + (nstooge1sort2 (nstooge1sort1 (nstooge1sort2 x)))))))))))) + (match (splitAt (third (length x)) x) + (((pair2 ys1 zs) (++ ys1 (nstoogesort zs))))))) + +(assert-not (let ((two (s (s zero)))) + (and (even two) (not (odd two)) (ordered (nstoogesort (cons two nil)))))) \ No newline at end of file diff --git a/checks/sanity b/checks/sanity index e2bd015ab..aedff6949 100755 --- a/checks/sanity +++ b/checks/sanity @@ -78,3 +78,4 @@ check_szs_status Unsatisfiable -ind struct -nui on ind/mem_append.smt2 check_szs_status Unsatisfiable parse/types-funs.smt2 check_szs_status Unsatisfiable -newcnf on parse/types-funs.smt2 check_szs_status Unsatisfiable -t 2 parse/smtlib2-parametric-datatypes.smt2 +check_szs_status Unsatisfiable parse/smtlib2-mutual-recursion.smt2 From dbba08895878cd5635fb16ffb3d36e579ad5629d Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Wed, 8 Nov 2023 14:57:33 +0100 Subject: [PATCH 06/56] store the SubstitutionTree's in _trees as (unique) pointers --- Indexing/LiteralSubstitutionTree.cpp | 14 +++++++------- Indexing/LiteralSubstitutionTree.hpp | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Indexing/LiteralSubstitutionTree.cpp b/Indexing/LiteralSubstitutionTree.cpp index 88fade769..f2899f23a 100644 --- a/Indexing/LiteralSubstitutionTree.cpp +++ b/Indexing/LiteralSubstitutionTree.cpp @@ -56,7 +56,7 @@ SLQueryResultIterator LiteralSubstitutionTree::getAll() { return pvi( iterTraits(getRangeIterator((unsigned long)0, _trees.size())) - .flatMap([this](auto i) { return LeafIterator(&_trees[i]); }) + .flatMap([this](auto i) { return LeafIterator(_trees[i].get()); }) .flatMap([](Leaf* l) { return l->allChildren(); }) .map([](const LeafData& ld) { return SLQueryResult(ld.literal, ld.clause); }) ); @@ -66,24 +66,24 @@ SubstitutionTree& LiteralSubstitutionTree::getTree(Literal* lit, bool complement { auto idx = complementary ? lit->header() : lit->complementaryHeader(); while (idx >= _trees.size()) { - _trees.push(SubstitutionTree(_useC, /* rfSubs */ false)); + _trees.push(std::make_unique(_useC, /* rfSubs */ false)); } - return _trees[idx]; + return *_trees[idx].get(); } template SLQueryResultIterator LiteralSubstitutionTree::getResultIterator(Literal* lit, bool complementary, bool retrieveSubstitutions, bool useConstraints) { - auto iter = [&](bool reversed) + auto iter = [&](bool reversed) { return iterTraits(getTree(lit, complementary).iterator(lit, retrieveSubstitutions, useConstraints, reversed)) ; }; - auto filterResults = [=](auto it) { + auto filterResults = [=](auto it) { return pvi( std::move(it) .map([](QueryResult qr) { return SLQueryResult(qr.data->literal, qr.data->clause, qr.subst, qr.constr); }) - ); + ); }; - return !lit->commutative() + return !lit->commutative() ? filterResults(iter( /* reversed */ false)) : filterResults(concatIters( iter( /* reversed */ false), diff --git a/Indexing/LiteralSubstitutionTree.hpp b/Indexing/LiteralSubstitutionTree.hpp index c02b7ed62..a70fe01f0 100644 --- a/Indexing/LiteralSubstitutionTree.hpp +++ b/Indexing/LiteralSubstitutionTree.hpp @@ -69,7 +69,7 @@ class LiteralSubstitutionTree template SLQueryResultIterator getResultIterator(Literal* lit, bool complementary, bool retrieveSubstitutions, bool useConstraints); - Stack _trees; + Stack> _trees; bool _useC; }; From 006237191f49ebeda8e19538dca8aae20e182c06 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Wed, 8 Nov 2023 16:44:31 +0100 Subject: [PATCH 07/56] Get rid of nonsensical finite integer inductions with the same lower and upper bounds --- Inferences/Induction.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index e71f1a581..e05b6e1b5 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -953,6 +953,9 @@ void InductionClauseIterator::performIntInduction(const InductionContext& contex if (hasBound2) { // Finite interval induction, use two bounds on both x and y. TermList b2(optionalBound2->term); + if (b1 == b2) { + return; + } // create Xb2 (which is b2literal->functor() == less && optionalBound2->literal->isNegative()); From 9b51fb90ddbc48172333db8953f39b1e0d0fa954 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Thu, 9 Nov 2023 08:29:36 +0100 Subject: [PATCH 08/56] Refresh variables in result clauses to avoid collisions when indstrhyp=on and indu=on --- Inferences/Induction.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index e05b6e1b5..bb58120cc 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -769,6 +769,7 @@ IntUnionFind findDistributedVariants(const Stack& clauses, Substitution Clause* resolveClausesHelper(const InductionContext& context, const Stack& cls, IntUnionFind::ElementIterator eIt, Substitution& subst, bool generalized, bool applySubst) { // first create the clause with the required size + RobSubstitution renaming; ASS(eIt.hasNext()); auto cl = cls[eIt.next()]; unsigned newLength = cl->length(); @@ -811,12 +812,14 @@ Clause* resolveClausesHelper(const InductionContext& context, const Stack(curr,subst)); + resLit = tr.transform(SubstHelper::apply(curr,subst)); } else { - (*res)[next] = curr; + resLit = curr; } + (*res)[next] = renaming.apply(resLit,0); next++; } } @@ -835,7 +838,7 @@ Clause* resolveClausesHelper(const InductionContext& context, const Stack Date: Fri, 10 Nov 2023 10:26:47 +0100 Subject: [PATCH 09/56] Avoid inducting on the complement of a literal, this causes problems when resolving and its usefulness is also questionable --- Inferences/Induction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index bb58120cc..a9a0a04cb 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -353,9 +353,9 @@ struct InductionContextFn lits.insert(_lit); while (arg.second.hasNext()) { auto tqr = arg.second.next(); - // TODO: having the same literal multiple times has unwanted effects + // TODO: having the same literal multiple times or its complement has unwanted effects // in the clausification/resolution part, so avoid it for now - if (lits.contains(tqr.literal)) { + if (lits.contains(tqr.literal) || lits.contains(Literal::complementaryLiteral(tqr.literal))) { continue; } lits.insert(tqr.literal); From 6ed2be2bfb04fcaf0c8c07ab20f5a495533bca68 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Sat, 11 Nov 2023 12:57:54 +0100 Subject: [PATCH 10/56] Use NonVariableNonTypeIterator instead of SubtermIterator for iterating over induction terms in index --- Indexing/TermIndex.cpp | 43 +++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/Indexing/TermIndex.cpp b/Indexing/TermIndex.cpp index 33580c9fb..ca2b35ad1 100644 --- a/Indexing/TermIndex.cpp +++ b/Indexing/TermIndex.cpp @@ -146,26 +146,31 @@ void InductionTermIndex::handleClause(Clause* c, bool adding) { TIME_TRACE("induction term index maintenance"); - if (InductionHelper::isInductionClause(c)) { + if (!InductionHelper::isInductionClause(c)) { + return; + } + // Iterate through literals & check if the literal is suitable for induction - for (unsigned i=0;ilength();i++) { - Literal* lit = (*c)[i]; - if (InductionHelper::isInductionLiteral(lit)) { - SubtermIterator it(lit); - while (it.hasNext()) { - TermList tl = it.next(); - if (!tl.term()) continue; - // TODO: each term (and its subterms) should be processed - // only once per literal, see DemodulationSubtermIndex - Term* t = tl.term(); - if (InductionHelper::isInductionTermFunctor(t->functor()) && - InductionHelper::isIntInductionTermListInLiteral(t, lit)) { - if (adding) { - _is->insert(TypedTermList(t), lit, c); - } else { - _is->remove(TypedTermList(t), lit, c); - } - } + for (unsigned i=0;ilength();i++) { + Literal* lit = (*c)[i]; + if (!InductionHelper::isInductionLiteral(lit)) { + continue; + } + + DHSet done; + NonVariableNonTypeIterator it(lit); + while (it.hasNext()) { + Term* t = it.next(); + if (!done.insert(t)) { + it.right(); + continue; + } + if (InductionHelper::isInductionTermFunctor(t->functor()) && + InductionHelper::isIntInductionTermListInLiteral(t, lit)) { + if (adding) { + _is->insert(TypedTermList(t), lit, c); + } else { + _is->remove(TypedTermList(t), lit, c); } } } From 95e34d1ca721e5d8e956127f9f04c92528324755 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Sat, 11 Nov 2023 12:58:35 +0100 Subject: [PATCH 11/56] Skip sorts in SkolemSquashingTermReplacement --- Inferences/Induction.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index a9a0a04cb..beb923eb2 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -68,20 +68,21 @@ TermList TermReplacement::transformSubterm(TermList trm) TermList SkolemSquashingTermReplacement::transformSubterm(TermList trm) { - if(trm.isTerm()) { - auto t = trm.term(); - if (t==_o){ - return _r; - } - unsigned f = t->functor(); - if (env.signature->getFunction(f)->skolem()) { - unsigned v; - if (!_tv.find(t,v)) { - v = _v++; - _tv.insert(t,v); - } - return TermList(v,false); + if (trm.isVar() || trm.term()->isSort()) { + return trm; + } + auto t = trm.term(); + if (t==_o){ + return _r; + } + unsigned f = t->functor(); + if (env.signature->getFunction(f)->skolem()) { + unsigned v; + if (!_tv.find(t,v)) { + v = _v++; + _tv.insert(t,v); } + return TermList(v,false); } return trm; } From b65de5d2e6974c1243576b4f2e11b6f33675d766 Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Mon, 13 Nov 2023 10:01:55 +0000 Subject: [PATCH 12/56] extend and add sampler for induction, make indao an induction option (update tag) --- Shell/Options.cpp | 2 +- samplerIND.txt | 407 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 408 insertions(+), 1 deletion(-) create mode 100644 samplerIND.txt diff --git a/Shell/Options.cpp b/Shell/Options.cpp index 02a6741b0..836a02401 100644 --- a/Shell/Options.cpp +++ b/Shell/Options.cpp @@ -1432,7 +1432,7 @@ void Options::init() _inductionOnActiveOccurrences = BoolOptionValue("induction_on_active_occurrences","indao",false); _inductionOnActiveOccurrences.description = "Only use induction terms from active occurrences, generalize over active occurrences"; - _inductionOnActiveOccurrences.tag(OptionTag::INFERENCES); + _inductionOnActiveOccurrences.tag(OptionTag::INDUCTION); _inductionOnActiveOccurrences.reliesOn(_induction.is(notEqual(Induction::NONE))); _lookup.insert(&_inductionOnActiveOccurrences); diff --git a/samplerIND.txt b/samplerIND.txt new file mode 100644 index 000000000..b85b68b23 --- /dev/null +++ b/samplerIND.txt @@ -0,0 +1,407 @@ +# PREPROCESSING + +# blocked_clause_elimination +> bce ~cat off:5,on:1 + +# equality_proxy +> ep ~cat off:70,RST:2,R:3,RSTC:2,RS:3 +# mono_ep +ep!=off > mep ~cat on:10,off:1 + +# equality_resolution_with_deletion +> erd ~cat on:10,off:1 + +# function_definition_elimination +> fde ~cat all:5,none:1,unused:1 + +# general_splitting +> gsp ~cat off:8,on:1 + +# inline_let -- this is probably irrelevant on TPTP anyway +> ile ~cat off:10,on:1 + +# newcnf +> newcnf ~cat on:9,off:25 + +# naming +> $nm ~cat Z:1,NZ:5 +$nm=Z > nm ~cat 0:1 +$nm=NZ > nm ~sgd 0.07,2 + +# inequality_splitting +> ins ~cat 0:20,1:4,2:3,3:2,4:1 + +# random_polarities +> rp ~cat off:3,on:1 + +# twee_goal_transformation +> tgt ~cat off:10,ground:6,full:5 + +# set_of_support +> sos ~cat off:80,on:17,all:10 + +# sine_selection +> ss ~cat off:1182,included:135,axioms:392 + +# sine_depth +ss!=off > sd ~cat 0:45,1:13,2:12,3:5,4:4,5:4,7:3,10:2,12:1,15:1 + +# sine_generality_threshold +ss!=off > sgt ~cat 0:7,5:1,10:1,15:1,20:1,30:1,50:1,100:1 + +# sine_tolerance +ss!=off > st ~cat -1.0:50,1.0:150,1.5:37,2.0:60,2.5:20,3.0:70,3.5:15,4.0:60,4.5:15,5.0:50,5.5:10,6.0:30,7.0:20 + +# unused_predicate_definition_removal +> updr ~cat on:16,off:1 + +# SATURATION + +# saturation_algorithms +> sa ~cat lrs:600,discount:572,otter:236 + +# literal selection +> $s_pos ~cat Y:4,N:1 +$s_pos=Y > s ~cat 0:11,1:31,2:52,3:21,4:22,10:300,11:131,20:11,21:66,22:11,30:6,31:14,32:4,33:10,34:3,35:8,666:50,1002:141,1003:14,1004:23,1010:145,1011:357,1666:50 +$s_pos=N > s ~cat -1:31,-2:52,-3:21,-4:22,-10:300,-11:131,-20:11,-21:66,-22:11,-30:6,-31:14,-32:4,-33:10,-34:3,-35:8,-666:50,-1002:141,-1003:14,-1004:23,-1010:145,-1011:357,-1666:50 + +# lookahaed_delay +> $ls ~cat off:1 +s=11 > $ls ~cat on:1 +s=-11 > $ls ~cat on:1 +s=1011 > $ls ~cat on:1 +s=-1011 > $ls ~cat on:1 + +$ls=on > lsd ~cat 0:20,1:1,5:1,10:1,20:1,50:1,100:1 + +# age_weight_ratio +> awr ~u2r -10;4;: + +# random_awr +> rawr ~cat on:4,off:1 + +# lrs_weight_limit_only +sa=lrs > lwlo ~cat off:5,on:1 + +# lrs_estimate_correction_coef +sa=lrs > lecc ~cat 1:10,666:1 +lecc!=1 > lecc ~uf 0.5,2.0 + +# age_weight_ratio_shape +> awrs ~cat constant:8,decay:1,converge:1 + +# age_weight_ratio_shape_frequency +awrs!=constant > awrsf ~ui 1,500 + +# nongoal_weight_coefficient +> nwc ~cat 1:2,2:1 +nwc!=1 > nwc ~ui 2,15 + +# restrict_nwc_to_goal_constants +nwc!=1 > rnwc ~cat off:5,on:1 + +# literal_maximality_aftercheck +> lma ~cat off:500,on:83 + +# POSITIVE LITERAL SPLIT QUEUE +> plsq ~cat off:4,on:1 + +# positive_literal_split_queue_layered_arrangement +plsq=on > plsql ~cat on:66,off:162 + +# positive_literal_split_queue_cutoffs +plsq=on > plsqc ~cat 0:117,1:92,2:19,3:5,4:1 + +# positive_literal_split_queue_ratios +plsq=on > plsqr ~u2r -5;7;, + +# INFERENCES + +# superposition (don't turn this off at home!) +> sup ~cat on:100,off:1 + +# simultaneous_superposition +sup=on > sims ~cat on:50,off:1 + +# superposition_from_variables +sup=on > sfv ~cat on:38,off:1 + +# forward_subsumption +> fs ~cat on:500,off:31 + +# forward_subsumption_resolution +fs=off > fsr ~cat off:1 +fs=on > fsr ~cat on:500,off:193 + +# forward_subsumption_demodulation +> fsd ~cat off:500,on:90 + +# forward_subsumption_demodulation_max_matches +fsd=on > fsdmm ~cat 0:10,1:3,2:2,3:1 + +# backward_demodulation +> bd ~cat all:500,off:245,preordered:91 + +# backward_subsumption +fs!=off > bs ~cat off:500,unit_only:74,on:64 + +# backward_subsumption_resolution +> bsr ~cat off:500,unit_only:118,on:75 + +# backward_subsumption_demodulation +> bsd ~cat off:500,on:74 + +# backward_subsumption_demodulation_max_matches +bsd=on > bsdmm ~cat 0:10,1:3,2:2,3:1 + +# binary_resolution +> br ~cat on:8,off:1 + +# condensation +> cond ~cat off:500,on:89,fast:61 + +# demodulation_redundancy_check +> drc ~cat encompass:500,on:500,off:354 + +# equational_tautology_removal +> etr ~cat off:500,on:30 + +# extensionality_resolution +ins=0 > er ~cat off:500,known:25,filter:26 + +# extensionality_allow_pos_eq +er=filter > erape ~cat off:3,on:1 + +# extensionality_max_length +er!=off > erml ~cat 0:3,2:1,3:1 + +# fool_paramodulation +> foolp ~cat off:10,on:1 + +# forward_demodulation +> fd ~cat all:500,off:41,preordered:168 + +# forward_literal_rewriting +> flr ~cat off:8,on:1 + +# function_definition_introduction +> fdi ~cat 0:100,2:1,4:1,8:1,16:1,32:1,64:1,128:1,256:1,512:1,1024:1 + +# inner_rewriting +> irw ~cat off:165,on:6 + +# unit_resulting_resolution +> urr ~cat off:1200,ec_only:162,on:340 + +# SINE LEVELS and shit + +# sine_to_age +> s2a ~cat off:2,on:1 + +# sine_level_split_queue +> slsq ~cat off:5,on:1 + +# sine_level_split_queue_layered_arrangement +slsq=on > slsql ~cat on:1,off:1 + +# sine_level_split_queue_cutoffs +slsq=on > slsqc ~cat 0:10,1:10,2:6,3:3,4:1 + +# sine_level_split_queue_ratios +slsq=on > slsqr ~u2r -5;2;, + +# ORDERING + +# term_ordering +> to ~cat kbo:13,lpo:4 + +# symbol_precedence +> sp ~cat arity:100,const_min:72,frequency:130,const_frequency:49,reverse_frequency:55,reverse_arity:72,weighted_frequency:24,unary_first:28,occurrence:82,unary_frequency:14,const_max:18 +# symbol_precedence_boost +> spb ~cat none:200,units:78,goal:91,goal_then_units:93,non_intro:14,intro:12 + +# kbo_max_zero +to=kbo > kmz ~cat off:200,on:1 +# kbo_weight_scheme +to=kbo > kws ~cat const:50,inv_arity_squared:6,precedence:28,arity_squared:1,inv_arity:5,inv_frequency:8,frequency:2 + +# literal_comparison_mode +> lcm ~cat standard:500,reverse:66,predicate:51 + +# sine_to_pred_levels +lcm=standard > s2pl ~cat off:50,on:2,no:3 + +# SINE LEVELS - configure (must come after sine_to_age & slsq & s2pl) + +# set $s2a as the disjunction: s2a=on | slsq=on | s2pl!=off +> $s2a ~cat off:1 +s2a=on > $s2a ~cat on:1 +slsq=on > $s2a ~cat on:1 +s2pl!=off > $s2a ~cat on:1 + +# now configure (stealing the values from sine proper, which is not ideal, but should do) + +# sine_to_age_generality_threshold +$s2a=on > s2agt ~cat 0:7,5:1,10:1,15:1,20:1,30:1,50:1,100:1 + +# sine_to_age_tolerance +$s2a=on > s2at ~cat -1.0:50,1.0:150,1.5:37,2.0:60,2.5:20,3.0:70,3.5:15,4.0:60,4.5:15,5.0:50,5.5:10,6.0:30,7.0:20 + +# AVATAR +> av ~cat on:15,off:4 + +# avatar_add_complementary +av=on > aac ~cat none:147,ground:600 + +# avatar_buffered_solver +av=on > abs ~cat on:63,off:300 + +# avatar_congruence_closure +av=on > acc ~cat off:600,model:24,on:58 + +# cc_unsat_cores +acc!=off > ccuc ~cat first:1,small_ones:1,all:3 + +# avatar_minimize_model +av=on acc=model > amm ~cat all:600,off:69 +av=on acc!=model > amm ~cat all:600,sco:32,off:69 + +# avatar_eager_removal +av=on amm=all > aer ~cat on:300,off:1 + +# avatar_delete_deactivated +av=on > add ~cat on:300,large:55,off:8 + +# avatar_fast_restart +av=on > afr ~cat off:10,on:1 + +# avatar_literal_polarity_advice +av=on > alpa ~cat none:300,false:13,true:6,random:4 + +# avatar_nonsplittable_components +av=on > anc ~cat known:300,all_dependent:38,all:45,none:48 + +# avatar_turn_off_time_frac +av=on > atotf ~cat 1.0:10,0.5:1 +# careful that 1.0 becomes "1" by the ->toFloat->toStr internal transformation +atotf!=1 > atotf ~uf 0.0,0.5 + +# avatar_flush_period +av=on > afp ~cat 0:15,1:1 +afp!=0 > afp ~cat 1:1,10:1,50:1,300:1,1000:1,2000:1,4000:1,10000:1,40000:1,100000:1,1000000:1 + +# avatar_flush_quotient +afp!=0 > afq ~uf 1.0,3.0 + +# nonliterals_in_clause_weight +av=on > nicw ~cat off:600,on:76 + +# split_at_activation +av=on > sac ~cat off:3,on:1 + +# TODO: consider enabling this for vampire_z3 compiles! +# av=on > sas ~cat minisat:10,z3:1 + +# AVATAR SPLIT QUEUE + +# avatar_split_queue +av=on > avsq ~cat off:5,on:1 + +# avatar_split_queue_layered_arrangement +avsq=on > avsql ~cat off:4,on:1 + +# avatar_split_queue_cutoffs +avsq=on > avsqc ~cat 0:80,1:30,2:20,3:20,4:10,5:5 + +# avatar_split_queue_ratios +avsq=on > avsqr ~u2r -5;3;, + +# GLOBAL SUBSUMPTION (only after AVATAR -- careful of dependencies!) +# global_subsumption +> gs ~cat off:5,on:1 + +# global_subsumption_explicit_minim +gs=on > gsem ~cat randomized:50,on:5,off:17 + +# global_subsumption_sat_solver_power +gs=on > gsssp ~cat propagation_only:20,full:1 + +# global_subsumption_avatar_assumptions +gs=on av=on > gsaa ~cat off:30,from_current:11,full_model:3 + +# MISC + +> uhcvi ~cat off:1,on:1 + +# GOAL GUESSING - useful for indution on SMTLIB problems (without assert-not) + +# guess_the_goal +> gtg ~cat off:10,all:1,exists_top:1,exists_all:1,exists_sym:1,position:1 + +# guess_the_goal_limit +gtg!=off > gtgl ~ui 1,5 + +# INDUCTION (focusing on structural) + +# function_definition_rewriting +> fnrw ~cat off:3,on:1 + +# induction +> ind ~cat none:5,struct:10,int:1,both:1 + +# induction_choice +ind!=none > indc ~cat all:3,goal:1,goal_plus:1 + +# induction_gen +# Marton: toggles generalizing over occurrences, when on it inducts separately on all non-empty subsets of each induction term (very explosive) +ind!=none > indgen ~cat off:5,on:1 + +# max_induction_gen_subset_size +indgen=on > indgenss ~cat 0:5,1:5,2:5,3:20,4:3,5:2,6:1,7:1,8:1,9:1 + +# induction_max_depth +# Marton: maximum depth of inductions, this could be useful when you want to restrict the search space, but hard to set to a reasonably low yet effective value in my experience. +ind!=none > indmd ~sgd 0.3,0 + +# induction_neg_only +ind!=none > indn ~cat on:5,off:1 + +# induction_on_complex_terms +ind!=none > indoct ~cat off:5,on:1 + +# induction_strengthen_hypothesis +# Marton: this strengthens the inductions by replacing any Skolem constant not inducted upon with variables, so the hypotheses might be easier to apply. But since the inductions are changed, some proofs may be lost when enabling this. This is mostly useful when the problem involves function definitions that recurse on multiple arguments, so at some point I wanted to add logic to enable it automatically when the conjecture has such function definitions.. I can still do it if needed. +ind!=none > indstrhyp ~cat off:5,on:1 + +# induction_unit_only +ind!=none > indu ~cat on:5,off:1 + +# non_unit_induction +ind!=none > nui ~cat off:5,on:1 + +# induction_on_active_occurrences +ind!=none > indao ~cat off:3,on:1 + +# structural_induction_kind +ind!=none ind!=int > sik ~cat one:5,two:1,three:1,recursion:2,all:1 + +# below integer induction only + +# int_induction_kind +ind!=none ind!=struct > iik ~cat one:5,two:1,all:1 + +# int_induction_default_bound +ind!=none ind!=struct > intinddb ~cat off:5,on:1 + +# int_induction_interval +ind!=none ind!=struct > intindint ~cat both:3,infinite:1,finite:1 + +# int_induction_strictness_comp +ind!=none ind!=struct > intindstcomp ~cat toplevel_not_in_other:10,none:1,only_one_occurrence:1,not_in_both:1,always:1 + +# int_induction_strictness_eq +ind!=none ind!=struct > intindsteq ~cat none:10,toplevel_not_in_other:1,only_one_occurrence:1,not_in_both:1,always:1 + +# int_induction_strictness_term +ind!=none ind!=struct > intindstterm ~cat interpreted_constant:3,none:1,no_skolems:1 + From 052ac72c004a35a931d259a81ac6785d48941e64 Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Mon, 13 Nov 2023 15:18:11 +0100 Subject: [PATCH 13/56] be a bit less strict about INT_GREATER and co appearing in clauses (some may sneak in under ep=RSTC, until it's fixed) --- Inferences/InductionHelper.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Inferences/InductionHelper.cpp b/Inferences/InductionHelper.cpp index aed15e3ac..a4af4fad5 100644 --- a/Inferences/InductionHelper.cpp +++ b/Inferences/InductionHelper.cpp @@ -53,7 +53,10 @@ bool isIntegerComparisonLiteral(Literal* lit) { case Theory::INT_GREATER_EQUAL: case Theory::INT_GREATER: // All formulas should be normalized to only use INT_LESS and not other integer comparison predicates. - ASSERTION_VIOLATION; + + // Equality proxy may generate useless congruence axioms for the likes of INT_GREATER + // (although they only appeared in the input and are eliminated by now -> but this also means they are safe to ingore) + ASS_EQ(env.options->equalityProxy(),Options::EqualityProxy::RSTC); default: // Not an integer comparison. return false; From 4d581ed24a195af70795ba4331f9543e2afaf829 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Mon, 13 Nov 2023 19:51:20 +0100 Subject: [PATCH 14/56] Fix tests --- Test/SyntaxSugar.hpp | 6 +++++- UnitTests/tFunctionDefinitionHandler.cpp | 4 ++++ UnitTests/tInduction.cpp | 7 +++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Test/SyntaxSugar.hpp b/Test/SyntaxSugar.hpp index 68212baab..5bcaf6ce3 100644 --- a/Test/SyntaxSugar.hpp +++ b/Test/SyntaxSugar.hpp @@ -390,7 +390,11 @@ class TermSugar : public ExpressionSugar { ASS_REP(!_sugaredExpr.isEmpty(), _sugaredExpr); if(!_sugaredExpr.isVar()){ - _srt = SortHelper::getResultSort(_sugaredExpr.term()); + if (_sugaredExpr.term()->isLiteral()) { + _srt = AtomicSort::boolSort(); + } else { + _srt = SortHelper::getResultSort(_sugaredExpr.term()); + } } } diff --git a/UnitTests/tFunctionDefinitionHandler.cpp b/UnitTests/tFunctionDefinitionHandler.cpp index 069cfcddd..a49e9c389 100644 --- a/UnitTests/tFunctionDefinitionHandler.cpp +++ b/UnitTests/tFunctionDefinitionHandler.cpp @@ -11,11 +11,15 @@ #include "Test/UnitTesting.hpp" #include "Test/SyntaxSugar.hpp" +#include + #include "Kernel/FormulaUnit.hpp" #include "Shell/FunctionDefinitionHandler.hpp" using namespace Shell; +using std::get; +using std::pair; #define MY_SYNTAX_SUGAR \ DECL_DEFAULT_VARS \ diff --git a/UnitTests/tInduction.cpp b/UnitTests/tInduction.cpp index dff4d07d0..5086a0652 100644 --- a/UnitTests/tInduction.cpp +++ b/UnitTests/tInduction.cpp @@ -1150,10 +1150,13 @@ auto setup = [](SaturationAlgorithm& salg) { Stack st; for (const auto& t : fd) { LiteralStack lits; - for (const auto& l : get<2>(t)) { + auto fnLits = get<2>(t); + for (const auto& l : fnLits) { lits.push(l); } - st.push({ get<0>(t).sugaredExpr().term(), get<1>(t).sugaredExpr(), lits }); + auto header = get<0>(t); + auto body = get<1>(t); + st.push({ header.sugaredExpr().term(), body.sugaredExpr(), lits }); } salg.getFunctionDefinitionHandler()->addFunction(st, fu); } From 4cde9011c110e8b3a35ce013574ffb9ad7410fa9 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Mon, 13 Nov 2023 19:57:11 +0100 Subject: [PATCH 15/56] Avoid passing literals to InductionHelper::isInductionTermFunctor --- Indexing/TermIndex.cpp | 16 ++++++++++------ Inferences/Induction.cpp | 5 ++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Indexing/TermIndex.cpp b/Indexing/TermIndex.cpp index ca2b35ad1..d5a3bae0b 100644 --- a/Indexing/TermIndex.cpp +++ b/Indexing/TermIndex.cpp @@ -165,6 +165,9 @@ void InductionTermIndex::handleClause(Clause* c, bool adding) it.right(); continue; } + if (t->isLiteral()) { + continue; + } if (InductionHelper::isInductionTermFunctor(t->functor()) && InductionHelper::isIntInductionTermListInLiteral(t, lit)) { if (adding) { @@ -182,7 +185,7 @@ void StructInductionTermIndex::handleClause(Clause* c, bool adding) if (!InductionHelper::isInductionClause(c)) { return; } - static DHSet inserted; + static DHSet inserted; // Iterate through literals & check if the literal is suitable for induction for (unsigned i=0;ilength();i++) { inserted.reset(); @@ -190,15 +193,16 @@ void StructInductionTermIndex::handleClause(Clause* c, bool adding) if (!lit->ground()) { continue; } - SubtermIterator it(lit); + NonVariableNonTypeIterator it(lit); while (it.hasNext()) { - TermList tl = it.next(); - if (!inserted.insert(tl)) { + Term* t = it.next(); + if (!inserted.insert(t)) { it.right(); continue; } - ASS(tl.isTerm()); - Term* t = tl.term(); + if (t->isLiteral()) { + continue; + } if (InductionHelper::isInductionTermFunctor(t->functor()) && InductionHelper::isStructInductionTerm(t)) { if (adding) { diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index beb923eb2..f3648787a 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -388,7 +388,10 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) NonVariableNonTypeIterator it(lit); while(it.hasNext()){ Term* ts = it.next(); - unsigned f = ts->functor(); + if (ts->isLiteral()) { + continue; + } + unsigned f = ts->functor(); if(InductionHelper::isInductionTermFunctor(f)){ if(InductionHelper::isStructInductionOn() && InductionHelper::isStructInductionTerm(ts)){ From 89fa555faffd73272d90b7992090ad19a5469a24 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Tue, 14 Nov 2023 17:13:39 +0100 Subject: [PATCH 16/56] Try signed number of variants to allow underflow --- Inferences/Induction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index f3648787a..0a7e8a230 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -701,7 +701,7 @@ IntUnionFind findDistributedVariants(const Stack& clauses, Substitution auto cl = clauses[i]; Stack conclusionLits(toResolve.size()); #if VDEBUG - Stack variantCounts(toResolve.size()); + Stack variantCounts(toResolve.size()); #endif // we first find the conclusion literals in cl, exactly 1 from // each of toResolve and save how many variants it should have @@ -755,7 +755,7 @@ IntUnionFind findDistributedVariants(const Stack& clauses, Substitution uf.doUnion(i,j); } } - ASS_EQ(variantCounts[k],0); + ASS_LE(variantCounts[k],0); } } uf.evalComponents(); From b8697f3e8c61b38446617d58d8fb4337f2353428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petra=20Hozzov=C3=A1?= Date: Wed, 15 Nov 2023 15:03:17 +0100 Subject: [PATCH 17/56] If ind lit is a comparison and ind term its direct argument, disallow the other argument as a bound --- Inferences/Induction.cpp | 26 +++++++++++++++++---- Inferences/InductionHelper.cpp | 42 +++++++++++++++++----------------- Inferences/InductionHelper.hpp | 8 ++++++- 3 files changed, 50 insertions(+), 26 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index 0a7e8a230..bf9959c5f 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -410,17 +410,35 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) auto leBound = iterTraits(_helper.getLess(t)).collect(); auto grBound = iterTraits(_helper.getGreater(t)).collect(); auto indLitsIt = vi(ContextSubsetReplacement::instance(InductionContext(t, lit, premise), _opt)); + // If the induction literal is a comparison, and the induction term + // is one of its arguments, the other argument should not be allowed + // as a bound (such inductions are useless and can lead to redundant + // literals in the induction axiom). + // Here find the other argument and later only allow bounds different from it. + Term* otherArg = nullptr; + if (InductionHelper::isIntegerComparisonLiteral(lit)) { + for (unsigned i = 0; i < 2; ++i) { + TermList* tp1 = lit->nthArgument(i); + if (tp1->isTerm() && t == tp1->term()) { + TermList* tp2 = lit->nthArgument(1-i); + if (tp2->isTerm()) { + otherArg = tp2->term(); + break; + } + } + } + } while (indLitsIt.hasNext()) { auto ctx = indLitsIt.next(); // process lower bounds for (const auto& b1 : leBound) { - if (b1.clause == premise) { + if (!InductionHelper::isValidBound(otherArg, premise, b1)) { continue; } if (_helper.isInductionForFiniteIntervalsOn()) { // process upper bounds together with current lower bound for (const auto& b2 : grBound) { - if (b2.clause == premise) { + if (!InductionHelper::isValidBound(otherArg, premise, b2)) { continue; } performFinIntInduction(ctx, b1, b2); @@ -434,7 +452,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) // process upper bounds if (_helper.isInductionForInfiniteIntervalsOn()) { for (const auto& b2 : grBound) { - if (b2.clause == premise) { + if (!InductionHelper::isValidBound(otherArg, premise, b2)) { continue; } performInfIntInduction(ctx, false, b2); @@ -446,7 +464,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) static TermQueryResult defaultBound(TermList(theory->representConstant(IntegerConstantType(0))), nullptr, nullptr); // for now, represent default bounds with no bound in the index, this is unique // since the placeholder is still int - if (notDoneInt(ctx, nullptr, nullptr, e)) { + if (notDoneInt(ctx, nullptr, nullptr, e) && InductionHelper::isValidBound(otherArg, premise, defaultBound)) { performIntInduction(ctx, e, true, defaultBound, nullptr); performIntInduction(ctx, e, false, defaultBound, nullptr); } diff --git a/Inferences/InductionHelper.cpp b/Inferences/InductionHelper.cpp index a4af4fad5..7ba7a5869 100644 --- a/Inferences/InductionHelper.cpp +++ b/Inferences/InductionHelper.cpp @@ -43,27 +43,6 @@ struct SLQueryResultToTermQueryResultFn TermList variable; }; -bool isIntegerComparisonLiteral(Literal* lit) { - if (!lit->ground() || !theory->isInterpretedPredicate(lit)) return false; - switch (theory->interpretPredicate(lit)) { - case Theory::INT_LESS: - // The only supported integer comparison predicate is INT_LESS. - break; - case Theory::INT_LESS_EQUAL: - case Theory::INT_GREATER_EQUAL: - case Theory::INT_GREATER: - // All formulas should be normalized to only use INT_LESS and not other integer comparison predicates. - - // Equality proxy may generate useless congruence axioms for the likes of INT_GREATER - // (although they only appeared in the input and are eliminated by now -> but this also means they are safe to ingore) - ASS_EQ(env.options->equalityProxy(),Options::EqualityProxy::RSTC); - default: - // Not an integer comparison. - return false; - } - return true; -} - }; // namespace TermQueryResultIterator InductionHelper::getComparisonMatch( @@ -109,6 +88,27 @@ bool InductionHelper::isIntInductionOn() { return intInd; } +bool InductionHelper::isIntegerComparisonLiteral(Literal* lit) { + if (!lit->ground() || !theory->isInterpretedPredicate(lit)) return false; + switch (theory->interpretPredicate(lit)) { + case Theory::INT_LESS: + // The only supported integer comparison predicate is INT_LESS. + break; + case Theory::INT_LESS_EQUAL: + case Theory::INT_GREATER_EQUAL: + case Theory::INT_GREATER: + // All formulas should be normalized to only use INT_LESS and not other integer comparison predicates. + + // Equality proxy may generate useless congruence axioms for the likes of INT_GREATER + // (although they only appeared in the input and are eliminated by now -> but this also means they are safe to ingore) + ASS_EQ(env.options->equalityProxy(),Options::EqualityProxy::RSTC); + default: + // Not an integer comparison. + return false; + } + return true; +} + bool InductionHelper::isIntInductionOneOn() { return isIntInductionOn() && (env.options->intInduction() == Options::IntInductionKind::ONE); } diff --git a/Inferences/InductionHelper.hpp b/Inferences/InductionHelper.hpp index 82cd8df91..627331ce2 100644 --- a/Inferences/InductionHelper.hpp +++ b/Inferences/InductionHelper.hpp @@ -42,17 +42,23 @@ class InductionHelper { TermQueryResultIterator getTQRsForInductionTerm(Term* inductionTerm); static bool isIntegerComparison(Clause* c); + static bool isIntegerComparisonLiteral(Literal* l); static bool isIntInductionOn(); static bool isIntInductionOneOn(); static bool isIntInductionTwoOn(); static bool isInductionForFiniteIntervalsOn(); - static bool isInductionForInfiniteIntervalsOn(); static bool isStructInductionOn(); + static bool isInductionForInfiniteIntervalsOn(); + static bool isStructInductionOn(); static bool isNonUnitStructInductionOn(); static bool isInductionClause(Clause* c); static bool isInductionLiteral(Literal* l); static bool isInductionTermFunctor(unsigned f); static bool isIntInductionTermListInLiteral(Term* tl, Literal* l); static bool isStructInductionTerm(Term* t); + static bool isValidBound(Term* t, Clause* c, const TermQueryResult& b) { + ASS(b.term.isTerm()); + return (b.clause != c && (t != b.term.term())); + } private: TermQueryResultIterator getComparisonMatch(bool polarity, bool termIsLeft, Term* t); From ecde0e25fee3e2accabfd07c6ab64f7756ec3b6f Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Wed, 15 Nov 2023 16:12:30 +0100 Subject: [PATCH 18/56] Fix crash in AcyclicityIndex --- Indexing/AcyclicityIndex.cpp | 48 ++++++++++++++++++------------------ Indexing/AcyclicityIndex.hpp | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Indexing/AcyclicityIndex.cpp b/Indexing/AcyclicityIndex.cpp index 31b9bbae2..bdee6f212 100644 --- a/Indexing/AcyclicityIndex.cpp +++ b/Indexing/AcyclicityIndex.cpp @@ -41,22 +41,22 @@ namespace Indexing return n; } - void addSubterm(TermList t, List*& l) + void addSubterm(TypedTermList t, List*& l) { - List::Iterator it(l); + List::Iterator it(l); while (it.hasNext()) { // TODO test for unifiability, keep only most general term if (TermList::equals(t, it.next())) { return; } } - List::push(t, l); + List::push(t, l); } - List* AcyclicityIndex::getSubterms(Term *t) + List* AcyclicityIndex::getSubterms(Term *t) { Stack toVisit; - List* res = List::empty(); + List* res = List::empty(); TermList sort = SortHelper::getResultSort(t); ASS(env.signature->isTermAlgebraSort(sort)); @@ -64,7 +64,7 @@ namespace Indexing for (unsigned i = 0; i < t->arity(); i++) { if (SortHelper::getArgSort(t, i) == sort) { TermList *s = t->nthArgument(i); - addSubterm(*s, res); + addSubterm(TypedTermList(*s,sort), res); if (s->isTerm()) { toVisit.push(s->term()); } @@ -77,7 +77,7 @@ namespace Indexing for (unsigned i = 0; i < u->arity(); i++) { if (SortHelper::getArgSort(u, i) == sort) { TermList *s = u->nthArgument(i); - addSubterm(*s, res); + addSubterm(TypedTermList(*s,sort), res); if (s->isTerm()) { toVisit.push(s->term()); } @@ -121,7 +121,7 @@ namespace Indexing struct AcyclicityIndex::IndexEntry { public: - IndexEntry(Literal *l, Clause *c, TermList t, List* subterms) : + IndexEntry(Literal *l, Clause *c, TypedTermList t, List* subterms) : lit(l), clause(c), t(t), @@ -132,13 +132,13 @@ namespace Indexing Literal* lit; Clause* clause; - TermList t; - List* subterms; + TypedTermList t; + List* subterms; }; struct AcyclicityIndex::CycleSearchTreeNode { - CycleSearchTreeNode(TermList t, + CycleSearchTreeNode(TypedTermList t, Literal *l, Clause *c, CycleSearchTreeNode *n, @@ -155,7 +155,7 @@ namespace Indexing isUnificationNode(b) {} - static CycleSearchTreeNode *subtermNode(TermList t, + static CycleSearchTreeNode *subtermNode(TypedTermList t, Literal *l, Clause *c, CycleSearchTreeNode *n, @@ -164,7 +164,7 @@ namespace Indexing return new CycleSearchTreeNode(t, l, c, n, n ? n->depth + 1 : 0, substIndex, false); } - static CycleSearchTreeNode *unificationNode(TermList t, + static CycleSearchTreeNode *unificationNode(TypedTermList t, Literal *l, Clause *c, CycleSearchTreeNode *n, @@ -175,7 +175,7 @@ namespace Indexing USE_ALLOCATOR(AcyclicityIndex::CycleSearchTreeNode); - TermList term; + TypedTermList term; Literal *lit; Clause *clause; CycleSearchTreeNode *parent; @@ -260,11 +260,11 @@ namespace Indexing return new CycleQueryResult(l, c, cTheta); } - void pushUnificationsOnStack(TermList t, CycleSearchTreeNode *parent) + void pushUnificationsOnStack(TypedTermList t, CycleSearchTreeNode *parent) { - ASS(t.isTerm()); + // ASS(t.isTerm()); ASS(_tis); - TermQueryResultIterator tqrIt = _tis->getUnifications(TypedTermList(t.term())); + TermQueryResultIterator tqrIt = _tis->getUnifications(t); int index; while (tqrIt.hasNext()) { TermQueryResult tqr = tqrIt.next(); @@ -276,7 +276,7 @@ namespace Indexing } else { index = _nextAvailableIndex++; } - _stack.push(CycleSearchTreeNode::unificationNode(tqr.term, + _stack.push(CycleSearchTreeNode::unificationNode(TypedTermList(tqr.term,t.sort()), tqr.literal, tqr.clause, parent, @@ -341,9 +341,9 @@ namespace Indexing } if (_index->find(make_pair(n->lit, n->clause))) { IndexEntry *entry = _index->get(make_pair(n->lit, n->clause)); - List::Iterator it(entry->subterms); + List::Iterator it(entry->subterms); while (it.hasNext()) { - TermList t = it.next(); + TypedTermList t = it.next(); _stack.push(CycleSearchTreeNode::subtermNode(t, entry->lit, entry->clause, @@ -352,7 +352,7 @@ namespace Indexing } } } else { - pushUnificationsOnStack(_subst->apply(n->term, n->substIndex), n); + pushUnificationsOnStack(TypedTermList(_subst->apply(n->term, n->substIndex),_subst->apply(n->term.sort(), n->substIndex)), n); } } return false; @@ -409,8 +409,8 @@ namespace Indexing ULit ulit = make_pair(lit, c); if (!index->find(ulit)) { - index->insert(ulit, new IndexEntry(lit, c, *t, getSubterms(fs->term()))); - _tis->insert(TypedTermList(t->term()), lit, c); + index->insert(ulit, new IndexEntry(lit, c, TypedTermList(*t,sort), getSubterms(fs->term()))); + _tis->insert(TypedTermList(*t, sort), lit, c); } } } @@ -427,7 +427,7 @@ namespace Indexing return; _sIndexes.get(sort)->remove(ulit); - _tis->remove(TypedTermList(t->term()), lit, c); + _tis->remove(TypedTermList(*t, sort), lit, c); } } diff --git a/Indexing/AcyclicityIndex.hpp b/Indexing/AcyclicityIndex.hpp index 8e5bffe3b..15116505c 100644 --- a/Indexing/AcyclicityIndex.hpp +++ b/Indexing/AcyclicityIndex.hpp @@ -72,7 +72,7 @@ class AcyclicityIndex void handleClause(Kernel::Clause* c, bool adding); private: bool matchesPattern(Kernel::Literal *lit, Kernel::TermList *&fs, Kernel::TermList *&t, TermList *sort); - Lib::List* getSubterms(Kernel::Term *t); + Lib::List* getSubterms(Kernel::Term *t); struct IndexEntry; struct CycleSearchTreeNode; From d68599b16b1a6774cad3925ff25123eec7fd6bf5 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Wed, 15 Nov 2023 16:12:46 +0100 Subject: [PATCH 19/56] Add flag for term algebra exhaustiveness axiom --- Shell/Options.cpp | 5 +++++ Shell/Options.hpp | 2 ++ Shell/TheoryAxioms.cpp | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Shell/Options.cpp b/Shell/Options.cpp index d7dabf452..e32bc346e 100644 --- a/Shell/Options.cpp +++ b/Shell/Options.cpp @@ -1583,6 +1583,11 @@ void Options::init() _lookup.insert(&_termAlgebraInferences); _termAlgebraInferences.tag(OptionTag::THEORIES); + _termAlgebraExhaustivenessAxiom = BoolOptionValue("term_algebra_exhaustiveness_axiom","taea",true); + _termAlgebraExhaustivenessAxiom.description="Enable term algebra exhaustiveness axiom"; + _lookup.insert(&_termAlgebraExhaustivenessAxiom); + _termAlgebraExhaustivenessAxiom.tag(OptionTag::THEORIES); + _termAlgebraCyclicityCheck = ChoiceOptionValue("term_algebra_acyclicity","tac", TACyclicityCheck::OFF,{"off","axiom","rule","light"}); _termAlgebraCyclicityCheck.description= diff --git a/Shell/Options.hpp b/Shell/Options.hpp index caaa559d1..3d8b92f20 100644 --- a/Shell/Options.hpp +++ b/Shell/Options.hpp @@ -2210,6 +2210,7 @@ bool _hard; ExtensionalityResolution extensionalityResolution() const { return _extensionalityResolution.actualValue; } bool FOOLParamodulation() const { return _FOOLParamodulation.actualValue; } bool termAlgebraInferences() const { return _termAlgebraInferences.actualValue; } + bool termAlgebraExhaustivenessAxiom() const { return _termAlgebraExhaustivenessAxiom.actualValue; } TACyclicityCheck termAlgebraCyclicityCheck() const { return _termAlgebraCyclicityCheck.actualValue; } unsigned extensionalityMaxLength() const { return _extensionalityMaxLength.actualValue; } bool extensionalityAllowPosEq() const { return _extensionalityAllowPosEq.actualValue; } @@ -2508,6 +2509,7 @@ bool _hard; BoolOptionValue _termAlgebraInferences; ChoiceOptionValue _termAlgebraCyclicityCheck; + BoolOptionValue _termAlgebraExhaustivenessAxiom; BoolOptionValue _fmbNonGroundDefs; UnsignedOptionValue _fmbStartSize; diff --git a/Shell/TheoryAxioms.cpp b/Shell/TheoryAxioms.cpp index ca4ed7886..5fc00e6a6 100644 --- a/Shell/TheoryAxioms.cpp +++ b/Shell/TheoryAxioms.cpp @@ -1069,7 +1069,9 @@ void TheoryAxioms::apply() while (tas.hasNext()) { TermAlgebra* ta = tas.next(); - addExhaustivenessAxiom(ta); + if (env.options->termAlgebraExhaustivenessAxiom()) { + addExhaustivenessAxiom(ta); + } addDistinctnessAxiom(ta); addInjectivityAxiom(ta); addDiscriminationAxiom(ta); From d5c4d814bef13ee9b0304646e66db3c17d2f40c8 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Thu, 16 Nov 2023 13:51:12 +0100 Subject: [PATCH 20/56] Fix some unit tests; add back well-foundedness and well-definedness check --- CMakeLists.txt | 2 +- Shell/FunctionDefinitionHandler.cpp | 126 ++++++++++++------------- UnitTests/tInductionGeneralization.cpp | 109 --------------------- 3 files changed, 63 insertions(+), 174 deletions(-) delete mode 100644 UnitTests/tInductionGeneralization.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index d216db03f..dc7e02872 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -609,6 +609,7 @@ set(VAMPIRE_SHELL_SOURCES Shell/EqualityProxyMono.hpp Shell/Flattening.hpp Shell/FunctionDefinition.hpp + Shell/FunctionDefinitionHandler.hpp Shell/GeneralSplitting.hpp Shell/InequalitySplitting.hpp Shell/InterpolantMinimizer.hpp @@ -744,7 +745,6 @@ set(UNIT_TESTS UnitTests/tIterator.cpp UnitTests/tOption.cpp UnitTests/tStack.cpp - UnitTests/tInductionGeneralization.cpp UnitTests/tTermAlgebra.cpp UnitTests/tFnDefRewriting.cpp UnitTests/tFunctionDefinitionHandler.cpp diff --git a/Shell/FunctionDefinitionHandler.cpp b/Shell/FunctionDefinitionHandler.cpp index 89f4c0ee6..0df8eb273 100644 --- a/Shell/FunctionDefinitionHandler.cpp +++ b/Shell/FunctionDefinitionHandler.cpp @@ -353,8 +353,7 @@ bool InductionTemplate::checkWellFoundedness() } } } - return true; - // return InductionPreprocessor::checkWellFoundedness(relatedTerms); + return InductionPreprocessor::checkWellFoundedness(relatedTerms); } InductionTemplate::InductionTemplate(const Term* t) @@ -479,69 +478,68 @@ bool InductionPreprocessor::checkWellFoundedness(const vvector bool InductionPreprocessor::checkWellDefinedness(const vvector& cases, vvector>& missingCases) { - return true; + if (cases.empty()) { + return false; + } + missingCases.clear(); + auto arity = cases[0]->arity(); + if (arity == 0) { + return true; + } + Stack> availableTermsLists; + availableTermsLists.push(Stack(arity)); + unsigned var = 0; + for (unsigned i = 0; i < arity; i++) { + availableTermsLists.top().push(TermStack({ TermList(var++, false) })); + } + + for (auto& c : cases) { + Stack> nextAvailableTermsLists; + for (unsigned i = 0; i < arity; i++) { + auto arg = *c->nthArgument(i); + // we check lazily for non-term algebra sort non-variables + if (arg.isTerm() && env.signature->isTermAlgebraSort(SortHelper::getResultSort(arg.term()))) { + auto tempLists = availableTermsLists; + for (auto& availableTerms : tempLists) { + TermAlgebra::excludeTermFromAvailables(availableTerms[i], arg, var); + } + for (auto&& e : tempLists) { + nextAvailableTermsLists.push(std::move(e)); + } + } else { + for (const auto& availableTerms : availableTermsLists) { + if (!availableTerms[i].isEmpty()) { + break; + } + } + } + } + availableTermsLists = nextAvailableTermsLists; + } - // if (cases.empty()) { - // return false; - // } - // missingCases.clear(); - // auto arity = cases[0]->arity(); - // if (arity == 0) { - // return true; - // } - // vvector> availableTermsLists; - // availableTermsLists.emplace_back(arity); - // unsigned var = 0; - // for (unsigned i = 0; i < arity; i++) { - // availableTermsLists.back()[i].push(TermList(var++, false)); - // } - - // for (auto& c : cases) { - // vvector> nextAvailableTermsLists; - // for (unsigned i = 0; i < arity; i++) { - // auto arg = *c->nthArgument(i); - // // we check lazily for non-term algebra sort non-variables - // if (arg.isTerm() && env.signature->isTermAlgebraSort(SortHelper::getResultSort(arg.term()))) { - // auto tempLists = availableTermsLists; - // for (auto& availableTerms : tempLists) { - // TermAlgebra::excludeTermFromAvailables(availableTerms[i], arg, var); - // } - // nextAvailableTermsLists.insert(nextAvailableTermsLists.end(), - // tempLists.begin(), tempLists.end()); - // } else { - // for (const auto& availableTerms : availableTermsLists) { - // if (!availableTerms[i].isEmpty()) { - // break; - // } - // } - // } - // } - // availableTermsLists = nextAvailableTermsLists; - // } - - // for (const auto& availableTerms : availableTermsLists) { - // bool valid = true; - // vvector> argTuples(1); - // for (const auto& v : availableTerms) { - // if (v.isEmpty()) { - // valid = false; - // break; - // } - // vvector> temp; - // for (const auto& e : v) { - // for (auto a : argTuples) { - // a.push_back(e); - // temp.push_back(a); - // } - // } - // argTuples = temp; - // } - // if (valid) { - // missingCases.insert(missingCases.end(), - // argTuples.begin(), argTuples.end()); - // } - // } - // return missingCases.empty(); + for (const auto& availableTerms : availableTermsLists) { + bool valid = true; + vvector> argTuples(1); + for (const auto& v : availableTerms) { + if (v.isEmpty()) { + valid = false; + break; + } + vvector> temp; + for (const auto& e : v) { + for (auto a : argTuples) { + a.push_back(e); + temp.push_back(a); + } + } + argTuples = temp; + } + if (valid) { + missingCases.insert(missingCases.end(), + argTuples.begin(), argTuples.end()); + } + } + return missingCases.empty(); } } // Shell diff --git a/UnitTests/tInductionGeneralization.cpp b/UnitTests/tInductionGeneralization.cpp deleted file mode 100644 index 201af7044..000000000 --- a/UnitTests/tInductionGeneralization.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * This file is part of the source code of the software program - * Vampire. It is protected by applicable - * copyright laws. - * - * This source code is distributed under the licence found here - * https://vprover.github.io/license.html - * and in the source directory - */ - -#include "Test/UnitTesting.hpp" -/*#include "Shell/InductionSchemeGenerator.hpp" -#include "Inferences/GeneralInduction.hpp" - -using namespace Shell; -using namespace Inferences; - -void check_bits(Occurrences occ, unsigned c, unsigned m) { - while (m > 0) { - m >>= 1; - ASS_EQ(occ.pop_last(), c & 1); - c >>= 1; - } -} - -TEST_FUN(Occurrences1) { - Occurrences occ(1); - occ.add(0); - occ.add(1); - occ.add(1); - occ.add(0); - occ.add(0); - occ.finalize(); - const unsigned bits = 6; - ASS_EQ(occ.num_bits(), bits); - ASS_EQ(occ.num_set_bits(), 3); - check_bits(occ, 0b001101, (1 << bits)); - ASS(occ.next()); - check_bits(occ, 0b001111, (1 << bits)); - ASS(occ.next()); - check_bits(occ, 0b011101, (1 << bits)); - ASS(occ.next()); - check_bits(occ, 0b011111, (1 << bits)); - ASS(occ.next()); - check_bits(occ, 0b101101, (1 << bits)); - ASS(occ.next()); - check_bits(occ, 0b101111, (1 << bits)); - ASS(occ.next()); - check_bits(occ, 0b111101, (1 << bits)); - ASS(occ.next()); - check_bits(occ, 0b111111, (1 << bits)); - ASS(!occ.next()); -} - -TEST_FUN(OccurrenceMap1) { - Literal* l1 = reinterpret_cast(1); - Literal* l2 = reinterpret_cast(2); - Term* t1 = reinterpret_cast(1); - Term* t2 = reinterpret_cast(2); - OccurrenceMap occMap; - occMap.add(l1, t1, 1); - occMap.add(l1, t1, 1); - occMap.add(l1, t1, 0); - occMap.add(l1, t1, 0); - - occMap.add(l2, t2, 0); - occMap.add(l2, t2, 1); - occMap.add(l2, t2, 0); - occMap.add(l2, t2, 1); - - occMap.finalize(); - - auto check_next = [&l1, &l2, &t1, &t2](unsigned b1, unsigned b2, IteratorCore& occ) { - auto ng = occ.next(); - check_bits(ng._m.find(make_pair(l1, t1))->second, b1, (1 << 4)); - check_bits(ng._m.find(make_pair(l2, t2))->second, b2, (1 << 4)); - }; - - NoGeneralizationIterator ngit(occMap); - check_next(0b1111, 0b1111, ngit); - ASS(!ngit.hasNext()); - - GeneralizationIterator git1(occMap, false, false); - check_next(0b0011, 0b1010, git1); - check_next(0b0111, 0b1010, git1); - check_next(0b1011, 0b1010, git1); - check_next(0b1111, 0b1010, git1); - check_next(0b0011, 0b1011, git1); - check_next(0b0111, 0b1011, git1); - check_next(0b1011, 0b1011, git1); - check_next(0b1111, 0b1011, git1); - check_next(0b0011, 0b1110, git1); - check_next(0b0111, 0b1110, git1); - check_next(0b1011, 0b1110, git1); - check_next(0b1111, 0b1110, git1); - check_next(0b0011, 0b1111, git1); - check_next(0b0111, 0b1111, git1); - check_next(0b1011, 0b1111, git1); - check_next(0b1111, 0b1111, git1); - ASS(!git1.hasNext()); - - GeneralizationIterator git2(occMap, true, true); - check_next(0b0011, 0b1010, git2); - check_next(0b1111, 0b1010, git2); - check_next(0b0011, 0b1111, git2); - check_next(0b1111, 0b1111, git2); - ASS(!git2.hasNext()); -} - */ \ No newline at end of file From b8c8a4dfa86d9a0513f31b4a151628bc8db1adc0 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Thu, 16 Nov 2023 14:19:04 +0100 Subject: [PATCH 21/56] Fix fn def rewriting tests --- Inferences/FnDefRewriting.cpp | 81 +++++++++-------------------- Shell/FunctionDefinitionHandler.hpp | 4 +- UnitTests/tFnDefRewriting.cpp | 6 +++ 3 files changed, 33 insertions(+), 58 deletions(-) diff --git a/Inferences/FnDefRewriting.cpp b/Inferences/FnDefRewriting.cpp index 249040cd8..2478aaa39 100644 --- a/Inferences/FnDefRewriting.cpp +++ b/Inferences/FnDefRewriting.cpp @@ -156,23 +156,9 @@ Clause *FnDefRewriting::perform( TermList tgtTerm = EqHelper::getOtherEqualitySide(eqLit, eqLHS); - TermList tgtTermS; - if (!subst->isIdentityOnQueryWhenResultBound()) { - //When we apply substitution to the rhs, we get a term, that is - //a variant of the term we'd like to get, as new variables are - //produced in the substitution application. - TermList lhsSBadVars = subst->applyToResult(eqLHS); - TermList rhsSBadVars = subst->applyToResult(tgtTerm); - Renaming rNorm, qNorm, qDenorm; - rNorm.normalizeVariables(lhsSBadVars); - qNorm.normalizeVariables(tgtTerm); - qDenorm.makeInverse(qNorm); - ASS_EQ(rwTerm, qDenorm.apply(rNorm.apply(lhsSBadVars))); - tgtTermS = qDenorm.apply(rNorm.apply(rhsSBadVars)); - } - else { - tgtTermS = subst->applyToBoundResult(tgtTerm); - } + // This should be the case for code trees + ASS(subst->isIdentityOnQueryWhenResultBound()); + TermList tgtTermS = subst->applyToBoundResult(tgtTerm); // update this to latest encompassment-considering version if (toplevelCheck) { @@ -209,56 +195,39 @@ Clause *FnDefRewriting::perform( Clause *res = new (newLength) Clause(newLength, inf); - static bool doSimS = env.options->simulatenousSuperposition(); (*res)[0] = tgtLitS; unsigned next = 1; for (unsigned i = 0; i < rwLength; i++) { Literal *curr = (*rwClause)[i]; - if (curr != rwLit) { - if (doSimS) { - curr = EqHelper::replace(curr, rwTerm, tgtTermS); - } - - if (EqHelper::isEqTautology(curr)) { - isEqTautology = true; - res->destroy(); - return 0; - } + if (curr == rwLit) { + continue; + } + curr = EqHelper::replace(curr, rwTerm, tgtTermS); - (*res)[next++] = curr; + if (EqHelper::isEqTautology(curr)) { + isEqTautology = true; + res->destroy(); + return 0; } - } - { - for (unsigned i = 0; i < eqLength; i++) { - Literal *curr = (*eqClause)[i]; - if (curr != eqLit) { - Literal *currAfter; - if (!subst->isIdentityOnQueryWhenResultBound()) { - // same as above for RHS - TermList lhsSBadVars = subst->applyToResult(eqLHS); - Literal *currSBadVars = subst->applyToResult(curr); - Renaming rNorm, qNorm, qDenorm; - rNorm.normalizeVariables(lhsSBadVars); - qNorm.normalizeVariables(curr); - qDenorm.makeInverse(qNorm); - ASS_EQ(rwTerm, qDenorm.apply(rNorm.apply(lhsSBadVars))); - currAfter = qDenorm.apply(rNorm.apply(currSBadVars)); - } - else { - currAfter = subst->applyToBoundResult(curr); - } + (*res)[next++] = curr; + } - if (EqHelper::isEqTautology(currAfter)) { - isEqTautology = true; - res->destroy(); - return 0; - } + for (unsigned i = 0; i < eqLength; i++) { + Literal* curr = (*eqClause)[i]; + if (curr == eqLit) { + continue; + } + Literal* currAfter = subst->applyToBoundResult(curr); - (*res)[next++] = currAfter; - } + if (EqHelper::isEqTautology(currAfter)) { + isEqTautology = true; + res->destroy(); + return 0; } + + (*res)[next++] = currAfter; } return res; diff --git a/Shell/FunctionDefinitionHandler.hpp b/Shell/FunctionDefinitionHandler.hpp index 1a82950f2..2332e3eea 100644 --- a/Shell/FunctionDefinitionHandler.hpp +++ b/Shell/FunctionDefinitionHandler.hpp @@ -16,7 +16,7 @@ #define __FunctionDefinitionHandler__ #include "Forwards.hpp" -#include "Indexing/TermSubstitutionTree.hpp" +#include "Indexing/CodeTreeInterfaces.hpp" #include "Kernel/TermTransformer.hpp" #include "TermAlgebra.hpp" #include "Lib/STL.hpp" @@ -104,7 +104,7 @@ class FunctionDefinitionHandler Branch substituteBoundVariable(unsigned var, TermList t, const Branch& b, TermList body); Branch addCondition(Literal* lit, const Branch& b, TermList body); - TermSubstitutionTree _is; + CodeTreeTIS _is; vmap, InductionTemplate*> _templates; }; diff --git a/UnitTests/tFnDefRewriting.cpp b/UnitTests/tFnDefRewriting.cpp index 8924be3e7..7f820664b 100644 --- a/UnitTests/tFnDefRewriting.cpp +++ b/UnitTests/tFnDefRewriting.cpp @@ -72,6 +72,7 @@ auto setup = [](SaturationAlgorithm& salg) { TEST_GENERATION(test_01, Generation::TestCase() .setup(setup) + .options({ { "function_definition_rewriting", "on"} }) .input( clause({ b != f(b, y), p(x) })) .expected(exactly( clause({ b != y, p(x) }) @@ -81,6 +82,7 @@ TEST_GENERATION(test_01, TEST_GENERATION(test_02, Generation::TestCase() .setup(setup) + .options({ { "function_definition_rewriting", "on"} }) .input( clause({ g(b) == g(r(x)), p(x) })) .expected(exactly( clause({ f(b,b) == g(r(x)), p(x) }) @@ -91,6 +93,7 @@ TEST_GENERATION(test_02, TEST_GENERATION(test_03, Generation::TestCase() .setup(setup) + .options({ { "function_definition_rewriting", "on"} }) .input( clause({ g(r(x)) == f(x, r(x)) })) .expected(none()) ) @@ -99,6 +102,7 @@ TEST_GENERATION(test_03, TEST_GENERATION(test_04, Generation::TestCase() .setup(setup) + .options({ { "function_definition_rewriting", "on"} }) .input( clause({ f(r(b),f(b, y)) == f(y, r(y)) })) .expected({ clause({ f(r(b),y) == f(y, r(y)) }), @@ -111,6 +115,7 @@ TEST_GENERATION(test_04, TEST_GENERATION(test_05, Generation::TestCase() .setup(setup) + .options({ { "function_definition_rewriting", "on"} }) .input( clause({ g(r(r(r(b)))) != b, g(b) == b })) .expected({ clause({ f(r(r(b)),g(r(b))) != b, g(b) == b, p(r(b)), r(b) != b() }), @@ -122,6 +127,7 @@ TEST_GENERATION(test_05, TEST_GENERATION(test_06, Generation::TestCase() .setup(setup) + .options({ { "function_definition_rewriting", "on"} }) .input( clause({ f(b,b) == b })) .expected(none()) ) From 905f9506071322bff88e119b8910b537a71440f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petra=20Hozzov=C3=A1?= Date: Thu, 16 Nov 2023 20:06:41 +0100 Subject: [PATCH 22/56] Check bound validity also when the main premise is a bound --- Inferences/Induction.cpp | 25 +++++++-------- Inferences/Induction.hpp | 1 + Inferences/InductionHelper.cpp | 57 +++++++++++++++++++++------------- Inferences/InductionHelper.hpp | 2 +- 4 files changed, 49 insertions(+), 36 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index bf9959c5f..721be375c 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -415,19 +415,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) // as a bound (such inductions are useless and can lead to redundant // literals in the induction axiom). // Here find the other argument and later only allow bounds different from it. - Term* otherArg = nullptr; - if (InductionHelper::isIntegerComparisonLiteral(lit)) { - for (unsigned i = 0; i < 2; ++i) { - TermList* tp1 = lit->nthArgument(i); - if (tp1->isTerm() && t == tp1->term()) { - TermList* tp2 = lit->nthArgument(1-i); - if (tp2->isTerm()) { - otherArg = tp2->term(); - break; - } - } - } - } + Term* otherArg = InductionHelper::getOtherTermFromComparison(lit, t); while (indLitsIt.hasNext()) { auto ctx = indLitsIt.next(); // process lower bounds @@ -579,10 +567,19 @@ void InductionClauseIterator::processIntegerComparison(Clause* premise, Literal* // loop over literals containing the current induction term while (it.hasNext()) { auto ctx = it.next(); + Formula* f = ctx.getFormula(indtl, false); + ASS(f->connective() == LITERAL); + Literal* indLit = f->literal(); + Clause* indCl = ctx._cls.begin()->first; + ASS((indLit != nullptr) && (indCl != nullptr)); + Term* otherArg = InductionHelper::getOtherTermFromComparison(indLit, indt); + if (!InductionHelper::isValidBound(otherArg, indCl, b)) { + continue; + } if (_helper.isInductionForFiniteIntervalsOn()) { // go over the lower/upper bounds that contain the same induction term as the current bound for (const auto& b2 : bound2) { - if (b2.clause == ctx._cls.begin()->first) { + if (!InductionHelper::isValidBound(otherArg, indCl, b2)) { ASS_EQ(ctx._cls.size(), 1); continue; } diff --git a/Inferences/Induction.hpp b/Inferences/Induction.hpp index c10620e15..2b54a0805 100644 --- a/Inferences/Induction.hpp +++ b/Inferences/Induction.hpp @@ -25,6 +25,7 @@ #include "Indexing/LiteralIndex.hpp" #include "Indexing/TermIndex.hpp" +#include "Kernel/Formula.hpp" #include "Kernel/TermTransformer.hpp" #include "Kernel/Theory.hpp" diff --git a/Inferences/InductionHelper.cpp b/Inferences/InductionHelper.cpp index 7ba7a5869..20e9c6304 100644 --- a/Inferences/InductionHelper.cpp +++ b/Inferences/InductionHelper.cpp @@ -43,6 +43,27 @@ struct SLQueryResultToTermQueryResultFn TermList variable; }; +bool isIntegerComparisonLiteral(Literal* lit) { + if (!lit->ground() || !theory->isInterpretedPredicate(lit)) return false; + switch (theory->interpretPredicate(lit)) { + case Theory::INT_LESS: + // The only supported integer comparison predicate is INT_LESS. + break; + case Theory::INT_LESS_EQUAL: + case Theory::INT_GREATER_EQUAL: + case Theory::INT_GREATER: + // All formulas should be normalized to only use INT_LESS and not other integer comparison predicates. + + // Equality proxy may generate useless congruence axioms for the likes of INT_GREATER + // (although they only appeared in the input and are eliminated by now -> but this also means they are safe to ingore) + ASS_EQ(env.options->equalityProxy(),Options::EqualityProxy::RSTC); + default: + // Not an integer comparison. + return false; + } + return true; +} + }; // namespace TermQueryResultIterator InductionHelper::getComparisonMatch( @@ -88,27 +109,6 @@ bool InductionHelper::isIntInductionOn() { return intInd; } -bool InductionHelper::isIntegerComparisonLiteral(Literal* lit) { - if (!lit->ground() || !theory->isInterpretedPredicate(lit)) return false; - switch (theory->interpretPredicate(lit)) { - case Theory::INT_LESS: - // The only supported integer comparison predicate is INT_LESS. - break; - case Theory::INT_LESS_EQUAL: - case Theory::INT_GREATER_EQUAL: - case Theory::INT_GREATER: - // All formulas should be normalized to only use INT_LESS and not other integer comparison predicates. - - // Equality proxy may generate useless congruence axioms for the likes of INT_GREATER - // (although they only appeared in the input and are eliminated by now -> but this also means they are safe to ingore) - ASS_EQ(env.options->equalityProxy(),Options::EqualityProxy::RSTC); - default: - // Not an integer comparison. - return false; - } - return true; -} - bool InductionHelper::isIntInductionOneOn() { return isIntInductionOn() && (env.options->intInduction() == Options::IntInductionKind::ONE); } @@ -253,4 +253,19 @@ bool InductionHelper::isStructInductionTerm(Term* t) { ); } +Term* InductionHelper::getOtherTermFromComparison(Literal* l, Term* t) { + if (isIntegerComparisonLiteral(l)) { + for (unsigned i = 0; i < 2; ++i) { + TermList* tp1 = l->nthArgument(i); + if (tp1->isTerm() && t == tp1->term()) { + TermList* tp2 = l->nthArgument(1-i); + if (tp2->isTerm()) { + return tp2->term(); + } + } + } + } + return nullptr; +} + } // namespace Inferences diff --git a/Inferences/InductionHelper.hpp b/Inferences/InductionHelper.hpp index 627331ce2..5739feec8 100644 --- a/Inferences/InductionHelper.hpp +++ b/Inferences/InductionHelper.hpp @@ -42,7 +42,6 @@ class InductionHelper { TermQueryResultIterator getTQRsForInductionTerm(Term* inductionTerm); static bool isIntegerComparison(Clause* c); - static bool isIntegerComparisonLiteral(Literal* l); static bool isIntInductionOn(); static bool isIntInductionOneOn(); static bool isIntInductionTwoOn(); @@ -59,6 +58,7 @@ class InductionHelper { ASS(b.term.isTerm()); return (b.clause != c && (t != b.term.term())); } + static Term* getOtherTermFromComparison(Literal* l, Term* t); private: TermQueryResultIterator getComparisonMatch(bool polarity, bool termIsLeft, Term* t); From 6e4dae03afd357e0c473f5a44dc55d66dd9c0423 Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Thu, 16 Nov 2023 19:47:27 +0100 Subject: [PATCH 23/56] make InterpretedNormalizer a BottomUpTermTransformer (how could it have survived so wrong for so long?), fix BottomUpTermTransformer to be compatible with specialTerms, stop being silly about many overloads of transform --- Inferences/Induction.cpp | 8 +- Kernel/FormulaTransformer.cpp | 4 +- Kernel/InterpretedLiteralEvaluator.cpp | 10 +- Kernel/TermTransformer.cpp | 222 +++++++++++++------------ Kernel/TermTransformer.hpp | 37 +++-- Shell/AnswerExtractor.cpp | 2 +- Shell/BlockedClauseElimination.cpp | 4 +- Shell/InterpretedNormalizer.cpp | 10 +- Shell/TweeGoalTransformation.cpp | 2 +- 9 files changed, 157 insertions(+), 142 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index 721be375c..940e2d46e 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -94,7 +94,7 @@ Formula* InductionContext::getFormula(TermReplacement& tr, bool opposite) const for (const auto& kv : _cls) { auto argList = FormulaList::empty(); for (const auto& lit : kv.second) { - auto tlit = tr.transform(lit); + auto tlit = tr.transformLiteral(lit); FormulaList::push(new AtomicFormula(opposite ? Literal::complementaryLiteral(tlit) : tlit), argList); } FormulaList::push(JunctionFormula::generalJunction(opposite ? Connective::AND : Connective::OR, argList), argLists); @@ -153,7 +153,7 @@ InductionContext ContextReplacement::next() InductionContext context(_context._indTerm); for (const auto& kv : _context._cls) { for (const auto& lit : kv.second) { - auto tlit = transform(lit); + auto tlit = transformLiteral(lit); if (tlit != lit) { context.insert(kv.first, tlit); } @@ -223,7 +223,7 @@ InductionContext ContextSubsetReplacement::next() { _matchCount = 0; for (const auto& kv : _context._cls) { for (const auto& lit : kv.second) { - auto tlit = transform(lit); + auto tlit = transformLiteral(lit); if (tlit != lit) { context.insert(kv.first, tlit); } @@ -834,7 +834,7 @@ Clause* resolveClausesHelper(const InductionContext& context, const Stack(curr,subst)); + resLit = tr.transformLiteral(SubstHelper::apply(curr,subst)); } else { resLit = curr; } diff --git a/Kernel/FormulaTransformer.cpp b/Kernel/FormulaTransformer.cpp index ff0f3d1ed..55ec7d3da 100644 --- a/Kernel/FormulaTransformer.cpp +++ b/Kernel/FormulaTransformer.cpp @@ -216,7 +216,7 @@ Formula* FormulaTransformer::applyQuantified(Formula* f) Formula* TermTransformingFormulaTransformer::applyLiteral(Formula* f) { Literal* lit = f->literal(); - Literal* res = _termTransformer.transform(lit); + Literal* res = _termTransformer.transformLiteral(lit); if(lit==res) { return f; } return new AtomicFormula(res); } @@ -228,7 +228,7 @@ Formula* TermTransformingFormulaTransformer::applyLiteral(Formula* f) Formula* BottomUpTermTransformerFormulaTransformer::applyLiteral(Formula* f) { Literal* lit = f->literal(); - Literal* res = _termTransformer.transform(lit); + Literal* res = _termTransformer.transformLiteral(lit); if(lit==res) { return f; } return new AtomicFormula(res); } diff --git a/Kernel/InterpretedLiteralEvaluator.cpp b/Kernel/InterpretedLiteralEvaluator.cpp index 856fcf685..d7bdff868 100644 --- a/Kernel/InterpretedLiteralEvaluator.cpp +++ b/Kernel/InterpretedLiteralEvaluator.cpp @@ -1207,14 +1207,14 @@ bool InterpretedLiteralEvaluator::balance(Literal* lit,Literal*& resLit,Stack
  • functor()==0){ - resLit = BottomUpTermTransformer::transform(Literal::createEquality(lit->polarity(),t2,t1,srt)); + resLit = BottomUpTermTransformer::transformLiteral(Literal::createEquality(lit->polarity(),t2,t1,srt)); } else{ // important, need to preserve the ordering of t1 and t2 in the original! if(swap){ - resLit = BottomUpTermTransformer::transform(Literal::create2(lit->functor(),lit->polarity(),t2,t1)); + resLit = BottomUpTermTransformer::transformLiteral(Literal::create2(lit->functor(),lit->polarity(),t2,t1)); }else{ - resLit = BottomUpTermTransformer::transform(Literal::create2(lit->functor(),lit->polarity(),t1,t2)); + resLit = BottomUpTermTransformer::transformLiteral(Literal::create2(lit->functor(),lit->polarity(),t1,t2)); } } return true; @@ -1426,7 +1426,7 @@ bool InterpretedLiteralEvaluator::evaluate(Literal* lit, bool& isConstant, Liter : lit; DEBUG( "\t0 ==> ", resLit->toString() ); - resLit = BottomUpTermTransformer::transform( resLit); + resLit = BottomUpTermTransformer::transformLiteral( resLit); DEBUG( "\t1 ==> ", resLit->toString() ); // // If it can be balanced we balance it @@ -1478,7 +1478,7 @@ bool InterpretedLiteralEvaluator::evaluate(Literal* lit, bool& isConstant, Liter case PredEvalResult::Simplified: // resLit = r.simplified_val; - resLit = BottomUpTermTransformer::transform(r.simplified_val); + resLit = BottomUpTermTransformer::transformLiteral(r.simplified_val); break; case PredEvalResult::Trivial: diff --git a/Kernel/TermTransformer.cpp b/Kernel/TermTransformer.cpp index 71c3a0046..b27c6ed5a 100644 --- a/Kernel/TermTransformer.cpp +++ b/Kernel/TermTransformer.cpp @@ -23,6 +23,97 @@ namespace Kernel using namespace std; + +Literal* TermTransformerCommon::transformLiteral(Literal* lit) +{ + Term* t = transform(static_cast(lit)); + ASS(t->isLiteral()); + return static_cast(t); +} + +Term* TermTransformerCommon::transformSpecial(Term* term) +{ + ASS(term->isSpecial()); + + Term::SpecialTermData* sd = term->getSpecialData(); + switch (sd->specialFunctor()) { + case Term::SpecialFunctor::ITE: { + Formula* condition = transform(sd->getCondition()); + TermList thenBranch = transform(*term->nthArgument(0)); + TermList elseBranch = transform(*term->nthArgument(1)); + + if ((condition == sd->getCondition()) && + (thenBranch == *term->nthArgument(0)) && + (elseBranch == *term->nthArgument(1))) { + return term; + } else { + return Term::createITE(condition, thenBranch, elseBranch, sd->getSort()); + } + } + + case Term::SpecialFunctor::FORMULA: { + Formula* formula = transform(sd->getFormula()); + + if (formula == sd->getFormula()) { + return term; + } else { + return Term::createFormula(formula); + } + } + + case Term::SpecialFunctor::LET: { + TermList binding = transform(sd->getBinding()); + TermList body = transform(*term->nthArgument(0)); + + if ((binding == sd->getBinding() && (body == *term->nthArgument(0)))) { + return term; + } else { + return Term::createLet(sd->getFunctor(), sd->getVariables(), binding, body, sd->getSort()); + } + } + + case Term::SpecialFunctor::LET_TUPLE: { + TermList binding = transform(sd->getBinding()); + TermList body = transform(*term->nthArgument(0)); + + if ((binding == sd->getBinding()) && (body == *term->nthArgument(0))) { + return term; + } else { + return Term::createTupleLet(sd->getFunctor(), sd->getTupleSymbols(), binding, body, sd->getSort()); + } + break; + } + + case Term::SpecialFunctor::TUPLE: { + Term* tupleTerm = transform(sd->getTupleTerm()); + + if (tupleTerm == sd->getTupleTerm()) { + return term; + } else { + return Term::createTuple(tupleTerm); + } + } + + case Term::SpecialFunctor::LAMBDA: + NOT_IMPLEMENTED; + case Term::SpecialFunctor::MATCH: { + DArray terms(term->arity()); + bool unchanged = true; + for (unsigned i = 0; i < term->arity(); i++) { + terms[i] = transform(*term->nthArgument(i)); + unchanged = unchanged && (terms[i] == *term->nthArgument(i)); + } + + if (unchanged) { + return term; + } + return Term::createMatch(sd->getSort(), sd->getMatchedSort(), term->arity(), terms.begin()); + } + + } + ASSERTION_VIOLATION_REP(term->toString()); +} + /** * TODO: functions transform and transformSpecial call each other to process FOOL subterms, * a fully non-recursive implementation is pretty complicated and is left for the future @@ -134,96 +225,6 @@ Term* TermTransformer::transform(Term* term) } } -Literal* TermTransformer::transform(Literal* lit) -{ - Term* t = transform(static_cast(lit)); - ASS(t->isLiteral()); - return static_cast(t); -} - -Term* TermTransformer::transformSpecial(Term* term) -{ - ASS(term->isSpecial()); - - Term::SpecialTermData* sd = term->getSpecialData(); - switch (sd->specialFunctor()) { - case Term::SpecialFunctor::ITE: { - Formula* condition = transform(sd->getCondition()); - TermList thenBranch = transform(*term->nthArgument(0)); - TermList elseBranch = transform(*term->nthArgument(1)); - - if ((condition == sd->getCondition()) && - (thenBranch == *term->nthArgument(0)) && - (elseBranch == *term->nthArgument(1))) { - return term; - } else { - return Term::createITE(condition, thenBranch, elseBranch, sd->getSort()); - } - } - - case Term::SpecialFunctor::FORMULA: { - Formula* formula = transform(sd->getFormula()); - - if (formula == sd->getFormula()) { - return term; - } else { - return Term::createFormula(formula); - } - } - - case Term::SpecialFunctor::LET: { - TermList binding = transform(sd->getBinding()); - TermList body = transform(*term->nthArgument(0)); - - if ((binding == sd->getBinding() && (body == *term->nthArgument(0)))) { - return term; - } else { - return Term::createLet(sd->getFunctor(), sd->getVariables(), binding, body, sd->getSort()); - } - } - - case Term::SpecialFunctor::LET_TUPLE: { - TermList binding = transform(sd->getBinding()); - TermList body = transform(*term->nthArgument(0)); - - if ((binding == sd->getBinding()) && (body == *term->nthArgument(0))) { - return term; - } else { - return Term::createTupleLet(sd->getFunctor(), sd->getTupleSymbols(), binding, body, sd->getSort()); - } - break; - } - - case Term::SpecialFunctor::TUPLE: { - Term* tupleTerm = transform(sd->getTupleTerm()); - - if (tupleTerm == sd->getTupleTerm()) { - return term; - } else { - return Term::createTuple(tupleTerm); - } - } - - case Term::SpecialFunctor::LAMBDA: - NOT_IMPLEMENTED; - case Term::SpecialFunctor::MATCH: { - DArray terms(term->arity()); - bool unchanged = true; - for (unsigned i = 0; i < term->arity(); i++) { - terms[i] = transform(*term->nthArgument(i)); - unchanged = unchanged && (terms[i] == *term->nthArgument(i)); - } - - if (unchanged) { - return term; - } - return Term::createMatch(sd->getSort(), sd->getMatchedSort(), term->arity(), terms.begin()); - } - - } - ASSERTION_VIOLATION_REP(term->toString()); -} - TermList TermTransformer::transform(TermList ts) { // first let's try transforming ts directly @@ -249,19 +250,17 @@ Formula* TermTransformer::transform(Formula* f) Term* BottomUpTermTransformer::transform(Term* term) { - ASS(term->shared()); + if (term->isSpecial()) { + return transformSpecial(term); + } - static Stack toDo(8); - static Stack terms(8); - static Stack args(8); - /* all stacks must be reset since the function might have been aborted by an exception */ - args.reset(); - terms.reset(); - toDo.reset(); + Stack toDo(8); + Stack terms(8); + Stack args(8); toDo.push(term->args()); - // cout << "transform " << lit->toString() << endl; + // cout << "transform " << term->toString() << endl; for(;;) { TermList* tt=toDo.pop(); @@ -284,10 +283,11 @@ Term* BottomUpTermTransformer::transform(Term* term) //second topmost element as &top()-1, third at //&top()-2, etc... argLst=&args.top() - (orig->arity()-1); + + // cout << "args.length() - orig->arity() = " << args.length() - orig->arity() << endl; args.truncate(args.length() - orig->arity()); } - // cout << "args.length() - orig->arity() = " << args.length() - orig->arity() << endl; if(orig->isSort()){ //For most applications we probably dont want to transform sorts //however, we don't enforce that here, inheriting classes can decide @@ -309,6 +309,12 @@ Term* BottomUpTermTransformer::transform(Term* term) args.push(dest); continue; } + if (tl.isTerm() && tl.term()->isSpecial()) { + Term* td = transformSpecial(tl.term()); + args.push(TermList(td)); + continue; + } + ASS(tl.isTerm()); Term* t=tl.term(); terms.push(t); @@ -335,17 +341,19 @@ Term* BottomUpTermTransformer::transform(Term* term) } } -Literal* BottomUpTermTransformer::transform(Literal* lit) -{ - Term* t = transform(static_cast(lit)); - ASS(t->isLiteral()); - return static_cast(t); -} - Formula* BottomUpTermTransformer::transform(Formula* f) { static BottomUpTermTransformerFormulaTransformer ttft(*this); return ttft.transform(f); } +TermList BottomUpTermTransformer::transform(TermList ts) +{ + if (ts.isTerm()) { + return TermList(transform(ts.term())); + } else { + return transformSubterm(ts); + } +} + } diff --git a/Kernel/TermTransformer.hpp b/Kernel/TermTransformer.hpp index 8e91d0db3..2ca50c867 100644 --- a/Kernel/TermTransformer.hpp +++ b/Kernel/TermTransformer.hpp @@ -21,6 +21,19 @@ namespace Kernel { +/** + * Common methods of TermTransformer and BottomUpTermTransformer extracted here. + */ +class TermTransformerCommon { +public: + Literal* transformLiteral(Literal* lit); + virtual Formula* transform(Formula* f) = 0; + virtual Term* transform(Term* term) = 0; +protected: + Term* transformSpecial(Term* specialTerm); + virtual TermList transform(TermList ts) = 0; +}; + /** * Class to allow for easy transformations of subterms in shared literals. * @@ -38,16 +51,14 @@ namespace Kernel { * * Note that if called via transform(Term* term) the given term itself will not get transformed, only possibly its proper subterms */ -class TermTransformer { +class TermTransformer : public TermTransformerCommon { public: virtual ~TermTransformer() {} - Term* transform(Term* term); - Literal* transform(Literal* lit); + Term* transform(Term* term) override; protected: virtual TermList transformSubterm(TermList trm) = 0; - Term* transformSpecial(Term* specialTerm); - virtual Formula* transform(Formula* f); - TermList transform(TermList ts); + Formula* transform(Formula* f) override; + TermList transform(TermList ts) override; }; /** @@ -55,22 +66,18 @@ class TermTransformer { * goes bottom up and so subterms of currently considered terms * might already be some replacements that happened earlier, e.g.: * transforming g(f(a,b)) will consider (provided transformSubterm is the identity function) - * the following sequence: a,b,f(a,b),g(f(a,b)) + * the following sequence: a,b,f(a,b),g(f(a,b)) * and if transformSubterm is the identitify everywhere except for f(a,b) for which it returns c, * the considered sequence will be: a,b,f(a,b)->c,g(c) */ -class BottomUpTermTransformer { +class BottomUpTermTransformer : public TermTransformerCommon { public: virtual ~BottomUpTermTransformer() {} - Term* transform(Term* term); - Literal* transform(Literal* lit); + Term* transform(Term* term) override; protected: virtual TermList transformSubterm(TermList trm) = 0; - /** - * TODO: these functions are similar as in TermTransformer, code duplication could be removed - */ - TermList transform(TermList ts); - Formula* transform(Formula* f); + Formula* transform(Formula* f) override; + TermList transform(TermList ts) override; }; diff --git a/Shell/AnswerExtractor.cpp b/Shell/AnswerExtractor.cpp index b6c31ed3b..264137c0d 100644 --- a/Shell/AnswerExtractor.cpp +++ b/Shell/AnswerExtractor.cpp @@ -663,7 +663,7 @@ Unit* SynthesisManager::createUnitFromConjunctionWithAnswerLiteral(Formula* junc Formula* SynthesisManager::getConditionFromClause(Clause* cl) { FormulaList* fl = FormulaList::empty(); for (unsigned i = 0; i < cl->length(); ++i) { - Literal* newLit = Literal::complementaryLiteral(_skolemReplacement.transform((*cl)[i])); + Literal* newLit = Literal::complementaryLiteral(_skolemReplacement.transformLiteral((*cl)[i])); FormulaList::push(new AtomicFormula(newLit), fl); } return JunctionFormula::generalJunction(Connective::AND, fl); diff --git a/Shell/BlockedClauseElimination.cpp b/Shell/BlockedClauseElimination.cpp index 70e4383d1..9f5d11933 100644 --- a/Shell/BlockedClauseElimination.cpp +++ b/Shell/BlockedClauseElimination.cpp @@ -338,7 +338,7 @@ bool BlockedClauseElimination::resolvesToTautologyEq(Clause* cl, Literal* lit, C Literal* curlit = (*cl)[i]; if (curlit->functor() != lit->functor() || curlit->polarity() != lit->polarity()) { - Literal* ncurlit = clNormalizer.transform(curlit); + Literal* ncurlit = clNormalizer.transformLiteral(curlit); Literal* opncurlit = Literal::complementaryLiteral(ncurlit); if (norm_lits.find(opncurlit)) { @@ -389,7 +389,7 @@ bool BlockedClauseElimination::resolvesToTautologyEq(Clause* cl, Literal* lit, C Literal* curlit = (*pcl)[i]; if (curlit->functor() != plit->functor() || curlit->polarity() != plit->polarity()) { - Literal* ncurlit = pclNormalizer.transform(curlit); + Literal* ncurlit = pclNormalizer.transformLiteral(curlit); Literal* opncurlit = Literal::complementaryLiteral(ncurlit); if (norm_lits.find(opncurlit)) { diff --git a/Shell/InterpretedNormalizer.cpp b/Shell/InterpretedNormalizer.cpp index b73660c44..64590407b 100644 --- a/Shell/InterpretedNormalizer.cpp +++ b/Shell/InterpretedNormalizer.cpp @@ -191,7 +191,7 @@ class InterpretedNormalizer::IneqTranslator /** * Class that performs literal transformations */ -class InterpretedNormalizer::NLiteralTransformer : public TermTransformer +class InterpretedNormalizer::NLiteralTransformer : public BottomUpTermTransformer { public: USE_ALLOCATOR(InterpretedNormalizer::NLiteralTransformer); @@ -243,7 +243,7 @@ class InterpretedNormalizer::NLiteralTransformer : public TermTransformer } constantRes = false; - litRes = transform(lit); + litRes = transformLiteral(lit); unsigned pred = litRes->functor(); IneqTranslator* transl = getIneqTranslator(pred); if(transl) { @@ -254,7 +254,7 @@ class InterpretedNormalizer::NLiteralTransformer : public TermTransformer Formula* transform(Formula* f) override; protected: - using TermTransformer::transform; + using BottomUpTermTransformer::transform; TermList transformSubterm(TermList trm) override { @@ -462,8 +462,8 @@ bool InterpretedNormalizer::apply(UnitList*& units) FormulaUnit* fu = static_cast(u); FormulaUnit* fu1 = futransf.transform(fu); if(fu!=fu1) { - uit.replace(fu1); - modified = true; + uit.replace(fu1); + modified = true; } } } diff --git a/Shell/TweeGoalTransformation.cpp b/Shell/TweeGoalTransformation.cpp index 5ff51c0ca..0e566a865 100644 --- a/Shell/TweeGoalTransformation.cpp +++ b/Shell/TweeGoalTransformation.cpp @@ -202,7 +202,7 @@ void Shell::TweeGoalTransformation::apply(Problem &prb, bool groundOnly) for (unsigned i = 0; i < c->size(); i++) { Literal* l = c->literals()[i]; // cout << "L: " << l->toString() << endl; - Literal* nl = df.transform(l); + Literal* nl = df.transformLiteral(l); // cout << "NL: " << nl->toString() << endl; newLits.push(nl); } From 493714d4468c93f69672726598f3ac578efc04e7 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Fri, 17 Nov 2023 13:54:25 +0100 Subject: [PATCH 24/56] Introduce predicate to pass around definitions; refactor FunctionDefinitionHandler --- Inferences/Induction.cpp | 12 +- Kernel/Signature.cpp | 16 ++ Kernel/Signature.hpp | 6 + Parse/SMTLIB2.cpp | 12 +- Shell/FunctionDefinitionHandler.cpp | 245 +++++++-------------- Shell/FunctionDefinitionHandler.hpp | 30 +-- Shell/Preprocess.cpp | 8 +- Test/SyntaxSugar.hpp | 4 + UnitTests/tFnDefRewriting.cpp | 39 ++-- UnitTests/tFunctionDefinitionHandler.cpp | 259 +++++++++++------------ UnitTests/tInduction.cpp | 76 +++---- 11 files changed, 287 insertions(+), 420 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index 1c414dc36..2225253f0 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -47,10 +47,8 @@ using namespace Lib; Term* ActiveOccurrenceIterator::next() { Term* t = _stack.pop(); - auto f = t->functor(); - auto lit = t->isLiteral(); InductionTemplate* templ = _fnDefHandler ? - _fnDefHandler->getInductionTemplate(f, !lit) : nullptr; + _fnDefHandler->getInductionTemplate(t) : nullptr; if (templ) { auto& actPos = templ->inductionPositions(); for (unsigned i = 0; i < t->arity(); i++) { @@ -250,9 +248,7 @@ InductionContext ActiveOccurrenceContextReplacement::next() auto kv = stack.pop(); auto t = kv.first; auto active = kv.second; - auto f = t->functor(); - auto lit = t->isLiteral(); - auto templ = _fnDefHandler->getInductionTemplate(f, !lit); + auto templ = _fnDefHandler->getInductionTemplate(t); for (unsigned k = 0; k < t->arity(); k++) { stack.push(make_pair(t->nthArgument(k)->term(), active && templ ? templ->inductionPositions()[k] : active)); @@ -570,7 +566,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) vmap,vvector>>> ta_terms; auto templ = _fnDefHandler ? - _fnDefHandler->getInductionTemplate(lit->functor(), false) : nullptr; + _fnDefHandler->getInductionTemplate(lit) : nullptr; if (templ) { vvector indTerms; if (templ->matchesTerm(lit, indTerms)) { @@ -611,7 +607,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) } } auto templ = _fnDefHandler ? - _fnDefHandler->getInductionTemplate(f, true) : nullptr; + _fnDefHandler->getInductionTemplate(t) : nullptr; if (templ) { vvector indTerms; if (templ->matchesTerm(t, indTerms)) { diff --git a/Kernel/Signature.cpp b/Kernel/Signature.cpp index 509ebead4..84e416290 100644 --- a/Kernel/Signature.cpp +++ b/Kernel/Signature.cpp @@ -697,6 +697,22 @@ unsigned Signature::getDiff(){ } +unsigned Signature::getDef(TermList sort) +{ + ASS(sort.isTerm() && sort.term()->ground()); + bool added = false; + auto name = "$def_"+sort.toString(); + unsigned p = addPredicate(name, 2, added); + if(added){ + _defPreds.insert(p); + OperatorType* ot = OperatorType::getPredicateType({sort, sort}); + Symbol* sym = getPredicate(p); + sym->markProtected(); + sym->setType(ot); + } + return p; +} + unsigned Signature::getChoice(){ bool added = false; unsigned choice = addFunction("vEPSILON",1, added); diff --git a/Kernel/Signature.hpp b/Kernel/Signature.hpp index d1d14c275..27a66fec4 100644 --- a/Kernel/Signature.hpp +++ b/Kernel/Signature.hpp @@ -442,6 +442,7 @@ class Signature unsigned getApp(); unsigned getDiff(); unsigned getChoice(); + unsigned getDef(TermList sort); // Interpreted symbol declarations unsigned addIntegerConstant(const vstring& number,bool defaultSort); @@ -620,6 +621,10 @@ class Signature return (fun == _appFun && _appFun != UINT_MAX); } + bool isDefPred(unsigned p) const{ + return _defPreds.contains(p); + } + bool tryGetFunctionNumber(const vstring& name, unsigned arity, unsigned& out) const; bool tryGetPredicateNumber(const vstring& name, unsigned arity, unsigned& out) const; unsigned getFunctionNumber(const vstring& name, unsigned arity) const; @@ -961,6 +966,7 @@ class Signature unsigned _arrayCon; unsigned _arrowCon; unsigned _appFun; + DHSet _defPreds; /** * Map from type constructor functor to the associated term algebra, if applicable for the sort. diff --git a/Parse/SMTLIB2.cpp b/Parse/SMTLIB2.cpp index 385c2e6a4..68be81d5a 100644 --- a/Parse/SMTLIB2.cpp +++ b/Parse/SMTLIB2.cpp @@ -835,15 +835,17 @@ void SMTLIB2::readDefineFun(const vstring& name, LExprList* iArgs, LExpr* oSort, ASS(fun.second != SymbolType::TYPECON); bool isTrueFun = fun.second==SymbolType::FUNCTION; - TermList lhs; + Literal* lit; if (isTrueFun) { - lhs = TermList(Term::create(symbIdx,args.size(),args.begin())); + TermList lhs(Term::create(symbIdx,args.size(),args.begin())); + auto p = env.signature->getDef(rangeSort); + lit = Literal::create(p, true, { lhs, rhs }); } else { Formula* frm = new AtomicFormula(Literal::create(symbIdx,args.size(),true,false,args.begin())); - lhs = TermList(Term::createFormula(frm)); + TermList lhs(Term::createFormula(frm)); + lit = Literal::createEquality(true, lhs, rhs, rangeSort); } - - Formula* fla = new AtomicFormula(Literal::createEquality(true,lhs,rhs,rangeSort)); + Formula* fla = new AtomicFormula(lit); FormulaUnit* fu = new FormulaUnit(fla, FromInput(UnitInputType::ASSUMPTION), true /*isFunctionDefinition*/); diff --git a/Shell/FunctionDefinitionHandler.cpp b/Shell/FunctionDefinitionHandler.cpp index 0df8eb273..fb1b15ef5 100644 --- a/Shell/FunctionDefinitionHandler.cpp +++ b/Shell/FunctionDefinitionHandler.cpp @@ -11,13 +11,9 @@ #include "FunctionDefinitionHandler.hpp" #include "Inferences/InductionHelper.hpp" -#include "Kernel/Matcher.hpp" #include "Kernel/TermIterators.hpp" -#include "Kernel/FormulaUnit.hpp" #include "Kernel/Signature.hpp" -#include "Kernel/SubstHelper.hpp" #include "Kernel/Problem.hpp" -#include "Kernel/SubformulaIterator.hpp" #include "Lib/Hash.hpp" #include "Lib/SharedSet.hpp" @@ -34,196 +30,103 @@ void FunctionDefinitionHandler::preprocess(Problem& prb) UnitList::DelIterator it(prb.units()); while (it.hasNext()) { auto u = it.next(); - if (u->isClause()) { + if (!u->isClause()) { continue; } - auto fu = static_cast(u); - if (fu->isFunctionDefinition()) { - // if the definition could be processed and the function axioms - // will be used as rewrite rules, we remove the unit - Stack branches; - if (preprocess(fu->formula(), branches)) { - addFunction(branches, u); - if (env.options->functionDefinitionRewriting()) { - it.del(); - } + auto cl = u->asClause(); + LiteralStack defLits; + LiteralStack condLits; + for (unsigned i = 0; i < cl->length(); i++) { + auto lit = (*cl)[i]; + if (!env.signature->isDefPred(lit->functor())) { + condLits.push(lit); + } else { + defLits.push(lit); } } - } -} -bool FunctionDefinitionHandler::preprocess(Formula* f, Stack& branches) -{ - ASS_EQ(f->connective(), LITERAL); - - auto l = f->literal(); - ASS(l->isEquality()); - - //TODO handle predicate definitions as well - ASS(l->nthArgument(0)->isTerm()); - auto header = l->nthArgument(0)->term(); - if (header->isSpecial()) { - // literal headers are nicely packed into multiple layers - ASS_EQ(header->getSpecialData()->specialFunctor(), Term::SpecialFunctor::FORMULA); - auto of = header->getSpecialData()->getFormula(); - ASS_EQ(of->connective(), LITERAL); - header = of->literal(); - } - Stack todos; - todos.push({ - .header = header, - .body = *l->nthArgument(1), - .literals = LiteralStack() - }); - while (todos.isNonEmpty()) { - auto b = todos.pop(); - if (b.body.isVar() || !b.body.term()->isSpecial()) { - branches.push(std::move(b)); + // clause not from a definition + if (defLits.isEmpty()) { continue; } - auto t = b.body.term(); - Term::SpecialTermData *sd = t->getSpecialData(); - switch (sd->specialFunctor()) { - case Term::SpecialFunctor::FORMULA: { - // only the atoms of formula bodies of bool - // functions are interesting, so save them - ASS(header->isLiteral()); - auto f = sd->getFormula(); - SubformulaIterator sfit(f); - while(sfit.hasNext()) { - Formula* sf = sfit.next(); - if(sf->connective()==LITERAL) { - Literal* l = sf->literal(); - b.literals.push(Literal::positiveLiteral(l)); - } - } - // f->collectAtoms(b.literals); - branches.push(std::move(b)); - break; - } - case Term::SpecialFunctor::LET: - case Term::SpecialFunctor::LET_TUPLE: - case Term::SpecialFunctor::TUPLE: { - return false; - } - case Term::SpecialFunctor::ITE: { - auto cf = sd->getCondition(); - switch (cf->connective()) - { - case LITERAL: { - auto l = cf->literal(); - todos.push(addCondition(Literal::complementaryLiteral(l), b, *t->nthArgument(0))); - todos.push(addCondition(l, b, *t->nthArgument(1))); - break; - } - default: { - return false; - } - } - break; - } - - case Term::SpecialFunctor::MATCH: { - auto matched = *t->nthArgument(0); - for (unsigned int i = 1; i < t->arity(); i += 2) { - todos.push(substituteBoundVariable(matched.var(), *t->nthArgument(i), b, *t->nthArgument(i+1))); - } - break; - } + // clause contains definitions, we need to replace them with equalities + auto lits = condLits; + for (const auto& lit : defLits) { + auto lhs = lit->termArg(0); + ASS(lhs.isTerm()); + lits.push(Literal::createEquality(lit->polarity(), lhs, lit->termArg(1), SortHelper::getResultSort(lhs.term()))); + } + Clause* defCl = Clause::fromStack(lits, NonspecificInference1(InferenceRule::DEFINITION_UNFOLDING,u)); - default: - ASSERTION_VIOLATION_REP(t->toString()); + // multiple defining equations inside clause, skip + if (defLits.size()!=1) { + it.replace(defCl); + continue; } - } - return true; -} -void FunctionDefinitionHandler::addFunction(const Stack& branches, Unit* unit) -{ - ASS_REP(branches.isNonEmpty(), unit->toString()); - - auto fn = branches[0].header->functor(); - auto isLit = branches[0].header->isLiteral(); - auto symb = isLit ? env.signature->getPredicate(fn) : env.signature->getFunction(fn); - auto sort = isLit ? symb->predType()->result() : symb->fnType()->result(); - auto templ = new InductionTemplate(branches[0].header); - for (auto& b : branches) { - // handle for induction - vvector recursiveCalls; - if (isLit) { - for(const auto& lit : b.literals) { - if (!lit->isEquality() && fn == lit->functor()) { - recursiveCalls.push_back(lit->isPositive() ? lit : Literal::complementaryLiteral(lit)); - } - } - if (static_cast(b.header)->isNegative()) { - b.header = Literal::complementaryLiteral(static_cast(b.header)); - } + auto lhs = defLits[0]->termArg(0); + auto rhs = defLits[0]->termArg(1); + + // process for induction + addBranch(lhs.term(), rhs, condLits); + + // process for rewriting + if (!lhs.term()->isLiteral() && env.options->functionDefinitionRewriting()) { + defCl->setSplits(SplitSet::getEmpty()); + defCl->incRefCnt(); + ASS_EQ(condLits.size()+1,lits.size()); + _is.insert(lhs.term(), lits.top(), defCl); + // TODO should we store this clause anywhere else? } else { - if (b.body.isTerm()) { - NonVariableIterator it(b.body.term(), true); - while (it.hasNext()) { - auto st = it.next(); - if (st.term()->functor() == fn) { - recursiveCalls.push_back(st.term()); - } - } - } - } - templ->addBranch(std::move(recursiveCalls), b.header); - - // handle for rewriting - if (!isLit && env.options->functionDefinitionRewriting()) { - auto mainLit = Literal::createEquality(true, TermList(b.header), b.body, sort); - b.literals.push(mainLit); - auto rwCl = Clause::fromStack(b.literals, FormulaTransformation(InferenceRule::CLAUSIFY,unit)); - rwCl->setSplits(SplitSet::getEmpty()); - rwCl->incRefCnt(); - _is.insert(b.header, mainLit, rwCl); + it.replace(defCl); } } - if (templ->finalize()) { - if (env.options->showInduction()){ + + DHMap,InductionTemplate>::DelIterator tIt(_templates); + while (tIt.hasNext()) { + auto k = tIt.nextKey(); + auto ptr = _templates.findPtr(k); + if (!ptr->finalize()) { + tIt.del(); + continue; + } + if (env.options->showInduction()) { env.beginOutput(); - env.out() << "[Induction] " << (isLit ? "predicate " : "function ") << symb->name() << endl; - env.out() << ", with induction template: " << templ->toString() << endl; + env.out() << "[Induction] added induction template: " << ptr->toString() << endl; env.endOutput(); } - ALWAYS(_templates.insert(make_pair(make_pair(fn,!isLit), templ)).second); - } -} - -FunctionDefinitionHandler::Branch FunctionDefinitionHandler::substituteBoundVariable(unsigned var, TermList t, const Branch& b, TermList body) -{ - Substitution subst; - subst.bind(var, t); - - auto bn = b; - bn.body = SubstHelper::apply(body, subst); - bn.header = SubstHelper::apply(bn.header, subst); - for (auto& lit : bn.literals) { - lit = SubstHelper::apply(lit, subst); } - return bn; } -FunctionDefinitionHandler::Branch FunctionDefinitionHandler::addCondition(Literal* lit, const Branch& b, TermList body) +void FunctionDefinitionHandler::addBranch(Term* header, TermList body, const LiteralStack& conditions) { - if (lit->isEquality() && lit->isNegative()) { - TermList lhs = *lit->nthArgument(0); - TermList rhs = *lit->nthArgument(1); - if (lhs.isVar() || rhs.isVar()) { - if (lhs.isTerm() && rhs.isVar()) { - swap(lhs,rhs); + auto fn = header->functor(); + auto isLit = header->isLiteral(); + InductionTemplate* templ; + _templates.getValuePtr(make_pair(fn,isLit?SymbolType::PRED:SymbolType::FUNC), templ, InductionTemplate(header)); + + // handle for induction + vvector recursiveCalls; + if (isLit) { + ASS(static_cast(header)->isPositive()); + for(const auto& lit : conditions) { + if (!lit->isEquality() && fn == lit->functor()) { + recursiveCalls.push_back(lit->isPositive() ? lit : Literal::complementaryLiteral(lit)); + } + } + } else { + if (body.isTerm()) { + NonVariableNonTypeIterator it(body.term(), true); + while (it.hasNext()) { + auto st = it.next(); + if (st->functor() == fn) { + recursiveCalls.push_back(st); + } } - return substituteBoundVariable(lhs.var(), rhs, b, body); } } - auto bn = b; - bn.body = body; - bn.literals.push(lit); - return bn; + templ->addBranch(std::move(recursiveCalls), header); } bool InductionTemplate::finalize() @@ -262,7 +165,7 @@ void InductionTemplate::checkWellDefinedness() } else { t = Term::create(_functor, _arity, args.begin()); } - addBranch(vvector(), std::move(t)); + addBranch(vvector(), Renaming::normalize(t)); } if (env.options->showInduction()) { env.out() << ". New template is " << toString() << endl; diff --git a/Shell/FunctionDefinitionHandler.hpp b/Shell/FunctionDefinitionHandler.hpp index 2332e3eea..ddf5ba188 100644 --- a/Shell/FunctionDefinitionHandler.hpp +++ b/Shell/FunctionDefinitionHandler.hpp @@ -34,6 +34,7 @@ using namespace Lib; */ struct InductionTemplate { USE_ALLOCATOR(InductionTemplate); + InductionTemplate() = default; InductionTemplate(const Term* t); void addBranch(vvector&& recursiveCalls, Term* header); @@ -62,10 +63,10 @@ struct InductionTemplate { vstring toString() const; - const unsigned _functor; - const unsigned _arity; - const bool _isLit; - const OperatorType* _type; + unsigned _functor; + unsigned _arity; + bool _isLit; + OperatorType* _type; private: bool checkUsefulness() const; @@ -81,31 +82,22 @@ class FunctionDefinitionHandler public: USE_ALLOCATOR(FunctionDefinitionHandler); - struct Branch { - Term* header; - TermList body; - LiteralStack literals; - }; - void preprocess(Problem& prb); - bool preprocess(Formula* f, Stack& branches); - void addFunction(const Stack& branches, Unit* unit); + void addBranch(Term* header, TermList body, const LiteralStack& conditions); TermQueryResultIterator getGeneralizations(TypedTermList t) { return _is.getGeneralizations(t, true); } - InductionTemplate* getInductionTemplate(unsigned fn, bool trueFun) { - auto it = _templates.find(std::make_pair(fn, trueFun)); - return it == _templates.end() ? nullptr : it->second; + InductionTemplate* getInductionTemplate(Term* t) { + auto fn = t->functor(); + auto st = t->isLiteral() ? SymbolType::PRED : SymbolType::FUNC; + return _templates.findPtr(std::make_pair(fn, st)); } private: - Branch substituteBoundVariable(unsigned var, TermList t, const Branch& b, TermList body); - Branch addCondition(Literal* lit, const Branch& b, TermList body); - CodeTreeTIS _is; - vmap, InductionTemplate*> _templates; + DHMap, InductionTemplate> _templates; }; /** diff --git a/Shell/Preprocess.cpp b/Shell/Preprocess.cpp index 6d45a6024..84e9aaf1c 100644 --- a/Shell/Preprocess.cpp +++ b/Shell/Preprocess.cpp @@ -138,10 +138,6 @@ void Preprocess::preprocess(Problem& prb) } } - auto fnDefHandler = new FunctionDefinitionHandler(); - fnDefHandler->preprocess(prb); - prb.addFunctionDefinitionHandler(fnDefHandler); - if (prb.hasFOOL() || prb.isHigherOrder()) { // This is the point to extend the signature with $$true and $$false // If we don't have fool then these constants get in the way (a lot) @@ -318,6 +314,10 @@ void Preprocess::preprocess(Problem& prb) } } + auto fnDefHandler = new FunctionDefinitionHandler(); + fnDefHandler->preprocess(prb); + prb.addFunctionDefinitionHandler(fnDefHandler); + prb.getProperty(); if (prb.mayHaveFunctionDefinitions()) { diff --git a/Test/SyntaxSugar.hpp b/Test/SyntaxSugar.hpp index 5bcaf6ce3..27a951e6b 100644 --- a/Test/SyntaxSugar.hpp +++ b/Test/SyntaxSugar.hpp @@ -129,6 +129,7 @@ #define DECL_B_COMB(b) auto b = FuncSugar(env.signature->getCombinator(Signature::B_COMB)); #define DECL_C_COMB(c) auto c = FuncSugar(env.signature->getCombinator(Signature::C_COMB)); #define DECL_S_COMB(s) auto s = FuncSugar(env.signature->getCombinator(Signature::S_COMB)); +#define DECL_DEF(d, t) auto d = PredSugar(env.signature->getDef(t)); #define DECL_DEFAULT_VARS \ __ALLOW_UNUSED( \ @@ -634,6 +635,9 @@ class PredSugar { unsigned _functor; public: + explicit PredSugar(unsigned functor) + : _functor(functor) {} + PredSugar(const char* name, Stack args, unsigned taArity = 0) { Stack as; diff --git a/UnitTests/tFnDefRewriting.cpp b/UnitTests/tFnDefRewriting.cpp index 7f820664b..eacc2a0c5 100644 --- a/UnitTests/tFnDefRewriting.cpp +++ b/UnitTests/tFnDefRewriting.cpp @@ -31,6 +31,7 @@ REGISTER_GEN_TESTER(FnDefRewriting) #define MY_SYNTAX_SUGAR \ DECL_DEFAULT_VARS \ DECL_SORT(s) \ + DECL_DEF(def_s,s) \ DECL_CONST(b, s) \ DECL_FUNC(r, {s}, s) \ DECL_TERM_ALGEBRA(s, {b, r}) \ @@ -40,33 +41,19 @@ REGISTER_GEN_TESTER(FnDefRewriting) auto setup = [](SaturationAlgorithm& salg) { __ALLOW_UNUSED(MY_SYNTAX_SUGAR); - salg.setFunctionDefinitionHandler(new Shell::FunctionDefinitionHandler()); - std::initializer_list>>> functionDefs = - { - { - { f(b,y), y, { } }, - { f(r(x),y), f(x,r(y)), { x != b() } }, - { f(r(x),y), f(x,y), { x == r(b()) } }, - }, - { - { g(b()), f(b(),b()), { } }, - { g(r(r(x))),f(r(x),g(x)), { p(x), x != b() } }, - } - }; - auto fu = new FormulaUnit(nullptr, FromInput(UnitInputType::AXIOM)); - for (const auto& fd : functionDefs) { - Stack st; - for (const auto& t : fd) { - LiteralStack lits; - for (const auto& l : get<2>(t)) { - lits.push(l); - } - st.push({ get<0>(t).sugaredExpr().term(), get<1>(t).sugaredExpr(), lits }); - } - salg.getFunctionDefinitionHandler()->addFunction(st, fu); - } + auto ul = UnitList::empty(); + UnitList::push(clause({ def_s(f(b,y), y) }), ul); + UnitList::push(clause({ def_s(f(r(x),y), f(x,r(y))), x != b() }), ul); + UnitList::push(clause({ def_s(f(r(x),y), f(x,y)), x == r(b()) }), ul); + + UnitList::push(clause({ def_s(g(b()), f(b(),b())) }), ul); + UnitList::push(clause({ def_s(g(r(r(x))), f(r(x),g(x))), p(x), x != b() }), ul); + + Problem prb; + prb.addUnits(ul); + salg.setFunctionDefinitionHandler(new Shell::FunctionDefinitionHandler()); + salg.getFunctionDefinitionHandler()->preprocess(prb); }; TEST_GENERATION(test_01, diff --git a/UnitTests/tFunctionDefinitionHandler.cpp b/UnitTests/tFunctionDefinitionHandler.cpp index a49e9c389..63733846c 100644 --- a/UnitTests/tFunctionDefinitionHandler.cpp +++ b/UnitTests/tFunctionDefinitionHandler.cpp @@ -23,7 +23,6 @@ using std::pair; #define MY_SYNTAX_SUGAR \ DECL_DEFAULT_VARS \ - DECL_VAR(x2, 2) \ DECL_VAR(x3, 3) \ DECL_VAR(x4, 4) \ DECL_VAR(x5, 5) \ @@ -34,7 +33,9 @@ using std::pair; DECL_VAR(x10, 10) \ DECL_VAR(x11, 11) \ DECL_SORT(s) \ + DECL_DEF(def_s, s.sugaredExpr()) \ DECL_SORT(u) \ + DECL_DEF(def_u, u.sugaredExpr()) \ DECL_CONST(b, s) \ DECL_FUNC(r, {s}, s) \ DECL_TERM_ALGEBRA(s, {b, r}) \ @@ -49,52 +50,28 @@ using std::pair; DECL_PRED(p, {s}) \ DECL_PRED(q, {u, s}) -using FunctionDefs = std::initializer_list>>>; - -inline void addFunctionDefs(FunctionDefinitionHandler& handler, FunctionDefs functionDefs) { - auto fu = new FormulaUnit(nullptr, FromInput(UnitInputType::AXIOM)); - for (const auto& fd : functionDefs) { - Stack st; - for (const auto& t : fd) { - LiteralStack lits; - for (const auto& l : get<2>(t)) { - lits.push(l); - } - st.push({ get<0>(t).sugaredExpr().term(), get<1>(t).sugaredExpr(), lits }); - } - handler.addFunction(st, fu); +inline void addFunctionDefs(FunctionDefinitionHandler& handler, std::initializer_list cls) { + auto ul = UnitList::empty(); + for (const auto& cl : cls) { + UnitList::push(cl, ul); } -} + Problem prb; + prb.addUnits(ul); -inline void checkTemplateBranches(FunctionDefinitionHandler& handler, const PredSugar& p, const vvector>>& v) { - auto templ = handler.getInductionTemplate(p.functor(), false); - ASS(templ); - auto b = templ->branches(); - ASS_EQ(b.size(), v.size()); - TermList t; - for (unsigned i = 0; i < b.size(); i++) { - ASS_REP(b[i]._header == v[i].first, b[i]._header->toString() + " " + v[i].first->toString()); - auto r = b[i]._recursiveCalls; - ASS_EQ(r.size(), v[i].second.size()); - for (unsigned j = 0; j < r.size(); j++) { - ASS_REP(r[j] == v[i].second[j], r[j]->toString() + " " + v[i].second[j]->toString()); - } - } + handler.preprocess(prb); } -inline void checkTemplateBranches(FunctionDefinitionHandler& handler, const FuncSugar& f, const vvector>>& p) { - auto templ = handler.getInductionTemplate(f.functor(), true); +inline void checkTemplateBranches(FunctionDefinitionHandler& handler, TermSugar t, const vvector>>& p) { + auto templ = handler.getInductionTemplate(t.sugaredExpr().term()); ASS(templ); auto b = templ->branches(); ASS_EQ(b.size(), p.size()); - TermList t; for (unsigned i = 0; i < b.size(); i++) { - ASS_EQ(b[i]._header, p[i].first.sugaredExpr().term()); + ASS_EQ(TermList(b[i]._header), p[i].first.sugaredExpr()); auto r = b[i]._recursiveCalls; ASS_EQ(r.size(), p[i].second.size()); for (unsigned j = 0; j < r.size(); j++) { - ASS_EQ(r[j], p[i].second[j].sugaredExpr().term()); + ASS_EQ(TermList(r[j]), p[i].second[j].sugaredExpr()); } } } @@ -104,19 +81,19 @@ TEST_FUN(test_01) { __ALLOW_UNUSED(MY_SYNTAX_SUGAR) FunctionDefinitionHandler handler; addFunctionDefs(handler, { - { { f(r(x), r(y)), f(f(x, r(r(y))), y), { } } }, - { { g(r(x)), g(f(x,x)), { } } }, - { { h(x, y, r1(x, z)), h(y, y, z), { } }, - { h(r(x), y, z), h(x, x, r2(y,z)), { } } }, - { { p(r(r(x))).wrapInTerm(), /*unused*/b(), { p(y) } } }, - { { q(r1(x,y),r(z)).wrapInTerm(), /*unused*/b(), { q(y,r(z)), g(b) == b, q(z,b) } } }, + clause({ def_s(f(r(x), r(y)), f(f(x, r(r(y))), y)) }), + clause({ def_s(g(r(x)), g(f(x,x))) }), + clause({ def_u(h(x, y, r1(x, z)), h(y, y, z)) }), + clause({ def_u(h(r(x), y, z), h(x, x, r2(y,z))) }), + // clause({ def_s(p(r(r(x))).wrapInTerm(), /*unused*/b(), { p(y) } } }, + // { { q(r1(x,y),r(z)).wrapInTerm(), /*unused*/b(), { q(y,r(z)), g(b) == b, q(z,b) } } }, }); - ASS(!handler.getInductionTemplate(f.functor(), true)); - ASS(!handler.getInductionTemplate(g.functor(), true)); - ASS(!handler.getInductionTemplate(h.functor(), true)); - ASS(!handler.getInductionTemplate(p.functor(), false)); - ASS(!handler.getInductionTemplate(q.functor(), false)); + ASS(!handler.getInductionTemplate(f(x,y).sugaredExpr().term())); + ASS(!handler.getInductionTemplate(g(x).sugaredExpr().term())); + ASS(!handler.getInductionTemplate(h(x,y,z).sugaredExpr().term())); + // ASS(!handler.getInductionTemplate(p)); + // ASS(!handler.getInductionTemplate(q)); } // not useful functions (either no recursive calls or no argument changes in any recursive call) @@ -124,13 +101,13 @@ TEST_FUN(test_02) { __ALLOW_UNUSED(MY_SYNTAX_SUGAR) FunctionDefinitionHandler handler; addFunctionDefs(handler, { - { { f(x, r(y)), g(f(x, r(y))), { } }, - { f(x, b), b, { } } }, - { { g(x), b, { } } } + clause({ def_s(f(x, r(y)), g(f(x, r(y)))) }), + clause({ def_s(f(x, b), b) }), + clause({ def_s(g(x), b) }), }); - ASS(!handler.getInductionTemplate(f.functor(), true)); - ASS(!handler.getInductionTemplate(g.functor(), true)); + ASS(!handler.getInductionTemplate(f(x,y).sugaredExpr().term())); + ASS(!handler.getInductionTemplate(g(x).sugaredExpr().term())); } // adds missing cases @@ -138,58 +115,58 @@ TEST_FUN(test_03) { __ALLOW_UNUSED(MY_SYNTAX_SUGAR) FunctionDefinitionHandler handler; addFunctionDefs(handler, { - { { f(r(x), r(y)), f(x,y), { } }, - { f(x,b), b, { } } }, + clause({ def_s(f(r(x), r(y)), f(x,y)) }), + clause({ def_s(f(x,b), b) }), - { { g(r(r(x))), g(x), { } } }, + clause({ def_s(g(r(r(x))), g(x)) }), - { { h(b, x, y), b1, { } }, - { h(r(x), b, y), b2, { } }, - { h(r(x), b, r1(y,z)), h(x, b, z), { } } }, + clause({ def_u(h(b, x, y), b1) }), + clause({ def_u(h(r(x), b, y), b2) }), + clause({ def_u(h(r(x), b, r1(y,z)), h(x, b, z)) }), - { { p(r(r(x))).wrapInTerm(), /*unused*/b(), { ~p(x) } }, - { p(b).wrapInTerm(), /*unused*/b(), { f(b,b) == b } } }, + // { { p(r(r(x))).wrapInTerm(), /*unused*/b(), { ~p(x) } }, + // { p(b).wrapInTerm(), /*unused*/b(), { f(b,b) == b } } }, - { { q(y,r(r(x))).wrapInTerm(), /*unused*/b(), { ~q(y,x) } }, - { (~q(r2(r1(x,y),z),b)).wrapInTerm(), /*unused*/b(), { } } } + // { { q(y,r(r(x))).wrapInTerm(), /*unused*/b(), { ~q(y,x) } }, + // { (~q(r2(r1(x,y),z),b)).wrapInTerm(), /*unused*/b(), { } } } }); - checkTemplateBranches(handler, f, { - { f(r(x),r(y)), { f(x,y) } }, + checkTemplateBranches(handler, f(x,y), { { f(x,b), { } }, - { f(b,r(x4)), { } } // added + { f(r(x),r(y)), { f(x,y) } }, + { f(b,r(x)), { } } // added }); - checkTemplateBranches(handler, g, { + checkTemplateBranches(handler, g(x), { { g(r(r(x))), { g(x) } }, { g(b), { } }, // added { g(r(b)), { } }, // added }); - checkTemplateBranches(handler, h, { - { h(b, x, y), { } }, - { h(r(x), b, y), { } }, + checkTemplateBranches(handler, h(x,y,z), { { h(r(x), b, r1(y,z)), { h(x, b, z) } }, - { h(r(x3), r(x4), x2), { } } // added - }); - - checkTemplateBranches(handler, p, { - { p(r(r(x))), { p(x) } }, - { p(b), { } }, - { p(r(b)), { } } // added + { h(r(x), b, y), { } }, + { h(b, x, y), { } }, + { h(r(x), r(y), z), { } } // added }); - checkTemplateBranches(handler, q, { - { q(y,r(r(x))), { q(y,x) } }, - { q(r2(r1(x,y),z),b), { } }, - { q(b1,b), { } }, // added - { q(b2,b), { } }, // added - { q(r1(x4,x5),b), { } }, // added - { q(r2(b1,x7),b), { } }, // added - { q(r2(b2,x7),b), { } }, // added - { q(r2(r2(x10,x11),x7),b), { } }, // added - { q(x,r(b)), { } } // added - }); + // checkTemplateBranches(handler, p, { + // { p(r(r(x))), { p(x) } }, + // { p(b), { } }, + // { p(r(b)), { } } // added + // }); + + // checkTemplateBranches(handler, q, { + // { q(y,r(r(x))), { q(y,x) } }, + // { q(r2(r1(x,y),z),b), { } }, + // { q(b1,b), { } }, // added + // { q(b2,b), { } }, // added + // { q(r1(x4,x5),b), { } }, // added + // { q(r2(b1,x7),b), { } }, // added + // { q(r2(b2,x7),b), { } }, // added + // { q(r2(r2(x10,x11),x7),b), { } }, // added + // { q(x,r(b)), { } } // added + // }); } // correctly merges branches @@ -197,58 +174,58 @@ TEST_FUN(test_04) { __ALLOW_UNUSED(MY_SYNTAX_SUGAR) FunctionDefinitionHandler handler; addFunctionDefs(handler, { - { { f(r(x), r(y)), f(x,y), { } }, - { f(r(x),r(x)), f(x,x), { } }, - { f(b,x), b, { } }, - { f(r(x),b), g(x), { } } }, - - { { g(r(r(x))), g(r(x)), { } }, - { g(r(r(x))), g(x), { } }, - { g(r(b)), b, { } }, - { g(b), b, { } } }, - - { { h(b, x, y), b1, { } }, - { h(r(x), y, z), h(x, y, z), { } }, - { h(r(x), z, y), h(x, z, y), { } } }, - - { { p(r(r(x))).wrapInTerm(), /*unused*/b(), { ~p(x) } }, - { p(r(r(x))).wrapInTerm(), /*unused*/b(), { ~p(r(x)) } }, - { p(b).wrapInTerm(), /*unused*/b(), { } } }, - - { { (~q(y,r(x))).wrapInTerm(), /*unused*/b(), { ~q(y,x) } }, - { (~q(y,b)).wrapInTerm(), /*unused*/b(), { } }, - { q(z,r(b)).wrapInTerm(), /*unused*/b(), { q(z,b) } } } + clause({ def_s(f(r(x), r(y)), f(x,y)) }), + clause({ def_s(f(r(x),r(x)), f(x,x)) }), + clause({ def_s(f(b,x), b) }), + clause({ def_s(f(r(x),b), g(x)) }), + + clause({ def_s(g(r(r(x))), g(r(x))) }), + clause({ def_s(g(r(r(x))), g(x)) }), + clause({ def_s(g(r(b)), b) }), + clause({ def_s(g(b), b) }), + + clause({ def_u(h(b, x, y), b1) }), + clause({ def_u(h(r(x), y, z), h(x, y, z)) }), + clause({ def_u(h(r(x), z, y), h(x, z, y)) }), + + // { { p(r(r(x))).wrapInTerm(), /*unused*/b(), { ~p(x) } }, + // { p(r(r(x))).wrapInTerm(), /*unused*/b(), { ~p(r(x)) } }, + // { p(b).wrapInTerm(), /*unused*/b(), { } } }, + + // { { (~q(y,r(x))).wrapInTerm(), /*unused*/b(), { ~q(y,x) } }, + // { (~q(y,b)).wrapInTerm(), /*unused*/b(), { } }, + // { q(z,r(b)).wrapInTerm(), /*unused*/b(), { q(z,b) } } } }); - checkTemplateBranches(handler, f, { - { f(r(x),r(y)), { f(x,y) } }, - { f(b,x), { } }, + checkTemplateBranches(handler, f(x,y), { { f(r(x),b), { } }, + { f(b,x), { } }, + { f(r(x),r(y)), { f(x,y) } }, }); - checkTemplateBranches(handler, g, { - { g(r(r(x))), { g(r(x)) } }, - { g(r(r(x))), { g(x) } }, - { g(r(b)), { } }, + checkTemplateBranches(handler, g(x), { { g(b), { } }, + { g(r(b)), { } }, + { g(r(r(x))), { g(x) } }, + { g(r(r(x))), { g(r(x)) } }, }); - checkTemplateBranches(handler, h, { + checkTemplateBranches(handler, h(x,y,z), { + { h(r(x), z, y), { h(x, z, y) } }, { h(b, x, y), { } }, - { h(r(x), y, z), { h(x, y, z) } } - }); - - checkTemplateBranches(handler, p, { - { p(r(r(x))), { p(x) } }, - { p(r(r(x))), { p(r(x)) } }, - { p(b), { } }, - { p(r(b)), { } } }); - checkTemplateBranches(handler, q, { - { q(y,r(x)), { q(y,x) } }, - { q(y,b), { } } - }); + // checkTemplateBranches(handler, p, { + // { p(r(r(x))), { p(x) } }, + // { p(r(r(x))), { p(r(x)) } }, + // { p(b), { } }, + // { p(r(b)), { } } + // }); + + // checkTemplateBranches(handler, q, { + // { q(y,r(x)), { q(y,x) } }, + // { q(y,b), { } } + // }); } // non-term-algebra sorts are ignored @@ -256,15 +233,17 @@ TEST_FUN(test_05) { __ALLOW_UNUSED(MY_SYNTAX_SUGAR) DECL_SORT(t) \ DECL_FUNC(f1, {t}, t) \ - DECL_PRED(p1, {t}) + DECL_PRED(p1, {t}) \ + DECL_DEF(defT, t) \ + FunctionDefinitionHandler handler; addFunctionDefs(handler, { - { { f1(f1(x)), f1(x), { } } }, - { { p1(f1(x)).wrapInTerm(), /*unused*/b(), { p1(x) } } } + clause({ defT(f1(f1(x)), f1(x)) }), + // clause({ p1(f1(x)).wrapInTerm(), /*unused*/b(), { p1(x) } } } }); - ASS(!handler.getInductionTemplate(f1.functor(), true)); - ASS(!handler.getInductionTemplate(p1.functor(), false)); + ASS(!handler.getInductionTemplate(f1(x).sugaredExpr().term())); + // ASS(!handler.getInductionTemplate(p1.functor(), false)); } // headers with non-term-algebra arguments are not discarded @@ -273,16 +252,16 @@ TEST_FUN(test_06) { __ALLOW_UNUSED(MY_SYNTAX_SUGAR) FunctionDefinitionHandler handler; addFunctionDefs(handler, { - { { p(g(x)).wrapInTerm(), /*unused*/b(), { p(x) } } }, - { { f(r(x),g(y)), f(x,g(y)), { } } } + // { { p(g(x)).wrapInTerm(), /*unused*/b(), { p(x) } } }, + clause({ def_s(f(r(x),g(y)), f(x,g(y))), }), }); - checkTemplateBranches(handler, p, { - { p(g(x)), { p(x) } }, - { p(x), { } }, - }); + // checkTemplateBranches(handler, p, { + // { p(g(x)), { p(x) } }, + // { p(x), { } }, + // }); - checkTemplateBranches(handler, f, { + checkTemplateBranches(handler, f(x,y), { { f(r(x),g(y)), { f(x,g(y)) } }, { f(x,y), { } }, }); diff --git a/UnitTests/tInduction.cpp b/UnitTests/tInduction.cpp index 5086a0652..bbf3e08d4 100644 --- a/UnitTests/tInduction.cpp +++ b/UnitTests/tInduction.cpp @@ -228,6 +228,7 @@ class GenerationTesterInduction DECL_VAR(x4,4) \ DECL_VAR(x5,5) \ DECL_SORT(s) \ + DECL_DEF(def_s,s) \ DECL_SORT(u) \ DECL_SKOLEM_CONST(sK1, s) \ DECL_SKOLEM_CONST(sK2, s) \ @@ -1126,56 +1127,37 @@ TEST_GENERATION_INDUCTION(test_33, auto setup = [](SaturationAlgorithm& salg) { __ALLOW_UNUSED(MY_SYNTAX_SUGAR); - salg.setFunctionDefinitionHandler(new Shell::FunctionDefinitionHandler()); - std::initializer_list>>> functionDefs = - { - { - { f(b,y), y, { } }, - { f(r(x),b), f(x,x), { } }, - { f(r(x),r(y)), h(f(x,g(y)),f(r(x),y)), { } }, - }, - { - { h(b,y), y, { } }, - { h(r(x),y), h(x,y), { } }, - }, - { - { p(b()).wrapInTerm(), b()/*unused*/, { } }, - { p(r(r(x))).wrapInTerm(), b()/*unused*/, { p(x), x != b() } }, - } - }; - auto fu = new FormulaUnit(nullptr, FromInput(UnitInputType::AXIOM)); - for (const auto& fd : functionDefs) { - Stack st; - for (const auto& t : fd) { - LiteralStack lits; - auto fnLits = get<2>(t); - for (const auto& l : fnLits) { - lits.push(l); - } - auto header = get<0>(t); - auto body = get<1>(t); - st.push({ header.sugaredExpr().term(), body.sugaredExpr(), lits }); - } - salg.getFunctionDefinitionHandler()->addFunction(st, fu); - } + auto ul = UnitList::empty(); + UnitList::push(clause({ def_s(f(b,y), y) }), ul); + UnitList::push(clause({ def_s(f(r(x),b), f(x,x)) }), ul); + UnitList::push(clause({ def_s(f(r(x),r(y)), h(f(x,g(y)),f(r(x),y))) }), ul); + + UnitList::push(clause({ def_s(h(b,y), y) }), ul); + UnitList::push(clause({ def_s(h(r(x),y), h(x,y)) }), ul); + // { p(b()).wrapInTerm(), b()/*unused*/, { } }, + // { p(r(r(x))).wrapInTerm(), b()/*unused*/, { p(x), x != b() } }, + + Problem prb; + prb.addUnits(ul); + salg.setFunctionDefinitionHandler(new Shell::FunctionDefinitionHandler()); + salg.getFunctionDefinitionHandler()->preprocess(prb); }; -TEST_GENERATION_INDUCTION(test_34, - Generation::TestCase() - .setup(setup) - .options({ - { "induction", "struct" }, - { "structural_induction_kind", "recursion" }, - }) - .indices(getIndices()) - .input( clause({ ~p(sK1) }) ) - .expected({ - clause({ ~p(b), ~p(r(b)), p(skx0) }), - clause({ ~p(b), ~p(r(b)), ~p(r(r(skx0))) }), - }) - ) +// TEST_GENERATION_INDUCTION(test_34, +// Generation::TestCase() +// .setup(setup) +// .options({ +// { "induction", "struct" }, +// { "structural_induction_kind", "recursion" }, +// }) +// .indices(getIndices()) +// .input( clause({ ~p(sK1) }) ) +// .expected({ +// clause({ ~p(b), ~p(r(b)), p(skx0) }), +// clause({ ~p(b), ~p(r(b)), ~p(r(r(skx0))) }), +// }) +// ) TEST_GENERATION_INDUCTION(test_35, Generation::TestCase() From 63df420ffbd85e4ebffaf505995e401e07dbfbd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petra=20Hozzov=C3=A1?= Date: Sat, 18 Nov 2023 11:17:55 +0100 Subject: [PATCH 25/56] Move the logic of checking bound validity to a new method in InductionClauseIterator --- Inferences/Induction.cpp | 42 +++++++++++++++++++++++----------------- Inferences/Induction.hpp | 2 ++ 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index 940e2d46e..45109c2c2 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -410,23 +410,17 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) auto leBound = iterTraits(_helper.getLess(t)).collect(); auto grBound = iterTraits(_helper.getGreater(t)).collect(); auto indLitsIt = vi(ContextSubsetReplacement::instance(InductionContext(t, lit, premise), _opt)); - // If the induction literal is a comparison, and the induction term - // is one of its arguments, the other argument should not be allowed - // as a bound (such inductions are useless and can lead to redundant - // literals in the induction axiom). - // Here find the other argument and later only allow bounds different from it. - Term* otherArg = InductionHelper::getOtherTermFromComparison(lit, t); while (indLitsIt.hasNext()) { auto ctx = indLitsIt.next(); // process lower bounds for (const auto& b1 : leBound) { - if (!InductionHelper::isValidBound(otherArg, premise, b1)) { + if (!isValidBound(ctx, b1)) { continue; } if (_helper.isInductionForFiniteIntervalsOn()) { // process upper bounds together with current lower bound for (const auto& b2 : grBound) { - if (!InductionHelper::isValidBound(otherArg, premise, b2)) { + if (!isValidBound(ctx, b2)) { continue; } performFinIntInduction(ctx, b1, b2); @@ -440,7 +434,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) // process upper bounds if (_helper.isInductionForInfiniteIntervalsOn()) { for (const auto& b2 : grBound) { - if (!InductionHelper::isValidBound(otherArg, premise, b2)) { + if (!isValidBound(ctx, b2)) { continue; } performInfIntInduction(ctx, false, b2); @@ -452,7 +446,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) static TermQueryResult defaultBound(TermList(theory->representConstant(IntegerConstantType(0))), nullptr, nullptr); // for now, represent default bounds with no bound in the index, this is unique // since the placeholder is still int - if (notDoneInt(ctx, nullptr, nullptr, e) && InductionHelper::isValidBound(otherArg, premise, defaultBound)) { + if (notDoneInt(ctx, nullptr, nullptr, e) && isValidBound(ctx, defaultBound)) { performIntInduction(ctx, e, true, defaultBound, nullptr); performIntInduction(ctx, e, false, defaultBound, nullptr); } @@ -567,19 +561,13 @@ void InductionClauseIterator::processIntegerComparison(Clause* premise, Literal* // loop over literals containing the current induction term while (it.hasNext()) { auto ctx = it.next(); - Formula* f = ctx.getFormula(indtl, false); - ASS(f->connective() == LITERAL); - Literal* indLit = f->literal(); - Clause* indCl = ctx._cls.begin()->first; - ASS((indLit != nullptr) && (indCl != nullptr)); - Term* otherArg = InductionHelper::getOtherTermFromComparison(indLit, indt); - if (!InductionHelper::isValidBound(otherArg, indCl, b)) { + if (!isValidBound(ctx, b)) { continue; } if (_helper.isInductionForFiniteIntervalsOn()) { // go over the lower/upper bounds that contain the same induction term as the current bound for (const auto& b2 : bound2) { - if (!InductionHelper::isValidBound(otherArg, indCl, b2)) { + if (!isValidBound(ctx, b2)) { ASS_EQ(ctx._cls.size(), 1); continue; } @@ -1299,4 +1287,22 @@ bool InductionClauseIterator::notDoneInt(InductionContext context, Literal* boun return _formulaIndex.findOrInsert(context, e, b1, b2); } +// If the integer induction literal is a comparison, and the induction term is +// one of its arguments, the other argument should not be allowed as a bound +// (such inductions are useless and can lead to redundant literals in the +// induction axiom). +bool InductionClauseIterator::isValidBound(const InductionContext& context, const TermQueryResult& bound) { + Term* pt = getPlaceholderForTerm(context._indTerm); + for (const auto& kv : context._cls) { + for (const auto& lit : kv.second) { + ASS((lit != nullptr) && (kv.first != nullptr)); + Term* otherArg = InductionHelper::getOtherTermFromComparison(lit, pt); + if (!InductionHelper::isValidBound(otherArg, kv.first, bound)) { + return false; + } + } + } + return true; +} + } diff --git a/Inferences/Induction.hpp b/Inferences/Induction.hpp index 2b54a0805..0a519d379 100644 --- a/Inferences/Induction.hpp +++ b/Inferences/Induction.hpp @@ -225,6 +225,8 @@ class InductionClauseIterator bool notDoneInt(InductionContext context, Literal* bound1, Literal* bound2, InductionFormulaIndex::Entry*& e); + bool isValidBound(const InductionContext& context, const TermQueryResult& bound); + Stack _clauses; InductionHelper _helper; const Options& _opt; From 70ea10ec25b39cdb2b916a9713d92c1994aee0ac Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Sat, 18 Nov 2023 12:26:45 +0100 Subject: [PATCH 26/56] Fix some minor things --- Kernel/FormulaUnit.hpp | 8 ++------ Parse/SMTLIB2.cpp | 13 ++++++++----- Shell/FunctionDefinitionHandler.cpp | 1 + Shell/Options.cpp | 4 ++++ Shell/Preprocess.cpp | 8 ++++---- 5 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Kernel/FormulaUnit.hpp b/Kernel/FormulaUnit.hpp index 5281640fc..0d55762c1 100644 --- a/Kernel/FormulaUnit.hpp +++ b/Kernel/FormulaUnit.hpp @@ -36,10 +36,9 @@ class FormulaUnit { public: /** New unit of a given kind */ - FormulaUnit(Formula* f,const Inference& inf, bool functionDefinition = false) + FormulaUnit(Formula* f,const Inference& inf) : Unit(FORMULA,inf), - _formula(f), _cachedColor(COLOR_INVALID), _cachedWeight(0), - _functionDefinition(functionDefinition) + _formula(f), _cachedColor(COLOR_INVALID), _cachedWeight(0) {} void destroy(); @@ -56,8 +55,6 @@ class FormulaUnit Color getColor(); unsigned weight(); - bool isFunctionDefinition() const - { return _functionDefinition; } USE_ALLOCATOR(FormulaUnit); @@ -67,7 +64,6 @@ class FormulaUnit Color _cachedColor; unsigned _cachedWeight; - bool _functionDefinition; }; // class FormulaUnit diff --git a/Parse/SMTLIB2.cpp b/Parse/SMTLIB2.cpp index 68be81d5a..a741e6b66 100644 --- a/Parse/SMTLIB2.cpp +++ b/Parse/SMTLIB2.cpp @@ -847,7 +847,7 @@ void SMTLIB2::readDefineFun(const vstring& name, LExprList* iArgs, LExpr* oSort, } Formula* fla = new AtomicFormula(lit); - FormulaUnit* fu = new FormulaUnit(fla, FromInput(UnitInputType::ASSUMPTION), true /*isFunctionDefinition*/); + FormulaUnit* fu = new FormulaUnit(fla, FromInput(UnitInputType::ASSUMPTION)); UnitList::push(fu, _formulas); } @@ -928,15 +928,18 @@ void SMTLIB2::readDefineFunsRec(LExprList* declsExpr, LExprList* defsExpr) ASS(decl.sym.second != SymbolType::TYPECON); bool isTrueFun = decl.sym.second==SymbolType::FUNCTION; - TermList lhs; + Literal* lit; if (isTrueFun) { - lhs = TermList(Term::create(symbIdx,decl.args.size(),decl.args.begin())); + TermList lhs(Term::create(symbIdx,decl.args.size(),decl.args.begin())); + auto p = env.signature->getDef(decl.rangeSort); + lit = Literal::create(p, true, { lhs, rhs }); } else { Formula* frm = new AtomicFormula(Literal::create(symbIdx,decl.args.size(),true,false,decl.args.begin())); - lhs = TermList(Term::createFormula(frm)); + TermList lhs(Term::createFormula(frm)); + lit = Literal::createEquality(true,lhs,rhs,decl.rangeSort); } + Formula* fla = new AtomicFormula(lit); - Formula* fla = new AtomicFormula(Literal::createEquality(true,lhs,rhs,decl.rangeSort)); FormulaUnit* fu = new FormulaUnit(fla, FromInput(UnitInputType::ASSUMPTION)); UnitList::push(fu, _formulas); diff --git a/Shell/FunctionDefinitionHandler.cpp b/Shell/FunctionDefinitionHandler.cpp index fb1b15ef5..0e742a1c0 100644 --- a/Shell/FunctionDefinitionHandler.cpp +++ b/Shell/FunctionDefinitionHandler.cpp @@ -73,6 +73,7 @@ void FunctionDefinitionHandler::preprocess(Problem& prb) // process for rewriting if (!lhs.term()->isLiteral() && env.options->functionDefinitionRewriting()) { + it.del(); // take ownership defCl->setSplits(SplitSet::getEmpty()); defCl->incRefCnt(); ASS_EQ(condLits.size()+1,lits.size()); diff --git a/Shell/Options.cpp b/Shell/Options.cpp index 045c78e1a..38a5da4df 100644 --- a/Shell/Options.cpp +++ b/Shell/Options.cpp @@ -1275,6 +1275,8 @@ void Options::init() _structInduction.description="The kind of structural induction applied"; _structInduction.tag(OptionTag::INDUCTION); _structInduction.onlyUsefulWith(Or(_induction.is(equal(Induction::STRUCTURAL)),_induction.is(equal(Induction::BOTH)))); + _structInduction.addHardConstraint(If(equal(StructuralInductionKind::RECURSION)).then(_newCNF.is(equal(true)))); + _structInduction.addHardConstraint(If(equal(StructuralInductionKind::RECURSION)).then(_equalityResolutionWithDeletion.is(equal(true)))); _lookup.insert(&_structInduction); _intInduction = ChoiceOptionValue("int_induction_kind","iik", @@ -1347,6 +1349,8 @@ void Options::init() _functionDefinitionRewriting = BoolOptionValue("function_definition_rewriting","fnrw",false); _functionDefinitionRewriting.description = "Use function definitions as rewrite rules with the intended orientation rather than the term ordering one"; _functionDefinitionRewriting.tag(OptionTag::INFERENCES); + _functionDefinitionRewriting.addHardConstraint(If(equal(true)).then(_newCNF.is(equal(true)))); + _functionDefinitionRewriting.addHardConstraint(If(equal(true)).then(_equalityResolutionWithDeletion.is(equal(true)))); _lookup.insert(&_functionDefinitionRewriting); _integerInductionDefaultBound = BoolOptionValue("int_induction_default_bound","intinddb",false); diff --git a/Shell/Preprocess.cpp b/Shell/Preprocess.cpp index 59880b227..4cea4e85b 100644 --- a/Shell/Preprocess.cpp +++ b/Shell/Preprocess.cpp @@ -314,10 +314,6 @@ void Preprocess::preprocess(Problem& prb) } } - auto fnDefHandler = new FunctionDefinitionHandler(); - fnDefHandler->preprocess(prb); - prb.addFunctionDefinitionHandler(fnDefHandler); - prb.getProperty(); if (prb.mayHaveFunctionDefinitions()) { @@ -371,6 +367,10 @@ void Preprocess::preprocess(Problem& prb) resolver.apply(prb); } + auto fnDefHandler = new FunctionDefinitionHandler(); + fnDefHandler->preprocess(prb); + prb.addFunctionDefinitionHandler(fnDefHandler); + if (_options.generalSplitting()) { if (prb.isHigherOrder() || prb.hasPolymorphicSym()) { // TODO: extend GeneralSplitting to support polymorphism (would higher-order make sense?) if (outputAllowed()) { From 712783abec8ec857bae257c43452c10d72ab9f7e Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Sun, 19 Nov 2023 11:05:40 +0100 Subject: [PATCH 27/56] Fix predicate path in FunctionDefinitionHandler; fix some edge cases --- Inferences/Induction.cpp | 16 +-- Kernel/Signature.cpp | 27 ++++- Kernel/Signature.hpp | 14 ++- Parse/SMTLIB2.cpp | 10 +- Shell/FunctionDefinitionHandler.cpp | 116 +++++++++++++------- Shell/FunctionDefinitionHandler.hpp | 3 +- Test/SyntaxSugar.hpp | 3 +- UnitTests/tFnDefRewriting.cpp | 2 +- UnitTests/tFunctionDefinitionHandler.cpp | 134 +++++++++++------------ UnitTests/tInduction.cpp | 36 +++--- 10 files changed, 215 insertions(+), 146 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index d47f0e9bf..27ed58ef0 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -563,7 +563,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) if (lit->ground()) { Set int_terms; - vmap,vvector>>> ta_terms; + vmap,vset>>> ta_terms; auto templ = _fnDefHandler ? _fnDefHandler->getInductionTemplate(lit) : nullptr; @@ -576,9 +576,9 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) } auto it = ta_terms.find(indTerms); if (it == ta_terms.end()) { - it = ta_terms.insert(make_pair(indTerms,vvector>>())).first; + it = ta_terms.insert(make_pair(indTerms,vset>>())).first; } - it->second.push_back(make_pair(templ,typeArgs)); + it->second.insert(make_pair(templ,typeArgs)); } } @@ -599,7 +599,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) vvector indTerms = { t }; auto it = ta_terms.find(indTerms); if (it == ta_terms.end()) { - ta_terms.insert(make_pair(indTerms,vvector>>())); + ta_terms.insert(make_pair(indTerms,vset>>())); } } if(InductionHelper::isIntInductionOneOn() && InductionHelper::isIntInductionTermListInLiteral(t, lit)){ @@ -617,9 +617,9 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) } auto it = ta_terms.find(indTerms); if (it == ta_terms.end()) { - it = ta_terms.insert(make_pair(indTerms,vvector>>())).first; + it = ta_terms.insert(make_pair(indTerms,vset>>())).first; } - it->second.push_back(make_pair(templ,typeArgs)); + it->second.insert(make_pair(templ,typeArgs)); } } } @@ -680,7 +680,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) auto sideLitsIt = VirtualIterator,TermQueryResultIterator>>::getEmpty(); if (_opt.nonUnitInduction()) { sideLitsIt = pvi(iterTraits(getSTLIterator(ta_terms.begin(), ta_terms.end())) - .map([](pair,vvector>>> kv){ + .map([](pair,vset>>> kv){ return kv.first; }) .map([this](vvector ts) { @@ -712,7 +712,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) }); // collect contexts for single-literal induction with given clause auto indCtxSingle = iterTraits(getSTLIterator(ta_terms.begin(), ta_terms.end())) - .map([&lit,&premise](pair,vvector>>> arg) { + .map([&lit,&premise](pair,vset>>> arg) { return InductionContext(arg.first, lit, premise); }) // generalize all contexts if needed diff --git a/Kernel/Signature.cpp b/Kernel/Signature.cpp index 84e416290..659734608 100644 --- a/Kernel/Signature.cpp +++ b/Kernel/Signature.cpp @@ -697,14 +697,15 @@ unsigned Signature::getDiff(){ } -unsigned Signature::getDef(TermList sort) +unsigned Signature::getFnDef(unsigned fn) { + auto sort = getFunction(fn)->fnType()->result(); ASS(sort.isTerm() && sort.term()->ground()); bool added = false; auto name = "$def_"+sort.toString(); unsigned p = addPredicate(name, 2, added); - if(added){ - _defPreds.insert(p); + if (added) { + ALWAYS(_fnDefPreds.insert(p)); OperatorType* ot = OperatorType::getPredicateType({sort, sort}); Symbol* sym = getPredicate(p); sym->markProtected(); @@ -713,6 +714,26 @@ unsigned Signature::getDef(TermList sort) return p; } +unsigned Signature::getBoolDef(unsigned fn) +{ + auto type = getPredicate(fn)->predType(); + auto name = "$def_"+getPredicate(fn)->name(); + bool added = false; + auto p = addPredicate(name, type->arity(), added); + if (added) { + ALWAYS(_boolDefPreds.insert(p,fn)); + TermStack sorts; + for (unsigned i = type->numTypeArguments(); i < type->arity(); i++) { + sorts.push(type->arg(i)); + } + OperatorType* ot = OperatorType::getPredicateType(sorts.size(), sorts.begin(), type->numTypeArguments()); + Symbol* sym = getPredicate(p); + sym->markProtected(); + sym->setType(ot); + } + return p; +} + unsigned Signature::getChoice(){ bool added = false; unsigned choice = addFunction("vEPSILON",1, added); diff --git a/Kernel/Signature.hpp b/Kernel/Signature.hpp index 27a66fec4..c9da40e0d 100644 --- a/Kernel/Signature.hpp +++ b/Kernel/Signature.hpp @@ -442,7 +442,8 @@ class Signature unsigned getApp(); unsigned getDiff(); unsigned getChoice(); - unsigned getDef(TermList sort); + unsigned getFnDef(unsigned fn); + unsigned getBoolDef(unsigned fn); // Interpreted symbol declarations unsigned addIntegerConstant(const vstring& number,bool defaultSort); @@ -621,8 +622,12 @@ class Signature return (fun == _appFun && _appFun != UINT_MAX); } - bool isDefPred(unsigned p) const{ - return _defPreds.contains(p); + bool isFnDefPred(unsigned p) const{ + return _fnDefPreds.contains(p); + } + + bool isBoolDefPred(unsigned p, unsigned& orig) const { + return _boolDefPreds.find(p, orig); } bool tryGetFunctionNumber(const vstring& name, unsigned arity, unsigned& out) const; @@ -966,7 +971,8 @@ class Signature unsigned _arrayCon; unsigned _arrowCon; unsigned _appFun; - DHSet _defPreds; + DHSet _fnDefPreds; + DHMap _boolDefPreds; /** * Map from type constructor functor to the associated term algebra, if applicable for the sort. diff --git a/Parse/SMTLIB2.cpp b/Parse/SMTLIB2.cpp index a741e6b66..22bd84d7e 100644 --- a/Parse/SMTLIB2.cpp +++ b/Parse/SMTLIB2.cpp @@ -838,10 +838,11 @@ void SMTLIB2::readDefineFun(const vstring& name, LExprList* iArgs, LExpr* oSort, Literal* lit; if (isTrueFun) { TermList lhs(Term::create(symbIdx,args.size(),args.begin())); - auto p = env.signature->getDef(rangeSort); + auto p = env.signature->getFnDef(symbIdx); lit = Literal::create(p, true, { lhs, rhs }); } else { - Formula* frm = new AtomicFormula(Literal::create(symbIdx,args.size(),true,false,args.begin())); + auto p = env.signature->getBoolDef(symbIdx); + Formula* frm = new AtomicFormula(Literal::create(p,args.size(),true,false,args.begin())); TermList lhs(Term::createFormula(frm)); lit = Literal::createEquality(true, lhs, rhs, rangeSort); } @@ -931,10 +932,11 @@ void SMTLIB2::readDefineFunsRec(LExprList* declsExpr, LExprList* defsExpr) Literal* lit; if (isTrueFun) { TermList lhs(Term::create(symbIdx,decl.args.size(),decl.args.begin())); - auto p = env.signature->getDef(decl.rangeSort); + auto p = env.signature->getFnDef(symbIdx); lit = Literal::create(p, true, { lhs, rhs }); } else { - Formula* frm = new AtomicFormula(Literal::create(symbIdx,decl.args.size(),true,false,decl.args.begin())); + auto p = env.signature->getBoolDef(symbIdx); + Formula* frm = new AtomicFormula(Literal::create(p,decl.args.size(),true,false,decl.args.begin())); TermList lhs(Term::createFormula(frm)); lit = Literal::createEquality(true,lhs,rhs,decl.rangeSort); } diff --git a/Shell/FunctionDefinitionHandler.cpp b/Shell/FunctionDefinitionHandler.cpp index 0e742a1c0..30747d7a2 100644 --- a/Shell/FunctionDefinitionHandler.cpp +++ b/Shell/FunctionDefinitionHandler.cpp @@ -25,6 +25,25 @@ using namespace std; namespace Shell { +inline bool canBeUsedForRewriting(Term* lhs, Clause* cl) +{ + if (!env.options->functionDefinitionRewriting()) { + return false; + } + // TODO: we are using a codetree to get the generalizations + // for rewriting and it cannot handle unbound variables on + // the indexed side, hence we check if there are any variables + // that would be unbound + auto vIt = cl->getVariableIterator(); + while (vIt.hasNext()) { + auto v = vIt.next(); + if (!lhs->containsSubterm(TermList(v,false))) { + return false; + } + } + return true; +} + void FunctionDefinitionHandler::preprocess(Problem& prb) { UnitList::DelIterator it(prb.units()); @@ -38,10 +57,11 @@ void FunctionDefinitionHandler::preprocess(Problem& prb) LiteralStack condLits; for (unsigned i = 0; i < cl->length(); i++) { auto lit = (*cl)[i]; - if (!env.signature->isDefPred(lit->functor())) { - condLits.push(lit); - } else { + unsigned p; + if (env.signature->isFnDefPred(lit->functor()) || env.signature->isBoolDefPred(lit->functor(), p)) { defLits.push(lit); + } else { + condLits.push(lit); } } @@ -53,9 +73,19 @@ void FunctionDefinitionHandler::preprocess(Problem& prb) // clause contains definitions, we need to replace them with equalities auto lits = condLits; for (const auto& lit : defLits) { - auto lhs = lit->termArg(0); - ASS(lhs.isTerm()); - lits.push(Literal::createEquality(lit->polarity(), lhs, lit->termArg(1), SortHelper::getResultSort(lhs.term()))); + unsigned orig_fn; + if (env.signature->isBoolDefPred(lit->functor(), orig_fn)) { + TermStack args; + for (unsigned i = 0; i < lit->arity(); i++) { + args.push(*lit->nthArgument(i)); + } + lits.push(Literal::create(orig_fn, lit->arity(), lit->polarity(), false, args.begin())); + } else { + ASS(env.signature->isFnDefPred(lit->functor())); + auto lhs = lit->termArg(0); + ASS(lhs.isTerm()); + lits.push(Literal::createEquality(lit->polarity(), lhs, lit->termArg(1), SortHelper::getResultSort(lhs.term()))); + } } Clause* defCl = Clause::fromStack(lits, NonspecificInference1(InferenceRule::DEFINITION_UNFOLDING,u)); @@ -65,21 +95,26 @@ void FunctionDefinitionHandler::preprocess(Problem& prb) continue; } - auto lhs = defLits[0]->termArg(0); - auto rhs = defLits[0]->termArg(1); - - // process for induction - addBranch(lhs.term(), rhs, condLits); - - // process for rewriting - if (!lhs.term()->isLiteral() && env.options->functionDefinitionRewriting()) { - it.del(); // take ownership - defCl->setSplits(SplitSet::getEmpty()); - defCl->incRefCnt(); - ASS_EQ(condLits.size()+1,lits.size()); - _is.insert(lhs.term(), lits.top(), defCl); - // TODO should we store this clause anywhere else? + if (env.signature->isFnDefPred(defLits[0]->functor())) { + auto lhs = defLits[0]->termArg(0); + auto rhs = defLits[0]->termArg(1); + + // process for induction + addFunctionBranch(lhs.term(), rhs); + + // process for rewriting + if (canBeUsedForRewriting(lhs.term(), defCl)) { + it.del(); // take ownership + defCl->setSplits(SplitSet::getEmpty()); + defCl->incRefCnt(); + ASS_EQ(condLits.size()+1,lits.size()); + _is.insert(lhs.term(), lits.top(), defCl); + // TODO should we store this clause anywhere else? + } else { + it.replace(defCl); + } } else { + addPredicateBranch(Literal::positiveLiteral(lits.top()), condLits); it.replace(defCl); } } @@ -100,31 +135,38 @@ void FunctionDefinitionHandler::preprocess(Problem& prb) } } -void FunctionDefinitionHandler::addBranch(Term* header, TermList body, const LiteralStack& conditions) +void FunctionDefinitionHandler::addFunctionBranch(Term* header, TermList body) { auto fn = header->functor(); - auto isLit = header->isLiteral(); InductionTemplate* templ; - _templates.getValuePtr(make_pair(fn,isLit?SymbolType::PRED:SymbolType::FUNC), templ, InductionTemplate(header)); + _templates.getValuePtr(make_pair(fn,SymbolType::FUNC), templ, InductionTemplate(header)); // handle for induction vvector recursiveCalls; - if (isLit) { - ASS(static_cast(header)->isPositive()); - for(const auto& lit : conditions) { - if (!lit->isEquality() && fn == lit->functor()) { - recursiveCalls.push_back(lit->isPositive() ? lit : Literal::complementaryLiteral(lit)); + if (body.isTerm()) { + NonVariableNonTypeIterator it(body.term(), true); + while (it.hasNext()) { + auto st = it.next(); + if (st->functor() == fn) { + recursiveCalls.push_back(st); } } - } else { - if (body.isTerm()) { - NonVariableNonTypeIterator it(body.term(), true); - while (it.hasNext()) { - auto st = it.next(); - if (st->functor() == fn) { - recursiveCalls.push_back(st); - } - } + } + templ->addBranch(std::move(recursiveCalls), header); +} + +void FunctionDefinitionHandler::addPredicateBranch(Literal* header, const LiteralStack& conditions) +{ + auto fn = header->functor(); + InductionTemplate* templ; + _templates.getValuePtr(make_pair(fn,SymbolType::PRED), templ, InductionTemplate(header)); + + // handle for induction + vvector recursiveCalls; + ASS(static_cast(header)->isPositive()); + for(const auto& lit : conditions) { + if (!lit->isEquality() && fn == lit->functor()) { + recursiveCalls.push_back(lit->isPositive() ? lit : Literal::complementaryLiteral(lit)); } } templ->addBranch(std::move(recursiveCalls), header); diff --git a/Shell/FunctionDefinitionHandler.hpp b/Shell/FunctionDefinitionHandler.hpp index ddf5ba188..be8ddbcde 100644 --- a/Shell/FunctionDefinitionHandler.hpp +++ b/Shell/FunctionDefinitionHandler.hpp @@ -83,7 +83,8 @@ class FunctionDefinitionHandler USE_ALLOCATOR(FunctionDefinitionHandler); void preprocess(Problem& prb); - void addBranch(Term* header, TermList body, const LiteralStack& conditions); + void addFunctionBranch(Term* header, TermList body); + void addPredicateBranch(Literal* header, const LiteralStack& conditions); TermQueryResultIterator getGeneralizations(TypedTermList t) { return _is.getGeneralizations(t, true); diff --git a/Test/SyntaxSugar.hpp b/Test/SyntaxSugar.hpp index 27a951e6b..c59c9d01f 100644 --- a/Test/SyntaxSugar.hpp +++ b/Test/SyntaxSugar.hpp @@ -129,7 +129,8 @@ #define DECL_B_COMB(b) auto b = FuncSugar(env.signature->getCombinator(Signature::B_COMB)); #define DECL_C_COMB(c) auto c = FuncSugar(env.signature->getCombinator(Signature::C_COMB)); #define DECL_S_COMB(s) auto s = FuncSugar(env.signature->getCombinator(Signature::S_COMB)); -#define DECL_DEF(d, t) auto d = PredSugar(env.signature->getDef(t)); +#define DECL_FUN_DEF(d, t) auto d = PredSugar(env.signature->getFnDef(t.sugaredExpr().term()->functor())); +#define DECL_PRED_DEF(d, t) auto d = PredSugar(env.signature->getBoolDef(((Literal*)t)->functor())); #define DECL_DEFAULT_VARS \ __ALLOW_UNUSED( \ diff --git a/UnitTests/tFnDefRewriting.cpp b/UnitTests/tFnDefRewriting.cpp index eacc2a0c5..b33a842a0 100644 --- a/UnitTests/tFnDefRewriting.cpp +++ b/UnitTests/tFnDefRewriting.cpp @@ -31,8 +31,8 @@ REGISTER_GEN_TESTER(FnDefRewriting) #define MY_SYNTAX_SUGAR \ DECL_DEFAULT_VARS \ DECL_SORT(s) \ - DECL_DEF(def_s,s) \ DECL_CONST(b, s) \ + DECL_FUN_DEF(def_s,b()) \ DECL_FUNC(r, {s}, s) \ DECL_TERM_ALGEBRA(s, {b, r}) \ DECL_FUNC(f, {s, s}, s) \ diff --git a/UnitTests/tFunctionDefinitionHandler.cpp b/UnitTests/tFunctionDefinitionHandler.cpp index 63733846c..f9d899837 100644 --- a/UnitTests/tFunctionDefinitionHandler.cpp +++ b/UnitTests/tFunctionDefinitionHandler.cpp @@ -23,23 +23,14 @@ using std::pair; #define MY_SYNTAX_SUGAR \ DECL_DEFAULT_VARS \ - DECL_VAR(x3, 3) \ - DECL_VAR(x4, 4) \ - DECL_VAR(x5, 5) \ - DECL_VAR(x6, 6) \ - DECL_VAR(x7, 7) \ - DECL_VAR(x8, 8) \ - DECL_VAR(x9, 9) \ - DECL_VAR(x10, 10) \ - DECL_VAR(x11, 11) \ DECL_SORT(s) \ - DECL_DEF(def_s, s.sugaredExpr()) \ DECL_SORT(u) \ - DECL_DEF(def_u, u.sugaredExpr()) \ DECL_CONST(b, s) \ DECL_FUNC(r, {s}, s) \ + DECL_FUN_DEF(def_s, r(x)) \ DECL_TERM_ALGEBRA(s, {b, r}) \ DECL_CONST(b1, u) \ + DECL_FUN_DEF(def_u, b1()) \ DECL_CONST(b2, u) \ DECL_FUNC(r1, {s, u}, u) \ DECL_FUNC(r2, {u, s}, u) \ @@ -48,7 +39,9 @@ using std::pair; DECL_FUNC(g, {s}, s) \ DECL_FUNC(h, {s, s, u}, u) \ DECL_PRED(p, {s}) \ - DECL_PRED(q, {u, s}) + DECL_PRED_DEF(def_p, p(x)) \ + DECL_PRED(q, {u, s}) \ + DECL_PRED_DEF(def_q, q(x,y)) inline void addFunctionDefs(FunctionDefinitionHandler& handler, std::initializer_list cls) { auto ul = UnitList::empty(); @@ -61,17 +54,17 @@ inline void addFunctionDefs(FunctionDefinitionHandler& handler, std::initializer handler.preprocess(prb); } -inline void checkTemplateBranches(FunctionDefinitionHandler& handler, TermSugar t, const vvector>>& p) { +inline void checkTemplateBranches(FunctionDefinitionHandler& handler, TermSugar t, const vvector>>& expected) { auto templ = handler.getInductionTemplate(t.sugaredExpr().term()); ASS(templ); - auto b = templ->branches(); - ASS_EQ(b.size(), p.size()); - for (unsigned i = 0; i < b.size(); i++) { - ASS_EQ(TermList(b[i]._header), p[i].first.sugaredExpr()); - auto r = b[i]._recursiveCalls; - ASS_EQ(r.size(), p[i].second.size()); + auto actual = templ->branches(); + ASS_EQ(actual.size(), expected.size()); + for (unsigned i = 0; i < actual.size(); i++) { + ASS_EQ(TermList(actual[i]._header), expected[i].first.sugaredExpr()); + auto r = actual[i]._recursiveCalls; + ASS_EQ(r.size(), expected[i].second.size()); for (unsigned j = 0; j < r.size(); j++) { - ASS_EQ(TermList(r[j]), p[i].second[j].sugaredExpr()); + ASS_EQ(TermList(r[j]), expected[i].second[j].sugaredExpr()); } } } @@ -85,15 +78,15 @@ TEST_FUN(test_01) { clause({ def_s(g(r(x)), g(f(x,x))) }), clause({ def_u(h(x, y, r1(x, z)), h(y, y, z)) }), clause({ def_u(h(r(x), y, z), h(x, x, r2(y,z))) }), - // clause({ def_s(p(r(r(x))).wrapInTerm(), /*unused*/b(), { p(y) } } }, - // { { q(r1(x,y),r(z)).wrapInTerm(), /*unused*/b(), { q(y,r(z)), g(b) == b, q(z,b) } } }, + clause({ def_p(r(r(x))), p(y) }), + clause({ def_q(r1(x,y),r(z)), q(y,r(z)), g(b) == b, ~q(z,b) }), }); ASS(!handler.getInductionTemplate(f(x,y).sugaredExpr().term())); ASS(!handler.getInductionTemplate(g(x).sugaredExpr().term())); ASS(!handler.getInductionTemplate(h(x,y,z).sugaredExpr().term())); - // ASS(!handler.getInductionTemplate(p)); - // ASS(!handler.getInductionTemplate(q)); + ASS(!handler.getInductionTemplate(p(x))); + ASS(!handler.getInductionTemplate(q(x,y))); } // not useful functions (either no recursive calls or no argument changes in any recursive call) @@ -124,11 +117,11 @@ TEST_FUN(test_03) { clause({ def_u(h(r(x), b, y), b2) }), clause({ def_u(h(r(x), b, r1(y,z)), h(x, b, z)) }), - // { { p(r(r(x))).wrapInTerm(), /*unused*/b(), { ~p(x) } }, - // { p(b).wrapInTerm(), /*unused*/b(), { f(b,b) == b } } }, + clause({ def_p(r(r(x))), ~p(x) }), + clause({ def_p(b), f(b,b) == b }), - // { { q(y,r(r(x))).wrapInTerm(), /*unused*/b(), { ~q(y,x) } }, - // { (~q(r2(r1(x,y),z),b)).wrapInTerm(), /*unused*/b(), { } } } + clause({ def_q(y,r(r(x))), ~q(y,x) }), + clause({ ~def_q(r2(r1(x,y),z),b) }), }); checkTemplateBranches(handler, f(x,y), { @@ -150,23 +143,23 @@ TEST_FUN(test_03) { { h(r(x), r(y), z), { } } // added }); - // checkTemplateBranches(handler, p, { - // { p(r(r(x))), { p(x) } }, - // { p(b), { } }, - // { p(r(b)), { } } // added - // }); - - // checkTemplateBranches(handler, q, { - // { q(y,r(r(x))), { q(y,x) } }, - // { q(r2(r1(x,y),z),b), { } }, - // { q(b1,b), { } }, // added - // { q(b2,b), { } }, // added - // { q(r1(x4,x5),b), { } }, // added - // { q(r2(b1,x7),b), { } }, // added - // { q(r2(b2,x7),b), { } }, // added - // { q(r2(r2(x10,x11),x7),b), { } }, // added - // { q(x,r(b)), { } } // added - // }); + checkTemplateBranches(handler, p(x).wrapInTerm(), { + { p(b).wrapInTerm(), { } }, + { p(r(r(x))).wrapInTerm(), { p(x).wrapInTerm() } }, + { p(r(b)).wrapInTerm(), { } } // added + }); + + checkTemplateBranches(handler, q(x,y).wrapInTerm(), { + { q(r2(r1(x,y),z),b).wrapInTerm(), { } }, + { q(y,r(r(x))).wrapInTerm(), { q(y,x).wrapInTerm() } }, + { q(b1,b).wrapInTerm(), { } }, // added + { q(b2,b).wrapInTerm(), { } }, // added + { q(r1(x,y),b).wrapInTerm(), { } }, // added + { q(r2(b1,x),b).wrapInTerm(), { } }, // added + { q(r2(b2,x),b).wrapInTerm(), { } }, // added + { q(r2(r2(x,y),z),b).wrapInTerm(), { } }, // added + { q(x,r(b)).wrapInTerm(), { } } // added + }); } // correctly merges branches @@ -188,13 +181,13 @@ TEST_FUN(test_04) { clause({ def_u(h(r(x), y, z), h(x, y, z)) }), clause({ def_u(h(r(x), z, y), h(x, z, y)) }), - // { { p(r(r(x))).wrapInTerm(), /*unused*/b(), { ~p(x) } }, - // { p(r(r(x))).wrapInTerm(), /*unused*/b(), { ~p(r(x)) } }, - // { p(b).wrapInTerm(), /*unused*/b(), { } } }, + clause({ def_p(r(r(x))), ~p(x) }), + clause({ def_p(r(r(x))), ~p(r(x)) }), + clause({ def_p(b) }), - // { { (~q(y,r(x))).wrapInTerm(), /*unused*/b(), { ~q(y,x) } }, - // { (~q(y,b)).wrapInTerm(), /*unused*/b(), { } }, - // { q(z,r(b)).wrapInTerm(), /*unused*/b(), { q(z,b) } } } + clause({ ~def_q(y,r(x)), ~q(y,x) }), + clause({ ~def_q(y,b) }), + clause({ def_q(z,r(b)), q(z,b) }), }); checkTemplateBranches(handler, f(x,y), { @@ -215,17 +208,17 @@ TEST_FUN(test_04) { { h(b, x, y), { } }, }); - // checkTemplateBranches(handler, p, { - // { p(r(r(x))), { p(x) } }, - // { p(r(r(x))), { p(r(x)) } }, - // { p(b), { } }, - // { p(r(b)), { } } - // }); - - // checkTemplateBranches(handler, q, { - // { q(y,r(x)), { q(y,x) } }, - // { q(y,b), { } } - // }); + checkTemplateBranches(handler, p(x).wrapInTerm(), { + { p(b).wrapInTerm(), { } }, + { p(r(r(x))).wrapInTerm(), { p(r(x)).wrapInTerm() } }, + { p(r(r(x))).wrapInTerm(), { p(x).wrapInTerm() } }, + { p(r(b)).wrapInTerm(), { } } // added + }); + + checkTemplateBranches(handler, q(x,y).wrapInTerm(), { + { q(y,b).wrapInTerm(), { } }, + { q(y,r(x)).wrapInTerm(), { q(y,x).wrapInTerm() } } + }); } // non-term-algebra sorts are ignored @@ -234,16 +227,17 @@ TEST_FUN(test_05) { DECL_SORT(t) \ DECL_FUNC(f1, {t}, t) \ DECL_PRED(p1, {t}) \ - DECL_DEF(defT, t) \ + DECL_FUN_DEF(defT, f1(x)) \ + DECL_PRED_DEF(def_p1, p1(x)) \ FunctionDefinitionHandler handler; addFunctionDefs(handler, { clause({ defT(f1(f1(x)), f1(x)) }), - // clause({ p1(f1(x)).wrapInTerm(), /*unused*/b(), { p1(x) } } } + clause({ def_p1(f1(x)), p1(x) }), }); ASS(!handler.getInductionTemplate(f1(x).sugaredExpr().term())); - // ASS(!handler.getInductionTemplate(p1.functor(), false)); + ASS(!handler.getInductionTemplate((Literal*)p1(x))); } // headers with non-term-algebra arguments are not discarded @@ -252,14 +246,14 @@ TEST_FUN(test_06) { __ALLOW_UNUSED(MY_SYNTAX_SUGAR) FunctionDefinitionHandler handler; addFunctionDefs(handler, { - // { { p(g(x)).wrapInTerm(), /*unused*/b(), { p(x) } } }, + clause({ def_p(g(x)), p(x) }), clause({ def_s(f(r(x),g(y)), f(x,g(y))), }), }); - // checkTemplateBranches(handler, p, { - // { p(g(x)), { p(x) } }, - // { p(x), { } }, - // }); + checkTemplateBranches(handler, p(x).wrapInTerm(), { + { p(g(x)).wrapInTerm(), { p(x).wrapInTerm() } }, + { p(x).wrapInTerm(), { } }, + }); checkTemplateBranches(handler, f(x,y), { { f(r(x),g(y)), { f(x,g(y)) } }, diff --git a/UnitTests/tInduction.cpp b/UnitTests/tInduction.cpp index bbf3e08d4..c966eba04 100644 --- a/UnitTests/tInduction.cpp +++ b/UnitTests/tInduction.cpp @@ -228,9 +228,9 @@ class GenerationTesterInduction DECL_VAR(x4,4) \ DECL_VAR(x5,5) \ DECL_SORT(s) \ - DECL_DEF(def_s,s) \ DECL_SORT(u) \ DECL_SKOLEM_CONST(sK1, s) \ + DECL_FUN_DEF(def_s,sK1()) \ DECL_SKOLEM_CONST(sK2, s) \ DECL_SKOLEM_CONST(sK3, s) \ DECL_SKOLEM_CONST(sK4, s) \ @@ -251,6 +251,7 @@ class GenerationTesterInduction DECL_FUNC(g, {s}, s) \ DECL_FUNC(h, {s, s}, s) \ DECL_PRED(p, {s}) \ + DECL_PRED_DEF(def_p, p(x)) \ DECL_PRED(p1, {s}) \ DECL_PRED(q, {u}) \ NUMBER_SUGAR(Int) \ @@ -1135,8 +1136,9 @@ auto setup = [](SaturationAlgorithm& salg) { UnitList::push(clause({ def_s(h(b,y), y) }), ul); UnitList::push(clause({ def_s(h(r(x),y), h(x,y)) }), ul); - // { p(b()).wrapInTerm(), b()/*unused*/, { } }, - // { p(r(r(x))).wrapInTerm(), b()/*unused*/, { p(x), x != b() } }, + + UnitList::push(clause({ def_p(b()) }), ul); + UnitList::push(clause({ ~def_p(r(r(x))), p(x), x != b() }), ul); Problem prb; prb.addUnits(ul); @@ -1144,20 +1146,20 @@ auto setup = [](SaturationAlgorithm& salg) { salg.getFunctionDefinitionHandler()->preprocess(prb); }; -// TEST_GENERATION_INDUCTION(test_34, -// Generation::TestCase() -// .setup(setup) -// .options({ -// { "induction", "struct" }, -// { "structural_induction_kind", "recursion" }, -// }) -// .indices(getIndices()) -// .input( clause({ ~p(sK1) }) ) -// .expected({ -// clause({ ~p(b), ~p(r(b)), p(skx0) }), -// clause({ ~p(b), ~p(r(b)), ~p(r(r(skx0))) }), -// }) -// ) +TEST_GENERATION_INDUCTION(test_34, + Generation::TestCase() + .setup(setup) + .options({ + { "induction", "struct" }, + { "structural_induction_kind", "recursion" }, + }) + .indices(getIndices()) + .input( clause({ ~p(sK1) }) ) + .expected({ + clause({ ~p(b), ~p(r(b)), p(skx0) }), + clause({ ~p(b), ~p(r(b)), ~p(r(r(skx0))) }), + }) + ) TEST_GENERATION_INDUCTION(test_35, Generation::TestCase() From a2e69f821fd98a947292fa1055c625348d028372 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Mon, 20 Nov 2023 15:22:38 +0100 Subject: [PATCH 28/56] Avoid type arguments in ActiveOccurrenceIterator --- Inferences/Induction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index 27ed58ef0..6b8f9353d 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -51,13 +51,13 @@ Term* ActiveOccurrenceIterator::next() _fnDefHandler->getInductionTemplate(t) : nullptr; if (templ) { auto& actPos = templ->inductionPositions(); - for (unsigned i = 0; i < t->arity(); i++) { + for (unsigned i = t->numTypeArguments(); i < t->arity(); i++) { if (actPos[i]) { _stack.push(t->nthArgument(i)->term()); } } } else { - for (unsigned i = 0; i < t->arity(); i++) { + for (unsigned i = t->numTypeArguments(); i < t->arity(); i++) { _stack.push(t->nthArgument(i)->term()); } } From 34b4383d7fb2e60b64a51c2f2d2cb639796be925 Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Mon, 20 Nov 2023 14:29:20 +0000 Subject: [PATCH 29/56] be less strict about constraints --- Shell/Options.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Shell/Options.cpp b/Shell/Options.cpp index 38a5da4df..05517de00 100644 --- a/Shell/Options.cpp +++ b/Shell/Options.cpp @@ -1390,7 +1390,7 @@ void Options::init() " - not_in_both: t does not occur in both arguments of l\n" " - always: induction on l is not allowed at all\n"; _integerInductionStrictnessEq.tag(OptionTag::INDUCTION); - _integerInductionStrictnessEq.reliesOn(Or(_induction.is(equal(Induction::INTEGER)),_induction.is(equal(Induction::BOTH)))); + _integerInductionStrictnessEq.onlyUsefulWith(Or(_induction.is(equal(Induction::INTEGER)),_induction.is(equal(Induction::BOTH)))); _lookup.insert(&_integerInductionStrictnessEq); _integerInductionStrictnessComp = ChoiceOptionValue( @@ -1409,7 +1409,7 @@ void Options::init() " - not_in_both: t does not occur in both arguments of l\n" " - always: induction on l is not allowed at all\n"; _integerInductionStrictnessComp.tag(OptionTag::INDUCTION); - _integerInductionStrictnessComp.reliesOn(Or(_induction.is(equal(Induction::INTEGER)),_induction.is(equal(Induction::BOTH)))); + _integerInductionStrictnessComp.onlyUsefulWith(Or(_induction.is(equal(Induction::INTEGER)),_induction.is(equal(Induction::BOTH)))); _lookup.insert(&_integerInductionStrictnessComp); _integerInductionStrictnessTerm = ChoiceOptionValue( @@ -1425,7 +1425,7 @@ void Options::init() " - interpreted_constant: t is an interpreted constant\n" " - no_skolems: t does not contain a skolem function"; _integerInductionStrictnessTerm.tag(OptionTag::INDUCTION); - _integerInductionStrictnessTerm.reliesOn(Or(_induction.is(equal(Induction::INTEGER)),_induction.is(equal(Induction::BOTH)))); + _integerInductionStrictnessTerm.onlyUsefulWith(Or(_induction.is(equal(Induction::INTEGER)),_induction.is(equal(Induction::BOTH)))); _lookup.insert(&_integerInductionStrictnessTerm); _nonUnitInduction = BoolOptionValue("non_unit_induction","nui",false); @@ -1437,7 +1437,7 @@ void Options::init() _inductionOnActiveOccurrences = BoolOptionValue("induction_on_active_occurrences","indao",false); _inductionOnActiveOccurrences.description = "Only use induction terms from active occurrences, generalize over active occurrences"; _inductionOnActiveOccurrences.tag(OptionTag::INDUCTION); - _inductionOnActiveOccurrences.reliesOn(_induction.is(notEqual(Induction::NONE))); + _inductionOnActiveOccurrences.onlyUsefulWith(_induction.is(notEqual(Induction::NONE))); _lookup.insert(&_inductionOnActiveOccurrences); _instantiation = ChoiceOptionValue("instantiation","inst",Instantiation::OFF,{"off","on"}); From 0e9ecd88fd491a9b7841347f368dc5e537bf5b34 Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Mon, 20 Nov 2023 15:37:59 +0100 Subject: [PATCH 30/56] checkGlobalOptionConstraints after sampleStrategy (debug your sampler by failing fast) --- vampire.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/vampire.cpp b/vampire.cpp index bc6f86b52..e63a70ea2 100644 --- a/vampire.cpp +++ b/vampire.cpp @@ -144,6 +144,7 @@ Problem *doProving() // a new strategy randomization mechanism if (!env.options->strategySamplerFilename().empty()) { env.options->sampleStrategy(env.options->strategySamplerFilename()); + env.options->checkGlobalOptionConstraints(); } Problem *prb = getPreprocessedProblem(); From d60307b64f817801ec37201d2324500ca7cdb1bd Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Tue, 21 Nov 2023 08:38:00 +0000 Subject: [PATCH 31/56] added theory reasoning and properly conditioned options which rely on FunctionDefinitionHandler --- samplerIND.txt | 69 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 6 deletions(-) diff --git a/samplerIND.txt b/samplerIND.txt index b85b68b23..1d30ddd25 100644 --- a/samplerIND.txt +++ b/samplerIND.txt @@ -299,8 +299,11 @@ av=on > nicw ~cat off:600,on:76 # split_at_activation av=on > sac ~cat off:3,on:1 -# TODO: consider enabling this for vampire_z3 compiles! -# av=on > sas ~cat minisat:10,z3:1 +# sat_solver (NOTE: requires compiling with Z3) +av=on > sas ~cat minisat:10,z3:3 + +# sat_fallback_for_smt +sas=z3 > sffsmt ~cat off:10,on:1 # AVATAR SPLIT QUEUE @@ -343,9 +346,6 @@ gtg!=off > gtgl ~ui 1,5 # INDUCTION (focusing on structural) -# function_definition_rewriting -> fnrw ~cat off:3,on:1 - # induction > ind ~cat none:5,struct:10,int:1,both:1 @@ -379,11 +379,17 @@ ind!=none > indu ~cat on:5,off:1 # non_unit_induction ind!=none > nui ~cat off:5,on:1 +# function_definition_rewriting +newcnf=on erd=on > fnrw ~cat off:3,on:1 + # induction_on_active_occurrences ind!=none > indao ~cat off:3,on:1 # structural_induction_kind -ind!=none ind!=int > sik ~cat one:5,two:1,three:1,recursion:2,all:1 +> $recursionOK ~cat 0:1 +newcnf=on erd=on > $recursionOK ~cat 1:1 +ind!=none ind!=int $recursionOK=0 > sik ~cat one:5,two:1,three:1,all:1 +ind!=none ind!=int $recursionOK=1 > sik ~cat one:5,two:1,three:1,recursion:2,all:1 # below integer induction only @@ -405,3 +411,54 @@ ind!=none ind!=struct > intindsteq ~cat none:10,toplevel_not_in_other:1,only_one # int_induction_strictness_term ind!=none ind!=struct > intindstterm ~cat interpreted_constant:3,none:1,no_skolems:1 +# TERM ALGEBRA REASONINING + +# term_algebra_exhaustiveness_axiom +> taea ~cat off:1,on:1 + +# term_algebra_acyclicity +> tac ~cat off:3,axiom:1,rule:1,light:1 + +# term_algebra_rules +> tar ~cat off:1,on:1 + +# ARITHMETIC THEORIES (assume z3 will be present): + +# arithmetic_subterm_generalizations +> asg ~cat force:1,cautious:1,off:3 + +# cancellation +> canc ~cat force:1,cautious:1,off:3 + +# evaluation +> ev ~cat simple:3,force:1,cautious:1 + +# use_ac_eval +> uace ~cat off:1,on:1 + +# gaussian_variable_elimination +> gve ~cat force:1,cautious:1,off:3 + +# high_school - this only fakes an option combo for a quick access, so we will not sample it expliticly + +# instantiation +> inst ~cat off:20,on:1 + +# normalize_inequalities +> norm_ineq ~cat off:1,on:1 + +# push_unary_minus +> pum ~cat off:1,on:1 + +# theory_instantiation +> thi ~cat off:1,all:1,strong:1,neg_eq:1,overlap:1 + +# theory_instantiation_generalisation +thi!=off > thigen ~cat off:1,on:1 + +# theory_instantiation_tautology_deletion +thi!=off > thitd ~cat off:1,on:1 + +# unification_with_abstraction +> uwa ~cat off:5,interpreted_only:1,one_side_interpreted:1,one_side_constant:1,all:1,ground:1 + From 7a3adba8153e3c8e01901b290f1fcaf50fa16f60 Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Thu, 23 Nov 2023 11:16:53 +0000 Subject: [PATCH 32/56] replace StructInductionSchedule with a one generated on TIP+UFDTLIA --- CASC/Schedules.cpp | 225 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 182 insertions(+), 43 deletions(-) diff --git a/CASC/Schedules.cpp b/CASC/Schedules.cpp index 98b421c76..9ec2d49e0 100644 --- a/CASC/Schedules.cpp +++ b/CASC/Schedules.cpp @@ -3133,49 +3133,188 @@ void Schedules::getIntegerInductionSchedule(const Shell::Property& property, Sch // quicksort/sortedness/lemma7: lrs+10_1_drc=encompass:ind=struct:sik=one:to=lpo:thsq=on:sp=occurrence:indao=on:nui=on_89 void Schedules::getStructInductionSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback) { - // Empirically sorted (order somewhat guessed) - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=off:indao=on:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=off:indao=on:urr=on_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=off:indao=off:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=off:indao=off:urr=on_89"); - - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=on:indao=on:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=on:indao=on:urr=on_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=on:indao=off:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=off:indoct=on:indao=off:urr=on_89"); - - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=off:indao=on:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=off:indao=on:urr=on_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=off:indao=off:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=off:indao=off:urr=on_89"); - - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=on:indao=on:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=on:indao=on:urr=on_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=on:indao=off:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=recursion:nui=on:indoct=on:indao=off:urr=on_89"); - - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=off:indao=on:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=off:indao=on:urr=on_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=off:indao=off:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=off:indao=off:urr=on_89"); - - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=on:indao=on:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=on:indao=on:urr=on_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=on:indao=off:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=off:indoct=on:indao=off:urr=on_89"); - - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=off:indao=on:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=off:indao=on:urr=on_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=off:indao=off:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=off:indao=off:urr=on_89"); - - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=on:indao=on:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=on:indao=on:urr=on_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=on:indao=off:urr=off_89"); - quick.push("lrs+10_1_ind=struct:sos=theory:sstl=1:drc=encompass:sp=occurrence:to=lpo:sik=one:nui=on:indoct=on:indao=off:urr=on_89"); - - quick.push("lrs+1002_1_aac=none:anc=all:sac=on:ind=struct:thsq=on:to=lpo:nui=on:drc=encompass:sik=recursion:urr=on_89"); - fallback.push("lrs+10_1__50"); +// Sub-schedule for 2000Mi strat cap / 2000Mi overall limit + quick.push("lrs+1002_1:1_av=off:drc=encompass:fsr=off:gtg=position:ind=struct:newcnf=on:nwc=5.0:s2a=on:i=24:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:ind=both:indao=on:newcnf=on:nwc=10.0:sik=recursion:sp=unary_frequency:taea=off:to=lpo:uwa=all:i=7:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_fnrw=on:gtg=position:ind=struct:indao=on:indc=goal:newcnf=on:nui=on:sp=const_frequency:updr=off:i=32:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_drc=encompass:ev=cautious:gtg=exists_all:ind=struct:indgen=on:sp=unary_frequency:taea=off:to=lpo:i=37:si=on:rtra=on_0"); + quick.push("dis+10_1:1_gtg=exists_all:ind=both:indc=goal:ins=3:newcnf=on:sik=recursion:sp=frequency:taea=off:tgt=ground:to=lpo:uwa=ground:i=8:si=on:rtra=on_0"); + quick.push("lrs+21_1:1024_ind=struct:indmd=1:ins=1:lcm=predicate:sos=on:sp=frequency:taea=off:urr=on:uwa=one_side_constant:i=27:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_fsd=on:fsr=off:ind=both:indmd=1:indstrhyp=on:norm_ineq=on:plsq=on:plsqc=1:plsql=on:rawr=on:sos=on:spb=units:urr=on:i=90:si=on:rtra=on_0"); + quick.push("lrs+1011_3:1_drc=encompass:ev=force:gtg=exists_all:ind=struct:indc=goal:s2a=on:to=lpo:urr=on:i=47:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_avsq=on:avsqr=1,16:drc=off:ind=both:indstrhyp=on:norm_ineq=on:sos=on:i=31:si=on:rtra=on_0"); + quick.push("lrs+1011_2:1_av=off:drc=off:ind=struct:indao=on:newcnf=on:sp=weighted_frequency:taea=off:tar=off:uwa=one_side_constant:i=17:si=on:rtra=on_0"); + quick.push("dis+10_3:1_fnrw=on:gtg=all:ind=struct:newcnf=on:nui=on:s2a=on:s2agt=10:sik=recursion:spb=intro:uwa=one_side_constant:i=18:si=on:rtra=on_0"); + quick.push("lrs+21_1:1_alpa=random:cond=fast:drc=off:fnrw=on:ind=struct:indmd=1:newcnf=on:nm=16:nui=on:plsq=on:plsqr=32,1:sik=recursion:to=lpo:uwa=one_side_constant:i=2:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_erd=off:gtg=position:inst=on:sos=on:tac=light:to=lpo:i=30:si=on:rtra=on_0"); + quick.push("ott+10_1:1_flr=on:foolp=on:ind=struct:indc=goal:indn=off:indstrhyp=on:nui=on:spb=non_intro:updr=off:i=35:si=on:rtra=on_0"); + quick.push("dis+1010_1:2_bd=off:gtg=exists_top:ind=struct:kws=precedence:newcnf=on:sik=recursion:i=36:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_av=off:drc=off:ind=both:indao=on:newcnf=on:nwc=10.0:ss=axioms:to=lpo:i=3:si=on:rtra=on_0"); + quick.push("lrs+10_1:32_av=off:bd=off:drc=encompass:gtg=exists_top:ind=struct:indstrhyp=on:nwc=10.0:plsq=on:plsqc=1:plsqr=1308217,1048576:tac=light:i=39:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_tac=light:i=34:si=on:rtra=on_0"); + quick.push("lrs+10_1:16_avsq=on:bsd=on:drc=encompass:gtg=all:ind=struct:indstrhyp=on:nwc=10.0:sac=on:i=42:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_bd=off:ev=cautious:flr=on:gtg=exists_top:ind=both:indmd=1:indstrhyp=on:nwc=10.0:ss=axioms:i=22:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_gtg=exists_top:ind=struct:indmd=1:nui=on:s2a=on:s2at=5.0:i=92:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_br=off:drc=off:gtg=exists_all:gtgl=4:ind=struct:indoct=on:indstrhyp=on:sos=theory:sp=frequency:taea=off:to=lpo:i=67:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_anc=none:drc=encompass:ev=force:gtg=exists_all:ind=struct:newcnf=on:s2a=on:sik=recursion:i=13:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_av=off:bd=off:fnrw=on:gtg=exists_sym:gtgl=3:gve=force:ind=struct:indc=goal:indoct=on:lsd=10:newcnf=on:sik=recursion:sos=on:sp=occurrence:spb=goal:i=10:si=on:rtra=on_0"); + quick.push("lrs+1010_1:16_drc=off:fsr=off:ind=both:nm=40:nwc=3.0:rp=on:s2a=on:s2at=6.0:sac=on:uwa=one_side_constant:i=17:si=on:rtra=on_0"); + quick.push("dis+10_1:1_av=off:fnrw=on:ind=struct:newcnf=on:nwc=5.0:i=51:si=on:rtra=on_0"); + quick.push("ott+10_1:16_drc=off:fde=none:ind=both:intindstcomp=not_in_both:intindstterm=none:sac=on:taea=off:uwa=one_side_interpreted:i=18:si=on:rtra=on_0"); + quick.push("lrs+10_8:1_drc=encompass:ind=struct:indstrhyp=on:newcnf=on:ss=axioms:to=lpo:i=199:si=on:rtra=on_0"); + quick.push("lrs+21_1:1_atotf=0.2:drc=off:fsr=off:gs=on:gsaa=from_current:ind=struct:indao=on:newcnf=on:sac=on:ss=axioms:uwa=all:i=23:si=on:rtra=on_0"); + quick.push("lrs-1011_4:1_aac=none:bd=off:flr=on:foolp=on:ind=struct:indoct=on:indstrhyp=on:rawr=on:sos=all:sp=frequency:ss=included:i=3:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_asg=force:atotf=0.1:drc=off:fnrw=on:gve=cautious:ind=both:indao=on:kws=inv_frequency:newcnf=on:nwc=7.0:sp=reverse_arity:spb=intro:uace=off:i=8:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_fnrw=on:ind=struct:indc=goal:indoct=on:newcnf=on:nui=on:sik=recursion:sos=on:spb=goal_then_units:taea=off:i=8:si=on:rtra=on_0"); + quick.push("lrs+10_1:3_drc=off:gtg=position:ind=struct:indc=goal:sos=theory:ss=axioms:urr=on:i=22:si=on:rtra=on_0"); + quick.push("ott+2_1:1_ind=struct:indmd=10:indn=off:newcnf=on:nui=on:sik=recursion:uwa=one_side_interpreted:i=20:si=on:rtra=on_0"); + quick.push("dis+10_1:32_av=off:fnrw=on:ind=struct:newcnf=on:nwc=5.0:sik=recursion:i=18:si=on:rtra=on_0"); + quick.push("dis+1011_5:4_ev=cautious:flr=on:ind=struct:indmd=1:s2a=on:s2at=3.0:sp=unary_frequency:to=lpo:urr=ec_only:i=96:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_av=off:gs=on:gtg=position:ind=both:nui=on:rawr=on:s2agt=32:slsq=on:slsqc=2:i=48:si=on:rtra=on_0"); + quick.push("lrs+10_1:8_drc=off:ind=both:newcnf=on:sik=recursion:to=lpo:i=77:si=on:rtra=on_0"); + quick.push("ott+21_1277409:524288_canc=force:cond=on:sos=on:sp=const_max:spb=goal_then_units:ss=axioms:tac=light:tgt=ground:to=lpo:i=6:si=on:rtra=on_0"); + quick.push("lrs+10_1:20_bd=off:bsr=on:fnrw=on:gtg=all:gtgl=2:gve=force:ind=struct:newcnf=on:nui=on:sac=on:sik=recursion:tac=light:i=14:si=on:rtra=on_0"); + quick.push("dis+1002_1:1_add=large:newcnf=on:plsq=on:plsqc=1:sp=const_min:tac=rule:taea=off:i=8:si=on:rtra=on_0"); + quick.push("lrs+1010_3:1_ind=both:indao=on:newcnf=on:nwc=5.0:sac=on:sos=on:i=27:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_gtg=exists_top:ind=struct:indc=goal:indstrhyp=on:nui=on:nwc=10.0:sos=on:i=54:si=on:rtra=on_0"); + quick.push("ott+1002_4:1_anc=none:cond=on:drc=off:ep=RST:fde=none:flr=on:gtg=exists_all:gtgl=4:ind=struct:indmd=3:kws=arity:lma=on:newcnf=on:nui=on:rp=on:sac=on:sik=recursion:sp=const_max:uwa=interpreted_only:i=12:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_ins=2:urr=on:i=34:si=on:rtra=on_0"); + quick.push("dis+1002_1:1_ind=both:indao=on:indc=goal:indoct=on:newcnf=on:sp=const_min:taea=off:to=lpo:i=54:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_drc=off:ev=cautious:flr=on:gtg=position:ind=struct:lma=on:s2a=on:spb=intro:to=lpo:i=68:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=encompass:fde=unused:fsr=off:ind=struct:newcnf=on:to=lpo:i=26:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_gtg=position:ind=struct:indmd=1:indn=off:newcnf=on:sd=2:ss=axioms:st=3.0:i=28:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:fs=off:fsr=off:gtg=all:ind=struct:indstrhyp=on:newcnf=on:nicw=on:s2a=on:sik=all:i=152:si=on:rtra=on_0"); + quick.push("dis-1010_1:1_fsr=off:gtg=exists_sym:ind=struct:indc=goal:newcnf=on:nui=on:s2a=on:sik=recursion:i=106:si=on:rtra=on_0"); + quick.push("lrs+21_4:1_av=off:drc=off:ind=struct:indstrhyp=on:sos=on:ss=axioms:to=lpo:urr=on:i=16:si=on:rtra=on_0"); + quick.push("dis+10_1:1_av=off:fd=off:fnrw=on:gtg=position:ind=both:indmd=1:intindint=finite:intindstcomp=not_in_both:kws=precedence:newcnf=on:nui=on:nwc=3.0:sik=recursion:i=29:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_bd=off:gtg=all:ind=struct:indc=goal:indn=off:nm=2:ss=axioms:st=5.0:i=17:si=on:rtra=on_0"); + quick.push("ott+2_1:1_flr=on:ind=struct:indc=goal_plus:newcnf=on:nui=on:sik=all:spb=goal_then_units:uhcvi=on:urr=ec_only:i=32:si=on:rtra=on_0"); + // Improves by expected 658.6768954025707 probs costing 1999 Mi + // Sub-schedule for 4000Mi strat cap / 4000Mi overall limit + quick.push("dis+1010_1:1_gtg=position:ind=both:indc=goal:kws=precedence:s2a=on:s2agt=8:sac=on:sp=weighted_frequency:updr=off:i=17:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:ind=both:indao=on:newcnf=on:nwc=10.0:sik=recursion:sp=unary_frequency:taea=off:to=lpo:uwa=all:i=89:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_canc=force:fnrw=on:gtg=exists_sym:gtgl=5:ind=both:newcnf=on:nui=on:nwc=5.0:ss=axioms:i=102:si=on:rtra=on_0"); + quick.push("dis+10_1:1_gtg=exists_all:ind=both:indc=goal:ins=3:newcnf=on:sik=recursion:sp=frequency:taea=off:tgt=ground:to=lpo:uwa=ground:i=8:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:fd=preordered:fnrw=on:gsp=on:ile=on:ind=int:indmd=20:ins=1:intindsteq=toplevel_not_in_other:intindstterm=no_skolems:newcnf=on:nm=20:rawr=on:rp=on:sp=const_min:spb=intro:taea=off:i=37:si=on:rtra=on_0"); + quick.push("ott+10_8:1_av=off:canc=force:drc=encompass:gtg=position:ind=struct:indgen=on:indmd=2:ss=axioms:to=lpo:urr=on:i=144:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=encompass:ev=cautious:gtg=exists_all:gtgl=2:ind=both:indmd=3:indstrhyp=on:kws=precedence:sos=all:sp=frequency:taea=off:uwa=one_side_constant:i=40:si=on:rtra=on_0"); + quick.push("ott+1002_1:24_asg=force:bsr=unit_only:drc=off:ev=cautious:fsd=on:ind=both:indmd=10:newcnf=on:sik=recursion:sp=const_frequency:spb=units:tac=axiom:taea=off:i=188:si=on:rtra=on_0"); + quick.push("dis+10_3:1_fnrw=on:gtg=all:ind=struct:newcnf=on:nui=on:s2a=on:s2agt=10:sik=recursion:spb=intro:uwa=one_side_constant:i=18:si=on:rtra=on_0"); + quick.push("lrs+21_1:1_alpa=random:cond=fast:drc=off:fnrw=on:ind=struct:indmd=1:newcnf=on:nm=16:nui=on:plsq=on:plsqr=32,1:sik=recursion:to=lpo:uwa=one_side_constant:i=124:si=on:rtra=on_0"); + quick.push("ott+10_1:1_av=off:bd=off:canc=cautious:drc=encompass:ev=cautious:ind=struct:indstrhyp=on:sos=on:i=183:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_abs=on:afp=11000:alpa=random:amm=off:drc=off:fnrw=on:gtg=position:ins=1:newcnf=on:rp=on:sp=const_min:spb=intro:taea=off:uhcvi=on:updr=off:i=20:si=on:rtra=on_0"); + quick.push("lrs+10_1:32_av=off:bd=off:drc=encompass:gtg=exists_top:ind=struct:indstrhyp=on:nwc=10.0:plsq=on:plsqc=1:plsqr=1308217,1048576:tac=light:i=41:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_br=off:drc=off:gtg=exists_all:gtgl=4:ind=struct:indoct=on:indstrhyp=on:sos=theory:sp=frequency:taea=off:to=lpo:i=300:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_av=off:bd=off:fnrw=on:gtg=exists_sym:gtgl=3:gve=force:ind=struct:indc=goal:indoct=on:lsd=10:newcnf=on:sik=recursion:sos=on:sp=occurrence:spb=goal:i=35:si=on:rtra=on_0"); + quick.push("lrs+21_1:1_avsq=on:avsqr=1,16:drc=off:fd=preordered:ind=struct:indmd=1:s2a=on:sac=on:to=lpo:i=121:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_aac=none:add=large:ev=force:ind=both:newcnf=on:nui=on:nwc=6.0:sik=recursion:sp=unary_frequency:i=56:si=on:rtra=on_0"); + quick.push("lrs+1010_1:16_drc=off:fsr=off:ind=both:nm=40:nwc=3.0:rp=on:s2a=on:s2at=6.0:sac=on:uwa=one_side_constant:i=17:si=on:rtra=on_0"); + quick.push("lrs+10_1:1024_drc=off:ind=struct:newcnf=on:sac=on:sik=recursion:taea=off:to=lpo:i=197:si=on:rtra=on_0"); + quick.push("dis+1002_1:3_av=off:gtg=position:ind=struct:nui=on:nwc=10.0:i=87:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_asg=force:atotf=0.1:drc=off:fnrw=on:gve=cautious:ind=both:indao=on:kws=inv_frequency:newcnf=on:nwc=7.0:sp=reverse_arity:spb=intro:uace=off:i=8:si=on:rtra=on_0"); + quick.push("ott+10_8:1_bsr=unit_only:canc=force:gtg=position:ind=both:indc=goal_plus:nm=6:s2a=on:s2at=1.5:sac=on:to=lpo:uhcvi=on:urr=on:uwa=ground:i=63:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_fnrw=on:ind=struct:indc=goal:indoct=on:newcnf=on:nui=on:sik=recursion:sos=on:spb=goal_then_units:taea=off:i=51:si=on:rtra=on_0"); + quick.push("lrs+21_3:1_bsd=on:drc=encompass:ev=cautious:s2a=on:sp=unary_first:to=lpo:i=260:si=on:rtra=on_0"); + quick.push("dis+1011_1:64_awrs=converge:canc=cautious:gtg=position:ind=both:indmd=1:nm=40:nwc=5.0:sac=on:sos=all:sp=const_min:taea=off:to=lpo:i=42:si=on:rtra=on_0"); + quick.push("lrs+10_1:20_bd=off:bsr=on:fnrw=on:gtg=all:gtgl=2:gve=force:ind=struct:newcnf=on:nui=on:sac=on:sik=recursion:tac=light:i=117:si=on:rtra=on_0"); + quick.push("ott-1011_1:1_aac=none:drc=off:gtg=exists_top:gtgl=5:ind=both:indstrhyp=on:norm_ineq=on:sos=on:sp=unary_first:to=lpo:uace=off:i=175:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_bsr=on:drc=off:gtg=all:ind=struct:indoct=on:indu=off:rawr=on:s2a=on:s2at=3.0:sp=unary_first:to=lpo:i=128:si=on:rtra=on_0"); + quick.push("lrs+1010_3:1_ind=both:indao=on:newcnf=on:nwc=5.0:sac=on:sos=on:i=78:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:ind=struct:newcnf=on:sik=all:taea=off:to=lpo:i=219:si=on:rtra=on_0"); + quick.push("dis+1002_1:1_er=filter:ev=cautious:fsr=off:newcnf=on:s2a=on:sac=on:sp=frequency:to=lpo:i=61:si=on:rtra=on_0"); + quick.push("ott+2_4:1_asg=cautious:cond=fast:drc=encompass:gtg=exists_top:gtgl=4:gve=cautious:ind=both:indstrhyp=on:s2a=on:s2at=7.0:sp=frequency:to=lpo:uwa=ground:i=28:si=on:rtra=on_0"); + quick.push("dis-1010_1:1_fsr=off:gtg=exists_sym:ind=struct:indc=goal:newcnf=on:nui=on:s2a=on:sik=recursion:i=211:si=on:rtra=on_0"); + quick.push("ott+1010_3:1_acc=on:drc=off:fs=off:fsr=off:ind=struct:indn=off:inst=on:sac=on:uhcvi=on:uwa=one_side_constant:i=310:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_acc=model:fnrw=on:gsp=on:newcnf=on:nm=10:rp=on:sd=10:sp=frequency:spb=non_intro:ss=included:i=149:si=on:rtra=on_0"); + quick.push("lrs-1011_1:1_ind=struct:indao=on:newcnf=on:nwc=5.0:rnwc=on:sos=all:sp=unary_frequency:taea=off:urr=on:uwa=all:i=104:si=on:rtra=on_0"); + quick.push("dis+1010_2:1_drc=off:fnrw=on:iik=all:ind=both:intindsteq=always:lcm=reverse:newcnf=on:plsq=on:plsqc=1:plsqr=3413,801:rp=on:s2a=on:sp=const_frequency:tac=rule:uhcvi=on:uwa=interpreted_only:i=53:si=on:rtra=on_0"); + quick.push("ott+2_1:1_flr=on:ind=struct:indc=goal_plus:newcnf=on:nui=on:sik=all:spb=goal_then_units:uhcvi=on:urr=ec_only:i=143:si=on:rtra=on_0"); + // Improves by expected 42.44423245096346 probs costing 3986 Mi + // Sub-schedule for 4000Mi strat cap / 4000Mi overall limit + quick.push("lrs+1002_1:1_canc=cautious:ind=struct:nui=on:taea=off:i=248:si=on:rtra=on_0"); + quick.push("lrs+1002_1:64_drc=off:fsr=off:ind=both:indmd=4:indu=off:plsq=on:plsqr=32,1:tac=light:to=lpo:i=384:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:fd=preordered:fnrw=on:gsp=on:ile=on:ind=int:indmd=20:ins=1:intindsteq=toplevel_not_in_other:intindstterm=no_skolems:newcnf=on:nm=20:rawr=on:rp=on:sp=const_min:spb=intro:taea=off:i=37:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_ev=cautious:fd=off:ind=struct:indmd=1:newcnf=on:nui=on:taea=off:i=407:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_fsd=on:fsr=off:ind=both:indmd=1:indstrhyp=on:norm_ineq=on:plsq=on:plsqc=1:plsql=on:rawr=on:sos=on:spb=units:urr=on:i=383:si=on:rtra=on_0"); + quick.push("ott+1002_1:24_asg=force:bsr=unit_only:drc=off:ev=cautious:fsd=on:ind=both:indmd=10:newcnf=on:sik=recursion:sp=const_frequency:spb=units:tac=axiom:taea=off:i=176:si=on:rtra=on_0"); + quick.push("ott+2_1:1_asg=cautious:fd=off:flr=on:fnrw=on:foolp=on:ind=int:newcnf=on:rp=on:sp=occurrence:tgt=full:uhcvi=on:urr=on:i=121:si=on:rtra=on_0"); + quick.push("dis+10_3:1_fnrw=on:gtg=all:ind=struct:newcnf=on:nui=on:s2a=on:s2agt=10:sik=recursion:spb=intro:uwa=one_side_constant:i=691:si=on:rtra=on_0"); + quick.push("lrs+21_1:1_alpa=random:cond=fast:drc=off:fnrw=on:ind=struct:indmd=1:newcnf=on:nm=16:nui=on:plsq=on:plsqr=32,1:sik=recursion:to=lpo:uwa=one_side_constant:i=22:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_abs=on:afp=11000:alpa=random:amm=off:drc=off:fnrw=on:gtg=position:ins=1:newcnf=on:rp=on:sp=const_min:spb=intro:taea=off:uhcvi=on:updr=off:i=20:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_gtg=exists_top:ind=struct:indmd=1:nui=on:s2a=on:s2at=5.0:i=45:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_av=off:bd=off:fnrw=on:gtg=exists_sym:gtgl=3:gve=force:ind=struct:indc=goal:indoct=on:lsd=10:newcnf=on:sik=recursion:sos=on:sp=occurrence:spb=goal:i=35:si=on:rtra=on_0"); + quick.push("ott+10_8:1_bsr=unit_only:canc=force:gtg=position:ind=both:indc=goal_plus:nm=6:s2a=on:s2at=1.5:sac=on:to=lpo:uhcvi=on:urr=on:uwa=ground:i=63:si=on:rtra=on_0"); + quick.push("dis+1011_5:4_ev=cautious:flr=on:ind=struct:indmd=1:s2a=on:s2at=3.0:sp=unary_frequency:to=lpo:urr=ec_only:i=58:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_av=off:gs=on:gtg=position:ind=both:nui=on:rawr=on:s2agt=32:slsq=on:slsqc=2:i=48:si=on:rtra=on_0"); + quick.push("ott-1011_1:1_aac=none:drc=off:gtg=exists_top:gtgl=5:ind=both:indstrhyp=on:norm_ineq=on:sos=on:sp=unary_first:to=lpo:uace=off:i=175:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_ins=2:urr=on:i=35:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_drc=off:ev=cautious:flr=on:gtg=position:ind=struct:lma=on:s2a=on:spb=intro:to=lpo:i=217:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=encompass:fde=unused:fsr=off:ind=struct:newcnf=on:to=lpo:i=29:si=on:rtra=on_0"); + quick.push("ott+1010_3:1_acc=on:drc=off:fs=off:fsr=off:ind=struct:indn=off:inst=on:sac=on:uhcvi=on:uwa=one_side_constant:i=621:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_acc=model:fnrw=on:gsp=on:newcnf=on:nm=10:rp=on:sd=10:sp=frequency:spb=non_intro:ss=included:i=141:si=on:rtra=on_0"); + quick.push("dis+1010_2:1_drc=off:fnrw=on:iik=all:ind=both:intindsteq=always:lcm=reverse:newcnf=on:plsq=on:plsqc=1:plsqr=3413,801:rp=on:s2a=on:sp=const_frequency:tac=rule:uhcvi=on:uwa=interpreted_only:i=53:si=on:rtra=on_0"); + // Improves by expected 11.304593885801344 probs costing 3987 Mi + // Sub-schedule for 8000Mi strat cap / 8000Mi overall limit + quick.push("ott+10_1:1_drc=off:fd=preordered:fnrw=on:gsp=on:ile=on:ind=int:indmd=20:ins=1:intindsteq=toplevel_not_in_other:intindstterm=no_skolems:newcnf=on:nm=20:rawr=on:rp=on:sp=const_min:spb=intro:taea=off:i=37:si=on:rtra=on_0"); + quick.push("ott+1002_1:14_anc=none:drc=off:fnrw=on:ind=struct:newcnf=on:norm_ineq=on:nui=on:rp=on:s2a=on:taea=off:i=522:si=on:rtra=on_0"); + quick.push("lrs+21_1:1_alpa=random:cond=fast:drc=off:fnrw=on:ind=struct:indmd=1:newcnf=on:nm=16:nui=on:plsq=on:plsqr=32,1:sik=recursion:to=lpo:uwa=one_side_constant:i=62:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_abs=on:afp=11000:alpa=random:amm=off:drc=off:fnrw=on:gtg=position:ins=1:newcnf=on:rp=on:sp=const_min:spb=intro:taea=off:uhcvi=on:updr=off:i=20:si=on:rtra=on_0"); + quick.push("ott+4_8:1_av=off:bsr=unit_only:drc=encompass:ev=cautious:s2a=on:sos=on:i=577:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_br=off:drc=off:gtg=exists_all:gtgl=4:ind=struct:indoct=on:indstrhyp=on:sos=theory:sp=frequency:taea=off:to=lpo:i=300:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_anc=all:canc=cautious:cond=on:drc=off:ind=both:indmd=2:indstrhyp=on:lcm=reverse:nm=16:pum=on:sp=unary_first:i=885:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_acc=on:br=off:drc=off:ev=cautious:fsr=off:gve=force:ind=both:indstrhyp=on:s2a=on:s2at=6.0:sp=reverse_frequency:to=lpo:urr=on:i=547:si=on:rtra=on_0"); + quick.push("lrs+1011_1:10_add=large:avsq=on:avsqr=1,16:bd=off:drc=off:ind=both:norm_ineq=on:sos=on:spb=goal_then_units:tac=rule:i=168:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_bd=off:canc=force:drc=off:fd=preordered:ind=struct:sac=on:sd=5:sp=const_frequency:ss=axioms:st=5.0:to=lpo:i=1101:si=on:rtra=on_0"); + quick.push("dis+1011_5:4_ev=cautious:flr=on:ind=struct:indmd=1:s2a=on:s2at=3.0:sp=unary_frequency:to=lpo:urr=ec_only:i=149:si=on:rtra=on_0"); + quick.push("ott+10_16:1_abs=on:alpa=false:canc=cautious:drc=off:fsd=on:ind=struct:kws=precedence:newcnf=on:nm=10:pum=on:sac=on:sik=recursion:urr=ec_only:i=486:si=on:rtra=on_0"); + quick.push("lrs+1010_2:1_asg=cautious:av=off:bd=off:drc=off:ind=struct:norm_ineq=on:sik=two:sp=reverse_frequency:ss=axioms:to=lpo:uace=off:i=804:si=on:rtra=on_0"); + quick.push("lrs+21_1:1_avsq=on:avsqc=2:avsqr=5,4:drc=off:ev=cautious:fsd=on:s2a=on:sos=on:sp=unary_frequency:to=lpo:i=831:si=on:rtra=on_0"); + quick.push("dis-1010_1:1_fsr=off:gtg=exists_sym:ind=struct:indc=goal:newcnf=on:nui=on:s2a=on:sik=recursion:i=211:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_acc=model:fnrw=on:gsp=on:newcnf=on:nm=10:rp=on:sd=10:sp=frequency:spb=non_intro:ss=included:i=149:si=on:rtra=on_0"); + quick.push("dis+1010_2:1_drc=off:fnrw=on:iik=all:ind=both:intindsteq=always:lcm=reverse:newcnf=on:plsq=on:plsqc=1:plsqr=3413,801:rp=on:s2a=on:sp=const_frequency:tac=rule:uhcvi=on:uwa=interpreted_only:i=806:si=on:rtra=on_0"); + quick.push("ott+2_1:1_flr=on:ind=struct:indc=goal_plus:newcnf=on:nui=on:sik=all:spb=goal_then_units:uhcvi=on:urr=ec_only:i=191:si=on:rtra=on_0"); + // Improves by expected 9.030096694661525 probs costing 7828 Mi + // Sub-schedule for 20000Mi strat cap / 20000Mi overall limit + quick.push("lrs+10_1:1_drc=off:ind=both:indao=on:newcnf=on:nwc=10.0:sik=recursion:sp=unary_frequency:taea=off:to=lpo:uwa=all:i=2421:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_fnrw=on:gtg=position:ind=struct:indao=on:indc=goal:newcnf=on:nui=on:sp=const_frequency:updr=off:i=435:si=on:rtra=on_0"); + quick.push("lrs+1010_5:1_gtg=exists_top:gtgl=4:ins=2:lecc=2.0:newcnf=on:plsq=on:plsqr=5,1:rp=on:spb=units:tgt=full:to=lpo:i=489:si=on:rtra=on_0"); + quick.push("lrs+1002_1:64_drc=off:fsr=off:ind=both:indmd=4:indu=off:plsq=on:plsqr=32,1:tac=light:to=lpo:i=384:si=on:rtra=on_0"); + quick.push("ott+1002_1:14_anc=none:drc=off:fnrw=on:ind=struct:newcnf=on:norm_ineq=on:nui=on:rp=on:s2a=on:taea=off:i=1104:si=on:rtra=on_0"); + quick.push("ott+1002_1:24_asg=force:bsr=unit_only:drc=off:ev=cautious:fsd=on:ind=both:indmd=10:newcnf=on:sik=recursion:sp=const_frequency:spb=units:tac=axiom:taea=off:i=188:si=on:rtra=on_0"); + quick.push("dis+1010_1:2_bd=off:gtg=exists_top:ind=struct:kws=precedence:newcnf=on:sik=recursion:i=1948:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_br=off:drc=off:gtg=exists_all:gtgl=4:ind=struct:indoct=on:indstrhyp=on:sos=theory:sp=frequency:taea=off:to=lpo:i=255:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_anc=all:canc=cautious:cond=on:drc=off:ind=both:indmd=2:indstrhyp=on:lcm=reverse:nm=16:pum=on:sp=unary_first:i=2110:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_acc=on:br=off:drc=off:ev=cautious:fsr=off:gve=force:ind=both:indstrhyp=on:s2a=on:s2at=6.0:sp=reverse_frequency:to=lpo:urr=on:i=547:si=on:rtra=on_0"); + quick.push("ott+10_8:1_bsr=unit_only:canc=force:gtg=position:ind=both:indc=goal_plus:nm=6:s2a=on:s2at=1.5:sac=on:to=lpo:uhcvi=on:urr=on:uwa=ground:i=615:si=on:rtra=on_0"); + quick.push("lrs+1011_1:10_add=large:avsq=on:avsqr=1,16:bd=off:drc=off:ind=both:norm_ineq=on:sos=on:spb=goal_then_units:tac=rule:i=4701:si=on:rtra=on_0"); + quick.push("dis+10_8:1_drc=off:gtg=exists_sym:ind=both:newcnf=on:nui=on:sac=on:sos=on:i=641:si=on:rtra=on_0"); + quick.push("ott-1011_1:1_aac=none:drc=off:gtg=exists_top:gtgl=5:ind=both:indstrhyp=on:norm_ineq=on:sos=on:sp=unary_first:to=lpo:uace=off:i=175:si=on:rtra=on_0"); + quick.push("ott+1011_9554569:1048576_bd=preordered:bs=on:canc=force:drc=off:gve=force:ind=both:indao=on:indmd=5:newcnf=on:taea=off:to=lpo:i=1217:si=on:rtra=on_0"); + quick.push("ott+10_16:1_abs=on:alpa=false:canc=cautious:drc=off:fsd=on:ind=struct:kws=precedence:newcnf=on:nm=10:pum=on:sac=on:sik=recursion:urr=ec_only:i=486:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_drc=off:ev=cautious:flr=on:gtg=position:ind=struct:lma=on:s2a=on:spb=intro:to=lpo:i=217:si=on:rtra=on_0"); + quick.push("ott+1010_3:1_acc=on:drc=off:fs=off:fsr=off:ind=struct:indn=off:inst=on:sac=on:uhcvi=on:uwa=one_side_constant:i=502:si=on:rtra=on_0"); + quick.push("dis+1010_2:1_drc=off:fnrw=on:iik=all:ind=both:intindsteq=always:lcm=reverse:newcnf=on:plsq=on:plsqc=1:plsqr=3413,801:rp=on:s2a=on:sp=const_frequency:tac=rule:uhcvi=on:uwa=interpreted_only:i=806:si=on:rtra=on_0"); + // Improves by expected 5.531899690045145 probs costing 19222 Mi + // Sub-schedule for 40000Mi strat cap / 40000Mi overall limit + quick.push("lrs+1010_5:1_gtg=exists_top:gtgl=4:ins=2:lecc=2.0:newcnf=on:plsq=on:plsqr=5,1:rp=on:spb=units:tgt=full:to=lpo:i=489:si=on:rtra=on_0"); + quick.push("ott+1002_1:14_anc=none:drc=off:fnrw=on:ind=struct:newcnf=on:norm_ineq=on:nui=on:rp=on:s2a=on:taea=off:i=888:si=on:rtra=on_0"); + quick.push("lrs+21_59:405_bs=unit_only:bsd=on:drc=off:fnrw=on:gs=on:ind=struct:indmd=2:newcnf=on:rp=on:sik=recursion:tar=off:i=8798:si=on:rtra=on_0"); + quick.push("lrs+1011_1:10_add=large:avsq=on:avsqr=1,16:bd=off:drc=off:ind=both:norm_ineq=on:sos=on:spb=goal_then_units:tac=rule:i=4701:si=on:rtra=on_0"); + quick.push("ott-1011_1:1_aac=none:drc=off:gtg=exists_top:gtgl=5:ind=both:indstrhyp=on:norm_ineq=on:sos=on:sp=unary_first:to=lpo:uace=off:i=1958:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_canc=force:er=filter:ind=struct:pum=on:sac=on:sp=const_min:to=lpo:i=9169:si=on:rtra=on_0"); + quick.push("ott+1010_3:1_acc=on:drc=off:fs=off:fsr=off:ind=struct:indn=off:inst=on:sac=on:uhcvi=on:uwa=one_side_constant:i=502:si=on:rtra=on_0"); + quick.push("dis+1010_2:1_drc=off:fnrw=on:iik=all:ind=both:intindsteq=always:lcm=reverse:newcnf=on:plsq=on:plsqc=1:plsqr=3413,801:rp=on:s2a=on:sp=const_frequency:tac=rule:uhcvi=on:uwa=interpreted_only:i=806:si=on:rtra=on_0"); + // Improves by expected 1.4064171526479847 probs costing 27303 Mi + // Sub-schedule for 120000Mi strat cap / 120000Mi overall limit + quick.push("lrs+10_1:1_drc=off:ind=both:indao=on:newcnf=on:nwc=10.0:sik=recursion:sp=unary_frequency:taea=off:to=lpo:uwa=all:i=27001:si=on:rtra=on_0"); + quick.push("lrs+1010_5:1_gtg=exists_top:gtgl=4:ins=2:lecc=2.0:newcnf=on:plsq=on:plsqr=5,1:rp=on:spb=units:tgt=full:to=lpo:i=489:si=on:rtra=on_0"); + quick.push("dis+1002_1:3_av=off:gtg=position:ind=struct:nui=on:nwc=10.0:i=46024:si=on:rtra=on_0"); + quick.push("lrs+1011_1:10_add=large:avsq=on:avsqr=1,16:bd=off:drc=off:ind=both:norm_ineq=on:sos=on:spb=goal_then_units:tac=rule:i=4701:si=on:rtra=on_0"); + // Improves by expected 0.5685274400338337 probs costing 78211 Mi + // Sub-schedule for 240000Mi strat cap / 240000Mi overall limit + quick.push("lrs+1010_5:1_gtg=exists_top:gtgl=4:ins=2:lecc=2.0:newcnf=on:plsq=on:plsqr=5,1:rp=on:spb=units:tgt=full:to=lpo:i=489:si=on:rtra=on_0"); + // Improves by expected 0.10290002939989498 probs costing 488 Mi + // Overall score 729.0655627461239 probs on average / budget 143024 Mi } void Schedules::getSnakeTptpUnsSchedule(const Shell::Property& property, Schedule& quick) { From 8c889f5d313182dab91217f45979c3e3c8802dd2 Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Wed, 29 Nov 2023 06:27:58 +0000 Subject: [PATCH 33/56] advance Z3 to Nikolaj's fix --- z3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/z3 b/z3 index e417f7d78..79bbbf76d 160000 --- a/z3 +++ b/z3 @@ -1 +1 @@ -Subproject commit e417f7d78509b2d0c9ebc911fee7632e6ef546b6 +Subproject commit 79bbbf76d0c123481c8ca05cd3a98939270074d3 From c0651e39b19957f7183efeba1331d782d4ff941e Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Sat, 2 Dec 2023 17:00:21 +0100 Subject: [PATCH 34/56] Fall back when to indao=off when no occurrences are active --- Inferences/Induction.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index 6b8f9353d..906d37a0c 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -268,6 +268,8 @@ InductionContext ActiveOccurrenceContextReplacement::next() } } } + // TODO enforce this + // ASS(!context._cls.empty()); return context; } @@ -278,10 +280,14 @@ VirtualIterator contextReplacementInstance(const InductionCont if (opt.inductionOnActiveOccurrences()) { ActiveOccurrenceContextReplacement aor(context, fnDefHandler); ASS(aor.hasNext()); - ctx = aor.next(); - res = pvi(getSingletonIterator(ctx)); - if (!aor.hasNonActive()) { - return res; + auto ao_ctx = aor.next(); + // TODO do this filtering inside ActiveOccurrenceContextReplacement + if (!ao_ctx._cls.empty()) { + ctx = ao_ctx; + res = pvi(getSingletonIterator(ctx)); + if (!aor.hasNonActive()) { + return res; + } } } return pvi(getConcatenatedIterator(res, vi(opt.inductionGen() From 7a6d68c2f70147c8b0eb77cd7033d29912589e50 Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Mon, 4 Dec 2023 09:49:28 +0100 Subject: [PATCH 35/56] TermFunIterator does not avoid type positions (in the poly case), let's do this with NonVariableNonTypeIterator instead --- Kernel/Clause.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Kernel/Clause.cpp b/Kernel/Clause.cpp index f89ee1cd9..55e40b0d9 100644 --- a/Kernel/Clause.cpp +++ b/Kernel/Clause.cpp @@ -576,10 +576,9 @@ unsigned Clause::computeWeightForClauseSelection(const Options& opt) const if(derivedFromGoal && opt.restrictNWCtoGC()){ bool found = false; for(unsigned i=0;i<_length;i++){ - TermFunIterator it(_literals[i]); - it.next(); // skip literal symbol + NonVariableNonTypeIterator it(_literals[i]); while(it.hasNext()){ - found |= env.signature->getFunction(it.next())->inGoal(); + found |= env.signature->getFunction(it.next()->functor())->inGoal(); } } if(!found){ derivedFromGoal=false; } From 4ceed92b81966e72acdb28e550fd8e3facb35c9a Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Mon, 18 Dec 2023 18:15:51 +0100 Subject: [PATCH 36/56] updated schedule(s) for struct_induction, the new one, struct_induction_tip, trained on tip exports, the struct_induction proper one only trained on inductive_benchmarks/.../dty --- CASC/PortfolioMode.cpp | 3 + CASC/Schedules.cpp | 577 ++++++++++++++++++++++++++++------------- CASC/Schedules.hpp | 1 + Shell/Options.cpp | 3 +- Shell/Options.hpp | 3 +- 5 files changed, 410 insertions(+), 177 deletions(-) diff --git a/CASC/PortfolioMode.cpp b/CASC/PortfolioMode.cpp index 003093fb7..684d66c25 100644 --- a/CASC/PortfolioMode.cpp +++ b/CASC/PortfolioMode.cpp @@ -407,6 +407,9 @@ void PortfolioMode::getSchedules(const Property& prop, Schedule& quick, Schedule case Options::Schedule::STRUCT_INDUCTION: Schedules::getStructInductionSchedule(prop,quick,fallback); break; + case Options::Schedule::STRUCT_INDUCTION_TIP: + Schedules::getStructInductionTipSchedule(prop,quick,fallback); + break; } } diff --git a/CASC/Schedules.cpp b/CASC/Schedules.cpp index 9ec2d49e0..eb6a03ab1 100644 --- a/CASC/Schedules.cpp +++ b/CASC/Schedules.cpp @@ -3133,188 +3133,415 @@ void Schedules::getIntegerInductionSchedule(const Shell::Property& property, Sch // quicksort/sortedness/lemma7: lrs+10_1_drc=encompass:ind=struct:sik=one:to=lpo:thsq=on:sp=occurrence:indao=on:nui=on_89 void Schedules::getStructInductionSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback) { -// Sub-schedule for 2000Mi strat cap / 2000Mi overall limit - quick.push("lrs+1002_1:1_av=off:drc=encompass:fsr=off:gtg=position:ind=struct:newcnf=on:nwc=5.0:s2a=on:i=24:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:ind=both:indao=on:newcnf=on:nwc=10.0:sik=recursion:sp=unary_frequency:taea=off:to=lpo:uwa=all:i=7:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_fnrw=on:gtg=position:ind=struct:indao=on:indc=goal:newcnf=on:nui=on:sp=const_frequency:updr=off:i=32:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_drc=encompass:ev=cautious:gtg=exists_all:ind=struct:indgen=on:sp=unary_frequency:taea=off:to=lpo:i=37:si=on:rtra=on_0"); - quick.push("dis+10_1:1_gtg=exists_all:ind=both:indc=goal:ins=3:newcnf=on:sik=recursion:sp=frequency:taea=off:tgt=ground:to=lpo:uwa=ground:i=8:si=on:rtra=on_0"); - quick.push("lrs+21_1:1024_ind=struct:indmd=1:ins=1:lcm=predicate:sos=on:sp=frequency:taea=off:urr=on:uwa=one_side_constant:i=27:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_fsd=on:fsr=off:ind=both:indmd=1:indstrhyp=on:norm_ineq=on:plsq=on:plsqc=1:plsql=on:rawr=on:sos=on:spb=units:urr=on:i=90:si=on:rtra=on_0"); - quick.push("lrs+1011_3:1_drc=encompass:ev=force:gtg=exists_all:ind=struct:indc=goal:s2a=on:to=lpo:urr=on:i=47:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_avsq=on:avsqr=1,16:drc=off:ind=both:indstrhyp=on:norm_ineq=on:sos=on:i=31:si=on:rtra=on_0"); - quick.push("lrs+1011_2:1_av=off:drc=off:ind=struct:indao=on:newcnf=on:sp=weighted_frequency:taea=off:tar=off:uwa=one_side_constant:i=17:si=on:rtra=on_0"); - quick.push("dis+10_3:1_fnrw=on:gtg=all:ind=struct:newcnf=on:nui=on:s2a=on:s2agt=10:sik=recursion:spb=intro:uwa=one_side_constant:i=18:si=on:rtra=on_0"); - quick.push("lrs+21_1:1_alpa=random:cond=fast:drc=off:fnrw=on:ind=struct:indmd=1:newcnf=on:nm=16:nui=on:plsq=on:plsqr=32,1:sik=recursion:to=lpo:uwa=one_side_constant:i=2:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_erd=off:gtg=position:inst=on:sos=on:tac=light:to=lpo:i=30:si=on:rtra=on_0"); - quick.push("ott+10_1:1_flr=on:foolp=on:ind=struct:indc=goal:indn=off:indstrhyp=on:nui=on:spb=non_intro:updr=off:i=35:si=on:rtra=on_0"); - quick.push("dis+1010_1:2_bd=off:gtg=exists_top:ind=struct:kws=precedence:newcnf=on:sik=recursion:i=36:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_av=off:drc=off:ind=both:indao=on:newcnf=on:nwc=10.0:ss=axioms:to=lpo:i=3:si=on:rtra=on_0"); - quick.push("lrs+10_1:32_av=off:bd=off:drc=encompass:gtg=exists_top:ind=struct:indstrhyp=on:nwc=10.0:plsq=on:plsqc=1:plsqr=1308217,1048576:tac=light:i=39:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_tac=light:i=34:si=on:rtra=on_0"); - quick.push("lrs+10_1:16_avsq=on:bsd=on:drc=encompass:gtg=all:ind=struct:indstrhyp=on:nwc=10.0:sac=on:i=42:si=on:rtra=on_0"); - quick.push("ott+1010_1:1_bd=off:ev=cautious:flr=on:gtg=exists_top:ind=both:indmd=1:indstrhyp=on:nwc=10.0:ss=axioms:i=22:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_gtg=exists_top:ind=struct:indmd=1:nui=on:s2a=on:s2at=5.0:i=92:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_br=off:drc=off:gtg=exists_all:gtgl=4:ind=struct:indoct=on:indstrhyp=on:sos=theory:sp=frequency:taea=off:to=lpo:i=67:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_anc=none:drc=encompass:ev=force:gtg=exists_all:ind=struct:newcnf=on:s2a=on:sik=recursion:i=13:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_av=off:bd=off:fnrw=on:gtg=exists_sym:gtgl=3:gve=force:ind=struct:indc=goal:indoct=on:lsd=10:newcnf=on:sik=recursion:sos=on:sp=occurrence:spb=goal:i=10:si=on:rtra=on_0"); - quick.push("lrs+1010_1:16_drc=off:fsr=off:ind=both:nm=40:nwc=3.0:rp=on:s2a=on:s2at=6.0:sac=on:uwa=one_side_constant:i=17:si=on:rtra=on_0"); - quick.push("dis+10_1:1_av=off:fnrw=on:ind=struct:newcnf=on:nwc=5.0:i=51:si=on:rtra=on_0"); - quick.push("ott+10_1:16_drc=off:fde=none:ind=both:intindstcomp=not_in_both:intindstterm=none:sac=on:taea=off:uwa=one_side_interpreted:i=18:si=on:rtra=on_0"); - quick.push("lrs+10_8:1_drc=encompass:ind=struct:indstrhyp=on:newcnf=on:ss=axioms:to=lpo:i=199:si=on:rtra=on_0"); - quick.push("lrs+21_1:1_atotf=0.2:drc=off:fsr=off:gs=on:gsaa=from_current:ind=struct:indao=on:newcnf=on:sac=on:ss=axioms:uwa=all:i=23:si=on:rtra=on_0"); - quick.push("lrs-1011_4:1_aac=none:bd=off:flr=on:foolp=on:ind=struct:indoct=on:indstrhyp=on:rawr=on:sos=all:sp=frequency:ss=included:i=3:si=on:rtra=on_0"); - quick.push("lrs+2_1:1_asg=force:atotf=0.1:drc=off:fnrw=on:gve=cautious:ind=both:indao=on:kws=inv_frequency:newcnf=on:nwc=7.0:sp=reverse_arity:spb=intro:uace=off:i=8:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_fnrw=on:ind=struct:indc=goal:indoct=on:newcnf=on:nui=on:sik=recursion:sos=on:spb=goal_then_units:taea=off:i=8:si=on:rtra=on_0"); - quick.push("lrs+10_1:3_drc=off:gtg=position:ind=struct:indc=goal:sos=theory:ss=axioms:urr=on:i=22:si=on:rtra=on_0"); - quick.push("ott+2_1:1_ind=struct:indmd=10:indn=off:newcnf=on:nui=on:sik=recursion:uwa=one_side_interpreted:i=20:si=on:rtra=on_0"); - quick.push("dis+10_1:32_av=off:fnrw=on:ind=struct:newcnf=on:nwc=5.0:sik=recursion:i=18:si=on:rtra=on_0"); - quick.push("dis+1011_5:4_ev=cautious:flr=on:ind=struct:indmd=1:s2a=on:s2at=3.0:sp=unary_frequency:to=lpo:urr=ec_only:i=96:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_av=off:gs=on:gtg=position:ind=both:nui=on:rawr=on:s2agt=32:slsq=on:slsqc=2:i=48:si=on:rtra=on_0"); - quick.push("lrs+10_1:8_drc=off:ind=both:newcnf=on:sik=recursion:to=lpo:i=77:si=on:rtra=on_0"); - quick.push("ott+21_1277409:524288_canc=force:cond=on:sos=on:sp=const_max:spb=goal_then_units:ss=axioms:tac=light:tgt=ground:to=lpo:i=6:si=on:rtra=on_0"); - quick.push("lrs+10_1:20_bd=off:bsr=on:fnrw=on:gtg=all:gtgl=2:gve=force:ind=struct:newcnf=on:nui=on:sac=on:sik=recursion:tac=light:i=14:si=on:rtra=on_0"); - quick.push("dis+1002_1:1_add=large:newcnf=on:plsq=on:plsqc=1:sp=const_min:tac=rule:taea=off:i=8:si=on:rtra=on_0"); - quick.push("lrs+1010_3:1_ind=both:indao=on:newcnf=on:nwc=5.0:sac=on:sos=on:i=27:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_gtg=exists_top:ind=struct:indc=goal:indstrhyp=on:nui=on:nwc=10.0:sos=on:i=54:si=on:rtra=on_0"); - quick.push("ott+1002_4:1_anc=none:cond=on:drc=off:ep=RST:fde=none:flr=on:gtg=exists_all:gtgl=4:ind=struct:indmd=3:kws=arity:lma=on:newcnf=on:nui=on:rp=on:sac=on:sik=recursion:sp=const_max:uwa=interpreted_only:i=12:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_ins=2:urr=on:i=34:si=on:rtra=on_0"); - quick.push("dis+1002_1:1_ind=both:indao=on:indc=goal:indoct=on:newcnf=on:sp=const_min:taea=off:to=lpo:i=54:si=on:rtra=on_0"); - quick.push("ott+1002_1:1_drc=off:ev=cautious:flr=on:gtg=position:ind=struct:lma=on:s2a=on:spb=intro:to=lpo:i=68:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=encompass:fde=unused:fsr=off:ind=struct:newcnf=on:to=lpo:i=26:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_gtg=position:ind=struct:indmd=1:indn=off:newcnf=on:sd=2:ss=axioms:st=3.0:i=28:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=off:fs=off:fsr=off:gtg=all:ind=struct:indstrhyp=on:newcnf=on:nicw=on:s2a=on:sik=all:i=152:si=on:rtra=on_0"); - quick.push("dis-1010_1:1_fsr=off:gtg=exists_sym:ind=struct:indc=goal:newcnf=on:nui=on:s2a=on:sik=recursion:i=106:si=on:rtra=on_0"); - quick.push("lrs+21_4:1_av=off:drc=off:ind=struct:indstrhyp=on:sos=on:ss=axioms:to=lpo:urr=on:i=16:si=on:rtra=on_0"); - quick.push("dis+10_1:1_av=off:fd=off:fnrw=on:gtg=position:ind=both:indmd=1:intindint=finite:intindstcomp=not_in_both:kws=precedence:newcnf=on:nui=on:nwc=3.0:sik=recursion:i=29:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_bd=off:gtg=all:ind=struct:indc=goal:indn=off:nm=2:ss=axioms:st=5.0:i=17:si=on:rtra=on_0"); - quick.push("ott+2_1:1_flr=on:ind=struct:indc=goal_plus:newcnf=on:nui=on:sik=all:spb=goal_then_units:uhcvi=on:urr=ec_only:i=32:si=on:rtra=on_0"); - // Improves by expected 658.6768954025707 probs costing 1999 Mi + // Ran on all_fair.txt + // Sub-schedule for 2000Mi strat cap / 2000Mi overall limit + quick.push("ott+10_1:4_av=off:drc=off:ind=struct:indgen=on:newcnf=on:nui=on:uwa=ground:i=10:si=on:rtra=on_0"); + quick.push("dis+10_1:1_aac=none:alpa=true:drc=off:ind=both:indoct=on:newcnf=on:sac=on:taea=off:to=lpo:i=5:si=on:rtra=on_0"); + quick.push("lrs+1010_1:3_drc=encompass:ind=both:indmd=1:nui=on:s2a=on:ss=axioms:i=24:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_bd=off:gtg=exists_top:ind=struct:indmd=2:indstrhyp=on:nwc=5.0:s2a=on:s2agt=16:i=36:si=on:rtra=on_0"); + quick.push("ott+10_1:32_bsd=on:canc=force:drc=off:fsr=off:ind=struct:indao=on:newcnf=on:rawr=on:sac=on:taea=off:i=284:si=on:rtra=on_0"); + quick.push("lrs+1011_5:1_av=off:canc=force:drc=encompass:s2a=on:sp=const_frequency:to=lpo:urr=on:i=7:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_atotf=0.2:drc=off:gtg=exists_top:ind=both:nwc=10.0:sac=on:sp=unary_frequency:tgt=ground:to=lpo:i=7:si=on:rtra=on_0"); + quick.push("dis+10_1:1_gtg=exists_top:gve=cautious:ind=struct:indn=off:rawr=on:s2a=on:s2agt=8:sac=on:uwa=all:i=11:si=on:rtra=on_0"); + quick.push("lrs+2_1:4_drc=off:gtg=position:gve=cautious:ile=on:ind=struct:indao=on:indc=goal:indmd=6:newcnf=on:nwc=5.0:s2a=on:tac=axiom:to=lpo:i=232:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:ind=both:indoct=on:indstrhyp=on:sos=on:sp=const_frequency:ss=axioms:to=lpo:i=96:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bce=on:drc=off:fsd=on:ind=struct:indgen=on:indgenss=2:sac=on:taea=off:to=lpo:uwa=interpreted_only:i=293:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_avsq=on:avsqc=1:avsqr=1,16:drc=off:ev=force:ind=struct:sos=on:to=lpo:urr=on:i=14:si=on:rtra=on_0"); + quick.push("ott+10_1:172_awrs=decay:drc=off:gtg=position:ind=both:indao=on:indc=goal:indgen=on:newcnf=on:sik=recursion:sp=weighted_frequency:taea=off:uhcvi=on:i=165:si=on:rtra=on_0"); + quick.push("dis+10_1:14_gtg=position:sp=frequency:ss=axioms:tgt=full:i=9:si=on:rtra=on_0"); + quick.push("lrs+10_1:128_drc=off:gtg=exists_top:ind=struct:indstrhyp=on:sac=on:slsq=on:slsqc=1:taea=off:i=25:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_av=off:br=off:drc=off:gtg=exists_all:ind=both:indc=goal:indmd=15:plsq=on:plsqr=9,1:sos=on:sp=unary_frequency:tgt=ground:to=lpo:uace=off:uwa=one_side_interpreted:i=3:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_drc=encompass:ind=struct:indao=on:newcnf=on:plsq=on:plsqr=32,1:sp=frequency:to=lpo:i=2:si=on:rtra=on_0"); + quick.push("dis+1002_1:1024_av=off:bd=off:drc=off:fsr=off:gtg=position:ind=struct:indc=goal:indgen=on:indgenss=2:taea=off:to=lpo:i=742:si=on:rtra=on_0"); + quick.push("lrs+1010_1:128_aac=none:alpa=false:cond=fast:drc=off:gtg=position:gve=cautious:ind=both:norm_ineq=on:nwc=10.0:sac=on:sp=frequency:tgt=full:to=lpo:i=53:si=on:rtra=on_0"); + // Improves by expected 5526.94623336456 probs costing 1999 Mi // Sub-schedule for 4000Mi strat cap / 4000Mi overall limit - quick.push("dis+1010_1:1_gtg=position:ind=both:indc=goal:kws=precedence:s2a=on:s2agt=8:sac=on:sp=weighted_frequency:updr=off:i=17:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:ind=both:indao=on:newcnf=on:nwc=10.0:sik=recursion:sp=unary_frequency:taea=off:to=lpo:uwa=all:i=89:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_canc=force:fnrw=on:gtg=exists_sym:gtgl=5:ind=both:newcnf=on:nui=on:nwc=5.0:ss=axioms:i=102:si=on:rtra=on_0"); - quick.push("dis+10_1:1_gtg=exists_all:ind=both:indc=goal:ins=3:newcnf=on:sik=recursion:sp=frequency:taea=off:tgt=ground:to=lpo:uwa=ground:i=8:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=off:fd=preordered:fnrw=on:gsp=on:ile=on:ind=int:indmd=20:ins=1:intindsteq=toplevel_not_in_other:intindstterm=no_skolems:newcnf=on:nm=20:rawr=on:rp=on:sp=const_min:spb=intro:taea=off:i=37:si=on:rtra=on_0"); - quick.push("ott+10_8:1_av=off:canc=force:drc=encompass:gtg=position:ind=struct:indgen=on:indmd=2:ss=axioms:to=lpo:urr=on:i=144:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=encompass:ev=cautious:gtg=exists_all:gtgl=2:ind=both:indmd=3:indstrhyp=on:kws=precedence:sos=all:sp=frequency:taea=off:uwa=one_side_constant:i=40:si=on:rtra=on_0"); - quick.push("ott+1002_1:24_asg=force:bsr=unit_only:drc=off:ev=cautious:fsd=on:ind=both:indmd=10:newcnf=on:sik=recursion:sp=const_frequency:spb=units:tac=axiom:taea=off:i=188:si=on:rtra=on_0"); - quick.push("dis+10_3:1_fnrw=on:gtg=all:ind=struct:newcnf=on:nui=on:s2a=on:s2agt=10:sik=recursion:spb=intro:uwa=one_side_constant:i=18:si=on:rtra=on_0"); - quick.push("lrs+21_1:1_alpa=random:cond=fast:drc=off:fnrw=on:ind=struct:indmd=1:newcnf=on:nm=16:nui=on:plsq=on:plsqr=32,1:sik=recursion:to=lpo:uwa=one_side_constant:i=124:si=on:rtra=on_0"); - quick.push("ott+10_1:1_av=off:bd=off:canc=cautious:drc=encompass:ev=cautious:ind=struct:indstrhyp=on:sos=on:i=183:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_abs=on:afp=11000:alpa=random:amm=off:drc=off:fnrw=on:gtg=position:ins=1:newcnf=on:rp=on:sp=const_min:spb=intro:taea=off:uhcvi=on:updr=off:i=20:si=on:rtra=on_0"); - quick.push("lrs+10_1:32_av=off:bd=off:drc=encompass:gtg=exists_top:ind=struct:indstrhyp=on:nwc=10.0:plsq=on:plsqc=1:plsqr=1308217,1048576:tac=light:i=41:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_br=off:drc=off:gtg=exists_all:gtgl=4:ind=struct:indoct=on:indstrhyp=on:sos=theory:sp=frequency:taea=off:to=lpo:i=300:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_av=off:bd=off:fnrw=on:gtg=exists_sym:gtgl=3:gve=force:ind=struct:indc=goal:indoct=on:lsd=10:newcnf=on:sik=recursion:sos=on:sp=occurrence:spb=goal:i=35:si=on:rtra=on_0"); - quick.push("lrs+21_1:1_avsq=on:avsqr=1,16:drc=off:fd=preordered:ind=struct:indmd=1:s2a=on:sac=on:to=lpo:i=121:si=on:rtra=on_0"); - quick.push("ott+1010_1:1_aac=none:add=large:ev=force:ind=both:newcnf=on:nui=on:nwc=6.0:sik=recursion:sp=unary_frequency:i=56:si=on:rtra=on_0"); - quick.push("lrs+1010_1:16_drc=off:fsr=off:ind=both:nm=40:nwc=3.0:rp=on:s2a=on:s2at=6.0:sac=on:uwa=one_side_constant:i=17:si=on:rtra=on_0"); - quick.push("lrs+10_1:1024_drc=off:ind=struct:newcnf=on:sac=on:sik=recursion:taea=off:to=lpo:i=197:si=on:rtra=on_0"); - quick.push("dis+1002_1:3_av=off:gtg=position:ind=struct:nui=on:nwc=10.0:i=87:si=on:rtra=on_0"); - quick.push("lrs+2_1:1_asg=force:atotf=0.1:drc=off:fnrw=on:gve=cautious:ind=both:indao=on:kws=inv_frequency:newcnf=on:nwc=7.0:sp=reverse_arity:spb=intro:uace=off:i=8:si=on:rtra=on_0"); - quick.push("ott+10_8:1_bsr=unit_only:canc=force:gtg=position:ind=both:indc=goal_plus:nm=6:s2a=on:s2at=1.5:sac=on:to=lpo:uhcvi=on:urr=on:uwa=ground:i=63:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_fnrw=on:ind=struct:indc=goal:indoct=on:newcnf=on:nui=on:sik=recursion:sos=on:spb=goal_then_units:taea=off:i=51:si=on:rtra=on_0"); - quick.push("lrs+21_3:1_bsd=on:drc=encompass:ev=cautious:s2a=on:sp=unary_first:to=lpo:i=260:si=on:rtra=on_0"); - quick.push("dis+1011_1:64_awrs=converge:canc=cautious:gtg=position:ind=both:indmd=1:nm=40:nwc=5.0:sac=on:sos=all:sp=const_min:taea=off:to=lpo:i=42:si=on:rtra=on_0"); - quick.push("lrs+10_1:20_bd=off:bsr=on:fnrw=on:gtg=all:gtgl=2:gve=force:ind=struct:newcnf=on:nui=on:sac=on:sik=recursion:tac=light:i=117:si=on:rtra=on_0"); - quick.push("ott-1011_1:1_aac=none:drc=off:gtg=exists_top:gtgl=5:ind=both:indstrhyp=on:norm_ineq=on:sos=on:sp=unary_first:to=lpo:uace=off:i=175:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_bsr=on:drc=off:gtg=all:ind=struct:indoct=on:indu=off:rawr=on:s2a=on:s2at=3.0:sp=unary_first:to=lpo:i=128:si=on:rtra=on_0"); - quick.push("lrs+1010_3:1_ind=both:indao=on:newcnf=on:nwc=5.0:sac=on:sos=on:i=78:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:ind=struct:newcnf=on:sik=all:taea=off:to=lpo:i=219:si=on:rtra=on_0"); - quick.push("dis+1002_1:1_er=filter:ev=cautious:fsr=off:newcnf=on:s2a=on:sac=on:sp=frequency:to=lpo:i=61:si=on:rtra=on_0"); - quick.push("ott+2_4:1_asg=cautious:cond=fast:drc=encompass:gtg=exists_top:gtgl=4:gve=cautious:ind=both:indstrhyp=on:s2a=on:s2at=7.0:sp=frequency:to=lpo:uwa=ground:i=28:si=on:rtra=on_0"); - quick.push("dis-1010_1:1_fsr=off:gtg=exists_sym:ind=struct:indc=goal:newcnf=on:nui=on:s2a=on:sik=recursion:i=211:si=on:rtra=on_0"); - quick.push("ott+1010_3:1_acc=on:drc=off:fs=off:fsr=off:ind=struct:indn=off:inst=on:sac=on:uhcvi=on:uwa=one_side_constant:i=310:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_acc=model:fnrw=on:gsp=on:newcnf=on:nm=10:rp=on:sd=10:sp=frequency:spb=non_intro:ss=included:i=149:si=on:rtra=on_0"); - quick.push("lrs-1011_1:1_ind=struct:indao=on:newcnf=on:nwc=5.0:rnwc=on:sos=all:sp=unary_frequency:taea=off:urr=on:uwa=all:i=104:si=on:rtra=on_0"); - quick.push("dis+1010_2:1_drc=off:fnrw=on:iik=all:ind=both:intindsteq=always:lcm=reverse:newcnf=on:plsq=on:plsqc=1:plsqr=3413,801:rp=on:s2a=on:sp=const_frequency:tac=rule:uhcvi=on:uwa=interpreted_only:i=53:si=on:rtra=on_0"); - quick.push("ott+2_1:1_flr=on:ind=struct:indc=goal_plus:newcnf=on:nui=on:sik=all:spb=goal_then_units:uhcvi=on:urr=ec_only:i=143:si=on:rtra=on_0"); - // Improves by expected 42.44423245096346 probs costing 3986 Mi + quick.push("lrs+1010_1:3_drc=encompass:ind=both:indmd=1:nui=on:s2a=on:ss=axioms:i=66:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=encompass:fsr=off:ind=struct:indao=on:indmd=3:indoct=on:newcnf=on:taea=off:i=51:si=on:rtra=on_0"); + quick.push("ott+11_5:1_av=off:br=off:canc=cautious:drc=off:ev=cautious:fsr=off:ind=struct:indstrhyp=on:newcnf=on:i=128:si=on:rtra=on_0"); + quick.push("ott+10_1:12_bsd=on:drc=off:fde=none:ind=struct:indgen=on:indgenss=2:norm_ineq=on:sac=on:taea=off:thi=strong:uwa=ground:i=571:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_alpa=random:drc=encompass:gtg=all:kws=arity:nwc=3.0:spb=goal_then_units:ss=axioms:urr=on:i=44:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_fsr=off:gtg=position:ind=both:indmd=1:indstrhyp=on:nwc=5.0:s2a=on:i=31:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_bsr=unit_only:ev=cautious:ind=both:nui=on:sac=on:i=47:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=380:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bce=on:drc=off:fsd=on:ind=struct:indgen=on:indgenss=2:sac=on:taea=off:to=lpo:uwa=interpreted_only:i=860:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_avsq=on:avsqc=1:avsqr=1,16:drc=off:ev=force:ind=struct:sos=on:to=lpo:urr=on:i=46:si=on:rtra=on_0"); + quick.push("ott+10_1:172_awrs=decay:drc=off:gtg=position:ind=both:indao=on:indc=goal:indgen=on:newcnf=on:sik=recursion:sp=weighted_frequency:taea=off:uhcvi=on:i=1108:si=on:rtra=on_0"); + quick.push("lrs+10_1:128_drc=off:gtg=exists_top:ind=struct:indstrhyp=on:sac=on:slsq=on:slsqc=1:taea=off:i=61:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:gtg=exists_sym:ind=struct:indstrhyp=on:sp=const_min:taea=off:tar=off:to=lpo:i=67:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_av=off:br=off:drc=off:gtg=exists_all:ind=both:indc=goal:indmd=15:plsq=on:plsqr=9,1:sos=on:sp=unary_frequency:tgt=ground:to=lpo:uace=off:uwa=one_side_interpreted:i=3:si=on:rtra=on_0"); + quick.push("lrs+21_1:1_av=off:ind=struct:newcnf=on:plsq=on:plsqc=1:plsqr=32,1:rawr=on:sos=all:sup=off:i=20:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_drc=encompass:ind=struct:indao=on:newcnf=on:plsq=on:plsqr=32,1:sp=frequency:to=lpo:i=19:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_av=off:drc=off:gtg=position:ind=struct:indoct=on:plsq=on:plsqc=1:plsqr=32,1:to=lpo:i=33:si=on:rtra=on_0"); + quick.push("ott+21_1:10_bsr=on:canc=force:drc=encompass:ev=cautious:ile=on:ind=struct:indao=on:indoct=on:newcnf=on:spb=non_intro:tac=rule:taea=off:to=lpo:i=443:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_bd=preordered:gtg=exists_all:gtgl=3:ind=struct:indmd=1:indstrhyp=on:nui=on:sos=on:i=18:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_canc=cautious:sos=on:sp=unary_frequency:i=19:si=on:rtra=on_0"); + // Improves by expected 305.621133946607 probs costing 3995 Mi // Sub-schedule for 4000Mi strat cap / 4000Mi overall limit - quick.push("lrs+1002_1:1_canc=cautious:ind=struct:nui=on:taea=off:i=248:si=on:rtra=on_0"); - quick.push("lrs+1002_1:64_drc=off:fsr=off:ind=both:indmd=4:indu=off:plsq=on:plsqr=32,1:tac=light:to=lpo:i=384:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=off:fd=preordered:fnrw=on:gsp=on:ile=on:ind=int:indmd=20:ins=1:intindsteq=toplevel_not_in_other:intindstterm=no_skolems:newcnf=on:nm=20:rawr=on:rp=on:sp=const_min:spb=intro:taea=off:i=37:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_ev=cautious:fd=off:ind=struct:indmd=1:newcnf=on:nui=on:taea=off:i=407:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_fsd=on:fsr=off:ind=both:indmd=1:indstrhyp=on:norm_ineq=on:plsq=on:plsqc=1:plsql=on:rawr=on:sos=on:spb=units:urr=on:i=383:si=on:rtra=on_0"); - quick.push("ott+1002_1:24_asg=force:bsr=unit_only:drc=off:ev=cautious:fsd=on:ind=both:indmd=10:newcnf=on:sik=recursion:sp=const_frequency:spb=units:tac=axiom:taea=off:i=176:si=on:rtra=on_0"); - quick.push("ott+2_1:1_asg=cautious:fd=off:flr=on:fnrw=on:foolp=on:ind=int:newcnf=on:rp=on:sp=occurrence:tgt=full:uhcvi=on:urr=on:i=121:si=on:rtra=on_0"); - quick.push("dis+10_3:1_fnrw=on:gtg=all:ind=struct:newcnf=on:nui=on:s2a=on:s2agt=10:sik=recursion:spb=intro:uwa=one_side_constant:i=691:si=on:rtra=on_0"); - quick.push("lrs+21_1:1_alpa=random:cond=fast:drc=off:fnrw=on:ind=struct:indmd=1:newcnf=on:nm=16:nui=on:plsq=on:plsqr=32,1:sik=recursion:to=lpo:uwa=one_side_constant:i=22:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_abs=on:afp=11000:alpa=random:amm=off:drc=off:fnrw=on:gtg=position:ins=1:newcnf=on:rp=on:sp=const_min:spb=intro:taea=off:uhcvi=on:updr=off:i=20:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_gtg=exists_top:ind=struct:indmd=1:nui=on:s2a=on:s2at=5.0:i=45:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_av=off:bd=off:fnrw=on:gtg=exists_sym:gtgl=3:gve=force:ind=struct:indc=goal:indoct=on:lsd=10:newcnf=on:sik=recursion:sos=on:sp=occurrence:spb=goal:i=35:si=on:rtra=on_0"); - quick.push("ott+10_8:1_bsr=unit_only:canc=force:gtg=position:ind=both:indc=goal_plus:nm=6:s2a=on:s2at=1.5:sac=on:to=lpo:uhcvi=on:urr=on:uwa=ground:i=63:si=on:rtra=on_0"); - quick.push("dis+1011_5:4_ev=cautious:flr=on:ind=struct:indmd=1:s2a=on:s2at=3.0:sp=unary_frequency:to=lpo:urr=ec_only:i=58:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_av=off:gs=on:gtg=position:ind=both:nui=on:rawr=on:s2agt=32:slsq=on:slsqc=2:i=48:si=on:rtra=on_0"); - quick.push("ott-1011_1:1_aac=none:drc=off:gtg=exists_top:gtgl=5:ind=both:indstrhyp=on:norm_ineq=on:sos=on:sp=unary_first:to=lpo:uace=off:i=175:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_ins=2:urr=on:i=35:si=on:rtra=on_0"); - quick.push("ott+1002_1:1_drc=off:ev=cautious:flr=on:gtg=position:ind=struct:lma=on:s2a=on:spb=intro:to=lpo:i=217:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=encompass:fde=unused:fsr=off:ind=struct:newcnf=on:to=lpo:i=29:si=on:rtra=on_0"); - quick.push("ott+1010_3:1_acc=on:drc=off:fs=off:fsr=off:ind=struct:indn=off:inst=on:sac=on:uhcvi=on:uwa=one_side_constant:i=621:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_acc=model:fnrw=on:gsp=on:newcnf=on:nm=10:rp=on:sd=10:sp=frequency:spb=non_intro:ss=included:i=141:si=on:rtra=on_0"); - quick.push("dis+1010_2:1_drc=off:fnrw=on:iik=all:ind=both:intindsteq=always:lcm=reverse:newcnf=on:plsq=on:plsqc=1:plsqr=3413,801:rp=on:s2a=on:sp=const_frequency:tac=rule:uhcvi=on:uwa=interpreted_only:i=53:si=on:rtra=on_0"); - // Improves by expected 11.304593885801344 probs costing 3987 Mi + quick.push("lrs+10_1:1_gtg=exists_sym:ind=struct:indstrhyp=on:kws=precedence:sos=on:sp=unary_first:spb=goal:urr=on:i=89:si=on:rtra=on_0"); + quick.push("ott+10_1:1_ev=cautious:gtg=exists_top:ind=struct:indc=goal:indstrhyp=on:nwc=10.0:sos=on:i=72:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_bd=off:gtg=exists_top:ind=struct:indmd=2:indstrhyp=on:nwc=5.0:s2a=on:s2agt=16:i=41:si=on:rtra=on_0"); + quick.push("dis+10_1:128_ind=both:indmd=1:indstrhyp=on:nui=on:sac=on:i=45:si=on:rtra=on_0"); + quick.push("ott+1002_1:4_drc=off:fde=unused:fsd=on:fsdmm=3:gtg=exists_all:gtgl=3:ind=struct:indgen=on:indoct=on:newcnf=on:norm_ineq=on:sp=occurrence:taea=off:to=lpo:i=84:si=on:rtra=on_0"); + quick.push("dis+10_1:1_av=off:fsd=on:fsr=off:gtg=exists_all:ind=struct:indc=goal:indgen=on:ss=axioms:i=66:si=on:rtra=on_0"); + quick.push("ott+1011_1:1_ind=struct:indstrhyp=on:newcnf=on:nui=on:s2a=on:i=74:si=on:rtra=on_0"); + quick.push("ott+1011_31:15_abs=on:drc=off:ev=cautious:gtg=position:gtgl=3:ind=struct:indc=goal:indmd=1:taea=off:to=lpo:i=179:si=on:rtra=on_0"); + quick.push("ott+1002_3:2_aac=none:abs=on:alpa=true:drc=off:gve=force:ind=struct:indao=on:newcnf=on:nicw=on:nm=30:rawr=on:taea=off:i=1038:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bce=on:drc=off:fsd=on:ind=struct:indgen=on:indgenss=2:sac=on:taea=off:to=lpo:uwa=interpreted_only:i=1022:si=on:rtra=on_0"); + quick.push("dis+10_1:1_av=off:bsd=on:fd=off:fnrw=on:gtg=all:gtgl=2:ind=both:indao=on:indc=goal:indgen=on:newcnf=on:plsq=on:plsqr=32,1:ss=axioms:i=89:si=on:rtra=on_0"); + quick.push("ott+1011_1:1_aac=none:fd=preordered:ind=struct:indao=on:newcnf=on:nm=0:nui=on:sik=three:sp=const_frequency:spb=intro:to=lpo:i=35:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=688:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_av=off:br=off:drc=off:gtg=exists_all:ind=both:indc=goal:indmd=15:plsq=on:plsqr=9,1:sos=on:sp=unary_frequency:tgt=ground:to=lpo:uace=off:uwa=one_side_interpreted:i=3:si=on:rtra=on_0"); + quick.push("ott+10_5:1_drc=off:ind=struct:indstrhyp=on:kws=precedence:taea=off:uwa=all:i=51:si=on:rtra=on_0"); + quick.push("dis+10_1:64_ind=both:indao=on:indstrhyp=on:intindint=infinite:newcnf=on:nm=0:ss=axioms:i=55:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_asg=cautious:gtg=all:ind=struct:indc=goal:norm_ineq=on:nui=on:s2a=on:i=111:si=on:rtra=on_0"); + quick.push("lrs+1011_1:7_drc=off:fsr=off:ind=struct:norm_ineq=on:s2a=on:taea=off:to=lpo:uace=off:uwa=interpreted_only:i=60:si=on:rtra=on_0"); + quick.push("dis+10_1:1024_av=off:ind=struct:indgen=on:indgenss=2:indmd=1:indstrhyp=on:sp=const_min:taea=off:to=lpo:i=38:si=on:rtra=on_0"); + quick.push("lrs+1010_1:128_aac=none:alpa=false:cond=fast:drc=off:gtg=position:gve=cautious:ind=both:norm_ineq=on:nwc=10.0:sac=on:sp=frequency:tgt=full:to=lpo:i=111:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_bd=preordered:gtg=exists_all:gtgl=3:ind=struct:indmd=1:indstrhyp=on:nui=on:sos=on:i=52:si=on:rtra=on_0"); + // Improves by expected 106.95111512053347 probs costing 3982 Mi // Sub-schedule for 8000Mi strat cap / 8000Mi overall limit - quick.push("ott+10_1:1_drc=off:fd=preordered:fnrw=on:gsp=on:ile=on:ind=int:indmd=20:ins=1:intindsteq=toplevel_not_in_other:intindstterm=no_skolems:newcnf=on:nm=20:rawr=on:rp=on:sp=const_min:spb=intro:taea=off:i=37:si=on:rtra=on_0"); - quick.push("ott+1002_1:14_anc=none:drc=off:fnrw=on:ind=struct:newcnf=on:norm_ineq=on:nui=on:rp=on:s2a=on:taea=off:i=522:si=on:rtra=on_0"); - quick.push("lrs+21_1:1_alpa=random:cond=fast:drc=off:fnrw=on:ind=struct:indmd=1:newcnf=on:nm=16:nui=on:plsq=on:plsqr=32,1:sik=recursion:to=lpo:uwa=one_side_constant:i=62:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_abs=on:afp=11000:alpa=random:amm=off:drc=off:fnrw=on:gtg=position:ins=1:newcnf=on:rp=on:sp=const_min:spb=intro:taea=off:uhcvi=on:updr=off:i=20:si=on:rtra=on_0"); - quick.push("ott+4_8:1_av=off:bsr=unit_only:drc=encompass:ev=cautious:s2a=on:sos=on:i=577:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_br=off:drc=off:gtg=exists_all:gtgl=4:ind=struct:indoct=on:indstrhyp=on:sos=theory:sp=frequency:taea=off:to=lpo:i=300:si=on:rtra=on_0"); - quick.push("ott+1010_1:1_anc=all:canc=cautious:cond=on:drc=off:ind=both:indmd=2:indstrhyp=on:lcm=reverse:nm=16:pum=on:sp=unary_first:i=885:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_acc=on:br=off:drc=off:ev=cautious:fsr=off:gve=force:ind=both:indstrhyp=on:s2a=on:s2at=6.0:sp=reverse_frequency:to=lpo:urr=on:i=547:si=on:rtra=on_0"); - quick.push("lrs+1011_1:10_add=large:avsq=on:avsqr=1,16:bd=off:drc=off:ind=both:norm_ineq=on:sos=on:spb=goal_then_units:tac=rule:i=168:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_bd=off:canc=force:drc=off:fd=preordered:ind=struct:sac=on:sd=5:sp=const_frequency:ss=axioms:st=5.0:to=lpo:i=1101:si=on:rtra=on_0"); - quick.push("dis+1011_5:4_ev=cautious:flr=on:ind=struct:indmd=1:s2a=on:s2at=3.0:sp=unary_frequency:to=lpo:urr=ec_only:i=149:si=on:rtra=on_0"); - quick.push("ott+10_16:1_abs=on:alpa=false:canc=cautious:drc=off:fsd=on:ind=struct:kws=precedence:newcnf=on:nm=10:pum=on:sac=on:sik=recursion:urr=ec_only:i=486:si=on:rtra=on_0"); - quick.push("lrs+1010_2:1_asg=cautious:av=off:bd=off:drc=off:ind=struct:norm_ineq=on:sik=two:sp=reverse_frequency:ss=axioms:to=lpo:uace=off:i=804:si=on:rtra=on_0"); - quick.push("lrs+21_1:1_avsq=on:avsqc=2:avsqr=5,4:drc=off:ev=cautious:fsd=on:s2a=on:sos=on:sp=unary_frequency:to=lpo:i=831:si=on:rtra=on_0"); - quick.push("dis-1010_1:1_fsr=off:gtg=exists_sym:ind=struct:indc=goal:newcnf=on:nui=on:s2a=on:sik=recursion:i=211:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_acc=model:fnrw=on:gsp=on:newcnf=on:nm=10:rp=on:sd=10:sp=frequency:spb=non_intro:ss=included:i=149:si=on:rtra=on_0"); - quick.push("dis+1010_2:1_drc=off:fnrw=on:iik=all:ind=both:intindsteq=always:lcm=reverse:newcnf=on:plsq=on:plsqc=1:plsqr=3413,801:rp=on:s2a=on:sp=const_frequency:tac=rule:uhcvi=on:uwa=interpreted_only:i=806:si=on:rtra=on_0"); - quick.push("ott+2_1:1_flr=on:ind=struct:indc=goal_plus:newcnf=on:nui=on:sik=all:spb=goal_then_units:uhcvi=on:urr=ec_only:i=191:si=on:rtra=on_0"); - // Improves by expected 9.030096694661525 probs costing 7828 Mi + quick.push("ott+10_1:12_bsd=on:drc=off:fde=none:ind=struct:indgen=on:indgenss=2:norm_ineq=on:sac=on:taea=off:thi=strong:uwa=ground:i=717:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=1598:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:ind=both:indoct=on:indstrhyp=on:sos=on:sp=const_frequency:ss=axioms:to=lpo:i=311:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bce=on:drc=off:fsd=on:ind=struct:indgen=on:indgenss=2:sac=on:taea=off:to=lpo:uwa=interpreted_only:i=1235:si=on:rtra=on_0"); + quick.push("ott+10_1:172_awrs=decay:drc=off:gtg=position:ind=both:indao=on:indc=goal:indgen=on:newcnf=on:sik=recursion:sp=weighted_frequency:taea=off:uhcvi=on:i=2892:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:gtg=all:ind=both:indgen=on:indoct=on:sp=reverse_frequency:ss=axioms:to=lpo:i=102:si=on:rtra=on_0"); + quick.push("dis+21_1:1_ind=struct:indstrhyp=on:norm_ineq=on:rawr=on:s2a=on:spb=goal:to=lpo:uace=off:urr=on:i=34:si=on:rtra=on_0"); + quick.push("dis+1002_1:1024_av=off:bd=off:drc=off:fsr=off:gtg=position:ind=struct:indc=goal:indgen=on:indgenss=2:taea=off:to=lpo:i=1117:si=on:rtra=on_0"); + // Improves by expected 143.8120963705851 probs costing 7998 Mi // Sub-schedule for 20000Mi strat cap / 20000Mi overall limit - quick.push("lrs+10_1:1_drc=off:ind=both:indao=on:newcnf=on:nwc=10.0:sik=recursion:sp=unary_frequency:taea=off:to=lpo:uwa=all:i=2421:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_fnrw=on:gtg=position:ind=struct:indao=on:indc=goal:newcnf=on:nui=on:sp=const_frequency:updr=off:i=435:si=on:rtra=on_0"); - quick.push("lrs+1010_5:1_gtg=exists_top:gtgl=4:ins=2:lecc=2.0:newcnf=on:plsq=on:plsqr=5,1:rp=on:spb=units:tgt=full:to=lpo:i=489:si=on:rtra=on_0"); - quick.push("lrs+1002_1:64_drc=off:fsr=off:ind=both:indmd=4:indu=off:plsq=on:plsqr=32,1:tac=light:to=lpo:i=384:si=on:rtra=on_0"); - quick.push("ott+1002_1:14_anc=none:drc=off:fnrw=on:ind=struct:newcnf=on:norm_ineq=on:nui=on:rp=on:s2a=on:taea=off:i=1104:si=on:rtra=on_0"); - quick.push("ott+1002_1:24_asg=force:bsr=unit_only:drc=off:ev=cautious:fsd=on:ind=both:indmd=10:newcnf=on:sik=recursion:sp=const_frequency:spb=units:tac=axiom:taea=off:i=188:si=on:rtra=on_0"); - quick.push("dis+1010_1:2_bd=off:gtg=exists_top:ind=struct:kws=precedence:newcnf=on:sik=recursion:i=1948:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_br=off:drc=off:gtg=exists_all:gtgl=4:ind=struct:indoct=on:indstrhyp=on:sos=theory:sp=frequency:taea=off:to=lpo:i=255:si=on:rtra=on_0"); - quick.push("ott+1010_1:1_anc=all:canc=cautious:cond=on:drc=off:ind=both:indmd=2:indstrhyp=on:lcm=reverse:nm=16:pum=on:sp=unary_first:i=2110:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_acc=on:br=off:drc=off:ev=cautious:fsr=off:gve=force:ind=both:indstrhyp=on:s2a=on:s2at=6.0:sp=reverse_frequency:to=lpo:urr=on:i=547:si=on:rtra=on_0"); - quick.push("ott+10_8:1_bsr=unit_only:canc=force:gtg=position:ind=both:indc=goal_plus:nm=6:s2a=on:s2at=1.5:sac=on:to=lpo:uhcvi=on:urr=on:uwa=ground:i=615:si=on:rtra=on_0"); - quick.push("lrs+1011_1:10_add=large:avsq=on:avsqr=1,16:bd=off:drc=off:ind=both:norm_ineq=on:sos=on:spb=goal_then_units:tac=rule:i=4701:si=on:rtra=on_0"); - quick.push("dis+10_8:1_drc=off:gtg=exists_sym:ind=both:newcnf=on:nui=on:sac=on:sos=on:i=641:si=on:rtra=on_0"); - quick.push("ott-1011_1:1_aac=none:drc=off:gtg=exists_top:gtgl=5:ind=both:indstrhyp=on:norm_ineq=on:sos=on:sp=unary_first:to=lpo:uace=off:i=175:si=on:rtra=on_0"); - quick.push("ott+1011_9554569:1048576_bd=preordered:bs=on:canc=force:drc=off:gve=force:ind=both:indao=on:indmd=5:newcnf=on:taea=off:to=lpo:i=1217:si=on:rtra=on_0"); - quick.push("ott+10_16:1_abs=on:alpa=false:canc=cautious:drc=off:fsd=on:ind=struct:kws=precedence:newcnf=on:nm=10:pum=on:sac=on:sik=recursion:urr=ec_only:i=486:si=on:rtra=on_0"); - quick.push("ott+1002_1:1_drc=off:ev=cautious:flr=on:gtg=position:ind=struct:lma=on:s2a=on:spb=intro:to=lpo:i=217:si=on:rtra=on_0"); - quick.push("ott+1010_3:1_acc=on:drc=off:fs=off:fsr=off:ind=struct:indn=off:inst=on:sac=on:uhcvi=on:uwa=one_side_constant:i=502:si=on:rtra=on_0"); - quick.push("dis+1010_2:1_drc=off:fnrw=on:iik=all:ind=both:intindsteq=always:lcm=reverse:newcnf=on:plsq=on:plsqc=1:plsqr=3413,801:rp=on:s2a=on:sp=const_frequency:tac=rule:uhcvi=on:uwa=interpreted_only:i=806:si=on:rtra=on_0"); - // Improves by expected 5.531899690045145 probs costing 19222 Mi + quick.push("ott+2_1:1_av=off:ev=cautious:fd=preordered:ind=struct:indstrhyp=on:sos=on:i=198:si=on:rtra=on_0"); + quick.push("lrs+10_1:20_aac=none:asg=cautious:awrs=decay:bsd=on:drc=off:ev=force:flr=on:ind=both:indgen=on:indoct=on:nm=10:pum=on:sac=on:spb=units:taea=off:tgt=full:thi=neg_eq:to=lpo:i=368:si=on:rtra=on_0"); + quick.push("dis+1002_3:1_awrs=converge:awrsf=500:fsd=on:fsr=off:gve=cautious:nm=32:sos=on:sp=frequency:tgt=ground:to=lpo:uace=off:i=114:si=on:rtra=on_0"); + quick.push("dis+10_1:1_aac=none:alpa=true:drc=off:ind=both:indoct=on:newcnf=on:sac=on:taea=off:to=lpo:i=1035:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_drc=off:er=filter:fsr=off:ind=both:indao=on:newcnf=on:nm=32:rp=on:sac=on:sik=recursion:sp=unary_frequency:tac=rule:taea=off:to=lpo:uace=off:i=150:si=on:rtra=on_0"); + quick.push("ott+11_5:1_av=off:br=off:canc=cautious:drc=off:ev=cautious:fsr=off:ind=struct:indstrhyp=on:newcnf=on:i=530:si=on:rtra=on_0"); + quick.push("ott+10_1:12_bsd=on:drc=off:fde=none:ind=struct:indgen=on:indgenss=2:norm_ineq=on:sac=on:taea=off:thi=strong:uwa=ground:i=1648:si=on:rtra=on_0"); + quick.push("ott+1002_1:4_drc=off:fde=unused:fsd=on:fsdmm=3:gtg=exists_all:gtgl=3:ind=struct:indgen=on:indoct=on:newcnf=on:norm_ineq=on:sp=occurrence:taea=off:to=lpo:i=84:si=on:rtra=on_0"); + quick.push("ott+1011_1:1_ind=struct:indstrhyp=on:newcnf=on:nui=on:s2a=on:i=117:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_bsr=unit_only:ev=cautious:ind=both:nui=on:sac=on:i=446:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bce=on:drc=off:fsd=on:ind=struct:indgen=on:indgenss=2:sac=on:taea=off:to=lpo:uwa=interpreted_only:i=2262:si=on:rtra=on_0"); + quick.push("ott+1011_1:1_aac=none:fd=preordered:ind=struct:indao=on:newcnf=on:nm=0:nui=on:sik=three:sp=const_frequency:spb=intro:to=lpo:i=248:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=2535:si=on:rtra=on_0"); + quick.push("ott+10_1:172_awrs=decay:drc=off:gtg=position:ind=both:indao=on:indc=goal:indgen=on:newcnf=on:sik=recursion:sp=weighted_frequency:taea=off:uhcvi=on:i=8568:si=on:rtra=on_0"); + quick.push("lrs+10_1:128_drc=off:gtg=exists_top:ind=struct:indstrhyp=on:sac=on:slsq=on:slsqc=1:taea=off:i=61:si=on:rtra=on_0"); + quick.push("lrs+10_8:1_gtg=all:ind=struct:indmd=2:indoct=on:kws=frequency:lma=on:nui=on:sos=on:sp=reverse_frequency:taea=off:i=172:si=on:rtra=on_0"); + quick.push("ott+21_1:10_bsr=on:canc=force:drc=encompass:ev=cautious:ile=on:ind=struct:indao=on:indoct=on:newcnf=on:spb=non_intro:tac=rule:taea=off:to=lpo:i=849:si=on:rtra=on_0"); + quick.push("dis+21_1:1_ind=struct:indstrhyp=on:norm_ineq=on:rawr=on:s2a=on:spb=goal:to=lpo:uace=off:urr=on:i=38:si=on:rtra=on_0"); + quick.push("lrs+1011_1:7_drc=off:fsr=off:ind=struct:norm_ineq=on:s2a=on:taea=off:to=lpo:uace=off:uwa=interpreted_only:i=60:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_bd=preordered:gtg=exists_all:gtgl=3:ind=struct:indmd=1:indstrhyp=on:nui=on:sos=on:i=411:si=on:rtra=on_0"); + quick.push("lrs+1011_1:16_drc=off:gtg=position:kws=precedence:sd=1:sp=unary_first:ss=axioms:st=2.0:i=112:si=on:rtra=on_0"); + // Improves by expected 153.73430619163955 probs costing 19985 Mi // Sub-schedule for 40000Mi strat cap / 40000Mi overall limit - quick.push("lrs+1010_5:1_gtg=exists_top:gtgl=4:ins=2:lecc=2.0:newcnf=on:plsq=on:plsqr=5,1:rp=on:spb=units:tgt=full:to=lpo:i=489:si=on:rtra=on_0"); - quick.push("ott+1002_1:14_anc=none:drc=off:fnrw=on:ind=struct:newcnf=on:norm_ineq=on:nui=on:rp=on:s2a=on:taea=off:i=888:si=on:rtra=on_0"); - quick.push("lrs+21_59:405_bs=unit_only:bsd=on:drc=off:fnrw=on:gs=on:ind=struct:indmd=2:newcnf=on:rp=on:sik=recursion:tar=off:i=8798:si=on:rtra=on_0"); - quick.push("lrs+1011_1:10_add=large:avsq=on:avsqr=1,16:bd=off:drc=off:ind=both:norm_ineq=on:sos=on:spb=goal_then_units:tac=rule:i=4701:si=on:rtra=on_0"); - quick.push("ott-1011_1:1_aac=none:drc=off:gtg=exists_top:gtgl=5:ind=both:indstrhyp=on:norm_ineq=on:sos=on:sp=unary_first:to=lpo:uace=off:i=1958:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_canc=force:er=filter:ind=struct:pum=on:sac=on:sp=const_min:to=lpo:i=9169:si=on:rtra=on_0"); - quick.push("ott+1010_3:1_acc=on:drc=off:fs=off:fsr=off:ind=struct:indn=off:inst=on:sac=on:uhcvi=on:uwa=one_side_constant:i=502:si=on:rtra=on_0"); - quick.push("dis+1010_2:1_drc=off:fnrw=on:iik=all:ind=both:intindsteq=always:lcm=reverse:newcnf=on:plsq=on:plsqc=1:plsqr=3413,801:rp=on:s2a=on:sp=const_frequency:tac=rule:uhcvi=on:uwa=interpreted_only:i=806:si=on:rtra=on_0"); - // Improves by expected 1.4064171526479847 probs costing 27303 Mi + quick.push("ott+10_1:1_aac=none:alpa=true:drc=encompass:fsr=off:ind=both:indoct=on:taea=off:i=1673:si=on:rtra=on_0"); + quick.push("lrs+10_1:20_aac=none:asg=cautious:awrs=decay:bsd=on:drc=off:ev=force:flr=on:ind=both:indgen=on:indoct=on:nm=10:pum=on:sac=on:spb=units:taea=off:tgt=full:thi=neg_eq:to=lpo:i=6328:si=on:rtra=on_0"); + quick.push("dis+1002_3:1_awrs=converge:awrsf=500:fsd=on:fsr=off:gve=cautious:nm=32:sos=on:sp=frequency:tgt=ground:to=lpo:uace=off:i=114:si=on:rtra=on_0"); + quick.push("dis+1010_5:1_gtg=position:kws=inv_arity:sas=z3:sp=reverse_arity:tgt=full:urr=on:i=273:si=on:rtra=on_0"); + quick.push("lrs+1010_1:3_drc=encompass:ind=both:indmd=1:nui=on:s2a=on:ss=axioms:i=67:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_drc=off:er=filter:fsr=off:ind=both:indao=on:newcnf=on:nm=32:rp=on:sac=on:sik=recursion:sp=unary_frequency:tac=rule:taea=off:to=lpo:uace=off:i=535:si=on:rtra=on_0"); + quick.push("dis+10_1:128_ind=both:indmd=1:indstrhyp=on:nui=on:sac=on:i=1116:si=on:rtra=on_0"); + quick.push("ott+10_1:12_bsd=on:drc=off:fde=none:ind=struct:indgen=on:indgenss=2:norm_ineq=on:sac=on:taea=off:thi=strong:uwa=ground:i=7065:si=on:rtra=on_0"); + quick.push("ott+1002_1:4_drc=off:fde=unused:fsd=on:fsdmm=3:gtg=exists_all:gtgl=3:ind=struct:indgen=on:indoct=on:newcnf=on:norm_ineq=on:sp=occurrence:taea=off:to=lpo:i=84:si=on:rtra=on_0"); + quick.push("ott+1011_1:1_aac=none:drc=encompass:er=filter:erml=2:gtg=exists_all:gve=cautious:ind=both:indmd=1:newcnf=on:nwc=2.0:sas=z3:sp=unary_first:to=lpo:i=753:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_atotf=0.2:drc=off:gtg=exists_top:ind=both:nwc=10.0:sac=on:sp=unary_frequency:tgt=ground:to=lpo:i=56:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=3557:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:ind=both:indoct=on:indstrhyp=on:sos=on:sp=const_frequency:ss=axioms:to=lpo:i=1160:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bce=on:drc=off:fsd=on:ind=struct:indgen=on:indgenss=2:sac=on:taea=off:to=lpo:uwa=interpreted_only:i=5614:si=on:rtra=on_0"); + quick.push("ott+10_1:128_awrs=converge:awrsf=500:bsr=on:drc=off:er=known:ev=force:fde=none:gsp=on:ind=struct:indgen=on:indgenss=2:indstrhyp=on:irw=on:sac=on:sos=theory:taea=off:tgt=full:to=lpo:uwa=one_side_interpreted:i=549:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_avsq=on:avsqc=1:avsqr=1,16:drc=off:ev=force:ind=struct:sos=on:to=lpo:urr=on:i=197:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=10416:si=on:rtra=on_0"); + quick.push("lrs+1010_5:1_asg=cautious:av=off:fsd=on:gtg=exists_sym:ind=both:indgen=on:indgenss=4:kws=precedence:lwlo=on:nm=30:sos=theory:sp=const_frequency:taea=off:tar=off:i=158:si=on:rtra=on_0"); + quick.push("ott+1011_1:64_avsq=on:avsqr=11223,262144:drc=off:ev=force:lsd=10:nm=16:plsq=on:plsqc=1:plsqr=1,32:rawr=on:sp=unary_frequency:spb=goal:taea=off:tgt=ground:to=lpo:i=240:si=on:rtra=on_0"); + // Improves by expected 115.18506679466628 probs costing 39936 Mi // Sub-schedule for 120000Mi strat cap / 120000Mi overall limit - quick.push("lrs+10_1:1_drc=off:ind=both:indao=on:newcnf=on:nwc=10.0:sik=recursion:sp=unary_frequency:taea=off:to=lpo:uwa=all:i=27001:si=on:rtra=on_0"); - quick.push("lrs+1010_5:1_gtg=exists_top:gtgl=4:ins=2:lecc=2.0:newcnf=on:plsq=on:plsqr=5,1:rp=on:spb=units:tgt=full:to=lpo:i=489:si=on:rtra=on_0"); - quick.push("dis+1002_1:3_av=off:gtg=position:ind=struct:nui=on:nwc=10.0:i=46024:si=on:rtra=on_0"); - quick.push("lrs+1011_1:10_add=large:avsq=on:avsqr=1,16:bd=off:drc=off:ind=both:norm_ineq=on:sos=on:spb=goal_then_units:tac=rule:i=4701:si=on:rtra=on_0"); - // Improves by expected 0.5685274400338337 probs costing 78211 Mi + quick.push("ott+10_1:1_drc=encompass:foolp=on:ind=struct:indoct=on:sac=on:taea=off:to=lpo:i=1906:si=on:rtra=on_0"); + quick.push("ott+1011_2:1_av=off:ev=cautious:ind=both:indmd=10:indstrhyp=on:newcnf=on:nm=0:rawr=on:sp=unary_frequency:urr=on:i=486:si=on:rtra=on_0"); + quick.push("lrs+10_1:20_aac=none:asg=cautious:awrs=decay:bsd=on:drc=off:ev=force:flr=on:ind=both:indgen=on:indoct=on:nm=10:pum=on:sac=on:spb=units:taea=off:tgt=full:thi=neg_eq:to=lpo:i=982:si=on:rtra=on_0"); + quick.push("lrs+1010_1:3_drc=encompass:ind=both:indmd=1:nui=on:s2a=on:ss=axioms:i=67:si=on:rtra=on_0"); + quick.push("ott+10_1:12_bsd=on:drc=off:fde=none:ind=struct:indgen=on:indgenss=2:norm_ineq=on:sac=on:taea=off:thi=strong:uwa=ground:i=3679:si=on:rtra=on_0"); + quick.push("dis+10_33:64_aac=none:add=large:drc=off:gtg=exists_sym:ind=struct:indmd=4:indoct=on:indstrhyp=on:nm=0:pum=on:sac=on:sp=const_min:thi=all:i=1560:si=on:rtra=on_0"); + quick.push("ott+1002_3:2_aac=none:abs=on:alpa=true:drc=off:gve=force:ind=struct:indao=on:newcnf=on:nicw=on:nm=30:rawr=on:taea=off:i=11963:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bce=on:drc=off:fsd=on:ind=struct:indgen=on:indgenss=2:sac=on:taea=off:to=lpo:uwa=interpreted_only:i=5614:si=on:rtra=on_0"); + quick.push("ott+1011_1:1_aac=none:fd=preordered:ind=struct:indao=on:newcnf=on:nm=0:nui=on:sik=three:sp=const_frequency:spb=intro:to=lpo:i=248:si=on:rtra=on_0"); + quick.push("dis+10_21:29_bd=off:br=off:drc=off:ev=cautious:gs=on:gtg=exists_sym:ind=struct:indgen=on:indgenss=2:lcm=reverse:s2agt=10:sac=on:slsq=on:slsqc=2:sos=all:sp=const_frequency:taea=off:tgt=full:i=35938:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_avsq=on:avsqc=1:avsqr=1,16:drc=off:ev=force:ind=struct:sos=on:to=lpo:urr=on:i=197:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=17422:si=on:rtra=on_0"); + quick.push("ott+10_1:172_awrs=decay:drc=off:gtg=position:ind=both:indao=on:indc=goal:indgen=on:newcnf=on:sik=recursion:sp=weighted_frequency:taea=off:uhcvi=on:i=39081:si=on:rtra=on_0"); + quick.push("lrs+1010_5:1_asg=cautious:av=off:fsd=on:gtg=exists_sym:ind=both:indgen=on:indgenss=4:kws=precedence:lwlo=on:nm=30:sos=theory:sp=const_frequency:taea=off:tar=off:i=120:si=on:rtra=on_0"); + quick.push("ott+1011_1:64_avsq=on:avsqr=11223,262144:drc=off:ev=force:lsd=10:nm=16:plsq=on:plsqc=1:plsqr=1,32:rawr=on:sp=unary_frequency:spb=goal:taea=off:tgt=ground:to=lpo:i=191:si=on:rtra=on_0"); + quick.push("dis+21_1:1_ind=struct:indstrhyp=on:norm_ineq=on:rawr=on:s2a=on:spb=goal:to=lpo:uace=off:urr=on:i=156:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_bd=preordered:gtg=exists_all:gtgl=3:ind=struct:indmd=1:indstrhyp=on:nui=on:sos=on:i=369:si=on:rtra=on_0"); + // Improves by expected 136.55861875083716 probs costing 119962 Mi // Sub-schedule for 240000Mi strat cap / 240000Mi overall limit - quick.push("lrs+1010_5:1_gtg=exists_top:gtgl=4:ins=2:lecc=2.0:newcnf=on:plsq=on:plsqr=5,1:rp=on:spb=units:tgt=full:to=lpo:i=489:si=on:rtra=on_0"); - // Improves by expected 0.10290002939989498 probs costing 488 Mi - // Overall score 729.0655627461239 probs on average / budget 143024 Mi + quick.push("ott+10_1:1_aac=none:alpa=true:drc=encompass:fsr=off:ind=both:indoct=on:taea=off:i=3405:si=on:rtra=on_0"); + quick.push("lrs+21_1:1_abs=on:fnrw=on:fsr=off:gtg=exists_sym:gtgl=4:newcnf=on:nm=2:rp=on:sas=z3:sp=occurrence:thi=neg_eq:i=2238:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=encompass:foolp=on:ind=struct:indoct=on:sac=on:taea=off:to=lpo:i=1183:si=on:rtra=on_0"); + quick.push("ott+1011_2:1_av=off:ev=cautious:ind=both:indmd=10:indstrhyp=on:newcnf=on:nm=0:rawr=on:sp=unary_frequency:urr=on:i=486:si=on:rtra=on_0"); + quick.push("lrs+10_1:20_aac=none:asg=cautious:awrs=decay:bsd=on:drc=off:ev=force:flr=on:ind=both:indgen=on:indoct=on:nm=10:pum=on:sac=on:spb=units:taea=off:tgt=full:thi=neg_eq:to=lpo:i=982:si=on:rtra=on_0"); + quick.push("dis+10_1:1_aac=none:alpa=true:drc=off:ind=both:indoct=on:newcnf=on:sac=on:taea=off:to=lpo:i=6648:si=on:rtra=on_0"); + quick.push("lrs+1010_1:3_drc=encompass:ind=both:indmd=1:nui=on:s2a=on:ss=axioms:i=67:si=on:rtra=on_0"); + quick.push("dis+10_1:128_ind=both:indmd=1:indstrhyp=on:nui=on:sac=on:i=1708:si=on:rtra=on_0"); + quick.push("ott+10_1:12_bsd=on:drc=off:fde=none:ind=struct:indgen=on:indgenss=2:norm_ineq=on:sac=on:taea=off:thi=strong:uwa=ground:i=23300:si=on:rtra=on_0"); + quick.push("ott+1011_1:1_aac=none:drc=encompass:er=filter:erml=2:gtg=exists_all:gve=cautious:ind=both:indmd=1:newcnf=on:nwc=2.0:sas=z3:sp=unary_first:to=lpo:i=1027:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=18822:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:ind=both:indoct=on:indstrhyp=on:sos=on:sp=const_frequency:ss=axioms:to=lpo:i=574:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bce=on:drc=off:fsd=on:ind=struct:indgen=on:indgenss=2:sac=on:taea=off:to=lpo:uwa=interpreted_only:i=8598:si=on:rtra=on_0"); + quick.push("dis+10_21:29_bd=off:br=off:drc=off:ev=cautious:gs=on:gtg=exists_sym:ind=struct:indgen=on:indgenss=2:lcm=reverse:s2agt=10:sac=on:slsq=on:slsqc=2:sos=all:sp=const_frequency:taea=off:tgt=full:i=115235:si=on:rtra=on_0"); + quick.push("ott+10_1:172_awrs=decay:drc=off:gtg=position:ind=both:indao=on:indc=goal:indgen=on:newcnf=on:sik=recursion:sp=weighted_frequency:taea=off:uhcvi=on:i=45312:si=on:rtra=on_0"); + quick.push("lrs+1010_5:1_asg=cautious:av=off:fsd=on:gtg=exists_sym:ind=both:indgen=on:indgenss=4:kws=precedence:lwlo=on:nm=30:sos=theory:sp=const_frequency:taea=off:tar=off:i=120:si=on:rtra=on_0"); + quick.push("lrs+10_8:1_gtg=all:ind=struct:indmd=2:indoct=on:kws=frequency:lma=on:nui=on:sos=on:sp=reverse_frequency:taea=off:i=1165:si=on:rtra=on_0"); + quick.push("ott+1011_1:64_avsq=on:avsqr=11223,262144:drc=off:ev=force:lsd=10:nm=16:plsq=on:plsqc=1:plsqr=1,32:rawr=on:sp=unary_frequency:spb=goal:taea=off:tgt=ground:to=lpo:i=421:si=on:rtra=on_0"); + quick.push("ott+21_1:10_bsr=on:canc=force:drc=encompass:ev=cautious:ile=on:ind=struct:indao=on:indoct=on:newcnf=on:spb=non_intro:tac=rule:taea=off:to=lpo:i=5032:si=on:rtra=on_0"); + quick.push("dis+1002_1:1024_av=off:bd=off:drc=off:fsr=off:gtg=position:ind=struct:indc=goal:indgen=on:indgenss=2:taea=off:to=lpo:i=2124:si=on:rtra=on_0"); + quick.push("lrs+1010_1:128_aac=none:alpa=false:cond=fast:drc=off:gtg=position:gve=cautious:ind=both:norm_ineq=on:nwc=10.0:sac=on:sp=frequency:tgt=full:to=lpo:i=561:si=on:rtra=on_0"); + // Improves by expected 79.18911371902213 probs costing 238987 Mi + // Sub-schedule for 480000Mi strat cap / 480000Mi overall limit + quick.push("ott+1011_2:1_av=off:ev=cautious:ind=both:indmd=10:indstrhyp=on:newcnf=on:nm=0:rawr=on:sp=unary_frequency:urr=on:i=4301:si=on:rtra=on_0"); + quick.push("lrs+10_1:20_aac=none:asg=cautious:awrs=decay:bsd=on:drc=off:ev=force:flr=on:ind=both:indgen=on:indoct=on:nm=10:pum=on:sac=on:spb=units:taea=off:tgt=full:thi=neg_eq:to=lpo:i=16506:si=on:rtra=on_0"); + quick.push("ott+10_1:12_bsd=on:drc=off:fde=none:ind=struct:indgen=on:indgenss=2:norm_ineq=on:sac=on:taea=off:thi=strong:uwa=ground:i=113485:si=on:rtra=on_0"); + quick.push("dis+10_33:64_aac=none:add=large:drc=off:gtg=exists_sym:ind=struct:indmd=4:indoct=on:indstrhyp=on:nm=0:pum=on:sac=on:sp=const_min:thi=all:i=18587:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_bsr=unit_only:ev=cautious:ind=both:nui=on:sac=on:i=3319:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bce=on:drc=off:fsd=on:ind=struct:indgen=on:indgenss=2:sac=on:taea=off:to=lpo:uwa=interpreted_only:i=26087:si=on:rtra=on_0"); + quick.push("dis+10_21:29_bd=off:br=off:drc=off:ev=cautious:gs=on:gtg=exists_sym:ind=struct:indgen=on:indgenss=2:lcm=reverse:s2agt=10:sac=on:slsq=on:slsqc=2:sos=all:sp=const_frequency:taea=off:tgt=full:i=84824:si=on:rtra=on_0"); + quick.push("ott+2_1:1_drc=off:fs=off:fsr=off:ind=both:indgen=on:indgenss=2:indoct=on:sac=on:sp=occurrence:i=13173:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=56164:si=on:rtra=on_0"); + quick.push("ott+10_1:172_awrs=decay:drc=off:gtg=position:ind=both:indao=on:indc=goal:indgen=on:newcnf=on:sik=recursion:sp=weighted_frequency:taea=off:uhcvi=on:i=142751:si=on:rtra=on_0"); + quick.push("lrs+1010_5:1_asg=cautious:av=off:fsd=on:gtg=exists_sym:ind=both:indgen=on:indgenss=4:kws=precedence:lwlo=on:nm=30:sos=theory:sp=const_frequency:taea=off:tar=off:i=158:si=on:rtra=on_0"); + // Improves by expected 57.473513520147854 probs costing 479344 Mi + // Sub-schedule for 960000Mi strat cap / 960000Mi overall limit + quick.push("ott+10_1:1_aac=none:alpa=true:drc=encompass:fsr=off:ind=both:indoct=on:taea=off:i=17958:si=on:rtra=on_0"); + quick.push("dis+10_1:1_anc=none:gtg=exists_sym:gtgl=5:ind=struct:indgen=on:indoct=on:s2a=on:sac=on:ss=axioms:i=137973:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=encompass:foolp=on:ind=struct:indoct=on:sac=on:taea=off:to=lpo:i=25643:si=on:rtra=on_0"); + quick.push("lrs+10_1:20_aac=none:asg=cautious:awrs=decay:bsd=on:drc=off:ev=force:flr=on:ind=both:indgen=on:indoct=on:nm=10:pum=on:sac=on:spb=units:taea=off:tgt=full:thi=neg_eq:to=lpo:i=38951:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_drc=off:er=filter:fsr=off:ind=both:indao=on:newcnf=on:nm=32:rp=on:sac=on:sik=recursion:sp=unary_frequency:tac=rule:taea=off:to=lpo:uace=off:i=22096:si=on:rtra=on_0"); + quick.push("ott+10_1:12_bsd=on:drc=off:fde=none:ind=struct:indgen=on:indgenss=2:norm_ineq=on:sac=on:taea=off:thi=strong:uwa=ground:i=140433:si=on:rtra=on_0"); + quick.push("dis+10_33:64_aac=none:add=large:drc=off:gtg=exists_sym:ind=struct:indmd=4:indoct=on:indstrhyp=on:nm=0:pum=on:sac=on:sp=const_min:thi=all:i=50959:si=on:rtra=on_0"); + quick.push("ott+1002_3:2_aac=none:abs=on:alpa=true:drc=off:gve=force:ind=struct:indao=on:newcnf=on:nicw=on:nm=30:rawr=on:taea=off:i=79001:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=45001:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bce=on:drc=off:fsd=on:ind=struct:indgen=on:indgenss=2:sac=on:taea=off:to=lpo:uwa=interpreted_only:i=49784:si=on:rtra=on_0"); + quick.push("dis+10_21:29_bd=off:br=off:drc=off:ev=cautious:gs=on:gtg=exists_sym:ind=struct:indgen=on:indgenss=2:lcm=reverse:s2agt=10:sac=on:slsq=on:slsqc=2:sos=all:sp=const_frequency:taea=off:tgt=full:i=140001:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=71989:si=on:rtra=on_0"); + quick.push("ott+10_1:172_awrs=decay:drc=off:gtg=position:ind=both:indao=on:indc=goal:indgen=on:newcnf=on:sik=recursion:sp=weighted_frequency:taea=off:uhcvi=on:i=124992:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_drc=encompass:ind=struct:indao=on:newcnf=on:plsq=on:plsqr=32,1:sp=frequency:to=lpo:i=3032:si=on:rtra=on_0"); + quick.push("ott+21_1:10_bsr=on:canc=force:drc=encompass:ev=cautious:ile=on:ind=struct:indao=on:indoct=on:newcnf=on:spb=non_intro:tac=rule:taea=off:to=lpo:i=11986:si=on:rtra=on_0"); + // Improves by expected 35.58186707682759 probs costing 959784 Mi + // Sub-schedule for 960000Mi strat cap / 960000Mi overall limit + quick.push("dis+10_1:1_anc=none:gtg=exists_sym:gtgl=5:ind=struct:indgen=on:indoct=on:s2a=on:sac=on:ss=axioms:i=133107:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=encompass:foolp=on:ind=struct:indoct=on:sac=on:taea=off:to=lpo:i=21939:si=on:rtra=on_0"); + quick.push("lrs+10_1:20_aac=none:asg=cautious:awrs=decay:bsd=on:drc=off:ev=force:flr=on:ind=both:indgen=on:indoct=on:nm=10:pum=on:sac=on:spb=units:taea=off:tgt=full:thi=neg_eq:to=lpo:i=126079:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_drc=off:er=filter:fsr=off:ind=both:indao=on:newcnf=on:nm=32:rp=on:sac=on:sik=recursion:sp=unary_frequency:tac=rule:taea=off:to=lpo:uace=off:i=63511:si=on:rtra=on_0"); + quick.push("ott+10_1:12_bsd=on:drc=off:fde=none:ind=struct:indgen=on:indgenss=2:norm_ineq=on:sac=on:taea=off:thi=strong:uwa=ground:i=91551:si=on:rtra=on_0"); + quick.push("dis+10_33:64_aac=none:add=large:drc=off:gtg=exists_sym:ind=struct:indmd=4:indoct=on:indstrhyp=on:nm=0:pum=on:sac=on:sp=const_min:thi=all:i=43010:si=on:rtra=on_0"); + quick.push("ott+1002_3:2_aac=none:abs=on:alpa=true:drc=off:gve=force:ind=struct:indao=on:newcnf=on:nicw=on:nm=30:rawr=on:taea=off:i=20149:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=34870:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bce=on:drc=off:fsd=on:ind=struct:indgen=on:indgenss=2:sac=on:taea=off:to=lpo:uwa=interpreted_only:i=124459:si=on:rtra=on_0"); + quick.push("dis+10_21:29_bd=off:br=off:drc=off:ev=cautious:gs=on:gtg=exists_sym:ind=struct:indgen=on:indgenss=2:lcm=reverse:s2agt=10:sac=on:slsq=on:slsqc=2:sos=all:sp=const_frequency:taea=off:tgt=full:i=123527:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=39284:si=on:rtra=on_0"); + quick.push("ott+10_1:172_awrs=decay:drc=off:gtg=position:ind=both:indao=on:indc=goal:indgen=on:newcnf=on:sik=recursion:sp=weighted_frequency:taea=off:uhcvi=on:i=124992:si=on:rtra=on_0"); + // Improves by expected 13.948651891536842 probs costing 946466 Mi + // Sub-schedule for 960000Mi strat cap / 960000Mi overall limit + quick.push("dis+10_1:1_anc=none:gtg=exists_sym:gtgl=5:ind=struct:indgen=on:indoct=on:s2a=on:sac=on:ss=axioms:i=120877:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=encompass:foolp=on:ind=struct:indoct=on:sac=on:taea=off:to=lpo:i=21939:si=on:rtra=on_0"); + quick.push("lrs+10_1:20_aac=none:asg=cautious:awrs=decay:bsd=on:drc=off:ev=force:flr=on:ind=both:indgen=on:indoct=on:nm=10:pum=on:sac=on:spb=units:taea=off:tgt=full:thi=neg_eq:to=lpo:i=16287:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_drc=off:er=filter:fsr=off:ind=both:indao=on:newcnf=on:nm=32:rp=on:sac=on:sik=recursion:sp=unary_frequency:tac=rule:taea=off:to=lpo:uace=off:i=63511:si=on:rtra=on_0"); + quick.push("ott+10_1:12_bsd=on:drc=off:fde=none:ind=struct:indgen=on:indgenss=2:norm_ineq=on:sac=on:taea=off:thi=strong:uwa=ground:i=113322:si=on:rtra=on_0"); + quick.push("dis+10_33:64_aac=none:add=large:drc=off:gtg=exists_sym:ind=struct:indmd=4:indoct=on:indstrhyp=on:nm=0:pum=on:sac=on:sp=const_min:thi=all:i=69001:si=on:rtra=on_0"); + quick.push("ott+1002_3:2_aac=none:abs=on:alpa=true:drc=off:gve=force:ind=struct:indao=on:newcnf=on:nicw=on:nm=30:rawr=on:taea=off:i=75001:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=34870:si=on:rtra=on_0"); + quick.push("dis+1011_8:1_abs=on:bd=off:canc=cautious:ev=force:ind=int:indc=goal_plus:kws=inv_frequency:s2a=on:s2agt=10:sas=z3:sp=reverse_arity:ss=included:tgt=ground:i=33001:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bce=on:drc=off:fsd=on:ind=struct:indgen=on:indgenss=2:sac=on:taea=off:to=lpo:uwa=interpreted_only:i=122070:si=on:rtra=on_0"); + quick.push("dis+10_21:29_bd=off:br=off:drc=off:ev=cautious:gs=on:gtg=exists_sym:ind=struct:indgen=on:indgenss=2:lcm=reverse:s2agt=10:sac=on:slsq=on:slsqc=2:sos=all:sp=const_frequency:taea=off:tgt=full:i=123336:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=39735:si=on:rtra=on_0"); + quick.push("ott+10_1:172_awrs=decay:drc=off:gtg=position:ind=both:indao=on:indc=goal:indgen=on:newcnf=on:sik=recursion:sp=weighted_frequency:taea=off:uhcvi=on:i=124992:si=on:rtra=on_0"); + // Improves by expected 7.613387054318119 probs costing 957929 Mi + // Overall score 6682.615103801281 probs on average / budget 3780367 Mi +} + +void Schedules::getStructInductionTipSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback) { + // Ran on tipExport.txt + // Sub-schedule for 2000Mi strat cap / 2000Mi overall limit + quick.push("dis+10_1:1_av=off:fnrw=on:ind=struct:newcnf=on:nwc=5.0:i=52:si=on:rtra=on_0"); + quick.push("lrs+1002_1:6_canc=cautious:cond=on:ind=both:indao=on:intindint=infinite:intindsteq=not_in_both:newcnf=on:nm=16:rp=on:s2pl=on:sas=z3:slsq=on:slsqc=4:slsql=off:slsqr=33,13:sp=const_min:urr=on:i=212:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=encompass:erd=off:ind=struct:indmd=1:sos=on:ss=axioms:urr=on:i=21:si=on:rtra=on_0"); + quick.push("dis+10_1:1_ind=struct:inst=on:newcnf=on:s2a=on:sp=const_max:tac=rule:i=49:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:fsr=off:ind=struct:newcnf=on:sik=all:taea=off:to=lpo:i=119:si=on:rtra=on_0"); + quick.push("ott+21_1:1_ep=RST:fsd=on:gve=cautious:ind=both:indn=off:newcnf=on:nui=on:nwc=10.0:sik=recursion:spb=intro:urr=on:i=24:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_drc=off:er=filter:fsr=off:ind=both:indao=on:newcnf=on:nm=32:rp=on:sac=on:sik=recursion:sp=unary_frequency:tac=rule:taea=off:to=lpo:uace=off:i=7:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_erd=off:gve=cautious:ind=both:newcnf=on:nui=on:updr=off:i=4:si=on:rtra=on_0"); + quick.push("lrs+10_1:40_bsr=unit_only:drc=off:flr=on:ind=both:newcnf=on:nm=75:nui=on:sik=recursion:sp=const_min:updr=off:i=65:si=on:rtra=on_0"); + quick.push("ott+1002_1:4_drc=off:fde=unused:fsd=on:fsdmm=3:gtg=exists_all:gtgl=3:ind=struct:indgen=on:indoct=on:newcnf=on:norm_ineq=on:sp=occurrence:taea=off:to=lpo:i=53:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=193:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:fnrw=on:gtg=all:gtgl=3:ind=both:indao=on:kws=precedence:newcnf=on:nwc=6.0:sac=on:sp=reverse_arity:uwa=interpreted_only:i=12:si=on:rtra=on_0"); + quick.push("lrs+2_1:4_drc=off:gtg=position:gve=cautious:ile=on:ind=struct:indao=on:indc=goal:indmd=6:newcnf=on:nwc=5.0:s2a=on:tac=axiom:to=lpo:i=5:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=39:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_bd=off:gtg=exists_all:ind=both:indmd=1:indstrhyp=on:ins=3:newcnf=on:nui=on:spb=goal_then_units:to=lpo:i=32:si=on:rtra=on_0"); + quick.push("dis+1002_1:1_tac=light:taea=off:i=32:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:ind=both:indoct=on:indstrhyp=on:sos=on:sp=const_frequency:ss=axioms:to=lpo:i=15:si=on:rtra=on_0"); + quick.push("lrs+21_1:8_av=off:awrs=converge:awrsf=10:drc=off:fnrw=on:ind=struct:newcnf=on:slsq=on:slsqc=5:sp=unary_frequency:uwa=all:i=10:si=on:rtra=on_0"); + quick.push("dis+10_1:1_av=off:bsd=on:fd=off:fnrw=on:gtg=all:gtgl=2:ind=both:indao=on:indc=goal:indgen=on:newcnf=on:plsq=on:plsqr=32,1:ss=axioms:i=4:si=on:rtra=on_0"); + quick.push("lrs+1010_8:1_ind=both:indmd=2:kws=inv_precedence:newcnf=on:sik=recursion:sp=const_min:i=31:si=on:rtra=on_0"); + quick.push("lrs+21_1:128_av=off:drc=encompass:gtg=all:ind=struct:indao=on:ins=1:newcnf=on:spb=units:uwa=one_side_interpreted:i=13:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=75:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_aac=none:afp=10000:fnrw=on:ind=both:indc=goal_plus:indmd=1:indn=off:newcnf=on:i=27:si=on:rtra=on_0"); + quick.push("lrs+10_1:1024_fnrw=on:gtg=all:gtgl=3:ind=struct:indao=on:indc=goal:indoct=on:newcnf=on:sac=on:sp=unary_first:i=43:si=on:rtra=on_0"); + quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=20:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:nwc=10.0:sac=on:sik=recursion:to=lpo:i=39:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:fs=off:fsr=off:ind=struct:indstrhyp=on:nwc=5.0:s2a=on:sos=on:tar=off:i=6:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_aac=none:gtg=exists_all:gtgl=3:ind=both:newcnf=on:nui=on:plsq=on:plsqr=4,1:rp=on:sik=recursion:spb=goal_then_units:i=16:si=on:rtra=on_0"); + quick.push("lrs+21_1:128_gtg=exists_top:gtgl=2:ind=both:indc=goal_plus:indmd=1:newcnf=on:nm=20:nui=on:sik=recursion:sp=unary_frequency:spb=non_intro:i=38:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=encompass:gtg=exists_all:ind=struct:indmd=3:indstrhyp=on:s2a=on:i=69:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_gtg=exists_all:ind=both:indmd=1:newcnf=on:nui=on:taea=off:updr=off:i=18:si=on:rtra=on_0"); + quick.push("lrs+3_3:2_av=off:drc=off:fsr=off:ind=struct:indao=on:newcnf=on:sp=unary_frequency:spb=units:taea=off:tar=off:uwa=one_side_constant:i=14:si=on:rtra=on_0"); + quick.push("ott+1002_1:64_drc=off:fsr=off:ind=both:indu=off:kws=arity_squared:newcnf=on:nwc=10.0:tar=off:uwa=one_side_constant:i=37:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_drc=encompass:ind=struct:indao=on:newcnf=on:plsq=on:plsqr=32,1:sp=frequency:to=lpo:i=37:si=on:rtra=on_0"); + quick.push("lrs+1010_1:5_fsd=on:fsdmm=3:gve=force:newcnf=on:nm=32:norm_ineq=on:rp=on:sas=z3:spb=intro:tar=off:i=251:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:ind=struct:indstrhyp=on:newcnf=on:sos=on:sp=reverse_arity:to=lpo:i=97:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_fnrw=on:ind=both:indmd=2:indoct=on:kws=frequency:newcnf=on:nui=on:sik=recursion:taea=off:i=17:si=on:rtra=on_0"); + quick.push("lrs+10_1:16_drc=off:fsr=off:ind=struct:indmd=2:indstrhyp=on:nwc=10.0:sos=on:i=73:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_ind=struct:indc=goal_plus:indmd=1:newcnf=on:nui=on:s2a=on:spb=intro:i=111:si=on:rtra=on_0"); + quick.push("lrs+10_1:8_fnrw=on:ind=struct:indmd=1:newcnf=on:nwc=5.0:sik=recursion:i=55:si=on:rtra=on_0"); + // Improves by expected 433.81225414254936 probs costing 1995 Mi + // Sub-schedule for 4000Mi strat cap / 4000Mi overall limit + quick.push("lrs+1002_1:6_canc=cautious:cond=on:ind=both:indao=on:intindint=infinite:intindsteq=not_in_both:newcnf=on:nm=16:rp=on:s2pl=on:sas=z3:slsq=on:slsqc=4:slsql=off:slsqr=33,13:sp=const_min:urr=on:i=163:si=on:rtra=on_0"); + quick.push("dis+10_180:31_canc=force:gtg=exists_all:gtgl=4:newcnf=on:rp=on:s2a=on:s2agt=10:sac=on:sas=z3:sos=all:uhcvi=on:i=541:si=on:rtra=on_0"); + quick.push("dis-1002_16:1_drc=off:ind=struct:sac=on:sp=const_frequency:taea=off:to=lpo:i=95:si=on:rtra=on_0"); + quick.push("ott+10_1:1_avsq=on:avsql=on:bd=off:gtg=position:ind=both:indstrhyp=on:kws=precedence:newcnf=on:nwc=10.0:sac=on:sgt=30:sik=all:sp=frequency:ss=axioms:taea=off:urr=on:i=173:si=on:rtra=on_0"); + quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=636:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=encompass:gtg=exists_sym:ind=struct:newcnf=on:sik=recursion:i=63:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_bd=off:gtg=exists_all:ind=both:indmd=1:indstrhyp=on:ins=3:newcnf=on:nui=on:spb=goal_then_units:to=lpo:i=105:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:ind=both:indoct=on:indstrhyp=on:sos=on:sp=const_frequency:ss=axioms:to=lpo:i=54:si=on:rtra=on_0"); + quick.push("lrs+1010_1:20_cond=on:ev=force:fd=off:gtg=all:gtgl=2:gve=force:ind=both:indmd=1:newcnf=on:rp=on:sas=z3:sos=on:sp=const_min:spb=non_intro:tgt=full:i=173:si=on:rtra=on_0"); + quick.push("lrs+21_1:8_av=off:awrs=converge:awrsf=10:drc=off:fnrw=on:ind=struct:newcnf=on:slsq=on:slsqc=5:sp=unary_frequency:uwa=all:i=10:si=on:rtra=on_0"); + quick.push("dis+10_3:1_drc=encompass:gtg=exists_top:gve=force:kws=precedence:s2a=on:s2at=3.0:sos=on:spb=goal:tac=light:taea=off:i=225:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_aac=none:afp=10000:fnrw=on:ind=both:indc=goal_plus:indmd=1:indn=off:newcnf=on:i=77:si=on:rtra=on_0"); + quick.push("dis+1010_1:28_acc=model:fnrw=on:gtg=exists_sym:newcnf=on:nm=10:plsq=on:rawr=on:rp=on:sp=const_max:taea=off:thi=strong:uace=off:uwa=interpreted_only:i=170:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:nwc=10.0:sac=on:sik=recursion:to=lpo:i=260:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:fs=off:fsr=off:ind=struct:indstrhyp=on:nwc=5.0:s2a=on:sos=on:tar=off:i=164:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_anc=all_dependent:fde=none:fnrw=on:gtg=exists_top:kws=inv_arity:newcnf=on:rp=on:i=92:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_aac=none:gtg=exists_all:gtgl=3:ind=both:newcnf=on:nui=on:plsq=on:plsqr=4,1:rp=on:sik=recursion:spb=goal_then_units:i=16:si=on:rtra=on_0"); + quick.push("lrs+21_1:128_gtg=exists_top:gtgl=2:ind=both:indc=goal_plus:indmd=1:newcnf=on:nm=20:nui=on:sik=recursion:sp=unary_frequency:spb=non_intro:i=101:si=on:rtra=on_0"); + quick.push("ott+1002_1:64_drc=off:fsr=off:ind=both:indu=off:kws=arity_squared:newcnf=on:nwc=10.0:tar=off:uwa=one_side_constant:i=34:si=on:rtra=on_0"); + quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=231:si=on:rtra=on_0"); + quick.push("lrs+10_1:32_drc=encompass:ind=struct:newcnf=on:sac=on:sik=recursion:sp=const_min:taea=off:tgt=full:to=lpo:i=273:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_abs=on:ev=cautious:gtg=exists_top:ind=struct:newcnf=on:nui=on:s2a=on:sac=on:sas=z3:sik=recursion:i=185:si=on:rtra=on_0"); + quick.push("ott+10_1:1_atotf=0.1:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:i=176:si=on:rtra=on_0"); + // Improves by expected 40.020848909468754 probs costing 3994 Mi + // Sub-schedule for 4000Mi strat cap / 4000Mi overall limit + quick.push("lrs+1002_1:6_canc=cautious:cond=on:ind=both:indao=on:intindint=infinite:intindsteq=not_in_both:newcnf=on:nm=16:rp=on:s2pl=on:sas=z3:slsq=on:slsqc=4:slsql=off:slsqr=33,13:sp=const_min:urr=on:i=246:si=on:rtra=on_0"); + quick.push("lrs+2_4:1_anc=none:fd=preordered:fde=unused:gve=cautious:ind=both:lwlo=on:newcnf=on:nui=on:sac=on:sik=recursion:sims=off:sp=const_max:spb=non_intro:ss=included:i=261:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:fsr=off:ind=struct:newcnf=on:sik=all:taea=off:to=lpo:i=151:si=on:rtra=on_0"); + quick.push("ott+10_1:1_avsq=on:avsql=on:bd=off:gtg=position:ind=both:indstrhyp=on:kws=precedence:newcnf=on:nwc=10.0:sac=on:sgt=30:sik=all:sp=frequency:ss=axioms:taea=off:urr=on:i=437:si=on:rtra=on_0"); + quick.push("ott+1002_1:4_drc=off:fde=unused:fsd=on:fsdmm=3:gtg=exists_all:gtgl=3:ind=struct:indgen=on:indoct=on:newcnf=on:norm_ineq=on:sp=occurrence:taea=off:to=lpo:i=56:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=667:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=45:si=on:rtra=on_0"); + quick.push("lrs+1010_1:20_cond=on:ev=force:fd=off:gtg=all:gtgl=2:gve=force:ind=both:indmd=1:newcnf=on:rp=on:sas=z3:sos=on:sp=const_min:spb=non_intro:tgt=full:i=173:si=on:rtra=on_0"); + quick.push("lrs+1011_16:1_drc=off:ev=cautious:fd=preordered:ind=struct:indstrhyp=on:sp=reverse_arity:i=89:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=119:si=on:rtra=on_0"); + quick.push("dis+1010_1:28_acc=model:fnrw=on:gtg=exists_sym:newcnf=on:nm=10:plsq=on:rawr=on:rp=on:sp=const_max:taea=off:thi=strong:uace=off:uwa=interpreted_only:i=235:si=on:rtra=on_0"); + quick.push("lrs+10_1:1024_fnrw=on:gtg=all:gtgl=3:ind=struct:indao=on:indc=goal:indoct=on:newcnf=on:sac=on:sp=unary_first:i=156:si=on:rtra=on_0"); + quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=249:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_anc=all_dependent:fde=none:fnrw=on:gtg=exists_top:kws=inv_arity:newcnf=on:rp=on:i=92:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_abs=on:anc=all:ev=cautious:kws=inv_frequency:newcnf=on:rp=on:sac=on:sas=z3:spb=goal_then_units:tgt=ground:uwa=interpreted_only:i=369:si=on:rtra=on_0"); + quick.push("lrs+1010_1:5_fsd=on:fsdmm=3:gve=force:newcnf=on:nm=32:norm_ineq=on:rp=on:sas=z3:spb=intro:tar=off:i=307:si=on:rtra=on_0"); + quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=212:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_ind=struct:indc=goal_plus:indmd=1:newcnf=on:nui=on:s2a=on:spb=intro:i=132:si=on:rtra=on_0"); + // Improves by expected 11.258067294906173 probs costing 3978 Mi + // Sub-schedule for 8000Mi strat cap / 8000Mi overall limit + quick.push("lrs+1002_1:6_canc=cautious:cond=on:ind=both:indao=on:intindint=infinite:intindsteq=not_in_both:newcnf=on:nm=16:rp=on:s2pl=on:sas=z3:slsq=on:slsqc=4:slsql=off:slsqr=33,13:sp=const_min:urr=on:i=246:si=on:rtra=on_0"); + quick.push("lrs+1002_1:3_awrs=decay:fnrw=on:gtg=exists_sym:newcnf=on:nm=32:rp=on:sp=unary_first:tac=rule:taea=off:tar=off:tgt=full:uhcvi=on:uwa=ground:i=719:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=667:si=on:rtra=on_0"); + quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=636:si=on:rtra=on_0"); + quick.push("dis+10_1:1_avsq=on:avsqr=1,16:drc=off:fd=preordered:ins=1:nm=32:sfv=off:sp=unary_frequency:spb=goal:to=lpo:updr=off:i=1016:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=119:si=on:rtra=on_0"); + quick.push("dis+1010_1:28_acc=model:fnrw=on:gtg=exists_sym:newcnf=on:nm=10:plsq=on:rawr=on:rp=on:sp=const_max:taea=off:thi=strong:uace=off:uwa=interpreted_only:i=162:si=on:rtra=on_0"); + quick.push("lrs+10_1:1024_fnrw=on:gtg=all:gtgl=3:ind=struct:indao=on:indc=goal:indoct=on:newcnf=on:sac=on:sp=unary_first:i=111:si=on:rtra=on_0"); + quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=245:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_abs=on:anc=all:ev=cautious:kws=inv_frequency:newcnf=on:rp=on:sac=on:sas=z3:spb=goal_then_units:tgt=ground:uwa=interpreted_only:i=314:si=on:rtra=on_0"); + quick.push("ott+1002_1:64_drc=off:fsr=off:ind=both:indu=off:kws=arity_squared:newcnf=on:nwc=10.0:tar=off:uwa=one_side_constant:i=117:si=on:rtra=on_0"); + quick.push("lrs+1010_1:5_fsd=on:fsdmm=3:gve=force:newcnf=on:nm=32:norm_ineq=on:rp=on:sas=z3:spb=intro:tar=off:i=1522:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_fnrw=on:ind=both:indmd=2:indoct=on:kws=frequency:newcnf=on:nui=on:sik=recursion:taea=off:i=1211:si=on:rtra=on_0"); + quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=172:si=on:rtra=on_0"); + quick.push("lrs+10_1:32_drc=encompass:ind=struct:newcnf=on:sac=on:sik=recursion:sp=const_min:taea=off:tgt=full:to=lpo:i=273:si=on:rtra=on_0"); + quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=451:si=on:rtra=on_0"); + // Improves by expected 7.558886614090776 probs costing 7965 Mi + // Sub-schedule for 20000Mi strat cap / 20000Mi overall limit + quick.push("lrs+1002_1:3_awrs=decay:fnrw=on:gtg=exists_sym:newcnf=on:nm=32:rp=on:sp=unary_first:tac=rule:taea=off:tar=off:tgt=full:uhcvi=on:uwa=ground:i=719:si=on:rtra=on_0"); + quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=2001:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:fsr=off:ind=struct:newcnf=on:sik=all:taea=off:to=lpo:i=2498:si=on:rtra=on_0"); + quick.push("dis-1002_16:1_drc=off:ind=struct:sac=on:sp=const_frequency:taea=off:to=lpo:i=1468:si=on:rtra=on_0"); + quick.push("ott+10_1:1_avsq=on:avsql=on:bd=off:gtg=position:ind=both:indstrhyp=on:kws=precedence:newcnf=on:nwc=10.0:sac=on:sgt=30:sik=all:sp=frequency:ss=axioms:taea=off:urr=on:i=1217:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=667:si=on:rtra=on_0"); + quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=636:si=on:rtra=on_0"); + quick.push("ott+1010_9:4_anc=all_dependent:drc=encompass:fsd=on:ind=struct:indao=on:indstrhyp=on:newcnf=on:pum=on:s2a=on:s2agt=32:sos=all:tac=rule:i=2001:si=on:rtra=on_0"); + quick.push("ott+10_1:128_awrs=converge:awrsf=500:bsr=on:drc=off:er=known:ev=force:fde=none:gsp=on:ind=struct:indgen=on:indgenss=2:indstrhyp=on:irw=on:sac=on:sos=theory:taea=off:tgt=full:to=lpo:uwa=one_side_interpreted:i=2709:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_add=large:afr=on:newcnf=on:pum=on:rp=on:sas=z3:sos=all:sp=unary_frequency:thi=overlap:to=lpo:uhcvi=on:i=818:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=119:si=on:rtra=on_0"); + quick.push("lrs+10_1:1024_fnrw=on:gtg=all:gtgl=3:ind=struct:indao=on:indc=goal:indoct=on:newcnf=on:sac=on:sp=unary_first:i=111:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=1301:si=on:rtra=on_0"); + quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=1258:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:nwc=10.0:sac=on:sik=recursion:to=lpo:i=1054:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_abs=on:anc=all:ev=cautious:kws=inv_frequency:newcnf=on:rp=on:sac=on:sas=z3:spb=goal_then_units:tgt=ground:uwa=interpreted_only:i=380:si=on:rtra=on_0"); + quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=171:si=on:rtra=on_0"); + quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=451:si=on:rtra=on_0"); + // Improves by expected 7.693439460498187 probs costing 19561 Mi + // Sub-schedule for 40000Mi strat cap / 40000Mi overall limit + quick.push("lrs+1002_1:3_awrs=decay:fnrw=on:gtg=exists_sym:newcnf=on:nm=32:rp=on:sp=unary_first:tac=rule:taea=off:tar=off:tgt=full:uhcvi=on:uwa=ground:i=719:si=on:rtra=on_0"); + quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=2001:si=on:rtra=on_0"); + quick.push("dis+10_1:128_ind=both:indmd=1:indstrhyp=on:nui=on:sac=on:i=1868:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=1943:si=on:rtra=on_0"); + quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=636:si=on:rtra=on_0"); + quick.push("ott+1010_9:4_anc=all_dependent:drc=encompass:fsd=on:ind=struct:indao=on:indstrhyp=on:newcnf=on:pum=on:s2a=on:s2agt=32:sos=all:tac=rule:i=2001:si=on:rtra=on_0"); + quick.push("ott+10_1:1024_asg=cautious:awrs=decay:drc=off:fsd=on:ind=struct:newcnf=on:nm=2:sac=on:taea=off:i=12303:si=on:rtra=on_0"); + quick.push("dis+10_1:1_avsq=on:avsqr=1,16:drc=off:fd=preordered:ins=1:nm=32:sfv=off:sp=unary_frequency:spb=goal:to=lpo:updr=off:i=862:si=on:rtra=on_0"); + quick.push("lrs+10_1:1024_fnrw=on:gtg=all:gtgl=3:ind=struct:indao=on:indc=goal:indoct=on:newcnf=on:sac=on:sp=unary_first:i=156:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=1384:si=on:rtra=on_0"); + quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=1258:si=on:rtra=on_0"); + quick.push("lrs+1002_3:4_newcnf=on:nm=30:norm_ineq=on:rp=on:sas=z3:thi=strong:i=2401:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_gtg=exists_all:ind=both:indmd=1:newcnf=on:nui=on:taea=off:updr=off:i=2526:si=on:rtra=on_0"); + quick.push("lrs+1010_1:5_fsd=on:fsdmm=3:gve=force:newcnf=on:nm=32:norm_ineq=on:rp=on:sas=z3:spb=intro:tar=off:i=3563:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_fnrw=on:ind=both:indmd=2:indoct=on:kws=frequency:newcnf=on:nui=on:sik=recursion:taea=off:i=1211:si=on:rtra=on_0"); + quick.push("lrs+10_1:32_drc=encompass:ind=struct:newcnf=on:sac=on:sik=recursion:sp=const_min:taea=off:tgt=full:to=lpo:i=2901:si=on:rtra=on_0"); + quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=451:si=on:rtra=on_0"); + // Improves by expected 3.777549983210466 probs costing 38167 Mi + // Sub-schedule for 120000Mi strat cap / 120000Mi overall limit + quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=2001:si=on:rtra=on_0"); + quick.push("dis+10_1:128_ind=both:indmd=1:indstrhyp=on:nui=on:sac=on:i=44406:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=1943:si=on:rtra=on_0"); + quick.push("ott+21_1:5_drc=off:erd=off:ind=both:indgen=on:indgenss=5:sac=on:slsq=on:taea=off:urr=on:i=5850:si=on:rtra=on_0"); + quick.push("ott+10_1:1024_asg=cautious:awrs=decay:drc=off:fsd=on:ind=struct:newcnf=on:nm=2:sac=on:taea=off:i=22001:si=on:rtra=on_0"); + quick.push("dis+1010_3:2_cond=fast:fnrw=on:ind=both:ins=1:newcnf=on:rp=on:sik=two:sp=weighted_frequency:spb=goal_then_units:taea=off:tar=off:thi=all:uwa=ground:i=6517:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=1301:si=on:rtra=on_0"); + quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=1258:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_fnrw=on:ind=both:indmd=2:indoct=on:kws=frequency:newcnf=on:nui=on:sik=recursion:taea=off:i=1211:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_bd=preordered:gtg=exists_all:gtgl=3:ind=struct:indmd=1:indstrhyp=on:nui=on:sos=on:i=26469:si=on:rtra=on_0"); + // Improves by expected 2.9164619304940467 probs costing 112947 Mi + // Sub-schedule for 240000Mi strat cap / 240000Mi overall limit + quick.push("lrs+10_1:1_gtg=exists_sym:ind=struct:indstrhyp=on:kws=precedence:sos=on:sp=unary_first:spb=goal:urr=on:i=65118:si=on:rtra=on_0"); + quick.push("dis+10_1:128_ind=both:indmd=1:indstrhyp=on:nui=on:sac=on:i=44406:si=on:rtra=on_0"); + quick.push("ott+1010_9:4_anc=all_dependent:drc=encompass:fsd=on:ind=struct:indao=on:indstrhyp=on:newcnf=on:pum=on:s2a=on:s2agt=32:sos=all:tac=rule:i=7452:si=on:rtra=on_0"); + quick.push("ott+21_1:5_drc=off:erd=off:ind=both:indgen=on:indgenss=5:sac=on:slsq=on:taea=off:urr=on:i=20001:si=on:rtra=on_0"); + quick.push("dis+1010_3:2_cond=fast:fnrw=on:ind=both:ins=1:newcnf=on:rp=on:sik=two:sp=weighted_frequency:spb=goal_then_units:taea=off:tar=off:thi=all:uwa=ground:i=6517:si=on:rtra=on_0"); + quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=1258:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_bd=preordered:gtg=exists_all:gtgl=3:ind=struct:indmd=1:indstrhyp=on:nui=on:sos=on:i=37001:si=on:rtra=on_0"); + // Improves by expected 1.4440838555503994 probs costing 181746 Mi + // Sub-schedule for 480000Mi strat cap / 480000Mi overall limit + quick.push("lrs+10_1:1_gtg=exists_sym:ind=struct:indstrhyp=on:kws=precedence:sos=on:sp=unary_first:spb=goal:urr=on:i=65118:si=on:rtra=on_0"); + quick.push("ott+21_1:5_drc=off:erd=off:ind=both:indgen=on:indgenss=5:sac=on:slsq=on:taea=off:urr=on:i=20001:si=on:rtra=on_0"); + quick.push("dis+1010_3:2_cond=fast:fnrw=on:ind=both:ins=1:newcnf=on:rp=on:sik=two:sp=weighted_frequency:spb=goal_then_units:taea=off:tar=off:thi=all:uwa=ground:i=6517:si=on:rtra=on_0"); + // Improves by expected 0.6500479229841795 probs costing 91633 Mi + // Sub-schedule for 960000Mi strat cap / 960000Mi overall limit + quick.push("lrs+10_1:1_gtg=exists_sym:ind=struct:indstrhyp=on:kws=precedence:sos=on:sp=unary_first:spb=goal:urr=on:i=65118:si=on:rtra=on_0"); + quick.push("ott+21_1:5_drc=off:erd=off:ind=both:indgen=on:indgenss=5:sac=on:slsq=on:taea=off:urr=on:i=20001:si=on:rtra=on_0"); + quick.push("dis+1010_3:2_cond=fast:fnrw=on:ind=both:ins=1:newcnf=on:rp=on:sik=two:sp=weighted_frequency:spb=goal_then_units:taea=off:tar=off:thi=all:uwa=ground:i=6517:si=on:rtra=on_0"); + // Improves by expected 0.48743704742488414 probs costing 91633 Mi + // Sub-schedule for 960000Mi strat cap / 960000Mi overall limit + quick.push("lrs+10_1:1_gtg=exists_sym:ind=struct:indstrhyp=on:kws=precedence:sos=on:sp=unary_first:spb=goal:urr=on:i=65118:si=on:rtra=on_0"); + // Improves by expected 0.20956315647195745 probs costing 65117 Mi + // Sub-schedule for 960000Mi strat cap / 960000Mi overall limit + quick.push("lrs+10_1:1_gtg=exists_sym:ind=struct:indstrhyp=on:kws=precedence:sos=on:sp=unary_first:spb=goal:urr=on:i=65118:si=on:rtra=on_0"); + // Improves by expected 0.1622424910289877 probs costing 65117 Mi + // Overall score 509.99088280867824 probs on average / budget 683853 Mi } void Schedules::getSnakeTptpUnsSchedule(const Shell::Property& property, Schedule& quick) { diff --git a/CASC/Schedules.hpp b/CASC/Schedules.hpp index 65e0ad048..94c917c14 100644 --- a/CASC/Schedules.hpp +++ b/CASC/Schedules.hpp @@ -46,6 +46,7 @@ class Schedules static void getInductionSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback); static void getIntegerInductionSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback); static void getStructInductionSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback); + static void getStructInductionTipSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback); static void getSnakeTptpUnsSchedule(const Shell::Property& property, Schedule& quick); static void getSnakeTptpSatSchedule(const Shell::Property& property, Schedule& quick); diff --git a/Shell/Options.cpp b/Shell/Options.cpp index 05517de00..9d14e2097 100644 --- a/Shell/Options.cpp +++ b/Shell/Options.cpp @@ -167,7 +167,8 @@ void Options::init() "smtcomp_2018", "snake_tptp_uns", "snake_tptp_sat", - "struct_induction"}); + "struct_induction", + "struct_induction_tip"}); _schedule.description = "Schedule to be run by the portfolio mode. casc and smtcomp usually point to the most recent schedule in that category. file loads the schedule from a file specified in --schedule_file. Note that some old schedules may contain option values that are no longer supported - see ignore_missing."; _lookup.insert(&_schedule); _schedule.reliesOn(UsingPortfolioTechnology()); diff --git a/Shell/Options.hpp b/Shell/Options.hpp index ba2f9c272..4f98fe8b2 100644 --- a/Shell/Options.hpp +++ b/Shell/Options.hpp @@ -428,7 +428,8 @@ class Options SMTCOMP_2018, SNAKE_TPTP_UNS, SNAKE_TPTP_SAT, - STRUCT_INDUCTION + STRUCT_INDUCTION, + STRUCT_INDUCTION_TIP }; /* TODO: use an enum for Selection. The current issue is the way these values are manipulated as ints From 67a4fa7949b342344c96ac7753ee9ceba4f567d5 Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Tue, 2 Jan 2024 13:55:10 +0000 Subject: [PATCH 37/56] adding intind_oeis sched (trained on a random subset of 4241 out of the 29687 overall problems) --- CASC/PortfolioMode.cpp | 3 + CASC/Schedules.cpp | 181 +++++++++++++++++++++++++++++++++++++++++ CASC/Schedules.hpp | 1 + Shell/Options.cpp | 1 + Shell/Options.hpp | 1 + 5 files changed, 187 insertions(+) diff --git a/CASC/PortfolioMode.cpp b/CASC/PortfolioMode.cpp index 684d66c25..60b43fb2c 100644 --- a/CASC/PortfolioMode.cpp +++ b/CASC/PortfolioMode.cpp @@ -404,6 +404,9 @@ void PortfolioMode::getSchedules(const Property& prop, Schedule& quick, Schedule case Options::Schedule::INTEGER_INDUCTION: Schedules::getIntegerInductionSchedule(prop,quick,fallback); break; + case Options::Schedule::INTIND_OEIS: + Schedules::getIntindOeisSchedule(prop,quick,fallback); + break; case Options::Schedule::STRUCT_INDUCTION: Schedules::getStructInductionSchedule(prop,quick,fallback); break; diff --git a/CASC/Schedules.cpp b/CASC/Schedules.cpp index eb6a03ab1..a8456fd39 100644 --- a/CASC/Schedules.cpp +++ b/CASC/Schedules.cpp @@ -3098,6 +3098,187 @@ void Schedules::getIntegerInductionSchedule(const Shell::Property& property, Sch fallback.push("lrs+10_1_iik=one:ind=int_50"); } +void Schedules::getIntindOeisSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback) { + // oeisBenchConverted_shuf_4241.txt (fitting to 1/7th of the whole benchmark, that is to 4241 problems) + // Sub-schedule for 10000Mi strat cap / 10000Mi overall limit + quick.push("ott+1011_1:1_alpa=false:asg=cautious:drc=off:ins=1:sac=on:sp=unary_frequency:thi=overlap:to=lpo:uwa=interpreted_only:i=492:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_bsr=unit_only:ev=force:ins=1:lcm=reverse:pum=on:sas=z3:spb=goal:ss=included:to=lpo:i=281:si=on:rtra=on_0"); + quick.push("ott+10_1:1_bd=preordered:bsr=on:drc=off:gtg=exists_sym:gtgl=2:ind=int:intindint=infinite:intindsteq=only_one_occurrence:newcnf=on:nwc=3.0:sac=on:sas=z3:sp=const_min:spb=goal:tac=light:thi=all:to=lpo:i=1013:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_asg=cautious:drc=off:fde=unused:gtg=exists_all:ind=both:indoct=on:ins=4:intindstterm=no_skolems:newcnf=on:rawr=on:s2a=on:s2at=5.0:sp=const_min:spb=goal_then_units:tac=rule:to=lpo:i=453:si=on:rtra=on_0"); + quick.push("lrs+1010_4:1_alpa=true:drc=off:fd=preordered:ind=int:indgen=on:indgenss=2:indmd=1:s2a=on:sac=on:sos=on:sp=unary_frequency:to=lpo:i=48:si=on:rtra=on_0"); + quick.push("lrs+1011_1:8_drc=encompass:flr=on:ile=on:ind=int:sp=unary_first:tgt=ground:thi=strong:thitd=on:to=lpo:uhcvi=on:uwa=all:i=322:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_av=off:drc=encompass:ev=force:ind=int:indgen=on:indgenss=1:intindint=infinite:newcnf=on:nwc=5.0:s2a=on:sp=frequency:to=lpo:i=88:si=on:rtra=on_0"); + quick.push("lrs+1010_1:16_bd=off:canc=cautious:fnrw=on:fsr=off:ins=2:newcnf=on:i=61:si=on:rtra=on_0"); + quick.push("lrs+10_1:8_ev=force:fd=preordered:fnrw=on:gtg=exists_all:gtgl=4:newcnf=on:nwc=10.0:sp=const_frequency:tgt=ground:to=lpo:i=125:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_br=off:drc=encompass:fsd=on:gve=force:ind=int:intindint=infinite:kws=inv_precedence:s2a=on:urr=on:uwa=one_side_interpreted:i=30:si=on:rtra=on_0"); + quick.push("lrs+1010_1:3_anc=all:bd=off:canc=cautious:ev=force:fnrw=on:gtg=exists_sym:newcnf=on:nwc=10.0:sac=on:sp=frequency:to=lpo:urr=on:uwa=interpreted_only:i=83:si=on:rtra=on_0"); + quick.push("lrs-10_1:1024_fnrw=on:gtg=position:ins=2:kws=inv_frequency:newcnf=on:norm_ineq=on:sac=on:sas=z3:sos=on:i=401:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_av=off:drc=off:ev=force:fd=preordered:gtg=all:gtgl=4:ind=both:lcm=reverse:s2a=on:sp=reverse_arity:to=lpo:uwa=interpreted_only:i=590:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_av=off:canc=cautious:drc=encompass:ind=int:intindstcomp=none:intindstterm=no_skolems:spb=goal_then_units:to=lpo:urr=on:i=111:si=on:rtra=on_0"); + quick.push("lrs+10_5:1_br=off:canc=force:fd=preordered:ind=int:indc=goal:intindsteq=only_one_occurrence:sos=on:sp=frequency:to=lpo:urr=on:i=24:si=on:rtra=on_0"); + quick.push("ott+10_1:1_br=off:ep=RSTC:ev=force:fnrw=on:gtg=position:ins=1:kws=inv_arity:newcnf=on:sos=all:i=245:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_anc=all:ev=force:fnrw=on:ins=1:newcnf=on:rawr=on:slsq=on:to=lpo:i=119:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_drc=off:ev=force:gtg=all:ind=both:intinddb=on:intindint=finite:intindstcomp=only_one_occurrence:intindstterm=no_skolems:sas=z3:sp=const_min:to=lpo:i=1083:si=on:rtra=on_0"); + quick.push("lrs+10_1:128_br=off:ev=cautious:fd=preordered:fnrw=on:gtg=all:ins=2:kws=precedence:newcnf=on:sos=on:sp=frequency:spb=intro:i=261:si=on:rtra=on_0"); + quick.push("ott+11_1:1_asg=force:av=off:canc=force:drc=off:ev=force:gve=force:ind=both:indc=goal_plus:nwc=3.0:s2a=on:sd=10:sp=const_frequency:ss=included:st=5.0:tar=off:thi=neg_eq:to=lpo:uwa=one_side_constant:i=458:si=on:rtra=on_0"); + quick.push("lrs+11_1:1_drc=encompass:ev=force:fsr=off:kws=precedence:sp=unary_frequency:i=114:si=on:rtra=on_0"); + quick.push("lrs+10_1:128_canc=cautious:drc=encompass:ev=force:fnrw=on:gtg=exists_sym:newcnf=on:nwc=10.0:to=lpo:i=163:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_bd=preordered:br=off:ep=R:fnrw=on:ins=2:newcnf=on:norm_ineq=on:sas=z3:sffsmt=on:to=lpo:i=949:si=on:rtra=on_0"); + quick.push("lrs+1002_1:14_abs=on:br=off:drc=off:fnrw=on:gtg=position:ins=1:kws=inv_arity:newcnf=on:nwc=5.0:sas=z3:tac=light:urr=on:i=180:si=on:rtra=on_0"); + quick.push("ott+1011_1:1_sas=z3:slsq=on:sp=const_min:thi=strong:thitd=on:to=lpo:i=421:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_ep=R:fnrw=on:kws=precedence:newcnf=on:norm_ineq=on:pum=on:sas=z3:sp=frequency:tgt=ground:i=457:si=on:rtra=on_0"); + quick.push("lrs+10_2:1_av=off:canc=cautious:drc=off:ev=force:ind=int:intindsteq=toplevel_not_in_other:nwc=5.0:sos=on:sp=const_frequency:to=lpo:i=31:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_drc=off:fnrw=on:gtg=all:ind=both:intindint=infinite:intindstterm=no_skolems:newcnf=on:s2a=on:sas=z3:sos=on:sp=const_min:tac=axiom:thi=neg_eq:to=lpo:uhcvi=on:i=1409:si=on:rtra=on_0"); + // Improves by expected 768.8930392701382 probs costing 9984 Mi + // Sub-schedule for 30000Mi strat cap / 30000Mi overall limit + quick.push("dis+1010_1:8_av=off:bsr=on:ev=cautious:gtg=all:gtgl=5:ind=int:indc=goal_plus:intindsteq=toplevel_not_in_other:nwc=10.0:plsq=on:plsql=on:plsqr=32,1:pum=on:rawr=on:sp=unary_frequency:tac=axiom:taea=off:tgt=ground:thi=strong:thigen=on:uwa=interpreted_only:i=1215:si=on:rtra=on_0"); + quick.push("ott+10_1:1_bd=preordered:bsr=on:drc=off:gtg=exists_sym:gtgl=2:ind=int:intindint=infinite:intindsteq=only_one_occurrence:newcnf=on:nwc=3.0:sac=on:sas=z3:sp=const_min:spb=goal:tac=light:thi=all:to=lpo:i=990:si=on:rtra=on_0"); + quick.push("ott+11_1:1_av=off:canc=force:drc=off:fd=preordered:ind=both:indmd=5:intindsteq=toplevel_not_in_other:pum=on:spb=non_intro:to=lpo:i=1237:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_asg=cautious:drc=off:fde=unused:gtg=exists_all:ind=both:indoct=on:ins=4:intindstterm=no_skolems:newcnf=on:rawr=on:s2a=on:s2at=5.0:sp=const_min:spb=goal_then_units:tac=rule:to=lpo:i=453:si=on:rtra=on_0"); + quick.push("lrs+1010_4:1_alpa=true:drc=off:fd=preordered:ind=int:indgen=on:indgenss=2:indmd=1:s2a=on:sac=on:sos=on:sp=unary_frequency:to=lpo:i=48:si=on:rtra=on_0"); + quick.push("lrs+1011_1:8_drc=encompass:flr=on:ile=on:ind=int:sp=unary_first:tgt=ground:thi=strong:thitd=on:to=lpo:uhcvi=on:uwa=all:i=479:si=on:rtra=on_0"); + quick.push("ott+10_1:16_asg=cautious:drc=off:erd=off:fd=preordered:norm_ineq=on:sp=unary_first:spb=intro:tar=off:tgt=ground:to=lpo:i=711:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_av=off:drc=encompass:ev=force:ind=int:indgen=on:indgenss=1:intindint=infinite:newcnf=on:nwc=5.0:s2a=on:sp=frequency:to=lpo:i=234:si=on:rtra=on_0"); + quick.push("lrs+2_8:1_asg=force:av=off:drc=off:ev=force:flr=on:gtg=all:gtgl=2:ind=both:indmd=10:intindstterm=none:lcm=reverse:nwc=10.0:sp=weighted_frequency:spb=goal:tar=off:tgt=full:thi=strong:thigen=on:to=lpo:i=860:si=on:rtra=on_0"); + quick.push("ott+2_1:1_drc=off:ev=force:fdi=60:ind=int:indao=on:indc=goal:indmd=10:newcnf=on:norm_ineq=on:pum=on:s2agt=16:s2at=1.5:s2pl=no:sp=const_max:spb=goal_then_units:to=lpo:updr=off:uwa=one_side_constant:i=322:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_av=off:drc=off:ev=force:fd=preordered:gtg=all:gtgl=4:ind=both:lcm=reverse:s2a=on:sp=reverse_arity:to=lpo:uwa=interpreted_only:i=872:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:drc=off:gtg=exists_top:ind=both:newcnf=on:spb=goal_then_units:to=lpo:urr=on:i=602:si=on:rtra=on_0"); + quick.push("ott-1011_1:1_bd=off:fsr=off:gtg=exists_sym:gtgl=3:kws=inv_frequency:nwc=10.0:s2a=on:slsq=on:thi=neg_eq:uwa=one_side_interpreted:i=839:si=on:rtra=on_0"); + quick.push("lrs+2_1:128_av=off:drc=off:ev=force:fnrw=on:fsr=off:gtg=all:ind=both:intindstterm=no_skolems:newcnf=on:nwc=5.0:plsq=on:plsqr=2,1:rnwc=on:s2a=on:sp=frequency:spb=goal_then_units:to=lpo:i=641:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_canc=force:fnrw=on:ins=1:newcnf=on:sas=z3:sos=on:sp=frequency:to=lpo:i=1134:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_anc=all:ev=force:fnrw=on:ins=1:newcnf=on:rawr=on:slsq=on:to=lpo:i=671:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_drc=off:ev=force:gtg=all:ind=both:intinddb=on:intindint=finite:intindstcomp=only_one_occurrence:intindstterm=no_skolems:sas=z3:sp=const_min:to=lpo:i=4846:si=on:rtra=on_0"); + quick.push("lrs+10_1:128_br=off:ev=cautious:fd=preordered:fnrw=on:gtg=all:ins=2:kws=precedence:newcnf=on:sos=on:sp=frequency:spb=intro:i=1569:si=on:rtra=on_0"); + quick.push("ott+11_1:1_asg=force:av=off:canc=force:drc=off:ev=force:gve=force:ind=both:indc=goal_plus:nwc=3.0:s2a=on:sd=10:sp=const_frequency:ss=included:st=5.0:tar=off:thi=neg_eq:to=lpo:uwa=one_side_constant:i=3272:si=on:rtra=on_0"); + quick.push("ott+10_1:1_afr=on:asg=cautious:avsq=on:avsqc=1:drc=off:ev=force:ind=int:indc=goal:indu=off:intindstterm=no_skolems:nm=16:spb=non_intro:to=lpo:uwa=all:i=691:si=on:rtra=on_0"); + quick.push("lrs+1011_8:1_afp=5000:afq=1.93:fdi=50:ins=1:pum=on:rawr=on:sas=z3:sos=theory:sp=const_min:spb=goal_then_units:tar=off:tgt=ground:thi=strong:to=lpo:i=618:si=on:rtra=on_0"); + quick.push("lrs+21_8:1_av=off:canc=cautious:drc=encompass:gtg=position:ind=int:intindint=infinite:lwlo=on:plsq=on:plsqc=1:plsqr=8767905,1048576:s2a=on:s2agt=64:s2pl=on:sp=unary_frequency:to=lpo:i=2259:si=on:rtra=on_0"); + quick.push("ott+1010_3:2_canc=force:drc=off:ev=force:gtg=all:ind=both:intindint=infinite:intindstcomp=none:intindstterm=no_skolems:newcnf=on:sos=all:sp=const_max:spb=non_intro:to=lpo:urr=on:i=715:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_ep=R:fnrw=on:kws=precedence:newcnf=on:norm_ineq=on:pum=on:sas=z3:sp=frequency:tgt=ground:i=1603:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_gtg=position:ins=1:norm_ineq=on:sas=z3:sos=on:sp=frequency:thi=all:to=lpo:i=1421:si=on:rtra=on_0"); + quick.push("lrs+10_2:1_av=off:canc=cautious:drc=off:ev=force:ind=int:intindsteq=toplevel_not_in_other:nwc=5.0:sos=on:sp=const_frequency:to=lpo:i=28:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_drc=off:fnrw=on:gtg=all:ind=both:intindint=infinite:intindstterm=no_skolems:newcnf=on:s2a=on:sas=z3:sos=on:sp=const_min:tac=axiom:thi=neg_eq:to=lpo:uhcvi=on:i=1660:si=on:rtra=on_0"); + // Improves by expected 64.39173134160707 probs costing 29963 Mi + // Sub-schedule for 80000Mi strat cap / 80000Mi overall limit + quick.push("dis+1010_1:8_av=off:bsr=on:ev=cautious:gtg=all:gtgl=5:ind=int:indc=goal_plus:intindsteq=toplevel_not_in_other:nwc=10.0:plsq=on:plsql=on:plsqr=32,1:pum=on:rawr=on:sp=unary_frequency:tac=axiom:taea=off:tgt=ground:thi=strong:thigen=on:uwa=interpreted_only:i=4823:si=on:rtra=on_0"); + quick.push("ott+1011_1:1_alpa=false:asg=cautious:drc=off:ins=1:sac=on:sp=unary_frequency:thi=overlap:to=lpo:uwa=interpreted_only:i=517:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_asg=cautious:canc=force:ins=1:sas=z3:sos=on:spb=non_intro:tgt=full:to=lpo:i=2189:si=on:rtra=on_0"); + quick.push("ott+10_1:1_bd=preordered:bsr=on:drc=off:gtg=exists_sym:gtgl=2:ind=int:intindint=infinite:intindsteq=only_one_occurrence:newcnf=on:nwc=3.0:sac=on:sas=z3:sp=const_min:spb=goal:tac=light:thi=all:to=lpo:i=990:si=on:rtra=on_0"); + quick.push("ott+11_1:1_av=off:canc=force:drc=off:fd=preordered:ind=both:indmd=5:intindsteq=toplevel_not_in_other:pum=on:spb=non_intro:to=lpo:i=919:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_asg=cautious:drc=off:fde=unused:gtg=exists_all:ind=both:indoct=on:ins=4:intindstterm=no_skolems:newcnf=on:rawr=on:s2a=on:s2at=5.0:sp=const_min:spb=goal_then_units:tac=rule:to=lpo:i=1003:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_ev=force:gtg=all:gtgl=5:nicw=on:sas=z3:sp=const_max:spb=units:to=lpo:i=1667:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_canc=cautious:fsr=off:gs=on:ind=both:intindint=finite:intindsteq=always:intindstterm=none:newcnf=on:s2a=on:s2agt=64:sas=z3:sp=weighted_frequency:tar=off:tgt=ground:thi=all:to=lpo:i=3162:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_asg=cautious:drc=off:gtg=exists_sym:gtgl=5:ind=both:intindint=infinite:intindstcomp=not_in_both:nwc=2.0:sas=z3:sp=frequency:to=lpo:i=2296:si=on:rtra=on_0"); + quick.push("ott+1011_8:1_av=off:drc=off:fde=none:ind=int:kws=inv_arity_squared:plsq=on:plsqc=1:plsqr=9,8:rawr=on:sp=unary_first:tgt=ground:thi=all:uwa=ground:i=1901:si=on:rtra=on_0"); + quick.push("lrs+1011_1:8_drc=encompass:flr=on:ile=on:ind=int:sp=unary_first:tgt=ground:thi=strong:thitd=on:to=lpo:uhcvi=on:uwa=all:i=479:si=on:rtra=on_0"); + quick.push("ott+10_1:16_asg=cautious:drc=off:erd=off:fd=preordered:norm_ineq=on:sp=unary_first:spb=intro:tar=off:tgt=ground:to=lpo:i=2617:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_avsq=on:avsqr=6,31:drc=off:ins=3:newcnf=on:nm=16:s2a=on:sas=z3:sp=frequency:tac=rule:thi=all:to=lpo:uwa=ground:i=795:si=on:rtra=on_0"); + quick.push("lrs+1_1:256_awrs=decay:awrsf=20:ind=struct:indc=goal_plus:ins=2:nm=40:nwc=6.0:s2at=3.0:slsq=on:slsql=off:slsqr=11,17:spb=non_intro:thi=all:thitd=on:to=lpo:i=1803:si=on:rtra=on_0"); + quick.push("ott+1002_5:2_canc=cautious:fd=preordered:gsp=on:gtg=exists_all:gtgl=3:ind=both:s2a=on:s2at=5.0:sac=on:sas=z3:slsq=on:slsqc=4:slsqr=1,4:sp=reverse_arity:to=lpo:urr=on:i=2346:si=on:rtra=on_0"); + quick.push("lrs-10_1:1024_fnrw=on:gtg=position:ins=2:kws=inv_frequency:newcnf=on:norm_ineq=on:sac=on:sas=z3:sos=on:i=1399:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_av=off:drc=off:ev=force:fd=preordered:gtg=all:gtgl=4:ind=both:lcm=reverse:s2a=on:sp=reverse_arity:to=lpo:uwa=interpreted_only:i=1549:si=on:rtra=on_0"); + quick.push("lrs+1011_1:128_afp=100000:afq=1.9:avsq=on:canc=cautious:ev=force:fde=none:flr=on:fnrw=on:fsr=off:gtg=position:newcnf=on:sas=z3:sp=unary_first:spb=non_intro:thi=neg_eq:i=1374:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:drc=off:gtg=exists_top:ind=both:newcnf=on:spb=goal_then_units:to=lpo:urr=on:i=739:si=on:rtra=on_0"); + quick.push("ott-1011_1:1_bd=off:fsr=off:gtg=exists_sym:gtgl=3:kws=inv_frequency:nwc=10.0:s2a=on:slsq=on:thi=neg_eq:uwa=one_side_interpreted:i=1101:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_canc=force:fnrw=on:ins=1:newcnf=on:sas=z3:sos=on:sp=frequency:to=lpo:i=2335:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_drc=off:ev=force:gtg=all:ind=both:intinddb=on:intindint=finite:intindstcomp=only_one_occurrence:intindstterm=no_skolems:sas=z3:sp=const_min:to=lpo:i=11689:si=on:rtra=on_0"); + quick.push("ott+11_1:1_asg=force:av=off:canc=force:drc=off:ev=force:gve=force:ind=both:indc=goal_plus:nwc=3.0:s2a=on:sd=10:sp=const_frequency:ss=included:st=5.0:tar=off:thi=neg_eq:to=lpo:uwa=one_side_constant:i=7199:si=on:rtra=on_0"); + quick.push("ott+10_1:1_afr=on:asg=cautious:avsq=on:avsqc=1:drc=off:ev=force:ind=int:indc=goal:indu=off:intindstterm=no_skolems:nm=16:spb=non_intro:to=lpo:uwa=all:i=691:si=on:rtra=on_0"); + quick.push("lrs+21_8:1_av=off:canc=cautious:drc=encompass:gtg=position:ind=int:intindint=infinite:lwlo=on:plsq=on:plsqc=1:plsqr=8767905,1048576:s2a=on:s2agt=64:s2pl=on:sp=unary_frequency:to=lpo:i=2259:si=on:rtra=on_0"); + quick.push("ott+1010_3:2_canc=force:drc=off:ev=force:gtg=all:ind=both:intindint=infinite:intindstcomp=none:intindstterm=no_skolems:newcnf=on:sos=all:sp=const_max:spb=non_intro:to=lpo:urr=on:i=1455:si=on:rtra=on_0"); + quick.push("ott+10_1:1_ind=both:indc=goal:intindsteq=not_in_both:nwc=3.0:sas=z3:sp=frequency:to=lpo:i=306:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_ep=R:fnrw=on:kws=precedence:newcnf=on:norm_ineq=on:pum=on:sas=z3:sp=frequency:tgt=ground:i=11267:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_drc=off:fnrw=on:gtg=all:ind=both:intindint=infinite:intindstterm=no_skolems:newcnf=on:s2a=on:sas=z3:sos=on:sp=const_min:tac=axiom:thi=neg_eq:to=lpo:uhcvi=on:i=8399:si=on:rtra=on_0"); + // Improves by expected 38.96337376225668 probs costing 79240 Mi + // Sub-schedule for 120000Mi strat cap / 120000Mi overall limit + quick.push("dis+1010_1:8_av=off:bsr=on:ev=cautious:gtg=all:gtgl=5:ind=int:indc=goal_plus:intindsteq=toplevel_not_in_other:nwc=10.0:plsq=on:plsql=on:plsqr=32,1:pum=on:rawr=on:sp=unary_frequency:tac=axiom:taea=off:tgt=ground:thi=strong:thigen=on:uwa=interpreted_only:i=1215:si=on:rtra=on_0"); + quick.push("ott+1011_1:1_alpa=false:asg=cautious:drc=off:ins=1:sac=on:sp=unary_frequency:thi=overlap:to=lpo:uwa=interpreted_only:i=376:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_asg=cautious:canc=force:ins=1:sas=z3:sos=on:spb=non_intro:tgt=full:to=lpo:i=2189:si=on:rtra=on_0"); + quick.push("ott+10_1:1_bd=preordered:bsr=on:drc=off:gtg=exists_sym:gtgl=2:ind=int:intindint=infinite:intindsteq=only_one_occurrence:newcnf=on:nwc=3.0:sac=on:sas=z3:sp=const_min:spb=goal:tac=light:thi=all:to=lpo:i=6179:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_asg=cautious:drc=off:fde=unused:gtg=exists_all:ind=both:indoct=on:ins=4:intindstterm=no_skolems:newcnf=on:rawr=on:s2a=on:s2at=5.0:sp=const_min:spb=goal_then_units:tac=rule:to=lpo:i=3437:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_ev=force:gtg=all:gtgl=5:nicw=on:sas=z3:sp=const_max:spb=units:to=lpo:i=1667:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_canc=cautious:fsr=off:gs=on:ind=both:intindint=finite:intindsteq=always:intindstterm=none:newcnf=on:s2a=on:s2agt=64:sas=z3:sp=weighted_frequency:tar=off:tgt=ground:thi=all:to=lpo:i=2504:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_asg=cautious:drc=off:gtg=exists_sym:gtgl=5:ind=both:intindint=infinite:intindstcomp=not_in_both:nwc=2.0:sas=z3:sp=frequency:to=lpo:i=2296:si=on:rtra=on_0"); + quick.push("lrs+1011_1:8_drc=encompass:flr=on:ile=on:ind=int:sp=unary_first:tgt=ground:thi=strong:thitd=on:to=lpo:uhcvi=on:uwa=all:i=479:si=on:rtra=on_0"); + quick.push("ott+10_1:16_asg=cautious:drc=off:erd=off:fd=preordered:norm_ineq=on:sp=unary_first:spb=intro:tar=off:tgt=ground:to=lpo:i=2617:si=on:rtra=on_0"); + quick.push("lrs+2_16:1_aac=none:amm=off:canc=cautious:ind=both:indao=on:intindsteq=not_in_both:intindstterm=none:s2a=on:sp=weighted_frequency:spb=goal:thi=overlap:thitd=on:to=lpo:urr=on:i=4483:si=on:rtra=on_0"); + quick.push("lrs+2_8:1_asg=force:av=off:drc=off:ev=force:flr=on:gtg=all:gtgl=2:ind=both:indmd=10:intindstterm=none:lcm=reverse:nwc=10.0:sp=weighted_frequency:spb=goal:tar=off:tgt=full:thi=strong:thigen=on:to=lpo:i=27972:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_avsq=on:avsqr=6,31:drc=off:ins=3:newcnf=on:nm=16:s2a=on:sas=z3:sp=frequency:tac=rule:thi=all:to=lpo:uwa=ground:i=795:si=on:rtra=on_0"); + quick.push("ott+1002_5:2_canc=cautious:fd=preordered:gsp=on:gtg=exists_all:gtgl=3:ind=both:s2a=on:s2at=5.0:sac=on:sas=z3:slsq=on:slsqc=4:slsqr=1,4:sp=reverse_arity:to=lpo:urr=on:i=6638:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_av=off:drc=off:ev=force:fd=preordered:gtg=all:gtgl=4:ind=both:lcm=reverse:s2a=on:sp=reverse_arity:to=lpo:uwa=interpreted_only:i=872:si=on:rtra=on_0"); + quick.push("lrs+1011_1:128_afp=100000:afq=1.9:avsq=on:canc=cautious:ev=force:fde=none:flr=on:fnrw=on:fsr=off:gtg=position:newcnf=on:sas=z3:sp=unary_first:spb=non_intro:thi=neg_eq:i=1374:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:drc=off:gtg=exists_top:ind=both:newcnf=on:spb=goal_then_units:to=lpo:urr=on:i=739:si=on:rtra=on_0"); + quick.push("ott-1011_1:1_bd=off:fsr=off:gtg=exists_sym:gtgl=3:kws=inv_frequency:nwc=10.0:s2a=on:slsq=on:thi=neg_eq:uwa=one_side_interpreted:i=1101:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_canc=force:fnrw=on:ins=1:newcnf=on:sas=z3:sos=on:sp=frequency:to=lpo:i=2335:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_drc=off:ev=force:gtg=all:ind=both:intinddb=on:intindint=finite:intindstcomp=only_one_occurrence:intindstterm=no_skolems:sas=z3:sp=const_min:to=lpo:i=25013:si=on:rtra=on_0"); + quick.push("ott+10_1:1_afr=on:asg=cautious:avsq=on:avsqc=1:drc=off:ev=force:ind=int:indc=goal:indu=off:intindstterm=no_skolems:nm=16:spb=non_intro:to=lpo:uwa=all:i=691:si=on:rtra=on_0"); + quick.push("lrs+1011_8:1_afp=5000:afq=1.93:fdi=50:ins=1:pum=on:rawr=on:sas=z3:sos=theory:sp=const_min:spb=goal_then_units:tar=off:tgt=ground:thi=strong:to=lpo:i=989:si=on:rtra=on_0"); + quick.push("lrs+21_8:1_av=off:canc=cautious:drc=encompass:gtg=position:ind=int:intindint=infinite:lwlo=on:plsq=on:plsqc=1:plsqr=8767905,1048576:s2a=on:s2agt=64:s2pl=on:sp=unary_frequency:to=lpo:i=2259:si=on:rtra=on_0"); + quick.push("ott+1010_3:2_canc=force:drc=off:ev=force:gtg=all:ind=both:intindint=infinite:intindstcomp=none:intindstterm=no_skolems:newcnf=on:sos=all:sp=const_max:spb=non_intro:to=lpo:urr=on:i=1455:si=on:rtra=on_0"); + quick.push("ott+10_1:1_ind=both:indc=goal:intindsteq=not_in_both:nwc=3.0:sas=z3:sp=frequency:to=lpo:i=306:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_ep=R:fnrw=on:kws=precedence:newcnf=on:norm_ineq=on:pum=on:sas=z3:sp=frequency:tgt=ground:i=17601:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_gtg=position:ins=1:norm_ineq=on:sas=z3:sos=on:sp=frequency:thi=all:to=lpo:i=1642:si=on:rtra=on_0"); + // Improves by expected 20.483810176123523 probs costing 119197 Mi + // Sub-schedule for 120000Mi strat cap / 120000Mi overall limit + quick.push("dis+1010_1:8_av=off:bsr=on:ev=cautious:gtg=all:gtgl=5:ind=int:indc=goal_plus:intindsteq=toplevel_not_in_other:nwc=10.0:plsq=on:plsql=on:plsqr=32,1:pum=on:rawr=on:sp=unary_frequency:tac=axiom:taea=off:tgt=ground:thi=strong:thigen=on:uwa=interpreted_only:i=5153:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_asg=cautious:canc=force:ins=1:sas=z3:sos=on:spb=non_intro:tgt=full:to=lpo:i=2189:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_canc=cautious:fsr=off:gs=on:ind=both:intindint=finite:intindsteq=always:intindstterm=none:newcnf=on:s2a=on:s2agt=64:sas=z3:sp=weighted_frequency:tar=off:tgt=ground:thi=all:to=lpo:i=2504:si=on:rtra=on_0"); + quick.push("ott+1011_8:1_av=off:drc=off:fde=none:ind=int:kws=inv_arity_squared:plsq=on:plsqc=1:plsqr=9,8:rawr=on:sp=unary_first:tgt=ground:thi=all:uwa=ground:i=1901:si=on:rtra=on_0"); + quick.push("lrs+2_16:1_aac=none:amm=off:canc=cautious:ind=both:indao=on:intindsteq=not_in_both:intindstterm=none:s2a=on:sp=weighted_frequency:spb=goal:thi=overlap:thitd=on:to=lpo:urr=on:i=27251:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_avsq=on:avsqr=6,31:drc=off:ins=3:newcnf=on:nm=16:s2a=on:sas=z3:sp=frequency:tac=rule:thi=all:to=lpo:uwa=ground:i=795:si=on:rtra=on_0"); + quick.push("ott+1002_5:2_canc=cautious:fd=preordered:gsp=on:gtg=exists_all:gtgl=3:ind=both:s2a=on:s2at=5.0:sac=on:sas=z3:slsq=on:slsqc=4:slsqr=1,4:sp=reverse_arity:to=lpo:urr=on:i=2551:si=on:rtra=on_0"); + quick.push("lrs+1011_1:128_afp=100000:afq=1.9:avsq=on:canc=cautious:ev=force:fde=none:flr=on:fnrw=on:fsr=off:gtg=position:newcnf=on:sas=z3:sp=unary_first:spb=non_intro:thi=neg_eq:i=1374:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:drc=off:gtg=exists_top:ind=both:newcnf=on:spb=goal_then_units:to=lpo:urr=on:i=739:si=on:rtra=on_0"); + quick.push("ott-1011_1:1_bd=off:fsr=off:gtg=exists_sym:gtgl=3:kws=inv_frequency:nwc=10.0:s2a=on:slsq=on:thi=neg_eq:uwa=one_side_interpreted:i=1101:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_canc=force:fnrw=on:ins=1:newcnf=on:sas=z3:sos=on:sp=frequency:to=lpo:i=2097:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_drc=off:ev=force:gtg=all:ind=both:intinddb=on:intindint=finite:intindstcomp=only_one_occurrence:intindstterm=no_skolems:sas=z3:sp=const_min:to=lpo:i=25013:si=on:rtra=on_0"); + quick.push("ott+21_6:1_avsq=on:avsql=on:gtg=position:gtgl=3:ind=int:intindsteq=not_in_both:nm=10:pum=on:sas=z3:sp=const_min:thi=all:thigen=on:to=lpo:uwa=ground:i=11432:si=on:rtra=on_0"); + quick.push("lrs+10_1:128_br=off:ev=cautious:fd=preordered:fnrw=on:gtg=all:ins=2:kws=precedence:newcnf=on:sos=on:sp=frequency:spb=intro:i=20153:si=on:rtra=on_0"); + quick.push("ott+11_1:1_asg=force:av=off:canc=force:drc=off:ev=force:gve=force:ind=both:indc=goal_plus:nwc=3.0:s2a=on:sd=10:sp=const_frequency:ss=included:st=5.0:tar=off:thi=neg_eq:to=lpo:uwa=one_side_constant:i=2538:si=on:rtra=on_0"); + quick.push("ott+10_1:1_afr=on:asg=cautious:avsq=on:avsqc=1:drc=off:ev=force:ind=int:indc=goal:indu=off:intindstterm=no_skolems:nm=16:spb=non_intro:to=lpo:uwa=all:i=691:si=on:rtra=on_0"); + quick.push("lrs+21_8:1_av=off:canc=cautious:drc=encompass:gtg=position:ind=int:intindint=infinite:lwlo=on:plsq=on:plsqc=1:plsqr=8767905,1048576:s2a=on:s2agt=64:s2pl=on:sp=unary_frequency:to=lpo:i=2259:si=on:rtra=on_0"); + quick.push("ott+1010_3:2_canc=force:drc=off:ev=force:gtg=all:ind=both:intindint=infinite:intindstcomp=none:intindstterm=no_skolems:newcnf=on:sos=all:sp=const_max:spb=non_intro:to=lpo:urr=on:i=1455:si=on:rtra=on_0"); + quick.push("ott+10_1:1_ind=both:indc=goal:intindsteq=not_in_both:nwc=3.0:sas=z3:sp=frequency:to=lpo:i=306:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_drc=off:fnrw=on:gtg=all:ind=both:intindint=infinite:intindstterm=no_skolems:newcnf=on:s2a=on:sas=z3:sos=on:sp=const_min:tac=axiom:thi=neg_eq:to=lpo:uhcvi=on:i=8399:si=on:rtra=on_0"); + // Improves by expected 11.98641809031958 probs costing 119881 Mi + // Sub-schedule for 120000Mi strat cap / 120000Mi overall limit + quick.push("dis+1010_1:8_av=off:bsr=on:ev=cautious:gtg=all:gtgl=5:ind=int:indc=goal_plus:intindsteq=toplevel_not_in_other:nwc=10.0:plsq=on:plsql=on:plsqr=32,1:pum=on:rawr=on:sp=unary_frequency:tac=axiom:taea=off:tgt=ground:thi=strong:thigen=on:uwa=interpreted_only:i=5153:si=on:rtra=on_0"); + quick.push("ott+10_1:1_bd=preordered:bsr=on:drc=off:gtg=exists_sym:gtgl=2:ind=int:intindint=infinite:intindsteq=only_one_occurrence:newcnf=on:nwc=3.0:sac=on:sas=z3:sp=const_min:spb=goal:tac=light:thi=all:to=lpo:i=8390:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_ev=force:gtg=all:gtgl=5:nicw=on:sas=z3:sp=const_max:spb=units:to=lpo:i=1667:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_canc=cautious:fsr=off:gs=on:ind=both:intindint=finite:intindsteq=always:intindstterm=none:newcnf=on:s2a=on:s2agt=64:sas=z3:sp=weighted_frequency:tar=off:tgt=ground:thi=all:to=lpo:i=2330:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_asg=cautious:drc=off:gtg=exists_sym:gtgl=5:ind=both:intindint=infinite:intindstcomp=not_in_both:nwc=2.0:sas=z3:sp=frequency:to=lpo:i=3525:si=on:rtra=on_0"); + quick.push("lrs+1011_1:8_drc=encompass:flr=on:ile=on:ind=int:sp=unary_first:tgt=ground:thi=strong:thitd=on:to=lpo:uhcvi=on:uwa=all:i=2083:si=on:rtra=on_0"); + quick.push("ott+10_1:16_asg=cautious:drc=off:erd=off:fd=preordered:norm_ineq=on:sp=unary_first:spb=intro:tar=off:tgt=ground:to=lpo:i=2617:si=on:rtra=on_0"); + quick.push("lrs+2_16:1_aac=none:amm=off:canc=cautious:ind=both:indao=on:intindsteq=not_in_both:intindstterm=none:s2a=on:sp=weighted_frequency:spb=goal:thi=overlap:thitd=on:to=lpo:urr=on:i=4369:si=on:rtra=on_0"); + quick.push("ott+1002_5:2_canc=cautious:fd=preordered:gsp=on:gtg=exists_all:gtgl=3:ind=both:s2a=on:s2at=5.0:sac=on:sas=z3:slsq=on:slsqc=4:slsqr=1,4:sp=reverse_arity:to=lpo:urr=on:i=2346:si=on:rtra=on_0"); + quick.push("lrs-10_1:1024_fnrw=on:gtg=position:ins=2:kws=inv_frequency:newcnf=on:norm_ineq=on:sac=on:sas=z3:sos=on:i=43082:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:drc=off:gtg=exists_top:ind=both:newcnf=on:spb=goal_then_units:to=lpo:urr=on:i=739:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_canc=force:fnrw=on:ins=1:newcnf=on:sas=z3:sos=on:sp=frequency:to=lpo:i=1134:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_drc=off:ev=force:gtg=all:ind=both:intinddb=on:intindint=finite:intindstcomp=only_one_occurrence:intindstterm=no_skolems:sas=z3:sp=const_min:to=lpo:i=25013:si=on:rtra=on_0"); + quick.push("ott+11_1:1_asg=force:av=off:canc=force:drc=off:ev=force:gve=force:ind=both:indc=goal_plus:nwc=3.0:s2a=on:sd=10:sp=const_frequency:ss=included:st=5.0:tar=off:thi=neg_eq:to=lpo:uwa=one_side_constant:i=3272:si=on:rtra=on_0"); + quick.push("ott+10_1:1_afr=on:asg=cautious:avsq=on:avsqc=1:drc=off:ev=force:ind=int:indc=goal:indu=off:intindstterm=no_skolems:nm=16:spb=non_intro:to=lpo:uwa=all:i=691:si=on:rtra=on_0"); + quick.push("lrs+21_8:1_av=off:canc=cautious:drc=encompass:gtg=position:ind=int:intindint=infinite:lwlo=on:plsq=on:plsqc=1:plsqr=8767905,1048576:s2a=on:s2agt=64:s2pl=on:sp=unary_frequency:to=lpo:i=2259:si=on:rtra=on_0"); + quick.push("ott+10_1:1_ind=both:indc=goal:intindsteq=not_in_both:nwc=3.0:sas=z3:sp=frequency:to=lpo:i=1019:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_gtg=position:ins=1:norm_ineq=on:sas=z3:sos=on:sp=frequency:thi=all:to=lpo:i=1642:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_drc=off:fnrw=on:gtg=all:ind=both:intindint=infinite:intindstterm=no_skolems:newcnf=on:s2a=on:sas=z3:sos=on:sp=const_min:tac=axiom:thi=neg_eq:to=lpo:uhcvi=on:i=8399:si=on:rtra=on_0"); + // Improves by expected 8.168250634990825 probs costing 119711 Mi + // Sub-schedule for 120000Mi strat cap / 120000Mi overall limit + quick.push("dis+1010_1:8_av=off:bsr=on:ev=cautious:gtg=all:gtgl=5:ind=int:indc=goal_plus:intindsteq=toplevel_not_in_other:nwc=10.0:plsq=on:plsql=on:plsqr=32,1:pum=on:rawr=on:sp=unary_frequency:tac=axiom:taea=off:tgt=ground:thi=strong:thigen=on:uwa=interpreted_only:i=5153:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_asg=cautious:drc=off:fde=unused:gtg=exists_all:ind=both:indoct=on:ins=4:intindstterm=no_skolems:newcnf=on:rawr=on:s2a=on:s2at=5.0:sp=const_min:spb=goal_then_units:tac=rule:to=lpo:i=3801:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_asg=cautious:drc=off:gtg=exists_sym:gtgl=5:ind=both:intindint=infinite:intindstcomp=not_in_both:nwc=2.0:sas=z3:sp=frequency:to=lpo:i=3525:si=on:rtra=on_0"); + quick.push("lrs+2_16:1_aac=none:amm=off:canc=cautious:ind=both:indao=on:intindsteq=not_in_both:intindstterm=none:s2a=on:sp=weighted_frequency:spb=goal:thi=overlap:thitd=on:to=lpo:urr=on:i=27251:si=on:rtra=on_0"); + quick.push("ott+1002_5:2_canc=cautious:fd=preordered:gsp=on:gtg=exists_all:gtgl=3:ind=both:s2a=on:s2at=5.0:sac=on:sas=z3:slsq=on:slsqc=4:slsqr=1,4:sp=reverse_arity:to=lpo:urr=on:i=8845:si=on:rtra=on_0"); + quick.push("lrs-10_1:1024_fnrw=on:gtg=position:ins=2:kws=inv_frequency:newcnf=on:norm_ineq=on:sac=on:sas=z3:sos=on:i=22775:si=on:rtra=on_0"); + quick.push("ott+21_1:1_canc=cautious:drc=off:gtg=exists_top:ind=both:newcnf=on:spb=goal_then_units:to=lpo:urr=on:i=739:si=on:rtra=on_0"); + quick.push("ott+1010_1:1_canc=force:fnrw=on:ins=1:newcnf=on:sas=z3:sos=on:sp=frequency:to=lpo:i=3187:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_drc=off:ev=force:gtg=all:ind=both:intinddb=on:intindint=finite:intindstcomp=only_one_occurrence:intindstterm=no_skolems:sas=z3:sp=const_min:to=lpo:i=25013:si=on:rtra=on_0"); + quick.push("ott+21_6:1_avsq=on:avsql=on:gtg=position:gtgl=3:ind=int:intindsteq=not_in_both:nm=10:pum=on:sas=z3:sp=const_min:thi=all:thigen=on:to=lpo:uwa=ground:i=12063:si=on:rtra=on_0"); + quick.push("ott+11_1:1_asg=force:av=off:canc=force:drc=off:ev=force:gve=force:ind=both:indc=goal_plus:nwc=3.0:s2a=on:sd=10:sp=const_frequency:ss=included:st=5.0:tar=off:thi=neg_eq:to=lpo:uwa=one_side_constant:i=2799:si=on:rtra=on_0"); + quick.push("ott+10_1:1_afr=on:asg=cautious:avsq=on:avsqc=1:drc=off:ev=force:ind=int:indc=goal:indu=off:intindstterm=no_skolems:nm=16:spb=non_intro:to=lpo:uwa=all:i=691:si=on:rtra=on_0"); + // Improves by expected 5.072521477354672 probs costing 115830 Mi + // Overall score 917.9591447527905 probs on average / budget 593806 Mi +} + // ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- // ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- // ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- diff --git a/CASC/Schedules.hpp b/CASC/Schedules.hpp index 94c917c14..407d69c91 100644 --- a/CASC/Schedules.hpp +++ b/CASC/Schedules.hpp @@ -45,6 +45,7 @@ class Schedules static void getInductionSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback); static void getIntegerInductionSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback); + static void getIntindOeisSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback); static void getStructInductionSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback); static void getStructInductionTipSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback); diff --git a/Shell/Options.cpp b/Shell/Options.cpp index 9d14e2097..eb98445ba 100644 --- a/Shell/Options.cpp +++ b/Shell/Options.cpp @@ -158,6 +158,7 @@ void Options::init() "file", "induction", "integer_induction", + "intind_oeis", "ltb_default_2017", "ltb_hh4_2017", "ltb_hll_2017", diff --git a/Shell/Options.hpp b/Shell/Options.hpp index 4f98fe8b2..6cc174990 100644 --- a/Shell/Options.hpp +++ b/Shell/Options.hpp @@ -419,6 +419,7 @@ class Options FILE, INDUCTION, INTEGER_INDUCTION, + INTIND_OEIS, LTB_DEFAULT_2017, LTB_HH4_2017, LTB_HLL_2017, From ce75c337cd468a5f0e76b9fb6decd4d1f413811a Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Thu, 28 Dec 2023 14:05:40 +0000 Subject: [PATCH 38/56] don't actually warn for sil, it's useful to set it along with sample_strategy, not knowing what will come out of it --- Shell/Options.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shell/Options.cpp b/Shell/Options.cpp index eb98445ba..4c51b72ea 100644 --- a/Shell/Options.cpp +++ b/Shell/Options.cpp @@ -95,7 +95,7 @@ void Options::init() _simulatedInstructionLimit = UnsignedOptionValue("simulated_instruction_limit","sil",0); _simulatedInstructionLimit.description= "Instruction limit (in millions) of executed instructions for the purpose of reachability estimations of the LRS saturation algorithm (if 0, the actual instruction limit is used)"; - _simulatedInstructionLimit.onlyUsefulWith(_saturationAlgorithm.is(equal(SaturationAlgorithm::LRS))); + // _simulatedInstructionLimit.onlyUsefulWith(Or(_saturationAlgorithm.is(equal(SaturationAlgorithm::LRS)),_splittingAvatimer.is(notEqual(1.0f)))); _lookup.insert(&_simulatedInstructionLimit); _simulatedInstructionLimit.tag(OptionTag::LRS); From f6bd4ea734a8991a2ab44b9bf8e42de2a29dc279 Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Mon, 15 Jan 2024 20:30:44 +0100 Subject: [PATCH 39/56] a new tip schedule --- CASC/Schedules.cpp | 342 ++++++++++++++++++++++----------------------- 1 file changed, 171 insertions(+), 171 deletions(-) diff --git a/CASC/Schedules.cpp b/CASC/Schedules.cpp index a8456fd39..eef14c019 100644 --- a/CASC/Schedules.cpp +++ b/CASC/Schedules.cpp @@ -3540,189 +3540,189 @@ void Schedules::getStructInductionSchedule(const Shell::Property& property, Sche } void Schedules::getStructInductionTipSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback) { - // Ran on tipExport.txt + // Ran on tipvampire231219.txt // Sub-schedule for 2000Mi strat cap / 2000Mi overall limit - quick.push("dis+10_1:1_av=off:fnrw=on:ind=struct:newcnf=on:nwc=5.0:i=52:si=on:rtra=on_0"); - quick.push("lrs+1002_1:6_canc=cautious:cond=on:ind=both:indao=on:intindint=infinite:intindsteq=not_in_both:newcnf=on:nm=16:rp=on:s2pl=on:sas=z3:slsq=on:slsqc=4:slsql=off:slsqr=33,13:sp=const_min:urr=on:i=212:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=encompass:erd=off:ind=struct:indmd=1:sos=on:ss=axioms:urr=on:i=21:si=on:rtra=on_0"); - quick.push("dis+10_1:1_ind=struct:inst=on:newcnf=on:s2a=on:sp=const_max:tac=rule:i=49:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:fsr=off:ind=struct:newcnf=on:sik=all:taea=off:to=lpo:i=119:si=on:rtra=on_0"); - quick.push("ott+21_1:1_ep=RST:fsd=on:gve=cautious:ind=both:indn=off:newcnf=on:nui=on:nwc=10.0:sik=recursion:spb=intro:urr=on:i=24:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_drc=off:er=filter:fsr=off:ind=both:indao=on:newcnf=on:nm=32:rp=on:sac=on:sik=recursion:sp=unary_frequency:tac=rule:taea=off:to=lpo:uace=off:i=7:si=on:rtra=on_0"); - quick.push("lrs+2_1:1_erd=off:gve=cautious:ind=both:newcnf=on:nui=on:updr=off:i=4:si=on:rtra=on_0"); - quick.push("lrs+10_1:40_bsr=unit_only:drc=off:flr=on:ind=both:newcnf=on:nm=75:nui=on:sik=recursion:sp=const_min:updr=off:i=65:si=on:rtra=on_0"); - quick.push("ott+1002_1:4_drc=off:fde=unused:fsd=on:fsdmm=3:gtg=exists_all:gtgl=3:ind=struct:indgen=on:indoct=on:newcnf=on:norm_ineq=on:sp=occurrence:taea=off:to=lpo:i=53:si=on:rtra=on_0"); - quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=193:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=off:fnrw=on:gtg=all:gtgl=3:ind=both:indao=on:kws=precedence:newcnf=on:nwc=6.0:sac=on:sp=reverse_arity:uwa=interpreted_only:i=12:si=on:rtra=on_0"); - quick.push("lrs+2_1:4_drc=off:gtg=position:gve=cautious:ile=on:ind=struct:indao=on:indc=goal:indmd=6:newcnf=on:nwc=5.0:s2a=on:tac=axiom:to=lpo:i=5:si=on:rtra=on_0"); - quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=39:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_bd=off:gtg=exists_all:ind=both:indmd=1:indstrhyp=on:ins=3:newcnf=on:nui=on:spb=goal_then_units:to=lpo:i=32:si=on:rtra=on_0"); - quick.push("dis+1002_1:1_tac=light:taea=off:i=32:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:ind=both:indoct=on:indstrhyp=on:sos=on:sp=const_frequency:ss=axioms:to=lpo:i=15:si=on:rtra=on_0"); - quick.push("lrs+21_1:8_av=off:awrs=converge:awrsf=10:drc=off:fnrw=on:ind=struct:newcnf=on:slsq=on:slsqc=5:sp=unary_frequency:uwa=all:i=10:si=on:rtra=on_0"); - quick.push("dis+10_1:1_av=off:bsd=on:fd=off:fnrw=on:gtg=all:gtgl=2:ind=both:indao=on:indc=goal:indgen=on:newcnf=on:plsq=on:plsqr=32,1:ss=axioms:i=4:si=on:rtra=on_0"); - quick.push("lrs+1010_8:1_ind=both:indmd=2:kws=inv_precedence:newcnf=on:sik=recursion:sp=const_min:i=31:si=on:rtra=on_0"); - quick.push("lrs+21_1:128_av=off:drc=encompass:gtg=all:ind=struct:indao=on:ins=1:newcnf=on:spb=units:uwa=one_side_interpreted:i=13:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=75:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_aac=none:afp=10000:fnrw=on:ind=both:indc=goal_plus:indmd=1:indn=off:newcnf=on:i=27:si=on:rtra=on_0"); quick.push("lrs+10_1:1024_fnrw=on:gtg=all:gtgl=3:ind=struct:indao=on:indc=goal:indoct=on:newcnf=on:sac=on:sp=unary_first:i=43:si=on:rtra=on_0"); - quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=20:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:nwc=10.0:sac=on:sik=recursion:to=lpo:i=39:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=off:fs=off:fsr=off:ind=struct:indstrhyp=on:nwc=5.0:s2a=on:sos=on:tar=off:i=6:si=on:rtra=on_0"); - quick.push("lrs+2_1:1_aac=none:gtg=exists_all:gtgl=3:ind=both:newcnf=on:nui=on:plsq=on:plsqr=4,1:rp=on:sik=recursion:spb=goal_then_units:i=16:si=on:rtra=on_0"); - quick.push("lrs+21_1:128_gtg=exists_top:gtgl=2:ind=both:indc=goal_plus:indmd=1:newcnf=on:nm=20:nui=on:sik=recursion:sp=unary_frequency:spb=non_intro:i=38:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=encompass:gtg=exists_all:ind=struct:indmd=3:indstrhyp=on:s2a=on:i=69:si=on:rtra=on_0"); + quick.push("dis+10_180:31_canc=force:gtg=exists_all:gtgl=4:newcnf=on:rp=on:s2a=on:s2agt=10:sac=on:sas=z3:sos=all:uhcvi=on:i=235:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:ind=struct:newcnf=on:nicw=on:sik=recursion:sil=100000:sp=const_frequency:to=lpo:i=58:si=on:rtra=on_0"); + quick.push("lrs+21_1:128_gtg=exists_top:gtgl=2:ind=both:indc=goal_plus:indmd=1:newcnf=on:nm=20:nui=on:sik=recursion:sp=unary_frequency:spb=non_intro:i=35:si=on:rtra=on_0"); + quick.push("lrs+10_1:40_bsr=unit_only:drc=off:flr=on:ind=both:newcnf=on:nm=75:nui=on:sik=recursion:sp=const_min:updr=off:i=28:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_aac=none:gtg=exists_all:gtgl=3:ind=both:newcnf=on:nui=on:plsq=on:plsqr=4,1:rp=on:sik=recursion:spb=goal_then_units:i=22:si=on:rtra=on_0"); + quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=41:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_drc=off:er=filter:fsr=off:ind=both:indao=on:newcnf=on:nm=32:rp=on:sac=on:sik=recursion:sp=unary_frequency:tac=rule:taea=off:to=lpo:uace=off:i=7:si=on:rtra=on_0"); + quick.push("dis+1002_1:1_tac=light:taea=off:i=65:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=74:si=on:rtra=on_0"); + quick.push("lrs+1010_1:128_add=large:bs=on:bsd=on:etr=on:ev=force:fnrw=on:ind=struct:indc=goal_plus:indmd=2:indoct=on:lecc=2.0:newcnf=on:nui=on:sp=unary_first:i=114:si=on:rtra=on_0"); + quick.push("ott+21_1:10_bsr=on:canc=force:drc=encompass:ev=cautious:ile=on:ind=struct:indao=on:indoct=on:newcnf=on:spb=non_intro:tac=rule:taea=off:to=lpo:i=2:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:nwc=10.0:sac=on:sik=recursion:to=lpo:i=67:si=on:rtra=on_0"); + quick.push("lrs+10_1:128_br=off:fnrw=on:gtg=position:ind=struct:indmd=1:newcnf=on:nui=on:sil=100000:slsq=on:i=37:si=on:rtra=on_0"); + quick.push("lrs+1011_1:1_fnrw=on:ind=both:indmd=2:indoct=on:kws=frequency:newcnf=on:nui=on:sik=recursion:taea=off:i=13:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_drc=encompass:ind=struct:indao=on:newcnf=on:plsq=on:plsqr=32,1:sp=frequency:to=lpo:i=7:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_aac=none:afp=10000:fnrw=on:ind=both:indc=goal_plus:indmd=1:indn=off:newcnf=on:i=78:si=on:rtra=on_0"); + quick.push("lrs+1002_1:3_av=off:bsr=unit_only:drc=off:gtg=exists_top:gtgl=5:ind=struct:nwc=10.0:sil=100000:sp=const_min:spb=intro:tac=light:taea=off:to=lpo:urr=ec_only:i=59:si=on:rtra=on_0"); + quick.push("lrs+10_1633:262144_canc=cautious:drc=off:ev=force:fde=none:ind=both:indoct=on:newcnf=on:sik=recursion:sil=100000:sp=const_min:spb=goal_then_units:to=lpo:updr=off:i=55:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_bd=off:gtg=exists_all:ind=both:indmd=1:indstrhyp=on:ins=3:newcnf=on:nui=on:spb=goal_then_units:to=lpo:i=19:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:fs=off:fsr=off:ind=struct:indstrhyp=on:nwc=5.0:s2a=on:sos=on:tar=off:i=80:si=on:rtra=on_0"); + quick.push("lrs-1003_1:4_av=off:drc=off:ind=struct:indu=off:kws=precedence:newcnf=on:rawr=on:s2a=on:s2agt=16:sil=100000:slsq=on:spb=units:urr=on:uwa=ground:i=31:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_cond=on:er=tagged:fnrw=on:gve=force:irw=on:kws=inv_precedence:newcnf=on:nm=10:plsq=on:plsqc=2:plsqr=1,32:rp=on:sil=100000:sos=theory:spb=units:ss=axioms:tac=axiom:i=72:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=encompass:gtg=exists_all:ind=struct:indmd=3:indstrhyp=on:s2a=on:i=72:si=on:rtra=on_0"); + quick.push("dis+1010_3:1_aac=none:flr=on:ind=struct:ins=2:newcnf=on:nwc=2.0:sac=on:sil=100000:i=82:si=on:rtra=on_0"); + quick.push("lrs+2_1:4_drc=off:gtg=position:gve=cautious:ile=on:ind=struct:indao=on:indc=goal:indmd=6:newcnf=on:nwc=5.0:s2a=on:tac=axiom:to=lpo:i=44:si=on:rtra=on_0"); + quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=3:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:fnrw=on:gtg=all:gtgl=3:ind=both:indao=on:kws=precedence:newcnf=on:nwc=6.0:sac=on:sp=reverse_arity:uwa=interpreted_only:i=34:si=on:rtra=on_0"); + quick.push("ott+10_1:1_add=large:flr=on:ind=both:newcnf=on:nui=on:nwc=5.0:sik=all:sil=100000:spb=non_intro:i=37:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_av=off:bd=off:gtg=exists_top:ind=struct:indao=on:kws=precedence:newcnf=on:nwc=10.0:sik=recursion:sil=100000:sp=frequency:taea=off:uwa=all:i=16:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:fsr=off:ind=struct:newcnf=on:sik=all:taea=off:to=lpo:i=201:si=on:rtra=on_0"); + quick.push("ott+21_1:1_ep=RST:fsd=on:gve=cautious:ind=both:indn=off:newcnf=on:nui=on:nwc=10.0:sik=recursion:spb=intro:urr=on:i=31:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:ind=struct:indstrhyp=on:newcnf=on:sos=on:sp=reverse_arity:to=lpo:i=28:si=on:rtra=on_0"); quick.push("lrs+1010_1:1_gtg=exists_all:ind=both:indmd=1:newcnf=on:nui=on:taea=off:updr=off:i=18:si=on:rtra=on_0"); - quick.push("lrs+3_3:2_av=off:drc=off:fsr=off:ind=struct:indao=on:newcnf=on:sp=unary_frequency:spb=units:taea=off:tar=off:uwa=one_side_constant:i=14:si=on:rtra=on_0"); - quick.push("ott+1002_1:64_drc=off:fsr=off:ind=both:indu=off:kws=arity_squared:newcnf=on:nwc=10.0:tar=off:uwa=one_side_constant:i=37:si=on:rtra=on_0"); - quick.push("lrs+2_1:1_drc=encompass:ind=struct:indao=on:newcnf=on:plsq=on:plsqr=32,1:sp=frequency:to=lpo:i=37:si=on:rtra=on_0"); - quick.push("lrs+1010_1:5_fsd=on:fsdmm=3:gve=force:newcnf=on:nm=32:norm_ineq=on:rp=on:sas=z3:spb=intro:tar=off:i=251:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:ind=struct:indstrhyp=on:newcnf=on:sos=on:sp=reverse_arity:to=lpo:i=97:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_fnrw=on:ind=both:indmd=2:indoct=on:kws=frequency:newcnf=on:nui=on:sik=recursion:taea=off:i=17:si=on:rtra=on_0"); - quick.push("lrs+10_1:16_drc=off:fsr=off:ind=struct:indmd=2:indstrhyp=on:nwc=10.0:sos=on:i=73:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_ind=struct:indc=goal_plus:indmd=1:newcnf=on:nui=on:s2a=on:spb=intro:i=111:si=on:rtra=on_0"); - quick.push("lrs+10_1:8_fnrw=on:ind=struct:indmd=1:newcnf=on:nwc=5.0:sik=recursion:i=55:si=on:rtra=on_0"); - // Improves by expected 433.81225414254936 probs costing 1995 Mi + quick.push("lrs+10_1:1_drc=encompass:erd=off:ind=struct:indmd=1:sos=on:ss=axioms:urr=on:i=21:si=on:rtra=on_0"); + quick.push("lrs+21_1:8_av=off:awrs=converge:awrsf=10:drc=off:fnrw=on:ind=struct:newcnf=on:slsq=on:slsqc=5:sp=unary_frequency:uwa=all:i=10:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=37:si=on:rtra=on_0"); + quick.push("ott+10_1:1_ind=both:newcnf=on:nui=on:plsq=on:sik=recursion:sp=unary_frequency:uwa=interpreted_only:i=2:si=on:rtra=on_0"); + quick.push("dis+10_1:1_av=off:fnrw=on:ind=struct:newcnf=on:nwc=5.0:i=65:si=on:rtra=on_0"); + quick.push("lrs+21_1:128_av=off:drc=encompass:gtg=all:ind=struct:indao=on:ins=1:newcnf=on:spb=units:uwa=one_side_interpreted:i=12:si=on:rtra=on_0"); + quick.push("lrs+1010_8:1_ind=both:indmd=2:kws=inv_precedence:newcnf=on:sik=recursion:sp=const_min:i=38:si=on:rtra=on_0"); + quick.push("dis+10_1:64_ind=both:indmd=2:indoct=on:newcnf=on:sac=on:sik=recursion:sil=100000:sp=frequency:taea=off:to=lpo:i=13:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_erd=off:gve=cautious:ind=both:newcnf=on:nui=on:updr=off:i=3:si=on:rtra=on_0"); + quick.push("lrs+10_1:4_drc=encompass:erd=off:ind=both:sil=100000:taea=off:urr=on:i=34:si=on:rtra=on_0"); + // Improves by expected 440.31860246135017 probs costing 1999 Mi // Sub-schedule for 4000Mi strat cap / 4000Mi overall limit - quick.push("lrs+1002_1:6_canc=cautious:cond=on:ind=both:indao=on:intindint=infinite:intindsteq=not_in_both:newcnf=on:nm=16:rp=on:s2pl=on:sas=z3:slsq=on:slsqc=4:slsql=off:slsqr=33,13:sp=const_min:urr=on:i=163:si=on:rtra=on_0"); - quick.push("dis+10_180:31_canc=force:gtg=exists_all:gtgl=4:newcnf=on:rp=on:s2a=on:s2agt=10:sac=on:sas=z3:sos=all:uhcvi=on:i=541:si=on:rtra=on_0"); - quick.push("dis-1002_16:1_drc=off:ind=struct:sac=on:sp=const_frequency:taea=off:to=lpo:i=95:si=on:rtra=on_0"); - quick.push("ott+10_1:1_avsq=on:avsql=on:bd=off:gtg=position:ind=both:indstrhyp=on:kws=precedence:newcnf=on:nwc=10.0:sac=on:sgt=30:sik=all:sp=frequency:ss=axioms:taea=off:urr=on:i=173:si=on:rtra=on_0"); - quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=636:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=encompass:gtg=exists_sym:ind=struct:newcnf=on:sik=recursion:i=63:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_bd=off:gtg=exists_all:ind=both:indmd=1:indstrhyp=on:ins=3:newcnf=on:nui=on:spb=goal_then_units:to=lpo:i=105:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:ind=both:indoct=on:indstrhyp=on:sos=on:sp=const_frequency:ss=axioms:to=lpo:i=54:si=on:rtra=on_0"); - quick.push("lrs+1010_1:20_cond=on:ev=force:fd=off:gtg=all:gtgl=2:gve=force:ind=both:indmd=1:newcnf=on:rp=on:sas=z3:sos=on:sp=const_min:spb=non_intro:tgt=full:i=173:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:ind=struct:newcnf=on:nicw=on:sik=recursion:sil=100000:sp=const_frequency:to=lpo:i=541:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_aac=none:gtg=exists_all:gtgl=3:ind=both:newcnf=on:nui=on:plsq=on:plsqr=4,1:rp=on:sik=recursion:spb=goal_then_units:i=17:si=on:rtra=on_0"); + quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=271:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_avsq=on:avsql=on:drc=off:ind=struct:indmd=20:kws=precedence:newcnf=on:rp=on:sas=z3:sp=const_max:i=282:si=on:rtra=on_0"); + quick.push("dis+10_1:1_bs=unit_only:fde=unused:fnrw=on:ind=int:indn=off:ins=1:intindstcomp=always:kws=arity:newcnf=on:rp=on:sp=frequency:tac=rule:taea=off:tgt=full:urr=on:i=28:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_abs=on:ev=cautious:gtg=exists_top:ind=struct:newcnf=on:nui=on:s2a=on:sac=on:sas=z3:sik=recursion:i=203:si=on:rtra=on_0"); + quick.push("ott+10_1:1_ind=struct:indstrhyp=on:kws=precedence:s2a=on:s2agt=16:sac=on:sos=all:sp=reverse_arity:spb=intro:i=97:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=311:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_bd=off:gtg=exists_all:ind=both:indmd=1:indstrhyp=on:ins=3:newcnf=on:nui=on:spb=goal_then_units:to=lpo:i=169:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:fs=off:fsr=off:ind=struct:indstrhyp=on:nwc=5.0:s2a=on:sos=on:tar=off:i=133:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_cond=on:er=tagged:fnrw=on:gve=force:irw=on:kws=inv_precedence:newcnf=on:nm=10:plsq=on:plsqc=2:plsqr=1,32:rp=on:sil=100000:sos=theory:spb=units:ss=axioms:tac=axiom:i=72:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_abs=on:fsr=off:gs=on:gtg=position:newcnf=on:rp=on:sac=on:sas=z3:sil=100000:slsq=on:sos=on:sp=unary_first:uace=off:urr=on:i=286:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_ind=struct:indc=goal_plus:indmd=1:newcnf=on:nui=on:s2a=on:spb=intro:i=134:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:ind=struct:indstrhyp=on:newcnf=on:sos=on:sp=reverse_arity:to=lpo:i=202:si=on:rtra=on_0"); + quick.push("ott+21_1:1_asg=cautious:av=off:drc=off:fnrw=on:ins=1:newcnf=on:norm_ineq=on:rp=on:sp=const_min:ss=axioms:taea=off:uwa=interpreted_only:i=96:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_add=large:drc=encompass:gtg=exists_sym:ind=both:indmd=2:newcnf=on:sik=recursion:sil=100000:uwa=one_side_constant:i=66:si=on:rtra=on_0"); + quick.push("ott+10_1:1_avsq=on:avsql=on:bd=off:gtg=position:ind=both:indstrhyp=on:kws=precedence:newcnf=on:nwc=10.0:sac=on:sgt=30:sik=all:sp=frequency:ss=axioms:taea=off:urr=on:i=149:si=on:rtra=on_0"); quick.push("lrs+21_1:8_av=off:awrs=converge:awrsf=10:drc=off:fnrw=on:ind=struct:newcnf=on:slsq=on:slsqc=5:sp=unary_frequency:uwa=all:i=10:si=on:rtra=on_0"); - quick.push("dis+10_3:1_drc=encompass:gtg=exists_top:gve=force:kws=precedence:s2a=on:s2at=3.0:sos=on:spb=goal:tac=light:taea=off:i=225:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_aac=none:afp=10000:fnrw=on:ind=both:indc=goal_plus:indmd=1:indn=off:newcnf=on:i=77:si=on:rtra=on_0"); - quick.push("dis+1010_1:28_acc=model:fnrw=on:gtg=exists_sym:newcnf=on:nm=10:plsq=on:rawr=on:rp=on:sp=const_max:taea=off:thi=strong:uace=off:uwa=interpreted_only:i=170:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:nwc=10.0:sac=on:sik=recursion:to=lpo:i=260:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=off:fs=off:fsr=off:ind=struct:indstrhyp=on:nwc=5.0:s2a=on:sos=on:tar=off:i=164:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_anc=all_dependent:fde=none:fnrw=on:gtg=exists_top:kws=inv_arity:newcnf=on:rp=on:i=92:si=on:rtra=on_0"); - quick.push("lrs+2_1:1_aac=none:gtg=exists_all:gtgl=3:ind=both:newcnf=on:nui=on:plsq=on:plsqr=4,1:rp=on:sik=recursion:spb=goal_then_units:i=16:si=on:rtra=on_0"); - quick.push("lrs+21_1:128_gtg=exists_top:gtgl=2:ind=both:indc=goal_plus:indmd=1:newcnf=on:nm=20:nui=on:sik=recursion:sp=unary_frequency:spb=non_intro:i=101:si=on:rtra=on_0"); - quick.push("ott+1002_1:64_drc=off:fsr=off:ind=both:indu=off:kws=arity_squared:newcnf=on:nwc=10.0:tar=off:uwa=one_side_constant:i=34:si=on:rtra=on_0"); - quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=231:si=on:rtra=on_0"); - quick.push("lrs+10_1:32_drc=encompass:ind=struct:newcnf=on:sac=on:sik=recursion:sp=const_min:taea=off:tgt=full:to=lpo:i=273:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_abs=on:ev=cautious:gtg=exists_top:ind=struct:newcnf=on:nui=on:s2a=on:sac=on:sas=z3:sik=recursion:i=185:si=on:rtra=on_0"); - quick.push("ott+10_1:1_atotf=0.1:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:i=176:si=on:rtra=on_0"); - // Improves by expected 40.020848909468754 probs costing 3994 Mi + quick.push("dis-1011_1:1_erd=off:gtg=exists_sym:gve=cautious:ind=both:indmd=3:indstrhyp=on:kws=inv_frequency:norm_ineq=on:sil=100000:sp=occurrence:spb=intro:ss=axioms:i=97:si=on:rtra=on_0"); + quick.push("lrs+1011_16:1_drc=off:ev=cautious:fd=preordered:ind=struct:indstrhyp=on:sp=reverse_arity:i=176:si=on:rtra=on_0"); + quick.push("ott+10_1:1_atotf=0.1:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:i=177:si=on:rtra=on_0"); + quick.push("dis+1002_1:1_bd=off:ep=RSTC:gtg=exists_all:newcnf=on:nm=10:norm_ineq=on:rp=on:s2agt=32:sac=on:sas=z3:slsq=on:slsqr=151023,1048576:sp=const_max:tac=light:i=168:si=on:rtra=on_0"); + quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=238:si=on:rtra=on_0"); + quick.push("dis+10_1:64_ind=both:indmd=2:indoct=on:newcnf=on:sac=on:sik=recursion:sil=100000:sp=frequency:taea=off:to=lpo:i=89:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_erd=off:gve=cautious:ind=both:newcnf=on:nui=on:updr=off:i=3:si=on:rtra=on_0"); + // Improves by expected 42.05751854957042 probs costing 3990 Mi // Sub-schedule for 4000Mi strat cap / 4000Mi overall limit - quick.push("lrs+1002_1:6_canc=cautious:cond=on:ind=both:indao=on:intindint=infinite:intindsteq=not_in_both:newcnf=on:nm=16:rp=on:s2pl=on:sas=z3:slsq=on:slsqc=4:slsql=off:slsqr=33,13:sp=const_min:urr=on:i=246:si=on:rtra=on_0"); - quick.push("lrs+2_4:1_anc=none:fd=preordered:fde=unused:gve=cautious:ind=both:lwlo=on:newcnf=on:nui=on:sac=on:sik=recursion:sims=off:sp=const_max:spb=non_intro:ss=included:i=261:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:fsr=off:ind=struct:newcnf=on:sik=all:taea=off:to=lpo:i=151:si=on:rtra=on_0"); - quick.push("ott+10_1:1_avsq=on:avsql=on:bd=off:gtg=position:ind=both:indstrhyp=on:kws=precedence:newcnf=on:nwc=10.0:sac=on:sgt=30:sik=all:sp=frequency:ss=axioms:taea=off:urr=on:i=437:si=on:rtra=on_0"); - quick.push("ott+1002_1:4_drc=off:fde=unused:fsd=on:fsdmm=3:gtg=exists_all:gtgl=3:ind=struct:indgen=on:indoct=on:newcnf=on:norm_ineq=on:sp=occurrence:taea=off:to=lpo:i=56:si=on:rtra=on_0"); - quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=667:si=on:rtra=on_0"); - quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=45:si=on:rtra=on_0"); - quick.push("lrs+1010_1:20_cond=on:ev=force:fd=off:gtg=all:gtgl=2:gve=force:ind=both:indmd=1:newcnf=on:rp=on:sas=z3:sos=on:sp=const_min:spb=non_intro:tgt=full:i=173:si=on:rtra=on_0"); - quick.push("lrs+1011_16:1_drc=off:ev=cautious:fd=preordered:ind=struct:indstrhyp=on:sp=reverse_arity:i=89:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=119:si=on:rtra=on_0"); - quick.push("dis+1010_1:28_acc=model:fnrw=on:gtg=exists_sym:newcnf=on:nm=10:plsq=on:rawr=on:rp=on:sp=const_max:taea=off:thi=strong:uace=off:uwa=interpreted_only:i=235:si=on:rtra=on_0"); - quick.push("lrs+10_1:1024_fnrw=on:gtg=all:gtgl=3:ind=struct:indao=on:indc=goal:indoct=on:newcnf=on:sac=on:sp=unary_first:i=156:si=on:rtra=on_0"); - quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=249:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_anc=all_dependent:fde=none:fnrw=on:gtg=exists_top:kws=inv_arity:newcnf=on:rp=on:i=92:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_abs=on:anc=all:ev=cautious:kws=inv_frequency:newcnf=on:rp=on:sac=on:sas=z3:spb=goal_then_units:tgt=ground:uwa=interpreted_only:i=369:si=on:rtra=on_0"); - quick.push("lrs+1010_1:5_fsd=on:fsdmm=3:gve=force:newcnf=on:nm=32:norm_ineq=on:rp=on:sas=z3:spb=intro:tar=off:i=307:si=on:rtra=on_0"); - quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=212:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_ind=struct:indc=goal_plus:indmd=1:newcnf=on:nui=on:s2a=on:spb=intro:i=132:si=on:rtra=on_0"); - // Improves by expected 11.258067294906173 probs costing 3978 Mi + quick.push("dis+10_180:31_canc=force:gtg=exists_all:gtgl=4:newcnf=on:rp=on:s2a=on:s2agt=10:sac=on:sas=z3:sos=all:uhcvi=on:i=235:si=on:rtra=on_0"); + quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=71:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=154:si=on:rtra=on_0"); + quick.push("lrs+1010_1:128_add=large:bs=on:bsd=on:etr=on:ev=force:fnrw=on:ind=struct:indc=goal_plus:indmd=2:indoct=on:lecc=2.0:newcnf=on:nui=on:sp=unary_first:i=70:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_abs=on:fde=none:gs=on:gtg=exists_all:gtgl=4:kws=inv_frequency:newcnf=on:rp=on:sas=z3:sd=1:sgt=30:sil=100000:ss=axioms:tac=rule:i=550:si=on:rtra=on_0"); + quick.push("dis+10_1:1_bs=unit_only:fde=unused:fnrw=on:ind=int:indn=off:ins=1:intindstcomp=always:kws=arity:newcnf=on:rp=on:sp=frequency:tac=rule:taea=off:tgt=full:urr=on:i=28:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_abs=on:anc=all:ev=cautious:kws=inv_frequency:newcnf=on:rp=on:sac=on:sas=z3:spb=goal_then_units:tgt=ground:uwa=interpreted_only:i=485:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_aac=none:afp=10000:fnrw=on:ind=both:indc=goal_plus:indmd=1:indn=off:newcnf=on:i=310:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=233:si=on:rtra=on_0"); + quick.push("lrs-10_1:5_flr=on:fnrw=on:fsr=off:gs=on:ind=struct:indao=on:newcnf=on:plsq=on:plsqc=2:plsqr=2,7:rp=on:sik=recursion:sil=100000:tar=off:uwa=one_side_constant:i=443:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_abs=on:fsr=off:gs=on:gtg=position:newcnf=on:rp=on:sac=on:sas=z3:sil=100000:slsq=on:sos=on:sp=unary_first:uace=off:urr=on:i=287:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_ind=struct:indc=goal_plus:indmd=1:newcnf=on:nui=on:s2a=on:spb=intro:i=134:si=on:rtra=on_0"); + quick.push("ott+10_1:1_add=large:flr=on:ind=both:newcnf=on:nui=on:nwc=5.0:sik=all:sil=100000:spb=non_intro:i=195:si=on:rtra=on_0"); + quick.push("ott+21_1:1_asg=cautious:av=off:drc=off:fnrw=on:ins=1:newcnf=on:norm_ineq=on:rp=on:sp=const_min:ss=axioms:taea=off:uwa=interpreted_only:i=96:si=on:rtra=on_0"); + quick.push("dis-1011_1:1_erd=off:gtg=exists_sym:gve=cautious:ind=both:indmd=3:indstrhyp=on:kws=inv_frequency:norm_ineq=on:sil=100000:sp=occurrence:spb=intro:ss=axioms:i=85:si=on:rtra=on_0"); + quick.push("lrs+1010_1:5_fsd=on:fsdmm=3:gve=force:newcnf=on:nm=32:norm_ineq=on:rp=on:sas=z3:spb=intro:tar=off:i=174:si=on:rtra=on_0"); + quick.push("dis+10_1:1024_br=off:fnrw=on:ind=struct:newcnf=on:sac=on:sik=recursion:sil=100000:sp=occurrence:spb=non_intro:tac=axiom:taea=off:uwa=one_side_interpreted:i=310:si=on:rtra=on_0"); + quick.push("ott-1010_1:1_bce=on:canc=force:fnrw=on:kws=inv_arity_squared:lcm=reverse:newcnf=on:nm=16:plsq=on:plsqc=1:plsqr=22,45:rawr=on:rp=on:sil=100000:sp=occurrence:taea=off:thi=strong:i=137:si=on:rtra=on_0"); + // Improves by expected 15.633859842662645 probs costing 3979 Mi // Sub-schedule for 8000Mi strat cap / 8000Mi overall limit - quick.push("lrs+1002_1:6_canc=cautious:cond=on:ind=both:indao=on:intindint=infinite:intindsteq=not_in_both:newcnf=on:nm=16:rp=on:s2pl=on:sas=z3:slsq=on:slsqc=4:slsql=off:slsqr=33,13:sp=const_min:urr=on:i=246:si=on:rtra=on_0"); - quick.push("lrs+1002_1:3_awrs=decay:fnrw=on:gtg=exists_sym:newcnf=on:nm=32:rp=on:sp=unary_first:tac=rule:taea=off:tar=off:tgt=full:uhcvi=on:uwa=ground:i=719:si=on:rtra=on_0"); - quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=667:si=on:rtra=on_0"); - quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=636:si=on:rtra=on_0"); - quick.push("dis+10_1:1_avsq=on:avsqr=1,16:drc=off:fd=preordered:ins=1:nm=32:sfv=off:sp=unary_frequency:spb=goal:to=lpo:updr=off:i=1016:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=119:si=on:rtra=on_0"); - quick.push("dis+1010_1:28_acc=model:fnrw=on:gtg=exists_sym:newcnf=on:nm=10:plsq=on:rawr=on:rp=on:sp=const_max:taea=off:thi=strong:uace=off:uwa=interpreted_only:i=162:si=on:rtra=on_0"); - quick.push("lrs+10_1:1024_fnrw=on:gtg=all:gtgl=3:ind=struct:indao=on:indc=goal:indoct=on:newcnf=on:sac=on:sp=unary_first:i=111:si=on:rtra=on_0"); - quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=245:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_abs=on:anc=all:ev=cautious:kws=inv_frequency:newcnf=on:rp=on:sac=on:sas=z3:spb=goal_then_units:tgt=ground:uwa=interpreted_only:i=314:si=on:rtra=on_0"); - quick.push("ott+1002_1:64_drc=off:fsr=off:ind=both:indu=off:kws=arity_squared:newcnf=on:nwc=10.0:tar=off:uwa=one_side_constant:i=117:si=on:rtra=on_0"); - quick.push("lrs+1010_1:5_fsd=on:fsdmm=3:gve=force:newcnf=on:nm=32:norm_ineq=on:rp=on:sas=z3:spb=intro:tar=off:i=1522:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_fnrw=on:ind=both:indmd=2:indoct=on:kws=frequency:newcnf=on:nui=on:sik=recursion:taea=off:i=1211:si=on:rtra=on_0"); - quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=172:si=on:rtra=on_0"); - quick.push("lrs+10_1:32_drc=encompass:ind=struct:newcnf=on:sac=on:sik=recursion:sp=const_min:taea=off:tgt=full:to=lpo:i=273:si=on:rtra=on_0"); - quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=451:si=on:rtra=on_0"); - // Improves by expected 7.558886614090776 probs costing 7965 Mi + quick.push("ott-21_1:3_amm=off:canc=force:ev=cautious:gtg=exists_all:gtgl=2:ind=both:indc=goal:indmd=1:indoct=on:indstrhyp=on:nwc=5.0:plsq=on:plsqr=13907591,524288:pum=on:sp=weighted_frequency:to=lpo:urr=on:i=132:si=on:rtra=on_0"); + quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=242:si=on:rtra=on_0"); + quick.push("ott+21_1:5_drc=off:erd=off:ind=both:indgen=on:indgenss=5:sac=on:slsq=on:taea=off:urr=on:i=391:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=154:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_abs=on:fde=none:gs=on:gtg=exists_all:gtgl=4:kws=inv_frequency:newcnf=on:rp=on:sas=z3:sd=1:sgt=30:sil=100000:ss=axioms:tac=rule:i=805:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:nwc=10.0:sac=on:sik=recursion:to=lpo:i=835:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_abs=on:ev=cautious:gtg=exists_top:ind=struct:newcnf=on:nui=on:s2a=on:sac=on:sas=z3:sik=recursion:i=318:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_canc=cautious:kws=inv_precedence:nm=0:rp=on:sas=z3:spb=units:updr=off:i=514:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=309:si=on:rtra=on_0"); + quick.push("lrs+10_1633:262144_canc=cautious:drc=off:ev=force:fde=none:ind=both:indoct=on:newcnf=on:sik=recursion:sil=100000:sp=const_min:spb=goal_then_units:to=lpo:updr=off:i=56:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:fs=off:fsr=off:ind=struct:indstrhyp=on:nwc=5.0:s2a=on:sos=on:tar=off:i=133:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_abs=on:fsr=off:gs=on:gtg=position:newcnf=on:rp=on:sac=on:sas=z3:sil=100000:slsq=on:sos=on:sp=unary_first:uace=off:urr=on:i=287:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_ind=struct:indc=goal_plus:indmd=1:newcnf=on:nui=on:s2a=on:spb=intro:i=141:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:gve=cautious:ind=both:kws=inv_frequency:newcnf=on:sik=recursion:sil=100000:sos=on:sp=weighted_frequency:ss=axioms:st=6.0:i=711:si=on:rtra=on_0"); + quick.push("ott+10_5:1_drc=off:ind=struct:indstrhyp=on:kws=precedence:taea=off:uwa=all:i=217:si=on:rtra=on_0"); + quick.push("ott+21_1:1_asg=cautious:av=off:drc=off:fnrw=on:ins=1:newcnf=on:norm_ineq=on:rp=on:sp=const_min:ss=axioms:taea=off:uwa=interpreted_only:i=96:si=on:rtra=on_0"); + quick.push("ott+1002_16:1_drc=off:fd=preordered:ind=both:indn=off:sil=100000:sp=const_max:taea=off:to=lpo:uace=off:i=967:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=51:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_anc=all_dependent:fde=none:fnrw=on:gtg=exists_top:kws=inv_arity:newcnf=on:rp=on:i=112:si=on:rtra=on_0"); + quick.push("dis-1011_1:1_erd=off:gtg=exists_sym:gve=cautious:ind=both:indmd=3:indstrhyp=on:kws=inv_frequency:norm_ineq=on:sil=100000:sp=occurrence:spb=intro:ss=axioms:i=85:si=on:rtra=on_0"); + quick.push("dis+10_1:1024_br=off:fnrw=on:ind=struct:newcnf=on:sac=on:sik=recursion:sil=100000:sp=occurrence:spb=non_intro:tac=axiom:taea=off:uwa=one_side_interpreted:i=310:si=on:rtra=on_0"); + quick.push("dis+1002_1:1_bd=off:ep=RSTC:gtg=exists_all:newcnf=on:nm=10:norm_ineq=on:rp=on:s2agt=32:sac=on:sas=z3:slsq=on:slsqr=151023,1048576:sp=const_max:tac=light:i=149:si=on:rtra=on_0"); + quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=238:si=on:rtra=on_0"); + quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=458:si=on:rtra=on_0"); + quick.push("ott-1010_1:1_bce=on:canc=force:fnrw=on:kws=inv_arity_squared:lcm=reverse:newcnf=on:nm=16:plsq=on:plsqc=1:plsqr=22,45:rawr=on:rp=on:sil=100000:sp=occurrence:taea=off:thi=strong:i=253:si=on:rtra=on_0"); + // Improves by expected 11.640267411239504 probs costing 7939 Mi // Sub-schedule for 20000Mi strat cap / 20000Mi overall limit - quick.push("lrs+1002_1:3_awrs=decay:fnrw=on:gtg=exists_sym:newcnf=on:nm=32:rp=on:sp=unary_first:tac=rule:taea=off:tar=off:tgt=full:uhcvi=on:uwa=ground:i=719:si=on:rtra=on_0"); - quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=2001:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:fsr=off:ind=struct:newcnf=on:sik=all:taea=off:to=lpo:i=2498:si=on:rtra=on_0"); - quick.push("dis-1002_16:1_drc=off:ind=struct:sac=on:sp=const_frequency:taea=off:to=lpo:i=1468:si=on:rtra=on_0"); - quick.push("ott+10_1:1_avsq=on:avsql=on:bd=off:gtg=position:ind=both:indstrhyp=on:kws=precedence:newcnf=on:nwc=10.0:sac=on:sgt=30:sik=all:sp=frequency:ss=axioms:taea=off:urr=on:i=1217:si=on:rtra=on_0"); - quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=667:si=on:rtra=on_0"); - quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=636:si=on:rtra=on_0"); - quick.push("ott+1010_9:4_anc=all_dependent:drc=encompass:fsd=on:ind=struct:indao=on:indstrhyp=on:newcnf=on:pum=on:s2a=on:s2agt=32:sos=all:tac=rule:i=2001:si=on:rtra=on_0"); - quick.push("ott+10_1:128_awrs=converge:awrsf=500:bsr=on:drc=off:er=known:ev=force:fde=none:gsp=on:ind=struct:indgen=on:indgenss=2:indstrhyp=on:irw=on:sac=on:sos=theory:taea=off:tgt=full:to=lpo:uwa=one_side_interpreted:i=2709:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_add=large:afr=on:newcnf=on:pum=on:rp=on:sas=z3:sos=all:sp=unary_frequency:thi=overlap:to=lpo:uhcvi=on:i=818:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=119:si=on:rtra=on_0"); - quick.push("lrs+10_1:1024_fnrw=on:gtg=all:gtgl=3:ind=struct:indao=on:indc=goal:indoct=on:newcnf=on:sac=on:sp=unary_first:i=111:si=on:rtra=on_0"); - quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=1301:si=on:rtra=on_0"); - quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=1258:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:nwc=10.0:sac=on:sik=recursion:to=lpo:i=1054:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_abs=on:anc=all:ev=cautious:kws=inv_frequency:newcnf=on:rp=on:sac=on:sas=z3:spb=goal_then_units:tgt=ground:uwa=interpreted_only:i=380:si=on:rtra=on_0"); - quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=171:si=on:rtra=on_0"); - quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=451:si=on:rtra=on_0"); - // Improves by expected 7.693439460498187 probs costing 19561 Mi + quick.push("ott-21_1:3_amm=off:canc=force:ev=cautious:gtg=exists_all:gtgl=2:ind=both:indc=goal:indmd=1:indoct=on:indstrhyp=on:nwc=5.0:plsq=on:plsqr=13907591,524288:pum=on:sp=weighted_frequency:to=lpo:urr=on:i=132:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:ind=struct:newcnf=on:nicw=on:sik=recursion:sil=100000:sp=const_frequency:to=lpo:i=541:si=on:rtra=on_0"); + quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=242:si=on:rtra=on_0"); + quick.push("dis-1011_1:10_bd=preordered:ind=struct:indmd=1:newcnf=on:nui=on:pum=on:sil=100000:i=461:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=154:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_avsq=on:avsql=on:drc=off:ind=struct:indmd=20:kws=precedence:newcnf=on:rp=on:sas=z3:sp=const_max:i=1624:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_abs=on:fde=none:gs=on:gtg=exists_all:gtgl=4:kws=inv_frequency:newcnf=on:rp=on:sas=z3:sd=1:sgt=30:sil=100000:ss=axioms:tac=rule:i=404:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_abs=on:anc=all:ev=cautious:kws=inv_frequency:newcnf=on:rp=on:sac=on:sas=z3:spb=goal_then_units:tgt=ground:uwa=interpreted_only:i=959:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:nwc=10.0:sac=on:sik=recursion:to=lpo:i=835:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_abs=on:ev=cautious:gtg=exists_top:ind=struct:newcnf=on:nui=on:s2a=on:sac=on:sas=z3:sik=recursion:i=203:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_canc=cautious:kws=inv_precedence:nm=0:rp=on:sas=z3:spb=units:updr=off:i=514:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=2701:si=on:rtra=on_0"); + quick.push("lrs-10_1:5_flr=on:fnrw=on:fsr=off:gs=on:ind=struct:indao=on:newcnf=on:plsq=on:plsqc=2:plsqr=2,7:rp=on:sik=recursion:sil=100000:tar=off:uwa=one_side_constant:i=389:si=on:rtra=on_0"); + quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=1351:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_abs=on:fsr=off:gs=on:gtg=position:newcnf=on:rp=on:sac=on:sas=z3:sil=100000:slsq=on:sos=on:sp=unary_first:uace=off:urr=on:i=311:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_ind=struct:indc=goal_plus:indmd=1:newcnf=on:nui=on:s2a=on:spb=intro:i=141:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:fsr=off:ind=struct:newcnf=on:sik=all:taea=off:to=lpo:i=520:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:gve=cautious:ind=both:kws=inv_frequency:newcnf=on:sik=recursion:sil=100000:sos=on:sp=weighted_frequency:ss=axioms:st=6.0:i=607:si=on:rtra=on_0"); + quick.push("dis+10_1:1_avsq=on:avsqr=1,16:drc=off:fd=preordered:ins=1:nm=32:sfv=off:sp=unary_frequency:spb=goal:to=lpo:updr=off:i=1060:si=on:rtra=on_0"); + quick.push("ott+21_1:1_asg=cautious:av=off:drc=off:fnrw=on:ins=1:newcnf=on:norm_ineq=on:rp=on:sp=const_min:ss=axioms:taea=off:uwa=interpreted_only:i=91:si=on:rtra=on_0"); + quick.push("ott+21_3:1_fnrw=on:gtg=exists_sym:gtgl=4:ins=1:newcnf=on:rp=on:sil=100000:ss=axioms:tgt=full:thi=neg_eq:to=lpo:urr=on:i=291:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:ev=force:ind=struct:indmd=3:indstrhyp=on:newcnf=on:norm_ineq=on:plsq=on:plsqr=161,8:sil=100000:sp=const_min:spb=goal_then_units:thi=all:i=2034:si=on:rtra=on_0"); + quick.push("lrs+10_3:1_asg=cautious:fnrw=on:gtg=all:ind=both:indmd=1:indn=off:lcm=reverse:newcnf=on:nui=on:sac=on:sik=recursion:sil=100000:slsq=on:slsql=off:taea=off:thi=strong:uwa=one_side_constant:i=245:si=on:rtra=on_0"); + quick.push("ott+1002_1:2_bs=unit_only:canc=force:ep=RS:fnrw=on:newcnf=on:norm_ineq=on:rp=on:sil=100000:sp=reverse_arity:taea=off:urr=ec_only:uwa=interpreted_only:i=501:si=on:rtra=on_0"); + quick.push("ott+10_1:1_atotf=0.1:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:i=1468:si=on:rtra=on_0"); + quick.push("lrs+1002_1:3_awrs=decay:fnrw=on:gtg=exists_sym:newcnf=on:nm=32:rp=on:sp=unary_first:tac=rule:taea=off:tar=off:tgt=full:uhcvi=on:uwa=ground:i=811:si=on:rtra=on_0"); + quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=458:si=on:rtra=on_0"); + quick.push("ott-1010_1:1_bce=on:canc=force:fnrw=on:kws=inv_arity_squared:lcm=reverse:newcnf=on:nm=16:plsq=on:plsqc=1:plsqr=22,45:rawr=on:rp=on:sil=100000:sp=occurrence:taea=off:thi=strong:i=253:si=on:rtra=on_0"); + // Improves by expected 8.367897376694664 probs costing 19273 Mi // Sub-schedule for 40000Mi strat cap / 40000Mi overall limit - quick.push("lrs+1002_1:3_awrs=decay:fnrw=on:gtg=exists_sym:newcnf=on:nm=32:rp=on:sp=unary_first:tac=rule:taea=off:tar=off:tgt=full:uhcvi=on:uwa=ground:i=719:si=on:rtra=on_0"); - quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=2001:si=on:rtra=on_0"); - quick.push("dis+10_1:128_ind=both:indmd=1:indstrhyp=on:nui=on:sac=on:i=1868:si=on:rtra=on_0"); - quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=1943:si=on:rtra=on_0"); - quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=636:si=on:rtra=on_0"); - quick.push("ott+1010_9:4_anc=all_dependent:drc=encompass:fsd=on:ind=struct:indao=on:indstrhyp=on:newcnf=on:pum=on:s2a=on:s2agt=32:sos=all:tac=rule:i=2001:si=on:rtra=on_0"); - quick.push("ott+10_1:1024_asg=cautious:awrs=decay:drc=off:fsd=on:ind=struct:newcnf=on:nm=2:sac=on:taea=off:i=12303:si=on:rtra=on_0"); - quick.push("dis+10_1:1_avsq=on:avsqr=1,16:drc=off:fd=preordered:ins=1:nm=32:sfv=off:sp=unary_frequency:spb=goal:to=lpo:updr=off:i=862:si=on:rtra=on_0"); - quick.push("lrs+10_1:1024_fnrw=on:gtg=all:gtgl=3:ind=struct:indao=on:indc=goal:indoct=on:newcnf=on:sac=on:sp=unary_first:i=156:si=on:rtra=on_0"); - quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=1384:si=on:rtra=on_0"); - quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=1258:si=on:rtra=on_0"); - quick.push("lrs+1002_3:4_newcnf=on:nm=30:norm_ineq=on:rp=on:sas=z3:thi=strong:i=2401:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_gtg=exists_all:ind=both:indmd=1:newcnf=on:nui=on:taea=off:updr=off:i=2526:si=on:rtra=on_0"); - quick.push("lrs+1010_1:5_fsd=on:fsdmm=3:gve=force:newcnf=on:nm=32:norm_ineq=on:rp=on:sas=z3:spb=intro:tar=off:i=3563:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_fnrw=on:ind=both:indmd=2:indoct=on:kws=frequency:newcnf=on:nui=on:sik=recursion:taea=off:i=1211:si=on:rtra=on_0"); - quick.push("lrs+10_1:32_drc=encompass:ind=struct:newcnf=on:sac=on:sik=recursion:sp=const_min:taea=off:tgt=full:to=lpo:i=2901:si=on:rtra=on_0"); - quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=451:si=on:rtra=on_0"); - // Improves by expected 3.777549983210466 probs costing 38167 Mi + quick.push("ott+10_1:1_aac=none:bs=unit_only:drc=off:ev=cautious:fsr=off:ind=struct:indao=on:newcnf=on:nicw=on:sik=recursion:ss=axioms:tgt=full:i=17001:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_abs=on:fde=none:gs=on:gtg=exists_all:gtgl=4:kws=inv_frequency:newcnf=on:rp=on:sas=z3:sd=1:sgt=30:sil=100000:ss=axioms:tac=rule:i=805:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_abs=on:ev=cautious:gtg=exists_top:ind=struct:newcnf=on:nui=on:s2a=on:sac=on:sas=z3:sik=recursion:i=284:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=2701:si=on:rtra=on_0"); + quick.push("lrs+1002_1:3_av=off:bsr=unit_only:drc=off:gtg=exists_top:gtgl=5:ind=struct:nwc=10.0:sil=100000:sp=const_min:spb=intro:tac=light:taea=off:to=lpo:urr=ec_only:i=2101:si=on:rtra=on_0"); + quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=1351:si=on:rtra=on_0"); + quick.push("dis+10_1:1_avsq=on:avsqr=1,16:drc=off:fd=preordered:ins=1:nm=32:sfv=off:sp=unary_frequency:spb=goal:to=lpo:updr=off:i=1060:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_gtg=exists_all:ind=both:indmd=1:newcnf=on:nui=on:taea=off:updr=off:i=2973:si=on:rtra=on_0"); + quick.push("ott+2_3:1_avsq=on:avsqr=1,16:bd=off:ep=RS:fnrw=on:lma=on:newcnf=on:nm=32:rp=on:sil=100000:sos=all:sp=unary_first:tgt=full:i=2101:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:s2a=on:sas=z3:sik=recursion:i=4511:si=on:rtra=on_0"); + quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=458:si=on:rtra=on_0"); + quick.push("ott-1010_1:1_bce=on:canc=force:fnrw=on:kws=inv_arity_squared:lcm=reverse:newcnf=on:nm=16:plsq=on:plsqc=1:plsqr=22,45:rawr=on:rp=on:sil=100000:sp=occurrence:taea=off:thi=strong:i=253:si=on:rtra=on_0"); + // Improves by expected 2.739235446503001 probs costing 35587 Mi // Sub-schedule for 120000Mi strat cap / 120000Mi overall limit - quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=2001:si=on:rtra=on_0"); - quick.push("dis+10_1:128_ind=both:indmd=1:indstrhyp=on:nui=on:sac=on:i=44406:si=on:rtra=on_0"); - quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=1943:si=on:rtra=on_0"); - quick.push("ott+21_1:5_drc=off:erd=off:ind=both:indgen=on:indgenss=5:sac=on:slsq=on:taea=off:urr=on:i=5850:si=on:rtra=on_0"); - quick.push("ott+10_1:1024_asg=cautious:awrs=decay:drc=off:fsd=on:ind=struct:newcnf=on:nm=2:sac=on:taea=off:i=22001:si=on:rtra=on_0"); - quick.push("dis+1010_3:2_cond=fast:fnrw=on:ind=both:ins=1:newcnf=on:rp=on:sik=two:sp=weighted_frequency:spb=goal_then_units:taea=off:tar=off:thi=all:uwa=ground:i=6517:si=on:rtra=on_0"); - quick.push("ott+21_1:1_canc=cautious:cond=fast:drc=off:fd=preordered:ind=struct:indao=on:indgen=on:indgenss=1:indoct=on:newcnf=on:sik=recursion:sp=occurrence:taea=off:i=1301:si=on:rtra=on_0"); - quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=1258:si=on:rtra=on_0"); - quick.push("lrs+1011_1:1_fnrw=on:ind=both:indmd=2:indoct=on:kws=frequency:newcnf=on:nui=on:sik=recursion:taea=off:i=1211:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_bd=preordered:gtg=exists_all:gtgl=3:ind=struct:indmd=1:indstrhyp=on:nui=on:sos=on:i=26469:si=on:rtra=on_0"); - // Improves by expected 2.9164619304940467 probs costing 112947 Mi + quick.push("ott+2_1:1_bsr=on:erd=off:gtg=exists_top:gve=cautious:ind=both:indmd=1:indstrhyp=on:newcnf=on:nui=on:i=8101:si=on:rtra=on_0"); + quick.push("ott+10_1:1024_asg=cautious:awrs=decay:drc=off:fsd=on:ind=struct:newcnf=on:nm=2:sac=on:taea=off:i=48260:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=2701:si=on:rtra=on_0"); + quick.push("lrs+1002_1:3_av=off:bsr=unit_only:drc=off:gtg=exists_top:gtgl=5:ind=struct:nwc=10.0:sil=100000:sp=const_min:spb=intro:tac=light:taea=off:to=lpo:urr=ec_only:i=2101:si=on:rtra=on_0"); + quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=18462:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_add=large:afr=on:newcnf=on:pum=on:rp=on:sas=z3:sos=all:sp=unary_frequency:thi=overlap:to=lpo:uhcvi=on:i=21001:si=on:rtra=on_0"); + // Improves by expected 1.2405810942121944 probs costing 100620 Mi // Sub-schedule for 240000Mi strat cap / 240000Mi overall limit - quick.push("lrs+10_1:1_gtg=exists_sym:ind=struct:indstrhyp=on:kws=precedence:sos=on:sp=unary_first:spb=goal:urr=on:i=65118:si=on:rtra=on_0"); - quick.push("dis+10_1:128_ind=both:indmd=1:indstrhyp=on:nui=on:sac=on:i=44406:si=on:rtra=on_0"); - quick.push("ott+1010_9:4_anc=all_dependent:drc=encompass:fsd=on:ind=struct:indao=on:indstrhyp=on:newcnf=on:pum=on:s2a=on:s2agt=32:sos=all:tac=rule:i=7452:si=on:rtra=on_0"); - quick.push("ott+21_1:5_drc=off:erd=off:ind=both:indgen=on:indgenss=5:sac=on:slsq=on:taea=off:urr=on:i=20001:si=on:rtra=on_0"); - quick.push("dis+1010_3:2_cond=fast:fnrw=on:ind=both:ins=1:newcnf=on:rp=on:sik=two:sp=weighted_frequency:spb=goal_then_units:taea=off:tar=off:thi=all:uwa=ground:i=6517:si=on:rtra=on_0"); - quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=1258:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_bd=preordered:gtg=exists_all:gtgl=3:ind=struct:indmd=1:indstrhyp=on:nui=on:sos=on:i=37001:si=on:rtra=on_0"); - // Improves by expected 1.4440838555503994 probs costing 181746 Mi + quick.push("ott+10_1:1024_asg=cautious:awrs=decay:drc=off:fsd=on:ind=struct:newcnf=on:nm=2:sac=on:taea=off:i=48260:si=on:rtra=on_0"); + quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=7014:si=on:rtra=on_0"); + // Improves by expected 0.2254904815878388 probs costing 55272 Mi // Sub-schedule for 480000Mi strat cap / 480000Mi overall limit - quick.push("lrs+10_1:1_gtg=exists_sym:ind=struct:indstrhyp=on:kws=precedence:sos=on:sp=unary_first:spb=goal:urr=on:i=65118:si=on:rtra=on_0"); - quick.push("ott+21_1:5_drc=off:erd=off:ind=both:indgen=on:indgenss=5:sac=on:slsq=on:taea=off:urr=on:i=20001:si=on:rtra=on_0"); - quick.push("dis+1010_3:2_cond=fast:fnrw=on:ind=both:ins=1:newcnf=on:rp=on:sik=two:sp=weighted_frequency:spb=goal_then_units:taea=off:tar=off:thi=all:uwa=ground:i=6517:si=on:rtra=on_0"); - // Improves by expected 0.6500479229841795 probs costing 91633 Mi - // Sub-schedule for 960000Mi strat cap / 960000Mi overall limit - quick.push("lrs+10_1:1_gtg=exists_sym:ind=struct:indstrhyp=on:kws=precedence:sos=on:sp=unary_first:spb=goal:urr=on:i=65118:si=on:rtra=on_0"); - quick.push("ott+21_1:5_drc=off:erd=off:ind=both:indgen=on:indgenss=5:sac=on:slsq=on:taea=off:urr=on:i=20001:si=on:rtra=on_0"); - quick.push("dis+1010_3:2_cond=fast:fnrw=on:ind=both:ins=1:newcnf=on:rp=on:sik=two:sp=weighted_frequency:spb=goal_then_units:taea=off:tar=off:thi=all:uwa=ground:i=6517:si=on:rtra=on_0"); - // Improves by expected 0.48743704742488414 probs costing 91633 Mi - // Sub-schedule for 960000Mi strat cap / 960000Mi overall limit - quick.push("lrs+10_1:1_gtg=exists_sym:ind=struct:indstrhyp=on:kws=precedence:sos=on:sp=unary_first:spb=goal:urr=on:i=65118:si=on:rtra=on_0"); - // Improves by expected 0.20956315647195745 probs costing 65117 Mi - // Sub-schedule for 960000Mi strat cap / 960000Mi overall limit - quick.push("lrs+10_1:1_gtg=exists_sym:ind=struct:indstrhyp=on:kws=precedence:sos=on:sp=unary_first:spb=goal:urr=on:i=65118:si=on:rtra=on_0"); - // Improves by expected 0.1622424910289877 probs costing 65117 Mi - // Overall score 509.99088280867824 probs on average / budget 683853 Mi + quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=13988:si=on:rtra=on_0"); + // Improves by expected 0.10323808058227672 probs costing 13987 Mi + // Overall score 522.3266907444028 probs on average / budget 242646 Mi + + // Old: Overall score 509.99088280867824 probs on average / budget 683853 Mi } void Schedules::getSnakeTptpUnsSchedule(const Shell::Property& property, Schedule& quick) { From 655dde831e4f97732c2939c2a5e5c425840f9284 Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Tue, 6 Feb 2024 14:23:24 +0100 Subject: [PATCH 40/56] yet another tip schedule --- CASC/Schedules.cpp | 220 +++++++++++++++------------------------------ 1 file changed, 70 insertions(+), 150 deletions(-) diff --git a/CASC/Schedules.cpp b/CASC/Schedules.cpp index eef14c019..26f08e295 100644 --- a/CASC/Schedules.cpp +++ b/CASC/Schedules.cpp @@ -3540,189 +3540,109 @@ void Schedules::getStructInductionSchedule(const Shell::Property& property, Sche } void Schedules::getStructInductionTipSchedule(const Shell::Property& property, Schedule& quick, Schedule& fallback) { - // Ran on tipvampire231219.txt + // Ran on tipvampire231219_nolemmas.txt // Sub-schedule for 2000Mi strat cap / 2000Mi overall limit quick.push("lrs+10_1:1024_fnrw=on:gtg=all:gtgl=3:ind=struct:indao=on:indc=goal:indoct=on:newcnf=on:sac=on:sp=unary_first:i=43:si=on:rtra=on_0"); - quick.push("dis+10_180:31_canc=force:gtg=exists_all:gtgl=4:newcnf=on:rp=on:s2a=on:s2agt=10:sac=on:sas=z3:sos=all:uhcvi=on:i=235:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=off:ind=struct:newcnf=on:nicw=on:sik=recursion:sil=100000:sp=const_frequency:to=lpo:i=58:si=on:rtra=on_0"); - quick.push("lrs+21_1:128_gtg=exists_top:gtgl=2:ind=both:indc=goal_plus:indmd=1:newcnf=on:nm=20:nui=on:sik=recursion:sp=unary_frequency:spb=non_intro:i=35:si=on:rtra=on_0"); + quick.push("lrs+21_1:128_gtg=exists_top:gtgl=2:ind=both:indc=goal_plus:indmd=1:newcnf=on:nm=20:nui=on:sik=recursion:sp=unary_frequency:spb=non_intro:i=19:si=on:rtra=on_0"); quick.push("lrs+10_1:40_bsr=unit_only:drc=off:flr=on:ind=both:newcnf=on:nm=75:nui=on:sik=recursion:sp=const_min:updr=off:i=28:si=on:rtra=on_0"); quick.push("lrs+2_1:1_aac=none:gtg=exists_all:gtgl=3:ind=both:newcnf=on:nui=on:plsq=on:plsqr=4,1:rp=on:sik=recursion:spb=goal_then_units:i=22:si=on:rtra=on_0"); - quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=41:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_drc=off:er=filter:fsr=off:ind=both:indao=on:newcnf=on:nm=32:rp=on:sac=on:sik=recursion:sp=unary_frequency:tac=rule:taea=off:to=lpo:uace=off:i=7:si=on:rtra=on_0"); - quick.push("dis+1002_1:1_tac=light:taea=off:i=65:si=on:rtra=on_0"); + quick.push("dis+1010_1:1_drc=off:er=filter:fsr=off:ind=both:indao=on:newcnf=on:nm=32:rp=on:sac=on:sik=recursion:sp=unary_frequency:tac=rule:taea=off:to=lpo:uace=off:i=8:si=on:rtra=on_0"); + quick.push("dis+10_1:1_flr=on:ind=both:kws=precedence:newcnf=on:nui=on:sik=recursion:i=25:si=on:rtra=on_0"); + quick.push("dis+1002_1:1_tac=light:taea=off:i=32:si=on:rtra=on_0"); quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=74:si=on:rtra=on_0"); - quick.push("lrs+1010_1:128_add=large:bs=on:bsd=on:etr=on:ev=force:fnrw=on:ind=struct:indc=goal_plus:indmd=2:indoct=on:lecc=2.0:newcnf=on:nui=on:sp=unary_first:i=114:si=on:rtra=on_0"); - quick.push("ott+21_1:10_bsr=on:canc=force:drc=encompass:ev=cautious:ile=on:ind=struct:indao=on:indoct=on:newcnf=on:spb=non_intro:tac=rule:taea=off:to=lpo:i=2:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:nwc=10.0:sac=on:sik=recursion:to=lpo:i=67:si=on:rtra=on_0"); - quick.push("lrs+10_1:128_br=off:fnrw=on:gtg=position:ind=struct:indmd=1:newcnf=on:nui=on:sil=100000:slsq=on:i=37:si=on:rtra=on_0"); + quick.push("lrs+1010_1:128_add=large:bs=on:bsd=on:etr=on:ev=force:fnrw=on:ind=struct:indc=goal_plus:indmd=2:indoct=on:lecc=2.0:newcnf=on:nui=on:sp=unary_first:i=89:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_avsq=on:avsql=on:drc=off:ind=struct:indmd=20:kws=precedence:newcnf=on:rp=on:sas=z3:sp=const_max:i=260:si=on:rtra=on_0"); + quick.push("dis+10_1:1_bs=unit_only:fde=unused:fnrw=on:ind=int:indn=off:ins=1:intindstcomp=always:kws=arity:newcnf=on:rp=on:sp=frequency:tac=rule:taea=off:tgt=full:urr=on:i=28:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:nwc=10.0:sac=on:sik=recursion:to=lpo:i=16:si=on:rtra=on_0"); quick.push("lrs+1011_1:1_fnrw=on:ind=both:indmd=2:indoct=on:kws=frequency:newcnf=on:nui=on:sik=recursion:taea=off:i=13:si=on:rtra=on_0"); - quick.push("lrs+2_1:1_drc=encompass:ind=struct:indao=on:newcnf=on:plsq=on:plsqr=32,1:sp=frequency:to=lpo:i=7:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_aac=none:afp=10000:fnrw=on:ind=both:indc=goal_plus:indmd=1:indn=off:newcnf=on:i=78:si=on:rtra=on_0"); - quick.push("lrs+1002_1:3_av=off:bsr=unit_only:drc=off:gtg=exists_top:gtgl=5:ind=struct:nwc=10.0:sil=100000:sp=const_min:spb=intro:tac=light:taea=off:to=lpo:urr=ec_only:i=59:si=on:rtra=on_0"); - quick.push("lrs+10_1633:262144_canc=cautious:drc=off:ev=force:fde=none:ind=both:indoct=on:newcnf=on:sik=recursion:sil=100000:sp=const_min:spb=goal_then_units:to=lpo:updr=off:i=55:si=on:rtra=on_0"); + quick.push("ott+10_1:1_ind=struct:indstrhyp=on:kws=precedence:s2a=on:s2agt=16:sac=on:sos=all:sp=reverse_arity:spb=intro:i=71:si=on:rtra=on_0"); + quick.push("lrs+2_1:1_drc=encompass:ind=struct:indao=on:newcnf=on:plsq=on:plsqr=32,1:sp=frequency:to=lpo:i=8:si=on:rtra=on_0"); + quick.push("lrs+1010_1:1_aac=none:afp=10000:fnrw=on:ind=both:indc=goal_plus:indmd=1:indn=off:newcnf=on:i=4:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=174:si=on:rtra=on_0"); + quick.push("lrs+10_1633:262144_canc=cautious:drc=off:ev=force:fde=none:ind=both:indoct=on:newcnf=on:sik=recursion:sil=100000:sp=const_min:spb=goal_then_units:to=lpo:updr=off:i=15:si=on:rtra=on_0"); quick.push("lrs+10_1:1_bd=off:gtg=exists_all:ind=both:indmd=1:indstrhyp=on:ins=3:newcnf=on:nui=on:spb=goal_then_units:to=lpo:i=19:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=off:fs=off:fsr=off:ind=struct:indstrhyp=on:nwc=5.0:s2a=on:sos=on:tar=off:i=80:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:fs=off:fsr=off:ind=struct:indstrhyp=on:nwc=5.0:s2a=on:sos=on:tar=off:i=60:si=on:rtra=on_0"); quick.push("lrs-1003_1:4_av=off:drc=off:ind=struct:indu=off:kws=precedence:newcnf=on:rawr=on:s2a=on:s2agt=16:sil=100000:slsq=on:spb=units:urr=on:uwa=ground:i=31:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_cond=on:er=tagged:fnrw=on:gve=force:irw=on:kws=inv_precedence:newcnf=on:nm=10:plsq=on:plsqc=2:plsqr=1,32:rp=on:sil=100000:sos=theory:spb=units:ss=axioms:tac=axiom:i=72:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=encompass:gtg=exists_all:ind=struct:indmd=3:indstrhyp=on:s2a=on:i=72:si=on:rtra=on_0"); - quick.push("dis+1010_3:1_aac=none:flr=on:ind=struct:ins=2:newcnf=on:nwc=2.0:sac=on:sil=100000:i=82:si=on:rtra=on_0"); - quick.push("lrs+2_1:4_drc=off:gtg=position:gve=cautious:ile=on:ind=struct:indao=on:indc=goal:indmd=6:newcnf=on:nwc=5.0:s2a=on:tac=axiom:to=lpo:i=44:si=on:rtra=on_0"); - quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=3:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=off:fnrw=on:gtg=all:gtgl=3:ind=both:indao=on:kws=precedence:newcnf=on:nwc=6.0:sac=on:sp=reverse_arity:uwa=interpreted_only:i=34:si=on:rtra=on_0"); - quick.push("ott+10_1:1_add=large:flr=on:ind=both:newcnf=on:nui=on:nwc=5.0:sik=all:sil=100000:spb=non_intro:i=37:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=encompass:gtg=exists_all:ind=struct:indmd=3:indstrhyp=on:s2a=on:i=27:si=on:rtra=on_0"); + quick.push("dis+1010_3:1_aac=none:flr=on:ind=struct:ins=2:newcnf=on:nwc=2.0:sac=on:sil=100000:i=69:si=on:rtra=on_0"); + quick.push("lrs+2_1:4_drc=off:gtg=position:gve=cautious:ile=on:ind=struct:indao=on:indc=goal:indmd=6:newcnf=on:nwc=5.0:s2a=on:tac=axiom:to=lpo:i=39:si=on:rtra=on_0"); + quick.push("lrs+1002_1:8_alpa=false:bd=preordered:drc=off:ind=struct:newcnf=on:nwc=10.0:sac=on:sik=recursion:sp=occurrence:spb=goal:i=10:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:fnrw=on:gtg=all:gtgl=3:ind=both:indao=on:kws=precedence:newcnf=on:nwc=6.0:sac=on:sp=reverse_arity:uwa=interpreted_only:i=11:si=on:rtra=on_0"); + quick.push("ott+10_1:1_add=large:flr=on:ind=both:newcnf=on:nui=on:nwc=5.0:sik=all:sil=100000:spb=non_intro:i=13:si=on:rtra=on_0"); quick.push("lrs+1002_1:1_av=off:bd=off:gtg=exists_top:ind=struct:indao=on:kws=precedence:newcnf=on:nwc=10.0:sik=recursion:sil=100000:sp=frequency:taea=off:uwa=all:i=16:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:fsr=off:ind=struct:newcnf=on:sik=all:taea=off:to=lpo:i=201:si=on:rtra=on_0"); - quick.push("ott+21_1:1_ep=RST:fsd=on:gve=cautious:ind=both:indn=off:newcnf=on:nui=on:nwc=10.0:sik=recursion:spb=intro:urr=on:i=31:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:ind=struct:indstrhyp=on:newcnf=on:sos=on:sp=reverse_arity:to=lpo:i=28:si=on:rtra=on_0"); + quick.push("ott+10_1:1_ev=cautious:gtg=exists_top:ind=struct:indc=goal:indstrhyp=on:nwc=10.0:sos=on:i=7:si=on:rtra=on_0"); + quick.push("ott+21_1:1_ep=RST:fsd=on:gve=cautious:ind=both:indn=off:newcnf=on:nui=on:nwc=10.0:sik=recursion:spb=intro:urr=on:i=4:si=on:rtra=on_0"); quick.push("lrs+1010_1:1_gtg=exists_all:ind=both:indmd=1:newcnf=on:nui=on:taea=off:updr=off:i=18:si=on:rtra=on_0"); quick.push("lrs+10_1:1_drc=encompass:erd=off:ind=struct:indmd=1:sos=on:ss=axioms:urr=on:i=21:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_add=large:drc=encompass:gtg=exists_sym:ind=both:indmd=2:newcnf=on:sik=recursion:sil=100000:uwa=one_side_constant:i=65:si=on:rtra=on_0"); quick.push("lrs+21_1:8_av=off:awrs=converge:awrsf=10:drc=off:fnrw=on:ind=struct:newcnf=on:slsq=on:slsqc=5:sp=unary_frequency:uwa=all:i=10:si=on:rtra=on_0"); - quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=37:si=on:rtra=on_0"); + quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=51:si=on:rtra=on_0"); + quick.push("ott+1002_3:2_aac=none:abs=on:alpa=true:drc=off:gve=force:ind=struct:indao=on:newcnf=on:nicw=on:nm=30:rawr=on:taea=off:i=8:si=on:rtra=on_0"); + quick.push("lrs+1002_1:4_drc=off:fsd=on:ind=struct:indmd=1:newcnf=on:nm=10:rp=on:s2pl=no:sik=recursion:sil=100000:sos=theory:sp=const_frequency:taea=off:uace=off:i=8:si=on:rtra=on_0"); + quick.push("dis+21_1:1_alpa=true:amm=off:fnrw=on:gtg=exists_top:gtgl=2:ind=struct:indc=goal:newcnf=on:rp=on:sil=100000:sos=theory:sp=frequency:taea=off:tgt=full:urr=on:i=82:si=on:rtra=on_0"); + quick.push("dis-1011_1:1_erd=off:gtg=exists_sym:gve=cautious:ind=both:indmd=3:indstrhyp=on:kws=inv_frequency:norm_ineq=on:sil=100000:sp=occurrence:spb=intro:ss=axioms:i=97:si=on:rtra=on_0"); quick.push("ott+10_1:1_ind=both:newcnf=on:nui=on:plsq=on:sik=recursion:sp=unary_frequency:uwa=interpreted_only:i=2:si=on:rtra=on_0"); - quick.push("dis+10_1:1_av=off:fnrw=on:ind=struct:newcnf=on:nwc=5.0:i=65:si=on:rtra=on_0"); + quick.push("dis+10_1:1_av=off:fnrw=on:ind=struct:newcnf=on:nwc=5.0:i=9:si=on:rtra=on_0"); + quick.push("ott+10_1:1_atotf=0.1:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:i=177:si=on:rtra=on_0"); + quick.push("dis+1002_1:1_bd=off:ep=RSTC:gtg=exists_all:newcnf=on:nm=10:norm_ineq=on:rp=on:s2agt=32:sac=on:sas=z3:slsq=on:slsqr=151023,1048576:sp=const_max:tac=light:i=161:si=on:rtra=on_0"); quick.push("lrs+21_1:128_av=off:drc=encompass:gtg=all:ind=struct:indao=on:ins=1:newcnf=on:spb=units:uwa=one_side_interpreted:i=12:si=on:rtra=on_0"); - quick.push("lrs+1010_8:1_ind=both:indmd=2:kws=inv_precedence:newcnf=on:sik=recursion:sp=const_min:i=38:si=on:rtra=on_0"); + quick.push("lrs+1010_8:1_ind=both:indmd=2:kws=inv_precedence:newcnf=on:sik=recursion:sp=const_min:i=32:si=on:rtra=on_0"); quick.push("dis+10_1:64_ind=both:indmd=2:indoct=on:newcnf=on:sac=on:sik=recursion:sil=100000:sp=frequency:taea=off:to=lpo:i=13:si=on:rtra=on_0"); quick.push("lrs+2_1:1_erd=off:gve=cautious:ind=both:newcnf=on:nui=on:updr=off:i=3:si=on:rtra=on_0"); quick.push("lrs+10_1:4_drc=encompass:erd=off:ind=both:sil=100000:taea=off:urr=on:i=34:si=on:rtra=on_0"); - // Improves by expected 440.31860246135017 probs costing 1999 Mi + // Improves by expected 216.06498927478503 probs costing 1990 Mi // Sub-schedule for 4000Mi strat cap / 4000Mi overall limit - quick.push("ott+10_1:1_drc=off:ind=struct:newcnf=on:nicw=on:sik=recursion:sil=100000:sp=const_frequency:to=lpo:i=541:si=on:rtra=on_0"); - quick.push("lrs+2_1:1_aac=none:gtg=exists_all:gtgl=3:ind=both:newcnf=on:nui=on:plsq=on:plsqr=4,1:rp=on:sik=recursion:spb=goal_then_units:i=17:si=on:rtra=on_0"); - quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=271:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_avsq=on:avsql=on:drc=off:ind=struct:indmd=20:kws=precedence:newcnf=on:rp=on:sas=z3:sp=const_max:i=282:si=on:rtra=on_0"); + quick.push("dis+10_180:31_canc=force:gtg=exists_all:gtgl=4:newcnf=on:rp=on:s2a=on:s2agt=10:sac=on:sas=z3:sos=all:uhcvi=on:i=223:si=on:rtra=on_0"); + quick.push("ott+21_1:5_drc=off:erd=off:ind=both:indgen=on:indgenss=5:sac=on:slsq=on:taea=off:urr=on:i=391:si=on:rtra=on_0"); + quick.push("dis+1002_1:1_fnrw=on:gtg=exists_sym:gtgl=4:newcnf=on:rp=on:sil=100000:sp=frequency:taea=off:tgt=full:to=lpo:i=51:si=on:rtra=on_0"); + quick.push("lrs+1002_1:6_canc=cautious:cond=on:ind=both:indao=on:intindint=infinite:intindsteq=not_in_both:newcnf=on:nm=16:rp=on:s2pl=on:sas=z3:slsq=on:slsqc=4:slsql=off:slsqr=33,13:sp=const_min:urr=on:i=248:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_avsq=on:avsql=on:drc=off:ind=struct:indmd=20:kws=precedence:newcnf=on:rp=on:sas=z3:sp=const_max:i=260:si=on:rtra=on_0"); quick.push("dis+10_1:1_bs=unit_only:fde=unused:fnrw=on:ind=int:indn=off:ins=1:intindstcomp=always:kws=arity:newcnf=on:rp=on:sp=frequency:tac=rule:taea=off:tgt=full:urr=on:i=28:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_abs=on:ev=cautious:gtg=exists_top:ind=struct:newcnf=on:nui=on:s2a=on:sac=on:sas=z3:sik=recursion:i=203:si=on:rtra=on_0"); - quick.push("ott+10_1:1_ind=struct:indstrhyp=on:kws=precedence:s2a=on:s2agt=16:sac=on:sos=all:sp=reverse_arity:spb=intro:i=97:si=on:rtra=on_0"); - quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=311:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_bd=off:gtg=exists_all:ind=both:indmd=1:indstrhyp=on:ins=3:newcnf=on:nui=on:spb=goal_then_units:to=lpo:i=169:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_abs=on:ev=cautious:gtg=exists_top:ind=struct:newcnf=on:nui=on:s2a=on:sac=on:sas=z3:sik=recursion:i=164:si=on:rtra=on_0"); + quick.push("ott+10_1:1_ind=struct:indstrhyp=on:kws=precedence:s2a=on:s2agt=16:sac=on:sos=all:sp=reverse_arity:spb=intro:i=182:si=on:rtra=on_0"); + quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=260:si=on:rtra=on_0"); quick.push("ott+10_1:1_drc=off:fs=off:fsr=off:ind=struct:indstrhyp=on:nwc=5.0:s2a=on:sos=on:tar=off:i=133:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_cond=on:er=tagged:fnrw=on:gve=force:irw=on:kws=inv_precedence:newcnf=on:nm=10:plsq=on:plsqc=2:plsqr=1,32:rp=on:sil=100000:sos=theory:spb=units:ss=axioms:tac=axiom:i=72:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_abs=on:fsr=off:gs=on:gtg=position:newcnf=on:rp=on:sac=on:sas=z3:sil=100000:slsq=on:sos=on:sp=unary_first:uace=off:urr=on:i=286:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_ind=struct:indc=goal_plus:indmd=1:newcnf=on:nui=on:s2a=on:spb=intro:i=134:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:ind=struct:indstrhyp=on:newcnf=on:sos=on:sp=reverse_arity:to=lpo:i=202:si=on:rtra=on_0"); + quick.push("lrs-10_1:5_flr=on:fnrw=on:fsr=off:gs=on:ind=struct:indao=on:newcnf=on:plsq=on:plsqc=2:plsqr=2,7:rp=on:sik=recursion:sil=100000:tar=off:uwa=one_side_constant:i=443:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:gve=cautious:ind=both:kws=inv_frequency:newcnf=on:sik=recursion:sil=100000:sos=on:sp=weighted_frequency:ss=axioms:st=6.0:i=582:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_bd=off:gtg=exists_top:ind=struct:indmd=2:indstrhyp=on:nwc=5.0:s2a=on:s2agt=16:i=103:si=on:rtra=on_0"); quick.push("ott+21_1:1_asg=cautious:av=off:drc=off:fnrw=on:ins=1:newcnf=on:norm_ineq=on:rp=on:sp=const_min:ss=axioms:taea=off:uwa=interpreted_only:i=96:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_add=large:drc=encompass:gtg=exists_sym:ind=both:indmd=2:newcnf=on:sik=recursion:sil=100000:uwa=one_side_constant:i=66:si=on:rtra=on_0"); - quick.push("ott+10_1:1_avsq=on:avsql=on:bd=off:gtg=position:ind=both:indstrhyp=on:kws=precedence:newcnf=on:nwc=10.0:sac=on:sgt=30:sik=all:sp=frequency:ss=axioms:taea=off:urr=on:i=149:si=on:rtra=on_0"); - quick.push("lrs+21_1:8_av=off:awrs=converge:awrsf=10:drc=off:fnrw=on:ind=struct:newcnf=on:slsq=on:slsqc=5:sp=unary_frequency:uwa=all:i=10:si=on:rtra=on_0"); - quick.push("dis-1011_1:1_erd=off:gtg=exists_sym:gve=cautious:ind=both:indmd=3:indstrhyp=on:kws=inv_frequency:norm_ineq=on:sil=100000:sp=occurrence:spb=intro:ss=axioms:i=97:si=on:rtra=on_0"); - quick.push("lrs+1011_16:1_drc=off:ev=cautious:fd=preordered:ind=struct:indstrhyp=on:sp=reverse_arity:i=176:si=on:rtra=on_0"); - quick.push("ott+10_1:1_atotf=0.1:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:i=177:si=on:rtra=on_0"); - quick.push("dis+1002_1:1_bd=off:ep=RSTC:gtg=exists_all:newcnf=on:nm=10:norm_ineq=on:rp=on:s2agt=32:sac=on:sas=z3:slsq=on:slsqr=151023,1048576:sp=const_max:tac=light:i=168:si=on:rtra=on_0"); - quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=238:si=on:rtra=on_0"); - quick.push("dis+10_1:64_ind=both:indmd=2:indoct=on:newcnf=on:sac=on:sik=recursion:sil=100000:sp=frequency:taea=off:to=lpo:i=89:si=on:rtra=on_0"); + quick.push("dis+21_1:1_alpa=true:amm=off:fnrw=on:gtg=exists_top:gtgl=2:ind=struct:indc=goal:newcnf=on:rp=on:sil=100000:sos=theory:sp=frequency:taea=off:tgt=full:urr=on:i=82:si=on:rtra=on_0"); + quick.push("dis-1011_1:1_erd=off:gtg=exists_sym:gve=cautious:ind=both:indmd=3:indstrhyp=on:kws=inv_frequency:norm_ineq=on:sil=100000:sp=occurrence:spb=intro:ss=axioms:i=86:si=on:rtra=on_0"); + quick.push("lrs+10_1:1_drc=off:gtg=exists_all:gtgl=2:ind=struct:ss=axioms:uwa=one_side_constant:i=86:si=on:rtra=on_0"); + quick.push("dis+1002_1:1_bd=off:ep=RSTC:gtg=exists_all:newcnf=on:nm=10:norm_ineq=on:rp=on:s2agt=32:sac=on:sas=z3:slsq=on:slsqr=151023,1048576:sp=const_max:tac=light:i=161:si=on:rtra=on_0"); + quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=295:si=on:rtra=on_0"); quick.push("lrs+2_1:1_erd=off:gve=cautious:ind=both:newcnf=on:nui=on:updr=off:i=3:si=on:rtra=on_0"); - // Improves by expected 42.05751854957042 probs costing 3990 Mi + // Improves by expected 13.741168084071628 probs costing 3857 Mi // Sub-schedule for 4000Mi strat cap / 4000Mi overall limit - quick.push("dis+10_180:31_canc=force:gtg=exists_all:gtgl=4:newcnf=on:rp=on:s2a=on:s2agt=10:sac=on:sas=z3:sos=all:uhcvi=on:i=235:si=on:rtra=on_0"); - quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=71:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=154:si=on:rtra=on_0"); - quick.push("lrs+1010_1:128_add=large:bs=on:bsd=on:etr=on:ev=force:fnrw=on:ind=struct:indc=goal_plus:indmd=2:indoct=on:lecc=2.0:newcnf=on:nui=on:sp=unary_first:i=70:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_abs=on:fde=none:gs=on:gtg=exists_all:gtgl=4:kws=inv_frequency:newcnf=on:rp=on:sas=z3:sd=1:sgt=30:sil=100000:ss=axioms:tac=rule:i=550:si=on:rtra=on_0"); + quick.push("dis+10_180:31_canc=force:gtg=exists_all:gtgl=4:newcnf=on:rp=on:s2a=on:s2agt=10:sac=on:sas=z3:sos=all:uhcvi=on:i=223:si=on:rtra=on_0"); + quick.push("dis-1011_1:10_bd=preordered:ind=struct:indmd=1:newcnf=on:nui=on:pum=on:sil=100000:i=461:si=on:rtra=on_0"); quick.push("dis+10_1:1_bs=unit_only:fde=unused:fnrw=on:ind=int:indn=off:ins=1:intindstcomp=always:kws=arity:newcnf=on:rp=on:sp=frequency:tac=rule:taea=off:tgt=full:urr=on:i=28:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_abs=on:anc=all:ev=cautious:kws=inv_frequency:newcnf=on:rp=on:sac=on:sas=z3:spb=goal_then_units:tgt=ground:uwa=interpreted_only:i=485:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_aac=none:afp=10000:fnrw=on:ind=both:indc=goal_plus:indmd=1:indn=off:newcnf=on:i=310:si=on:rtra=on_0"); + quick.push("ott+1002_1:1_canc=cautious:kws=inv_precedence:nm=0:rp=on:sas=z3:spb=units:updr=off:i=412:si=on:rtra=on_0"); quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=233:si=on:rtra=on_0"); - quick.push("lrs-10_1:5_flr=on:fnrw=on:fsr=off:gs=on:ind=struct:indao=on:newcnf=on:plsq=on:plsqc=2:plsqr=2,7:rp=on:sik=recursion:sil=100000:tar=off:uwa=one_side_constant:i=443:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_abs=on:fsr=off:gs=on:gtg=position:newcnf=on:rp=on:sac=on:sas=z3:sil=100000:slsq=on:sos=on:sp=unary_first:uace=off:urr=on:i=287:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_ind=struct:indc=goal_plus:indmd=1:newcnf=on:nui=on:s2a=on:spb=intro:i=134:si=on:rtra=on_0"); - quick.push("ott+10_1:1_add=large:flr=on:ind=both:newcnf=on:nui=on:nwc=5.0:sik=all:sil=100000:spb=non_intro:i=195:si=on:rtra=on_0"); - quick.push("ott+21_1:1_asg=cautious:av=off:drc=off:fnrw=on:ins=1:newcnf=on:norm_ineq=on:rp=on:sp=const_min:ss=axioms:taea=off:uwa=interpreted_only:i=96:si=on:rtra=on_0"); - quick.push("dis-1011_1:1_erd=off:gtg=exists_sym:gve=cautious:ind=both:indmd=3:indstrhyp=on:kws=inv_frequency:norm_ineq=on:sil=100000:sp=occurrence:spb=intro:ss=axioms:i=85:si=on:rtra=on_0"); - quick.push("lrs+1010_1:5_fsd=on:fsdmm=3:gve=force:newcnf=on:nm=32:norm_ineq=on:rp=on:sas=z3:spb=intro:tar=off:i=174:si=on:rtra=on_0"); - quick.push("dis+10_1:1024_br=off:fnrw=on:ind=struct:newcnf=on:sac=on:sik=recursion:sil=100000:sp=occurrence:spb=non_intro:tac=axiom:taea=off:uwa=one_side_interpreted:i=310:si=on:rtra=on_0"); - quick.push("ott-1010_1:1_bce=on:canc=force:fnrw=on:kws=inv_arity_squared:lcm=reverse:newcnf=on:nm=16:plsq=on:plsqc=1:plsqr=22,45:rawr=on:rp=on:sil=100000:sp=occurrence:taea=off:thi=strong:i=137:si=on:rtra=on_0"); - // Improves by expected 15.633859842662645 probs costing 3979 Mi - // Sub-schedule for 8000Mi strat cap / 8000Mi overall limit - quick.push("ott-21_1:3_amm=off:canc=force:ev=cautious:gtg=exists_all:gtgl=2:ind=both:indc=goal:indmd=1:indoct=on:indstrhyp=on:nwc=5.0:plsq=on:plsqr=13907591,524288:pum=on:sp=weighted_frequency:to=lpo:urr=on:i=132:si=on:rtra=on_0"); - quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=242:si=on:rtra=on_0"); - quick.push("ott+21_1:5_drc=off:erd=off:ind=both:indgen=on:indgenss=5:sac=on:slsq=on:taea=off:urr=on:i=391:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=154:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_abs=on:fde=none:gs=on:gtg=exists_all:gtgl=4:kws=inv_frequency:newcnf=on:rp=on:sas=z3:sd=1:sgt=30:sil=100000:ss=axioms:tac=rule:i=805:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:nwc=10.0:sac=on:sik=recursion:to=lpo:i=835:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_abs=on:ev=cautious:gtg=exists_top:ind=struct:newcnf=on:nui=on:s2a=on:sac=on:sas=z3:sik=recursion:i=318:si=on:rtra=on_0"); - quick.push("ott+1002_1:1_canc=cautious:kws=inv_precedence:nm=0:rp=on:sas=z3:spb=units:updr=off:i=514:si=on:rtra=on_0"); - quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=309:si=on:rtra=on_0"); - quick.push("lrs+10_1633:262144_canc=cautious:drc=off:ev=force:fde=none:ind=both:indoct=on:newcnf=on:sik=recursion:sil=100000:sp=const_min:spb=goal_then_units:to=lpo:updr=off:i=56:si=on:rtra=on_0"); quick.push("ott+10_1:1_drc=off:fs=off:fsr=off:ind=struct:indstrhyp=on:nwc=5.0:s2a=on:sos=on:tar=off:i=133:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_abs=on:fsr=off:gs=on:gtg=position:newcnf=on:rp=on:sac=on:sas=z3:sil=100000:slsq=on:sos=on:sp=unary_first:uace=off:urr=on:i=287:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_ind=struct:indc=goal_plus:indmd=1:newcnf=on:nui=on:s2a=on:spb=intro:i=141:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=off:gve=cautious:ind=both:kws=inv_frequency:newcnf=on:sik=recursion:sil=100000:sos=on:sp=weighted_frequency:ss=axioms:st=6.0:i=711:si=on:rtra=on_0"); - quick.push("ott+10_5:1_drc=off:ind=struct:indstrhyp=on:kws=precedence:taea=off:uwa=all:i=217:si=on:rtra=on_0"); - quick.push("ott+21_1:1_asg=cautious:av=off:drc=off:fnrw=on:ins=1:newcnf=on:norm_ineq=on:rp=on:sp=const_min:ss=axioms:taea=off:uwa=interpreted_only:i=96:si=on:rtra=on_0"); - quick.push("ott+1002_16:1_drc=off:fd=preordered:ind=both:indn=off:sil=100000:sp=const_max:taea=off:to=lpo:uace=off:i=967:si=on:rtra=on_0"); - quick.push("ott+1002_1:1024_bsd=on:drc=off:fd=preordered:ind=struct:indao=on:indgenss=7:kws=inv_arity:rawr=on:sac=on:sp=const_max:spb=intro:sup=off:uhcvi=on:updr=off:uwa=ground:i=51:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_anc=all_dependent:fde=none:fnrw=on:gtg=exists_top:kws=inv_arity:newcnf=on:rp=on:i=112:si=on:rtra=on_0"); - quick.push("dis-1011_1:1_erd=off:gtg=exists_sym:gve=cautious:ind=both:indmd=3:indstrhyp=on:kws=inv_frequency:norm_ineq=on:sil=100000:sp=occurrence:spb=intro:ss=axioms:i=85:si=on:rtra=on_0"); - quick.push("dis+10_1:1024_br=off:fnrw=on:ind=struct:newcnf=on:sac=on:sik=recursion:sil=100000:sp=occurrence:spb=non_intro:tac=axiom:taea=off:uwa=one_side_interpreted:i=310:si=on:rtra=on_0"); - quick.push("dis+1002_1:1_bd=off:ep=RSTC:gtg=exists_all:newcnf=on:nm=10:norm_ineq=on:rp=on:s2agt=32:sac=on:sas=z3:slsq=on:slsqr=151023,1048576:sp=const_max:tac=light:i=149:si=on:rtra=on_0"); - quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=238:si=on:rtra=on_0"); - quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=458:si=on:rtra=on_0"); - quick.push("ott-1010_1:1_bce=on:canc=force:fnrw=on:kws=inv_arity_squared:lcm=reverse:newcnf=on:nm=16:plsq=on:plsqc=1:plsqr=22,45:rawr=on:rp=on:sil=100000:sp=occurrence:taea=off:thi=strong:i=253:si=on:rtra=on_0"); - // Improves by expected 11.640267411239504 probs costing 7939 Mi - // Sub-schedule for 20000Mi strat cap / 20000Mi overall limit - quick.push("ott-21_1:3_amm=off:canc=force:ev=cautious:gtg=exists_all:gtgl=2:ind=both:indc=goal:indmd=1:indoct=on:indstrhyp=on:nwc=5.0:plsq=on:plsqr=13907591,524288:pum=on:sp=weighted_frequency:to=lpo:urr=on:i=132:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=off:ind=struct:newcnf=on:nicw=on:sik=recursion:sil=100000:sp=const_frequency:to=lpo:i=541:si=on:rtra=on_0"); - quick.push("ott+2_1:64_bsr=unit_only:fnrw=on:ind=both:indmd=10:newcnf=on:nui=on:nwc=1.5:sik=recursion:sp=reverse_arity:spb=intro:i=242:si=on:rtra=on_0"); - quick.push("dis-1011_1:10_bd=preordered:ind=struct:indmd=1:newcnf=on:nui=on:pum=on:sil=100000:i=461:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_av=off:drc=off:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:urr=on:i=154:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_avsq=on:avsql=on:drc=off:ind=struct:indmd=20:kws=precedence:newcnf=on:rp=on:sas=z3:sp=const_max:i=1624:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_abs=on:fde=none:gs=on:gtg=exists_all:gtgl=4:kws=inv_frequency:newcnf=on:rp=on:sas=z3:sd=1:sgt=30:sil=100000:ss=axioms:tac=rule:i=404:si=on:rtra=on_0"); - quick.push("lrs+1002_1:1_abs=on:anc=all:ev=cautious:kws=inv_frequency:newcnf=on:rp=on:sac=on:sas=z3:spb=goal_then_units:tgt=ground:uwa=interpreted_only:i=959:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:nwc=10.0:sac=on:sik=recursion:to=lpo:i=835:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_abs=on:ev=cautious:gtg=exists_top:ind=struct:newcnf=on:nui=on:s2a=on:sac=on:sas=z3:sik=recursion:i=203:si=on:rtra=on_0"); - quick.push("ott+1002_1:1_canc=cautious:kws=inv_precedence:nm=0:rp=on:sas=z3:spb=units:updr=off:i=514:si=on:rtra=on_0"); - quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=2701:si=on:rtra=on_0"); quick.push("lrs-10_1:5_flr=on:fnrw=on:fsr=off:gs=on:ind=struct:indao=on:newcnf=on:plsq=on:plsqc=2:plsqr=2,7:rp=on:sik=recursion:sil=100000:tar=off:uwa=one_side_constant:i=389:si=on:rtra=on_0"); - quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=1351:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_abs=on:fsr=off:gs=on:gtg=position:newcnf=on:rp=on:sac=on:sas=z3:sil=100000:slsq=on:sos=on:sp=unary_first:uace=off:urr=on:i=311:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_ind=struct:indc=goal_plus:indmd=1:newcnf=on:nui=on:s2a=on:spb=intro:i=141:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:fsr=off:ind=struct:newcnf=on:sik=all:taea=off:to=lpo:i=520:si=on:rtra=on_0"); - quick.push("ott+10_1:1_drc=off:gve=cautious:ind=both:kws=inv_frequency:newcnf=on:sik=recursion:sil=100000:sos=on:sp=weighted_frequency:ss=axioms:st=6.0:i=607:si=on:rtra=on_0"); quick.push("dis+10_1:1_avsq=on:avsqr=1,16:drc=off:fd=preordered:ins=1:nm=32:sfv=off:sp=unary_frequency:spb=goal:to=lpo:updr=off:i=1060:si=on:rtra=on_0"); - quick.push("ott+21_1:1_asg=cautious:av=off:drc=off:fnrw=on:ins=1:newcnf=on:norm_ineq=on:rp=on:sp=const_min:ss=axioms:taea=off:uwa=interpreted_only:i=91:si=on:rtra=on_0"); + quick.push("ott+21_1:1_asg=cautious:av=off:drc=off:fnrw=on:ins=1:newcnf=on:norm_ineq=on:rp=on:sp=const_min:ss=axioms:taea=off:uwa=interpreted_only:i=89:si=on:rtra=on_0"); quick.push("ott+21_3:1_fnrw=on:gtg=exists_sym:gtgl=4:ins=1:newcnf=on:rp=on:sil=100000:ss=axioms:tgt=full:thi=neg_eq:to=lpo:urr=on:i=291:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_drc=off:ev=force:ind=struct:indmd=3:indstrhyp=on:newcnf=on:norm_ineq=on:plsq=on:plsqr=161,8:sil=100000:sp=const_min:spb=goal_then_units:thi=all:i=2034:si=on:rtra=on_0"); - quick.push("lrs+10_3:1_asg=cautious:fnrw=on:gtg=all:ind=both:indmd=1:indn=off:lcm=reverse:newcnf=on:nui=on:sac=on:sik=recursion:sil=100000:slsq=on:slsql=off:taea=off:thi=strong:uwa=one_side_constant:i=245:si=on:rtra=on_0"); - quick.push("ott+1002_1:2_bs=unit_only:canc=force:ep=RS:fnrw=on:newcnf=on:norm_ineq=on:rp=on:sil=100000:sp=reverse_arity:taea=off:urr=ec_only:uwa=interpreted_only:i=501:si=on:rtra=on_0"); - quick.push("ott+10_1:1_atotf=0.1:ind=struct:indstrhyp=on:newcnf=on:sik=all:taea=off:i=1468:si=on:rtra=on_0"); - quick.push("lrs+1002_1:3_awrs=decay:fnrw=on:gtg=exists_sym:newcnf=on:nm=32:rp=on:sp=unary_first:tac=rule:taea=off:tar=off:tgt=full:uhcvi=on:uwa=ground:i=811:si=on:rtra=on_0"); - quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=458:si=on:rtra=on_0"); - quick.push("ott-1010_1:1_bce=on:canc=force:fnrw=on:kws=inv_arity_squared:lcm=reverse:newcnf=on:nm=16:plsq=on:plsqc=1:plsqr=22,45:rawr=on:rp=on:sil=100000:sp=occurrence:taea=off:thi=strong:i=253:si=on:rtra=on_0"); - // Improves by expected 8.367897376694664 probs costing 19273 Mi - // Sub-schedule for 40000Mi strat cap / 40000Mi overall limit - quick.push("ott+10_1:1_aac=none:bs=unit_only:drc=off:ev=cautious:fsr=off:ind=struct:indao=on:newcnf=on:nicw=on:sik=recursion:ss=axioms:tgt=full:i=17001:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_abs=on:fde=none:gs=on:gtg=exists_all:gtgl=4:kws=inv_frequency:newcnf=on:rp=on:sas=z3:sd=1:sgt=30:sil=100000:ss=axioms:tac=rule:i=805:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_abs=on:ev=cautious:gtg=exists_top:ind=struct:newcnf=on:nui=on:s2a=on:sac=on:sas=z3:sik=recursion:i=284:si=on:rtra=on_0"); + quick.push("dis+2_1:1_fd=preordered:fde=none:gtg=position:newcnf=on:rp=on:sas=z3:sos=theory:sp=unary_frequency:spb=goal:i=213:si=on:rtra=on_0"); + quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=441:si=on:rtra=on_0"); + // Improves by expected 3.349762257387157 probs costing 3961 Mi + // Sub-schedule for 8000Mi strat cap / 8000Mi overall limit + quick.push("dis-1011_1:10_bd=preordered:ind=struct:indmd=1:newcnf=on:nui=on:pum=on:sil=100000:i=461:si=on:rtra=on_0"); + quick.push("lrs+1002_1:1_abs=on:anc=all:ev=cautious:kws=inv_frequency:newcnf=on:rp=on:sac=on:sas=z3:spb=goal_then_units:tgt=ground:uwa=interpreted_only:i=681:si=on:rtra=on_0"); quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=2701:si=on:rtra=on_0"); - quick.push("lrs+1002_1:3_av=off:bsr=unit_only:drc=off:gtg=exists_top:gtgl=5:ind=struct:nwc=10.0:sil=100000:sp=const_min:spb=intro:tac=light:taea=off:to=lpo:urr=ec_only:i=2101:si=on:rtra=on_0"); - quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=1351:si=on:rtra=on_0"); + quick.push("ott+10_1:1_drc=off:gve=cautious:ind=both:kws=inv_frequency:newcnf=on:sik=recursion:sil=100000:sos=on:sp=weighted_frequency:ss=axioms:st=6.0:i=582:si=on:rtra=on_0"); quick.push("dis+10_1:1_avsq=on:avsqr=1,16:drc=off:fd=preordered:ins=1:nm=32:sfv=off:sp=unary_frequency:spb=goal:to=lpo:updr=off:i=1060:si=on:rtra=on_0"); - quick.push("lrs+1010_1:1_gtg=exists_all:ind=both:indmd=1:newcnf=on:nui=on:taea=off:updr=off:i=2973:si=on:rtra=on_0"); - quick.push("ott+2_3:1_avsq=on:avsqr=1,16:bd=off:ep=RS:fnrw=on:lma=on:newcnf=on:nm=32:rp=on:sil=100000:sos=all:sp=unary_first:tgt=full:i=2101:si=on:rtra=on_0"); - quick.push("lrs+10_1:1_ind=struct:newcnf=on:nui=on:s2a=on:sas=z3:sik=recursion:i=4511:si=on:rtra=on_0"); - quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=458:si=on:rtra=on_0"); - quick.push("ott-1010_1:1_bce=on:canc=force:fnrw=on:kws=inv_arity_squared:lcm=reverse:newcnf=on:nm=16:plsq=on:plsqc=1:plsqr=22,45:rawr=on:rp=on:sil=100000:sp=occurrence:taea=off:thi=strong:i=253:si=on:rtra=on_0"); - // Improves by expected 2.739235446503001 probs costing 35587 Mi - // Sub-schedule for 120000Mi strat cap / 120000Mi overall limit - quick.push("ott+2_1:1_bsr=on:erd=off:gtg=exists_top:gve=cautious:ind=both:indmd=1:indstrhyp=on:newcnf=on:nui=on:i=8101:si=on:rtra=on_0"); - quick.push("ott+10_1:1024_asg=cautious:awrs=decay:drc=off:fsd=on:ind=struct:newcnf=on:nm=2:sac=on:taea=off:i=48260:si=on:rtra=on_0"); + quick.push("lrs+1002_1:3_awrs=decay:fnrw=on:gtg=exists_sym:newcnf=on:nm=32:rp=on:sp=unary_first:tac=rule:taea=off:tar=off:tgt=full:uhcvi=on:uwa=ground:i=734:si=on:rtra=on_0"); + quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=441:si=on:rtra=on_0"); + // Improves by expected 1.496372313496297 probs costing 6653 Mi + // Sub-schedule for 20000Mi strat cap / 20000Mi overall limit quick.push("dis+10_1:1_asg=cautious:ind=both:intindstterm=no_skolems:newcnf=on:norm_ineq=on:rp=on:sac=on:sas=z3:sos=theory:spb=intro:to=lpo:i=2701:si=on:rtra=on_0"); - quick.push("lrs+1002_1:3_av=off:bsr=unit_only:drc=off:gtg=exists_top:gtgl=5:ind=struct:nwc=10.0:sil=100000:sp=const_min:spb=intro:tac=light:taea=off:to=lpo:urr=ec_only:i=2101:si=on:rtra=on_0"); - quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=18462:si=on:rtra=on_0"); - quick.push("dis+1010_1:1_add=large:afr=on:newcnf=on:pum=on:rp=on:sas=z3:sos=all:sp=unary_frequency:thi=overlap:to=lpo:uhcvi=on:i=21001:si=on:rtra=on_0"); - // Improves by expected 1.2405810942121944 probs costing 100620 Mi - // Sub-schedule for 240000Mi strat cap / 240000Mi overall limit - quick.push("ott+10_1:1024_asg=cautious:awrs=decay:drc=off:fsd=on:ind=struct:newcnf=on:nm=2:sac=on:taea=off:i=48260:si=on:rtra=on_0"); - quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=7014:si=on:rtra=on_0"); - // Improves by expected 0.2254904815878388 probs costing 55272 Mi - // Sub-schedule for 480000Mi strat cap / 480000Mi overall limit - quick.push("ott+21_1:185_fd=preordered:fde=none:fnrw=on:ind=both:indmd=5:lma=on:newcnf=on:nm=5:nui=on:rp=on:sik=recursion:sp=weighted_frequency:spb=units:tac=rule:thi=neg_eq:i=13988:si=on:rtra=on_0"); - // Improves by expected 0.10323808058227672 probs costing 13987 Mi - // Overall score 522.3266907444028 probs on average / budget 242646 Mi + quick.push("ott+1010_9:4_anc=all_dependent:drc=encompass:fsd=on:ind=struct:indao=on:indstrhyp=on:newcnf=on:pum=on:s2a=on:s2agt=32:sos=all:tac=rule:i=4801:si=on:rtra=on_0"); + quick.push("dis+10_1:1_amm=off:drc=off:gtg=all:gtgl=5:ind=struct:indmd=2:newcnf=on:sos=on:taea=off:tgt=full:i=441:si=on:rtra=on_0"); + // Improves by expected 0.4182775034739544 probs costing 7940 Mi - // Old: Overall score 509.99088280867824 probs on average / budget 683853 Mi + // Overall score 235.07056943321408 probs on average / budget 24401 Mi } void Schedules::getSnakeTptpUnsSchedule(const Shell::Property& property, Schedule& quick) { From 9380fdd2208f5e9554a8c1059361a1e280a7d2a8 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Wed, 28 Feb 2024 10:14:01 +0100 Subject: [PATCH 41/56] Review --- CMakeLists.txt | 5 ++-- ...ng.cpp => FunctionDefinitionRewriting.cpp} | 27 ++++++++++--------- ...ng.hpp => FunctionDefinitionRewriting.hpp} | 14 +++++----- Kernel/Inference.cpp | 8 +++--- Kernel/Inference.hpp | 4 +-- Makefile | 2 +- Saturation/SaturationAlgorithm.cpp | 6 ++--- ...g.cpp => tFunctionDefinitionRewriting.cpp} | 4 +-- 8 files changed, 36 insertions(+), 34 deletions(-) rename Inferences/{FnDefRewriting.cpp => FunctionDefinitionRewriting.cpp} (86%) rename Inferences/{FnDefRewriting.hpp => FunctionDefinitionRewriting.hpp} (77%) rename UnitTests/{tFnDefRewriting.cpp => tFunctionDefinitionRewriting.cpp} (97%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 774ea2300..7a789ad93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -404,12 +404,12 @@ set(VAMPIRE_INFERENCE_SOURCES Inferences/ExtensionalityResolution.cpp Inferences/Factoring.cpp Inferences/FastCondensation.cpp - Inferences/FnDefRewriting.cpp Inferences/FOOLParamodulation.cpp Inferences/ForwardDemodulation.cpp Inferences/ForwardLiteralRewriting.cpp Inferences/ForwardSubsumptionAndResolution.cpp Inferences/ForwardSubsumptionDemodulation.cpp + Inferences/FunctionDefinitionRewriting.cpp Inferences/GlobalSubsumption.cpp Inferences/InnerRewriting.cpp Inferences/EquationalTautologyRemoval.cpp @@ -446,6 +446,7 @@ set(VAMPIRE_INFERENCE_SOURCES Inferences/ForwardDemodulation.hpp Inferences/ForwardLiteralRewriting.hpp Inferences/ForwardSubsumptionAndResolution.hpp + Inferences/FunctionDefinitionRewriting.hpp Inferences/GlobalSubsumption.hpp Inferences/InnerRewriting.hpp Inferences/EquationalTautologyRemoval.hpp @@ -744,8 +745,8 @@ set(UNIT_TESTS UnitTests/tSet.cpp UnitTests/tDeque.cpp UnitTests/tTermAlgebra.cpp - UnitTests/tFnDefRewriting.cpp UnitTests/tFunctionDefinitionHandler.cpp + UnitTests/tFunctionDefinitionRewriting.cpp ) source_group(unit_tests FILES ${UNIT_TESTS}) diff --git a/Inferences/FnDefRewriting.cpp b/Inferences/FunctionDefinitionRewriting.cpp similarity index 86% rename from Inferences/FnDefRewriting.cpp rename to Inferences/FunctionDefinitionRewriting.cpp index 9eca7f943..7032d5e2d 100644 --- a/Inferences/FnDefRewriting.cpp +++ b/Inferences/FunctionDefinitionRewriting.cpp @@ -8,8 +8,8 @@ * and in the source directory */ /** - * @file FnDefRewriting.cpp - * Implements class FnDefRewriting. + * @file FunctionDefinitionRewriting.cpp + * Implements class FunctionDefinitionRewriting. */ #include "Lib/Metaiterators.hpp" @@ -30,14 +30,14 @@ #include "Shell/Options.hpp" #include "Shell/FunctionDefinitionHandler.hpp" -#include "FnDefRewriting.hpp" +#include "FunctionDefinitionRewriting.hpp" using namespace Inferences; using namespace Lib; using namespace Kernel; using namespace Saturation; -struct FnDefRewriting::GeneralizationsFn { +struct FunctionDefinitionRewriting::GeneralizationsFn { GeneralizationsFn(FunctionDefinitionHandler *index) : _index(index) {} VirtualIterator, TermQueryResult>> operator()(std::pair arg) { @@ -48,7 +48,7 @@ struct FnDefRewriting::GeneralizationsFn { FunctionDefinitionHandler *_index; }; -struct FnDefRewriting::RewriteableSubtermsFn { +struct FunctionDefinitionRewriting::RewriteableSubtermsFn { VirtualIterator> operator()(Literal *lit) { NonVariableNonTypeIterator nvi(lit); @@ -57,22 +57,22 @@ struct FnDefRewriting::RewriteableSubtermsFn { } }; -struct FnDefRewriting::ForwardResultFn { +struct FunctionDefinitionRewriting::ForwardResultFn { ForwardResultFn(Clause *cl) : _cl(cl) {} Clause* operator()(std::pair, TermQueryResult> arg) { TermQueryResult &qr = arg.second; bool temp; - return FnDefRewriting::perform(_cl, arg.first.first, TermList(arg.first.second), qr.clause, + return FunctionDefinitionRewriting::perform(_cl, arg.first.first, TermList(arg.first.second), qr.clause, qr.literal, qr.term, qr.unifier, false, temp, - Inference(GeneratingInference2(InferenceRule::FNDEF_REWRITING, _cl, qr.clause))); + Inference(GeneratingInference2(InferenceRule::FUNCTION_DEFINITION_REWRITING, _cl, qr.clause))); } private: Clause *_cl; }; -ClauseIterator FnDefRewriting::generateClauses(Clause *premise) +ClauseIterator FunctionDefinitionRewriting::generateClauses(Clause *premise) { auto itf1 = premise->iterLits(); @@ -90,7 +90,7 @@ ClauseIterator FnDefRewriting::generateClauses(Clause *premise) return pvi(getFilteredIterator(it, NonzeroFn())); } -bool FnDefRewriting::perform(Clause* cl, Clause*& replacement, ClauseIterator& premises) +bool FunctionDefinitionRewriting::perform(Clause* cl, Clause*& replacement, ClauseIterator& premises) { auto salg = ForwardSimplificationEngine::_salg; @@ -120,12 +120,13 @@ bool FnDefRewriting::perform(Clause* cl, Clause*& replacement, ClauseIterator& p continue; } auto rhs = EqHelper::getOtherEqualitySide(qr.literal, qr.term); + // TODO shouldn't allow demodulation with incomparables in the non-ground case if (Ordering::isGorGEorE(ordering.compare(rhs,qr.term))) { continue; } bool isEqTautology = false; - auto res = FnDefRewriting::perform(cl, lit, trm, qr.clause, qr.literal, qr.term, qr.unifier, toplevelCheck, - isEqTautology, Inference(SimplifyingInference2(InferenceRule::FNDEF_DEMODULATION, cl, qr.clause)), salg); + auto res = FunctionDefinitionRewriting::perform(cl, lit, trm, qr.clause, qr.literal, qr.term, qr.unifier, toplevelCheck, + isEqTautology, Inference(SimplifyingInference2(InferenceRule::FUNCTION_DEFINITION_DEMODULATION, cl, qr.clause)), salg); if (!res && !isEqTautology) { continue; } @@ -141,7 +142,7 @@ bool FnDefRewriting::perform(Clause* cl, Clause*& replacement, ClauseIterator& p return false; } -Clause *FnDefRewriting::perform( +Clause *FunctionDefinitionRewriting::perform( Clause *rwClause, Literal *rwLit, TermList rwTerm, Clause *eqClause, Literal *eqLit, TermList eqLHS, ResultSubstitutionSP subst, bool toplevelCheck, bool& isEqTautology, diff --git a/Inferences/FnDefRewriting.hpp b/Inferences/FunctionDefinitionRewriting.hpp similarity index 77% rename from Inferences/FnDefRewriting.hpp rename to Inferences/FunctionDefinitionRewriting.hpp index bd4362778..148281194 100644 --- a/Inferences/FnDefRewriting.hpp +++ b/Inferences/FunctionDefinitionRewriting.hpp @@ -8,12 +8,12 @@ * and in the source directory */ /** - * @file FnDefRewriting.hpp - * Defines class FnDefRewriting. + * @file FunctionDefinitionRewriting.hpp + * Defines class FunctionDefinitionRewriting. */ -#ifndef __FnDefRewriting__ -#define __FnDefRewriting__ +#ifndef __FunctionDefinitionRewriting__ +#define __FunctionDefinitionRewriting__ #include "Forwards.hpp" @@ -22,12 +22,12 @@ namespace Inferences { using namespace Kernel; using namespace Shell; -class FnDefRewriting +class FunctionDefinitionRewriting : public GeneratingInferenceEngine , public ForwardSimplificationEngine { public: - USE_ALLOCATOR(FnDefRewriting); + USE_ALLOCATOR(FunctionDefinitionRewriting); ClauseIterator generateClauses(Clause *premise) override; bool perform(Clause* cl, Clause*& replacement, ClauseIterator& premises) override; @@ -46,4 +46,4 @@ class FnDefRewriting }; // namespace Inferences -#endif /* __FnDefRewriting__ */ +#endif /* __FunctionDefinitionRewriting__ */ diff --git a/Kernel/Inference.cpp b/Kernel/Inference.cpp index ef4a83be4..9e5ee8190 100644 --- a/Kernel/Inference.cpp +++ b/Kernel/Inference.cpp @@ -686,10 +686,10 @@ vstring Kernel::ruleName(InferenceRule rule) return "subsumption resolution"; case InferenceRule::SUPERPOSITION: return "superposition"; - case InferenceRule::FNDEF_REWRITING: - return "fn def rewriting"; - case InferenceRule::FNDEF_DEMODULATION: - return "fn def demodulation"; + case InferenceRule::FUNCTION_DEFINITION_REWRITING: + return "function definition rewriting"; + case InferenceRule::FUNCTION_DEFINITION_DEMODULATION: + return "function definition demodulation"; case InferenceRule::CONSTRAINED_SUPERPOSITION: return "constrained superposition"; case InferenceRule::EQUALITY_FACTORING: diff --git a/Kernel/Inference.hpp b/Kernel/Inference.hpp index bcefb1a61..e7248fabb 100644 --- a/Kernel/Inference.hpp +++ b/Kernel/Inference.hpp @@ -264,7 +264,7 @@ enum class InferenceRule : unsigned char { BOOL_SIMP, - FNDEF_DEMODULATION, + FUNCTION_DEFINITION_DEMODULATION, INTERNAL_SIMPLIFYING_INFERNCE_LAST, @@ -283,7 +283,7 @@ enum class InferenceRule : unsigned char { /** superposition inference */ SUPERPOSITION, /** function definition rewriting inference */ - FNDEF_REWRITING, + FUNCTION_DEFINITION_REWRITING, /** superposition with constraints */ CONSTRAINED_SUPERPOSITION, /** equality factoring inference */ diff --git a/Makefile b/Makefile index a23de0786..e6ec9dcdc 100644 --- a/Makefile +++ b/Makefile @@ -260,7 +260,7 @@ VINF_OBJ=Inferences/BackwardDemodulation.o\ Inferences/SubVarSup.o\ Inferences/Factoring.o\ Inferences/FastCondensation.o\ - Inferences/FnDefRewriting.o\ + Inferences/FunctionDefinitionRewriting.o\ Inferences/FOOLParamodulation.o\ Inferences/Injectivity.o\ Inferences/ForwardDemodulation.o\ diff --git a/Saturation/SaturationAlgorithm.cpp b/Saturation/SaturationAlgorithm.cpp index 204f15734..3afbdb912 100644 --- a/Saturation/SaturationAlgorithm.cpp +++ b/Saturation/SaturationAlgorithm.cpp @@ -61,7 +61,7 @@ #include "Inferences/FOOLParamodulation.hpp" #include "Inferences/Injectivity.hpp" #include "Inferences/Factoring.hpp" -#include "Inferences/FnDefRewriting.hpp" +#include "Inferences/FunctionDefinitionRewriting.hpp" #include "Inferences/ForwardDemodulation.hpp" #include "Inferences/ForwardLiteralRewriting.hpp" #include "Inferences/ForwardSubsumptionAndResolution.hpp" @@ -1601,8 +1601,8 @@ SaturationAlgorithm* SaturationAlgorithm::createFromOptions(Problem& prb, const } } if (env.options->functionDefinitionRewriting()) { - gie->addFront(new FnDefRewriting()); - res->addForwardSimplifierToFront(new FnDefRewriting()); + gie->addFront(new FunctionDefinitionRewriting()); + res->addForwardSimplifierToFront(new FunctionDefinitionRewriting()); } CompositeSGI* sgi = new CompositeSGI(); diff --git a/UnitTests/tFnDefRewriting.cpp b/UnitTests/tFunctionDefinitionRewriting.cpp similarity index 97% rename from UnitTests/tFnDefRewriting.cpp rename to UnitTests/tFunctionDefinitionRewriting.cpp index b33a842a0..f2cd11816 100644 --- a/UnitTests/tFnDefRewriting.cpp +++ b/UnitTests/tFunctionDefinitionRewriting.cpp @@ -18,11 +18,11 @@ #include "Shell/FunctionDefinitionHandler.hpp" -#include "Inferences/FnDefRewriting.hpp" +#include "Inferences/FunctionDefinitionRewriting.hpp" using namespace Test; -REGISTER_GEN_TESTER(FnDefRewriting) +REGISTER_GEN_TESTER(FunctionDefinitionRewriting) /** * NECESSARY: We neet to tell the tester which syntax sugar to import for creating terms & clauses. From 7565a9267fbcfe489756bf8c24373692e60390f5 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Thu, 29 Feb 2024 12:02:15 +0100 Subject: [PATCH 42/56] Disable definition introduction if not needed --- Kernel/Signature.cpp | 6 +++--- Parse/SMTLIB2.cpp | 49 ++++++++++++++++++++++++++++++++++---------- Shell/Preprocess.cpp | 8 +++++--- 3 files changed, 46 insertions(+), 17 deletions(-) diff --git a/Kernel/Signature.cpp b/Kernel/Signature.cpp index 83feb696a..887097b44 100644 --- a/Kernel/Signature.cpp +++ b/Kernel/Signature.cpp @@ -699,14 +699,14 @@ unsigned Signature::getDiff(){ unsigned Signature::getFnDef(unsigned fn) { - auto sort = getFunction(fn)->fnType()->result(); - ASS(sort.isTerm() && sort.term()->ground()); + auto type = getFunction(fn)->fnType(); + auto sort = type->result(); bool added = false; auto name = "$def_"+sort.toString(); unsigned p = addPredicate(name, 2, added); if (added) { ALWAYS(_fnDefPreds.insert(p)); - OperatorType* ot = OperatorType::getPredicateType({sort, sort}); + OperatorType* ot = OperatorType::getPredicateType({sort, sort}, type->numTypeArguments()); Symbol* sym = getPredicate(p); sym->markProtected(); sym->setType(ot); diff --git a/Parse/SMTLIB2.cpp b/Parse/SMTLIB2.cpp index 22bd84d7e..f24bc6512 100644 --- a/Parse/SMTLIB2.cpp +++ b/Parse/SMTLIB2.cpp @@ -772,6 +772,11 @@ SMTLIB2::DeclaredSymbol SMTLIB2::declareFunctionOrPredicate(const vstring& name, // ---------------------------------------------------------------------- +bool shouldCreateFunctionDefinition(unsigned fn) +{ + return env.options->functionDefinitionRewriting() || env.options->structInduction()==Options::StructuralInductionKind::RECURSION; +} + void SMTLIB2::readDefineFun(const vstring& name, LExprList* iArgs, LExpr* oSort, LExpr* body, const TermStack& typeArgs, bool recursive) { if (isAlreadyKnownSymbol(name)) { @@ -838,12 +843,23 @@ void SMTLIB2::readDefineFun(const vstring& name, LExprList* iArgs, LExpr* oSort, Literal* lit; if (isTrueFun) { TermList lhs(Term::create(symbIdx,args.size(),args.begin())); - auto p = env.signature->getFnDef(symbIdx); - lit = Literal::create(p, true, { lhs, rhs }); + if (shouldCreateFunctionDefinition(symbIdx)) { + auto p = env.signature->getFnDef(symbIdx); + auto defArgs = typeArgs; + defArgs.push(lhs); + defArgs.push(rhs); + lit = Literal::create(p,defArgs.size(),true,false,defArgs.begin()); + } else { + lit = Literal::createEquality(true,lhs,rhs,rangeSort); + } } else { - auto p = env.signature->getBoolDef(symbIdx); - Formula* frm = new AtomicFormula(Literal::create(p,args.size(),true,false,args.begin())); - TermList lhs(Term::createFormula(frm)); + if (shouldCreateFunctionDefinition(symbIdx)) { + auto p = env.signature->getBoolDef(symbIdx); + lit = Literal::create(p,args.size(),true,false,args.begin()); + } else { + lit = Literal::create(symbIdx,args.size(),true,false,args.begin()); + } + TermList lhs(Term::createFormula(new AtomicFormula(lit))); lit = Literal::createEquality(true, lhs, rhs, rangeSort); } Formula* fla = new AtomicFormula(lit); @@ -932,13 +948,24 @@ void SMTLIB2::readDefineFunsRec(LExprList* declsExpr, LExprList* defsExpr) Literal* lit; if (isTrueFun) { TermList lhs(Term::create(symbIdx,decl.args.size(),decl.args.begin())); - auto p = env.signature->getFnDef(symbIdx); - lit = Literal::create(p, true, { lhs, rhs }); + if (shouldCreateFunctionDefinition(symbIdx)) { + auto p = env.signature->getFnDef(symbIdx); + TermStack defArgs; // no type arguments (yet) in this case + defArgs.push(lhs); + defArgs.push(rhs); + lit = Literal::create(p,defArgs.size(),true,false,defArgs.begin()); + } else { + lit = Literal::createEquality(true,lhs,rhs,decl.rangeSort); + } } else { - auto p = env.signature->getBoolDef(symbIdx); - Formula* frm = new AtomicFormula(Literal::create(p,decl.args.size(),true,false,decl.args.begin())); - TermList lhs(Term::createFormula(frm)); - lit = Literal::createEquality(true,lhs,rhs,decl.rangeSort); + if (shouldCreateFunctionDefinition(symbIdx)) { + auto p = env.signature->getBoolDef(symbIdx); + lit = Literal::create(p,decl.args.size(),true,false,decl.args.begin()); + } else { + lit = Literal::create(symbIdx,decl.args.size(),true,false,decl.args.begin()); + } + TermList lhs(Term::createFormula(new AtomicFormula(lit))); + lit = Literal::createEquality(true, lhs, rhs, decl.rangeSort); } Formula* fla = new AtomicFormula(lit); diff --git a/Shell/Preprocess.cpp b/Shell/Preprocess.cpp index 4cea4e85b..e2ccad9cb 100644 --- a/Shell/Preprocess.cpp +++ b/Shell/Preprocess.cpp @@ -367,9 +367,11 @@ void Preprocess::preprocess(Problem& prb) resolver.apply(prb); } - auto fnDefHandler = new FunctionDefinitionHandler(); - fnDefHandler->preprocess(prb); - prb.addFunctionDefinitionHandler(fnDefHandler); + if (_options.functionDefinitionRewriting() || _options.structInduction()==Options::StructuralInductionKind::RECURSION) { + auto fnDefHandler = new FunctionDefinitionHandler(); + fnDefHandler->preprocess(prb); + prb.addFunctionDefinitionHandler(fnDefHandler); + } if (_options.generalSplitting()) { if (prb.isHigherOrder() || prb.hasPolymorphicSym()) { // TODO: extend GeneralSplitting to support polymorphism (would higher-order make sense?) From 3baccfe552bc72ec733dcaae799b133e063a9a02 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Thu, 29 Feb 2024 14:08:24 +0100 Subject: [PATCH 43/56] Review --- Kernel/Problem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Problem.cpp b/Kernel/Problem.cpp index 9c17fff5a..fe0411e4c 100644 --- a/Kernel/Problem.cpp +++ b/Kernel/Problem.cpp @@ -38,7 +38,7 @@ using namespace Kernel; * The new object takes ownership of the list @c units. */ Problem::Problem(UnitList* units) -: _units(0), _smtlibLogic(SMTLIBLogic::SMT_UNDEFINED), _property(0) +: _units(0), _fnDefHandler(0), _smtlibLogic(SMTLIBLogic::SMT_UNDEFINED), _property(0) { initValues(); From a7c598f0564a43ec54e58fd57db70cb9903c0dbb Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Thu, 29 Feb 2024 15:34:08 +0000 Subject: [PATCH 44/56] keep Problem responsible for the memory of FunctionDefinitionHandler, not the SaturationAlgorithm --- Kernel/Problem.cpp | 3 ++- Kernel/Problem.hpp | 5 +++-- Saturation/SaturationAlgorithm.cpp | 5 ----- Saturation/SaturationAlgorithm.hpp | 6 +++--- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Kernel/Problem.cpp b/Kernel/Problem.cpp index fe0411e4c..4be798883 100644 --- a/Kernel/Problem.cpp +++ b/Kernel/Problem.cpp @@ -21,6 +21,7 @@ #include "Shell/Property.hpp" #include "Shell/Statistics.hpp" +#include "Shell/FunctionDefinitionHandler.hpp" #include "Clause.hpp" #include "Term.hpp" @@ -38,7 +39,7 @@ using namespace Kernel; * The new object takes ownership of the list @c units. */ Problem::Problem(UnitList* units) -: _units(0), _fnDefHandler(0), _smtlibLogic(SMTLIBLogic::SMT_UNDEFINED), _property(0) +: _units(0), _smtlibLogic(SMTLIBLogic::SMT_UNDEFINED), _property(0) { initValues(); diff --git a/Kernel/Problem.hpp b/Kernel/Problem.hpp index ffc1d7aa2..3964c2705 100644 --- a/Kernel/Problem.hpp +++ b/Kernel/Problem.hpp @@ -19,6 +19,7 @@ #include "Lib/DHMap.hpp" #include "Lib/MaybeBool.hpp" +#include "Lib/ScopedPtr.hpp" #include "Shell/SMTLIBLogic.hpp" @@ -84,7 +85,7 @@ class Problem { DHMap getEliminatedFunctions(){ return _deletedFunctions; } DHMap getEliminatedPredicates(){ return _deletedPredicates; } DHMap getPartiallyEliminatedPredicates(){ return _partiallyDeletedPredicates;} - FunctionDefinitionHandler* getFunctionDefinitionHandler(){ return _fnDefHandler; } + FunctionDefinitionHandler* getFunctionDefinitionHandler(){ return _fnDefHandler.ptr(); } bool isPropertyUpToDate() const { return _propertyValid; } @@ -192,7 +193,7 @@ class Problem { DHMap _deletedFunctions; DHMap _deletedPredicates; DHMap _partiallyDeletedPredicates; - FunctionDefinitionHandler* _fnDefHandler; + ScopedPtr _fnDefHandler; bool _hadIncompleteTransformation; diff --git a/Saturation/SaturationAlgorithm.cpp b/Saturation/SaturationAlgorithm.cpp index 3afbdb912..58e854f69 100644 --- a/Saturation/SaturationAlgorithm.cpp +++ b/Saturation/SaturationAlgorithm.cpp @@ -337,11 +337,6 @@ void SaturationAlgorithm::tryUpdateFinalClauseCount() } } -void SaturationAlgorithm::setFunctionDefinitionHandler(FunctionDefinitionHandler* fnDefHandler) -{ - _fnDefHandler = fnDefHandler; -} - /** * Return true if the run of the prover so far is complete */ diff --git a/Saturation/SaturationAlgorithm.hpp b/Saturation/SaturationAlgorithm.hpp index b758b9708..d25381691 100644 --- a/Saturation/SaturationAlgorithm.hpp +++ b/Saturation/SaturationAlgorithm.hpp @@ -125,8 +125,8 @@ class SaturationAlgorithm : public MainLoop static void tryUpdateFinalClauseCount(); Splitter* getSplitter() { return _splitter; } - FunctionDefinitionHandler* getFunctionDefinitionHandler() { return _fnDefHandler.ptr(); } - void setFunctionDefinitionHandler(FunctionDefinitionHandler* fnDefHandler); + FunctionDefinitionHandler* getFunctionDefinitionHandler() const { return _fnDefHandler; } + void setFunctionDefinitionHandler(FunctionDefinitionHandler* fnDefHandler) { _fnDefHandler = fnDefHandler; } protected: virtual void init(); @@ -218,7 +218,7 @@ class SaturationAlgorithm : public MainLoop SymElOutput* _symEl; AnswerLiteralManager* _answerLiteralManager; Instantiation* _instantiation; - ScopedPtr _fnDefHandler; + FunctionDefinitionHandler* _fnDefHandler; SubscriptionData _passiveContRemovalSData; SubscriptionData _activeContRemovalSData; From bf68cf6b9eee35061e6ad2a4a781053f21f9464d Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Thu, 29 Feb 2024 17:01:57 +0100 Subject: [PATCH 45/56] add third option that uses fn def handler --- Parse/SMTLIB2.cpp | 3 ++- Shell/Preprocess.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Parse/SMTLIB2.cpp b/Parse/SMTLIB2.cpp index f24bc6512..680ee3cf6 100644 --- a/Parse/SMTLIB2.cpp +++ b/Parse/SMTLIB2.cpp @@ -774,7 +774,8 @@ SMTLIB2::DeclaredSymbol SMTLIB2::declareFunctionOrPredicate(const vstring& name, bool shouldCreateFunctionDefinition(unsigned fn) { - return env.options->functionDefinitionRewriting() || env.options->structInduction()==Options::StructuralInductionKind::RECURSION; + return env.options->functionDefinitionRewriting() || env.options->inductionOnActiveOccurrences() || + env.options->structInduction()==Options::StructuralInductionKind::RECURSION; } void SMTLIB2::readDefineFun(const vstring& name, LExprList* iArgs, LExpr* oSort, LExpr* body, const TermStack& typeArgs, bool recursive) diff --git a/Shell/Preprocess.cpp b/Shell/Preprocess.cpp index e2ccad9cb..dffb351f5 100644 --- a/Shell/Preprocess.cpp +++ b/Shell/Preprocess.cpp @@ -367,7 +367,9 @@ void Preprocess::preprocess(Problem& prb) resolver.apply(prb); } - if (_options.functionDefinitionRewriting() || _options.structInduction()==Options::StructuralInductionKind::RECURSION) { + if (_options.functionDefinitionRewriting() || _options.inductionOnActiveOccurrences() || + _options.structInduction()==Options::StructuralInductionKind::RECURSION) + { auto fnDefHandler = new FunctionDefinitionHandler(); fnDefHandler->preprocess(prb); prb.addFunctionDefinitionHandler(fnDefHandler); From 998e061c9bbd0060292fab5d418bd18d86fda135 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Fri, 1 Mar 2024 14:28:09 +0100 Subject: [PATCH 46/56] Try to fix tests; add traceback on for generating tests --- Test/GenerationTester.hpp | 1 + UnitTests/tFunctionDefinitionRewriting.cpp | 5 +++++ UnitTests/tInduction.cpp | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/Test/GenerationTester.hpp b/Test/GenerationTester.hpp index 1efd7992b..9d69c60ac 100644 --- a/Test/GenerationTester.hpp +++ b/Test/GenerationTester.hpp @@ -134,6 +134,7 @@ class TestCase Problem p; Options o; env.setMainProblem(&p); + env.options->set("traceback", "on"); for (const auto& kv : _options) { o.set(kv.first, kv.second); env.options->set(kv.first, kv.second); diff --git a/UnitTests/tFunctionDefinitionRewriting.cpp b/UnitTests/tFunctionDefinitionRewriting.cpp index f2cd11816..370a32d25 100644 --- a/UnitTests/tFunctionDefinitionRewriting.cpp +++ b/UnitTests/tFunctionDefinitionRewriting.cpp @@ -24,6 +24,9 @@ using namespace Test; REGISTER_GEN_TESTER(FunctionDefinitionRewriting) +// this is to avoid name collisions with other tests +namespace { + /** * NECESSARY: We neet to tell the tester which syntax sugar to import for creating terms & clauses. * See Test/SyntaxSugar.hpp for which kinds of syntax sugar are available @@ -118,3 +121,5 @@ TEST_GENERATION(test_06, .input( clause({ f(b,b) == b })) .expected(none()) ) + +} \ No newline at end of file diff --git a/UnitTests/tInduction.cpp b/UnitTests/tInduction.cpp index 2da57f0c5..97c0139ba 100644 --- a/UnitTests/tInduction.cpp +++ b/UnitTests/tInduction.cpp @@ -33,6 +33,9 @@ using namespace Test::Generation; #define SKOLEM_VAR_MIN 100 #define DECL_SKOLEM_VAR(x, i) DECL_VAR(x, i+SKOLEM_VAR_MIN) +// this is to avoid name collisions with other tests +namespace { + LiteralIndex* comparisonIndex() { return new UnitIntegerComparisonLiteralIndex(new LiteralSubstitutionTree()); } @@ -1325,3 +1328,5 @@ TEST_FUN(generalizations_03) { }), }); } + +} \ No newline at end of file From c2fca0bffe9f8a2911da6c31e147ac4b30681a00 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Fri, 1 Mar 2024 15:15:02 +0100 Subject: [PATCH 47/56] Zero out _fnDefHandler in SaturationAlgorithm --- Saturation/SaturationAlgorithm.cpp | 2 +- Test/GenerationTester.hpp | 1 - UnitTests/tFunctionDefinitionRewriting.cpp | 3 +-- UnitTests/tInduction.cpp | 3 +-- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Saturation/SaturationAlgorithm.cpp b/Saturation/SaturationAlgorithm.cpp index 58e854f69..e21aafdda 100644 --- a/Saturation/SaturationAlgorithm.cpp +++ b/Saturation/SaturationAlgorithm.cpp @@ -224,7 +224,7 @@ SaturationAlgorithm::SaturationAlgorithm(Problem& prb, const Options& opt) _clauseActivationInProgress(false), _fwSimplifiers(0), _simplifiers(0), _bwSimplifiers(0), _splitter(0), _consFinder(0), _labelFinder(0), _symEl(0), _answerLiteralManager(0), - _instantiation(0), + _instantiation(0), _fnDefHandler(0), _generatedClauseCount(0), _activationLimit(0) { diff --git a/Test/GenerationTester.hpp b/Test/GenerationTester.hpp index 9d69c60ac..1efd7992b 100644 --- a/Test/GenerationTester.hpp +++ b/Test/GenerationTester.hpp @@ -134,7 +134,6 @@ class TestCase Problem p; Options o; env.setMainProblem(&p); - env.options->set("traceback", "on"); for (const auto& kv : _options) { o.set(kv.first, kv.second); env.options->set(kv.first, kv.second); diff --git a/UnitTests/tFunctionDefinitionRewriting.cpp b/UnitTests/tFunctionDefinitionRewriting.cpp index 370a32d25..992bac299 100644 --- a/UnitTests/tFunctionDefinitionRewriting.cpp +++ b/UnitTests/tFunctionDefinitionRewriting.cpp @@ -24,8 +24,7 @@ using namespace Test; REGISTER_GEN_TESTER(FunctionDefinitionRewriting) -// this is to avoid name collisions with other tests -namespace { +namespace FunctionDefinitionRewritingTest { /** * NECESSARY: We neet to tell the tester which syntax sugar to import for creating terms & clauses. diff --git a/UnitTests/tInduction.cpp b/UnitTests/tInduction.cpp index 97c0139ba..20fbddfa2 100644 --- a/UnitTests/tInduction.cpp +++ b/UnitTests/tInduction.cpp @@ -33,8 +33,7 @@ using namespace Test::Generation; #define SKOLEM_VAR_MIN 100 #define DECL_SKOLEM_VAR(x, i) DECL_VAR(x, i+SKOLEM_VAR_MIN) -// this is to avoid name collisions with other tests -namespace { +namespace InductionTest { LiteralIndex* comparisonIndex() { return new UnitIntegerComparisonLiteralIndex(new LiteralSubstitutionTree()); From bb662a0061e79153e45d4a2ed244fb6d878a1f08 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Mon, 11 Mar 2024 15:10:11 +0100 Subject: [PATCH 48/56] Review --- Inferences/FunctionDefinitionRewriting.cpp | 68 +++++------------- Inferences/FunctionDefinitionRewriting.hpp | 11 +-- Inferences/Induction.cpp | 57 ++++++++------- Inferences/Induction.hpp | 81 +++++++++++++++++++++- Inferences/InductionHelper.cpp | 10 ++- Inferences/InductionHelper.hpp | 2 +- Kernel/Signature.cpp | 2 +- Kernel/Signature.hpp | 9 +++ Parse/SMTLIB2.cpp | 10 +-- Shell/FunctionDefinitionHandler.cpp | 11 ++- Shell/FunctionDefinitionHandler.hpp | 6 +- Shell/Options.cpp | 2 + Shell/TermAlgebra.hpp | 5 ++ 13 files changed, 173 insertions(+), 101 deletions(-) diff --git a/Inferences/FunctionDefinitionRewriting.cpp b/Inferences/FunctionDefinitionRewriting.cpp index 7032d5e2d..6b77c3825 100644 --- a/Inferences/FunctionDefinitionRewriting.cpp +++ b/Inferences/FunctionDefinitionRewriting.cpp @@ -37,57 +37,25 @@ using namespace Lib; using namespace Kernel; using namespace Saturation; -struct FunctionDefinitionRewriting::GeneralizationsFn { - GeneralizationsFn(FunctionDefinitionHandler *index) : _index(index) {} - VirtualIterator, TermQueryResult>> operator()(std::pair arg) - { - return pvi(pushPairIntoRightIterator(arg, _index->getGeneralizations(arg.second))); - } - -private: - FunctionDefinitionHandler *_index; -}; - -struct FunctionDefinitionRewriting::RewriteableSubtermsFn { - VirtualIterator> operator()(Literal *lit) - { - NonVariableNonTypeIterator nvi(lit); - return pvi(pushPairIntoRightIterator(lit, - getUniquePersistentIteratorFromPtr(&nvi))); - } -}; - -struct FunctionDefinitionRewriting::ForwardResultFn { - ForwardResultFn(Clause *cl) : _cl(cl) {} - - Clause* operator()(std::pair, TermQueryResult> arg) - { - TermQueryResult &qr = arg.second; - bool temp; - return FunctionDefinitionRewriting::perform(_cl, arg.first.first, TermList(arg.first.second), qr.clause, - qr.literal, qr.term, qr.unifier, false, temp, - Inference(GeneratingInference2(InferenceRule::FUNCTION_DEFINITION_REWRITING, _cl, qr.clause))); - } -private: - Clause *_cl; -}; - -ClauseIterator FunctionDefinitionRewriting::generateClauses(Clause *premise) +Kernel::ClauseIterator FunctionDefinitionRewriting::generateClauses(Clause *premise) { - auto itf1 = premise->iterLits(); - - // Get an iterator of pairs of selected literals and rewritable subterms - // of those literals. Here all subterms of a literal are rewritable. - auto itf2 = getMapAndFlattenIterator(itf1, RewriteableSubtermsFn()); - - // Get clauses with a function definition literal whose lhs is a generalization of the rewritable subterm, - // returns a pair with the original pair and the generalization result (includes substitution) - auto itf3 = getMapAndFlattenIterator(itf2, GeneralizationsFn(GeneratingInferenceEngine::_salg->getFunctionDefinitionHandler())); - - //Perform forward rewriting - auto it = pvi(getMappingIterator(itf3, ForwardResultFn(premise))); - // Remove null elements - return pvi(getFilteredIterator(it, NonzeroFn())); + return pvi(premise->iterLits() + .flatMap([](Literal *lit) { + NonVariableNonTypeIterator nvi(lit); + return pvi(pushPairIntoRightIterator(lit, getUniquePersistentIteratorFromPtr(&nvi))); + }) + .flatMap([this](std::pair arg){ + return pvi(pushPairIntoRightIterator(arg, + GeneratingInferenceEngine::_salg->getFunctionDefinitionHandler()->getGeneralizations(arg.second))); + }) + .map([premise](std::pair, TermQueryResult> arg) { + TermQueryResult &qr = arg.second; + bool temp; + return (Clause*)FunctionDefinitionRewriting::perform(premise, arg.first.first, TermList(arg.first.second), qr.clause, + qr.literal, qr.term, qr.unifier, false, temp, + Inference(GeneratingInference2(InferenceRule::FUNCTION_DEFINITION_REWRITING, premise, qr.clause))); + }) + .filter(NonzeroFn())); } bool FunctionDefinitionRewriting::perform(Clause* cl, Clause*& replacement, ClauseIterator& premises) diff --git a/Inferences/FunctionDefinitionRewriting.hpp b/Inferences/FunctionDefinitionRewriting.hpp index 148281194..02cb6dae9 100644 --- a/Inferences/FunctionDefinitionRewriting.hpp +++ b/Inferences/FunctionDefinitionRewriting.hpp @@ -22,6 +22,13 @@ namespace Inferences { using namespace Kernel; using namespace Shell; +/** + * Inference implementing function definition rewriting. + * Function definitions are assumed to be available when saturation begins, + * so there is only a forward version of the inference. Moreover, we use + * a forward simplification variant to eagerly perform rewritings which + * are also demodulations. + */ class FunctionDefinitionRewriting : public GeneratingInferenceEngine , public ForwardSimplificationEngine @@ -38,10 +45,6 @@ class FunctionDefinitionRewriting Clause *eqClause, Literal *eqLiteral, TermList eqLHS, ResultSubstitutionSP subst, bool toplevelCheck, bool& isEqTautology, const Inference& inf, SaturationAlgorithm* salg = nullptr); - - struct ForwardResultFn; - struct RewriteableSubtermsFn; - struct GeneralizationsFn; }; }; // namespace Inferences diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index 3ec2de26b..04eb86b0d 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -52,6 +52,8 @@ Term* ActiveOccurrenceIterator::next() InductionTemplate* templ = _fnDefHandler ? _fnDefHandler->getInductionTemplate(t) : nullptr; if (templ) { + // if there is an induction template, + // only induct on the active occurrences auto& actPos = templ->inductionPositions(); for (unsigned i = t->numTypeArguments(); i < t->arity(); i++) { if (actPos[i]) { @@ -83,6 +85,8 @@ Term* getPlaceholderForTerm(const vvector& ts, unsigned i) TermList TermReplacement::transformSubterm(TermList trm) { + // if we reach any of the mapped terms, + // replace it with the term it is mapped to if(trm.isTerm() && _m.count(trm.term())){ return _m.at(trm.term()); } @@ -130,6 +134,8 @@ Formula* InductionContext::getFormula(const vvector& r, bool opposite, { ASS_EQ(_indTerms.size(), r.size()); + // Assuming this object is the result of a ContextReplacement (or similar iterator) + // we can replace the ith placeholder with the ith term in r. vmap replacementMap; for (unsigned i = 0; i < _indTerms.size(); i++) { auto ph = getPlaceholderForTerm(_indTerms,i); @@ -181,7 +187,8 @@ Formula* InductionContext::getFormulaWithSquashedSkolems(const vvector return res; } -vmap getContextReplacementMap(const InductionContext& context, bool inverse = false) { +vmap getContextReplacementMap(const InductionContext& context, bool inverse = false) +{ vmap m; for (unsigned i = 0; i < context._indTerms.size(); i++) { auto ph = getPlaceholderForTerm(context._indTerms,i); @@ -280,9 +287,15 @@ VirtualIterator contextReplacementInstance(const InductionCont auto ctx = context; auto res = VirtualIterator::getEmpty(); if (opt.inductionOnActiveOccurrences()) { + // In case of using active occurrences, we replace the input + // context with one where the active occurrences are already + // replaced, so that we only iterate on the rest of them below. ActiveOccurrenceContextReplacement aor(context, fnDefHandler); ASS(aor.hasNext()); auto ao_ctx = aor.next(); + // If there are no active occurrences, we get an empty context + // and we simply fall back to inducting on all occurrences. + // // TODO do this filtering inside ActiveOccurrenceContextReplacement if (!ao_ctx._cls.empty()) { ctx = ao_ctx; @@ -317,6 +330,7 @@ ContextSubsetReplacement::ContextSubsetReplacement(const InductionContext& conte _iteration[i] = _maxIterations[i]-1; } } + // find first iteration that shouldn't be skipped while (!_done && shouldSkipIteration()) { stepIteration(); } @@ -343,22 +357,18 @@ bool ContextSubsetReplacement::hasNext() return !_done; } _ready = true; - // Increment _iteration, since it either is 0, or was already used. - // _iteration++; - // unsigned setBits = BitUtils::oneBits(_iteration); - // // Skip this iteration if not all bits are set, but more than maxSubset are set. - // while (hasNextInner() && - // ((_maxSubsetSize > 0) && (setBits < _occurrences) && (setBits > _maxSubsetSize))) { - // _iteration++; - // setBits = BitUtils::oneBits(_iteration); - stepIteration(); - while (!_done && shouldSkipIteration()) { + // we step forward until we find an + // iteration which shouldn't be skipped + // or we run out of iterations + do { stepIteration(); - } + } while (!_done && shouldSkipIteration()); + return !_done; } -InductionContext ContextSubsetReplacement::next() { +InductionContext ContextSubsetReplacement::next() +{ ASS(_ready); InductionContext context(_context._indTerms); for (unsigned i = 0; i < _context._indTerms.size(); i++) { @@ -386,6 +396,8 @@ InductionContext ContextSubsetReplacement::next() { bool ContextSubsetReplacement::shouldSkipIteration() const { + // We skip an iteration if too many (but not all) + // occurrences of an induction term are used. const bool subsetSizeCheck = _maxSubsetSize > 0; for (unsigned i = 0; i < _iteration.size(); i++) { unsigned setBits = __builtin_popcount(_iteration[i]); @@ -492,7 +504,7 @@ struct InductionContextFn } auto indTerm = arg.first[0]; // check for complex term and non-equality - if (_lit->isEquality()/* || !indTerm->arity() */) { + if (_lit->isEquality() || !indTerm->arity()) { return res; } while (arg.second.hasNext()) { @@ -578,7 +590,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) if (templ) { vvector indTerms; if (templ->matchesTerm(lit, indTerms)) { - vvector typeArgs; //(lit->numTypeArguments()); + vvector typeArgs; for (unsigned i = 0; i < lit->numTypeArguments(); i++) { typeArgs.push_back(lit->nthArgument(i)->term()); } @@ -619,7 +631,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) if (templ) { vvector indTerms; if (templ->matchesTerm(t, indTerms)) { - vvector typeArgs; //(t->numTypeArguments()); + vvector typeArgs; for (unsigned i = 0; i < t->numTypeArguments(); i++) { typeArgs.push_back(t->nthArgument(i)->term()); } @@ -1571,15 +1583,6 @@ void InductionClauseIterator::performRecursionInduction(const InductionContext& e->add(std::move(cls), std::move(subst)); } -// Whether an induction formula is applicable (or has already been generated) -// is determined by its conclusion part, which is resolved against the literals -// and bounds we induct on. From this point of view, an integer induction formula -// can have one lower bound and/or one upper bound. This function wraps this -// information by adding the bounds and querying the index with the resulting context. -// -// TODO: default bounds are now stored as special cases with no bounds (this makes -// the resolve part easier) but this means some default bound induction formulas -// are duplicates of normal formulas. bool InductionClauseIterator::notDoneInt(InductionContext context, Literal* bound1, Literal* bound2, InductionFormulaIndex::Entry*& e) { ASS_EQ(context._indTerms.size(), 1); @@ -1599,10 +1602,6 @@ bool InductionClauseIterator::notDoneInt(InductionContext context, Literal* boun return _formulaIndex.findOrInsert(context, e, b1, b2); } -// If the integer induction literal is a comparison, and the induction term is -// one of its arguments, the other argument should not be allowed as a bound -// (such inductions are useless and can lead to redundant literals in the -// induction axiom). bool InductionClauseIterator::isValidBound(const InductionContext& context, const TermQueryResult& bound) { ASS_EQ(context._indTerms.size(), 1); diff --git a/Inferences/Induction.hpp b/Inferences/Induction.hpp index 3a4f3df1c..9a0cb6dd5 100644 --- a/Inferences/Induction.hpp +++ b/Inferences/Induction.hpp @@ -48,6 +48,12 @@ using namespace Saturation; using namespace Shell; using namespace Lib; +/** + * This class is similar to @b NonVariableNonTypeIterator and is + * used to iterate over terms in active positions inside a literal. + * The active positions are given by a @b FunctionDefinitionHandler + * instance. + */ class ActiveOccurrenceIterator : public IteratorCore { @@ -67,17 +73,33 @@ class ActiveOccurrenceIterator FunctionDefinitionHandler* _fnDefHandler; }; +/** + * Hash used to make hashing over shared terms deterministic. + */ struct SharedTermHash { static bool equals(Term* t1, Term* t2) { return t1==t2; } static unsigned hash(Term* t) { return t->getId(); } }; +/** + * Hash used to make hashing over clauses deterministic. + */ struct StlClauseHash { std::size_t operator()(Clause* c) const { return std::hash()(c->number()); } }; +/** + * This function replaces the induction terms given in @b ts + * with static placeholders, so that already generated induction + * formulas can be easily detected. We allow multiple induction terms, + * so we have to index the placeholders as well with @b i. + */ Term* getPlaceholderForTerm(const vvector& ts, unsigned i); +/** + * Term transformer class that replaces + * terms according to the mapping @b _m. + */ class TermReplacement : public TermTransformer { public: TermReplacement(const vmap& m) : _m(m) {} @@ -86,6 +108,10 @@ class TermReplacement : public TermTransformer { vmap _m; }; +/** + * Same as @b TermReplacement, except we replace non-sort Skolems + * with variables, used for strengthening induction hypotheses. + */ class SkolemSquashingTermReplacement : public TermReplacement { public: SkolemSquashingTermReplacement(const vmap& m, unsigned& var) @@ -93,9 +119,15 @@ class SkolemSquashingTermReplacement : public TermReplacement { TermList transformSubterm(TermList trm) override; DHMap _tv; // maps terms to their variable replacement private: - unsigned& _v; // fresh variable counter supported by caller + unsigned& _v; // fresh variable counter supported by caller }; +/** + * Class representing an induction. This includes: + * - induction terms in @b _indTerms, + * - selected literals from clauses in @b _cls, + * which are inducted upon. + */ struct InductionContext { explicit InductionContext(vvector&& ts) : _indTerms(ts) {} @@ -113,6 +145,9 @@ struct InductionContext { node->second.push(lit); } + // These two functions should be only called on objects where + // all induction term occurrences actually inducted upon are + // replaced with placeholders (e.g. with ContextReplacement). Formula* getFormula(const vvector& r, bool opposite, Substitution* subst = nullptr) const; Formula* getFormulaWithSquashedSkolems(const vvector& r, bool opposite, unsigned& var, VList** varList = nullptr, Substitution* subst = nullptr) const; @@ -141,9 +176,20 @@ struct InductionContext { // clause as well. vunordered_map _cls; private: + /** + * Creates a formula which corresponds to the conjunction of disjunction + * of selected literals for each clause in @b _cls, where we apply the term + * replacement @b tr on each literal. Opposite means we get the negated + * formula, i.e. each literal is negated and conjunction and disjunction + * are switched. + */ Formula* getFormula(TermReplacement& tr, bool opposite) const; }; +/** + * Gives @b InductionContext instances with + * induction terms replaced with placeholders. + */ class ContextReplacement : public TermReplacement, public IteratorCore { public: @@ -159,6 +205,10 @@ class ContextReplacement bool _used; }; +/** + * Same as @b ContextReplacement but replaces only active occurrences + * of induction terms, given by a @b FunctionDefinitionHandler instance. + */ class ActiveOccurrenceContextReplacement : public ContextReplacement { public: @@ -176,6 +226,11 @@ class ActiveOccurrenceContextReplacement bool _hasNonActive; }; +/** + * Same as @b ContextReplacement but iterates over all non-empty + * subsets of occurrences of the induction terms and replaces + * only the occurrences in these subsets with placeholder terms. + */ class ContextSubsetReplacement : public ContextReplacement { public: @@ -201,6 +256,9 @@ class ContextSubsetReplacement bool _done; }; +/** + * The induction inference. + */ class Induction : public GeneratingInferenceEngine { @@ -227,6 +285,10 @@ class Induction InductionFormulaIndex _recFormulaIndex; }; +/** + * Helper class that generates all induction clauses for + * a premise and serves as an iterator for these clauses. + */ class InductionClauseIterator { public: @@ -265,8 +327,25 @@ class InductionClauseIterator void performStructInductionThree(const InductionContext& context, InductionFormulaIndex::Entry* e); void performRecursionInduction(const InductionContext& context, const InductionTemplate* templ, const vvector& typeArgs, InductionFormulaIndex::Entry* e); + /** + * Whether an induction formula is applicable (or has already been generated) + * is determined by its conclusion part, which is resolved against the literals + * and bounds we induct on. From this point of view, an integer induction formula + * can have one lower bound and/or one upper bound. This function wraps this + * information by adding the bounds and querying the index with the resulting context. + * + * TODO: default bounds are now stored as special cases with no bounds (this makes + * the resolve part easier) but this means some default bound induction formulas + * are duplicates of normal formulas. + */ bool notDoneInt(InductionContext context, Literal* bound1, Literal* bound2, InductionFormulaIndex::Entry*& e); + /** + * If the integer induction literal is a comparison, and the induction term is + * one of its arguments, the other argument should not be allowed as a bound + * (such inductions are useless and can lead to redundant literals in the + * induction axiom). + */ bool isValidBound(const InductionContext& context, const TermQueryResult& bound); Stack _clauses; diff --git a/Inferences/InductionHelper.cpp b/Inferences/InductionHelper.cpp index c60d48e08..9d5a40552 100644 --- a/Inferences/InductionHelper.cpp +++ b/Inferences/InductionHelper.cpp @@ -255,13 +255,11 @@ bool InductionHelper::isStructInductionTerm(Term* t) { Term* InductionHelper::getOtherTermFromComparison(Literal* l, Term* t) { if (isIntegerComparisonLiteral(l)) { + ASS(l->ground()); + ASS_EQ(l->arity(),2); for (unsigned i = 0; i < 2; ++i) { - TermList* tp1 = l->nthArgument(i); - if (tp1->isTerm() && t == tp1->term()) { - TermList* tp2 = l->nthArgument(1-i); - if (tp2->isTerm()) { - return tp2->term(); - } + if (l->termArg(i).term() == t) { + return l->termArg(1-i).term(); } } } diff --git a/Inferences/InductionHelper.hpp b/Inferences/InductionHelper.hpp index 4e3c7a047..a2629a5df 100644 --- a/Inferences/InductionHelper.hpp +++ b/Inferences/InductionHelper.hpp @@ -54,7 +54,7 @@ class InductionHelper { static bool isStructInductionTerm(Term* t); static bool isValidBound(Term* t, Clause* c, const TermQueryResult& b) { ASS(b.term.isTerm()); - return (b.clause != c && (t != b.term.term())); + return ((b.clause != c) && (t != b.term.term())); } static Term* getOtherTermFromComparison(Literal* l, Term* t); diff --git a/Kernel/Signature.cpp b/Kernel/Signature.cpp index 887097b44..0d1e0c0cf 100644 --- a/Kernel/Signature.cpp +++ b/Kernel/Signature.cpp @@ -702,7 +702,7 @@ unsigned Signature::getFnDef(unsigned fn) auto type = getFunction(fn)->fnType(); auto sort = type->result(); bool added = false; - auto name = "$def_"+sort.toString(); + auto name = "$def_"+getFunction(fn)->name(); unsigned p = addPredicate(name, 2, added); if (added) { ALWAYS(_fnDefPreds.insert(p)); diff --git a/Kernel/Signature.hpp b/Kernel/Signature.hpp index 5ca494dfa..38bd5eb89 100644 --- a/Kernel/Signature.hpp +++ b/Kernel/Signature.hpp @@ -435,7 +435,16 @@ class Signature unsigned getApp(); unsigned getDiff(); unsigned getChoice(); + /** + * For a function f with result type t, this introduces a predicate + * $def_f with the type t x t. This is used to track expressions of + * the form f(s) = s' as $def_f(f(s),s') through preprocessing. + */ unsigned getFnDef(unsigned fn); + /** + * For a predicate p, this introduces a predicate $def_p with the same signature, + * which is used to track a predicate definition "headers" through preprocessing. + */ unsigned getBoolDef(unsigned fn); // Interpreted symbol declarations diff --git a/Parse/SMTLIB2.cpp b/Parse/SMTLIB2.cpp index 680ee3cf6..bc82dd423 100644 --- a/Parse/SMTLIB2.cpp +++ b/Parse/SMTLIB2.cpp @@ -772,7 +772,7 @@ SMTLIB2::DeclaredSymbol SMTLIB2::declareFunctionOrPredicate(const vstring& name, // ---------------------------------------------------------------------- -bool shouldCreateFunctionDefinition(unsigned fn) +bool shouldCreateFunctionDefinition() { return env.options->functionDefinitionRewriting() || env.options->inductionOnActiveOccurrences() || env.options->structInduction()==Options::StructuralInductionKind::RECURSION; @@ -844,7 +844,7 @@ void SMTLIB2::readDefineFun(const vstring& name, LExprList* iArgs, LExpr* oSort, Literal* lit; if (isTrueFun) { TermList lhs(Term::create(symbIdx,args.size(),args.begin())); - if (shouldCreateFunctionDefinition(symbIdx)) { + if (shouldCreateFunctionDefinition()) { auto p = env.signature->getFnDef(symbIdx); auto defArgs = typeArgs; defArgs.push(lhs); @@ -854,7 +854,7 @@ void SMTLIB2::readDefineFun(const vstring& name, LExprList* iArgs, LExpr* oSort, lit = Literal::createEquality(true,lhs,rhs,rangeSort); } } else { - if (shouldCreateFunctionDefinition(symbIdx)) { + if (shouldCreateFunctionDefinition()) { auto p = env.signature->getBoolDef(symbIdx); lit = Literal::create(p,args.size(),true,false,args.begin()); } else { @@ -949,7 +949,7 @@ void SMTLIB2::readDefineFunsRec(LExprList* declsExpr, LExprList* defsExpr) Literal* lit; if (isTrueFun) { TermList lhs(Term::create(symbIdx,decl.args.size(),decl.args.begin())); - if (shouldCreateFunctionDefinition(symbIdx)) { + if (shouldCreateFunctionDefinition()) { auto p = env.signature->getFnDef(symbIdx); TermStack defArgs; // no type arguments (yet) in this case defArgs.push(lhs); @@ -959,7 +959,7 @@ void SMTLIB2::readDefineFunsRec(LExprList* declsExpr, LExprList* defsExpr) lit = Literal::createEquality(true,lhs,rhs,decl.rangeSort); } } else { - if (shouldCreateFunctionDefinition(symbIdx)) { + if (shouldCreateFunctionDefinition()) { auto p = env.signature->getBoolDef(symbIdx); lit = Literal::create(p,decl.args.size(),true,false,decl.args.begin()); } else { diff --git a/Shell/FunctionDefinitionHandler.cpp b/Shell/FunctionDefinitionHandler.cpp index 30747d7a2..819e162e1 100644 --- a/Shell/FunctionDefinitionHandler.cpp +++ b/Shell/FunctionDefinitionHandler.cpp @@ -287,11 +287,12 @@ bool InductionTemplate::checkUsefulness() const bool InductionTemplate::checkWellFoundedness() { - // fill in bit vector of induction variables vvector> relatedTerms; for (auto& b : _branches) { for (auto& r : b._recursiveCalls) { relatedTerms.push_back(make_pair(b._header, r)); + + // fill in bit vector of induction variables for (unsigned i = 0; i < _arity; i++) { if (env.signature->isTermAlgebraSort(_type->arg(i))) { _indPos[i] = _indPos[i] || (*b._header->nthArgument(i) != *r->nthArgument(i)); @@ -361,6 +362,10 @@ vstring InductionTemplate::toString() const return str.str(); } +/** + * Try to find a lexicographic order between the arguments + * by exhaustively trying all combinations. + */ bool checkWellFoundednessHelper(const vvector>& relatedTerms, const vset& indices, const vset& positions) { @@ -422,6 +427,10 @@ bool InductionPreprocessor::checkWellFoundedness(const vvector return checkWellFoundednessHelper(relatedTerms, indices, positions); } +/** + * Check well-definedness for term algebra arguments and + * in the process generate all missing cases. + */ bool InductionPreprocessor::checkWellDefinedness(const vvector& cases, vvector>& missingCases) { if (cases.empty()) { diff --git a/Shell/FunctionDefinitionHandler.hpp b/Shell/FunctionDefinitionHandler.hpp index be8ddbcde..747a24021 100644 --- a/Shell/FunctionDefinitionHandler.hpp +++ b/Shell/FunctionDefinitionHandler.hpp @@ -28,9 +28,9 @@ using namespace Kernel; using namespace Lib; /** - * Corresponds to the branches of a function definition. - * Stores the branches and the active positions - * (i.e. the changing arguments) of the function. + * Corresponds to the branches of a function definition, + * including recursive calls and the active argument positions + * which are not variables in some branch. */ struct InductionTemplate { USE_ALLOCATOR(InductionTemplate); diff --git a/Shell/Options.cpp b/Shell/Options.cpp index 6b58d094a..5f9a21e3f 100644 --- a/Shell/Options.cpp +++ b/Shell/Options.cpp @@ -1291,6 +1291,8 @@ void Options::init() _structInduction.onlyUsefulWith(Or(_induction.is(equal(Induction::STRUCTURAL)),_induction.is(equal(Induction::BOTH)))); _structInduction.addHardConstraint(If(equal(StructuralInductionKind::RECURSION)).then(_newCNF.is(equal(true)))); _structInduction.addHardConstraint(If(equal(StructuralInductionKind::RECURSION)).then(_equalityResolutionWithDeletion.is(equal(true)))); + _structInduction.addHardConstraint(If(equal(StructuralInductionKind::ALL)).then(_newCNF.is(equal(true)))); + _structInduction.addHardConstraint(If(equal(StructuralInductionKind::ALL)).then(_equalityResolutionWithDeletion.is(equal(true)))); _lookup.insert(&_structInduction); _intInduction = ChoiceOptionValue("int_induction_kind","iik", diff --git a/Shell/TermAlgebra.hpp b/Shell/TermAlgebra.hpp index 43f3800d9..0efecbe21 100644 --- a/Shell/TermAlgebra.hpp +++ b/Shell/TermAlgebra.hpp @@ -157,6 +157,11 @@ namespace Shell { unsigned getSubtermPredicate(); void getTypeSub(Kernel::Term* t, Kernel::Substitution& subst); + /** + * Given a set of (possibly variable) term algebra terms in @b availables + * and a term algebra term @b e, compute a new set of terms in @b availables + * which covers the same term algebra terms, except for terms covered by @b e. + */ static void excludeTermFromAvailables(Kernel::TermStack& availables, Kernel::TermList e, unsigned& var); friend std::ostream& operator<<(std::ostream& out, TermAlgebra const& self); From 2b98e3beb272ca6ea6be4db0d17cdccdef2be89c Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Thu, 14 Mar 2024 16:05:22 +0100 Subject: [PATCH 49/56] Allow function definition handling unconditionally in preprocessing --- Inferences/FunctionDefinitionRewriting.cpp | 4 +- Inferences/Induction.cpp | 15 +++---- Inferences/Induction.hpp | 10 ++--- Kernel/Problem.cpp | 7 +-- Kernel/Problem.hpp | 5 +-- Kernel/Signature.cpp | 2 +- Parse/SMTLIB2.cpp | 52 ++++++---------------- Saturation/SaturationAlgorithm.cpp | 3 +- Saturation/SaturationAlgorithm.hpp | 5 +-- Shell/FunctionDefinitionHandler.cpp | 8 +++- Shell/FunctionDefinitionHandler.hpp | 7 +-- Shell/Preprocess.cpp | 8 +--- Test/GenerationTester.hpp | 10 ++++- UnitTests/tFunctionDefinitionHandler.cpp | 2 +- UnitTests/tFunctionDefinitionRewriting.cpp | 30 ++++++++----- UnitTests/tInduction.cpp | 32 +++++++------ 16 files changed, 90 insertions(+), 110 deletions(-) diff --git a/Inferences/FunctionDefinitionRewriting.cpp b/Inferences/FunctionDefinitionRewriting.cpp index 6b77c3825..c524f90aa 100644 --- a/Inferences/FunctionDefinitionRewriting.cpp +++ b/Inferences/FunctionDefinitionRewriting.cpp @@ -46,7 +46,7 @@ Kernel::ClauseIterator FunctionDefinitionRewriting::generateClauses(Clause *prem }) .flatMap([this](std::pair arg){ return pvi(pushPairIntoRightIterator(arg, - GeneratingInferenceEngine::_salg->getFunctionDefinitionHandler()->getGeneralizations(arg.second))); + GeneratingInferenceEngine::_salg->getFunctionDefinitionHandler().getGeneralizations(arg.second))); }) .map([premise](std::pair, TermQueryResult> arg) { TermQueryResult &qr = arg.second; @@ -81,7 +81,7 @@ bool FunctionDefinitionRewriting::perform(Clause* cl, Clause*& replacement, Clau bool toplevelCheck = salg->getOptions().demodulationRedundancyCheck()!=Options::DemodulationRedunancyCheck::OFF && lit->isEquality() && (trm==*lit->nthArgument(0) || trm==*lit->nthArgument(1)); - auto git = salg->getFunctionDefinitionHandler()->getGeneralizations(trm); + auto git = salg->getFunctionDefinitionHandler().getGeneralizations(trm); while (git.hasNext()) { TermQueryResult qr = git.next(); if (qr.clause->length() != 1) { diff --git a/Inferences/Induction.cpp b/Inferences/Induction.cpp index 04eb86b0d..360c6fb99 100644 --- a/Inferences/Induction.cpp +++ b/Inferences/Induction.cpp @@ -49,8 +49,7 @@ using namespace Lib; Term* ActiveOccurrenceIterator::next() { Term* t = _stack.pop(); - InductionTemplate* templ = _fnDefHandler ? - _fnDefHandler->getInductionTemplate(t) : nullptr; + InductionTemplate* templ = _fnDefHandler.getInductionTemplate(t); if (templ) { // if there is an induction template, // only induct on the active occurrences @@ -218,7 +217,7 @@ InductionContext ContextReplacement::next() } ActiveOccurrenceContextReplacement::ActiveOccurrenceContextReplacement( - const InductionContext& context, FunctionDefinitionHandler* fnDefHandler) + const InductionContext& context, FunctionDefinitionHandler& fnDefHandler) : ContextReplacement(context), _fnDefHandler(fnDefHandler), _iteration(_context._indTerms.size(),0), @@ -257,7 +256,7 @@ InductionContext ActiveOccurrenceContextReplacement::next() auto kv = stack.pop(); auto t = kv.first; auto active = kv.second; - auto templ = _fnDefHandler->getInductionTemplate(t); + auto templ = _fnDefHandler.getInductionTemplate(t); for (unsigned k = 0; k < t->arity(); k++) { stack.push(make_pair(t->nthArgument(k)->term(), active && templ ? templ->inductionPositions()[k] : active)); @@ -282,7 +281,7 @@ InductionContext ActiveOccurrenceContextReplacement::next() return context; } -VirtualIterator contextReplacementInstance(const InductionContext& context, const Options& opt, FunctionDefinitionHandler* fnDefHandler) +VirtualIterator contextReplacementInstance(const InductionContext& context, const Options& opt, FunctionDefinitionHandler& fnDefHandler) { auto ctx = context; auto res = VirtualIterator::getEmpty(); @@ -585,8 +584,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) Set int_terms; vmap,vset>>> ta_terms; - auto templ = _fnDefHandler ? - _fnDefHandler->getInductionTemplate(lit) : nullptr; + auto templ = _fnDefHandler.getInductionTemplate(lit); if (templ) { vvector indTerms; if (templ->matchesTerm(lit, indTerms)) { @@ -626,8 +624,7 @@ void InductionClauseIterator::processLiteral(Clause* premise, Literal* lit) int_terms.insert(t); } } - auto templ = _fnDefHandler ? - _fnDefHandler->getInductionTemplate(t) : nullptr; + auto templ = _fnDefHandler.getInductionTemplate(t); if (templ) { vvector indTerms; if (templ->matchesTerm(t, indTerms)) { diff --git a/Inferences/Induction.hpp b/Inferences/Induction.hpp index 9a0cb6dd5..6a3b75c55 100644 --- a/Inferences/Induction.hpp +++ b/Inferences/Induction.hpp @@ -58,7 +58,7 @@ class ActiveOccurrenceIterator : public IteratorCore { public: - ActiveOccurrenceIterator(Term* term, FunctionDefinitionHandler* fnDefHandler) + ActiveOccurrenceIterator(Term* term, FunctionDefinitionHandler& fnDefHandler) : _stack(8), _fnDefHandler(fnDefHandler) { _stack.push(term); @@ -70,7 +70,7 @@ class ActiveOccurrenceIterator Term* next() override; private: Stack _stack; - FunctionDefinitionHandler* _fnDefHandler; + FunctionDefinitionHandler& _fnDefHandler; }; /** @@ -212,7 +212,7 @@ class ContextReplacement class ActiveOccurrenceContextReplacement : public ContextReplacement { public: - ActiveOccurrenceContextReplacement(const InductionContext& context, FunctionDefinitionHandler* fnDefHandler); + ActiveOccurrenceContextReplacement(const InductionContext& context, FunctionDefinitionHandler& fnDefHandler); InductionContext next() override; bool hasNonActive() const { return _hasNonActive; } @@ -220,7 +220,7 @@ class ActiveOccurrenceContextReplacement TermList transformSubterm(TermList trm) override; private: - FunctionDefinitionHandler* _fnDefHandler; + FunctionDefinitionHandler& _fnDefHandler; vvector _iteration; vvector _matchCount; bool _hasNonActive; @@ -353,7 +353,7 @@ class InductionClauseIterator const Options& _opt; TermIndex* _structInductionTermIndex; InductionFormulaIndex& _formulaIndex; - FunctionDefinitionHandler* _fnDefHandler; + FunctionDefinitionHandler& _fnDefHandler; }; }; diff --git a/Kernel/Problem.cpp b/Kernel/Problem.cpp index 846925244..8d9000ccc 100644 --- a/Kernel/Problem.cpp +++ b/Kernel/Problem.cpp @@ -39,7 +39,7 @@ using namespace Kernel; * The new object takes ownership of the list @c units. */ Problem::Problem(UnitList* units) -: _units(0), _smtlibLogic(SMTLIBLogic::SMT_UNDEFINED), _property(0) +: _units(0), _fnDefHandler(new FunctionDefinitionHandler()), _smtlibLogic(SMTLIBLogic::SMT_UNDEFINED), _property(0) { initValues(); @@ -237,11 +237,6 @@ void Problem::addPartiallyEliminatedPredicate(unsigned pred, Unit* definition) _partiallyDeletedPredicates.insert(pred,definition); } -void Problem::addFunctionDefinitionHandler(Shell::FunctionDefinitionHandler* handler) -{ - _fnDefHandler = handler; -} - /** * Recalculate the property from the current set of formulas */ diff --git a/Kernel/Problem.hpp b/Kernel/Problem.hpp index 3964c2705..a8239aa2e 100644 --- a/Kernel/Problem.hpp +++ b/Kernel/Problem.hpp @@ -79,13 +79,12 @@ class Problem { void addEliminatedFunction(unsigned func, Literal* definition); void addEliminatedPredicate(unsigned pred, Unit* definition); - void addPartiallyEliminatedPredicate(unsigned pred, Unit* definition); - void addFunctionDefinitionHandler(FunctionDefinitionHandler* handler); + void addPartiallyEliminatedPredicate(unsigned pred, Unit* definition); DHMap getEliminatedFunctions(){ return _deletedFunctions; } DHMap getEliminatedPredicates(){ return _deletedPredicates; } DHMap getPartiallyEliminatedPredicates(){ return _partiallyDeletedPredicates;} - FunctionDefinitionHandler* getFunctionDefinitionHandler(){ return _fnDefHandler.ptr(); } + FunctionDefinitionHandler& getFunctionDefinitionHandler(){ return *_fnDefHandler; } bool isPropertyUpToDate() const { return _propertyValid; } diff --git a/Kernel/Signature.cpp b/Kernel/Signature.cpp index 0d1e0c0cf..0e200cb2e 100644 --- a/Kernel/Signature.cpp +++ b/Kernel/Signature.cpp @@ -703,7 +703,7 @@ unsigned Signature::getFnDef(unsigned fn) auto sort = type->result(); bool added = false; auto name = "$def_"+getFunction(fn)->name(); - unsigned p = addPredicate(name, 2, added); + unsigned p = addPredicate(name, 2+type->numTypeArguments(), added); if (added) { ALWAYS(_fnDefPreds.insert(p)); OperatorType* ot = OperatorType::getPredicateType({sort, sort}, type->numTypeArguments()); diff --git a/Parse/SMTLIB2.cpp b/Parse/SMTLIB2.cpp index a9915d18a..39e369f6a 100644 --- a/Parse/SMTLIB2.cpp +++ b/Parse/SMTLIB2.cpp @@ -772,12 +772,6 @@ SMTLIB2::DeclaredSymbol SMTLIB2::declareFunctionOrPredicate(const vstring& name, // ---------------------------------------------------------------------- -bool shouldCreateFunctionDefinition() -{ - return env.options->functionDefinitionRewriting() || env.options->inductionOnActiveOccurrences() || - env.options->structInduction()==Options::StructuralInductionKind::RECURSION; -} - void SMTLIB2::readDefineFun(const vstring& name, LExprList* iArgs, LExpr* oSort, LExpr* body, const TermStack& typeArgs, bool recursive) { if (isAlreadyKnownSymbol(name)) { @@ -844,23 +838,14 @@ void SMTLIB2::readDefineFun(const vstring& name, LExprList* iArgs, LExpr* oSort, Literal* lit; if (isTrueFun) { TermList lhs(Term::create(symbIdx,args.size(),args.begin())); - if (shouldCreateFunctionDefinition()) { - auto p = env.signature->getFnDef(symbIdx); - auto defArgs = typeArgs; - defArgs.push(lhs); - defArgs.push(rhs); - lit = Literal::create(p,defArgs.size(),true,false,defArgs.begin()); - } else { - lit = Literal::createEquality(true,lhs,rhs,rangeSort); - } + auto p = env.signature->getFnDef(symbIdx); + auto defArgs = typeArgs; + defArgs.push(lhs); + defArgs.push(rhs); + lit = Literal::create(p,defArgs.size(),true,false,defArgs.begin()); } else { - if (shouldCreateFunctionDefinition()) { - auto p = env.signature->getBoolDef(symbIdx); - lit = Literal::create(p,args.size(),true,false,args.begin()); - } else { - lit = Literal::create(symbIdx,args.size(),true,false,args.begin()); - } - TermList lhs(Term::createFormula(new AtomicFormula(lit))); + auto p = env.signature->getBoolDef(symbIdx); + TermList lhs(Term::createFormula(new AtomicFormula(Literal::create(p,args.size(),true,false,args.begin())))); lit = Literal::createEquality(true, lhs, rhs, rangeSort); } Formula* fla = new AtomicFormula(lit); @@ -949,23 +934,14 @@ void SMTLIB2::readDefineFunsRec(LExprList* declsExpr, LExprList* defsExpr) Literal* lit; if (isTrueFun) { TermList lhs(Term::create(symbIdx,decl.args.size(),decl.args.begin())); - if (shouldCreateFunctionDefinition()) { - auto p = env.signature->getFnDef(symbIdx); - TermStack defArgs; // no type arguments (yet) in this case - defArgs.push(lhs); - defArgs.push(rhs); - lit = Literal::create(p,defArgs.size(),true,false,defArgs.begin()); - } else { - lit = Literal::createEquality(true,lhs,rhs,decl.rangeSort); - } + auto p = env.signature->getFnDef(symbIdx); + TermStack defArgs; // no type arguments (yet) in this case + defArgs.push(lhs); + defArgs.push(rhs); + lit = Literal::create(p,defArgs.size(),true,false,defArgs.begin()); } else { - if (shouldCreateFunctionDefinition()) { - auto p = env.signature->getBoolDef(symbIdx); - lit = Literal::create(p,decl.args.size(),true,false,decl.args.begin()); - } else { - lit = Literal::create(symbIdx,decl.args.size(),true,false,decl.args.begin()); - } - TermList lhs(Term::createFormula(new AtomicFormula(lit))); + auto p = env.signature->getBoolDef(symbIdx); + TermList lhs(Term::createFormula(new AtomicFormula(Literal::create(p,decl.args.size(),true,false,decl.args.begin())))); lit = Literal::createEquality(true, lhs, rhs, decl.rangeSort); } Formula* fla = new AtomicFormula(lit); diff --git a/Saturation/SaturationAlgorithm.cpp b/Saturation/SaturationAlgorithm.cpp index e21aafdda..4aea00e58 100644 --- a/Saturation/SaturationAlgorithm.cpp +++ b/Saturation/SaturationAlgorithm.cpp @@ -224,7 +224,7 @@ SaturationAlgorithm::SaturationAlgorithm(Problem& prb, const Options& opt) _clauseActivationInProgress(false), _fwSimplifiers(0), _simplifiers(0), _bwSimplifiers(0), _splitter(0), _consFinder(0), _labelFinder(0), _symEl(0), _answerLiteralManager(0), - _instantiation(0), _fnDefHandler(0), + _instantiation(0), _fnDefHandler(prb.getFunctionDefinitionHandler()), _generatedClauseCount(0), _activationLimit(0) { @@ -1500,7 +1500,6 @@ SaturationAlgorithm* SaturationAlgorithm::createFromOptions(Problem& prb, const if(opt.splitting()){ res->_splitter = new Splitter(); } - res->_fnDefHandler = prb.getFunctionDefinitionHandler(); // create generating inference engine CompositeGIE* gie=new CompositeGIE(); diff --git a/Saturation/SaturationAlgorithm.hpp b/Saturation/SaturationAlgorithm.hpp index d25381691..e32131958 100644 --- a/Saturation/SaturationAlgorithm.hpp +++ b/Saturation/SaturationAlgorithm.hpp @@ -125,8 +125,7 @@ class SaturationAlgorithm : public MainLoop static void tryUpdateFinalClauseCount(); Splitter* getSplitter() { return _splitter; } - FunctionDefinitionHandler* getFunctionDefinitionHandler() const { return _fnDefHandler; } - void setFunctionDefinitionHandler(FunctionDefinitionHandler* fnDefHandler) { _fnDefHandler = fnDefHandler; } + FunctionDefinitionHandler& getFunctionDefinitionHandler() const { return _fnDefHandler; } protected: virtual void init(); @@ -218,7 +217,7 @@ class SaturationAlgorithm : public MainLoop SymElOutput* _symEl; AnswerLiteralManager* _answerLiteralManager; Instantiation* _instantiation; - FunctionDefinitionHandler* _fnDefHandler; + FunctionDefinitionHandler& _fnDefHandler; SubscriptionData _passiveContRemovalSData; SubscriptionData _activeContRemovalSData; diff --git a/Shell/FunctionDefinitionHandler.cpp b/Shell/FunctionDefinitionHandler.cpp index 819e162e1..296c4067e 100644 --- a/Shell/FunctionDefinitionHandler.cpp +++ b/Shell/FunctionDefinitionHandler.cpp @@ -44,8 +44,12 @@ inline bool canBeUsedForRewriting(Term* lhs, Clause* cl) return true; } -void FunctionDefinitionHandler::preprocess(Problem& prb) +void FunctionDefinitionHandler::initAndPreprocess(Problem& prb) { + // reset state + _is = new CodeTreeTIS(); + _templates.reset(); + UnitList::DelIterator it(prb.units()); while (it.hasNext()) { auto u = it.next(); @@ -108,7 +112,7 @@ void FunctionDefinitionHandler::preprocess(Problem& prb) defCl->setSplits(SplitSet::getEmpty()); defCl->incRefCnt(); ASS_EQ(condLits.size()+1,lits.size()); - _is.insert(lhs.term(), lits.top(), defCl); + _is->insert(lhs.term(), lits.top(), defCl); // TODO should we store this clause anywhere else? } else { it.replace(defCl); diff --git a/Shell/FunctionDefinitionHandler.hpp b/Shell/FunctionDefinitionHandler.hpp index 747a24021..3ef7ae8b2 100644 --- a/Shell/FunctionDefinitionHandler.hpp +++ b/Shell/FunctionDefinitionHandler.hpp @@ -82,12 +82,13 @@ class FunctionDefinitionHandler public: USE_ALLOCATOR(FunctionDefinitionHandler); - void preprocess(Problem& prb); + /* has to be called before using other functionality of the handler */ + void initAndPreprocess(Problem& prb); void addFunctionBranch(Term* header, TermList body); void addPredicateBranch(Literal* header, const LiteralStack& conditions); TermQueryResultIterator getGeneralizations(TypedTermList t) { - return _is.getGeneralizations(t, true); + return _is->getGeneralizations(t, true); } InductionTemplate* getInductionTemplate(Term* t) { @@ -97,7 +98,7 @@ class FunctionDefinitionHandler } private: - CodeTreeTIS _is; + ScopedPtr _is; DHMap, InductionTemplate> _templates; }; diff --git a/Shell/Preprocess.cpp b/Shell/Preprocess.cpp index dffb351f5..c211ef25d 100644 --- a/Shell/Preprocess.cpp +++ b/Shell/Preprocess.cpp @@ -367,13 +367,7 @@ void Preprocess::preprocess(Problem& prb) resolver.apply(prb); } - if (_options.functionDefinitionRewriting() || _options.inductionOnActiveOccurrences() || - _options.structInduction()==Options::StructuralInductionKind::RECURSION) - { - auto fnDefHandler = new FunctionDefinitionHandler(); - fnDefHandler->preprocess(prb); - prb.addFunctionDefinitionHandler(fnDefHandler); - } + prb.getFunctionDefinitionHandler().initAndPreprocess(prb); if (_options.generalSplitting()) { if (prb.isHigherOrder() || prb.hasPolymorphicSym()) { // TODO: extend GeneralSplitting to support polymorphism (would higher-order make sense?) diff --git a/Test/GenerationTester.hpp b/Test/GenerationTester.hpp index 1efd7992b..41dec9375 100644 --- a/Test/GenerationTester.hpp +++ b/Test/GenerationTester.hpp @@ -116,7 +116,7 @@ class TestCase } \ BUILDER_METHOD(Clause*, input) - BUILDER_METHOD(Stack, context) + BUILDER_METHOD(ClauseStack, context) BUILDER_METHOD(Stack, expected) BUILDER_METHOD(bool, premiseRedundant) BUILDER_METHOD(SimplifyingGeneratingInference*, rule) @@ -131,9 +131,15 @@ class TestCase // set up saturation algorithm auto container = PlainClauseContainer(); + + // init problem Problem p; - Options o; + auto ul = UnitList::empty(); + UnitList::pushFromIterator(ClauseStack::Iterator(_context), ul); + p.addUnits(ul); env.setMainProblem(&p); + + Options o; for (const auto& kv : _options) { o.set(kv.first, kv.second); env.options->set(kv.first, kv.second); diff --git a/UnitTests/tFunctionDefinitionHandler.cpp b/UnitTests/tFunctionDefinitionHandler.cpp index f9d899837..dd5f1d869 100644 --- a/UnitTests/tFunctionDefinitionHandler.cpp +++ b/UnitTests/tFunctionDefinitionHandler.cpp @@ -51,7 +51,7 @@ inline void addFunctionDefs(FunctionDefinitionHandler& handler, std::initializer Problem prb; prb.addUnits(ul); - handler.preprocess(prb); + handler.initAndPreprocess(prb); } inline void checkTemplateBranches(FunctionDefinitionHandler& handler, TermSugar t, const vvector>>& expected) { diff --git a/UnitTests/tFunctionDefinitionRewriting.cpp b/UnitTests/tFunctionDefinitionRewriting.cpp index 992bac299..a282244fb 100644 --- a/UnitTests/tFunctionDefinitionRewriting.cpp +++ b/UnitTests/tFunctionDefinitionRewriting.cpp @@ -42,25 +42,26 @@ namespace FunctionDefinitionRewritingTest { DECL_PRED(p, {s}) auto setup = [](SaturationAlgorithm& salg) { - __ALLOW_UNUSED(MY_SYNTAX_SUGAR); + salg.getFunctionDefinitionHandler().initAndPreprocess(salg.getProblem()); +}; - auto ul = UnitList::empty(); - UnitList::push(clause({ def_s(f(b,y), y) }), ul); - UnitList::push(clause({ def_s(f(r(x),y), f(x,r(y))), x != b() }), ul); - UnitList::push(clause({ def_s(f(r(x),y), f(x,y)), x == r(b()) }), ul); +ClauseStack fnDefContext() { + __ALLOW_UNUSED(MY_SYNTAX_SUGAR); - UnitList::push(clause({ def_s(g(b()), f(b(),b())) }), ul); - UnitList::push(clause({ def_s(g(r(r(x))), f(r(x),g(x))), p(x), x != b() }), ul); + return { + clause({ def_s(f(b,y), y) }), + clause({ def_s(f(r(x),y), f(x,r(y))), x != b() }), + clause({ def_s(f(r(x),y), f(x,y)), x == r(b()) }), - Problem prb; - prb.addUnits(ul); - salg.setFunctionDefinitionHandler(new Shell::FunctionDefinitionHandler()); - salg.getFunctionDefinitionHandler()->preprocess(prb); -}; + clause({ def_s(g(b()), f(b(),b())) }), + clause({ def_s(g(r(r(x))), f(r(x),g(x))), p(x), x != b() }), + }; +} TEST_GENERATION(test_01, Generation::TestCase() .setup(setup) + .context(fnDefContext()) .options({ { "function_definition_rewriting", "on"} }) .input( clause({ b != f(b, y), p(x) })) .expected(exactly( @@ -71,6 +72,7 @@ TEST_GENERATION(test_01, TEST_GENERATION(test_02, Generation::TestCase() .setup(setup) + .context(fnDefContext()) .options({ { "function_definition_rewriting", "on"} }) .input( clause({ g(b) == g(r(x)), p(x) })) .expected(exactly( @@ -82,6 +84,7 @@ TEST_GENERATION(test_02, TEST_GENERATION(test_03, Generation::TestCase() .setup(setup) + .context(fnDefContext()) .options({ { "function_definition_rewriting", "on"} }) .input( clause({ g(r(x)) == f(x, r(x)) })) .expected(none()) @@ -91,6 +94,7 @@ TEST_GENERATION(test_03, TEST_GENERATION(test_04, Generation::TestCase() .setup(setup) + .context(fnDefContext()) .options({ { "function_definition_rewriting", "on"} }) .input( clause({ f(r(b),f(b, y)) == f(y, r(y)) })) .expected({ @@ -104,6 +108,7 @@ TEST_GENERATION(test_04, TEST_GENERATION(test_05, Generation::TestCase() .setup(setup) + .context(fnDefContext()) .options({ { "function_definition_rewriting", "on"} }) .input( clause({ g(r(r(r(b)))) != b, g(b) == b })) .expected({ @@ -116,6 +121,7 @@ TEST_GENERATION(test_05, TEST_GENERATION(test_06, Generation::TestCase() .setup(setup) + .context(fnDefContext()) .options({ { "function_definition_rewriting", "on"} }) .input( clause({ f(b,b) == b })) .expected(none()) diff --git a/UnitTests/tInduction.cpp b/UnitTests/tInduction.cpp index e1a3ae287..7ae32a6c3 100644 --- a/UnitTests/tInduction.cpp +++ b/UnitTests/tInduction.cpp @@ -1130,28 +1130,29 @@ TEST_GENERATION_INDUCTION(test_33, // auto setup = [](SaturationAlgorithm& salg) { - __ALLOW_UNUSED(MY_SYNTAX_SUGAR); + salg.getFunctionDefinitionHandler().initAndPreprocess(salg.getProblem()); +}; - auto ul = UnitList::empty(); - UnitList::push(clause({ def_s(f(b,y), y) }), ul); - UnitList::push(clause({ def_s(f(r(x),b), f(x,x)) }), ul); - UnitList::push(clause({ def_s(f(r(x),r(y)), h(f(x,g(y)),f(r(x),y))) }), ul); +ClauseStack fnDefContext() { + __ALLOW_UNUSED(MY_SYNTAX_SUGAR); - UnitList::push(clause({ def_s(h(b,y), y) }), ul); - UnitList::push(clause({ def_s(h(r(x),y), h(x,y)) }), ul); + return { + clause({ def_s(f(b,y), y) }), + clause({ def_s(f(r(x),b), f(x,x)) }), + clause({ def_s(f(r(x),r(y)), h(f(x,g(y)),f(r(x),y))) }), - UnitList::push(clause({ def_p(b()) }), ul); - UnitList::push(clause({ ~def_p(r(r(x))), p(x), x != b() }), ul); + clause({ def_s(h(b,y), y) }), + clause({ def_s(h(r(x),y), h(x,y)) }), - Problem prb; - prb.addUnits(ul); - salg.setFunctionDefinitionHandler(new Shell::FunctionDefinitionHandler()); - salg.getFunctionDefinitionHandler()->preprocess(prb); -}; + clause({ def_p(b()) }), + clause({ ~def_p(r(r(x))), p(x), x != b() }), + }; +} TEST_GENERATION_INDUCTION(test_34, Generation::TestCase() .setup(setup) + .context(fnDefContext()) .options({ { "induction", "struct" }, { "structural_induction_kind", "recursion" }, @@ -1167,6 +1168,7 @@ TEST_GENERATION_INDUCTION(test_34, TEST_GENERATION_INDUCTION(test_35, Generation::TestCase() .setup(setup) + .context(fnDefContext()) .options({ { "induction", "struct" }, { "structural_induction_kind", "recursion" }, @@ -1188,6 +1190,7 @@ TEST_GENERATION_INDUCTION(test_35, TEST_GENERATION_INDUCTION(test_36, Generation::TestCase() .setup(setup) + .context(fnDefContext()) .options({ { "induction", "struct" }, { "induction_on_active_occurrences", "on" }, @@ -1210,6 +1213,7 @@ TEST_GENERATION_INDUCTION(test_36, TEST_GENERATION_INDUCTION(test_37, Generation::TestCase() .setup(setup) + .context(fnDefContext()) .options({ { "induction", "struct" }, { "induction_on_active_occurrences", "on" }, From 3a0ceb822d1ce4d807e134a5e42ab6706e0ecf22 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Thu, 14 Mar 2024 20:43:03 +0100 Subject: [PATCH 50/56] Review --- Kernel/Signature.hpp | 1 + Shell/FunctionDefinitionHandler.cpp | 9 +++------ Shell/FunctionDefinitionHandler.hpp | 2 +- Shell/Preprocess.cpp | 4 +++- UnitTests/tFunctionDefinitionHandler.cpp | 3 ++- UnitTests/tFunctionDefinitionRewriting.cpp | 2 +- UnitTests/tInduction.cpp | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Kernel/Signature.hpp b/Kernel/Signature.hpp index 38bd5eb89..fba66c61f 100644 --- a/Kernel/Signature.hpp +++ b/Kernel/Signature.hpp @@ -645,6 +645,7 @@ class Signature Stack &distinctGroupMembers(){ return _distinctGroupMembers; } bool hasTermAlgebras() { return !_termAlgebras.isEmpty(); } + bool hasDefPreds() const { return !_fnDefPreds.isEmpty() || !_boolDefPreds.isEmpty(); } static vstring key(const vstring& name,int arity); diff --git a/Shell/FunctionDefinitionHandler.cpp b/Shell/FunctionDefinitionHandler.cpp index 348923a41..0439c620d 100644 --- a/Shell/FunctionDefinitionHandler.cpp +++ b/Shell/FunctionDefinitionHandler.cpp @@ -27,9 +27,6 @@ namespace Shell { inline bool canBeUsedForRewriting(Term* lhs, Clause* cl) { - if (!env.options->functionDefinitionRewriting()) { - return false; - } // TODO: we are using a codetree to get the generalizations // for rewriting and it cannot handle unbound variables on // the indexed side, hence we check if there are any variables @@ -44,7 +41,7 @@ inline bool canBeUsedForRewriting(Term* lhs, Clause* cl) return true; } -void FunctionDefinitionHandler::initAndPreprocess(Problem& prb) +void FunctionDefinitionHandler::initAndPreprocess(Problem& prb, const Options& opts) { // reset state _is = new CodeTreeTIS(); @@ -107,7 +104,7 @@ void FunctionDefinitionHandler::initAndPreprocess(Problem& prb) addFunctionBranch(lhs.term(), rhs); // process for rewriting - if (canBeUsedForRewriting(lhs.term(), defCl)) { + if (opts.functionDefinitionRewriting() && canBeUsedForRewriting(lhs.term(), defCl)) { it.del(); // take ownership defCl->setSplits(SplitSet::getEmpty()); defCl->incRefCnt(); @@ -131,7 +128,7 @@ void FunctionDefinitionHandler::initAndPreprocess(Problem& prb) tIt.del(); continue; } - if (env.options->showInduction()) { + if (opts.showInduction()) { cout << "[Induction] added induction template: " << ptr->toString() << endl; } } diff --git a/Shell/FunctionDefinitionHandler.hpp b/Shell/FunctionDefinitionHandler.hpp index 3ef7ae8b2..6d1fcf470 100644 --- a/Shell/FunctionDefinitionHandler.hpp +++ b/Shell/FunctionDefinitionHandler.hpp @@ -83,7 +83,7 @@ class FunctionDefinitionHandler USE_ALLOCATOR(FunctionDefinitionHandler); /* has to be called before using other functionality of the handler */ - void initAndPreprocess(Problem& prb); + void initAndPreprocess(Problem& prb, const Options& opts); void addFunctionBranch(Term* header, TermList body); void addPredicateBranch(Literal* header, const LiteralStack& conditions); diff --git a/Shell/Preprocess.cpp b/Shell/Preprocess.cpp index 3090b9b39..469bd7a1f 100644 --- a/Shell/Preprocess.cpp +++ b/Shell/Preprocess.cpp @@ -364,7 +364,9 @@ void Preprocess::preprocess(Problem& prb) resolver.apply(prb); } - prb.getFunctionDefinitionHandler().initAndPreprocess(prb); + if (env.signature->hasDefPreds()) { + prb.getFunctionDefinitionHandler().initAndPreprocess(prb,_options); + } if (_options.generalSplitting()) { if (prb.isHigherOrder() || prb.hasPolymorphicSym()) { // TODO: extend GeneralSplitting to support polymorphism (would higher-order make sense?) diff --git a/UnitTests/tFunctionDefinitionHandler.cpp b/UnitTests/tFunctionDefinitionHandler.cpp index dd5f1d869..27fe959ec 100644 --- a/UnitTests/tFunctionDefinitionHandler.cpp +++ b/UnitTests/tFunctionDefinitionHandler.cpp @@ -50,8 +50,9 @@ inline void addFunctionDefs(FunctionDefinitionHandler& handler, std::initializer } Problem prb; prb.addUnits(ul); + Options opts; - handler.initAndPreprocess(prb); + handler.initAndPreprocess(prb,opts); } inline void checkTemplateBranches(FunctionDefinitionHandler& handler, TermSugar t, const vvector>>& expected) { diff --git a/UnitTests/tFunctionDefinitionRewriting.cpp b/UnitTests/tFunctionDefinitionRewriting.cpp index a282244fb..e5512d6a2 100644 --- a/UnitTests/tFunctionDefinitionRewriting.cpp +++ b/UnitTests/tFunctionDefinitionRewriting.cpp @@ -42,7 +42,7 @@ namespace FunctionDefinitionRewritingTest { DECL_PRED(p, {s}) auto setup = [](SaturationAlgorithm& salg) { - salg.getFunctionDefinitionHandler().initAndPreprocess(salg.getProblem()); + salg.getFunctionDefinitionHandler().initAndPreprocess(salg.getProblem(),salg.getOptions()); }; ClauseStack fnDefContext() { diff --git a/UnitTests/tInduction.cpp b/UnitTests/tInduction.cpp index 7ae32a6c3..1a40610be 100644 --- a/UnitTests/tInduction.cpp +++ b/UnitTests/tInduction.cpp @@ -1130,7 +1130,7 @@ TEST_GENERATION_INDUCTION(test_33, // auto setup = [](SaturationAlgorithm& salg) { - salg.getFunctionDefinitionHandler().initAndPreprocess(salg.getProblem()); + salg.getFunctionDefinitionHandler().initAndPreprocess(salg.getProblem(),salg.getOptions()); }; ClauseStack fnDefContext() { From 6425cfae78d2308edf00074ebc8e7f40467eec80 Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Fri, 15 Mar 2024 10:04:50 +0100 Subject: [PATCH 51/56] park samplers in their own directory --- samplerFNT.txt => samplers/samplerFNT.txt | 0 samplerFOL.txt => samplers/samplerFOL.txt | 0 samplerIND.txt => samplers/samplerIND.txt | 0 samplerSMT.txt => samplers/samplerSMT.txt | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename samplerFNT.txt => samplers/samplerFNT.txt (100%) rename samplerFOL.txt => samplers/samplerFOL.txt (100%) rename samplerIND.txt => samplers/samplerIND.txt (100%) rename samplerSMT.txt => samplers/samplerSMT.txt (100%) diff --git a/samplerFNT.txt b/samplers/samplerFNT.txt similarity index 100% rename from samplerFNT.txt rename to samplers/samplerFNT.txt diff --git a/samplerFOL.txt b/samplers/samplerFOL.txt similarity index 100% rename from samplerFOL.txt rename to samplers/samplerFOL.txt diff --git a/samplerIND.txt b/samplers/samplerIND.txt similarity index 100% rename from samplerIND.txt rename to samplers/samplerIND.txt diff --git a/samplerSMT.txt b/samplers/samplerSMT.txt similarity index 100% rename from samplerSMT.txt rename to samplers/samplerSMT.txt From d3f804366910930879bf28448e074a4fdc7aade9 Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Fri, 15 Mar 2024 10:19:26 +0100 Subject: [PATCH 52/56] help users understand better how to get proper instruction limiting --- Lib/Timer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/Timer.cpp b/Lib/Timer.cpp index 0004f0925..3ed585b16 100644 --- a/Lib/Timer.cpp +++ b/Lib/Timer.cpp @@ -158,6 +158,7 @@ void Timer::updateInstructionCount() // however, we definitely want this to be guarded by env.options->instructionLimit() // not to bother with the error people who don't even know about instruction limiting cerr << "perf_event_open failed (instruction limiting will be disabled): " << error_to_report << endl; + cerr << "(If you are seeing 'Permission denied' ask your admin to run 'sudo sysctl -w kernel.perf_event_paranoid=-1' for you.)" << endl; error_to_report = nullptr; } #endif From e991cd889d8425f5760a6c37dddc44440c952419 Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Fri, 15 Mar 2024 11:37:35 +0100 Subject: [PATCH 53/56] Change to assertion --- Shell/FunctionDefinitionHandler.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Shell/FunctionDefinitionHandler.cpp b/Shell/FunctionDefinitionHandler.cpp index 0439c620d..832d556fb 100644 --- a/Shell/FunctionDefinitionHandler.cpp +++ b/Shell/FunctionDefinitionHandler.cpp @@ -50,9 +50,7 @@ void FunctionDefinitionHandler::initAndPreprocess(Problem& prb, const Options& o UnitList::DelIterator it(prb.units()); while (it.hasNext()) { auto u = it.next(); - if (!u->isClause()) { - continue; - } + ASS(u->isClause()); auto cl = u->asClause(); LiteralStack defLits; LiteralStack condLits; From d8d613410ed306fd4bfae23f9e404a297bdf58dc Mon Sep 17 00:00:00 2001 From: Martin Suda Date: Fri, 15 Mar 2024 10:55:21 +0000 Subject: [PATCH 54/56] update sampler to reflect the new constraints --- samplers/samplerIND.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samplers/samplerIND.txt b/samplers/samplerIND.txt index 1d30ddd25..9abd78f3e 100644 --- a/samplers/samplerIND.txt +++ b/samplers/samplerIND.txt @@ -388,7 +388,7 @@ ind!=none > indao ~cat off:3,on:1 # structural_induction_kind > $recursionOK ~cat 0:1 newcnf=on erd=on > $recursionOK ~cat 1:1 -ind!=none ind!=int $recursionOK=0 > sik ~cat one:5,two:1,three:1,all:1 +ind!=none ind!=int $recursionOK=0 > sik ~cat one:5,two:1,three:1 ind!=none ind!=int $recursionOK=1 > sik ~cat one:5,two:1,three:1,recursion:2,all:1 # below integer induction only From 89ecbab6fa78f0fd12c7ed176dbad986df200b7d Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Fri, 15 Mar 2024 12:30:01 +0100 Subject: [PATCH 55/56] Fix case when code tree is null --- Shell/FunctionDefinitionHandler.hpp | 3 +++ UnitTests/tFunctionDefinitionRewriting.cpp | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/Shell/FunctionDefinitionHandler.hpp b/Shell/FunctionDefinitionHandler.hpp index 6d1fcf470..4a74aa5d4 100644 --- a/Shell/FunctionDefinitionHandler.hpp +++ b/Shell/FunctionDefinitionHandler.hpp @@ -88,6 +88,9 @@ class FunctionDefinitionHandler void addPredicateBranch(Literal* header, const LiteralStack& conditions); TermQueryResultIterator getGeneralizations(TypedTermList t) { + if (_is.isEmpty()) { + return TermQueryResultIterator::getEmpty(); + } return _is->getGeneralizations(t, true); } diff --git a/UnitTests/tFunctionDefinitionRewriting.cpp b/UnitTests/tFunctionDefinitionRewriting.cpp index e5512d6a2..830e94296 100644 --- a/UnitTests/tFunctionDefinitionRewriting.cpp +++ b/UnitTests/tFunctionDefinitionRewriting.cpp @@ -58,6 +58,13 @@ ClauseStack fnDefContext() { }; } +TEST_GENERATION(test_00, + Generation::TestCase() + .options({ { "function_definition_rewriting", "on"} }) + .input( clause({ b != f(b, y), p(x) })) + .expected(none()) + ) + TEST_GENERATION(test_01, Generation::TestCase() .setup(setup) From 7ba2899fb6f44efce8f285e865a5c43b7f26bf1f Mon Sep 17 00:00:00 2001 From: Marton Hajdu Date: Fri, 15 Mar 2024 15:28:33 +0100 Subject: [PATCH 56/56] Review --- Inferences/FunctionDefinitionRewriting.hpp | 6 ++++++ Inferences/Induction.hpp | 1 + Kernel/Signature.cpp | 4 ++-- Shell/FunctionDefinitionHandler.cpp | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Inferences/FunctionDefinitionRewriting.hpp b/Inferences/FunctionDefinitionRewriting.hpp index 02cb6dae9..fe4cf1243 100644 --- a/Inferences/FunctionDefinitionRewriting.hpp +++ b/Inferences/FunctionDefinitionRewriting.hpp @@ -10,6 +10,12 @@ /** * @file FunctionDefinitionRewriting.hpp * Defines class FunctionDefinitionRewriting. + * It expands defined terms into their definition bodies, trying to + * preserve the intended meaning of the definition. For example, if + * a definition f(x) = if !C then t else ... defining f is clausified into + * f(x) = t v C, we infer from clause D[f(s)] the new clause D[t] v C. + * @see also FunctionDefinitionHandler. + * Note that this replacement does not preserve refutational completeness. */ #ifndef __FunctionDefinitionRewriting__ diff --git a/Inferences/Induction.hpp b/Inferences/Induction.hpp index 6a3b75c55..815804770 100644 --- a/Inferences/Induction.hpp +++ b/Inferences/Induction.hpp @@ -51,6 +51,7 @@ using namespace Lib; /** * This class is similar to @b NonVariableNonTypeIterator and is * used to iterate over terms in active positions inside a literal. + * (active positions: https://doi.org/10.1007/978-3-319-66167-4_10) * The active positions are given by a @b FunctionDefinitionHandler * instance. */ diff --git a/Kernel/Signature.cpp b/Kernel/Signature.cpp index 0e200cb2e..bd0c4ff33 100644 --- a/Kernel/Signature.cpp +++ b/Kernel/Signature.cpp @@ -702,7 +702,7 @@ unsigned Signature::getFnDef(unsigned fn) auto type = getFunction(fn)->fnType(); auto sort = type->result(); bool added = false; - auto name = "$def_"+getFunction(fn)->name(); + auto name = "sFN_"+getFunction(fn)->name(); unsigned p = addPredicate(name, 2+type->numTypeArguments(), added); if (added) { ALWAYS(_fnDefPreds.insert(p)); @@ -717,7 +717,7 @@ unsigned Signature::getFnDef(unsigned fn) unsigned Signature::getBoolDef(unsigned fn) { auto type = getPredicate(fn)->predType(); - auto name = "$def_"+getPredicate(fn)->name(); + auto name = "sPN_"+getPredicate(fn)->name(); bool added = false; auto p = addPredicate(name, type->arity(), added); if (added) { diff --git a/Shell/FunctionDefinitionHandler.cpp b/Shell/FunctionDefinitionHandler.cpp index 832d556fb..dc3ebae99 100644 --- a/Shell/FunctionDefinitionHandler.cpp +++ b/Shell/FunctionDefinitionHandler.cpp @@ -25,7 +25,7 @@ using namespace std; namespace Shell { -inline bool canBeUsedForRewriting(Term* lhs, Clause* cl) +bool canBeUsedForRewriting(Term* lhs, Clause* cl) { // TODO: we are using a codetree to get the generalizations // for rewriting and it cannot handle unbound variables on