diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e411586a54a..48c0a02ca41 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/FormulaTermLabelMerger.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/FormulaTermLabelMerger.java index da7e85f8a9e..313b188cb4f 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/FormulaTermLabelMerger.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/FormulaTermLabelMerger.java @@ -7,7 +7,6 @@ import java.util.Arrays; import java.util.List; -import de.uka.ilkd.key.logic.SequentFormula; import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.label.FormulaTermLabel; import de.uka.ilkd.key.logic.label.TermLabel; @@ -22,8 +21,8 @@ public class FormulaTermLabelMerger implements TermLabelMerger { * {@inheritDoc} */ @Override - public boolean mergeLabels(SequentFormula existingSF, Term existingTerm, - TermLabel existingLabel, SequentFormula rejectedSF, Term rejectedTerm, + public boolean mergeLabels(Term existingSF, Term existingTerm, + TermLabel existingLabel, Term rejectedSF, Term rejectedTerm, TermLabel rejectedLabel, List mergedLabels) { if (existingLabel != null) { FormulaTermLabel fExisting = (FormulaTermLabel) existingLabel; diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/FormulaTermLabelRefactoring.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/FormulaTermLabelRefactoring.java index f55f6111dcc..ed1005355a9 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/FormulaTermLabelRefactoring.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/FormulaTermLabelRefactoring.java @@ -84,9 +84,9 @@ public class FormulaTermLabelRefactoring implements TermLabelRefactoring { /** * Key used in {@link TermLabelState} by the {@link FormulaTermLabelUpdate} to indicate that a - * refactoring of specified {@link SequentFormula}s ({@link RefactoringScope#SEQUENT}) is + * refactoring of specified {@link Term}s ({@link RefactoringScope#SEQUENT}) is * required, which will be performed by - * {@link #refactorSequentFormulas(TermLabelState, Services, Term, LabelCollection)}. + * {@link #refactorTerms(TermLabelState, Services, Term, LabelCollection)}. *

* This is for instance required if the assumes clause of a rule has a {@link FormulaTermLabel} * but the application does not have it. Example rules are: @@ -95,7 +95,7 @@ public class FormulaTermLabelRefactoring implements TermLabelRefactoring { * */ private static final String SEQUENT_FORMULA_REFACTORING_REQUIRED = - "sequentFormulaRefactoringRequired"; + "TermRefactoringRequired"; /** * {@inheritDoc} @@ -118,7 +118,7 @@ public RefactoringScope defineRefactoringScope(TermLabelState state, Services se return RefactoringScope.APPLICATION_CHILDREN_AND_GRANDCHILDREN_SUBTREE_AND_PARENTS; } else if (isUpdateRefactoringRequired(state)) { return RefactoringScope.APPLICATION_BELOW_UPDATES; - } else if (containsSequentFormulasToRefactor(state)) { + } else if (containsTermsToRefactor(state)) { return RefactoringScope.SEQUENT; } else if (SyntacticalReplaceVisitor.SUBSTITUTION_WITH_LABELS_HINT.equals(hint)) { return RefactoringScope.APPLICATION_BELOW_UPDATES; @@ -152,8 +152,8 @@ public void refactorLabels(TermLabelState state, Services services, refactorInCaseOfNewIdRequired(state, goal, term, services, labels); } else if (isUpdateRefactoringRequired(state)) { refactorBelowUpdates(applicationPosInOccurrence, term, labels); - } else if (containsSequentFormulasToRefactor(state)) { - refactorSequentFormulas(state, services, term, labels); + } else if (containsTermsToRefactor(state)) { + refactorTerms(state, services, term, labels); } else if (SyntacticalReplaceVisitor.SUBSTITUTION_WITH_LABELS_HINT.equals(hint)) { refactorSubstitution(term, tacletTerm, labels); } @@ -238,7 +238,7 @@ private void refactorBelowUpdates(PosInOccurrence applicationPosInOccurrence, Te } /** - * Refactors the specified {@link SequentFormula}s. + * Refactors the specified {@link Term}s. * * @param state The {@link TermLabelState} of the current rule application. * @param services The {@link Services} used by the {@link Proof} on which a {@link Rule} is @@ -246,10 +246,12 @@ private void refactorBelowUpdates(PosInOccurrence applicationPosInOccurrence, Te * @param term The {@link Term} which is now refactored. * @param labels The new labels the {@link Term} will have after the refactoring. */ - private void refactorSequentFormulas(TermLabelState state, Services services, final Term term, + private void refactorTerms(TermLabelState state, Services services, final Term term, LabelCollection labels) { - Set sequentFormulas = getSequentFormulasToRefactor(state); - if (CollectionUtil.search(sequentFormulas, element -> element.formula() == term) != null) { + Set Terms = getTermsToRefactor(state); + if (CollectionUtil.search(Terms, element -> { + return element == term; + }) != null) { FormulaTermLabel termLabel = (FormulaTermLabel) term.getLabel(FormulaTermLabel.NAME); if (termLabel != null) { labels.remove(termLabel); @@ -373,45 +375,45 @@ public static void setParentRefactoringRequired(TermLabelState state, boolean re } /** - * Checks if {@link SequentFormula}s to refactor are specified. + * Checks if {@link Term}s to refactor are specified. * * @param state The {@link TermLabelState} to read from. - * @return {@code true} at least one {@link SequentFormula} needs to be refactored, + * @return {@code true} at least one {@link Term} needs to be refactored, * {@code false} refactoring is not required. */ - public static boolean containsSequentFormulasToRefactor(TermLabelState state) { + public static boolean containsTermsToRefactor(TermLabelState state) { Map labelState = state.getLabelState(FormulaTermLabel.NAME); @SuppressWarnings("unchecked") - Set sfSet = - (Set) labelState.get(SEQUENT_FORMULA_REFACTORING_REQUIRED); + Set sfSet = + (Set) labelState.get(SEQUENT_FORMULA_REFACTORING_REQUIRED); return sfSet != null && !sfSet.isEmpty(); } /** - * Returns the {@link SequentFormula}s to refactor. + * Returns the {@link Term}s to refactor. * * @param state The {@link TermLabelState} to read from. - * @return The {@link SequentFormula}s to refactor. + * @return The {@link Term}s to refactor. */ - public static Set getSequentFormulasToRefactor(TermLabelState state) { + public static Set getTermsToRefactor(TermLabelState state) { Map labelState = state.getLabelState(FormulaTermLabel.NAME); @SuppressWarnings("unchecked") - Set sfSet = - (Set) labelState.get(SEQUENT_FORMULA_REFACTORING_REQUIRED); + Set sfSet = + (Set) labelState.get(SEQUENT_FORMULA_REFACTORING_REQUIRED); return sfSet; } /** - * Adds the given {@link SequentFormula} for refactoring purpose. + * Adds the given {@link Term} for refactoring purpose. * * @param state The {@link TermLabelState} to modify. - * @param sf The {@link SequentFormula} to add. + * @param sf The {@link Term} to add. */ - public static void addSequentFormulaToRefactor(TermLabelState state, SequentFormula sf) { + public static void addTermToRefactor(TermLabelState state, Term sf) { Map labelState = state.getLabelState(FormulaTermLabel.NAME); @SuppressWarnings("unchecked") - Set sfSet = - (Set) labelState.get(SEQUENT_FORMULA_REFACTORING_REQUIRED); + Set sfSet = + (Set) labelState.get(SEQUENT_FORMULA_REFACTORING_REQUIRED); if (sfSet == null) { sfSet = new LinkedHashSet<>(); labelState.put(SEQUENT_FORMULA_REFACTORING_REQUIRED, sfSet); diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/FormulaTermLabelUpdate.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/FormulaTermLabelUpdate.java index 2ae4dbc912d..ac55939d736 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/FormulaTermLabelUpdate.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/FormulaTermLabelUpdate.java @@ -72,11 +72,12 @@ public void updateLabels(TermLabelState state, Services services, } if (ruleApp instanceof TacletApp ta) { if (ta.ifInstsComplete() && ta.ifFormulaInstantiations() != null) { - Map ifLabels = + Map ifLabels = new LinkedHashMap<>(); for (IfFormulaInstantiation ifInst : ta.ifFormulaInstantiations()) { + final Term assumesFml = ifInst.getConstrainedFormula(); FormulaTermLabel ifLabel = StayOnFormulaTermLabelPolicy.searchFormulaTermLabel( - ifInst.getConstrainedFormula().formula().getLabels()); + assumesFml.getLabels()); if (ifLabel != null) { ifLabels.put(ifInst.getConstrainedFormula(), ifLabel); } @@ -85,14 +86,14 @@ public void updateLabels(TermLabelState state, Services services, if (TruthValueTracingUtil.isLogicOperator(newTerm.op(), newTerm.subs()) // || TruthValueEvaluationUtil.isPredicate(newTermOp) ) { - for (Entry ifEntry : ifLabels + for (Entry ifEntry : ifLabels .entrySet()) { FormulaTermLabel ifLabel = ifEntry.getValue(); int labelSubID = FormulaTermLabel.newLabelSubID(services, ifLabel); FormulaTermLabel newLabel = new FormulaTermLabel(ifLabel.getMajorId(), labelSubID, Collections.singletonList(ifLabel.getId())); labels.add(newLabel); - FormulaTermLabelRefactoring.addSequentFormulaToRefactor(state, + FormulaTermLabelRefactoring.addTermToRefactor(state, ifEntry.getKey()); } } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/StayOnFormulaTermLabelPolicy.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/StayOnFormulaTermLabelPolicy.java index 7d2ea52c692..98360e9fe59 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/StayOnFormulaTermLabelPolicy.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/rule/label/StayOnFormulaTermLabelPolicy.java @@ -69,8 +69,8 @@ public TermLabel keepLabel(TermLabelState state, Services services, originalLabelIds.add(mostImportantLabel.getId()); } } - if (tacletHint.getSequentFormula() != null) { - if (!TruthValueTracingUtil.isPredicate(tacletHint.getSequentFormula())) { + if (tacletHint.getTerm() != null) { + if (!TruthValueTracingUtil.isPredicate(tacletHint.getTerm())) { newLabelIdRequired = true; } } else if (tacletHint.getTerm() != null) { @@ -164,10 +164,6 @@ public static FormulaTermLabel searchFormulaTermLabel(ImmutableArray * @return {@code true} is top level, {@code false} is not top level. */ protected boolean isTopLevel(TacletLabelHint tacletHint, Term tacletTerm) { - if (TacletOperation.REPLACE_TERM.equals(tacletHint.getTacletOperation())) { - return tacletHint.getTerm() == tacletTerm; - } else { - return tacletHint.getSequentFormula().formula() == tacletTerm; - } + return tacletHint.getTerm() == tacletTerm; } } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/AbstractUpdateExtractor.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/AbstractUpdateExtractor.java index e04c2be2a75..830214147aa 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/AbstractUpdateExtractor.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/AbstractUpdateExtractor.java @@ -152,8 +152,8 @@ protected Set computeInitialObjectsToIgnore(boolean ignoreExceptionVariabl // Add initial updates which are used as backup of the heap and method arguments. They // are not part of the source code and should be ignored. Sequent sequent = getRoot().sequent(); - for (SequentFormula sf : sequent.succedent()) { - Term term = sf.formula(); + for (Term sf : sequent.succedent()) { + Term term = sf; if (Junctor.IMP.equals(term.op())) { fillInitialObjectsToIgnoreRecursively(term.sub(1), result); } @@ -434,9 +434,9 @@ protected boolean hasFreeVariables(Term term) { protected Set extractLocationsFromSequent(Sequent sequent, Set objectsToIgnore) throws ProofInputException { Set result = new LinkedHashSet<>(); - for (SequentFormula sf : sequent) { + for (Term sf : sequent) { result.addAll(extractLocationsFromTerm( - OriginTermLabel.removeOriginLabels(sf.formula(), getServices()), objectsToIgnore)); + OriginTermLabel.removeOriginLabels(sf, getServices()), objectsToIgnore)); } return result; } diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicExecutionTreeBuilder.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicExecutionTreeBuilder.java index 35e6ea1b81d..2f96a4927a4 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicExecutionTreeBuilder.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicExecutionTreeBuilder.java @@ -249,8 +249,8 @@ public SymbolicExecutionTreeBuilder(Proof proof, boolean mergeBranchConditions, protected void initMethodCallStack(final Node root, Services services) { // Find all modalities in the succedent final List modalityTerms = new LinkedList<>(); - for (SequentFormula sequentFormula : root.sequent().succedent()) { - sequentFormula.formula().execPreOrder(new DefaultVisitor() { + for (Term succFml : root.sequent().succedent()) { + succFml.execPreOrder(new DefaultVisitor() { @Override public void visit(Term visited) { if (visited.op() instanceof Modality diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutExtractor.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutExtractor.java index 7d849a0530f..8cd7cd1c19b 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutExtractor.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/SymbolicLayoutExtractor.java @@ -309,7 +309,7 @@ protected ImmutableList extractInitialUpdates() { Sequent sequent = getRoot().sequent(); assert sequent.antecedent().isEmpty(); assert sequent.succedent().size() == 1; - Term sf = sequent.succedent().get(0).formula(); + final Term sf = sequent.succedent().get(0); assert sf.op() == Junctor.IMP; Term modality = sf.sub(1); return TermBuilder.goBelowUpdates2(modality).first; @@ -680,9 +680,9 @@ protected Set updateLocationsAccordingtoEquivalentClas protected Set collectObjectsFromSequent(Sequent sequent, Set objectsToIgnore) throws ProofInputException { Set result = new LinkedHashSet<>(); - for (SequentFormula sf : sequent) { + for (Term sf : sequent) { if (SymbolicExecutionUtil.checkSkolemEquality(sf) == 0) { - result.addAll(collectSymbolicObjectsFromTerm(sf.formula(), objectsToIgnore)); + result.addAll(collectSymbolicObjectsFromTerm(sf, objectsToIgnore)); } } return result; diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/TruthValueTracingUtil.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/TruthValueTracingUtil.java index d4a12b894c9..bafe6a9a052 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/TruthValueTracingUtil.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/TruthValueTracingUtil.java @@ -16,7 +16,6 @@ import de.uka.ilkd.key.logic.DefaultVisitor; import de.uka.ilkd.key.logic.PosInOccurrence; import de.uka.ilkd.key.logic.Sequent; -import de.uka.ilkd.key.logic.SequentFormula; import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.TermBuilder; import de.uka.ilkd.key.logic.label.FormulaTermLabel; @@ -59,16 +58,6 @@ public final class TruthValueTracingUtil { private TruthValueTracingUtil() { } - /** - * Checks if the given {@link SequentFormula} is a predicate. - * - * @param sequentFormula The {@link SequentFormula} to check. - * @return {@code true} is predicate, {@code false} is something else. - */ - public static boolean isPredicate(SequentFormula sequentFormula) { - return sequentFormula != null && isPredicate(sequentFormula.formula()); - } - /** * Checks if the given {@link Term} is a predicate. * @@ -342,8 +331,8 @@ private static List findInvolvedLabels( if (tacletApp.ifInstsComplete() && tacletApp.ifFormulaInstantiations() != null) { for (IfFormulaInstantiation ifInst : tacletApp.ifFormulaInstantiations()) { assert ifInst instanceof IfFormulaInstSeq; - Term term = ifInst.getConstrainedFormula().formula(); - TermLabel label = term.getLabel(termLabelName); + final Term assumesFml = ifInst.getConstrainedFormula(); + TermLabel label = assumesFml.getLabel(termLabelName); if (label instanceof FormulaTermLabel) { result.add(new LabelOccurrence((FormulaTermLabel) label, ((IfFormulaInstSeq) ifInst).inAntec())); @@ -451,7 +440,7 @@ private static void updatePredicateResultBasedOnNewMinorIdsOSS( parentPio.subTerm().execPreOrder(new DefaultVisitor() { @Override public void visit(Term visited) { - checkForNewMinorIdsOSS(childPio.sequentFormula(), visited, termLabelName, + checkForNewMinorIdsOSS(childPio.sequentLevelFormula(), visited, termLabelName, parentPio, tb, results); } }); @@ -459,7 +448,7 @@ public void visit(Term visited) { PosInOccurrence currentPio = parentPio; while (!currentPio.isTopLevel()) { currentPio = currentPio.up(); - checkForNewMinorIdsOSS(childPio.sequentFormula(), currentPio.subTerm(), + checkForNewMinorIdsOSS(childPio.sequentLevelFormula(), currentPio.subTerm(), termLabelName, parentPio, tb, results); } } @@ -468,7 +457,7 @@ public void visit(Term visited) { /** * Checks if new minor IDs are available in case of {@link OneStepSimplifier} usage. * - * @param onlyChangedChildSF The only changed {@link SequentFormula} in the child {@link Node}. + * @param onlyChangedChildSF The only changed {@link Term} in the child {@link Node}. * @param term The {@link Term} contained in the child {@link Node} to check. * @param termLabelName The name of the {@link TermLabel} which is added to predicates. * @param parentPio The {@link PosInOccurrence} of the applied rule of the parent {@link Node}. @@ -476,7 +465,7 @@ public void visit(Term visited) { * @param results The {@link Map} with all available {@link MultiEvaluationResult}s. */ private static void checkForNewMinorIdsOSS( - SequentFormula onlyChangedChildSF, Term term, + Term onlyChangedChildSF, Term term, Name termLabelName, PosInOccurrence parentPio, TermBuilder tb, Map results) { TermLabel label = term.getLabel(termLabelName); @@ -492,7 +481,7 @@ private static void checkForNewMinorIdsOSS( /** * Checks if new minor IDs are available in case of {@link OneStepSimplifier} usage. * - * @param onlyChangedChildSF The only changed {@link SequentFormula} in the child {@link Node}. + * @param onlyChangedChildSF The only changed {@link Term} in the child {@link Node}. * @param label The {@link FormulaTermLabel} of interest. * @param antecedentRuleApplication {@code true} rule applied on antecedent, {@code false} rule * applied on succedent. @@ -500,7 +489,7 @@ private static void checkForNewMinorIdsOSS( * @return The computed instruction {@link Term} or {@code null} if not available. */ private static Term checkForNewMinorIdsOSS( - SequentFormula onlyChangedChildSF, + Term onlyChangedChildSF, FormulaTermLabel label, boolean antecedentRuleApplication, TermBuilder tb) { // Search replacements List antecedentReplacements = new LinkedList<>(); @@ -553,7 +542,7 @@ public void visit(Term visited) { if (parentRuleApp instanceof TacletApp ta) { if (ta.ifInstsComplete() && ta.ifFormulaInstantiations() != null) { for (IfFormulaInstantiation ifInst : ta.ifFormulaInstantiations()) { - checkForNewMinorIds(childNode, ifInst.getConstrainedFormula().formula(), + checkForNewMinorIds(childNode, ifInst.getConstrainedFormula(), termLabelName, parentPio, tb, results); } } @@ -601,10 +590,10 @@ private static Term checkForNewMinorIds( // Search replacements List antecedentReplacements = new LinkedList<>(); List succedentReplacements = new LinkedList<>(); - for (SequentFormula sf : childNode.sequent().antecedent()) { + for (Term sf : childNode.sequent().antecedent()) { listLabelReplacements(sf, label.name(), label.getId(), antecedentReplacements); } - for (SequentFormula sf : childNode.sequent().succedent()) { + for (Term sf : childNode.sequent().succedent()) { listLabelReplacements(sf, label.name(), label.getId(), succedentReplacements); } // Compute term @@ -613,17 +602,17 @@ private static Term checkForNewMinorIds( } /** - * Lists all label replacements in the given {@link SequentFormula}. + * Lists all label replacements in the given {@link Term}. * - * @param sf The {@link SequentFormula} to analyze. + * @param sf The {@link Term} to analyze. * @param labelName The name of the {@link TermLabel} which is added to predicates. * @param labelId The label ID of interest. * @param resultToFill The result {@link List} to fill. */ private static void listLabelReplacements( - final SequentFormula sf, final Name labelName, + final Term sf, final Name labelName, final String labelId, final List resultToFill) { - sf.formula().execPreOrder(new DefaultVisitor() { + sf.execPreOrder(new DefaultVisitor() { @Override public boolean visitSubtree(Term visited) { return !hasLabelOfInterest(visited); diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/impl/AbstractExecutionMethodReturn.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/impl/AbstractExecutionMethodReturn.java index d74bfb41cd4..b757d6c6f08 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/impl/AbstractExecutionMethodReturn.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/impl/AbstractExecutionMethodReturn.java @@ -9,7 +9,6 @@ import de.uka.ilkd.key.java.Services; import de.uka.ilkd.key.java.SourceElement; import de.uka.ilkd.key.logic.PosInOccurrence; -import de.uka.ilkd.key.logic.SequentFormula; import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.op.UpdateApplication; import de.uka.ilkd.key.proof.Node; @@ -180,11 +179,11 @@ protected IExecutionVariable[] lazyComputeCallStateVariables() throws ProofInput assert proofNode.childrenCount() == 1; PosInOccurrence originalPIO = methodCall.getModalityPIO(); int index = originalPIO.isInAntec() - ? proofNode.sequent().antecedent().indexOf(originalPIO.sequentFormula()) - : proofNode.sequent().succedent().indexOf(originalPIO.sequentFormula()); + ? proofNode.sequent().antecedent().indexOf(originalPIO.sequentLevelFormula()) + : proofNode.sequent().succedent().indexOf(originalPIO.sequentLevelFormula()); // Search relevant position in child node Node childNode = proofNode.child(0); - SequentFormula nodeSF = + Term nodeSF = originalPIO.isInAntec() ? childNode.sequent().antecedent().get(index) : childNode.sequent().succedent().get(index); PosInOccurrence modalityPIO = diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/impl/ExecutionAuxiliaryContract.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/impl/ExecutionAuxiliaryContract.java index 293a231f50f..2e06327f513 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/impl/ExecutionAuxiliaryContract.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/model/impl/ExecutionAuxiliaryContract.java @@ -88,7 +88,7 @@ protected String lazyComputeName() throws ProofInputException { assert "Usage".equals(usageNode.getNodeInfo().getBranchLabel()) : "Block Contract Rule has changed."; Term usagePrecondition = usageNode.sequent().antecedent() - .get(usageNode.sequent().antecedent().size() - 1).formula(); + .get(usageNode.sequent().antecedent().size() - 1); // Find remembrance heaps and local variables while (applicationTerm.op() == UpdateApplication.UPDATE_APPLICATION) { assert applicationTerm.sub(0) == usagePrecondition.sub(0) diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/rule/AbstractSideProofRule.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/rule/AbstractSideProofRule.java index b4f25f305e1..b3f5c71b399 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/rule/AbstractSideProofRule.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/rule/AbstractSideProofRule.java @@ -14,7 +14,6 @@ import de.uka.ilkd.key.logic.PosInOccurrence; import de.uka.ilkd.key.logic.PosInTerm; import de.uka.ilkd.key.logic.Sequent; -import de.uka.ilkd.key.logic.SequentFormula; import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.op.JFunction; import de.uka.ilkd.key.proof.Goal; @@ -103,12 +102,12 @@ protected List, Node>> computeResultsAndConditions(Servic * * @param pio The {@link PosInOccurrence} which defines the {@link Term} to replace. * @param newTerm The new {@link Term}. - * @return The created {@link SequentFormula} in which the {@link Term} is replaced. + * @return The created {@link Term} in which the {@link Term} is replaced. */ - protected static SequentFormula replace(PosInOccurrence pio, Term newTerm, Services services) { + protected static Term replace(PosInOccurrence pio, Term newTerm, Services services) { // Iterate along the PosInOccurrence and collect the parents and indices Deque> indexAndParents = new LinkedList<>(); - Term root = pio.sequentFormula().formula(); + Term root = pio.sequentLevelFormula(); final PosInTerm pit = pio.posInTerm(); for (int i = 0, sz = pit.depth(); i < sz; i++) { int next = pit.getIndexAt(i); @@ -124,7 +123,7 @@ protected static SequentFormula replace(PosInOccurrence pio, Term newTerm, Servi root = services.getTermFactory().createTerm(parent.op(), newSubs, parent.boundVars(), parent.getLabels()); } - return new SequentFormula(root); + return root; } /** diff --git a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/rule/ModalitySideProofRule.java b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/rule/ModalitySideProofRule.java index 6c1fc13fb94..cef7f53abd2 100644 --- a/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/rule/ModalitySideProofRule.java +++ b/key.core.symbolic_execution/src/main/java/de/uka/ilkd/key/symbolic_execution/rule/ModalitySideProofRule.java @@ -10,7 +10,6 @@ import de.uka.ilkd.key.java.Services; import de.uka.ilkd.key.logic.PosInOccurrence; import de.uka.ilkd.key.logic.Sequent; -import de.uka.ilkd.key.logic.SequentFormula; import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.TermBuilder; import de.uka.ilkd.key.logic.TermServices; @@ -39,7 +38,7 @@ * A {@link BuiltInRule} which evaluates a modality in a side proof. *

*

- * This rule is applicable on top level terms ({@link SequentFormula}) of the form. + * This rule is applicable on top level terms ({@link Term}) of the form. *