Commit 972e934f authored by Sarah Grebing's avatar Sarah Grebing

webpage and simpleJava example

parent 841fa46f
Pipeline #13755 failed with stage
in 2 minutes and 14 seconds
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 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.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;
......@@ -21,8 +25,9 @@ import java.util.Map;
* @version 1 (21.05.17)
public class MacroCommandHandler implements CommandHandler {
@Getter private final Map<String, ProofMacro> macros;
public class MacroCommandHandler implements CommandHandler<KeyData> {
private final Map<String, ProofMacro> macros;
public MacroCommandHandler() {
macros = new HashMap<>();
......@@ -40,20 +45,35 @@ public class MacroCommandHandler implements CommandHandler {
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);
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,
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());
for (Goal g : ngoals) {
KeyData kdn = new KeyData(expandedNode.getData(), g.node());
state.getGoals().add(new GoalNode<>(expandedNode, kdn, kdn.isClosedNode()));
} catch (InterruptedException e) {
} catch (Exception e) {
......@@ -48,7 +48,9 @@ public class WelcomePane extends AnchorPane {
Examples.loadExamples().forEach(example -> {
if (example.getName().equals("Transitive Permutation"))
// if (example.getName().equals("Transitive Permutation"))
if (example.getName().equals("Simple Java Example"));
......@@ -2,7 +2,7 @@ script t(){
case match `?X = 0 ==>`:
eqSymm on=`?X=0`[?X/?X];
eqSymm on=`?X=0`[];
......@@ -13,7 +13,7 @@
float: left;
width: 33%;
text-align: center;
text-align: left;
.column img {
......@@ -63,63 +63,44 @@ A full description of the language and debugging-concept is published at <a href
<div class="column">
<div >
<!--<img src="" />-->
<h3>Stepping back and forth in Proof Script</h3>
<h3>Inspection of different parts of the proof state</h3>
The different parts of the proof state can be inspected:
<li>list of open goals</li>
<li>sequent of selected open goal</li>
<li>path through program (if existing) for selected open goal</li>
<div >
<!-- <img src="" /> -->
<h3>Different views onto one proof state</h3>
<h3>Adjustable view on list of open goals</h3>
<img src="img/simpleJavaGoalList.png" style="width:304px;height:228px;" />
<div >
<!-- <img src="" />--<
<h3>Run To Breakpoints in Script-Evaluation</h3>
<h3>Explore the proof tree of KeY</h3>
<div style="clear: both;"/>
<div class="column">
<div >
<img src="" />
<h3>Inspect proof State</h3>
<h3>Stepwise evaluation of the proof script</h3>
The proof script can be evaluated stepwise and by running to a set breakpoint.
<div >
<img src="" />
<h3>Feature 2</h3>
<h3>Set a breakpoint and run execution to breakpoint</h3>
<img src="img/simpleJava2.png" style="width:304px;height:228px;"/>
<div >
<img src="" />
<h3>Feature 3</h3>
<div >
<h3> Step forward and step backward</h3>
<img src="img/simpleJavaStep.png" style="width:304px;height:228px;" />
<div style="clear: both;"/>
<footer style="border-top: #ccc 1px solid">
<footer style="border-top: #ccc 1px solid">
Contact: <a href="">Sarah Grebing</a>
<!-- <h2>Getting Started</h2>
<li>Version 1.0
<a href="#">psdb-0.9-alpha.jar</a>
\ No newline at end of file
......@@ -2,4 +2,4 @@
mkdocs build --clean
rsync --delete -vr site/
#rsync --delete -vr site/
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment