Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
sarah.grebing
ProofScriptParser
Commits
96ea72e2
Commit
96ea72e2
authored
Nov 02, 2017
by
Alexander Weigl
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/weigl-sync' into weigl-sync
parents
9f676085
450ad8d1
Pipeline
#15107
failed with stages
in 17 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
11 deletions
+24
-11
lang/src/main/java/edu/kit/iti/formal/psdbg/parser/TransformAst.java
...in/java/edu/kit/iti/formal/psdbg/parser/TransformAst.java
+2
-2
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/Interpreter.java
...ava/edu/kit/iti/formal/psdbg/interpreter/Interpreter.java
+19
-5
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controller/ContractChooser.java
.../kit/iti/formal/psdbg/gui/controller/ContractChooser.java
+1
-2
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/SequentView.java
...va/edu/kit/iti/formal/psdbg/gui/controls/SequentView.java
+2
-2
No files found.
lang/src/main/java/edu/kit/iti/formal/psdbg/parser/TransformAst.java
View file @
96ea72e2
...
...
@@ -350,9 +350,9 @@ public class TransformAst implements ScriptLanguageVisitor<Object> {
CaseStatement
cs
=
null
;
if
(
ctx
.
TRY
()
!=
null
)
{
cs
=
new
TryCase
();
}
else
if
(
ctx
.
closes
Script
!=
null
)
{
}
else
if
(
ctx
.
closes
Guard
!=
null
)
{
cs
=
new
ClosesCase
();
Statements
closes
=
(
Statements
)
ctx
.
closes
Script
.
accept
(
this
);
Statements
closes
=
(
Statements
)
ctx
.
closes
Guard
.
accept
(
this
);
((
ClosesCase
)
cs
).
setClosesGuard
(
closes
);
closes
.
setParent
(
cs
);
}
else
{
...
...
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/Interpreter.java
View file @
96ea72e2
...
...
@@ -11,6 +11,7 @@ import edu.kit.iti.formal.psdbg.parser.DefaultASTVisitor;
import
edu.kit.iti.formal.psdbg.parser.Visitor
;
import
edu.kit.iti.formal.psdbg.parser.ast.*
;
import
edu.kit.iti.formal.psdbg.parser.data.Value
;
import
edu.kit.iti.formal.psdbg.parser.types.SimpleType
;
import
edu.kit.iti.formal.psdbg.parser.types.Type
;
import
lombok.Getter
;
import
lombok.Setter
;
...
...
@@ -439,12 +440,25 @@ public class Interpreter<T> extends DefaultASTVisitor<Object>
*/
private
VariableAssignment
evaluateMatchInGoal
(
Expression
matchExpression
,
GoalNode
<
T
>
goal
)
{
enterScope
(
matchExpression
);
MatchEvaluator
mEval
=
new
MatchEvaluator
(
goal
.
getAssignments
(),
goal
,
matcherApi
);
mEval
.
getEntryListeners
().
addAll
(
getEntryListeners
());
mEval
.
getExitListeners
().
addAll
(
getExitListeners
());
exitScope
(
matchExpression
);
List
<
VariableAssignment
>
matchResult
;
if
(
matchExpression
.
hasMatchExpression
())
{
MatchEvaluator
mEval
=
new
MatchEvaluator
(
goal
.
getAssignments
(),
goal
,
matcherApi
);
mEval
.
getEntryListeners
().
addAll
(
getEntryListeners
());
mEval
.
getExitListeners
().
addAll
(
getExitListeners
());
exitScope
(
matchExpression
);
matchResult
=
mEval
.
eval
(
matchExpression
);
}
else
{
List
<
VariableAssignment
>
matchResult
=
mEval
.
eval
(
matchExpression
);
matchResult
=
new
ArrayList
<>();
Evaluator
eval
=
new
Evaluator
(
goal
.
getAssignments
(),
goal
);
Value
eval1
=
eval
.
eval
(
matchExpression
);
if
(
eval1
.
getType
().
equals
(
SimpleType
.
BOOL
)
&&
eval1
.
equals
(
Value
.
TRUE
))
{
VariableAssignment
emptyAssignment
=
new
VariableAssignment
(
null
);
matchResult
.
add
(
emptyAssignment
);
}
exitScope
(
matchExpression
);
}
if
(
matchResult
.
isEmpty
())
{
return
null
;
}
else
{
...
...
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controller/ContractChooser.java
View file @
96ea72e2
...
...
@@ -9,7 +9,6 @@ import javafx.scene.control.*;
import
javafx.scene.text.Text
;
import
javafx.scene.text.TextFlow
;
import
javafx.stage.Modality
;
import
lombok.Getter
;
import
java.util.List
;
...
...
@@ -25,7 +24,7 @@ import java.util.List;
* @author A. Weigl
*/
public
class
ContractChooser
extends
Dialog
<
Contract
>
{
@Getter
private
final
MultipleSelectionModel
<
Contract
>
selectionModel
;
private
final
ObjectProperty
<
ObservableList
<
Contract
>>
items
;
...
...
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/SequentView.java
View file @
96ea72e2
...
...
@@ -130,8 +130,8 @@ public class SequentView extends CodeArea {
NamespaceSet
nss
=
services
.
getNamespaces
();
Sequent
sequent
=
node
.
get
().
sequent
();
filter
=
new
IdentitySequentPrintFilter
();
filter
.
setSequent
(
sequent
);
filter
=
new
IdentitySequentPrintFilter
(
sequent
);
//
filter.setSequent(sequent);
ProgramPrinter
prgPrinter
=
new
ProgramPrinter
(
new
StringWriter
());
this
.
backend
=
new
LogicPrinter
.
PosTableStringBackend
(
80
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment