diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/FormulaTermFeatures.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/FormulaTermFeatures.java index f6eb24ac368..167683168bb 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/FormulaTermFeatures.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/FormulaTermFeatures.java @@ -63,9 +63,6 @@ public FormulaTermFeatures(ArithTermFeatures tf) { ifZero(tf.eqF, longTermConst(100), longTermConst(200))), rec(any(), longTermConst(1))); // directCutAllowed = add ( tf.intInEquation, notContainsQuery ); - - - } final TermFeature forF; diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/JavaCardDLStrategy.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/JavaCardDLStrategy.java index d9340d0daf2..d3a856e7572 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/JavaCardDLStrategy.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/JavaCardDLStrategy.java @@ -20,6 +20,8 @@ import de.uka.ilkd.key.strategy.termgenerator.HeapGenerator; import org.key_project.logic.Name; +import org.key_project.logic.Term; +import org.key_project.logic.op.Function; import org.key_project.prover.proof.ProofGoal; import org.key_project.prover.proof.rulefilter.SetRuleFilter; import org.key_project.prover.rules.RuleApp; @@ -30,6 +32,9 @@ import org.key_project.prover.strategy.costbased.TopRuleAppCost; import org.key_project.prover.strategy.costbased.feature.*; import org.key_project.prover.strategy.costbased.feature.instantiator.ChoicePoint; +import org.key_project.prover.strategy.costbased.termfeature.TermFeature; +import org.key_project.prover.strategy.costbased.termfeature.TermPredicateTermFeature; +import org.key_project.prover.strategy.costbased.termgenerator.SequentFormulasGenerator; import org.jspecify.annotations.NonNull; @@ -64,7 +69,7 @@ protected JavaCardDLStrategy(Proof proof, StrategyProperties strategyProperties) super(proof); heapLDT = getServices().getTypeConverter().getHeapLDT(); - this.strategyProperties = (StrategyProperties) strategyProperties.clone(); + this.strategyProperties = strategyProperties.clone(); this.tf = new ArithTermFeatures(getServices().getTypeConverter().getIntegerLDT()); this.ff = new FormulaTermFeatures(this.tf); @@ -151,10 +156,30 @@ protected Feature setupGlobalF(@NonNull Feature dispatcher) { // ////////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////////// + /** + * @return the minimal length before the heap term is pulled out in an eequation + * length 0 means no pull out happens at all + */ + private int getHeapSizeBound() { + return switch (strategyProperties.getProperty( + StrategyProperties.HEAP_REDUCTION_OPTIONS_KEY, + StrategyProperties.HEAP_REDUCTION_NORMAL)) { + case StrategyProperties.HEAP_REDUCTION_NORMAL -> + StrategyProperties.HEAP_REDUCTION_NORMAL_BOUND; + case StrategyProperties.HEAP_REDUCTION_DELAYED -> + StrategyProperties.HEAP_REDUCTION_DELAYED_BOUND; + default -> 0; + }; + } + private RuleSetDispatchFeature setupCostComputationF() { final RuleSetDispatchFeature d = new RuleSetDispatchFeature(); bindRuleSet(d, "semantics_blasting", inftyConst()); + + final int pullOutHeapSize = getHeapSizeBound(); + bindRuleSet(d, "pull_out_heap", + pullOutHeapSize <= 0 ? inftyConst() : pullOutHeap(pullOutHeapSize)); bindRuleSet(d, "simplify_heap_high_costs", inftyConst()); bindRuleSet(d, "javaIntegerSemantics", @@ -301,20 +326,26 @@ private void setupSelectSimplification(final RuleSetDispatchFeature d) { bindRuleSet(d, "simplify_select_concrete", longConst(-6000)); bindRuleSet(d, "simplify_select_elim_store", longConst(-7000)); bindRuleSet(d, "apply_auxiliary_eq", - // replace skolem constant by it's computed value + // replace a skolem constant by its computed value add(isSelectSkolemConstantTerm("t1"), longConst(-5500))); + // hide an auxiliary equation once the skolem constant has been replaced by its value + final Feature hideReplacedAuxiliaryEq = add(isSelectSkolemConstantTerm("auxiliarySK"), + applyTF("result", + rec(any(), + add(SimplifiedSelectTermFeature.create(heapLDT), not(ff.ifThenElse)))), + not(ContainsTermFeature.create(instOf("result"), instOf("auxiliarySK")))); + + final int pullOutHeapBound = getHeapSizeBound(); bindRuleSet(d, "hide_auxiliary_eq", - // hide auxiliary equation after the skolem constants have - // been replaced by it's computed value - add(isSelectSkolemConstantTerm("auxiliarySK"), - applyTF("result", - rec(any(), - add(SimplifiedSelectTermFeature.create(heapLDT), not(ff.ifThenElse)))), - not(ContainsTermFeature.create(instOf("result"), instOf("auxiliarySK"))), - longConst(-5400))); + pullOutHeapBound <= 0 ? add(hideReplacedAuxiliaryEq, longConst(-5400)) + : ifZero(hideReplacedAuxiliaryEq, longConst(-5400), + ifZero(isTermAPulledOutHeap(), + ifZero(isSkolemConstantUsedElsewhereInSequent(), longConst(-5400), + longConst(HIDE_DEFERRAL_COST)), + inftyConst()))); bindRuleSet(d, "hide_auxiliary_eq_const", - // hide auxiliary equation after the skolem constatns have - // been replaced by it's computed value + // hide an auxiliary equation once the skolem constant has been replaced by its + // value add(isSelectSkolemConstantTerm("auxiliarySK"), longConst(-500))); } @@ -332,6 +363,65 @@ private void setupUserTaclets(RuleSetDispatchFeature d) { } } + private Feature pullOutHeap(int minHeapSizeForPullout) { + final TermFeature chain = + TermPredicateTermFeature.create( + t -> getHeapTermSize(t, minHeapSizeForPullout) >= minHeapSizeForPullout); + final Feature updateValue = applyTF(FocusProjection.create(1), ff.elemUpdate); + return add(applyTF(FocusProjection.INSTANCE, chain), updateValue, longConst(-30000)); + } + + + /** + * @param t a term describing a heap + * @param bound the heap length at which a pullout will be performed (and we can stop counting) + * @return the number of nested heap operations (max value is that of bound) + */ + private int getHeapTermSize(Term t, int bound) { + int length = 0; + while (length < bound && t.arity() > 0 + && (t.op() == heapLDT.getStore() || t.op() == heapLDT.getCreate() + || t.op() == heapLDT.getAnon())) { + length++; + t = t.sub(0); + } + return length; + } + + /** + * Defers application of hiding equations. It is realised as a finite cost so that + * the rule is deferred and not abandoned in the approval stage. + */ + private static final long HIDE_DEFERRAL_COST = 30000; + + /** + * cheap check if the equation to be hidden is of the required shape + * this check is cheap and run before the more expensive check whether the skolem constant still + * occurs in the sequent + * + * @return we only want to hid equations that describe a heap and were the result of a former + * pullout + */ + private Feature isTermAPulledOutHeap() { + return add(applyTF("result", op(heapLDT.getStore())), + applyTF("auxiliarySK", add(constantTermFeature(), + TermPredicateTermFeature.create(t -> t.op() instanceof Function f + && f.isSkolemConstant())))); + } + + /** + * expensive check ensuring that the Skolem constant of teh equation to be hidden is no longer + * in the + * sequent + */ + private Feature isSkolemConstantUsedElsewhereInSequent() { + final TermBuffer sf = new TermBuffer(); + return add(sequentContainsNoPrograms(), + sum(sf, SequentFormulasGenerator.sequent(), + or(eq(sf, FocusFormulaProjection.INSTANCE), + not(ContainsTermFeature.create(sf, instOf("auxiliarySK")))))); + } + private void setupSystemInvariantSimp(RuleSetDispatchFeature d) { bindRuleSet(d, "system_invariant", ifZero(MatchedAssumesFeature.INSTANCE, add(applyTF("negLit", tf.negLiteral), @@ -405,6 +495,13 @@ private RuleSetDispatchFeature setupApprovalDispatcher() { bindRuleSet(d, "limitObserver", NonDuplicateAppModPositionFeature.INSTANCE); bindRuleSet(d, "partialInvAxiom", NonDuplicateAppModPositionFeature.INSTANCE); + final int pullOutHeapBound = getHeapSizeBound(); + if (pullOutHeapBound > 0) { + bindRuleSet(d, "hide_auxiliary_eq", + ifZero(isSelectSkolemConstantTerm("auxiliarySK"), longConst(0), + isSkolemConstantUsedElsewhereInSequent())); + } + setupClassAxiomApproval(d); bindRuleSet(d, "apply_select_eq", diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/JavaCardDLStrategyFactory.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/JavaCardDLStrategyFactory.java index 873eb4757b5..f03e52ceaa3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/JavaCardDLStrategyFactory.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/JavaCardDLStrategyFactory.java @@ -54,6 +54,12 @@ public class JavaCardDLStrategyFactory implements StrategyFactory { + "proofs even for simple problems. This option can,
" + "nevertheless, be meaningful to keep the complexity
" + "of proofs small and support interactive proving." + ""; + public static final String TOOL_TIP_HEAP_REDUCTION_NORMAL = "" + + "Keep heap size in updates small." + ""; + public static final String TOOL_TIP_HEAP_REDUCTION_DELAYED = "" + + "Keep heap size in updates at a medium size." + ""; + public static final String TOOL_TIP_HEAP_REDUCTION_OFF = + "Keep the heap in an update as it is."; public static final String TOOL_TIP_CLASSAXIOM_FREE = "Expand class axioms (such as invariants) freely."; public static final String TOOL_TIP_CLASSAXIOM_DELAYED = @@ -161,6 +167,18 @@ private static OneOfStrategyPropertyDefinition getProofSplitting() { TOOL_TIP_PROOF_SPLITTING_OFF)); } + private static OneOfStrategyPropertyDefinition getHeapReduction() { + return new OneOfStrategyPropertyDefinition(StrategyProperties.HEAP_REDUCTION_OPTIONS_KEY, + "Heap reduction", + new StrategyPropertyValueDefinition(StrategyProperties.HEAP_REDUCTION_NORMAL, "Normal", + TOOL_TIP_HEAP_REDUCTION_NORMAL), + new StrategyPropertyValueDefinition(StrategyProperties.HEAP_REDUCTION_DELAYED, + "Delayed", + TOOL_TIP_HEAP_REDUCTION_DELAYED), + new StrategyPropertyValueDefinition(StrategyProperties.HEAP_REDUCTION_OFF, "Off", + TOOL_TIP_HEAP_REDUCTION_OFF)); + } + private static OneOfStrategyPropertyDefinition getDependencyContracts() { return new OneOfStrategyPropertyDefinition(StrategyProperties.DEP_OPTIONS_KEY, "Dependency contracts", @@ -226,11 +244,12 @@ public StrategySettingsDefinition getSettingsDefinition() { final OneOfStrategyPropertyDefinition ossUsage = getOssUsage(); final OneOfStrategyPropertyDefinition proofSplitting = getProofSplitting(); final OneOfStrategyPropertyDefinition dependencyContracts = getDependencyContracts(); + final OneOfStrategyPropertyDefinition heapReduction = getHeapReduction(); final OneOfStrategyPropertyDefinition queryTreatment = getQueryTreatment(); final OneOfStrategyPropertyDefinition classAxiom = getClassAxiom(); final OneOfStrategyPropertyDefinition autoInduction = getAutoInduction(); // Model return new StrategySettingsDefinition("Java DL Options", ossUsage, proofSplitting, - dependencyContracts, queryTreatment, classAxiom, autoInduction); + dependencyContracts, heapReduction, queryTreatment, classAxiom, autoInduction); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/StrategyProperties.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/StrategyProperties.java index 82dfc3ab3a8..872de37dbbc 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/StrategyProperties.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/StrategyProperties.java @@ -54,6 +54,14 @@ public final class StrategyProperties extends Properties { public static final String DEP_ON = "DEP_ON"; public static final String DEP_OFF = "DEP_OFF"; + public static final String HEAP_REDUCTION_OPTIONS_KEY = "HEAP_REDUCTION_OPTIONS_KEY"; + public static final String HEAP_REDUCTION_NORMAL = "HEAP_REDUCTION_NORMAL"; + public static final int HEAP_REDUCTION_NORMAL_BOUND = 8; + public static final String HEAP_REDUCTION_DELAYED = "HEAP_REDUCTION_DELAYED"; + public static final int HEAP_REDUCTION_DELAYED_BOUND = 16; + public static final String HEAP_REDUCTION_OFF = "HEAP_REDUCTION_OFF"; + + public static final String QUERY_OPTIONS_KEY = "QUERY_NEW_OPTIONS_KEY"; public static final String QUERY_ON = "QUERY_ON"; public static final String QUERY_RESTRICTED = "QUERY_RESTRICTED"; @@ -178,7 +186,9 @@ public final class StrategyProperties extends Properties { LOOP_SCOPE_INV_TACLET, LOOP_SCOPE_EXPAND, LOOP_NONE, BLOCK_OPTIONS_KEY, BLOCK_CONTRACT_INTERNAL, BLOCK_CONTRACT_EXTERNAL, BLOCK_EXPAND, BLOCK_NONE, METHOD_OPTIONS_KEY, METHOD_EXPAND, METHOD_CONTRACT, METHOD_NONE, MPS_OPTIONS_KEY, MPS_MERGE, - MPS_SKIP, MPS_NONE, DEP_OPTIONS_KEY, DEP_ON, DEP_OFF, QUERY_OPTIONS_KEY, QUERY_ON, + MPS_SKIP, MPS_NONE, DEP_OPTIONS_KEY, DEP_ON, DEP_OFF, HEAP_REDUCTION_OPTIONS_KEY, + HEAP_REDUCTION_NORMAL, HEAP_REDUCTION_DELAYED, HEAP_REDUCTION_OFF, QUERY_OPTIONS_KEY, + QUERY_ON, QUERY_RESTRICTED, QUERY_OFF, QUERYAXIOM_OPTIONS_KEY, QUERYAXIOM_ON, QUERYAXIOM_OFF, NON_LIN_ARITH_OPTIONS_KEY, NON_LIN_ARITH_NONE, NON_LIN_ARITH_DEF_OPS, NON_LIN_ARITH_COMPLETION, OSS_OPTIONS_KEY, OSS_ON, OSS_OFF, QUANTIFIERS_OPTIONS_KEY, @@ -207,6 +217,7 @@ public final class StrategyProperties extends Properties { DEFAULT_MAP.setProperty(MPS_OPTIONS_KEY, MPS_MERGE); DEFAULT_MAP.setProperty(OSS_OPTIONS_KEY, OSS_ON); DEFAULT_MAP.setProperty(DEP_OPTIONS_KEY, DEP_ON); + DEFAULT_MAP.setProperty(HEAP_REDUCTION_OPTIONS_KEY, HEAP_REDUCTION_NORMAL); DEFAULT_MAP.setProperty(QUERY_OPTIONS_KEY, QUERY_OFF); DEFAULT_MAP.setProperty(QUERYAXIOM_OPTIONS_KEY, QUERYAXIOM_ON); DEFAULT_MAP.setProperty(NON_LIN_ARITH_OPTIONS_KEY, NON_LIN_ARITH_NONE); @@ -233,6 +244,7 @@ public StrategyProperties() { put(METHOD_OPTIONS_KEY, DEFAULT_MAP.get(METHOD_OPTIONS_KEY)); put(MPS_OPTIONS_KEY, DEFAULT_MAP.get(MPS_OPTIONS_KEY)); put(DEP_OPTIONS_KEY, DEFAULT_MAP.get(DEP_OPTIONS_KEY)); + put(HEAP_REDUCTION_OPTIONS_KEY, DEFAULT_MAP.get(HEAP_REDUCTION_OPTIONS_KEY)); put(QUERY_OPTIONS_KEY, DEFAULT_MAP.get(QUERY_OPTIONS_KEY)); put(QUERYAXIOM_OPTIONS_KEY, DEFAULT_MAP.get(QUERYAXIOM_OPTIONS_KEY)); put(NON_LIN_ARITH_OPTIONS_KEY, DEFAULT_MAP.get(NON_LIN_ARITH_OPTIONS_KEY)); @@ -266,6 +278,7 @@ public static StrategyProperties read(Properties p) { sp.put(METHOD_OPTIONS_KEY, readSingleOption(p, METHOD_OPTIONS_KEY)); sp.put(MPS_OPTIONS_KEY, readSingleOption(p, MPS_OPTIONS_KEY)); sp.put(DEP_OPTIONS_KEY, readSingleOption(p, DEP_OPTIONS_KEY)); + sp.put(HEAP_REDUCTION_OPTIONS_KEY, readSingleOption(p, HEAP_REDUCTION_OPTIONS_KEY)); sp.put(QUERY_OPTIONS_KEY, readSingleOption(p, QUERY_OPTIONS_KEY)); sp.put(QUERYAXIOM_OPTIONS_KEY, readSingleOption(p, QUERYAXIOM_OPTIONS_KEY)); sp.put(NON_LIN_ARITH_OPTIONS_KEY, readSingleOption(p, NON_LIN_ARITH_OPTIONS_KEY)); @@ -426,6 +439,7 @@ public void write(Properties p) { p.put(STRATEGY_PROPERTY + METHOD_OPTIONS_KEY, get(METHOD_OPTIONS_KEY)); p.put(STRATEGY_PROPERTY + MPS_OPTIONS_KEY, get(MPS_OPTIONS_KEY)); p.put(STRATEGY_PROPERTY + DEP_OPTIONS_KEY, get(DEP_OPTIONS_KEY)); + p.put(STRATEGY_PROPERTY + HEAP_REDUCTION_OPTIONS_KEY, get(HEAP_REDUCTION_OPTIONS_KEY)); p.put(STRATEGY_PROPERTY + QUERY_OPTIONS_KEY, get(QUERY_OPTIONS_KEY)); p.put(STRATEGY_PROPERTY + QUERYAXIOM_OPTIONS_KEY, get(QUERYAXIOM_OPTIONS_KEY)); p.put(STRATEGY_PROPERTY + NON_LIN_ARITH_OPTIONS_KEY, get(NON_LIN_ARITH_OPTIONS_KEY)); diff --git a/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/classicalLogic/firstOrderRules.key b/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/classicalLogic/firstOrderRules.key index 66cc4c89531..8b65e94a600 100644 --- a/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/classicalLogic/firstOrderRules.key +++ b/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/classicalLogic/firstOrderRules.key @@ -209,7 +209,7 @@ \varcond(\newDependingOn(sk, t)) \replacewith(sk) \add(t = sk ==>) - \heuristics(semantics_blasting) + \heuristics(pull_out_heap) }; intro { diff --git a/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/heapRules.key b/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/heapRules.key index 358ef23fb10..5ca2e1c69ff 100644 --- a/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/heapRules.key +++ b/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/heapRules.key @@ -1255,6 +1255,7 @@ \assumes(store(h, o, f, x) = EQ ==>) \find(wellFormed(EQ)) \succedentPolarity + \varcond(\fieldType(f, alpha), \sub(LocSet, alpha)) \replacewith(wellFormed(h) & createdInHeap(x, h)) @@ -1271,8 +1272,10 @@ \assumes(store(h, o, f, x) = EQ ==>) \find(wellFormed(EQ)) \succedentPolarity - \varcond(\not \sub(beta, java.lang.Object), \not \sub(beta, LocSet)) - + \varcond(\fieldType(f, alpha), + \not \sub(beta, java.lang.Object), + \not \sub(beta, LocSet), + \sub(beta, alpha)) \replacewith(wellFormed(h)) \heuristics(concrete) @@ -1292,6 +1295,63 @@ \heuristics(concrete) }; + + wellFormedCreateEQ { + \schemaVar \term Heap h; + \schemaVar \term Object o; + \schemaVar \term Heap EQ; + + \assumes(create(h, o) = EQ ==>) + \find(wellFormed(EQ)) + \succedentPolarity + + \replacewith(wellFormed(h)) + + \heuristics(concrete) + }; + + wellFormedStorePrimitiveArrayEQ { + \schemaVar \term Heap h; + \schemaVar \term Object o; + \schemaVar \term int idx; + \schemaVar \term beta x; + \schemaVar \term Heap EQ; + + \assumes(store(h, o, arr(idx), x) = EQ ==>) + \find(wellFormed(EQ)) + \succedentPolarity + + \varcond( + \hasElementarySort(o, alpha), + \not \sub(beta, java.lang.Object), + \not \sub(beta, LocSet), + \sub(beta, alpha)) + + \replacewith(wellFormed(h)) + + \heuristics(concrete) + }; + + wellFormedStoreArraEQ { + \schemaVar \term Heap h; + \schemaVar \term Object o; + \schemaVar \term int idx; + \schemaVar \term deltaObject x; + \schemaVar \term Heap EQ; + + \assumes( store(h, o, arr(idx), x) = EQ ==> ) + \find(wellFormed(EQ)) + \succedentPolarity + + \varcond(\hasElementarySort(o, alpha)) + + \replacewith(wellFormed(h) & (x = null | select<[boolean]>(h, x, java.lang.Object::#$created) = TRUE & arrayStoreValid(o, x))) + + \heuristics(simplify_enlarging) + }; + + + /* In the general case , memset can no longer maintain wellformedness :( @@ -1301,13 +1361,13 @@ \schemaVar \term Heap h; \schemaVar \term LocSet s; \schemaVar \term deltaObject x; - \schemaVar \term Heap EQ; + \schemaVar \term Heap EQ; - \assumes(memset(h, s, x) = EQ ==>) + \assumes(memset(h, s, x) = EQ ==>) \find(wellFormed(EQ)) \succedentPolarity - \replacewith(wellFormed(h) & (x = null | select<[boolean]>(h, x, java.lang.Object::#$created) = TRUE)) + \replacewith(wellFormed(h) & (x = null | select<[boolean]>(h, x, java.lang.Object::#$created) = TRUE)) \heuristics(simplify_enlarging) }; diff --git a/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/ruleSetsDeclarations.key b/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/ruleSetsDeclarations.key index cef165bbca2..cfd234be07b 100644 --- a/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/ruleSetsDeclarations.key +++ b/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/ruleSetsDeclarations.key @@ -289,6 +289,9 @@ // semantics blasting semantics_blasting; + // generic pull out rule marked for heap treatment + pull_out_heap; + // automation of loop invariants loopInvariant; diff --git a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java index 8447fa0bb7c..fd1d85147d9 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java +++ b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java @@ -12,7 +12,7 @@ import de.uka.ilkd.key.proof.runallproofs.proofcollection.ProofCollectionSettings; /** - * This class configuress the "runAllProofs" test runs. + * This class configures the "runAllProofs" test runs. * * The ProofCollection objects are created and configured in the two methods * #automaticJavaDL() and #automaticInfFlow(). You can add new files @@ -297,6 +297,11 @@ public static ProofCollection automaticJavaDL() throws IOException { "performance-test/GhostFrame(GhostFrame__foo_08()).JML_operation_contract.0.key"); performance.provable( "performance-test/Modelfield(Modelfield__foo_08()).JML_operation_contract.0.key"); + performance.provable("performance-test/updateSimplification/heap_array_25.key"); + performance.provable("performance-test/updateSimplification/heap_array_50.key"); + performance.provable("performance-test/updateSimplification/heap_array_100.key"); + performance.provable("performance-test/updateSimplification/heap_array_200.key"); + performance.provable("performance-test/updateSimplification/heap_array_400.key"); // Test performance of PO construction var performancePOConstruction = c.group("performancePOConstruction"); diff --git a/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java b/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java index 9e3a6554a32..2bae872b275 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java +++ b/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java @@ -90,6 +90,7 @@ void proofSettings() { "BLOCK_OPTIONS_KEY" : "BLOCK_CONTRACT_INTERNAL", "CLASS_AXIOM_OPTIONS_KEY" : "CLASS_AXIOM_FREE", "DEP_OPTIONS_KEY" : "DEP_ON", + "HEAP_REDUCTION_OPTIONS_KEY" : "HEAP_REDUCTION_NORMAL", "LOOP_OPTIONS_KEY" : "LOOP_SCOPE_INV_TACLET", "METHOD_OPTIONS_KEY" : "METHOD_CONTRACT", "MPS_OPTIONS_KEY" : "MPS_MERGE", diff --git a/key.core/src/test/resources/de/uka/ilkd/key/nparser/taclets.old.txt b/key.core/src/test/resources/de/uka/ilkd/key/nparser/taclets.old.txt index cc8e69dd6ee..ed9103b1fd7 100644 --- a/key.core/src/test/resources/de/uka/ilkd/key/nparser/taclets.old.txt +++ b/key.core/src/test/resources/de/uka/ilkd/key/nparser/taclets.old.txt @@ -1,5 +1,5 @@ # This files contains representation of taclets, which are accepted and revised. -# Date: Sat Jul 25 10:22:38 CEST 2026 +# Date: Sun Jul 26 12:13:22 CEST 2026 == abortJavaCardTransactionAPI (abortJavaCardTransactionAPI) ========================================= abortJavaCardTransactionAPI { @@ -14968,7 +14968,7 @@ Choices: integerSimplificationRules:full} pullOut { \find(t) \sameUpdateLevel\add [equals(t,sk)]==>[] \replacewith(sk) -\heuristics(semantics_blasting) +\heuristics(pull_out_heap) Choices: true} ----------------------------------------------------- == pullOutSelect (pullOutSelect) ========================================= @@ -18790,6 +18790,14 @@ wellFormedCreate { \heuristics(concrete) Choices: programRules:Java} ----------------------------------------------------- +== wellFormedCreateEQ (wellFormedCreateEQ) ========================================= +wellFormedCreateEQ { +\assumes ([equals(create(h,o),EQ)]==>[]) +\find(wellFormed(EQ)) +\sameUpdateLevel\succedentPolarity\replacewith(wellFormed(h)) +\heuristics(concrete) +Choices: programRules:Java} +----------------------------------------------------- == wellFormedMemsetArrayObject (wellFormedMemsetArrayObject) ========================================= wellFormedMemsetArrayObject { \find(wellFormed(memset(h,arrayRange(ar,lo,up),x))) @@ -18806,6 +18814,15 @@ wellFormedMemsetArrayPrimitive { \heuristics(simplify_enlarging) Choices: programRules:Java} ----------------------------------------------------- +== wellFormedStoreArraEQ (wellFormedStoreArraEQ) ========================================= +wellFormedStoreArraEQ { +\assumes ([equals(store(h,o,arr(idx),x),EQ)]==>[]) +\find(wellFormed(EQ)) +\sameUpdateLevel\succedentPolarity\varcond(\hasSort(\elemSort(o (java.lang.Object term)), alpha)) +\replacewith(and(wellFormed(h),or(equals(x,null),and(equals(select<[boolean]>(h,x,java.lang.Object::#$created),TRUE),arrayStoreValid(o,x))))) +\heuristics(simplify_enlarging) +Choices: programRules:Java} +----------------------------------------------------- == wellFormedStoreArray (wellFormedStoreArray) ========================================= wellFormedStoreArray { \find(wellFormed(store(h,o,arr(idx),x))) @@ -18826,7 +18843,8 @@ Choices: programRules:Java} wellFormedStoreLocSetEQ { \assumes ([equals(store(h,o,f,x),EQ)]==>[]) \find(wellFormed(EQ)) -\sameUpdateLevel\succedentPolarity\replacewith(and(wellFormed(h),createdInHeap(x,h))) +\sameUpdateLevel\succedentPolarity\varcond(\fieldType(f (Field term), alpha), \sub(LocSet, alpha)) +\replacewith(and(wellFormed(h),createdInHeap(x,h))) \heuristics(simplify_enlarging) Choices: programRules:Java} ----------------------------------------------------- @@ -18863,11 +18881,20 @@ wellFormedStorePrimitiveArray { \heuristics(concrete) Choices: programRules:Java} ----------------------------------------------------- +== wellFormedStorePrimitiveArrayEQ (wellFormedStorePrimitiveArrayEQ) ========================================= +wellFormedStorePrimitiveArrayEQ { +\assumes ([equals(store(h,o,arr(idx),x),EQ)]==>[]) +\find(wellFormed(EQ)) +\sameUpdateLevel\succedentPolarity\varcond(\hasSort(\elemSort(o (java.lang.Object term)), alpha), \not\sub(beta, java.lang.Object), \not\sub(beta, LocSet), \sub(beta, alpha)) +\replacewith(wellFormed(h)) +\heuristics(concrete) +Choices: programRules:Java} +----------------------------------------------------- == wellFormedStorePrimitiveEQ (wellFormedStorePrimitiveEQ) ========================================= wellFormedStorePrimitiveEQ { \assumes ([equals(store(h,o,f,x),EQ)]==>[]) \find(wellFormed(EQ)) -\sameUpdateLevel\succedentPolarity\varcond(\not\sub(beta, java.lang.Object), \not\sub(beta, LocSet)) +\sameUpdateLevel\succedentPolarity\varcond(\fieldType(f (Field term), alpha), \not\sub(beta, java.lang.Object), \not\sub(beta, LocSet), \sub(beta, alpha)) \replacewith(wellFormed(h)) \heuristics(concrete) Choices: programRules:Java} diff --git a/key.ui/examples/performance-test/updateSimplification/heap_array_100.key b/key.ui/examples/performance-test/updateSimplification/heap_array_100.key new file mode 100644 index 00000000000..183ce73ec98 --- /dev/null +++ b/key.ui/examples/performance-test/updateSimplification/heap_array_100.key @@ -0,0 +1,61 @@ +/** + @provable automatic + Heap-heavy symbolic execution unrolling a loop writing into an array +*/ +\settings { +"[Labels]UseOriginLabels=true +[StrategyProperty]HEAP_REDUCTION_OPTIONS_KEY=HEAP_REDUCTION_NORMAL +[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON +[SMTSettings]invariantForall=false +[Strategy]ActiveStrategy=JavaCardDLStrategy +[StrategyProperty]USER_TACLETS_OPTIONS_KEY1=USER_TACLETS_OFF +[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS +[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF +[Choice]DefaultChoices=assertions-assertions\\:on , intRules-intRules\\:arithmeticSemanticsIgnoringOF , initialisation-initialisation\\:disableStaticInitialisation , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:showSatisfiability , bigint-bigint\\:on , sequences-sequences\\:on , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , permissions-permissions\\:off , moreSeqRules-moreSeqRules\\:on , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , javaLoopTreatment-javaLoopTreatment\\:efficient , floatRules-floatRules\\:strictfpOnly , methodExpansion-methodExpansion\\:noRestrictions +[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_EXPAND +[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE +[SMTSettings]UseBuiltUniqueness=false +[SMTSettings]explicitTypeHierarchy=false +[SMTSettings]instantiateHierarchyAssumptions=true +[StrategyProperty]NON_LIN_ARITH_OPTIONS_KEY=NON_LIN_ARITH_NONE +[SMTSettings]SelectedTaclets= +[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON +[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF +[Strategy]MaximumNumberOfAutomaticApplications=10000000 +[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT +[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_FREE +[SMTSettings]useConstantsForBigOrSmallIntegers=true +[StrategyProperty]MPS_OPTIONS_KEY=MPS_MERGE +[StrategyProperty]SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY=SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF +[Strategy]Timeout=-1 +[StrategyProperty]SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY=SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER +[StrategyProperty]QUERY_NEW_OPTIONS_KEY=QUERY_OFF +[SMTSettings]useUninterpretedMultiplication=true +[StrategyProperty]BLOCK_OPTIONS_KEY=BLOCK_CONTRACT_INTERNAL +[StrategyProperty]METHOD_OPTIONS_KEY=METHOD_EXPAND +[StrategyProperty]USER_TACLETS_OPTIONS_KEY3=USER_TACLETS_OFF +[SMTSettings]maxGenericSorts=2 +[StrategyProperty]OSS_OPTIONS_KEY=OSS_ON +[StrategyProperty]SPLITTING_OPTIONS_KEY=SPLITTING_DELAYED +[SMTSettings]integersMinimum=-2147483645 +[StrategyProperty]VBT_PHASE=VBT_SYM_EX +[SMTSettings]integersMaximum=2147483645 +" +} + +\programVariables { + int[] a; + int k; +} + +\problem { + wellFormed(heap) -> + \<{ + a = new int[100]; + k = 0; + while (k < 100) { + a[k] = k; + k = k + 1; + } + }\> a[0] = 0 +} diff --git a/key.ui/examples/performance-test/updateSimplification/heap_array_200.key b/key.ui/examples/performance-test/updateSimplification/heap_array_200.key new file mode 100644 index 00000000000..a787ca1e7a4 --- /dev/null +++ b/key.ui/examples/performance-test/updateSimplification/heap_array_200.key @@ -0,0 +1,61 @@ +/** + @provable automatic + Heap-heavy symbolic execution unrolling a loop writing into an array +*/ +\settings { +"[Labels]UseOriginLabels=true +[StrategyProperty]HEAP_REDUCTION_OPTIONS_KEY=HEAP_REDUCTION_NORMAL +[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON +[SMTSettings]invariantForall=false +[Strategy]ActiveStrategy=JavaCardDLStrategy +[StrategyProperty]USER_TACLETS_OPTIONS_KEY1=USER_TACLETS_OFF +[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS +[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF +[Choice]DefaultChoices=assertions-assertions\\:on , intRules-intRules\\:arithmeticSemanticsIgnoringOF , initialisation-initialisation\\:disableStaticInitialisation , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:showSatisfiability , bigint-bigint\\:on , sequences-sequences\\:on , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , permissions-permissions\\:off , moreSeqRules-moreSeqRules\\:on , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , javaLoopTreatment-javaLoopTreatment\\:efficient , floatRules-floatRules\\:strictfpOnly , methodExpansion-methodExpansion\\:noRestrictions +[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_EXPAND +[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE +[SMTSettings]UseBuiltUniqueness=false +[SMTSettings]explicitTypeHierarchy=false +[SMTSettings]instantiateHierarchyAssumptions=true +[StrategyProperty]NON_LIN_ARITH_OPTIONS_KEY=NON_LIN_ARITH_NONE +[SMTSettings]SelectedTaclets= +[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON +[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF +[Strategy]MaximumNumberOfAutomaticApplications=10000000 +[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT +[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_FREE +[SMTSettings]useConstantsForBigOrSmallIntegers=true +[StrategyProperty]MPS_OPTIONS_KEY=MPS_MERGE +[StrategyProperty]SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY=SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF +[Strategy]Timeout=-1 +[StrategyProperty]SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY=SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER +[StrategyProperty]QUERY_NEW_OPTIONS_KEY=QUERY_OFF +[SMTSettings]useUninterpretedMultiplication=true +[StrategyProperty]BLOCK_OPTIONS_KEY=BLOCK_CONTRACT_INTERNAL +[StrategyProperty]METHOD_OPTIONS_KEY=METHOD_EXPAND +[StrategyProperty]USER_TACLETS_OPTIONS_KEY3=USER_TACLETS_OFF +[SMTSettings]maxGenericSorts=2 +[StrategyProperty]OSS_OPTIONS_KEY=OSS_ON +[StrategyProperty]SPLITTING_OPTIONS_KEY=SPLITTING_DELAYED +[SMTSettings]integersMinimum=-2147483645 +[StrategyProperty]VBT_PHASE=VBT_SYM_EX +[SMTSettings]integersMaximum=2147483645 +" +} + +\programVariables { + int[] a; + int k; +} + +\problem { + wellFormed(heap) -> + \<{ + a = new int[200]; + k = 0; + while (k < 200) { + a[k] = k; + k = k + 1; + } + }\> a[0] = 0 +} diff --git a/key.ui/examples/performance-test/updateSimplification/heap_array_25.key b/key.ui/examples/performance-test/updateSimplification/heap_array_25.key new file mode 100644 index 00000000000..7d02f1eb754 --- /dev/null +++ b/key.ui/examples/performance-test/updateSimplification/heap_array_25.key @@ -0,0 +1,61 @@ +/** + @provable automatic + Heap-heavy symbolic execution unrolling a loop writing into an array +*/ +\settings { +"[Labels]UseOriginLabels=true +[StrategyProperty]HEAP_REDUCTION_OPTIONS_KEY=HEAP_REDUCTION_NORMAL +[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON +[SMTSettings]invariantForall=false +[Strategy]ActiveStrategy=JavaCardDLStrategy +[StrategyProperty]USER_TACLETS_OPTIONS_KEY1=USER_TACLETS_OFF +[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS +[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF +[Choice]DefaultChoices=assertions-assertions\\:on , intRules-intRules\\:arithmeticSemanticsIgnoringOF , initialisation-initialisation\\:disableStaticInitialisation , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:showSatisfiability , bigint-bigint\\:on , sequences-sequences\\:on , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , permissions-permissions\\:off , moreSeqRules-moreSeqRules\\:on , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , javaLoopTreatment-javaLoopTreatment\\:efficient , floatRules-floatRules\\:strictfpOnly , methodExpansion-methodExpansion\\:noRestrictions +[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_EXPAND +[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE +[SMTSettings]UseBuiltUniqueness=false +[SMTSettings]explicitTypeHierarchy=false +[SMTSettings]instantiateHierarchyAssumptions=true +[StrategyProperty]NON_LIN_ARITH_OPTIONS_KEY=NON_LIN_ARITH_NONE +[SMTSettings]SelectedTaclets= +[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON +[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF +[Strategy]MaximumNumberOfAutomaticApplications=10000000 +[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT +[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_FREE +[SMTSettings]useConstantsForBigOrSmallIntegers=true +[StrategyProperty]MPS_OPTIONS_KEY=MPS_MERGE +[StrategyProperty]SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY=SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF +[Strategy]Timeout=-1 +[StrategyProperty]SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY=SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER +[StrategyProperty]QUERY_NEW_OPTIONS_KEY=QUERY_OFF +[SMTSettings]useUninterpretedMultiplication=true +[StrategyProperty]BLOCK_OPTIONS_KEY=BLOCK_CONTRACT_INTERNAL +[StrategyProperty]METHOD_OPTIONS_KEY=METHOD_EXPAND +[StrategyProperty]USER_TACLETS_OPTIONS_KEY3=USER_TACLETS_OFF +[SMTSettings]maxGenericSorts=2 +[StrategyProperty]OSS_OPTIONS_KEY=OSS_ON +[StrategyProperty]SPLITTING_OPTIONS_KEY=SPLITTING_DELAYED +[SMTSettings]integersMinimum=-2147483645 +[StrategyProperty]VBT_PHASE=VBT_SYM_EX +[SMTSettings]integersMaximum=2147483645 +" +} + +\programVariables { + int[] a; + int k; +} + +\problem { + wellFormed(heap) -> + \<{ + a = new int[25]; + k = 0; + while (k < 25) { + a[k] = k; + k = k + 1; + } + }\> a[0] = 0 +} diff --git a/key.ui/examples/performance-test/updateSimplification/heap_array_400.key b/key.ui/examples/performance-test/updateSimplification/heap_array_400.key new file mode 100644 index 00000000000..4cc4885d3b8 --- /dev/null +++ b/key.ui/examples/performance-test/updateSimplification/heap_array_400.key @@ -0,0 +1,61 @@ +/** + @provable automatic + Heap-heavy symbolic execution unrolling a loop writing into an array +*/ +\settings { +"[Labels]UseOriginLabels=true +[StrategyProperty]HEAP_REDUCTION_OPTIONS_KEY=HEAP_REDUCTION_NORMAL +[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON +[SMTSettings]invariantForall=false +[Strategy]ActiveStrategy=JavaCardDLStrategy +[StrategyProperty]USER_TACLETS_OPTIONS_KEY1=USER_TACLETS_OFF +[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS +[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF +[Choice]DefaultChoices=assertions-assertions\\:on , intRules-intRules\\:arithmeticSemanticsIgnoringOF , initialisation-initialisation\\:disableStaticInitialisation , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:showSatisfiability , bigint-bigint\\:on , sequences-sequences\\:on , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , permissions-permissions\\:off , moreSeqRules-moreSeqRules\\:on , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , javaLoopTreatment-javaLoopTreatment\\:efficient , floatRules-floatRules\\:strictfpOnly , methodExpansion-methodExpansion\\:noRestrictions +[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_EXPAND +[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE +[SMTSettings]UseBuiltUniqueness=false +[SMTSettings]explicitTypeHierarchy=false +[SMTSettings]instantiateHierarchyAssumptions=true +[StrategyProperty]NON_LIN_ARITH_OPTIONS_KEY=NON_LIN_ARITH_NONE +[SMTSettings]SelectedTaclets= +[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON +[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF +[Strategy]MaximumNumberOfAutomaticApplications=10000000 +[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT +[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_FREE +[SMTSettings]useConstantsForBigOrSmallIntegers=true +[StrategyProperty]MPS_OPTIONS_KEY=MPS_MERGE +[StrategyProperty]SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY=SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF +[Strategy]Timeout=-1 +[StrategyProperty]SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY=SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER +[StrategyProperty]QUERY_NEW_OPTIONS_KEY=QUERY_OFF +[SMTSettings]useUninterpretedMultiplication=true +[StrategyProperty]BLOCK_OPTIONS_KEY=BLOCK_CONTRACT_INTERNAL +[StrategyProperty]METHOD_OPTIONS_KEY=METHOD_EXPAND +[StrategyProperty]USER_TACLETS_OPTIONS_KEY3=USER_TACLETS_OFF +[SMTSettings]maxGenericSorts=2 +[StrategyProperty]OSS_OPTIONS_KEY=OSS_ON +[StrategyProperty]SPLITTING_OPTIONS_KEY=SPLITTING_DELAYED +[SMTSettings]integersMinimum=-2147483645 +[StrategyProperty]VBT_PHASE=VBT_SYM_EX +[SMTSettings]integersMaximum=2147483645 +" +} + +\programVariables { + int[] a; + int k; +} + +\problem { + wellFormed(heap) -> + \<{ + a = new int[400]; + k = 0; + while (k < 400) { + a[k] = k; + k = k + 1; + } + }\> a[0] = 0 +} diff --git a/key.ui/examples/performance-test/updateSimplification/heap_array_50.key b/key.ui/examples/performance-test/updateSimplification/heap_array_50.key new file mode 100644 index 00000000000..b8969e12c64 --- /dev/null +++ b/key.ui/examples/performance-test/updateSimplification/heap_array_50.key @@ -0,0 +1,61 @@ +/** + @provable automatic + Heap-heavy symbolic execution unrolling a loop writing into an array +*/ +\settings { +"[Labels]UseOriginLabels=true +[StrategyProperty]HEAP_REDUCTION_OPTIONS_KEY=HEAP_REDUCTION_NORMAL +[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON +[SMTSettings]invariantForall=false +[Strategy]ActiveStrategy=JavaCardDLStrategy +[StrategyProperty]USER_TACLETS_OPTIONS_KEY1=USER_TACLETS_OFF +[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS +[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF +[Choice]DefaultChoices=assertions-assertions\\:on , intRules-intRules\\:arithmeticSemanticsIgnoringOF , initialisation-initialisation\\:disableStaticInitialisation , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:showSatisfiability , bigint-bigint\\:on , sequences-sequences\\:on , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , permissions-permissions\\:off , moreSeqRules-moreSeqRules\\:on , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , javaLoopTreatment-javaLoopTreatment\\:efficient , floatRules-floatRules\\:strictfpOnly , methodExpansion-methodExpansion\\:noRestrictions +[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_EXPAND +[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE +[SMTSettings]UseBuiltUniqueness=false +[SMTSettings]explicitTypeHierarchy=false +[SMTSettings]instantiateHierarchyAssumptions=true +[StrategyProperty]NON_LIN_ARITH_OPTIONS_KEY=NON_LIN_ARITH_NONE +[SMTSettings]SelectedTaclets= +[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON +[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF +[Strategy]MaximumNumberOfAutomaticApplications=10000000 +[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT +[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_FREE +[SMTSettings]useConstantsForBigOrSmallIntegers=true +[StrategyProperty]MPS_OPTIONS_KEY=MPS_MERGE +[StrategyProperty]SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY=SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF +[Strategy]Timeout=-1 +[StrategyProperty]SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY=SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER +[StrategyProperty]QUERY_NEW_OPTIONS_KEY=QUERY_OFF +[SMTSettings]useUninterpretedMultiplication=true +[StrategyProperty]BLOCK_OPTIONS_KEY=BLOCK_CONTRACT_INTERNAL +[StrategyProperty]METHOD_OPTIONS_KEY=METHOD_EXPAND +[StrategyProperty]USER_TACLETS_OPTIONS_KEY3=USER_TACLETS_OFF +[SMTSettings]maxGenericSorts=2 +[StrategyProperty]OSS_OPTIONS_KEY=OSS_ON +[StrategyProperty]SPLITTING_OPTIONS_KEY=SPLITTING_DELAYED +[SMTSettings]integersMinimum=-2147483645 +[StrategyProperty]VBT_PHASE=VBT_SYM_EX +[SMTSettings]integersMaximum=2147483645 +" +} + +\programVariables { + int[] a; + int k; +} + +\problem { + wellFormed(heap) -> + \<{ + a = new int[50]; + k = 0; + while (k < 50) { + a[k] = k; + k = k + 1; + } + }\> a[0] = 0 +} diff --git a/key.ui/examples/performance-test/updateSimplification/heap_objects_20.key b/key.ui/examples/performance-test/updateSimplification/heap_objects_20.key new file mode 100644 index 00000000000..bc03444b4d0 --- /dev/null +++ b/key.ui/examples/performance-test/updateSimplification/heap_objects_20.key @@ -0,0 +1,59 @@ +/** + @provable automatic + Heap-heavy symbolic execution unrolling a loop creating a new object in each iteration +*/ +\settings { +"[Labels]UseOriginLabels=true +[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON +[SMTSettings]invariantForall=false +[Strategy]ActiveStrategy=JavaCardDLStrategy +[StrategyProperty]USER_TACLETS_OPTIONS_KEY1=USER_TACLETS_OFF +[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS +[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF +[Choice]DefaultChoices=assertions-assertions\\:on , intRules-intRules\\:arithmeticSemanticsIgnoringOF , initialisation-initialisation\\:disableStaticInitialisation , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:showSatisfiability , bigint-bigint\\:on , sequences-sequences\\:on , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , permissions-permissions\\:off , moreSeqRules-moreSeqRules\\:on , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , javaLoopTreatment-javaLoopTreatment\\:efficient , floatRules-floatRules\\:strictfpOnly , methodExpansion-methodExpansion\\:noRestrictions +[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_EXPAND +[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE +[SMTSettings]UseBuiltUniqueness=false +[SMTSettings]explicitTypeHierarchy=false +[SMTSettings]instantiateHierarchyAssumptions=true +[StrategyProperty]NON_LIN_ARITH_OPTIONS_KEY=NON_LIN_ARITH_NONE +[SMTSettings]SelectedTaclets= +[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON +[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF +[Strategy]MaximumNumberOfAutomaticApplications=10000000 +[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT +[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_FREE +[SMTSettings]useConstantsForBigOrSmallIntegers=true +[StrategyProperty]MPS_OPTIONS_KEY=MPS_MERGE +[StrategyProperty]SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY=SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF +[Strategy]Timeout=-1 +[StrategyProperty]SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY=SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER +[StrategyProperty]QUERY_NEW_OPTIONS_KEY=QUERY_OFF +[SMTSettings]useUninterpretedMultiplication=true +[StrategyProperty]BLOCK_OPTIONS_KEY=BLOCK_CONTRACT_INTERNAL +[StrategyProperty]METHOD_OPTIONS_KEY=METHOD_EXPAND +[StrategyProperty]USER_TACLETS_OPTIONS_KEY3=USER_TACLETS_OFF +[SMTSettings]maxGenericSorts=2 +[StrategyProperty]OSS_OPTIONS_KEY=OSS_ON +[StrategyProperty]SPLITTING_OPTIONS_KEY=SPLITTING_DELAYED +[SMTSettings]integersMinimum=-2147483645 +[StrategyProperty]VBT_PHASE=VBT_SYM_EX +[SMTSettings]integersMaximum=2147483645 +" +} + +\programVariables { + java.lang.Object o; + int k; +} + +\problem { + wellFormed(heap) -> + \<{ + k = 0; + while (k < 20) { + o = new java.lang.Object(); + k = k + 1; + } + }\> k = 20 +} diff --git a/key.ui/examples/performance-test/updateSimplification/heap_objects_40.key b/key.ui/examples/performance-test/updateSimplification/heap_objects_40.key new file mode 100644 index 00000000000..6b157be9005 --- /dev/null +++ b/key.ui/examples/performance-test/updateSimplification/heap_objects_40.key @@ -0,0 +1,59 @@ +/** + @provable automatic + Heap-heavy symbolic execution unrolling a loop creating a new object in each iteration +*/ +\settings { +"[Labels]UseOriginLabels=true +[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON +[SMTSettings]invariantForall=false +[Strategy]ActiveStrategy=JavaCardDLStrategy +[StrategyProperty]USER_TACLETS_OPTIONS_KEY1=USER_TACLETS_OFF +[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS +[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF +[Choice]DefaultChoices=assertions-assertions\\:on , intRules-intRules\\:arithmeticSemanticsIgnoringOF , initialisation-initialisation\\:disableStaticInitialisation , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:showSatisfiability , bigint-bigint\\:on , sequences-sequences\\:on , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , permissions-permissions\\:off , moreSeqRules-moreSeqRules\\:on , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , javaLoopTreatment-javaLoopTreatment\\:efficient , floatRules-floatRules\\:strictfpOnly , methodExpansion-methodExpansion\\:noRestrictions +[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_EXPAND +[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE +[SMTSettings]UseBuiltUniqueness=false +[SMTSettings]explicitTypeHierarchy=false +[SMTSettings]instantiateHierarchyAssumptions=true +[StrategyProperty]NON_LIN_ARITH_OPTIONS_KEY=NON_LIN_ARITH_NONE +[SMTSettings]SelectedTaclets= +[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON +[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF +[Strategy]MaximumNumberOfAutomaticApplications=10000000 +[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT +[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_FREE +[SMTSettings]useConstantsForBigOrSmallIntegers=true +[StrategyProperty]MPS_OPTIONS_KEY=MPS_MERGE +[StrategyProperty]SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY=SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF +[Strategy]Timeout=-1 +[StrategyProperty]SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY=SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER +[StrategyProperty]QUERY_NEW_OPTIONS_KEY=QUERY_OFF +[SMTSettings]useUninterpretedMultiplication=true +[StrategyProperty]BLOCK_OPTIONS_KEY=BLOCK_CONTRACT_INTERNAL +[StrategyProperty]METHOD_OPTIONS_KEY=METHOD_EXPAND +[StrategyProperty]USER_TACLETS_OPTIONS_KEY3=USER_TACLETS_OFF +[SMTSettings]maxGenericSorts=2 +[StrategyProperty]OSS_OPTIONS_KEY=OSS_ON +[StrategyProperty]SPLITTING_OPTIONS_KEY=SPLITTING_DELAYED +[SMTSettings]integersMinimum=-2147483645 +[StrategyProperty]VBT_PHASE=VBT_SYM_EX +[SMTSettings]integersMaximum=2147483645 +" +} + +\programVariables { + java.lang.Object o; + int k; +} + +\problem { + wellFormed(heap) -> + \<{ + k = 0; + while (k < 40) { + o = new java.lang.Object(); + k = k + 1; + } + }\> k = 40 +} diff --git a/key.ui/examples/performance-test/updateSimplification/loop_forall_100.key b/key.ui/examples/performance-test/updateSimplification/loop_forall_100.key new file mode 100644 index 00000000000..353af063453 --- /dev/null +++ b/key.ui/examples/performance-test/updateSimplification/loop_forall_100.key @@ -0,0 +1,59 @@ +/** + @provable automatic +*/ +\settings { +"[Labels]UseOriginLabels=true +[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON +[SMTSettings]invariantForall=false +[Strategy]ActiveStrategy=JavaCardDLStrategy +[StrategyProperty]USER_TACLETS_OPTIONS_KEY1=USER_TACLETS_OFF +[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS +[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF +[Choice]DefaultChoices=assertions-assertions\\:on , intRules-intRules\\:arithmeticSemanticsIgnoringOF , initialisation-initialisation\\:disableStaticInitialisation , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:showSatisfiability , bigint-bigint\\:on , sequences-sequences\\:on , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , permissions-permissions\\:off , moreSeqRules-moreSeqRules\\:on , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , javaLoopTreatment-javaLoopTreatment\\:efficient , floatRules-floatRules\\:strictfpOnly , methodExpansion-methodExpansion\\:noRestrictions +[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_EXPAND +[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE +[SMTSettings]UseBuiltUniqueness=false +[SMTSettings]explicitTypeHierarchy=false +[SMTSettings]instantiateHierarchyAssumptions=true +[StrategyProperty]NON_LIN_ARITH_OPTIONS_KEY=NON_LIN_ARITH_NONE +[SMTSettings]SelectedTaclets= +[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON +[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF +[Strategy]MaximumNumberOfAutomaticApplications=10000000 +[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT +[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_FREE +[SMTSettings]useConstantsForBigOrSmallIntegers=true +[StrategyProperty]MPS_OPTIONS_KEY=MPS_MERGE +[StrategyProperty]SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY=SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF +[Strategy]Timeout=-1 +[StrategyProperty]SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY=SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER +[StrategyProperty]QUERY_NEW_OPTIONS_KEY=QUERY_OFF +[SMTSettings]useUninterpretedMultiplication=true +[StrategyProperty]BLOCK_OPTIONS_KEY=BLOCK_CONTRACT_INTERNAL +[StrategyProperty]METHOD_OPTIONS_KEY=METHOD_EXPAND +[StrategyProperty]USER_TACLETS_OPTIONS_KEY3=USER_TACLETS_OFF +[SMTSettings]maxGenericSorts=2 +[StrategyProperty]OSS_OPTIONS_KEY=OSS_ON +[StrategyProperty]SPLITTING_OPTIONS_KEY=SPLITTING_DELAYED +[SMTSettings]integersMinimum=-2147483645 +[StrategyProperty]VBT_PHASE=VBT_SYM_EX +[SMTSettings]integersMaximum=2147483645 +" +} + +\programVariables { + int[] a; + int k; +} + +\problem { + wellFormed(heap) -> + \<{ + a = new int[100]; + k = 0; + while (k < 100) { + a[k] = k; + k = k + 1; + } + }\> (\forall int j; (0 <= j & j < 100 -> a[j] = j)) +} diff --git a/key.ui/examples/performance-test/updateSimplification/loop_forall_200.key b/key.ui/examples/performance-test/updateSimplification/loop_forall_200.key new file mode 100644 index 00000000000..3d846b80524 --- /dev/null +++ b/key.ui/examples/performance-test/updateSimplification/loop_forall_200.key @@ -0,0 +1,59 @@ +/** + @provable automatic +*/ +\settings { +"[Labels]UseOriginLabels=true +[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON +[SMTSettings]invariantForall=false +[Strategy]ActiveStrategy=JavaCardDLStrategy +[StrategyProperty]USER_TACLETS_OPTIONS_KEY1=USER_TACLETS_OFF +[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS +[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF +[Choice]DefaultChoices=assertions-assertions\\:on , intRules-intRules\\:arithmeticSemanticsIgnoringOF , initialisation-initialisation\\:disableStaticInitialisation , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:showSatisfiability , bigint-bigint\\:on , sequences-sequences\\:on , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , permissions-permissions\\:off , moreSeqRules-moreSeqRules\\:on , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , javaLoopTreatment-javaLoopTreatment\\:efficient , floatRules-floatRules\\:strictfpOnly , methodExpansion-methodExpansion\\:noRestrictions +[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_EXPAND +[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE +[SMTSettings]UseBuiltUniqueness=false +[SMTSettings]explicitTypeHierarchy=false +[SMTSettings]instantiateHierarchyAssumptions=true +[StrategyProperty]NON_LIN_ARITH_OPTIONS_KEY=NON_LIN_ARITH_NONE +[SMTSettings]SelectedTaclets= +[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON +[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF +[Strategy]MaximumNumberOfAutomaticApplications=10000000 +[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT +[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_FREE +[SMTSettings]useConstantsForBigOrSmallIntegers=true +[StrategyProperty]MPS_OPTIONS_KEY=MPS_MERGE +[StrategyProperty]SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY=SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF +[Strategy]Timeout=-1 +[StrategyProperty]SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY=SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER +[StrategyProperty]QUERY_NEW_OPTIONS_KEY=QUERY_OFF +[SMTSettings]useUninterpretedMultiplication=true +[StrategyProperty]BLOCK_OPTIONS_KEY=BLOCK_CONTRACT_INTERNAL +[StrategyProperty]METHOD_OPTIONS_KEY=METHOD_EXPAND +[StrategyProperty]USER_TACLETS_OPTIONS_KEY3=USER_TACLETS_OFF +[SMTSettings]maxGenericSorts=2 +[StrategyProperty]OSS_OPTIONS_KEY=OSS_ON +[StrategyProperty]SPLITTING_OPTIONS_KEY=SPLITTING_DELAYED +[SMTSettings]integersMinimum=-2147483645 +[StrategyProperty]VBT_PHASE=VBT_SYM_EX +[SMTSettings]integersMaximum=2147483645 +" +} + +\programVariables { + int[] a; + int k; +} + +\problem { + wellFormed(heap) -> + \<{ + a = new int[200]; + k = 0; + while (k < 200) { + a[k] = k; + k = k + 1; + } + }\> (\forall int j; (0 <= j & j < 200 -> a[j] = j)) +} diff --git a/key.ui/examples/performance-test/updateSimplification/loop_forall_25.key b/key.ui/examples/performance-test/updateSimplification/loop_forall_25.key new file mode 100644 index 00000000000..2055df4a81e --- /dev/null +++ b/key.ui/examples/performance-test/updateSimplification/loop_forall_25.key @@ -0,0 +1,59 @@ +/** + @provable automatic +*/ +\settings { +"[Labels]UseOriginLabels=true +[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON +[SMTSettings]invariantForall=false +[Strategy]ActiveStrategy=JavaCardDLStrategy +[StrategyProperty]USER_TACLETS_OPTIONS_KEY1=USER_TACLETS_OFF +[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS +[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF +[Choice]DefaultChoices=assertions-assertions\\:on , intRules-intRules\\:arithmeticSemanticsIgnoringOF , initialisation-initialisation\\:disableStaticInitialisation , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:showSatisfiability , bigint-bigint\\:on , sequences-sequences\\:on , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , permissions-permissions\\:off , moreSeqRules-moreSeqRules\\:on , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , javaLoopTreatment-javaLoopTreatment\\:efficient , floatRules-floatRules\\:strictfpOnly , methodExpansion-methodExpansion\\:noRestrictions +[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_EXPAND +[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE +[SMTSettings]UseBuiltUniqueness=false +[SMTSettings]explicitTypeHierarchy=false +[SMTSettings]instantiateHierarchyAssumptions=true +[StrategyProperty]NON_LIN_ARITH_OPTIONS_KEY=NON_LIN_ARITH_NONE +[SMTSettings]SelectedTaclets= +[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON +[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF +[Strategy]MaximumNumberOfAutomaticApplications=10000000 +[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT +[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_FREE +[SMTSettings]useConstantsForBigOrSmallIntegers=true +[StrategyProperty]MPS_OPTIONS_KEY=MPS_MERGE +[StrategyProperty]SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY=SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF +[Strategy]Timeout=-1 +[StrategyProperty]SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY=SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER +[StrategyProperty]QUERY_NEW_OPTIONS_KEY=QUERY_OFF +[SMTSettings]useUninterpretedMultiplication=true +[StrategyProperty]BLOCK_OPTIONS_KEY=BLOCK_CONTRACT_INTERNAL +[StrategyProperty]METHOD_OPTIONS_KEY=METHOD_EXPAND +[StrategyProperty]USER_TACLETS_OPTIONS_KEY3=USER_TACLETS_OFF +[SMTSettings]maxGenericSorts=2 +[StrategyProperty]OSS_OPTIONS_KEY=OSS_ON +[StrategyProperty]SPLITTING_OPTIONS_KEY=SPLITTING_DELAYED +[SMTSettings]integersMinimum=-2147483645 +[StrategyProperty]VBT_PHASE=VBT_SYM_EX +[SMTSettings]integersMaximum=2147483645 +" +} + +\programVariables { + int[] a; + int k; +} + +\problem { + wellFormed(heap) -> + \<{ + a = new int[25]; + k = 0; + while (k < 25) { + a[k] = k; + k = k + 1; + } + }\> (\forall int j; (0 <= j & j < 25 -> a[j] = j)) +} diff --git a/key.ui/examples/performance-test/updateSimplification/loop_forall_50.key b/key.ui/examples/performance-test/updateSimplification/loop_forall_50.key new file mode 100644 index 00000000000..9fd87986669 --- /dev/null +++ b/key.ui/examples/performance-test/updateSimplification/loop_forall_50.key @@ -0,0 +1,59 @@ +/** + @provable automatic +*/ +\settings { +"[Labels]UseOriginLabels=true +[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON +[SMTSettings]invariantForall=false +[Strategy]ActiveStrategy=JavaCardDLStrategy +[StrategyProperty]USER_TACLETS_OPTIONS_KEY1=USER_TACLETS_OFF +[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS +[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF +[Choice]DefaultChoices=assertions-assertions\\:on , intRules-intRules\\:arithmeticSemanticsIgnoringOF , initialisation-initialisation\\:disableStaticInitialisation , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:showSatisfiability , bigint-bigint\\:on , sequences-sequences\\:on , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , permissions-permissions\\:off , moreSeqRules-moreSeqRules\\:on , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , javaLoopTreatment-javaLoopTreatment\\:efficient , floatRules-floatRules\\:strictfpOnly , methodExpansion-methodExpansion\\:noRestrictions +[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_EXPAND +[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE +[SMTSettings]UseBuiltUniqueness=false +[SMTSettings]explicitTypeHierarchy=false +[SMTSettings]instantiateHierarchyAssumptions=true +[StrategyProperty]NON_LIN_ARITH_OPTIONS_KEY=NON_LIN_ARITH_NONE +[SMTSettings]SelectedTaclets= +[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON +[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF +[Strategy]MaximumNumberOfAutomaticApplications=10000000 +[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT +[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_FREE +[SMTSettings]useConstantsForBigOrSmallIntegers=true +[StrategyProperty]MPS_OPTIONS_KEY=MPS_MERGE +[StrategyProperty]SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY=SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF +[Strategy]Timeout=-1 +[StrategyProperty]SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY=SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER +[StrategyProperty]QUERY_NEW_OPTIONS_KEY=QUERY_OFF +[SMTSettings]useUninterpretedMultiplication=true +[StrategyProperty]BLOCK_OPTIONS_KEY=BLOCK_CONTRACT_INTERNAL +[StrategyProperty]METHOD_OPTIONS_KEY=METHOD_EXPAND +[StrategyProperty]USER_TACLETS_OPTIONS_KEY3=USER_TACLETS_OFF +[SMTSettings]maxGenericSorts=2 +[StrategyProperty]OSS_OPTIONS_KEY=OSS_ON +[StrategyProperty]SPLITTING_OPTIONS_KEY=SPLITTING_DELAYED +[SMTSettings]integersMinimum=-2147483645 +[StrategyProperty]VBT_PHASE=VBT_SYM_EX +[SMTSettings]integersMaximum=2147483645 +" +} + +\programVariables { + int[] a; + int k; +} + +\problem { + wellFormed(heap) -> + \<{ + a = new int[50]; + k = 0; + while (k < 50) { + a[k] = k; + k = k + 1; + } + }\> (\forall int j; (0 <= j & j < 50 -> a[j] = j)) +}