ConForM.CoopnTools.CoKer.CoopnMgr
Class CoopnBridge

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnFrame
        |
        +--ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
              |
              +--ConForM.CoopnTools.CoKer.CoopnMgr.CoopnBridge
All Implemented Interfaces:
java.lang.Cloneable, CoopnModuleDependency, CoopnTypeRelation

public class CoopnBridge
extends ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
implements CoopnModuleDependency, CoopnTypeRelation

Coopn bridge. A coopn bridge is used to interpret co-opn source text containing elements form another formalism. It allows the mapping between symbols of the other formalism and coopn symbols, and provides a CoopnFrame according to these symbols.


Constructor Summary
CoopnBridge(java.lang.String name, CoopnMgr mgr, CoopnEnv env)
          Creates a new situation external to every loaded modules.
 
Method Summary
 void addTranslatedSymbol(CoopnSyntacticSymbol originalSymbol, CoopnSymbol translatedSymbol)
          Add a translated symbol in the translation table.
 void addUsedModule(java.lang.String name)
          Add an used module.
 java.lang.Object clone()
           
 java.lang.String[] dependencies()
          Module dependency.
 boolean equ(CoopnTypeAgg left, CoopnTypeAgg right)
          Equivalence between two lists of types.
 boolean equ(CoopnType left, CoopnType right)
          Equivalence between two types.
 boolean equals(java.lang.Object obj)
           
 boolean less(CoopnTypeAgg sub, CoopnTypeAgg sup)
          Order between two lists of types.
 boolean less(CoopnType sub, CoopnType sup)
          Order between two types.
 boolean lessOrEqu(CoopnTypeAgg sub, CoopnTypeAgg sup)
          Order between two lists of types.
 boolean lessOrEqu(CoopnType sub, CoopnType sup)
          Order between two types.
 java.lang.String name()
          Get the name.
 CoopnSyntacticSymbol origin(CoopnSymbol parameter)
          Reverse translation of a symbol.
 java.util.Enumeration originalSymbols()
          Get the original symbols.
 java.lang.String toString()
           
 CoopnSymbol translate(CoopnSyntacticSymbol original)
          Translate an original symbol into its coopn equivalent.
 java.util.Enumeration translatedSymbols()
          Get the translated symbols.
 boolean unifiable(CoopnTypeAgg left, CoopnTypeAgg right)
          Compatibility for unification between two lists of types.
 boolean unifiable(CoopnType left, CoopnType right)
          Compatibility for unification between two types.
 java.util.Enumeration usedModules()
          Get the used modules.
 
Methods inherited from class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
addSymbol, cloneCoopnEnvironmentalFrame, coreToString, hashCode, usedSymbols
 
Methods inherited from class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnFrame
cloneCoopnFrame
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoopnBridge

public CoopnBridge(java.lang.String name,
                   CoopnMgr mgr,
                   CoopnEnv env)
Creates a new situation external to every loaded modules.
Parameters:
mgr - the coopn manager to use
env - the environment
Method Detail

dependencies

public java.lang.String[] dependencies()
Description copied from interface: CoopnModuleDependency
Module dependency.
Specified by:
dependencies in interface CoopnModuleDependency
Overrides:
dependencies in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnModuleDependency
Returns:
an array of strings containing names of modules.

equ

public boolean equ(CoopnTypeAgg left,
                   CoopnTypeAgg right)
Description copied from interface: CoopnTypeRelation
Equivalence between two lists of types.
Specified by:
equ in interface CoopnTypeRelation
Overrides:
equ in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTypeRelation
Parameters:
left - the first list of types
right - the second list of types
Returns:
true iff both lists of types are equivalents with regard to the type relation represented by this object.

equ

public boolean equ(CoopnType left,
                   CoopnType right)
Description copied from interface: CoopnTypeRelation
Equivalence between two types.
Specified by:
equ in interface CoopnTypeRelation
Overrides:
equ in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTypeRelation
Parameters:
left - the first type
right - the second type
Returns:
true iff both types are equivalents with regard to the type relation represented by this object.

less

public boolean less(CoopnTypeAgg sub,
                    CoopnTypeAgg sup)
Description copied from interface: CoopnTypeRelation
Order between two lists of types.
Specified by:
less in interface CoopnTypeRelation
Overrides:
less in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTypeRelation
Parameters:
sub - the first list of types
sup - the second list of types
Returns:
true iff sub is less or equal to sup AND at least one element of sub is strictly less than the same element of sup.

less

public boolean less(CoopnType sub,
                    CoopnType sup)
Description copied from interface: CoopnTypeRelation
Order between two types.
Specified by:
less in interface CoopnTypeRelation
Overrides:
less in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTypeRelation
Parameters:
sub - the first type
sup - the second type
Returns:
true iff sub is a strict sub-sort or a sub-type of sup.

lessOrEqu

public boolean lessOrEqu(CoopnTypeAgg sub,
                         CoopnTypeAgg sup)
Description copied from interface: CoopnTypeRelation
Order between two lists of types.
Specified by:
lessOrEqu in interface CoopnTypeRelation
Overrides:
lessOrEqu in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTypeRelation
Parameters:
sub - the first list of types
sup - the second list of types
Returns:
true iff every element of sub is a sub-sort or a sub-type of the same (indexed) element sup.

lessOrEqu

public boolean lessOrEqu(CoopnType sub,
                         CoopnType sup)
Description copied from interface: CoopnTypeRelation
Order between two types.
Specified by:
lessOrEqu in interface CoopnTypeRelation
Overrides:
lessOrEqu in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTypeRelation
Parameters:
sub - the first type
sup - the second type
Returns:
true iff sub is a sub-sort or a sub-type of sup.

unifiable

public boolean unifiable(CoopnTypeAgg left,
                         CoopnTypeAgg right)
Description copied from interface: CoopnTypeRelation
Compatibility for unification between two lists of types.
Specified by:
unifiable in interface CoopnTypeRelation
Overrides:
unifiable in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTypeRelation
Parameters:
left - the first list of types
right - the second list of types
Returns:
true iff both types of every (indexed) element are compatibles with regard to the type relation represented by this object.

unifiable

public boolean unifiable(CoopnType left,
                         CoopnType right)
Description copied from interface: CoopnTypeRelation
Compatibility for unification between two types.
Specified by:
unifiable in interface CoopnTypeRelation
Overrides:
unifiable in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTypeRelation
Parameters:
left - the first type
right - the second type
Returns:
true iff both types are compatibles with regard to the type relation represented by this object.

addUsedModule

public void addUsedModule(java.lang.String name)
Add an used module.
Overrides:
addUsedModule in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
Parameters:
module - the name of the module to use

addTranslatedSymbol

public void addTranslatedSymbol(CoopnSyntacticSymbol originalSymbol,
                                CoopnSymbol translatedSymbol)
Add a translated symbol in the translation table.
Parameters:
originalSymbol - the original symbol
translatedSymbol - the translated symbol

name

public java.lang.String name()
Get the name.
Overrides:
name in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
Returns:
the name.

usedModules

public java.util.Enumeration usedModules()
Get the used modules.
Overrides:
usedModules in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame
Returns:
an enumeration containing the names of the used modules.

originalSymbols

public java.util.Enumeration originalSymbols()
Get the original symbols.
Returns:
an enumeration containing the original symbols.

translatedSymbols

public java.util.Enumeration translatedSymbols()
Get the translated symbols.
Returns:
an enumeration containing the translated symbols.

translate

public CoopnSymbol translate(CoopnSyntacticSymbol original)
Translate an original symbol into its coopn equivalent.
Parameters:
original - the original symbol
Returns:
the translated symbol corresponding to the original one, or null iff the original symbol is not in the table.

origin

public CoopnSyntacticSymbol origin(CoopnSymbol parameter)
Reverse translation of a symbol.
Parameters:
parameter - the translated (coopn) symbol
Returns:
one of the original symbols wich are translated into the parameter, or null iff the parameter symbol is not in the table.

toString

public java.lang.String toString()
Overrides:
toString in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnEnvironmentalFrame

clone

public java.lang.Object clone()
Overrides:
clone in class ConForM.CoopnTools.CoKer.CoopnMgr.CentralCoopnMgr.CoopnFrame