ConForM.CoopnTools.CoKer.CoopnTest.Cons2Logic
Class ConsPlNameMgr
java.lang.Object
|
+--java.util.AbstractMap
|
+--java.util.HashMap
|
+--ConForM.CoopnTools.CoKer.CoopnTest.Cons2Logic.ConsPlNameMgr
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Map, java.io.Serializable
- public class ConsPlNameMgr
- extends java.util.HashMap
Naming service class. Provides unique prolog names. Acts as an hash map.
- See Also:
- Serialized Form
Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
Method Summary |
java.lang.String |
getUniqueBoolVar(java.lang.String var)
|
java.lang.String |
getUniqueConsName(java.lang.String consVarName)
Returns an unique var for a consVar.
|
java.lang.String |
getUniqueHmlVar(java.lang.String var)
|
java.lang.String |
getUniqueNatVar(java.lang.String var)
|
java.lang.String |
getUniqueNewVar()
Gets an unique new variable. |
int |
getUniqueNumber()
Returns an unique number. |
java.lang.String |
getUniquePlName(java.lang.String module)
Returns a string correct with Prolog name style |
java.lang.String |
getUniqueSpecName(java.lang.String consVarName)
Returns an unique var for a consVar.
|
ConstraintsSymbol |
reverse(java.lang.String prologName)
Returns the ConstraintsSymbol corresponding to the prolog string. |
java.lang.String |
reverseModuleName(java.lang.String prologName)
Returns the consModuleName corresponding to the prolog string. |
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
ConsPlNameMgr
public ConsPlNameMgr(ConstraintsMgr mgr,
ConstraintsTranslationStrategy strategy,
ConsEnv env)
- Constructor.
ConsPlNameMgr
public ConsPlNameMgr(int initialCapacity,
ConstraintsMgr mgr,
ConstraintsTranslationStrategy strategy,
ConsEnv env)
- Constructor with initial capacity.
reverseModuleName
public java.lang.String reverseModuleName(java.lang.String prologName)
- Returns the consModuleName corresponding to the prolog string.
reverse
public ConstraintsSymbol reverse(java.lang.String prologName)
- Returns the ConstraintsSymbol corresponding to the prolog string.
- Parameters:
prologName
- the string of prolog.- Returns:
- the ConstraintsSymbol corresponding or null if not in map.
getUniqueNumber
public int getUniqueNumber()
- Returns an unique number.
getUniqueConsName
public java.lang.String getUniqueConsName(java.lang.String consVarName)
- Returns an unique var for a consVar.
The var is the same for two equal consVar.
- Parameters:
consVarName
- the string corresponding to the consVar- Returns:
- the corresponding Prolog string
getUniqueSpecName
public java.lang.String getUniqueSpecName(java.lang.String consVarName)
- Returns an unique var for a consVar.
The var is the same for two equal consVar.
- Parameters:
consVarName
- the string corresponding to the consVar- Returns:
- the corresponding Prolog string
getUniqueNatVar
public java.lang.String getUniqueNatVar(java.lang.String var)
getUniqueBoolVar
public java.lang.String getUniqueBoolVar(java.lang.String var)
getUniqueHmlVar
public java.lang.String getUniqueHmlVar(java.lang.String var)
getUniqueNewVar
public java.lang.String getUniqueNewVar()
- Gets an unique new variable.
- Returns:
- the corresponding Prolog string
getUniquePlName
public java.lang.String getUniquePlName(java.lang.String module)
- Returns a string correct with Prolog name style