public interface for the later compiler phases
authorjjenista <jjenista>
Thu, 10 Mar 2011 23:02:35 +0000 (23:02 +0000)
committerjjenista <jjenista>
Thu, 10 Mar 2011 23:02:35 +0000 (23:02 +0000)
Robust/src/Analysis/Disjoint/SMFEState.java

index 967533988b017ce4fe9ef6f52d803bca057a2ed2..de37a16551c13f838a1ec86cc8d0aa1f7571fbad 100644 (file)
@@ -30,6 +30,24 @@ public class SMFEState {
   // set of new states
   protected Hashtable< Effect, Set<SMFEState> > e2states;
 
+
+  // once you get your hands on an SMFEState in the
+  // RuntimeConflictResolver side of things, this is how you
+  // find out what effects are possible in this state
+  public Set<Effect> getEffectsAllowed() {
+    return effects;
+  }
+
+  // some subset of the above effects may transition to
+  // other states
+  public Set<SMFEState> transitionsTo( Effect e ) {
+    Set<SMFEState> statesOut = e2states.get( e );
+    if( statesOut == null ) {
+      statesOut = new HashSet<SMFEState>();
+    }
+    return statesOut;
+  }
+
   
   public SMFEState( FlatNode id ) {
     this.id = id;
@@ -54,6 +72,7 @@ public class SMFEState {
     states.add( stateTo );
   }
 
+
   public FlatNode getID() {
     return id;
   }