|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjml2b.util.Profiler
jml2b.pog.util.IdentifierResolver
This class provides utilities for the treatment of identifiers.
Each identifier gets two names, an absolute one and a short one.
For example, the absolute name for the field absoluteName
of this class would be f_jml2b_util_absoluteName and the short
name would be f_absoluteName.
Those names are calculated when the processIdent() methods
are called.
After the PO generation, names are resolved in manner to choose which one
will be used in the lemmas. If they are no conflicts the short one will be
used.
jml2b.pog.IdentifierResolver#bIdents,
jml2b.pog.IdentifierResolver#resolveIdents(),
Formula.processIdent()| Method Summary | |
boolean |
absoluteNameEquals(java.lang.String s)
Test whether the absolute name equals the parameter. |
static int |
addIdent(AClass c)
Adds a class identifier in the set of identifier. |
static int |
addIdent(AField f)
Adds a field identifier in the set of identifier. |
static int |
addIdent(Package p)
Adds a package identifier in the set of identifier. |
static java.lang.String |
bName(int index)
Returns the name in the B syntax of an identifier |
static void |
clearName()
Clear the name index of all the named node of the identifier set. |
void |
clearNName()
Clear the name index. |
java.lang.String |
getBName()
Returns the name to be used into the B lemmas. |
static void |
init(IJml2bConfiguration config)
Initialize the set of indentifier to the set containing an element corresponding to the length pseudo field |
static void |
resolveIdents()
Resolve identifiers conflict. |
void |
setShortName()
Indicates that the short name can be used. |
boolean |
shortNameEquals(IdentifierResolver ts)
Test whether the short name equals the parameter. |
static void |
unResolveIdents()
Disallow all identifier of the set of identifier to use their short name |
void |
unsetShortName()
Indicates that the absolute name can be used. |
| Methods inherited from class jml2b.util.Profiler |
runGC |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void init(IJml2bConfiguration config)
throws Jml2bException
length pseudo field
Jml2bExceptionpublic static java.lang.String bName(int index)
index - The index of the searched identifierpublic static int addIdent(AField f)
f - The field to add
public static int addIdent(AClass c)
c - The class to add
public static int addIdent(Package p)
p - The package to add
public static void clearName()
NamedNode.clearName()public static void resolveIdents()
public static void unResolveIdents()
public java.lang.String getBName()
getAbsoluteNamepublic boolean absoluteNameEquals(java.lang.String s)
s - tested string
true if the string is equal to the absolute name,
false otherwise.public boolean shortNameEquals(IdentifierResolver ts)
true if the string is equal to the short name,
false otherwise.public void setShortName()
public void unsetShortName()
public void clearNName()
NamedNode.clearName()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||