// tg.cd -- class dictionary for Demeter traversal graphs // $Id: tg.cd,v 1.6 2000/09/19 21:08:39 dougo Exp $ package edu.neu.ccs.demeter.common.tg; import java.util.*; import java.io.*; noparse interface public NameI = . interface public StrategyGraphI = . // Data structures for traversal graph calculation. // Cycles here are cycles in the object graph too! public ClassGraph = DList(Vertex). public Vertex = NameI *l + "incoming:" *l + List(Edge) - *l "outgoing:" *l + List(Edge) - *l "intercopy:" *s List(Pair(int,int)) *s "mark:" *s Mark "." -. public Edge : CEdge | AEdge | IEdge common "from:" Vertex "to:" Vertex Mark *l. public CEdge = "->" *s NameI. // construction public AEdge = "=>" *s. // alternation public IEdge = ":>" *s. // inheritance Mark = BitSet BitSet BitSet. public TraversalGraph = Dictionary // NameI -> Vertex Dictionary // Edge -> Edge (i.e. a set) . // Parameterized class definitions. List(S) ~ "{" {*s S} "}". DList(S) ~ S { *l *l S } *l . Pair(X,Y) = "<" X "," *s Y ">". visitors // abstract visitors public EdgePartsVisitor : .