Commit 6ede00a5 authored by Lulu Luong's avatar Lulu Luong

Merge remote-tracking branch 'origin/master'

parents 2d326cb3 5c4735b3
...@@ -47,7 +47,9 @@ public class Statements extends ASTNode<ScriptLanguageParser.StmtListContext> ...@@ -47,7 +47,9 @@ public class Statements extends ASTNode<ScriptLanguageParser.StmtListContext>
@Override @Override
public ASTNode[] getChildren() { public ASTNode[] getChildren() {
return (ASTNode[]) toArray(); Object[] arr = toArray();
return toArray(new ASTNode[arr.length]);
//return (ASTNode[]) toArray();
} }
public Statements(Statements body) { public Statements(Statements body) {
......
...@@ -8,6 +8,7 @@ import de.uka.ilkd.key.java.Services; ...@@ -8,6 +8,7 @@ import de.uka.ilkd.key.java.Services;
import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.Proof;
import de.uka.ilkd.key.proof.init.ProofInputException; import de.uka.ilkd.key.proof.init.ProofInputException;
import de.uka.ilkd.key.proof.init.ProofOblInput;
import de.uka.ilkd.key.proof.io.ProblemLoaderException; import de.uka.ilkd.key.proof.io.ProblemLoaderException;
import de.uka.ilkd.key.speclang.Contract; import de.uka.ilkd.key.speclang.Contract;
import edu.kit.iti.formal.psdbg.interpreter.data.GoalNode; import edu.kit.iti.formal.psdbg.interpreter.data.GoalNode;
...@@ -91,8 +92,23 @@ public class KeYProofFacade { ...@@ -91,8 +92,23 @@ public class KeYProofFacade {
*/ */
public void reload(File problemFile) throws ProofInputException, ProblemLoaderException { public void reload(File problemFile) throws ProofInputException, ProblemLoaderException {
if (contract.get() != null) {// reinstante the contract if (contract.get() != null) {// reinstante the contract
setProof(getEnvironment().createProof( pma = KeYApi.loadFromKeyFile(problemFile);
contract.get().getProofObl(getEnvironment().getServices()))); List<Contract> contracts = pma.getProofContracts();
contracts.forEach(contract1 -> {
if(contract.get().getName().equals(contract1.getName())){
contractProperty().set(contract1);
}
});
if(contract.get() != null){
try{
activateContract(contract.get());
}catch (ProofInputException pie){
throw new ProofInputException("Contract not reloadable.", pie.getCause());
}
}
/*setProof(getEnvironment().createProof(
contract.get().getProofObl(getEnvironment().getServices())));*/
} else { } else {
setProof(KeYApi.loadFromKeyFile(problemFile).getLoadedProof().getProof()); setProof(KeYApi.loadFromKeyFile(problemFile).getLoadedProof().getProof());
} }
......
package edu.kit.iti.formal.psdbg.interpreter.exceptions; package edu.kit.iti.formal.psdbg.interpreter.exceptions;
import de.uka.ilkd.key.macros.scripts.AbstractCommand;
import de.uka.ilkd.key.macros.scripts.RuleCommand; import de.uka.ilkd.key.macros.scripts.RuleCommand;
import java.util.Map; import java.util.Map;
...@@ -13,6 +14,9 @@ public class ScriptCommandNotApplicableException extends InterpreterRuntimeExcep ...@@ -13,6 +14,9 @@ public class ScriptCommandNotApplicableException extends InterpreterRuntimeExcep
public ScriptCommandNotApplicableException(Exception e, RuleCommand c) { public ScriptCommandNotApplicableException(Exception e, RuleCommand c) {
System.out.println("Call " + c.getName() + " was not applicable"); System.out.println("Call " + c.getName() + " was not applicable");
} }
public ScriptCommandNotApplicableException(Exception e, AbstractCommand c) {
System.out.println("Call " + c.getName() + " was not applicable");
}
public ScriptCommandNotApplicableException(Exception e, RuleCommand c, Map<String, Object> params) { public ScriptCommandNotApplicableException(Exception e, RuleCommand c, Map<String, Object> params) {
super(createMessage(c, params), e); super(createMessage(c, params), e);
......
...@@ -87,10 +87,7 @@ public class SaveCommand implements CommandHandler<KeyData> { ...@@ -87,10 +87,7 @@ public class SaveCommand implements CommandHandler<KeyData> {
} }
@Override
public boolean isUninterpretedParams(CallStatement call) {
return true;
}
} }
......
...@@ -74,6 +74,7 @@ import org.reactfx.util.Timer; ...@@ -74,6 +74,7 @@ import org.reactfx.util.Timer;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import javax.swing.*; import javax.swing.*;
import javax.xml.bind.JAXBException;
import java.awt.event.WindowAdapter; import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent; import java.awt.event.WindowEvent;
import java.awt.event.WindowListener; import java.awt.event.WindowListener;
...@@ -188,7 +189,7 @@ public class DebuggerMain implements Initializable { ...@@ -188,7 +189,7 @@ public class DebuggerMain implements Initializable {
.filter(it -> Objects.equals(fna.childOrMe(it.getStatement()), it.getStatement())) .filter(it -> Objects.equals(fna.childOrMe(it.getStatement()), it.getStatement()))
.collect(Collectors.toList()); .collect(Collectors.toList());
System.out.println(result); LOGGER.info(result);
for (PTreeNode<KeyData> statePointerToPostMortem : result) { for (PTreeNode<KeyData> statePointerToPostMortem : result) {
...@@ -212,13 +213,18 @@ public class DebuggerMain implements Initializable { ...@@ -212,13 +213,18 @@ public class DebuggerMain implements Initializable {
if (stateAfterStmt.getSelectedGoalNode() != null) { if (stateAfterStmt.getSelectedGoalNode() != null) {
im.setSelectedGoalNodeToShow(stateAfterStmt.getSelectedGoalNode()); im.setSelectedGoalNodeToShow(stateAfterStmt.getSelectedGoalNode());
} else { } else {
im.setSelectedGoalNodeToShow(goals.get(0)); if(goals.size() > 0) {
im.setSelectedGoalNodeToShow(goals.get(0));
} else {
im.setSelectedGoalNodeToShow(stateBeforeStmt.getSelectedGoalNode());
statusBar.publishMessage("This goal node was closed by the selected mutator.");
}
} }
inspectionViewsController.newPostMortemInspector(im) inspectionViewsController.newPostMortemInspector(im)
.dock(dockStation, DockPos.CENTER, getActiveInspectorDock()); .dock(dockStation, DockPos.CENTER, getActiveInspectorDock());
} else { } else {
statusBar.publishErrorMessage("There is no post mortem state to show to this node, because this node was not executed."); statusBar.publishErrorMessage("There is no post mortem state to show to this node, because this node was not executed or is a selector statement.");
} }
} }
} }
...@@ -544,10 +550,11 @@ public class DebuggerMain implements Initializable { ...@@ -544,10 +550,11 @@ public class DebuggerMain implements Initializable {
//save old information and refresh models //save old information and refresh models
statusBar.publishMessage("Reloading..."); statusBar.publishMessage("Reloading...");
File lastLoaded; File lastLoaded;
Contract chosen = null;
if (model.getKeyFile() != null) { if (model.getKeyFile() != null) {
lastLoaded = model.getKeyFile(); lastLoaded = model.getKeyFile();
} else { } else {
Contract chosen = model.getChosenContract(); chosen = model.getChosenContract();
lastLoaded = model.getJavaFile(); lastLoaded = model.getJavaFile();
} }
//model.reload(); //model.reload();
...@@ -561,8 +568,11 @@ public class DebuggerMain implements Initializable { ...@@ -561,8 +568,11 @@ public class DebuggerMain implements Initializable {
iModel.clearHighlightLines(); iModel.clearHighlightLines();
iModel.getGoals().clear(); iModel.getGoals().clear();
iModel.setSelectedGoalNodeToShow(null); iModel.setSelectedGoalNodeToShow(null);
if(chosen != null) {
FACADE.contractProperty().set(chosen);
}
try { try {
FACADE.reload(lastLoaded); FACADE.reload(lastLoaded);
if (iModel.getGoals().size() > 0) { if (iModel.getGoals().size() > 0) {
iModel.setSelectedGoalNodeToShow(iModel.getGoals().get(0)); iModel.setSelectedGoalNodeToShow(iModel.getGoals().get(0));
...@@ -1266,10 +1276,16 @@ public class DebuggerMain implements Initializable { ...@@ -1266,10 +1276,16 @@ public class DebuggerMain implements Initializable {
//Update Gui //Update Gui
MainScriptIdentifier msi = scriptController.getMainScript(); MainScriptIdentifier msi = scriptController.getMainScript();
msi.getScriptArea().setSavepointMarker(selected.getLineNumber()); msi.getScriptArea().setSavepointMarker(selected.getLineNumber());
msi.getScriptArea().getCodeArea().setStyleClass(selected.getStartOffset(), selected.getEndOffset() + 1, "underlinesave"); scriptExecutionController.executeScriptFromSavePoint(interpreterBuilder, selected); scriptController.getMainScript().getScriptArea().underlineSavepoint(selected);
try {
KeyPersistentFacade.read(FACADE.getEnvironment(), FACADE.getProof(), new StringReader(selected.getPersistedStateFile(FACADE.getFilepath()).toString()));
} catch (JAXBException e) {
e.printStackTrace();
}
scriptExecutionController.executeScriptFromSavePoint(interpreterBuilder, selected);
//TODO: KeyPersistentFacade.read(FACADE.getEnvironment(), FACADE.getProof(), new StringReader(selected.getPersistedStateFile(FACADE.getFilepath()).toString()));
//TODO (NullpointerEx: interpreterbuilder == null): scriptExecutionController.executeScriptFromSavePoint(interpreterBuilder, selected);
} }
...@@ -1443,13 +1459,20 @@ public class DebuggerMain implements Initializable { ...@@ -1443,13 +1459,20 @@ public class DebuggerMain implements Initializable {
ptree.setProof(proof); ptree.setProof(proof);
ptree.setRoot(pnode); ptree.setRoot(pnode);
ptree.setNodeColor(pnode, "blueviolet"); ptree.setNodeColor(pnode, "blueviolet");
ptree.setDeactivateRefresh(true); ptree.setDeactivateRefresh(false);
if (stateAfterStmt.size() > 0) { if (stateAfterStmt.size() > 0) {
Set<Node> sentinels = proof.getSubtreeGoals(pnode) proof.getSubtreeGoals(pnode).forEach(goal -> System.out.println("goal.node().serialNr() = " + goal.node().serialNr()));
Set<Node> sentinels;
sentinels = proof.getSubtreeGoals(pnode)
.stream() .stream()
.map(Goal::node) .map(Goal::node)
.collect(Collectors.toSet()); .collect(Collectors.toSet());
if(sentinels.size() == 0){
sentinels = new LinkedHashSet();
sentinels.add(pnode);
//sentinels.add(stateAfterStmt.get(0).getData().getNode());
}
ptree.getSentinels().addAll(sentinels); ptree.getSentinels().addAll(sentinels);
sentinels.forEach(node -> ptree.setNodeColor(node, "blueviolet")); sentinels.forEach(node -> ptree.setNodeColor(node, "blueviolet"));
} else { } else {
...@@ -1465,8 +1488,8 @@ public class DebuggerMain implements Initializable { ...@@ -1465,8 +1488,8 @@ public class DebuggerMain implements Initializable {
//traverseProofTreeAndAddSentinelsToLeaves(); //traverseProofTreeAndAddSentinelsToLeaves();
} }
ptree.expandRootToSentinels(); ptree.expandRootToSentinels();
System.out.println("ptree = " + ptree.getRoot());
DockNode node = new DockNode(ptree, "Proof Tree for Step Into: " + DockNode node = new DockNode(ptree, "Proof Tree for Step Into: " +
original.getStatement().accept(new ShortCommandPrinter()) original.getStatement().accept(new ShortCommandPrinter())
); );
......
...@@ -2,6 +2,9 @@ package edu.kit.iti.formal.psdbg.gui.controller; ...@@ -2,6 +2,9 @@ package edu.kit.iti.formal.psdbg.gui.controller;
import com.google.common.eventbus.EventBus; import com.google.common.eventbus.EventBus;
import de.uka.ilkd.key.logic.PosInOccurrence; import de.uka.ilkd.key.logic.PosInOccurrence;
import de.uka.ilkd.key.macros.ProofMacro;
import de.uka.ilkd.key.macros.scripts.ProofScriptCommand;
import de.uka.ilkd.key.macros.scripts.ScriptCommand;
import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Node; import de.uka.ilkd.key.proof.Node;
import de.uka.ilkd.key.rule.TacletApp; import de.uka.ilkd.key.rule.TacletApp;
...@@ -59,7 +62,7 @@ public class Events { ...@@ -59,7 +62,7 @@ public class Events {
@Data @Data
@RequiredArgsConstructor @RequiredArgsConstructor
public static class CommandApplicationEvent { public static class CommandApplicationEvent {
private final String commandName; private final ProofScriptCommand commandName;
private final PosInOccurrence pio; private final PosInOccurrence pio;
private final Goal currentGoal; private final Goal currentGoal;
...@@ -153,4 +156,12 @@ public class Events { ...@@ -153,4 +156,12 @@ public class Events {
private final int position; private final int position;
} }
@Data
@RequiredArgsConstructor
public static class MacroApplicationEvent {
private final ProofMacro macroName;
private final PosInOccurrence posInOccurrence;
private final Goal goal;
}
} }
...@@ -6,9 +6,8 @@ import de.uka.ilkd.key.control.DefaultUserInterfaceControl; ...@@ -6,9 +6,8 @@ import de.uka.ilkd.key.control.DefaultUserInterfaceControl;
import de.uka.ilkd.key.java.Services; import de.uka.ilkd.key.java.Services;
import de.uka.ilkd.key.logic.Sequent; import de.uka.ilkd.key.logic.Sequent;
import de.uka.ilkd.key.logic.SequentFormula; import de.uka.ilkd.key.logic.SequentFormula;
import de.uka.ilkd.key.macros.scripts.EngineState; import de.uka.ilkd.key.macros.ProofMacro;
import de.uka.ilkd.key.macros.scripts.RuleCommand; import de.uka.ilkd.key.macros.scripts.*;
import de.uka.ilkd.key.macros.scripts.ScriptException;
import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Node; import de.uka.ilkd.key.proof.Node;
import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.Proof;
...@@ -27,6 +26,7 @@ import edu.kit.iti.formal.psdbg.interpreter.data.VariableAssignment; ...@@ -27,6 +26,7 @@ import edu.kit.iti.formal.psdbg.interpreter.data.VariableAssignment;
import edu.kit.iti.formal.psdbg.interpreter.dbg.DebuggerFramework; import edu.kit.iti.formal.psdbg.interpreter.dbg.DebuggerFramework;
import edu.kit.iti.formal.psdbg.interpreter.dbg.PTreeNode; import edu.kit.iti.formal.psdbg.interpreter.dbg.PTreeNode;
import edu.kit.iti.formal.psdbg.interpreter.exceptions.ScriptCommandNotApplicableException; import edu.kit.iti.formal.psdbg.interpreter.exceptions.ScriptCommandNotApplicableException;
import edu.kit.iti.formal.psdbg.interpreter.funchdl.MacroCommandHandler;
import edu.kit.iti.formal.psdbg.parser.PrettyPrinter; import edu.kit.iti.formal.psdbg.parser.PrettyPrinter;
import edu.kit.iti.formal.psdbg.parser.ast.*; import edu.kit.iti.formal.psdbg.parser.ast.*;
import edu.kit.iti.formal.psdbg.parser.data.Value; import edu.kit.iti.formal.psdbg.parser.data.Value;
...@@ -47,6 +47,7 @@ import java.math.BigInteger; ...@@ -47,6 +47,7 @@ import java.math.BigInteger;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Getter @Getter
@Setter @Setter
@RequiredArgsConstructor @RequiredArgsConstructor
...@@ -202,7 +203,7 @@ public class InteractiveModeController { ...@@ -202,7 +203,7 @@ public class InteractiveModeController {
try { try {
applyRule(call, g); applyRuleHelper(call, g, Type.RULE);
// Insert into the right cases // Insert into the right cases
// Node currentNode = g.node(); // Node currentNode = g.node();
// cases.get(findRoot(currentNode)).add(call); // cases.get(findRoot(currentNode)).add(call);
...@@ -231,6 +232,149 @@ public class InteractiveModeController { ...@@ -231,6 +232,149 @@ public class InteractiveModeController {
} }
@Subscribe
public void handle(Events.MacroApplicationEvent map) {
LOGGER.debug("Handling {}", map);
Goal g = map.getGoal();
MacroCommand.Parameters params = new MacroCommand.Parameters();
Parameters callp = new Parameters();
CallStatement call = new CallStatement(map.getMacroName().getScriptCommandName(), callp);
try {
applyRuleHelper(call, g, Type.MACRO);
String c = getCasesAsString();
scriptArea.setText("" +
"//Preview \n" + c);
} catch (ScriptCommandNotApplicableException e) {
StringBuilder sb = new StringBuilder("The macro command ");
sb.append(call.getCommand()).append(" was not applicable.");
System.out.println("e = " + e);
//sb.append("\nSequent Formula: formula=").append(sfTerm);
//sb.append("\nOn Sub Term: on=").append(onTerm);
Utils.showWarningDialog("Proof Command was not applicable",
"Proof Command was not applicable.",
sb.toString(), e);
}
}
private void applyRuleHelper(CallStatement call, Goal g, Type t) throws ScriptCommandNotApplicableException {
savepointslist.add(g.node());
savepointsstatement.add(call);
ObservableList<GoalNode<KeyData>> goals = model.getGoals();
GoalNode<KeyData> expandedNode;
List<GoalNode<KeyData>> collect = goals.stream().filter(keyDataGoalNode -> keyDataGoalNode.getData().getGoal().equals(g)).collect(Collectors.toList());
if (collect.isEmpty() || collect.size() > 1) {
throw new RuntimeException("Interactive Rule can not be applied, can not find goal in goal list");
} else {
expandedNode = collect.get(0);
}
// KeyData kd = g.getData();
Evaluator eval = new Evaluator(expandedNode.getAssignments(), expandedNode);
Map<String, Object> map = new HashMap<>();
call.getParameters().forEach((variable, expression) -> {
Value exp = eval.eval(expression);
map.put(variable.getIdentifier(), exp.getData());
});
LOGGER.info("Execute {} with {}", call, map);
try {
KeyData kd = expandedNode.getData();
map.put("#2", call.getCommand());
EngineState estate = new EngineState(g.proof());
estate.setGoal(g);
ValueInjector valueInjector = ValueInjector.createDefault(kd.getNode());
AbstractUserInterfaceControl uiControl = new DefaultUserInterfaceControl();
switch (t){
case MACRO:
MacroCommand.Parameters cc = new MacroCommand.Parameters();
MacroCommand c = new MacroCommand();
cc = valueInjector.inject(c, cc, map);
c.execute(uiControl, cc, estate);
postStateHandler(call, g, goals, expandedNode, kd);
break;
case RULE:
RuleCommand.Parameters ccR = new RuleCommand.Parameters();
RuleCommand cR = new RuleCommand();
ccR = valueInjector.inject(cR, ccR, map);
cR.execute(uiControl, ccR, estate);
postStateHandler(call, g, goals, expandedNode, kd);
break;
case SCRIPT_COMMAND:
ScriptCommand.Parameters ccS = new ScriptCommand.Parameters();
ScriptCommand cS = new ScriptCommand();
ccS = valueInjector.inject(cS, ccS, map);
cS.execute(uiControl, ccS, estate);
postStateHandler(call, g, goals, expandedNode, kd);
break;
default:
throw new Exception("Command not found");
}
} catch (Exception e) {
if (e.getClass().equals(ScriptException.class)) {
System.out.println("e.getMessage() = " + e.getMessage());
throw new ScriptCommandNotApplicableException(e, null, map);
} else {
throw new RuntimeException(e);
}
}
}
private void postStateHandler(CallStatement call, Goal g, ObservableList<GoalNode<KeyData>> goals, GoalNode<KeyData> expandedNode, KeyData kd) {
ImmutableList<Goal> ngoals = g.proof().getSubtreeGoals(expandedNode.getData().getNode());
goals.remove(expandedNode);
GoalNode<KeyData> last = null;
if (ngoals.size() > 1) {
cases.get(findRoot(ngoals.get(0).node())).add(call);
CasesStatement inner = new CasesStatement();
cases.get(findRoot(ngoals.get(0).node())).add(inner);
for (Goal newGoalNode : ngoals) {
KeyData kdn = new KeyData(kd, newGoalNode.node());
goals.add(last = new GoalNode<>(expandedNode, kdn, kdn.getNode().isClosed()));
val caseForSubNode = new GuardedCaseStatement();
val m = new MatchExpression();
m.setPattern(new StringLiteral(
format(LabelFactory.getBranchingLabel(newGoalNode.node()))
));
caseForSubNode.setGuard(m);
inner.getCases().add(caseForSubNode);
cases.put(last.getData().getNode(), caseForSubNode.getBody());
}
} else {
if (ngoals.size() == 0) {
cases.get(findRoot(expandedNode.getData().getNode())).add(call);
} else {
KeyData kdn = new KeyData(kd, ngoals.get(0).node());
goals.add(last = new GoalNode<>(expandedNode, kdn, kdn.getNode().isClosed()));
Node currentNode = last.getData().getNode();
cases.get(findRoot(currentNode)).add(call);
}
}
if (last != null)
model.setSelectedGoalNodeToShow(last);
}
private Node findRoot(Node cur) { private Node findRoot(Node cur) {
while (cur != null) { while (cur != null) {
if (cases.keySet().contains(cur)) if (cases.keySet().contains(cur))
...@@ -245,7 +389,7 @@ public class InteractiveModeController { ...@@ -245,7 +389,7 @@ public class InteractiveModeController {
casesStatement.accept(pp); casesStatement.accept(pp);
return pp.toString(); return pp.toString();
} }
/*
private void applyRule(CallStatement call, Goal g) throws ScriptCommandNotApplicableException { private void applyRule(CallStatement call, Goal g) throws ScriptCommandNotApplicableException {
savepointslist.add(g.node()); savepointslist.add(g.node());
savepointsstatement.add(call); savepointsstatement.add(call);
...@@ -282,6 +426,7 @@ public class InteractiveModeController { ...@@ -282,6 +426,7 @@ public class InteractiveModeController {
//System.out.println("formula = " + map.get("formula")); //System.out.println("formula = " + map.get("formula"));
//System.out.println("occ = " + map.get("occ")); //System.out.println("occ = " + map.get("occ"));
ValueInjector valueInjector = ValueInjector.createDefault(kd.getNode()); ValueInjector valueInjector = ValueInjector.createDefault(kd.getNode());
RuleCommand.Parameters cc = new RuleCommand.Parameters(); RuleCommand.Parameters cc = new RuleCommand.Parameters();
cc = valueInjector.inject(c, cc, map); cc = valueInjector.inject(c, cc, map);
AbstractUserInterfaceControl uiControl = new DefaultUserInterfaceControl(); AbstractUserInterfaceControl uiControl = new DefaultUserInterfaceControl();
...@@ -333,7 +478,7 @@ public class InteractiveModeController { ...@@ -333,7 +478,7 @@ public class InteractiveModeController {
} }
} }
} }*/
private String format(String branchingLabel) { private String format(String branchingLabel) {
// System.out.println("branchingLabel = " + branchingLabel); // System.out.println("branchingLabel = " + branchingLabel);
...@@ -363,4 +508,8 @@ public class InteractiveModeController { ...@@ -363,4 +508,8 @@ public class InteractiveModeController {
} }
static enum Type {
MACRO, RULE, SCRIPT_COMMAND;
}
} }
...@@ -9,7 +9,10 @@ import edu.kit.iti.formal.psdbg.gui.actions.acomplete.Suggestion; ...@@ -9,7 +9,10 @@ import edu.kit.iti.formal.psdbg.gui.actions.acomplete.Suggestion;
import edu.kit.iti.formal.psdbg.gui.actions.inline.InlineActionSupplier; import edu.kit.iti.formal.psdbg.gui.actions.inline.InlineActionSupplier;
import edu.kit.iti.formal.psdbg.gui.controller.Events; import edu.kit.iti.formal.psdbg.gui.controller.Events;
import edu.kit.iti.formal.psdbg.gui.model.MainScriptIdentifier; import edu.kit.iti.formal.psdbg.gui.model.MainScriptIdentifier;
import edu.kit.iti.formal.psdbg.interpreter.data.KeyData;
import edu.kit.iti.formal.psdbg.interpreter.data.SavePoint;
import edu.kit.iti.formal.psdbg.interpreter.dbg.Breakpoint; import edu.kit.iti.formal.psdbg.interpreter.dbg.Breakpoint;
import edu.kit.iti.formal.psdbg.interpreter.dbg.PTreeNode;
import edu.kit.iti.formal.psdbg.lint.LintProblem; import edu.kit.iti.formal.psdbg.lint.LintProblem;
import edu.kit.iti.formal.psdbg.lint.LinterStrategy; import edu.kit.iti.formal.psdbg.lint.LinterStrategy;
import edu.kit.iti.formal.psdbg.parser.Facade; import edu.kit.iti.formal.psdbg.parser.Facade;
...@@ -388,8 +391,8 @@ public class ScriptArea extends BorderPane { ...@@ -388,8 +391,8 @@ public class ScriptArea extends BorderPane {
} }
} }
public void underlineSavepoint(){ public void underlineSavepoint(SavePoint sp){
codeArea.setStyle(sp.getLineNumber() -1, Collections.singleton("underlinesave"));
} }
private void highlightNonExecutionArea() { private void highlightNonExecutionArea() {
......
package edu.kit.iti.formal.psdbg.gui.controls; package edu.kit.iti.formal.psdbg.gui.controls;
import de.uka.ilkd.key.api.KeYApi;
import de.uka.ilkd.key.control.ProofControl; import de.uka.ilkd.key.control.ProofControl;
import de.uka.ilkd.key.gui.nodeviews.TacletMenu.TacletAppComparator; import de.uka.ilkd.key.gui.nodeviews.TacletMenu.TacletAppComparator;
import de.uka.ilkd.key.java.Services;
import de.uka.ilkd.key.logic.Name; import de.uka.ilkd.key.logic.Name;
import de.uka.ilkd.key.logic.PosInOccurrence; import de.uka.ilkd.key.logic.PosInOccurrence;
import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.Term;
import de.uka.ilkd.key.macros.ProofMacro;
import de.uka.ilkd.key.macros.scripts.ProofScriptCommand;
import de.uka.ilkd.key.pp.*; import de.uka.ilkd.key.pp.*;