Commit e1fa86bc authored by Sarah Grebing's avatar Sarah Grebing

Merge branch 'master' of git.scc.kit.edu:xt9634/ProofScriptParser

parents 1010040d 77f055d3
Pipeline #14322 failed with stage
in 2 minutes and 39 seconds
......@@ -10,6 +10,8 @@
</content>
<orderEntry type="inheritedJdk" />
<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: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.16.16" level="project" />
......@@ -21,7 +23,7 @@
<orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.8" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.8" level="project" />
<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" />
</component>
</module>
\ No newline at end of file
# Execute this in this folder.
# Set to key/key/deployment/components/
COMPONENTS=~/work/key/key/deployment/components/
COMPONENTS=${COMPONENTS:-~/work/key/key/deployment/components/}
mvn install:install-file -Dfile=$COMPONENTS/key.core.jar \
......
# Execute this in this folder.
# Set to key/key/deployment/components/
COMPONENTS=~/work/key/key/deployment/components/
COMPONENTS=${COMPONENTS:-~/work/key/key/deployment/components/}
mvn install:install-file -Dfile=$COMPONENTS/key.core.jar \
......
......@@ -7,17 +7,17 @@
<snapshot>
<localCopy>true</localCopy>
</snapshot>
<lastUpdated>20170911152346</lastUpdated>
<lastUpdated>20170912105152</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<extension>jar</extension>
<value>2.7-SNAPSHOT</value>
<updated>20170911152346</updated>
<updated>20170912105152</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>2.7-SNAPSHOT</value>
<updated>20170911152346</updated>
<updated>20170912103022</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
......
......@@ -6,6 +6,6 @@
<versions>
<version>2.7-SNAPSHOT</version>
</versions>
<lastUpdated>20170911152346</lastUpdated>
<lastUpdated>20170912105152</lastUpdated>
</versioning>
</metadata>
......@@ -7,17 +7,17 @@
<snapshot>
<localCopy>true</localCopy>
</snapshot>
<lastUpdated>20170911152349</lastUpdated>
<lastUpdated>20170912105155</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<extension>jar</extension>
<value>2.7-SNAPSHOT</value>
<updated>20170911152349</updated>
<updated>20170912105155</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>2.7-SNAPSHOT</value>
<updated>20170911152349</updated>
<updated>20170912103024</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
......
......@@ -6,6 +6,6 @@
<versions>
<version>2.7-SNAPSHOT</version>
</versions>
<lastUpdated>20170911152349</lastUpdated>
<lastUpdated>20170912105155</lastUpdated>
</versioning>
</metadata>
......@@ -7,17 +7,17 @@
<snapshot>
<localCopy>true</localCopy>
</snapshot>
<lastUpdated>20170911152351</lastUpdated>
<lastUpdated>20170912105158</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<extension>jar</extension>
<value>2.7-SNAPSHOT</value>
<updated>20170911152351</updated>
<updated>20170912105158</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>2.7-SNAPSHOT</value>
<updated>20170911152351</updated>
<updated>20170912103027</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
......
......@@ -6,6 +6,6 @@
<versions>
<version>2.7-SNAPSHOT</version>
</versions>
<lastUpdated>20170911152351</lastUpdated>
<lastUpdated>20170912105158</lastUpdated>
</versioning>
</metadata>
......@@ -7,6 +7,6 @@
<versions>
<version>2.7</version>
</versions>
<lastUpdated>20170911152354</lastUpdated>
<lastUpdated>20170912105201</lastUpdated>
</versioning>
</metadata>
......@@ -19,9 +19,26 @@ import java.util.stream.Collectors;
* @version 1 (11.09.17)
*/
public class GenDoc {
private static final Set<String> FORBBIDEN = new TreeSet<>();
static {
FORBBIDEN.add("exit");
FORBBIDEN.add("focus");
FORBBIDEN.add("javascript");
FORBBIDEN.add("leave");
FORBBIDEN.add("let \n");
/*TODO
script
schemaVar
select
set
skip
*/
}
private static File basedir = new File("..");
private static File propertiesFile = new File(basedir, "rt-key/src/main/resources/edu/kit/iti/formal/psdbg/taclets.properties.xml");
private static File dummyFile = new File(basedir, "rt-key/src/test/resources/edu/kit/iti/formal/psdbg/interpreter/contraposition/contraposition.key");
private static File dummyFile = new File(".", "rt-key/src/test/resources/edu/kit/iti/formal/psdbg/interpreter/contraposition/contraposition.key");
private static File websiteDoc = new File(basedir, "website/docs/");
......@@ -58,7 +75,7 @@ public class GenDoc {
"\n\nCovering the *default* taclets of [KeY](http://key-project.org).");
for (Taclet t : taclets) {
stream.write("\n\n## ${t.displayName()}\n\n");
stream.write("\n\n## " + t.displayName() + "\n\n");
stream.write("```\n" + t.toString() + "\n```");
}
......@@ -143,7 +160,8 @@ public class GenDoc {
commands.sort(Comparator.comparing(ProofScriptCommand::getName));
for (ProofScriptCommand t : commands) {
stream.write(helpForCommand(t) + "\n\n");
if (!FORBBIDEN.contains(t.getName()))
stream.write(helpForCommand(t) + "\n\n");
}
stream.close();
} catch (IOException e) {
......
......@@ -69,8 +69,8 @@ expression
substExpressionList
:
(scriptVar '/' expression
(',' scriptVar '/' expression)*
(scriptVar '\\' expression
(',' scriptVar '\\' expression)*
)?
;
......
......@@ -41,6 +41,10 @@ import java.util.Map;
* @version 1 (27.04.17)
*/
public class TransformAst implements ScriptLanguageVisitor<Object> {
/**
* Start Index for positional arguments for command calls
*/
public static final int KEY_START_INDEX_PARAMETER = 2;
private List<ProofScript> scripts = new ArrayList<>(10);
......@@ -380,7 +384,9 @@ public class TransformAst implements ScriptLanguageVisitor<Object> {
@Override
public Object visitParameters(ScriptLanguageParser.ParametersContext ctx) {
Parameters params = new Parameters();
int i = 1;
int i = KEY_START_INDEX_PARAMETER;
for (ScriptLanguageParser.ParameterContext pc : ctx.parameter()) {
Expression expr = (Expression) pc.expr.accept(this);
Variable key = pc.pname != null ? new Variable(pc.pname) : new Variable("#" + (i++));
......
......@@ -5,6 +5,7 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
......@@ -17,6 +18,10 @@ import java.util.List;
public class TermType implements Type {
private List<Type> argTypes = new ArrayList<>();
public TermType(Type... sortType) {
this(Arrays.asList(sortType));
}
@Override
public String symbol() {
return "Term<" +
......
......@@ -31,7 +31,7 @@ termPattern :
| termPattern OR termPattern #or
| termPattern IMP termPattern #impl
| termPattern XOR termPattern #xor
//| termPattern EQUIV termPattern already covered by EQ/NEQ
| termPattern EQUIV termPattern #equivalence
| MINUS termPattern #exprNegate
| NOT termPattern #exprNot
| '(' termPattern ')' bindClause? #exprParen
......@@ -61,6 +61,7 @@ EQ : '=' ;
NEQ : '!=' ;
GEQ : '>=' ;
LEQ : '<=' ;
EQUIV : '<->';
GE : '>' ;
LE : '<' ;
AND : '&' ;
......
......@@ -85,6 +85,7 @@ public abstract class MatchPatternDualVisitor<T, S> extends MatchPatternBaseVisi
return visitPlusMinus(ctx, stack.peek());
}
protected abstract T visitPlusMinus(MatchPatternParser.PlusMinusContext ctx, S peek);
@Override
......@@ -164,6 +165,13 @@ public abstract class MatchPatternDualVisitor<T, S> extends MatchPatternBaseVisi
}
protected abstract T visitEquality(MatchPatternParser.EqualityContext ctx, S peek);
@Override
public T visitEquivalence(MatchPatternParser.EquivalenceContext ctx) {
return visitEquivalence(ctx, stack.peek());
}
protected abstract T visitEquivalence(MatchPatternParser.EquivalenceContext ctx, S peek);
}
......
......@@ -7,6 +7,7 @@ import de.uka.ilkd.key.logic.Term;
import edu.kit.formal.psdb.termmatcher.MatchPatternLexer;
import edu.kit.formal.psdb.termmatcher.MatchPatternParser;
import edu.kit.iti.formal.psdbg.termmatcher.mp.MatchPath;
import static edu.kit.iti.formal.psdbg.termmatcher.mp.MatchPathFacade.*;
import lombok.Getter;
import lombok.Setter;
import org.antlr.v4.runtime.CommonToken;
......@@ -17,8 +18,6 @@ import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import static edu.kit.iti.formal.psdbg.termmatcher.mp.MatchPathFacade.*;
/**
* Matchpattern visitor visits the matchpatterns of case-statements
*
......@@ -520,6 +519,11 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> {
return visitBinaryOperation("equals", ctx.termPattern(0), ctx.termPattern(1), peek);
}
@Override
protected Matchings visitEquivalence(MatchPatternParser.EquivalenceContext ctx, MatchPath peek) {
return visitBinaryOperation("equiv", ctx.termPattern(0), ctx.termPattern(1), peek);
}
private Stream<MatchPath.MPTerm> subTerms(MatchPath.MPTerm peek) {
ArrayList<MatchPath.MPTerm> list = new ArrayList<>();
subTerms(list, peek);
......
package edu.kit.iti.formal.psdbg.termmatcher;
import de.uka.ilkd.key.logic.Term;
import de.uka.ilkd.key.logic.op.Equality;
import de.uka.ilkd.key.logic.op.Junctor;
import de.uka.ilkd.key.logic.op.Operator;
public class Utils {
/**
* Rewrite toString() representation of Term to a parsable version
*
* @param formula
* @return parsable Stringversion of Term
*/
@Deprecated
public static String toPrettyTerm(Term formula) {
StringBuilder sb = new StringBuilder();
Operator op = formula.op();
//ugly if/else
if (op.equals(Junctor.IMP)) {
sb.append("(" + toPrettyTerm(formula.sub(0)) + ") -> (" + toPrettyTerm(formula.sub(1)) + ")");
} else {
if (op.equals(Junctor.AND)) {
sb.append("(" + toPrettyTerm(formula.sub(0)) + ") && (" + toPrettyTerm(formula.sub(1)) + ")");
} else {
if (op.equals(Junctor.OR)) {
sb.append("(" + toPrettyTerm(formula.sub(0)) + ") || (" + toPrettyTerm(formula.sub(1)) + ")");
} else {
if (op.equals(Equality.EQV)) {
sb.append("(" + toPrettyTerm(formula.sub(0)) + ") <-> (" + toPrettyTerm(formula.sub(1)) + ")");
} else {
if (op.equals(Equality.EQUALS)) {
sb.append("(" + toPrettyTerm(formula.sub(0)) + ") == (" + toPrettyTerm(formula.sub(1)) + ")");
} else {
if (op.equals(Junctor.NOT)) {
sb.append("(!" + toPrettyTerm(formula.sub(0)) + ")");
} else {
sb.append(formula.toString());
}
}
}
}
}
}
return sb.toString();
}
}
......@@ -216,7 +216,9 @@ public class MatcherFacadeTest {
"fint2(1,2), fint2(2,3), !p ==> pred(a), p",
"fint2(1, ?X), fint2(?X, ?Y) ==> p",
"[{EMPTY_MATCH=null, ?X=Z(2(#)), ?Y=Z(3(#))}]");
shouldMatchSeq("2 >= 1, h2(1,2) = h2(2,3), h2(2,3) = 0 ==> p, !p", "?X=0 ==>", "[{?X= h2(2,3)}]");
shouldMatchSeq("2 >= 1, h2(1,2) = h2(2,3), h2(2,3) = 0 ==> p, !p", "?X=0 ==>", "[{?X=h2(Z(2(#)),Z(3(#)))}]");
shouldMatchSeq("pred(a) <-> pred(b), pred(a), pred(b) ==> p", "?X <-> ?Y ==> ", "[{?X=pred(a), ?Y=pred(b)}]");
}
private void shouldMatchSeq(String seq, String seqPattern, String exp) throws ParserException {
......
......@@ -50,6 +50,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<skipTests>true</skipTests>
</properties>
<modules>
......@@ -218,13 +219,13 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.8</version>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.8</version>
<version>2.6</version>
</dependency>
</dependencies>
......
......@@ -51,7 +51,7 @@ public class InterpreterBuilder {
@Getter
private ScopeLogger logger;
@Getter
private DefaultLookup lookup = new DefaultLookup(psh, pmh, pmr, pmc);
private DefaultLookup lookup = new DefaultLookup(psh, pmh, pmc, pmr);
private KeyInterpreter interpreter = new KeyInterpreter(lookup);
@Getter
......
......@@ -3,9 +3,9 @@ package edu.kit.iti.formal.psdbg.interpreter;
import de.uka.ilkd.key.api.ScriptApi;
import de.uka.ilkd.key.api.VariableAssignments;
import de.uka.ilkd.key.logic.Name;
import de.uka.ilkd.key.logic.SequentFormula;
import de.uka.ilkd.key.logic.Term;
import de.uka.ilkd.key.logic.op.SchemaVariable;
import de.uka.ilkd.key.pp.LogicPrinter;
import de.uka.ilkd.key.proof.ApplyStrategy;
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Proof;
......@@ -15,9 +15,9 @@ import de.uka.ilkd.key.rule.Taclet;
import de.uka.ilkd.key.rule.TacletApp;
import edu.kit.iti.formal.psdbg.interpreter.data.GoalNode;
import edu.kit.iti.formal.psdbg.interpreter.data.KeyData;
import edu.kit.iti.formal.psdbg.interpreter.data.SortType;
import edu.kit.iti.formal.psdbg.interpreter.data.VariableAssignment;
import edu.kit.iti.formal.psdbg.parser.ast.Signature;
import edu.kit.iti.formal.psdbg.parser.ast.TermLiteral;
import edu.kit.iti.formal.psdbg.parser.ast.Variable;
import edu.kit.iti.formal.psdbg.parser.data.Value;
import edu.kit.iti.formal.psdbg.parser.types.SimpleType;
......@@ -196,13 +196,46 @@ public class KeYMatcher implements MatcherApi<KeyData> {
// System.out.println("Matched " + keyMatchResult.size() + " goals from " + currentState.toString() + " with pattern " + term);
List<VariableAssignment> transformedMatchResults = new ArrayList<>();
for (VariableAssignments mResult : keyMatchResult) {
transformedMatchResults.add(from(mResult));
transformedMatchResults.add(from(mResult, currentState.getData()));
}
//keyMatchResult.forEach(r -> transformedMatchResults.add(from(r)));
return transformedMatchResults;
}
/**
* Transforms a KeY Variable Assignment into an assignment for the interpreter
*
* @param keyAssignments
* @param currentState
* @return
*/
public VariableAssignment from(VariableAssignments keyAssignments, KeyData currentState) {
VariableAssignment interpreterAssignments = new VariableAssignment(null);
Map<String, VariableAssignments.VarType> keyTypeMap = keyAssignments.getTypeMap();
keyTypeMap.entrySet().forEach(e -> interpreterAssignments.declare(e.getKey(), interpreter.getTypeConversionBiMap().inverse().get(e.getValue())));
keyTypeMap.keySet().forEach(k -> {
try {
interpreterAssignments.assign(k, toValueTerm(currentState, (Term) keyAssignments.getVarValue(k)));
//System.out.println(keyAssignments.getVarValue(k));
} catch (Exception e) {
e.printStackTrace();
}
});
return interpreterAssignments;
}
private Value<String> toValueTerm(KeyData currentState, Term matched) {
String reprTerm = LogicPrinter.quickPrintTerm(matched, currentState.getEnv().getServices());
return new Value<>(
new TermType(new SortType(matched.sort())),
reprTerm
);
}
@Override
public List<VariableAssignment> matchSeq(GoalNode<KeyData> currentState, String data, Signature sig) {
System.out.println("State that will be matched " + currentState.getData().getNode().sequent() + " with pattern " + data);
......@@ -223,9 +256,11 @@ public class KeYMatcher implements MatcherApi<KeyData> {
s = s.replaceFirst("\\?", "");
}
va.declare(s, new TermType());
va.assign(s, Value.from(from(matched)));
System.out.println("Variable " + s + " : " + Value.from(from(matched)));
Value<String> value = toValueTerm(currentState.getData(), matched);
va.declare(s, value.getType());
va.assign(s, value);
System.out.println("Variable " + s + " : " + value);
}
}
List<VariableAssignment> retList = new LinkedList();
......@@ -235,34 +270,8 @@ public class KeYMatcher implements MatcherApi<KeyData> {
}
}
/**
* Transforms a KeY Variable Assignment into an assignment for the interpreter
*
* @param keyAssignments
* @return
*/
public VariableAssignment from(VariableAssignments keyAssignments) {
VariableAssignment interpreterAssignments = new VariableAssignment(null);
Map<String, VariableAssignments.VarType> keyTypeMap = keyAssignments.getTypeMap();
keyTypeMap.entrySet().forEach(e -> interpreterAssignments.declare(e.getKey(), interpreter.getTypeConversionBiMap().inverse().get(e.getValue())));
keyTypeMap.keySet().forEach(k -> {
try {
interpreterAssignments.assign(k, Value.from(from((Term) keyAssignments.getVarValue(k))));
//System.out.println(keyAssignments.getVarValue(k));
} catch (Exception e) {
e.printStackTrace();
}
});
return interpreterAssignments;
}
private TermLiteral from(Term t) {
return new TermLiteral(t.toString());
}
private TermLiteral from(SequentFormula sf) {
return new TermLiteral(sf.toString());
}
//private TermLiteral from(SequentFormula sf) {
// return new TermLiteral(sf.toString());
//}
}
package edu.kit.iti.formal.psdbg.interpreter.data;
import de.uka.ilkd.key.logic.sort.Sort;
import edu.kit.iti.formal.psdbg.parser.types.Type;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public class SortType implements Type {
@Getter
private final Sort sort;
@Override
public String symbol() {
return sort.toString();
}
}
package edu.kit.iti.formal.psdbg.interpreter.funchdl;
import de.uka.ilkd.key.api.KeYApi;
import de.uka.ilkd.key.control.AbstractUserInterfaceControl;
import de.uka.ilkd.key.control.DefaultUserInterfaceControl;
import de.uka.ilkd.key.macros.ProofMacro;
import de.uka.ilkd.key.macros.ProofMacroFinishedInfo;
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Node;
import edu.kit.iti.formal.psdbg.interpreter.Interpreter;
import edu.kit.iti.formal.psdbg.parser.ast.CallStatement;
import edu.kit.iti.formal.psdbg.parser.ast.Parameters;
import edu.kit.iti.formal.psdbg.parser.ast.StringLiteral;
import edu.kit.iti.formal.psdbg.parser.ast.Variable;
import edu.kit.iti.formal.psdbg.parser.data.Value;
import edu.kit.iti.formal.psdbg.interpreter.data.GoalNode;
import edu.kit.iti.formal.psdbg.interpreter.data.KeyData;
import edu.kit.iti.formal.psdbg.interpreter.data.State;
import edu.kit.iti.formal.psdbg.interpreter.data.VariableAssignment;
import edu.kit.iti.formal.psdbg.parser.types.SimpleType;
import edu.kit.iti.formal.psdbg.parser.ast.CallStatement;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.key_project.util.collection.ImmutableList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
......@@ -21,8 +27,9 @@ import java.util.Map;
* @version 1 (21.05.17)
*/
@RequiredArgsConstructor
public class MacroCommandHandler implements CommandHandler {
@Getter private final Map<String, ProofMacro> macros;
public class MacroCommandHandler implements CommandHandler<KeyData> {
@Getter
private final Map<String, ProofMacro> macros;
public MacroCommandHandler() {
macros = new HashMap<>();
......@@ -40,20 +47,48 @@ public class MacroCommandHandler implements CommandHandler {
}
@Override
public void evaluate(Interpreter interpreter,
public void evaluate(Interpreter<KeyData> interpreter,
CallStatement call,
VariableAssignment params) {
//ProofMacro m = macros.get(call.getCommand());
Parameters p = new Parameters();
p.put(new Variable("#2"), new StringLiteral(call.getCommand()));
CallStatement macroCall = new CallStatement("macro", p);
macroCall.setRuleContext(call.getRuleContext());
VariableAssignment newParam = new VariableAssignment(null);
newParam.declare("#2", SimpleType.STRING);
newParam.assign("#2", Value.from(call.getCommand()));
//macro proofscript command
interpreter.getFunctionLookup().callCommand(interpreter, macroCall, newParam);
//TODO change MacroCommand.Parameters to public
ProofMacro macro = KeYApi.getMacroApi().getMacro(call.getCommand());
ProofMacroFinishedInfo info = ProofMacroFinishedInfo.getDefaultInfo(macro,
interpreter.getCurrentState().getSelectedGoalNode().getData().getProof());
State<KeyData> state = interpreter.getCurrentState();
GoalNode<KeyData> expandedNode = state.getSelectedGoalNode();
try {
//uiControl.taskStarted(new DefaultTaskStartedInfo(TaskStartedInfo.TaskKind.Macro, macro.getName(), 0));
synchronized (macro) {
AbstractUserInterfaceControl uiControl = new DefaultUserInterfaceControl();
info = macro.applyTo(uiControl, expandedNode.getData().getNode(), null, uiControl);
ImmutableList<Goal> ngoals = expandedNode.getData().getProof().getSubtreeGoals(expandedNode.getData().getNode());
state.getGoals().remove(expandedNode);
if (ngoals.isEmpty()) {
Node start = expandedNode.getData().getNode();
//start.leavesIterator()
// Goal s = kd.getProof().getGoal(start);
Iterator<Node> nodeIterator = start.leavesIterator();
while (nodeIterator.hasNext()) {
Node n = nodeIterator.next();
System.out.println(n.isClosed());
}
} else {
for (Goal g : ngoals) {
KeyData kdn = new KeyData(expandedNode.getData(), g.node());
state.getGoals().add(new GoalNode<>(expandedNode, kdn, kdn.isClosedNode()));
}
}
}
} catch (InterruptedException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
}
......@@ -6,6 +6,7 @@ import de.uka.ilkd.key.macros.scripts.EngineState;
import de.uka.ilkd.key.macros.scripts.ProofScriptCommand;
import de.uka.ilkd.key.macros.scripts.meta.ProofScriptArgument;
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Node;
import edu.kit.iti.formal.psdbg.interpreter.Interpreter;
import edu.kit.iti.formal.psdbg.interpreter.data.GoalNode;
import edu.kit.iti.formal.psdbg.interpreter.data.KeyData;
......@@ -18,10 +19,11 @@ import org.key_project.util.collection.ImmutableList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;