Commit 494cc0bd authored by LULUDBR\Lulu's avatar LULUDBR\Lulu

Merge remote-tracking branch 'origin/master'

parents 6023c481 e1d0cfa4
...@@ -15,6 +15,10 @@ public class StepIntoReverseCommand<T> extends DebuggerCommand<T> { ...@@ -15,6 +15,10 @@ public class StepIntoReverseCommand<T> extends DebuggerCommand<T> {
dbg.setStatePointer(statementBefore); dbg.setStatePointer(statementBefore);
} else{ } else{
dbg.setStatePointer(statePointer); dbg.setStatePointer(statePointer);
/*if (statePointer.isLastNode() || statePointer.isFirstNode()) {
System.out.println("We need Sonderbehandlung here");
}*/
} }
} }
} }
......
...@@ -6,14 +6,19 @@ public class StepOverReverseCommand<T> extends DebuggerCommand<T> { ...@@ -6,14 +6,19 @@ public class StepOverReverseCommand<T> extends DebuggerCommand<T> {
@Override @Override
public void execute(DebuggerFramework<T> dbg) throws DebuggerException { public void execute(DebuggerFramework<T> dbg) throws DebuggerException {
val statePointer = dbg.getCurrentStatePointer(); val statePointer = dbg.getCurrentStatePointer();
PTreeNode<T> stepOverReverse = statePointer.getStepInvInto() != null ? PTreeNode<T> stepOverReverse = statePointer.getStepInvOver();
statePointer.getStepInvInto() :
statePointer.getStepInvOver();
if (stepOverReverse == null) { if (stepOverReverse == null) {
info("There is no previous state to the current one."); int size = statePointer.getContextNodes().size();
} dbg.setStatePointer(statePointer.getContextNodes().get(size - 1));
dbg.setStatePointer(stepOverReverse); /*if(statePointer.isAtomic()) {
dbg.setStatePointer(statePointer);
}else{
info("There is no previous state to the current one.");
}*/
//state before statement
} else {
dbg.setStatePointer(stepOverReverse);
}
} }
} }
...@@ -282,9 +282,11 @@ public class DebuggerMain implements Initializable { ...@@ -282,9 +282,11 @@ public class DebuggerMain implements Initializable {
* @see {@link #handleStatePointer(PTreeNode)} * @see {@link #handleStatePointer(PTreeNode)}
*/ */
private void handleStatePointerUI(PTreeNode<KeyData> node) { private void handleStatePointerUI(PTreeNode<KeyData> node) {
graph.addPartiallyAndMark(node);
if (node != null) { if (node != null) {
graph.addPartiallyAndMark(node);
getInspectionViewsController().getActiveInspectionViewTab().activate(node, node.getStateBeforeStmt()); getInspectionViewsController().getActiveInspectionViewTab().activate(node, node.getStateBeforeStmt());
scriptController.getDebugPositionHighlighter().highlight(node.getStatement()); scriptController.getDebugPositionHighlighter().highlight(node.getStatement());
} else { } else {
...@@ -958,11 +960,22 @@ public class DebuggerMain implements Initializable { ...@@ -958,11 +960,22 @@ public class DebuggerMain implements Initializable {
public void stepIntoReverse(ActionEvent actionEvent) { public void stepIntoReverse(ActionEvent actionEvent) {
LOGGER.debug("DebuggerMain.stepIntoReverser"); LOGGER.debug("DebuggerMain.stepIntoReverser");
try { try {
if (model.getDebuggerFramework().getStatePointer().isAtomic()) { PTreeNode<KeyData> statePointer = model.getDebuggerFramework().getStatePointer();
model.getDebuggerFramework().getStatePointerListener() if (statePointer.getStepInvInto() == null) {
.add(new StepIntoReverseHandler(model.getStatePointer())); if (statePointer.getStepInvOver() != null) {
if (statePointer.getStepInvOver().isAtomic()) {
model.getDebuggerFramework().getStatePointerListener()
.add(new StepIntoReverseHandler(model.getStatePointer()));
}
model.getDebuggerFramework().execute(new StepIntoReverseCommand<>());
} else {
if (statePointer.isLastNode() || statePointer.isFirstNode()) {
LOGGER.error("We need a special treatment");
} else {
LOGGER.error("There is no state to step into reverse");
}
}
} }
model.getDebuggerFramework().execute(new StepIntoReverseCommand<>());
} catch (DebuggerException e) { } catch (DebuggerException e) {
Utils.showExceptionDialog("", "", "", e); Utils.showExceptionDialog("", "", "", e);
LOGGER.error(e); LOGGER.error(e);
...@@ -1233,7 +1246,6 @@ public class DebuggerMain implements Initializable { ...@@ -1233,7 +1246,6 @@ public class DebuggerMain implements Initializable {
Proof proof = beforeNode.getData().getProof(); Proof proof = beforeNode.getData().getProof();
Node pnode = beforeNode.getData().getNode(); Node pnode = beforeNode.getData().getNode();
// stateAfterStmt.forEach(keyDataGoalNode -> System.out.println("keyDataGoalNode.getData().getNode().serialNr() = " + keyDataGoalNode.getData().getNode().serialNr()));
ptree.setProof(proof); ptree.setProof(proof);
ptree.setRoot(pnode); ptree.setRoot(pnode);
......
// Please select one of the following scripts. // Please select one of the following scripts.
// //
script autoScript(){
auto;
}
script test1234(){ script test1234(){
impRight; impRight;
autoScript;
//auto; //auto;
} }
script test23(){ script test23(){
impRight; impRight;
x:term := find(match `?rt ==>`); //x:term := find(match `?rt ==>`);
impLeft formula=x; //impLeft formula=x;
impLeft formula=find(match `?rt ==>`);
cases{ cases{
case match `q==>`: case match `q==>`:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment