From: jjenista Date: Thu, 10 Mar 2011 23:02:35 +0000 (+0000) Subject: public interface for the later compiler phases X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4e57761807f5154a919228dd9d37613c1c5e2fb0;p=IRC.git public interface for the later compiler phases --- diff --git a/Robust/src/Analysis/Disjoint/SMFEState.java b/Robust/src/Analysis/Disjoint/SMFEState.java index 96753398..de37a165 100644 --- a/Robust/src/Analysis/Disjoint/SMFEState.java +++ b/Robust/src/Analysis/Disjoint/SMFEState.java @@ -30,6 +30,24 @@ public class SMFEState { // set of new states protected Hashtable< Effect, Set > 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 getEffectsAllowed() { + return effects; + } + + // some subset of the above effects may transition to + // other states + public Set transitionsTo( Effect e ) { + Set statesOut = e2states.get( e ); + if( statesOut == null ) { + statesOut = new HashSet(); + } + return statesOut; + } + public SMFEState( FlatNode id ) { this.id = id; @@ -54,6 +72,7 @@ public class SMFEState { states.add( stateTo ); } + public FlatNode getID() { return id; }