diff 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
line wrap: on
line diff
--- a/src/main/gov/nasa/jpf/vm/SystemState.java	Wed Mar 11 18:20:32 2015 -0700
+++ b/src/main/gov/nasa/jpf/vm/SystemState.java	Fri Mar 13 14:07:43 2015 -0700
@@ -264,6 +264,10 @@
   public void setId (int newId) {
     id = newId;
     trail.setStateId(newId);
+    
+    if (nextCg != null){
+      nextCg.setStateId(newId);
+    }
   }
 
   public void recordSteps (boolean cond) {