From 4e57761807f5154a919228dd9d37613c1c5e2fb0 Mon Sep 17 00:00:00 2001 From: jjenista Date: Thu, 10 Mar 2011 23:02:35 +0000 Subject: [PATCH] public interface for the later compiler phases --- Robust/src/Analysis/Disjoint/SMFEState.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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; } -- 2.34.1