ConForM.CoopnTools.CoKer.CoopnMgr
Class CoopnRealMorphism

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.CoopnMgr.CoopnRealMorphism
All Implemented Interfaces:
java.lang.Cloneable

public class CoopnRealMorphism
extends java.lang.Object
implements java.lang.Cloneable

real morphism. A real morphism is an actual instantiation morphism. It allows to transform symbols, according to the so-called morphism (i.e. the morphism between the parameters of an instantiation, and according to renamings.


Constructor Summary
CoopnRealMorphism(CoopnModuleName origin, CoopnModuleName destination)
          Simple constructor.
 
Method Summary
 void addGenericUse(CoopnModuleName source, CoopnModuleNameList target)
          Adds a generic use.
 void addParameterMapping(CoopnModuleName source, CoopnModuleName target)
          Adds a mapping between a formal and an effective parameter module name.
 void addRename(CoopnName source, CoopnName target)
          Adds a rename to the real morphism.
 void addTransformation(CoopnSymbol source, CoopnSymbol target)
          Adds a transformation to the real morphism.
 java.lang.Object clone()
           
 boolean containsParameterMapping(CoopnModuleName effective)
          look if a module is memeber of the effective parameters.
 CoopnModuleName findParameterMapping(CoopnModuleName formal)
          Get the name of the effective parameter module corresponding to a formal one.
 CoopnSymbol transform(CoopnSymbol symbol, CoopnTypeRelation rel)
          Transforms a symbol according to the real morphism.
 java.lang.Object unmodifiableCopy()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoopnRealMorphism

public CoopnRealMorphism(CoopnModuleName origin,
                         CoopnModuleName destination)
Simple constructor.
Parameters:
origin - name of the original module (to be instantiated)
destination - name of the destination (instantiated) module
Method Detail

addParameterMapping

public void addParameterMapping(CoopnModuleName source,
                                CoopnModuleName target)
Adds a mapping between a formal and an effective parameter module name.
Parameters:
source - the name of the formal parameter module
target - the name of the effective parameter module

addGenericUse

public void addGenericUse(CoopnModuleName source,
                          CoopnModuleNameList target)
Adds a generic use. Generic uses may be (perhaps) automatically instantiated during this instantiation.
Parameters:
source - the name of the used generic module
target - its formal parameters

addRename

public void addRename(CoopnName source,
                      CoopnName target)
Adds a rename to the real morphism.
Parameters:
source - the old name
target - the new name
Returns:
the transformed symbol.

addTransformation

public void addTransformation(CoopnSymbol source,
                              CoopnSymbol target)
Adds a transformation to the real morphism.
Parameters:
source - the old symbol
target - the new symbol
Returns:
the transformed symbol.

findParameterMapping

public CoopnModuleName findParameterMapping(CoopnModuleName formal)
Get the name of the effective parameter module corresponding to a formal one.
Parameters:
formal - the name of the formal parameter module
Returns:
the name of the effective parameter module, or null if formal is not one of the formal paramameters.

containsParameterMapping

public boolean containsParameterMapping(CoopnModuleName effective)
look if a module is memeber of the effective parameters.
Parameters:
effective - the name of the effective parameter module
Returns:
true iff effective is one of the effective parameters.

transform

public CoopnSymbol transform(CoopnSymbol symbol,
                             CoopnTypeRelation rel)
                      throws CoopnStaticSemanticsException
Transforms a symbol according to the real morphism.
Parameters:
symbol - the symbol to transform
Returns:
the transformed symbol.

unmodifiableCopy

public java.lang.Object unmodifiableCopy()

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object