Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
ProofScriptParser
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
24
Issues
24
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sarah.grebing
ProofScriptParser
Commits
abfc4d6f
Commit
abfc4d6f
authored
Jul 19, 2017
by
Sarah Grebing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix Case-Handling
parent
a02f781f
Pipeline
#12208
failed with stage
in 1 minute and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/main/java/edu/kit/formal/interpreter/Interpreter.java
src/main/java/edu/kit/formal/interpreter/Interpreter.java
+7
-3
No files found.
src/main/java/edu/kit/formal/interpreter/Interpreter.java
View file @
abfc4d6f
...
...
@@ -219,8 +219,9 @@ public class Interpreter<T> extends DefaultASTVisitor<Object>
for
(
GoalNode
<
T
>
goalBeforeCase
:
allGoalsBeforeCases
)
{
State
<
T
>
createdState
=
newState
(
goalBeforeCase
);
//to allow the case to retrieve goal
boolean
result
=
false
;
for
(
CaseStatement
aCase
:
cases
)
{
boolean
result
=
(
boolean
)
aCase
.
accept
(
this
);
result
=
(
boolean
)
aCase
.
accept
(
this
);
if
(
result
)
{
//remove goal from set for default
remainingGoalsSet
.
remove
(
goalBeforeCase
);
...
...
@@ -230,10 +231,12 @@ public class Interpreter<T> extends DefaultASTVisitor<Object>
}
//remove state from stack
State
<
T
>
stateAfterCase
=
popState
();
if
(
stateAfterCase
.
getGoals
()
!=
null
)
{
System
.
out
.
println
(
"State after Case "
+
stateAfterCase
.
getSelectedGoalNode
().
toCellTextForKeYData
());
if
(
result
&&
stateAfterCase
.
getGoals
()
!=
null
)
{
goalsAfterCases
.
addAll
(
stateAfterCase
.
getGoals
());
}
}
//===========================================================================================//
...
...
@@ -363,11 +366,12 @@ public class Interpreter<T> extends DefaultASTVisitor<Object>
}
private
State
<
T
>
executeBody
(
Statements
caseStmts
,
GoalNode
<
T
>
goalNode
,
VariableAssignment
va
)
{
enterScope
(
caseStmts
);
goalNode
.
enterScope
(
va
);
State
<
T
>
s
=
newState
(
goalNode
);
caseStmts
.
accept
(
this
);
popState
(
s
);
exitScope
(
caseStmts
);
return
s
;
}
...
...
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