projects
/
jpf-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7228c60
)
Make updates and not edges have manual property
author
Brian Demsky
<bdemsky@uci.edu>
Tue, 17 Dec 2019 06:57:19 +0000
(22:57 -0800)
committer
Brian Demsky
<bdemsky@uci.edu>
Tue, 17 Dec 2019 06:57:19 +0000
(22:57 -0800)
src/main/gov/nasa/jpf/listener/ConflictTracker.java
patch
|
blob
|
history
diff --git
a/src/main/gov/nasa/jpf/listener/ConflictTracker.java
b/src/main/gov/nasa/jpf/listener/ConflictTracker.java
index a61da9ce631738438ba055b3c7becee9936fe7b7..3ec1eea1b9b9d466a0d9db55e5d001e97dbb3de4 100644
(file)
--- a/
src/main/gov/nasa/jpf/listener/ConflictTracker.java
+++ b/
src/main/gov/nasa/jpf/listener/ConflictTracker.java
@@
-129,7
+129,7
@@
public class ConflictTracker extends ListenerAdapter {
}
//Check for conflict with the appropriate update set if we are not a manual transition
}
//Check for conflict with the appropriate update set if we are not a manual transition
- if (confupdates != null && !
e
.isManual()) {
+ if (confupdates != null && !
u
.isManual()) {
for(Update u2: confupdates) {
if (conflicts(u, u2)) {
throw new RuntimeException(createErrorMessage(u, u2));
for(Update u2: confupdates) {
if (conflicts(u, u2)) {
throw new RuntimeException(createErrorMessage(u, u2));
@@
-177,13
+177,13
@@
public class ConflictTracker extends ListenerAdapter {
return message;
}
return message;
}
- Edge createEdge(Node parent, Node current, Transition transition
, boolean ismanual
) {
+ Edge createEdge(Node parent, Node current, Transition transition) {
//Check if this transition is explored. If so, just skip everything
if (transitions.contains(transition))
return null;
//Create edge
//Check if this transition is explored. If so, just skip everything
if (transitions.contains(transition))
return null;
//Create edge
- Edge e = new Edge(parent, current, transition, currUpdates
, ismanual
);
+ Edge e = new Edge(parent, current, transition, currUpdates);
parent.addOutEdge(e);
//Mark transition as explored
parent.addOutEdge(e);
//Mark transition as explored
@@
-222,20
+222,14
@@
public class ConflictTracker extends ListenerAdapter {
Node source, destination;
Transition transition;
ArrayList<Update> updates = new ArrayList<Update>();
Node source, destination;
Transition transition;
ArrayList<Update> updates = new ArrayList<Update>();
- boolean ismanual;
- Edge(Node src, Node dst, Transition t, ArrayList<Update> _updates
, boolean _ismanual
) {
+ Edge(Node src, Node dst, Transition t, ArrayList<Update> _updates) {
this.source = src;
this.destination = dst;
this.transition = t;
this.source = src;
this.destination = dst;
this.transition = t;
- this.ismanual = _ismanual;
this.updates.addAll(_updates);
}
this.updates.addAll(_updates);
}
- boolean isManual() {
- return ismanual;
- }
-
Node getSrc() {
return source;
}
Node getSrc() {
return source;
}
@@
-258,14
+252,20
@@
public class ConflictTracker extends ListenerAdapter {
String deviceId;
String attribute;
String value;
String deviceId;
String attribute;
String value;
-
- Update(String _appName, String _deviceId, String _attribute, String _value) {
+ boolean ismanual;
+
+ Update(String _appName, String _deviceId, String _attribute, String _value, boolean _ismanual) {
this.appName = _appName;
this.deviceId = _deviceId;
this.attribute = _attribute;
this.value = _value;
this.appName = _appName;
this.deviceId = _deviceId;
this.attribute = _attribute;
this.value = _value;
+ this.ismanual = _ismanual;
}
}
+ boolean isManual() {
+ return ismanual;
+ }
+
String getApp() {
return appName;
}
String getApp() {
return appName;
}
@@
-359,7
+359,7
@@
public class ConflictTracker extends ListenerAdapter {
Node currentNode = getNode(id);
// Create an edge based on the current transition
Node currentNode = getNode(id);
// Create an edge based on the current transition
- Edge newEdge = createEdge(parentNode, currentNode, transition
, manual
);
+ Edge newEdge = createEdge(parentNode, currentNode, transition);
// Reset the temporary variables and flags
currUpdates.clear();
// Reset the temporary variables and flags
currUpdates.clear();
@@
-539,7
+539,7
@@
public class ConflictTracker extends ListenerAdapter {
}
private void writeWriterAndValue(String writer, String attribute, String value) {
}
private void writeWriterAndValue(String writer, String attribute, String value) {
- Update u = new Update(writer, "DEVICE", attribute, value);
+ Update u = new Update(writer, "DEVICE", attribute, value
, manual
);
currUpdates.add(u);
}
currUpdates.add(u);
}