|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.xml.sax.helpers.DefaultHandler
|
+--Flatten
HierarchicalDocumentReader.huppaalDTD)
GlobalJoin| Field Summary | |
(package private) static org.w3c.dom.Element |
assignment
|
(package private) static int |
attIndent
Additional Indentation for attributes |
(package private) static java.lang.String |
blanks
|
private static ComponentMapper |
cm
An entity that translates pairs (hierarchial component, textual instantiation) to the textual instantiation of this compenent. |
(package private) static java.util.Vector |
collectedInstantiations
|
(package private) static long |
componentCount
Counter to make introduced locations for components unique |
private static ChannelRegistry |
cr
Registration of hand-shake communication for Phase III processing |
(package private) static java.lang.String |
currentTemplatePrefix
Prefix that makes the currently translated Template unique |
(package private) static boolean |
debug
Spam out debuggin information, if debug is true |
(package private) static long |
elementCount
Counter to make hashing of elements unique |
(package private) static int |
factor
Factor for indenting |
private static FlatDocumentWriter |
fdw
The way to create the flat document |
private static org.apache.crimson.tree.XmlDocument |
flatDoc
The document that the fdw is writing |
(package private) static InstantiationTree |
globalInstantiationTree
The tree the system is mapped to |
(package private) static org.w3c.dom.Element |
guard
|
private static java.util.Hashtable |
hashElementsToIDs
Hashtable storing the IDs the tranlation of elements corresponds to ?t? |
private static java.util.Hashtable |
hashInstComponentToTInst
Hashtable mapping instantiation/componentID to the TextualInstantiation it corresponds to. |
private static java.util.Hashtable |
hashTemplateNamesToElements
Hashtable mapping (original, hierarchical) template names to the corresponding Element nodes, see memorizeTemplate(org.w3c.dom.Element) |
(package private) static HierarchicalDocumentReader |
hdr
The way to access the hierarchical document |
(package private) static org.w3c.dom.Element |
instantiation
|
(package private) static java.util.Stack |
instantiationsToBeTranslated
Main stack that contains the instantiations of templates to be processed |
private static LocationMapper |
lm
An entity that translates basic locations and keeps track of them |
(package private) static org.w3c.dom.Element |
location
|
(package private) static org.w3c.dom.Element |
name
|
private static java.io.Writer |
out
Output stream writer |
protected static TextualInstantiation |
rootInstDummy
Textual instantiation corresponding to the root. |
(package private) static boolean |
sanityChecks
Do (possibly time-consuming) sanity checks, if true |
(package private) static org.w3c.dom.Element |
source
|
(package private) static org.w3c.dom.Element |
synchronisation
|
(package private) static org.w3c.dom.Element |
system
|
(package private) static org.w3c.dom.Element |
target
|
(package private) static org.w3c.dom.Element |
template
|
(package private) static org.w3c.dom.Element |
transition
|
static java.lang.String |
VERSION
String describing the version of this API |
static java.lang.String |
VERSION_DATE
Date of last changes |
static java.lang.String |
VERSION_NAME
Name of this version (should be global for project) |
| Constructor Summary | |
Flatten()
|
|
| Method Summary | |
private static org.w3c.dom.Element |
addRegisteredReceiveSynchronisationToTransition(java.lang.String syncText,
org.w3c.dom.Element transition,
TextualInstantiation tinst)
Add RECEIVE synchronization and provide registration in {@see ChannelRegistry} Returns the synchronisation Element (only necessary for original (hierarchical) synchronizations) ??? necessary ??? |
private static org.w3c.dom.Element |
addRegisteredSendSynchronisationToTransition(java.lang.String syncText,
org.w3c.dom.Element transition,
TextualInstantiation tinst)
Add SEND synchronization and provide registration in {@see ChannelRegistry} Returns the synchronisation Element (only necessary for original (hierarchical) synchronizations) ??? necessary ??? |
private static org.w3c.dom.Element |
addRegisteredSynchronisationToTransition(java.lang.String syncText,
org.w3c.dom.Element transition,
TextualInstantiation tinst)
Add synchronization and provide registration in {@see ChannelRegistry} Returns the synchronisation Element (only necessary for original (hierarchical) synchronizations) |
static org.apache.crimson.tree.XmlDocument |
constructFlatDoc(HierarchicalDocumentReader reader)
Main Method |
private static java.lang.String |
getActiveSubcomponentID(TextualInstantiation cpt)
Takes the instantiation of the component as an argument and returns the (flat) location-ID, that corresponds to the situation, that this component is active, i.e. |
private static org.w3c.dom.Element |
getFirstChildThatIsElement(org.w3c.dom.Element el,
java.lang.String tagName)
Return the first child element that is of the given kind. Throws an Exception, if no such child exists. |
static org.w3c.dom.Element |
getNodeOfTemplate(java.lang.String s)
Return the node with specified template name |
private static java.lang.String |
getSignal(java.lang.String instantiationName,
org.w3c.dom.Element entryOrExit)
The signal this entry/exit corresponds to (without !/?) If the component in question is not a enty/exit, an exception is thrown. |
static void |
main(java.lang.String[] argv)
Default Constructor: missing (only static) |
static java.lang.String |
mapAssignmentText(java.lang.String text)
Maps a assignment text of a hierarchical to a flat location. Used in translation of locations &l; components. |
static java.lang.String |
mapComponentToActiveID(org.w3c.dom.Element compt)
|
private static java.lang.String |
mapElementToID(org.w3c.dom.Element el)
Get/invent the ID an component maps to USES elementCount |
static java.lang.String |
mapEntryToID(org.w3c.dom.Element entry)
Compute the ID of the translation of an entry. A transition in the flat version goes to this ID. |
static java.lang.String |
mapExitToID(org.w3c.dom.Element exit)
Compute the ID of the translation of an exit. A transition in the flat version goes to this ID. |
static java.lang.String |
mapGuardText(java.lang.String text)
Maps a guard text of a hierarchical to a flat location. Used in translation of locations &l; components. |
private static java.lang.String |
mapID(TextualInstantiation tinst,
java.lang.String ID)
Maps an ID in a way, such that the output is deterministic the outcome is different for different inputs the outcome is different from flat locations Used in translation of locations &l; components. |
static java.lang.String |
mapInvariantText(java.lang.String inv)
Maps an (textual) invariant to a flat location. Used in translation of locations and components. |
static org.w3c.dom.Element |
mapNail(org.w3c.dom.Element nail)
Maps a nail of a hierarchical to a flat location. Used in translation of locations &l; components. |
private static java.lang.String |
mapName(java.lang.String name)
Maps an name in a way, such that the output is deterministic the outcome is different for different inputs the outcome is different from flat locations Used in translation of locations &l; components. |
static java.lang.String |
mapSourceToID(java.lang.String instantiationName,
org.w3c.dom.Element source)
CHECK THAT THIS IS USED CONSISTENTLY WITH INSTANTIATIONS OF ENTRIES/EXITS |
static java.lang.String |
mapSynchronisationText(java.lang.String syncText)
Maps a synchronisation text of a hierarchical to a flat location. Used in translation of locations &l; components. |
static java.lang.String |
mapTargetToID(java.lang.String instantiationName,
org.w3c.dom.Element target)
CHECK THAT THIS IS USED CONSISTENTLY WITH INSTANTIATIONS OF ENTRIES/EXITS |
static void |
memorizeInstantionAndComponentIDToTextualInstantiation(java.lang.String instantiationName,
java.lang.String componentID,
TextualInstantiation tinst)
Remember the mapping from instantiation + componentID to the TextualInstantiaion this component corresponds to. Necessary for computing the target/source-ID of non-elementary transitions |
static void |
memorizeTemplate(org.w3c.dom.Element template)
Remember the connection between (original, hierarchical) templates and names, accesible then in hashTemplateNamesToElementsThrows exception, if two templates have the same name |
private static void |
migrateTransitionChildren(org.w3c.dom.Element origTransition,
TextualInstantiation tinst,
org.w3c.dom.Element newTransition)
Browse the children of the original transition, transform them and add them to the new transition (in the specific instantiation) |
private static void |
processGlobalJoin(GlobalJoin gj)
Processing Global Joins |
static TextualInstantiation |
recallInstantionAndComponentIDToTextualInstantiation(java.lang.String instantiationName,
java.lang.String componentID)
Counterpart to memorizeInstantionAndComponentIDToTextualInstantiation(java.lang.String, java.lang.String, TextualInstantiation).Maps back to the TextualInstantiation |
private static org.w3c.dom.Element |
transformLocationToFlat(TextualInstantiation tinst,
org.w3c.dom.Element loc)
Returns a flat location that corresponds to the hierarchical one, but name is altered IDs are mapped Coordinates are copied |
private static org.w3c.dom.Element |
transformSimpleNode(org.w3c.dom.Node node)
Transforms the following simple elements to a flat element name invariant urgent committed (does alter names/ids/etc. |
private static java.lang.String |
translateANDTemplateInstantiation(TextualInstantiation tinst)
Translates a instantiation of a hierarchical AND template to a flat (xor) template instantiation |
private static java.lang.String |
translateTemplateInstantiation(TextualInstantiation tinst)
Translates a instantiation of a hierarchical template to a flat one |
private static java.lang.String |
translateXORTemplateInstantiation(TextualInstantiation tinst)
Translates a instantiation of a hierarchical AND template to a flat (xor) template instantiation |
private static void |
traverse(org.w3c.dom.Document doc,
java.lang.String root)
Traverse and spam... |
private static void |
traverseNode(org.w3c.dom.Node n,
int o)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final java.lang.String VERSION_NAME
public static final java.lang.String VERSION_DATE
public static final java.lang.String VERSION
static int factor
static int attIndent
static java.lang.String blanks
static HierarchicalDocumentReader hdr
private static FlatDocumentWriter fdw
private static LocationMapper lm
private static ComponentMapper cm
private static ChannelRegistry cr
private static org.apache.crimson.tree.XmlDocument flatDoc
fdw is writingprotected static TextualInstantiation rootInstDummy
static InstantiationTree globalInstantiationTree
static org.w3c.dom.Element instantiation
static org.w3c.dom.Element system
static org.w3c.dom.Element template
static org.w3c.dom.Element location
static org.w3c.dom.Element name
static org.w3c.dom.Element transition
static org.w3c.dom.Element source
static org.w3c.dom.Element target
static org.w3c.dom.Element guard
static org.w3c.dom.Element synchronisation
static org.w3c.dom.Element assignment
static java.util.Vector collectedInstantiations
static java.lang.String currentTemplatePrefix
static java.util.Stack instantiationsToBeTranslated
static long componentCount
static long elementCount
private static java.util.Hashtable hashTemplateNamesToElements
memorizeTemplate(org.w3c.dom.Element)private static java.util.Hashtable hashElementsToIDs
private static java.util.Hashtable hashInstComponentToTInst
TextualInstantiation it corresponds to.private static java.io.Writer out
static boolean debug
static boolean sanityChecks
| Constructor Detail |
public Flatten()
| Method Detail |
public static void main(java.lang.String[] argv)
public static org.apache.crimson.tree.XmlDocument constructFlatDoc(HierarchicalDocumentReader reader)
throws java.lang.Exception
hdr or
flatDoc.
Constructs the globalInstantiationTree, which is
used to compute the global joins.
public static org.w3c.dom.Element getNodeOfTemplate(java.lang.String s)
throws java.lang.Exception
private static org.w3c.dom.Element getFirstChildThatIsElement(org.w3c.dom.Element el,
java.lang.String tagName)
throws java.lang.Exception
private static java.lang.String translateTemplateInstantiation(TextualInstantiation tinst)
throws java.lang.Exception
fdw via the method
FlatDocumentWriter.addTemplate(org.w3c.dom.Element).
Returns the textual name of the generated instantiation.
globalInstantiationTree as it goes
alongcurrentTemplatePrefix
private static java.lang.String translateXORTemplateInstantiation(TextualInstantiation tinst)
throws java.lang.Exception
private static java.lang.String translateANDTemplateInstantiation(TextualInstantiation tinst)
throws java.lang.Exception
private static void processGlobalJoin(GlobalJoin gj)
throws java.lang.Exception
private static void migrateTransitionChildren(org.w3c.dom.Element origTransition,
TextualInstantiation tinst,
org.w3c.dom.Element newTransition)
throws java.lang.Exception
private static java.lang.String mapID(TextualInstantiation tinst,
java.lang.String ID)
private static java.lang.String mapName(java.lang.String name)
public static java.lang.String mapInvariantText(java.lang.String inv)
public static java.lang.String mapSynchronisationText(java.lang.String syncText)
throws java.lang.Exception
public static java.lang.String mapAssignmentText(java.lang.String text)
throws java.lang.Exception
public static java.lang.String mapGuardText(java.lang.String text)
throws java.lang.Exception
public static org.w3c.dom.Element mapNail(org.w3c.dom.Element nail)
throws java.lang.Exception
public static java.lang.String mapSourceToID(java.lang.String instantiationName,
org.w3c.dom.Element source)
throws java.lang.Exception
public static java.lang.String mapTargetToID(java.lang.String instantiationName,
org.w3c.dom.Element target)
throws java.lang.Exception
public static java.lang.String mapEntryToID(org.w3c.dom.Element entry)
throws java.lang.Exception
public static java.lang.String mapExitToID(org.w3c.dom.Element exit)
throws java.lang.Exception
public static java.lang.String mapComponentToActiveID(org.w3c.dom.Element compt)
throws java.lang.Exception
private static java.lang.String mapElementToID(org.w3c.dom.Element el)
throws java.lang.Exception
elementCount
private static java.lang.String getSignal(java.lang.String instantiationName,
org.w3c.dom.Element entryOrExit)
throws java.lang.Exception
private static org.w3c.dom.Element transformLocationToFlat(TextualInstantiation tinst,
org.w3c.dom.Element loc)
throws java.lang.Exception
private static org.w3c.dom.Element transformSimpleNode(org.w3c.dom.Node node)
throws java.lang.Exception
private static org.w3c.dom.Element addRegisteredSynchronisationToTransition(java.lang.String syncText,
org.w3c.dom.Element transition,
TextualInstantiation tinst)
throws java.lang.Exception
private static org.w3c.dom.Element addRegisteredSendSynchronisationToTransition(java.lang.String syncText,
org.w3c.dom.Element transition,
TextualInstantiation tinst)
throws java.lang.Exception
private static org.w3c.dom.Element addRegisteredReceiveSynchronisationToTransition(java.lang.String syncText,
org.w3c.dom.Element transition,
TextualInstantiation tinst)
throws java.lang.Exception
private static java.lang.String getActiveSubcomponentID(TextualInstantiation cpt)
throws java.lang.Exception
public static void memorizeTemplate(org.w3c.dom.Element template)
throws java.lang.Exception
hashTemplateNamesToElements
public static void memorizeInstantionAndComponentIDToTextualInstantiation(java.lang.String instantiationName,
java.lang.String componentID,
TextualInstantiation tinst)
public static TextualInstantiation recallInstantionAndComponentIDToTextualInstantiation(java.lang.String instantiationName,
java.lang.String componentID)
memorizeInstantionAndComponentIDToTextualInstantiation(java.lang.String, java.lang.String, TextualInstantiation).
private static void traverseNode(org.w3c.dom.Node n,
int o)
private static void traverse(org.w3c.dom.Document doc,
java.lang.String root)
throws java.lang.Exception
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||