Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Node;
import de.uka.ilkd.key.proof.Proof;
import de.uka.ilkd.key.strategy.AbstractFeatureStrategy;
import de.uka.ilkd.key.strategy.Strategy;
import de.uka.ilkd.key.strategy.JavaAbstractFeatureStrategy;

import org.key_project.logic.Name;
import org.key_project.prover.proof.ProofGoal;
import org.key_project.prover.rules.RuleApp;
import org.key_project.prover.sequent.PosInOccurrence;
import org.key_project.prover.strategy.Strategy;
import org.key_project.prover.strategy.costbased.MutableState;
import org.key_project.prover.strategy.costbased.NumberRuleAppCost;
import org.key_project.prover.strategy.costbased.RuleAppCost;
import org.key_project.prover.strategy.costbased.TopRuleAppCost;

import org.jspecify.annotations.NonNull;

import static de.uka.ilkd.key.strategy.StaticFeatureCollection.hasLabel;


/**
* The macro UseInformationFlowContractMacro applies all applicable information flow contracts.
Expand Down Expand Up @@ -67,7 +69,7 @@ public String getDescription() {
* This strategy accepts all rule apps for which the rule name starts with a string in the
* admitted set and rejects everything else.
*/
protected static class RemovePostStrategy extends AbstractFeatureStrategy {
protected static class RemovePostStrategy extends JavaAbstractFeatureStrategy {

private final Name NAME = new Name("RemovePostStrategy");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected Set<String> getAdmittedRuleNames() {
}

@Override
protected Strategy<@NonNull Goal> createStrategy(Proof proof,
protected org.key_project.prover.strategy.Strategy<@NonNull Goal> createStrategy(Proof proof,
PosInOccurrence posInOcc) {
return new SelfCompExpansionStrategy(getAdmittedRuleNames());
}
Expand Down Expand Up @@ -110,7 +110,7 @@ protected boolean allowOSS() {
* This strategy accepts all rule apps for which the rule name is in the admitted set or has
* INF_FLOW_UNFOLD_PREFIX as a prefix and rejects everything else.
*/
private class SelfCompExpansionStrategy implements Strategy<Goal> {
private class SelfCompExpansionStrategy implements JavaStrategy {

private final Name NAME = new Name(
SelfcompositionStateExpansionMacro.SelfCompExpansionStrategy.class.getSimpleName());
Expand All @@ -134,7 +134,7 @@ public Name name() {
if ((admittedRuleNames.contains(name) || name.startsWith(INF_FLOW_UNFOLD_PREFIX))
&& ruleApplicationInContextAllowed(ruleApp, pio, goal)) {
ModularJavaDLStrategyFactory strategyFactory = new ModularJavaDLStrategyFactory();
Strategy<@NonNull Goal> dlStrategy =
org.key_project.prover.strategy.Strategy<@NonNull Goal> dlStrategy =
strategyFactory.create(goal.proof(), new StrategyProperties());
RuleAppCost costs = dlStrategy.computeCost(ruleApp, pio, goal, mState);
if ("orLeft".equals(name)) {
Expand All @@ -154,7 +154,7 @@ public boolean isApprovedApp(RuleApp app, PosInOccurrence pio,

@Override
public void instantiateApp(RuleApp app, PosInOccurrence pio, Goal goal,
RuleAppCostCollector collector) {
org.key_project.prover.strategy.RuleAppCostCollector collector) {
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Node;
import de.uka.ilkd.key.proof.Proof;
import de.uka.ilkd.key.strategy.RuleAppCostCollector;
import de.uka.ilkd.key.strategy.Strategy;
import de.uka.ilkd.key.strategy.JavaStrategy;

import org.key_project.logic.Name;
import org.key_project.prover.proof.ProofGoal;
import org.key_project.prover.rules.RuleApp;
import org.key_project.prover.sequent.PosInOccurrence;
import org.key_project.prover.strategy.RuleAppCostCollector;
import org.key_project.prover.strategy.costbased.MutableState;
import org.key_project.prover.strategy.costbased.NumberRuleAppCost;
import org.key_project.prover.strategy.costbased.RuleAppCost;
Expand Down Expand Up @@ -166,7 +166,7 @@ private String getAppRuleName(Node parent) {
* This strategy accepts all rule apps for which the rule name starts with a string in the
* admitted set and rejects everything else.
*/
protected class PropExpansionStrategy implements Strategy<Goal> {
protected class PropExpansionStrategy implements JavaStrategy {

private final Name NAME =
new Name(UseInformationFlowContractMacro.PropExpansionStrategy.class.getSimpleName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import de.uka.ilkd.key.logic.JTerm;
import de.uka.ilkd.key.logic.ProgramElementName;
import de.uka.ilkd.key.logic.TermBuilder;
import de.uka.ilkd.key.logic.TermServices;
import de.uka.ilkd.key.logic.label.ParameterlessTermLabel;
import de.uka.ilkd.key.logic.op.JFunction;
import de.uka.ilkd.key.logic.op.LocationVariable;
Expand All @@ -43,6 +42,7 @@
import de.uka.ilkd.key.speclang.BlockContract;
import de.uka.ilkd.key.util.MiscTools;

import org.key_project.logic.LogicServices;
import org.key_project.logic.Name;
import org.key_project.logic.op.Function;
import org.key_project.prover.sequent.PosInOccurrence;
Expand Down Expand Up @@ -101,7 +101,7 @@ private InfFlowBlockContractInternalRule() {

@Override
public BlockContractInternalBuiltInRuleApp<? extends BlockContractInternalRule> createApp(
PosInOccurrence occurrence, TermServices services) {
PosInOccurrence occurrence, LogicServices services) {
return new InfFlowBlockContractInternalBuiltInRuleApp(this, occurrence);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import de.uka.ilkd.key.speclang.LoopSpecification;
import de.uka.ilkd.key.util.MiscTools;

import org.key_project.logic.LogicServices;
import org.key_project.logic.Name;
import org.key_project.logic.Namespace;
import org.key_project.logic.op.Function;
Expand All @@ -58,8 +59,8 @@ public Name name() {

@Override
public InfFlowLoopInvariantBuiltInRuleApp createApp(PosInOccurrence pos,
TermServices services) {
return new InfFlowLoopInvariantBuiltInRuleApp(this, pos, services);
LogicServices services) {
return new InfFlowLoopInvariantBuiltInRuleApp(this, pos, (TermServices) services);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import de.uka.ilkd.key.java.Services;
import de.uka.ilkd.key.logic.JTerm;
import de.uka.ilkd.key.logic.TermBuilder;
import de.uka.ilkd.key.logic.TermServices;
import de.uka.ilkd.key.logic.op.*;
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.mgt.ProofEnvironment;
Expand All @@ -20,6 +19,7 @@
import de.uka.ilkd.key.symbolic_execution.util.SymbolicExecutionSideProofUtil;
import de.uka.ilkd.key.symbolic_execution.util.SymbolicExecutionUtil;

import org.key_project.logic.LogicServices;
import org.key_project.logic.Name;
import org.key_project.logic.op.Function;
import org.key_project.prover.rules.RuleAbortException;
Expand Down Expand Up @@ -119,7 +119,7 @@ public boolean isApplicable(Goal goal, PosInOccurrence pio) {
* {@inheritDoc}
*/
@Override
public IBuiltInRuleApp createApp(PosInOccurrence pos, TermServices services) {
public IBuiltInRuleApp createApp(PosInOccurrence pos, LogicServices services) {
return new DefaultBuiltInRuleApp(this, pos);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@
import de.uka.ilkd.key.java.Services;
import de.uka.ilkd.key.logic.JTerm;
import de.uka.ilkd.key.logic.TermBuilder;
import de.uka.ilkd.key.logic.TermServices;
import de.uka.ilkd.key.logic.op.*;
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.mgt.ProofEnvironment;
import de.uka.ilkd.key.rule.BuiltInRule;
import de.uka.ilkd.key.rule.DefaultBuiltInRuleApp;
import de.uka.ilkd.key.rule.IBuiltInRuleApp;
import de.uka.ilkd.key.rule.QueryExpand;
import de.uka.ilkd.key.symbolic_execution.util.SymbolicExecutionSideProofUtil;

import org.key_project.logic.LogicServices;
import org.key_project.logic.Name;
import org.key_project.logic.op.Function;
import org.key_project.logic.sort.Sort;
Expand Down Expand Up @@ -150,7 +149,7 @@ public boolean isApplicable(Goal goal, PosInOccurrence pio) {

/**
* Checks if the query term is supported. The functionality is identical to
* {@link QueryExpand#isApplicable(Goal, PosInOccurrence)}.
* {@link BuiltInRule#isApplicable(org.key_project.prover.proof.ProofGoal, PosInOccurrence)}.
*
* @param goal The {@link Goal}.
* @param pmTerm The {@link JTerm} to with the query to check.
Expand Down Expand Up @@ -182,7 +181,7 @@ private boolean isApplicableQuery(Goal goal, JTerm pmTerm,
* {@inheritDoc}
*/
@Override
public IBuiltInRuleApp createApp(PosInOccurrence pos, TermServices services) {
public IBuiltInRuleApp createApp(PosInOccurrence pos, LogicServices services) {
return new DefaultBuiltInRuleApp(this, pos);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
import org.jspecify.annotations.NonNull;

/**
* {@link Strategy} used to simplify {@link JTerm}s in side proofs.
* {@link JavaStrategy} used to simplify {@link JTerm}s in side proofs.
*
* @author Martin Hentschel
*/
public class SimplifyTermStrategy extends JavaCardDLStrategy {
/**
* The {@link Name} of the side proof {@link Strategy}.
* The {@link Name} of the side proof {@link JavaStrategy}.
*/
public static final Name name = new Name("Simplify Term Strategy");

Expand Down Expand Up @@ -100,7 +100,8 @@ public static class Factory implements StrategyFactory {
* {@inheritDoc}
*/
@Override
public Strategy<Goal> create(Proof proof, StrategyProperties sp) {
public org.key_project.prover.strategy.Strategy<Goal> create(Proof proof,
StrategyProperties sp) {
return new SimplifyTermStrategy(proof, sp);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Proof;
import de.uka.ilkd.key.strategy.JavaCardDLStrategy;
import de.uka.ilkd.key.strategy.Strategy;
import de.uka.ilkd.key.strategy.JavaStrategy;
import de.uka.ilkd.key.strategy.StrategyFactory;
import de.uka.ilkd.key.strategy.StrategyProperties;
import de.uka.ilkd.key.strategy.definition.IDefaultStrategyPropertiesFactory;
import de.uka.ilkd.key.strategy.definition.OneOfStrategyPropertyDefinition;
import de.uka.ilkd.key.strategy.definition.StrategyPropertyValueDefinition;
import de.uka.ilkd.key.strategy.definition.StrategySettingsDefinition;
import de.uka.ilkd.key.strategy.feature.*;
import de.uka.ilkd.key.strategy.feature.instantiator.OneOfCP;
import de.uka.ilkd.key.strategy.termProjection.FocusProjection;
import de.uka.ilkd.key.symbolic_execution.rule.ModalitySideProofRule;
Expand All @@ -27,23 +26,28 @@
import org.key_project.prover.proof.rulefilter.SetRuleFilter;
import org.key_project.prover.rules.RuleApp;
import org.key_project.prover.sequent.PosInOccurrence;
import org.key_project.prover.strategy.Strategy;
import org.key_project.prover.strategy.costbased.MutableState;
import org.key_project.prover.strategy.costbased.RuleAppCost;
import org.key_project.prover.strategy.costbased.TopRuleAppCost;
import org.key_project.prover.strategy.costbased.feature.BinaryFeature;
import org.key_project.prover.strategy.costbased.feature.ConditionalFeature;
import org.key_project.prover.strategy.costbased.feature.CountBranchFeature;
import org.key_project.prover.strategy.costbased.feature.Feature;
import org.key_project.prover.strategy.costbased.feature.RuleSetDispatchFeature;
import org.key_project.prover.strategy.costbased.feature.ScaleFeature;
import org.key_project.prover.strategy.costbased.termProjection.TermBuffer;

import org.jspecify.annotations.NonNull;

import static de.uka.ilkd.key.strategy.StaticFeatureCollection.hasLabel;

/**
* {@link Strategy} to use for symbolic execution.
* {@link JavaStrategy} to use for symbolic execution.
*/
public class SymbolicExecutionStrategy extends JavaCardDLStrategy {
/**
* The {@link Name} of the symbolic execution {@link Strategy}.
* The {@link Name} of the symbolic execution {@link JavaStrategy}.
*/
public static final Name name = new Name("Symbolic Execution Strategy");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
import de.uka.ilkd.key.settings.StrategySettings;
import de.uka.ilkd.key.speclang.Contract;
import de.uka.ilkd.key.speclang.OperationContract;
import de.uka.ilkd.key.strategy.JavaStrategy;
import de.uka.ilkd.key.strategy.ModularJavaDLStrategyFactory;
import de.uka.ilkd.key.strategy.Strategy;
import de.uka.ilkd.key.strategy.StrategyProperties;
import de.uka.ilkd.key.symbolic_execution.ExecutionVariableExtractor;
import de.uka.ilkd.key.symbolic_execution.SymbolicExecutionTreeBuilder;
Expand Down Expand Up @@ -2564,7 +2564,7 @@ private static JTerm computeTacletAppBranchCondition(Node parent, Node node, boo
boolean improveReadability) throws ProofInputException {
if (!(parent.getAppliedRuleApp() instanceof TacletApp app)) {
throw new ProofInputException(
"Only TacletApp is allowed in branch computation but rule \""
"Only ITacletApp is allowed in branch computation but rule \""
+ parent.getAppliedRuleApp() + "\" was found.");
}
Services services = node.proof().getServices();
Expand Down Expand Up @@ -4314,7 +4314,7 @@ private static ImmutableArray<JTerm> extractValueFromUpdate(

/**
* Initializes the {@link Proof} of the given {@link SymbolicExecutionTreeBuilder} so that the
* correct {@link Strategy} is used.
* correct {@link JavaStrategy} is used.
*
* @param builder The {@link SymbolicExecutionTreeBuilder} to initialize.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Node;
import de.uka.ilkd.key.proof.Proof;
import de.uka.ilkd.key.strategy.Strategy;
import de.uka.ilkd.key.testgen.TestGenerationSettings;

import org.key_project.logic.Name;
import org.key_project.prover.proof.ProofGoal;
import org.key_project.prover.rules.Rule;
import org.key_project.prover.rules.RuleApp;
import org.key_project.prover.sequent.PosInOccurrence;
import org.key_project.prover.strategy.Strategy;
import org.key_project.prover.strategy.costbased.MutableState;
import org.key_project.prover.strategy.costbased.NumberRuleAppCost;
import org.key_project.prover.strategy.costbased.RuleAppCost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
import de.uka.ilkd.key.proof.Proof;
import de.uka.ilkd.key.proof.init.ContractPO;
import de.uka.ilkd.key.proof.init.FunctionalOperationContractPO;
import de.uka.ilkd.key.strategy.RuleAppCostCollector;
import de.uka.ilkd.key.strategy.Strategy;
import de.uka.ilkd.key.strategy.JavaStrategy;
import de.uka.ilkd.key.wd.*;
import de.uka.ilkd.key.wd.po.*;

import org.key_project.logic.Name;
import org.key_project.prover.proof.ProofGoal;
import org.key_project.prover.rules.RuleApp;
import org.key_project.prover.sequent.PosInOccurrence;
import org.key_project.prover.strategy.RuleAppCostCollector;
import org.key_project.prover.strategy.Strategy;
import org.key_project.prover.strategy.costbased.MutableState;
import org.key_project.prover.strategy.costbased.NumberRuleAppCost;
import org.key_project.prover.strategy.costbased.RuleAppCost;
Expand Down Expand Up @@ -95,7 +96,7 @@ public boolean canApplyTo(Proof proof, ImmutableList<Goal> goals,
* This strategy accepts all rule apps for which the rule name is a Well-Definedness rule and
* rejects everything else.
*/
private static class WellDefinednessStrategy implements Strategy<Goal> {
private static class WellDefinednessStrategy implements JavaStrategy {

private static final Name NAME = new Name(WellDefinednessStrategy.class.getSimpleName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class TacletFindModel extends AbstractTableModel {
/**
* Create new data model for tree.
*
* @param app the TacletApp where to get the necessary entries
* @param app the ITacletApp where to get the necessary entries
* @param services services.
* @param nss universal namespace of variables, minimum for input in a row.
* @param scm the abbreviation map.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public void setManualInput(int i, String s) {
}

/**
* replaces the TacletApp of this ApplyTacletDialogModel by an TacletApp where all name
* replaces the ITacletApp of this ApplyTacletDialogModel by an ITacletApp where all name
* conflicts are resolved and thus the parser is enabled to accept variables from the context or
* the prefix of the Taclet.
*
Expand Down
3 changes: 2 additions & 1 deletion key.core/src/main/java/de/uka/ilkd/key/ldt/IntegerLDT.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import de.uka.ilkd.key.logic.TermServices;
import de.uka.ilkd.key.util.Debug;

import org.key_project.ldt.IIntLdt;
import org.key_project.logic.Name;
import org.key_project.logic.op.Function;
import org.key_project.util.ExtList;
Expand All @@ -33,7 +34,7 @@
* convert java number types to their logic counterpart.
*/
@SuppressWarnings("unused")
public final class IntegerLDT extends LDT {
public final class IntegerLDT extends LDT implements IIntLdt {
private static final Logger LOGGER = LoggerFactory.getLogger(IntegerLDT.class);

public static final Name NAME = new Name("int");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ public ProgramElementName getTemporaryNameProposal(String basename) {
@Override
public String getProposal(TacletApp app, SchemaVariable var, Services services, Node undoAnchor,
ImmutableList<String> previousProposals) {
// determine posOfDeclaration from TacletApp
// determine posOfDeclaration from ITacletApp
ContextStatementBlockInstantiation cie = app.instantiations().getContextInstantiation();
PosInProgram posOfDeclaration = (cie == null ? null : cie.prefix());

Expand Down
Loading
Loading