Commit 880c6ea1 authored by Sarah Grebing's avatar Sarah Grebing

changes to paths

parent 165768de
Pipeline #13224 failed with stage
in 13 seconds
......@@ -107,18 +107,18 @@ repeatStmt
casesStmt
: CASES INDENT
casesList*
(DEFAULT COLON? INDENT
(DEFAULT COLON? INDENT?
defList=stmtList
DEDENT)?
DEDENT?)?
DEDENT
;
casesList
: CASE (TRY | expression | closesExpression) COLON? INDENT stmtList DEDENT
: (TRY | CASE (expression | closesExpression)) COLON? INDENT? stmtList DEDENT?
;
closesExpression
: CLOSES closesScript= scriptCommand
: CLOSES INDENT closesScript=stmtList DEDENT
;
forEachStmt
......
......@@ -328,7 +328,7 @@ public class TransformAst implements ScriptLanguageVisitor<Object> {
ClosesCase closesCase = new ClosesCase();
closesCase.setClosedStmt(true);
closesCase.setRuleContext(ctx);
closesCase.setClosesScript((CallStatement) ctx.closesExpression().closesScript.accept(this));
closesCase.setClosesScript((Statements) ctx.closesExpression().closesScript.accept(this));
closesCase.setBody((Statements) ctx.stmtList().accept(this));
return closesCase;
......
......@@ -16,7 +16,7 @@ public class ClosesCase extends CaseStatement {
/**
* Script that should be executed and shown whether case can be closed
*/
private CallStatement closesScript;
private Statements closesScript;
/**
* A close subscript() {bodyscript} expression
......@@ -24,7 +24,7 @@ public class ClosesCase extends CaseStatement {
* @param closesScript the script that is exectued in order to determine whether goal would clos. This proof is pruned afterwards
* @param body the actual script that is then executed when closesscript was successful and pruned
*/
public ClosesCase(CallStatement closesScript, Statements body) {
public ClosesCase(Statements closesScript, Statements body) {
this.body = body;
this.closesScript = closesScript;
}
......@@ -41,8 +41,8 @@ public class ClosesCase extends CaseStatement {
* {@inheritDoc}
*/
@Override
public tryCase copy() {
return new tryCase(body.copy());
public ClosesCase copy() {
return new ClosesCase(closesScript.copy(), body.copy());
}
}
......@@ -57,7 +57,7 @@
<module>rt</module>
<module>rt-key</module>
<module>ui</module>
<module>DockFX</module>
<module>lib/DockFX</module>
<module>lint</module>
<module>keydeps</module>
<module>matcher</module>
......
......@@ -39,8 +39,11 @@ public class ProofScriptDebugger extends Application {
Locale.setDefault(Locale.ENGLISH);
try {
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(
"controller/DebuggerMain.fxml"));
// FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(
// "controller/DebuggerMain.fxml"));
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/edu/kit/iti/formal/psdbg/gui/controller/DebuggerMain.fxml"));
//"/edu/kit/formal/psdb/gui/controller/DebuggerMain.fxml"));
Parent root = fxmlLoader.load();
//DebuggerMain controller = fxmlLoader.<DebuggerMain>getController();
Scene scene = new Scene(root);
......
package edu.kit.iti.formal.psdbg.gui.controls;
import edu.kit.iti.formal.psdbg.examples.Examples;
import edu.kit.iti.formal.psdbg.gui.controller.DebuggerMain;
import javafx.event.ActionEvent;
import javafx.scene.layout.AnchorPane;
......@@ -21,13 +22,19 @@ public class WelcomePane extends AnchorPane {
public void loadContraPosition(ActionEvent event) {
proofScriptDebugger.getWelcomePaneDock().close();
proofScriptDebugger.showActiveInspector(null);
proofScriptDebugger.openScript(
new File("src/test/resources/edu/kit/formal/psdb/interpreter/contraposition/w_branching.kps")
Examples.loadExamples().forEach(example -> {
if (example.getName().equals("Contraposition"))
example.open(proofScriptDebugger);
});
/* proofScriptDebugger.openScript(
new File("")
);
proofScriptDebugger.openKeyFile(
new File("src/test/resources/edu/kit/formal/psdb/interpreter/contraposition/contraposition.key"));
*/
}
public void loadJavaTest(ActionEvent event) {
......
<html>
<body>
<h1>Contraposition</h1>
<p>To load a script it needs to be called in the main script.
For example to load the script cpwob() type <i>cpwob;</i> in the body of the script <i> main()</i></p>
</body>
</html>
\ No newline at end of file
......@@ -16,4 +16,36 @@ script cpwob () {
replace_known_left occ='2';
concrete_impl_1;
close;
}
script cpwb () {
impRight;
impLeft;
cases{
case match `==> p`:{
auto;
}
default:{
auto;
}
}
}
script cpClosable(){
impRight;
impRight;
cases{
case try:{
notLeft;
notRight;
replace_known_left occ='2';
concrete_impl_1;
close;
}
default:{
auto;
}
}
}
\ No newline at end of file
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