ConForM.CoopnTools.CoKer.CoopnMgr
Class CoopnFunctionSymbol

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
        |
        +--ConForM.CoopnTools.CoKer.CoopnMgr.CoopnSymbol
              |
              +--ConForM.CoopnTools.CoKer.CoopnMgr.CoopnFunctionSymbol
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, CoopnSyntacticElement, CoopnSyntacticFunctionnalSymbol, CoopnSyntacticSymbol, java.io.Serializable
Direct Known Subclasses:
CoopnGeneratorSymbol, CoopnOperationSymbol

public abstract class CoopnFunctionSymbol
extends CoopnSymbol
implements CoopnSyntacticFunctionnalSymbol

Coopn function.

See Also:
CoopnElement, Serialized Form

Constructor Summary
  CoopnFunctionSymbol(CoopnName name, CoopnModuleName module, CoopnTypeAgg domain, CoopnType codomain)
          Simple constructor.
  CoopnFunctionSymbol(CoopnName name, CoopnModuleName module, CoopnTypeAgg domain, CoopnType codomain, java.lang.String comment)
          Simple constructor.
protected CoopnFunctionSymbol(CoopnName name, java.lang.String identifier, CoopnModuleName module, CoopnTypeAgg domain, CoopnType codomain)
          Simple constructor.
protected CoopnFunctionSymbol(CoopnName name, java.lang.String identifier, CoopnModuleName module, CoopnTypeAgg domain, CoopnType codomain, java.lang.String comment)
          Simple constructor.
 
Method Summary
 java.lang.Object clone()
          Cloning method.
 CoopnType codomain()
          Return the codomain.
protected abstract  ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoElement createCocoElement(int index, boolean used, CoopnName name, java.lang.String identifier, CoopnModuleName module, ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoTypeAgg domain, ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoType codomain)
           
 CoopnTypeAgg domain()
          Return the domain.
 boolean equals(java.lang.Object obj)
          Equality method.
 boolean equivalent(java.lang.Object obj)
          Equivalence testing method.
 boolean hasDomain()
          Test if the function has a domain.
 int paramNumber()
          Get the number of parameters.
 CoopnSyntacticElement[] paramTypes()
          Get an array of elements, representing the "type" (in a broad sense) of the parameters.
 boolean pureCOIL()
          Pure COIL-COOPN2C verification method.
 boolean pureCOOPN()
          Pure COOPN verification method.
 CoopnSyntacticElement returnType()
          Get an element, representing the "type" (in a broad sense) of the returned value.
 ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoElement toCoco(CoopnSymbolTable table)
          CoCo conversion method.
 ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toCompleteText(CoopnSymbolTable table)
          Complete textual elements conversion method.
 ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toText()
          Textual elements conversion method.
 java.lang.Object unmodifiableCopy()
          Copy the element into an unmodifiable structure.
 
Methods inherited from class ConForM.CoopnTools.CoKer.CoopnMgr.CoopnSymbol
arity, cloneCoopnElement, comment, compareTo, decompose, equalsCoopnSymbol, equivalentCoopnSymbol, hashCode, identifier, indexCoopnSymbol, interpret, kind, module, name, symbolModule, symbolModuleKind, symbolName, toTextCoopnSymbol, unmodifiableSymbol, usedCoopnSymbol
 
Methods inherited from class ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteText, toCompleteTokens, toCompleteTokens, toCompleteTokens, toCompleteTokens, toCompleteTokens, toCompleteTokens, toString, toString, toString, toTokens, toTokens, toTokens
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ConForM.CoopnTools.CoKer.CoopnSyntacticSymbol
comment, identifier, kind, symbolModule, symbolModuleKind, symbolName
 
Methods inherited from interface ConForM.CoopnTools.CoKer.CoopnSyntacticElement
hashCode, toCompleteString, toCompleteString, toCompleteString, toString, toString, toString
 

Constructor Detail

CoopnFunctionSymbol

protected CoopnFunctionSymbol(CoopnName name,
                              java.lang.String identifier,
                              CoopnModuleName module,
                              CoopnTypeAgg domain,
                              CoopnType codomain)
                       throws java.lang.IllegalArgumentException,
                              CoopnArityProblemException
Simple constructor.

CoopnFunctionSymbol

public CoopnFunctionSymbol(CoopnName name,
                           CoopnModuleName module,
                           CoopnTypeAgg domain,
                           CoopnType codomain)
                    throws java.lang.IllegalArgumentException,
                           CoopnArityProblemException
Simple constructor.

CoopnFunctionSymbol

protected CoopnFunctionSymbol(CoopnName name,
                              java.lang.String identifier,
                              CoopnModuleName module,
                              CoopnTypeAgg domain,
                              CoopnType codomain,
                              java.lang.String comment)
                       throws java.lang.IllegalArgumentException,
                              CoopnArityProblemException
Simple constructor.

CoopnFunctionSymbol

public CoopnFunctionSymbol(CoopnName name,
                           CoopnModuleName module,
                           CoopnTypeAgg domain,
                           CoopnType codomain,
                           java.lang.String comment)
                    throws java.lang.IllegalArgumentException,
                           CoopnArityProblemException
Simple constructor.
Method Detail

pureCOOPN

public boolean pureCOOPN()
Description copied from class: CoopnElement
Pure COOPN verification method. Must be modified by the elements which may alterate the result.
Overrides:
pureCOOPN in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Returns:
true iff this object is in pure CO-OPN language.

pureCOIL

public boolean pureCOIL()
Description copied from class: CoopnElement
Pure COIL-COOPN2C verification method. Must be modified by the elements which may alterate the result.
Overrides:
pureCOIL in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Returns:
true iff this object is in pure COIL language.

paramNumber

public int paramNumber()
Description copied from interface: CoopnSyntacticFunctionnalSymbol
Get the number of parameters. Must be defined in the inherited classes.
Specified by:
paramNumber in interface CoopnSyntacticFunctionnalSymbol
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticFunctionnalSymbol
Returns:
an integer, the actual number of parameter.

paramTypes

public CoopnSyntacticElement[] paramTypes()
Get an array of elements, representing the "type" (in a broad sense) of the parameters. More precisely, by "type", we intent the information added to the symbol name, characterising the parameters.
Specified by:
paramTypes in interface CoopnSyntacticFunctionnalSymbol
Returns:
the parameters "type", as an array of CoopnSyntacticElements, the size of which is equals to paramNumber().

returnType

public CoopnSyntacticElement returnType()
Get an element, representing the "type" (in a broad sense) of the returned value. More precisely, by "type", we intent the information added to the symbol name, characterising the value.
Specified by:
returnType in interface CoopnSyntacticFunctionnalSymbol
Returns:
the returned value "type".

domain

public CoopnTypeAgg domain()
Return the domain.
Returns:
the domain

codomain

public CoopnType codomain()
Return the codomain.
Returns:
the codomain

hasDomain

public boolean hasDomain()
Test if the function has a domain.
Returns:
true iff the function has a domain

equals

public boolean equals(java.lang.Object obj)
Description copied from interface: CoopnSyntacticElement
Equality method. Must be defined in the inherited classes.
Specified by:
equals in interface CoopnSyntacticElement
Overrides:
equals in class CoopnElement
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
Parameters:
obj - the object to compare
Returns:
true iff this object and the parameter are equals.

equivalent

public boolean equivalent(java.lang.Object obj)
Description copied from class: CoopnSymbol
Equivalence testing method. This method must be defined in the inherited classes for returning a boolean deciding if this symbol is equivalent to the parameter. Two symbols are equivalents if they are equals, or if they are equals when source modules are not considered. For instance, transition "T" in "Module1" and transition "T" in "Module2" are are not equal, but are equivalent.
Overrides:
equivalent in class CoopnSymbol
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnSymbol
Returns:
true iff both symbols are equivalents.

toText

public ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toText()
Description copied from class: CoopnElement
Textual elements conversion method. Must be defined in the inherited classes. This routine converts an element into a user-friendly textual element representing it. The string interpretation of this element is very intuitive by a user, but may be incorrect in the sense that it may be rejected by a checker.
Overrides:
toText in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Returns:
a CoopnTextElement image.

toCompleteText

public ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toCompleteText(CoopnSymbolTable table)
Description copied from class: CoopnElement
Complete textual elements conversion method. Must be defined in the inherited classes. This routine converts an element into a correct textual element representing it. The string interpretation of this element will be accepted by a checker, but may be difficult to read by users, due to the additionnal information, like parenthesis and so on.
Overrides:
toCompleteText in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Parameters:
table - the symbol table used to generate symbol references
Returns:
a CoopnTextElement image.

createCocoElement

protected abstract ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoElement createCocoElement(int index,
                                                                                                     boolean used,
                                                                                                     CoopnName name,
                                                                                                     java.lang.String identifier,
                                                                                                     CoopnModuleName module,
                                                                                                     ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoTypeAgg domain,
                                                                                                     ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoType codomain)

toCoco

public ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoElement toCoco(CoopnSymbolTable table)
                                                                       throws java.lang.IllegalArgumentException
Description copied from class: CoopnElement
CoCo conversion method. Must be defined in the inherited classes. This routine convert an element into a string representing it in a CO-opn COnpact form.
Overrides:
toCoco in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Parameters:
origin - the module which generated the Coco conversion
table - the symbol table used to generate symbol references
Returns:
a String image of the element.
Throws:
java.lang.IllegalArgumentException - A used symbol is not in the symbol table.

unmodifiableCopy

public java.lang.Object unmodifiableCopy()
Description copied from class: CoopnElement
Copy the element into an unmodifiable structure.
Overrides:
unmodifiableCopy in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Returns:
an unmodififable clone of the element.

clone

public java.lang.Object clone()
Description copied from interface: CoopnSyntacticElement
Cloning method. Must be defined in the inherited classes.
Specified by:
clone in interface CoopnSyntacticElement
Overrides:
clone in class CoopnElement
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
Returns:
a clone object.