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
704840d3
Commit
704840d3
authored
Oct 27, 2017
by
Sarah Grebing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor bugfix for wrapper
parent
9dca4cfc
Pipeline
#14975
failed with stage
in 2 minutes and 4 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
16 deletions
+21
-16
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/graphs/ControlFlowVisitor.java
...i/formal/psdbg/interpreter/graphs/ControlFlowVisitor.java
+2
-2
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/graphs/StateGraphWrapper.java
...ti/formal/psdbg/interpreter/graphs/StateGraphWrapper.java
+2
-2
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controller/ProofTreeController.java
.../iti/formal/psdbg/gui/controller/ProofTreeController.java
+17
-12
No files found.
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/graphs/ControlFlowVisitor.java
View file @
704840d3
...
...
@@ -79,7 +79,7 @@ public class ControlFlowVisitor extends DefaultASTVisitor<Void> {
if
(
assocNode
!=
null
)
{
graph
.
edges
().
forEach
(
edge
->
{
if
(
edge
.
target
().
equals
(
assocNode
))
{
allPreds
.
add
(
new
Pair
(
edge
.
source
(),
edge
));
allPreds
.
add
(
new
Pair
(
edge
.
source
(),
graph
.
edgeValue
(
edge
.
source
(),
edge
.
target
())
));
}
...
...
@@ -111,7 +111,7 @@ public class ControlFlowVisitor extends DefaultASTVisitor<Void> {
graph
.
edges
().
forEach
(
edge
->
{
if
(
edge
.
source
().
equals
(
assocNode
))
{
allPreds
.
add
(
new
Pair
(
edge
.
target
(),
edge
));
allPreds
.
add
(
new
Pair
(
edge
.
target
(),
graph
.
edgeValue
(
edge
.
source
(),
edge
.
target
())
));
}
...
...
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/graphs/StateGraphWrapper.java
View file @
704840d3
...
...
@@ -345,14 +345,14 @@ public class StateGraphWrapper<T> {
private
void
fireNodeAdded
(
NodeAddedEvent
nodeAddedEvent
)
{
changeListeners
.
forEach
(
list
->
Platform
.
runLater
(()
->
{
list
.
graphChanged
(
nodeAddedEvent
);
LOGGER
.
info
(
"New StateGraphChange \n"
+
this
.
asdot
()
+
"\n"
);
//
LOGGER.info("New StateGraphChange \n" + this.asdot() + "\n");
}));
}
private
void
fireStateAdded
(
StateAddedEvent
stateAddedEvent
)
{
changeListeners
.
forEach
(
list
->
Platform
.
runLater
(()
->
{
list
.
graphChanged
(
stateAddedEvent
);
LOGGER
.
debug
(
"New StateGraphChange "
+
this
.
asdot
());
//
LOGGER.debug("New StateGraphChange " + this.asdot());
}));
}
...
...
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controller/ProofTreeController.java
View file @
704840d3
...
...
@@ -122,24 +122,28 @@ public class ProofTreeController {
private
GraphChangedListener
graphChangedListener
=
new
GraphChangedListener
()
{
@Override
public
void
graphChanged
(
NodeAddedEvent
nodeAddedEvent
)
{
PTreeNode
added
=
nodeAddedEvent
.
getAddedNode
();
if
(
added
.
getExtendedState
()
!=
null
)
{
LOGGER
.
info
(
"Graph changed with the following PTreeNode: {} and the statepointer points to {}"
,
nodeAddedEvent
.
getAddedNode
(),
statePointer
);
nextComputedNode
.
setValue
(
nodeAddedEvent
.
getAddedNode
());
// Events.fire(new Events.NewNodeExecuted(nodeAddedEvent.getAddedNode().getScriptstmt()));
if
(
nodeAddedEvent
!=
null
)
{
PTreeNode
added
=
nodeAddedEvent
.
getAddedNode
();
if
(
added
.
getExtendedState
()
!=
null
)
{
LOGGER
.
info
(
"Graph changed with the following PTreeNode: {} and the statepointer points to {}"
,
nodeAddedEvent
.
getAddedNode
(),
statePointer
);
nextComputedNode
.
setValue
(
nodeAddedEvent
.
getAddedNode
());
// Events.fire(new Events.NewNodeExecuted(nodeAddedEvent.getAddedNode().getScriptstmt()));
}
}
}
@Override
public
void
graphChanged
(
StateAddedEvent
stateAddedEvent
)
{
PTreeNode
changedNode
=
stateAddedEvent
.
getChangedNode
();
LOGGER
.
info
(
"Graph changed by adding a state to PTreeNode: {} and the statepointer points to {}"
,
stateAddedEvent
,
statePointer
);
nextComputedNode
.
set
(
changedNode
);
//Events.fire(new Events.NewNodeExecuted(changedNode.getScriptstmt()));
if
(
stateAddedEvent
!=
null
)
{
PTreeNode
changedNode
=
stateAddedEvent
.
getChangedNode
();
LOGGER
.
info
(
"Graph changed by adding a state to PTreeNode: {} and the statepointer points to {}"
,
stateAddedEvent
,
statePointer
);
nextComputedNode
.
set
(
changedNode
);
//Events.fire(new Events.NewNodeExecuted(changedNode.getScriptstmt()));
}
}
};
public
ProofScript
getMainScript
()
{
...
...
@@ -176,7 +180,7 @@ public class ProofTreeController {
this
.
statePointer
=
newValue
;
//setNewState(blocker.currentStateProperty().get());
setNewState
(
newValue
.
getExtendedState
().
getState
After
Stmt
());
setNewState
(
newValue
.
getExtendedState
().
getState
Before
Stmt
());
}
});
...
...
@@ -193,9 +197,10 @@ public class ProofTreeController {
*/
private
void
setNewState
(
State
<
KeyData
>
state
)
{
LOGGER
.
info
(
"Setting new State "
+
state
.
toString
());
//Statepointer null wenn anfangszustand?
if
(
statePointer
!=
null
&&
state
!=
null
)
{
LOGGER
.
info
(
"Setting new State "
+
state
.
toString
());
//setCurrentHighlightNode(statePointer.getScriptstmt());
//get all goals that are open
Object
[]
arr
=
state
.
getGoals
().
stream
().
filter
(
keyDataGoalNode
->
!
keyDataGoalNode
.
isClosed
()).
toArray
();
...
...
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