(@ import java.util.*; import java.io.*; @) // This class dictionary is a subset of evolve.cd that works with // construction, alternation, and terminal classes as well as construction // and alternation edges // This class dictionary does not have the Decorator class which is not needed // for our purposes of calculating the subgraph of a specified traversal UGraph = "#Class" "#Dictionary" "#Graph" UVertex_List UEdge_List. UVertex_List ~ "#Vertex" "#List" {UVertex}. UVertex : UAltVertex | UConstVertex | UTerm *common* UID UVertexName Coordinates [ IEdge_List] [ OEdge_List]. IEdge_List ~ "#Incoming" {UID}. OEdge_List ~ "#Outgoing" {UID}. UConstVertex = "#ConstVertex". UAltVertex = "#AltVertex". UTerm = "#TermVertex". UEdge_List ~ "#Edge" "#List" {UEdge}. UEdge : UAltEdge | UConstEdge *common* UID UID UID. UAltEdge = "#AltEdge". UConstEdge = "#ConstEdge" UEdgeName Cardinality. Cardinality = Lower [ Upper]. Lower = Integer. Upper = "." "." String. // Classes common to UVertex and/or UEdge objects UID = Integer. UVertexName = Ident. UEdgeName = Ident. Coordinates = "{" X Y "}". X = Integer. Y = Integer. // Visitors and Traversal Specifications // IndependentTraversal is the class that holds the traversal specification. // It handles multiple targets, to or to-stop, and a list of bypassing // elements. Because of time constraints, we were not able to implement // through. // Both Binoy and Kedar said that it was ok to change the structure of our // IndependentTraversal object. // NOTE: The bypass clause is at the end of the IndependentTraversal object // because we followed the convention of the original Independent- // Traversal object in evolve.cd(which also had it at the end) IndependentTraversal = From Target [ Bypass]. From = "from" UID. Target : To | ToStop *common* List(UID). To = "to". ToStop = "to-stop". Bypass = "bypassing" List(UID). HashVisitor = Hashtable. TargetVisitor = Vector Hashtable. BypassVisitor = Vector Hashtable. // We noticed that our class dictionary is flattened, and we will change // this, if necessary, so that SubgraphMarker will have travinfo and the // hashtable object to be common parts for both ForwardMarker and // BackwardMarker objects. SubgraphMarker : ForwardMarker | BackwardMarker. ForwardMarker = "#ForwardMarker" IndependentTraversal Hashtable. BackwardMarker = "#BackwardMarker" IndependentTraversal Hashtable. PrintingVisitor = . //Parameterized class definitions. List(S) ~ {S}. Main = .