comparison src/main/gov/nasa/jpf/vm/SystemState.java @ 13:9d0c3f9df6e0

replaced ThreadInfo.yield() (which was bypassing SyncPolicy) with SyncPolicy.setsRescheduleCG(). The current use is only for the corner case where the last transition in the last non-daemon triggers a defect in a still runnable daemon, which we want to detect before the daemon is shut down. Added ChoiceGenerator.set/getStateId(), which is set on the nextCg once we broke a transition and performed state matching. This can be used to determine the states in the current path without having to maintain this as a separate structure that just mirrors the CG path. There is always a 1:1 relationship between the state that caused the CG and the respective CG instance.
author Peter Mehlitz <Peter.C.Mehlitz@nasa.gov>
date Fri, 13 Mar 2015 14:07:43 -0700
parents b920e6b1be83
children
comparison
equal deleted inserted replaced
12:a51545ab397e 13:9d0c3f9df6e0
262 } 262 }
263 263
264 public void setId (int newId) { 264 public void setId (int newId) {
265 id = newId; 265 id = newId;
266 trail.setStateId(newId); 266 trail.setStateId(newId);
267
268 if (nextCg != null){
269 nextCg.setStateId(newId);
270 }
267 } 271 }
268 272
269 public void recordSteps (boolean cond) { 273 public void recordSteps (boolean cond) {
270 recordSteps = cond; 274 recordSteps = cond;
271 } 275 }