mapss.dif.csdf.sdf
Class HSDFLanguageAnalysis

java.lang.Object
  extended by mapss.dif.language.sablecc.analysis.AnalysisAdapter
      extended by mapss.dif.language.sablecc.analysis.DepthFirstAdapter
          extended by mapss.dif.language.LanguageAnalysis
              extended by mapss.dif.csdf.sdf.HSDFLanguageAnalysis
All Implemented Interfaces:
Analysis, Switch

public class HSDFLanguageAnalysis
extends LanguageAnalysis

This analysis extends LanguageAnalysis to read HSDF graphs.

The graph type keyword used in the dif file should be "hsdf" and runtime type of the returned graph will an HSDFGraph.

In HSDF, production and consumption rates are always one. So "production" and "consumption" are not allowed because when an edge is created in HSDF, the rate=1 is set.

Version:
$Id: HSDFLanguageAnalysis.java 406 2007-05-10 14:27:07Z plishker $
Author:
Chia-Jui Hsu based on the first version by Fuat Keceli
See Also:
LanguageAnalysis, HSDFGraph

Field Summary
 
Fields inherited from class mapss.dif.language.LanguageAnalysis
_graph, _hierarchies, _hierarchy, _subHierarchy
 
Constructor Summary
HSDFLanguageAnalysis()
           
 
Method Summary
protected  mocgraph.Edge _getEmptyEdge(mocgraph.Node source, mocgraph.Node sink)
          Should return an empty edge that can be used in the graph that is constructed.
protected  DIFGraph _getEmptyGraph()
          Should return an empty graph of the type that is going to be constructed with this analysis.
protected  mocgraph.Node _getEmptyNode()
          Should return an empty node that can be used in the graph that is constructed.
protected  java.lang.String _getKeyword()
          Should return the DIF keyword associated with this analysis type.
protected  void _processBuiltinAttribute(java.lang.String id, java.lang.Object object, java.lang.Object value, DIFHierarchy hierarchy)
          Override the LanguageAnalysis._processBuiltinAttribute(java.lang.String, java.lang.Object, java.lang.Object, mapss.dif.DIFHierarchy) to process built-in attribute: delay and computation only.
static boolean isKeyWord(java.lang.String word)
           
 
Methods inherited from class mapss.dif.language.LanguageAnalysis
_acceptableSubHierarchy, _checkKeyword, _getName, _setComputationAttribute, externalHierarchies, getHierarchy, getKeyword, inAActorBlock, inAArrayValue, inABasedonExpression, inABlankParameterExpression, inABooleanValue, inABuiltinAttributeBlock, inAClosedClosedRange, inAClosedOpenRange, inAComplexMatrixValue, inAComplexValue, inAConcatenatedStringValue, inADiscreteRange, inADiscreteRangeNumberTail, inADoubleValue, inAEdgeDefinition, inAGraphBlock, inAIdlistAttributeExpression, inAInputInterfaceExpression, inAIntegerValue, inANodeIdentifierTail, inANodePortDefinition, inANodesTopologyList, inANumericMatrixValue, inAOpenClosedRange, inAOpenOpenRange, inAOutputInterfaceExpression, inAParamsRefinementExpression, inAPlainPortDefinition, inAPortsRefinementExpression, inARangeParameterExpression, inAReferenceActorExpression, inAReferenceAttributeExpression, inARefinementDefinition, inAReflistActorExpression, inASubelementAssignAttributeExpression, inAUserDefinedAttributeBlock, outAArrayValue, outARangeParameterExpression, outAValueActorExpression, outAValueAttributeExpression, outAValueParameterExpression
 
Methods inherited from class mapss.dif.language.sablecc.analysis.DepthFirstAdapter
caseAActorBlock, caseAActorBody, caseAArrayValue, caseAAttrDataType, caseAAttributeBody, caseAAttrType, caseABasedonBlock, caseABasedonBody, caseABasedonExpression, caseABlankParameterExpression, caseABooleanValue, caseABuiltinAttributeBlock, caseAClosedClosedRange, caseAClosedOpenRange, caseAComplex, caseAComplexMatrixValue, caseAComplexRow, caseAComplexRowTail, caseAComplexTail, caseAComplexValue, caseAConcatenatedStringValue, caseADataType, caseADiscreteRange, caseADiscreteRangeNumberTail, caseADoubleNumber, caseADoubleValue, caseAEdgeDefinition, caseAEdgeDefinitionTail, caseAEdgesTopologyList, caseAFalseBooleanValue, caseAGraphBlock, caseAGraphList, caseAIdentifierName, caseAIdList, caseAIdlistAttributeExpression, caseAInputInterfaceExpression, caseAIntegerNumber, caseAIntegerValue, caseAInterfaceBlock, caseAInterfaceBody, caseANodeIdentifierTail, caseANodePortDefinition, caseANodesTopologyList, caseANumericMatrixValue, caseANumericRow, caseANumericRowTail, caseANumericTail, caseAOpenClosedRange, caseAOpenOpenRange, caseAOutputInterfaceExpression, caseAParameterBlock, caseAParameterBody, caseAParamsRefinementExpression, caseAParamType, caseAPlainPortDefinition, caseAPortDefinitionTail, caseAPortsRefinementExpression, caseARangeBlock, caseARangeParameterExpression, caseARangeTail, caseAReferenceActorExpression, caseAReferenceAttributeExpression, caseARefIdTail, caseARefinementBlock, caseARefinementBody, caseARefinementDefinition, caseAReflistActorExpression, caseAStringIdentifierName, caseAStringValue, caseASubelementAssignAttributeExpression, caseATopologyBlock, caseATopologyBody, caseATrueBooleanValue, caseAUserDefinedAttributeBlock, caseAValueActorExpression, caseAValueAttributeExpression, caseAValueParameterExpression, caseAValueTail, caseStart, defaultIn, defaultOut, inAActorBody, inAAttrDataType, inAAttributeBody, inAAttrType, inABasedonBlock, inABasedonBody, inAComplex, inAComplexRow, inAComplexRowTail, inAComplexTail, inADataType, inADoubleNumber, inAEdgeDefinitionTail, inAEdgesTopologyList, inAFalseBooleanValue, inAGraphList, inAIdentifierName, inAIdList, inAIntegerNumber, inAInterfaceBlock, inAInterfaceBody, inANumericRow, inANumericRowTail, inANumericTail, inAParameterBlock, inAParameterBody, inAParamType, inAPortDefinitionTail, inARangeBlock, inARangeTail, inARefIdTail, inARefinementBlock, inARefinementBody, inAStringIdentifierName, inAStringValue, inATopologyBlock, inATopologyBody, inATrueBooleanValue, inAValueActorExpression, inAValueAttributeExpression, inAValueParameterExpression, inAValueTail, inStart, outAActorBlock, outAActorBody, outAAttrDataType, outAAttributeBody, outAAttrType, outABasedonBlock, outABasedonBody, outABasedonExpression, outABlankParameterExpression, outABooleanValue, outABuiltinAttributeBlock, outAClosedClosedRange, outAClosedOpenRange, outAComplex, outAComplexMatrixValue, outAComplexRow, outAComplexRowTail, outAComplexTail, outAComplexValue, outAConcatenatedStringValue, outADataType, outADiscreteRange, outADiscreteRangeNumberTail, outADoubleNumber, outADoubleValue, outAEdgeDefinition, outAEdgeDefinitionTail, outAEdgesTopologyList, outAFalseBooleanValue, outAGraphBlock, outAGraphList, outAIdentifierName, outAIdList, outAIdlistAttributeExpression, outAInputInterfaceExpression, outAIntegerNumber, outAIntegerValue, outAInterfaceBlock, outAInterfaceBody, outANodeIdentifierTail, outANodePortDefinition, outANodesTopologyList, outANumericMatrixValue, outANumericRow, outANumericRowTail, outANumericTail, outAOpenClosedRange, outAOpenOpenRange, outAOutputInterfaceExpression, outAParameterBlock, outAParameterBody, outAParamsRefinementExpression, outAParamType, outAPlainPortDefinition, outAPortDefinitionTail, outAPortsRefinementExpression, outARangeBlock, outARangeTail, outAReferenceActorExpression, outAReferenceAttributeExpression, outARefIdTail, outARefinementBlock, outARefinementBody, outARefinementDefinition, outAReflistActorExpression, outAStringIdentifierName, outAStringValue, outASubelementAssignAttributeExpression, outATopologyBlock, outATopologyBody, outATrueBooleanValue, outAUserDefinedAttributeBlock, outAValueTail, outStart
 
Methods inherited from class mapss.dif.language.sablecc.analysis.AnalysisAdapter
caseEOF, caseTActor, caseTAttribute, caseTBasedon, caseTBlank, caseTColon, caseTComma, caseTComment, caseTDot, caseTDouble, caseTEdges, caseTEqual, caseTFalse, caseTGraph, caseTIdentifier, caseTInputs, caseTInteger, caseTInterface, caseTLBkt, caseTLPar, caseTLSqr, caseTNodes, caseTOutputs, caseTParameter, caseTPlus, caseTRBkt, caseTRefinement, caseTRPar, caseTRSqr, caseTSemicolon, caseTSQte, caseTString, caseTStringIdentifier, caseTStringTail, caseTTopology, caseTTrue, defaultCase, getIn, getOut, setIn, setOut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HSDFLanguageAnalysis

public HSDFLanguageAnalysis()
Method Detail

isKeyWord

public static boolean isKeyWord(java.lang.String word)

_getEmptyEdge

protected mocgraph.Edge _getEmptyEdge(mocgraph.Node source,
                                      mocgraph.Node sink)
Description copied from class: LanguageAnalysis
Should return an empty edge that can be used in the graph that is constructed. Source and the sink nodes of the edge should be as given in the parameters. In this implementation an edge with an empty DIFEdgeWeight is returned.

Overrides:
_getEmptyEdge in class LanguageAnalysis
Parameters:
source - Source node for the edge.
sink - Sink node for the edge.
Returns:
An edge.

_getEmptyGraph

protected DIFGraph _getEmptyGraph()
Description copied from class: LanguageAnalysis
Should return an empty graph of the type that is going to be constructed with this analysis. For this implementation returns a graph with runtime type of DIFGraph.

Overrides:
_getEmptyGraph in class LanguageAnalysis
Returns:
An instance of DIFGraph.

_getEmptyNode

protected mocgraph.Node _getEmptyNode()
Description copied from class: LanguageAnalysis
Should return an empty node that can be used in the graph that is constructed. In this implementation a node with an empty DIFNodeWeight is returned.

Overrides:
_getEmptyNode in class LanguageAnalysis
Returns:
A new node.

_getKeyword

protected java.lang.String _getKeyword()
Description copied from class: LanguageAnalysis
Should return the DIF keyword associated with this analysis type. For this implementation it returns "dif".

Overrides:
_getKeyword in class LanguageAnalysis
Returns:
Analysis keyword which is "dif" for this implementation.

_processBuiltinAttribute

protected void _processBuiltinAttribute(java.lang.String id,
                                        java.lang.Object object,
                                        java.lang.Object value,
                                        DIFHierarchy hierarchy)
                                 throws DIFLanguageException
Override the LanguageAnalysis._processBuiltinAttribute(java.lang.String, java.lang.Object, java.lang.Object, mapss.dif.DIFHierarchy) to process built-in attribute: delay and computation only.

Overrides:
_processBuiltinAttribute in class LanguageAnalysis
Parameters:
object - An Edge in the hsdf graph of hierarchy.
id - Name of the attribute being processed.
value - The value of this built-in attribute or the DIFParameter refer to the actual value object.
hierarchy - The DIFHierarchy object containing the HSDFGraph object.
Throws:
DIFLanguageException
See Also:
HSDFEdgeWeight