Commit 9dfb35b5 authored by Alexander Weigl's avatar Alexander Weigl

libraries repair

parent 534d76ca
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" /> <output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" /> <output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.6" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.6" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" /> <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" /> <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.16.16" level="project" /> <orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.16.16" level="project" />
......
#!/bin/bash -x
# Execute this in this folder. # Execute this in this folder.
# Set to key/key/deployment/components/ # Set to key/key/deployment/components/
COMPONENTS=${COMPONENTS:-/home/sarah/Documents/KIT_Mitarbeiter/KeYDevelopment/KeYGitDir/key/key/deployment/components/} COMPONENTS=${COMPONENTS:-/home/sarah/Documents/KIT_Mitarbeiter/KeYDevelopment/KeYGitDir/key/key/deployment/components/}
COMPONENTS=$HOME/work/key/key/deployment/components/
mvn install:install-file -Dfile=$COMPONENTS/key.core.jar \ mvn install:install-file -Dfile=$COMPONENTS/key.core.jar \
......
...@@ -770,7 +770,5 @@ public class Interpreter<T> extends DefaultASTVisitor<Object> ...@@ -770,7 +770,5 @@ public class Interpreter<T> extends DefaultASTVisitor<Object>
assert !exitListenerStack.empty() && !entryListenerStack.empty(); assert !exitListenerStack.empty() && !entryListenerStack.empty();
entryListenerStack.pop(); entryListenerStack.pop();
exitListenerStack.pop(); exitListenerStack.pop();
} }
} }
...@@ -20,7 +20,7 @@ public class NodeAddedEvent { ...@@ -20,7 +20,7 @@ public class NodeAddedEvent {
} }
public String toString() { public String toString() {
return addedNode.getScriptstmt().getNodeName() + addedNode.getScriptstmt().getStartPosition(); return addedNode.getScriptStmt().getNodeName() + addedNode.getScriptStmt().getStartPosition();
} }
......
...@@ -26,7 +26,7 @@ public class StateAddedEvent { ...@@ -26,7 +26,7 @@ public class StateAddedEvent {
} }
public String toString() { public String toString() {
return "State added to " + changedNode.getScriptstmt().getNodeName() + changedNode.getScriptstmt().getStartPosition(); return "State added to " + changedNode.getScriptStmt().getNodeName() + changedNode.getScriptStmt().getStartPosition();
} }
} }
...@@ -3,9 +3,7 @@ package edu.kit.iti.formal.psdbg.interpreter.data; ...@@ -3,9 +3,7 @@ package edu.kit.iti.formal.psdbg.interpreter.data;
import edu.kit.iti.formal.psdbg.parser.ast.ASTNode; import edu.kit.iti.formal.psdbg.parser.ast.ASTNode;
import edu.kit.iti.formal.psdbg.parser.ast.CaseStatement; import edu.kit.iti.formal.psdbg.parser.ast.CaseStatement;
import lombok.Data; import lombok.Data;
import lombok.Getter;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.Setter;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
...@@ -16,60 +14,45 @@ import java.util.Map; ...@@ -16,60 +14,45 @@ import java.util.Map;
@Data @Data
public class InterpreterExtendedState<T> { public class InterpreterExtendedState<T> {
@Getter /**
@Setter * Null if root
*/
private final InterpreterExtendedState<T> predecessor;
/**
* If we are in a case statement, this map defines which
*/
private Map<CaseStatement, List<GoalNode<T>>> mappingOfCaseToStates = new HashMap<>(); private Map<CaseStatement, List<GoalNode<T>>> mappingOfCaseToStates = new HashMap<>();
/** /**
* State before the statement; * State before the statement;
*/ */
@Getter
@Setter
private State<T> stateBeforeStmt; private State<T> stateBeforeStmt;
/** /**
* State after execution of statement * State after execution of statement
*/ */
@Getter
@Setter
private State<T> stateAfterStmt; private State<T> stateAfterStmt;
/** /**
* Statement * Statement
*/ */
@Getter
@Setter
private ASTNode stmt; private ASTNode stmt;
/**
* Null if root
*/
@Getter
@Setter
private InterpreterExtendedState<T> predecessor;
public InterpreterExtendedState(InterpreterExtendedState<T> pred) {
this.predecessor = pred;
}
public InterpreterExtendedState<T> copy() { public InterpreterExtendedState<T> copy() {
InterpreterExtendedState<T> ext = new InterpreterExtendedState<>(); InterpreterExtendedState<T> ext = new InterpreterExtendedState<>(
if (this.predecessor != null) { this.predecessor != null
ext.setPredecessor(this.predecessor.copy()); ? this.predecessor.copy()
} else { : null);
ext.predecessor = null;
}
ext.setStmt(stmt); ext.setStmt(stmt);
if (stateAfterStmt != null) { if (stateAfterStmt != null) {
ext.setStateAfterStmt(this.stateAfterStmt.copy()); ext.setStateAfterStmt(this.stateAfterStmt.copy());
} else {
ext.setStateAfterStmt(null);
} }
if (stateBeforeStmt != null) { if (stateBeforeStmt != null) {
ext.setStateBeforeStmt(this.stateBeforeStmt.copy()); ext.setStateBeforeStmt(this.stateBeforeStmt.copy());
} else {
ext.setStateBeforeStmt(null);
} }
return ext; return ext;
} }
......
...@@ -3,6 +3,9 @@ package edu.kit.iti.formal.psdbg.interpreter.graphs; ...@@ -3,6 +3,9 @@ package edu.kit.iti.formal.psdbg.interpreter.graphs;
import edu.kit.iti.formal.psdbg.interpreter.data.InterpreterExtendedState; import edu.kit.iti.formal.psdbg.interpreter.data.InterpreterExtendedState;
import edu.kit.iti.formal.psdbg.interpreter.data.State; import edu.kit.iti.formal.psdbg.interpreter.data.State;
import edu.kit.iti.formal.psdbg.parser.ast.ASTNode; import edu.kit.iti.formal.psdbg.parser.ast.ASTNode;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import java.util.Stack; import java.util.Stack;
...@@ -10,57 +13,32 @@ import java.util.Stack; ...@@ -10,57 +13,32 @@ import java.util.Stack;
* Inner class representing nodes in the stategraph graph * Inner class representing nodes in the stategraph graph
* A node contains a reference to the ASTNode and a reference to the corresponding interpreter state if this state is already interpreted, null otherwise. * A node contains a reference to the ASTNode and a reference to the corresponding interpreter state if this state is already interpreted, null otherwise.
*/ */
@Data
public class PTreeNode<T> { public class PTreeNode<T> {
/** /**
* State after statement * State after statement
*/ */
private State<T> state; //private State<T> state;
private InterpreterExtendedState<T> extendedState = new InterpreterExtendedState<>(); private InterpreterExtendedState<T> extendedState = new InterpreterExtendedState<>(null);
/** /**
* Statement * Statement
*/ */
private ASTNode scriptstmt; private ASTNode scriptStmt;
/** /**
* Call context * Call context
*/ */
@Getter
@Setter
private Stack<ASTNode> context = new Stack<>(); private Stack<ASTNode> context = new Stack<>();
public Stack<ASTNode> getContext() {
return context;
}
public void setContext(Stack<ASTNode> context) {
this.context = context;
}
private boolean root; private boolean root;
PTreeNode(ASTNode node) { PTreeNode(ASTNode node) {
this.setScriptstmt(node); this.setScriptStmt(node);
}
public State<T> getState() {
return state;
}
public void setState(State<T> state) {
this.state = state;
}
public ASTNode getScriptstmt() {
return scriptstmt;
}
private void setScriptstmt(ASTNode scriptstmt) {
this.scriptstmt = scriptstmt;
}
public InterpreterExtendedState<T> getExtendedState() {
return extendedState;
} }
public void setExtendedState(InterpreterExtendedState<T> extendedState) { public void setExtendedState(InterpreterExtendedState<T> extendedState) {
...@@ -70,8 +48,8 @@ public class PTreeNode<T> { ...@@ -70,8 +48,8 @@ public class PTreeNode<T> {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("Node {"); sb.append("Node {");
if (scriptstmt != null) { if (scriptStmt != null) {
sb.append(scriptstmt.getNodeName() + "\n"); sb.append(scriptStmt.getNodeName() + "\n");
} else { } else {
sb.append("Root Node"); sb.append("Root Node");
} }
...@@ -89,9 +67,6 @@ public class PTreeNode<T> { ...@@ -89,9 +67,6 @@ public class PTreeNode<T> {
return sb.toString(); return sb.toString();
} }
public boolean hasState() {
return state != null;
}
public String extendedStateToString() { public String extendedStateToString() {
return this.extendedState.toString(); return this.extendedState.toString();
......
...@@ -94,8 +94,6 @@ public class StateGraphWrapper<T> { ...@@ -94,8 +94,6 @@ public class StateGraphWrapper<T> {
} }
private static int counter = 0;
public MutableValueGraph<PTreeNode<T>, EdgeTypes> getStateGraph() { public MutableValueGraph<PTreeNode<T>, EdgeTypes> getStateGraph() {
return stateGraph; return stateGraph;
} }
...@@ -118,7 +116,7 @@ public class StateGraphWrapper<T> { ...@@ -118,7 +116,7 @@ public class StateGraphWrapper<T> {
LOGGER.info("Stepover requested for null, therefore returning root"); LOGGER.info("Stepover requested for null, therefore returning root");
return this.rootProperty().get(); return this.rootProperty().get();
} }
LOGGER.info("Stepover requested for node {}@{}", statePointer.getScriptstmt(), statePointer.getScriptstmt().getNodeName()); LOGGER.info("Stepover requested for node {}@{}", statePointer.getScriptStmt(), statePointer.getScriptStmt().getNodeName());
//look for successors in the graph //look for successors in the graph
Set<PTreeNode<T>> successors = this.stateGraph.successors(statePointer); Set<PTreeNode<T>> successors = this.stateGraph.successors(statePointer);
//if there are no successors they have to be computed therefore return null, to trigger the proof tree controller //if there are no successors they have to be computed therefore return null, to trigger the proof tree controller
...@@ -195,10 +193,10 @@ public class StateGraphWrapper<T> { ...@@ -195,10 +193,10 @@ public class StateGraphWrapper<T> {
newStateNode.getContext().push(node); newStateNode.getContext().push(node);
State<T> currentInterpreterStateCopy = currentInterpreter.getCurrentState().copy(); State<T> currentInterpreterStateCopy = currentInterpreter.getCurrentState().copy();
//copy current state before executing statement //copy current state before executing statement
newStateNode.setState(currentInterpreterStateCopy); //newStateNode.setState(currentInterpreterStateCopy);
//create extended State //create extended State
InterpreterExtendedState<T> extState = new InterpreterExtendedState<>(); InterpreterExtendedState<T> extState = new InterpreterExtendedState<>(null);
extState.setStmt(node); extState.setStmt(node);
extState.setStateBeforeStmt(currentInterpreterStateCopy); extState.setStateBeforeStmt(currentInterpreterStateCopy);
newStateNode.setExtendedState(extState); newStateNode.setExtendedState(extState);
...@@ -236,7 +234,7 @@ public class StateGraphWrapper<T> { ...@@ -236,7 +234,7 @@ public class StateGraphWrapper<T> {
if (isCasesStmt) { if (isCasesStmt) {
newStateNode.getContext().push(node); newStateNode.getContext().push(node);
extState = new InterpreterExtendedState<>(lastNode.getExtendedState().copy()); extState = new InterpreterExtendedState<>(lastNode.getExtendedState());
extState.setStmt(node); extState.setStmt(node);
extState.setStateBeforeStmt(lastState.copy()); extState.setStateBeforeStmt(lastState.copy());
Map<CaseStatement, List<GoalNode<T>>> mappingOfCaseToStates = extState.getMappingOfCaseToStates(); Map<CaseStatement, List<GoalNode<T>>> mappingOfCaseToStates = extState.getMappingOfCaseToStates();
...@@ -247,11 +245,7 @@ public class StateGraphWrapper<T> { ...@@ -247,11 +245,7 @@ public class StateGraphWrapper<T> {
}); });
extState.setMappingOfCaseToStates(mappingOfCaseToStates); extState.setMappingOfCaseToStates(mappingOfCaseToStates);
//TODO default case
newStateNode.setState(lastState.copy());
} else { } else {
//set pointer to parent extended state //set pointer to parent extended state
extState = new InterpreterExtendedState<>(lastNode.getExtendedState().copy()); extState = new InterpreterExtendedState<>(lastNode.getExtendedState().copy());
extState.setStmt(node); extState.setStmt(node);
...@@ -321,7 +315,7 @@ public class StateGraphWrapper<T> { ...@@ -321,7 +315,7 @@ public class StateGraphWrapper<T> {
public PTreeNode<T> getNode(List<GoalNode<T>> newValue) { public PTreeNode<T> getNode(List<GoalNode<T>> newValue) {
for (Map.Entry<ASTNode, PTreeNode<T>> next : addedNodes.entrySet()) { for (Map.Entry<ASTNode, PTreeNode<T>> next : addedNodes.entrySet()) {
PTreeNode value = next.getValue(); PTreeNode value = next.getValue();
if (value.getState().getGoals().equals(newValue)) { if (value.getExtendedState().getStateBeforeStmt().getGoals().equals(newValue)) {
return value; return value;
} }
} }
...@@ -339,9 +333,9 @@ public class StateGraphWrapper<T> { ...@@ -339,9 +333,9 @@ public class StateGraphWrapper<T> {
stateGraph.nodes().forEach(n -> { stateGraph.nodes().forEach(n -> {
sb.append(n.hashCode()) sb.append(n.hashCode())
.append(" [label=\"") .append(" [label=\"")
.append(n.getScriptstmt().getNodeName()) .append(n.getScriptStmt().getNodeName())
.append("@") .append("@")
.append(n.getScriptstmt().getStartPosition().getLineNumber()) .append(n.getScriptStmt().getStartPosition().getLineNumber())
.append(n.extendedStateToString()) .append(n.extendedStateToString())
.append("\"]\n"); .append("\"]\n");
}); });
...@@ -379,8 +373,8 @@ public class StateGraphWrapper<T> { ...@@ -379,8 +373,8 @@ public class StateGraphWrapper<T> {
//copy Current Interpreter state //copy Current Interpreter state
State<T> currentState = currentInterpreter.getCurrentState().copy(); State<T> currentState = currentInterpreter.getCurrentState().copy();
//set the state //set the state
if (node != this.root.get().getScriptstmt()) { if (node != this.root.get().getScriptStmt()) {
newStateNode.setState(currentState); //newStateNode.setState(currentState);
newStateNode.getExtendedState().setStateAfterStmt(currentState); newStateNode.getExtendedState().setStateAfterStmt(currentState);
if (newStateNode.getContext().peek().equals(node)) { if (newStateNode.getContext().peek().equals(node)) {
newStateNode.getContext().pop(); newStateNode.getContext().pop();
...@@ -412,7 +406,7 @@ public class StateGraphWrapper<T> { ...@@ -412,7 +406,7 @@ public class StateGraphWrapper<T> {
if (root.get() == null) { if (root.get() == null) {
createRootNode(proofScript); createRootNode(proofScript);
} else { } else {
if (!root.get().getScriptstmt().equals(proofScript)) { if (!root.get().getScriptStmt().equals(proofScript)) {
createNewNode(proofScript); createNewNode(proofScript);
} }
} }
......
...@@ -2,6 +2,7 @@ package edu.kit.iti.formal.psdbg.gui.controller; ...@@ -2,6 +2,7 @@ package edu.kit.iti.formal.psdbg.gui.controller;
import com.google.common.eventbus.Subscribe; import com.google.common.eventbus.Subscribe;
import com.google.common.graph.MutableValueGraph; import com.google.common.graph.MutableValueGraph;
import de.uka.ilkd.key.proof.Goal;
import edu.kit.iti.formal.psdbg.InterpretingService; import edu.kit.iti.formal.psdbg.InterpretingService;
import edu.kit.iti.formal.psdbg.gui.controls.ASTNodeHiglightListener; import edu.kit.iti.formal.psdbg.gui.controls.ASTNodeHiglightListener;
import edu.kit.iti.formal.psdbg.gui.controls.DebuggerStatusBar; import edu.kit.iti.formal.psdbg.gui.controls.DebuggerStatusBar;
...@@ -26,6 +27,7 @@ import org.apache.logging.log4j.Logger; ...@@ -26,6 +27,7 @@ import org.apache.logging.log4j.Logger;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors;
/** /**
* Class controlling and maintaining proof tree structure for debugger and handling step functions for the debugger * Class controlling and maintaining proof tree structure for debugger and handling step functions for the debugger
...@@ -39,8 +41,10 @@ public class ProofTreeController { ...@@ -39,8 +41,10 @@ public class ProofTreeController {
* To control stepping * To control stepping
*/ */
private final PuppetMaster blocker = new PuppetMaster(); private final PuppetMaster blocker = new PuppetMaster();
/** /**
* Goals of the state which is referenced by the statePointer * Goals of the state which is referenced by the statePointer
* TODO: weigl I don't understand this.
*/ */
private final ListProperty<GoalNode<KeyData>> currentGoals = new SimpleListProperty<>(FXCollections.observableArrayList()); private final ListProperty<GoalNode<KeyData>> currentGoals = new SimpleListProperty<>(FXCollections.observableArrayList());
...@@ -123,10 +127,10 @@ public class ProofTreeController { ...@@ -123,10 +127,10 @@ public class ProofTreeController {
@Override @Override
public void graphChanged(NodeAddedEvent nodeAddedEvent) { public void graphChanged(NodeAddedEvent nodeAddedEvent) {
PTreeNode added = nodeAddedEvent.getAddedNode(); PTreeNode added = nodeAddedEvent.getAddedNode();
if (added.getState() != null) { if (added.getExtendedState().getStateBeforeStmt() != null) {
LOGGER.info("Graph changed with the following PTreeNode: {} and the statepointer points to {}", nodeAddedEvent.getAddedNode(), statePointer); LOGGER.info("Graph changed with the following PTreeNode: {} and the statepointer points to {}", nodeAddedEvent.getAddedNode(), statePointer);
nextComputedNode.setValue(nodeAddedEvent.getAddedNode()); nextComputedNode.setValue(nodeAddedEvent.getAddedNode());
// Events.fire(new Events.NewNodeExecuted(nodeAddedEvent.getAddedNode().getScriptstmt())); // Events.fire(new Events.NewNodeExecuted(nodeAddedEvent.getAddedNode().getScriptStmt()));
} }
} }
...@@ -136,28 +140,15 @@ public class ProofTreeController { ...@@ -136,28 +140,15 @@ public class ProofTreeController {
PTreeNode changedNode = stateAddedEvent.getChangedNode(); PTreeNode changedNode = stateAddedEvent.getChangedNode();
LOGGER.info("Graph changed by adding a state to PTreeNode: {} and the statepointer points to {}", stateAddedEvent, statePointer); LOGGER.info("Graph changed by adding a state to PTreeNode: {} and the statepointer points to {}", stateAddedEvent, statePointer);
nextComputedNode.set(changedNode); nextComputedNode.set(changedNode);
//Events.fire(new Events.NewNodeExecuted(changedNode.getScriptstmt())); //Events.fire(new Events.NewNodeExecuted(changedNode.getScriptStmt()));
} }
}; };
public ProofScript getMainScript() {
return mainScript.get();
}
public void setMainScript(ProofScript mainScript) {
this.mainScript.set(mainScript);
}
public SimpleObjectProperty<ProofScript> mainScriptProperty() {
return mainScript;
}
/** /**
* Create a new ProofTreeController * Create a new ProofTreeController
* and bind properties * and bind properties
*/ */
public ProofTreeController() { public ProofTreeController() {
...@@ -172,38 +163,61 @@ public class ProofTreeController { ...@@ -172,38 +163,61 @@ public class ProofTreeController {
nextComputedNode.addListener((observable, oldValue, newValue) -> { nextComputedNode.addListener((observable, oldValue, newValue) -> {
//update statepointer //update statepointer
if (newValue != null) { if (newValue != null) {
LOGGER.info("New node {} was computed and the statepointer was set to {}", newValue.getScriptstmt(), newValue); LOGGER.info("New node {} was computed and the statepointer was set to {}", newValue.getScriptStmt(), newValue);
this.statePointer = newValue; this.statePointer = newValue;
//setNewState(blocker.currentStateProperty().get()); //setNewState(blocker.currentStateProperty().get());
setNewState(newValue.getState()); setNewState(newValue.getExtendedState().getStateBeforeStmt());
} }
}); });
}
private static boolean compareCtrlFlowNodes(ControlFlowNode newNode, ControlFlowNode oldNode) {
return newNode.getScriptstmt().getNodeName().equals(oldNode.getScriptstmt().getNodeName());
}
private static boolean comparePTreeNodes(PTreeNode newTreeNode, PTreeNode oldTreeNode) {
return false;
}
public ProofScript getMainScript() {
return mainScript.get();
}
public void setMainScript(ProofScript mainScript) {
this.mainScript.set(mainScript);
}
//TODO handle endpoint
public SimpleObjectProperty<ProofScript> mainScriptProperty() {
return mainScript;
} }
//TODO handle endpoint of graph
/** /**
* Sets the properties that may notify GUI about statechanges with new state values * Sets the properties that may notify GUI about statechanges with new state values
* CurrentGoalsProperty and SelectedGoal are both listened by InspectionViewModel * CurrentGoalsProperty and SelectedGoal are both listened by InspectionViewModel
*
* @param state * @param state
*/ */
private void setNewState(State<KeyData> state) { private void setNewState(State<KeyData> state) {
LOGGER.info("Setting new State " + state.toString());
//Statepointer null wenn anfangszustand? //Statepointer null wenn anfangszustand?
if (statePointer != null && state != null) { if (statePointer != null && state != null) {
//setCurrentHighlightNode(statePointer.getScriptstmt()); LOGGER.info("Setting new State " + state.toString());
//setCurrentHighlightNode(statePointer.getScriptStmt());
//get all goals that are open //get all goals that are open
Object[] arr = state.getGoals().stream().filter(keyDataGoalNode -> !keyDataGoalNode.isClosed()).toArray(); //List<GoalNode<KeyData>> arr = state.getGoals().stream().filter(keyDataGoalNode -> !keyDataGoalNode.isClosed()).collect(Collectors.toList());
//if there is no selected goal node we might have reached //if there is no selected goal node we might have reached
//a closed proof //a closed proof
if (state.getSelectedGoalNode() == null) { if (state.getSelectedGoalNode() == null) {
setCurrentSelectedGoal(null); setCurrentSelectedGoal(null);
setCurrentGoals(arr.length == 0 ? Collections.emptyList() : state.getGoals()); setCurrentGoals(state.getGoals());
} else { } else {
setCurrentGoals(state.getGoals()); setCurrentGoals(state.getGoals());
...@@ -212,8 +226,8 @@ public class ProofTreeController { ...@@ -212,8 +226,8 @@ public class ProofTreeController {
LOGGER.debug("New State from this command: {}@{}", LOGGER.debug("New State from this command: {}@{}",
this.statePointer.getScriptstmt().getNodeName(), this.statePointer.getScriptStmt().getNodeName(),
this.statePointer.getScriptstmt().getStartPosition()); this.statePointer.getScriptStmt().getStartPosition());
} else { } else {
throw new RuntimeException("The state pointer was null when setting new state"); throw new RuntimeException("The state pointer was null when setting new state");
} }
...@@ -221,19 +235,6 @@ public class ProofTreeController { ...@@ -221,19 +235,6 @@ public class ProofTreeController {
} }