|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jml2b.util.Profiler jml2b.formula.Formula jml2b.formula.UnaryForm
This class implements unary Formula. The node type can be :
Field Summary |
Constructor Summary | |
UnaryForm(byte nodeType,
Formula exp)
Constructs a unary formula from a formula and a token. |
|
UnaryForm(UnaryForm f)
|
Method Summary | |
java.lang.Object |
clone()
Clones the formula. |
int |
contains(java.util.Vector selectedFields)
|
boolean |
equals(java.lang.Object f)
Returns whether the formula equals the parameter. |
void |
garbageIdent()
Annotates all the fields that appear in the formula to declare them in the Atelier B files. |
BasicType |
getBasicType()
Returns the type of a formula |
Formula |
getExp()
Returns the leaf formula. |
void |
getFields(java.util.Set fields)
Collects the fields that occur in the formula. |
Formula |
instancie(Formula b)
Replaces this with the parameter in the expression. |
boolean |
is(Formula f)
Returns whether the formula corresponds to a read formula. |
boolean |
isObvious(boolean atTheEnd)
Returns whether a formula is obvious. |
void |
processIdent()
Collects all the indentifier of a formula to give them an index in the identifer array. |
void |
save(IJml2bConfiguration config,
IOutputStream s,
IJmlFile jf)
Saves the formula in a .jpo file |
Formula |
sub(Formula a,
Formula b,
boolean subInCalledOld)
Applies a substitution on a formula. |
Formula |
subIdent(java.lang.String a,
Formula b)
Applies a substitution on a formula. |
Formula |
suppressSpecialOld(int token)
Suppress the called old pragmas. |
Methods inherited from class jml2b.formula.Formula |
and, create, declarField, domainRestrict, getFalse, getNodeType, getNull, implies, indent, isBFalse, matchAEqualsNull, not, oldParam, or, renameParam, sub, toJava, toLang, toVector |
Methods inherited from class jml2b.util.Profiler |
runGC |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UnaryForm(UnaryForm f)
public UnaryForm(byte nodeType, Formula exp)
nodeType
- token of the new formulaexp
- part of the new formulaMethod Detail |
public java.lang.Object clone()
Formula
clone
in class Formula
public Formula sub(Formula a, Formula b, boolean subInCalledOld)
Formula
sub
in class Formula
a
- the substituted formulab
- the new formulasubInCalledOld
- specify whether the substitution should also be
applied in the called old construction
public Formula suppressSpecialOld(int token)
Formula
suppressSpecialOld
in class Formula
public void processIdent()
Formula
processIdent
in class Formula
jml2b.pog.IdentifierResolver#bIdents
public Formula instancie(Formula b)
Formula
this
with the parameter in the expression.
instancie
in class Formula
b
- expression on which the method where the expression occurs is
called.
public void garbageIdent()
Formula
garbageIdent
in class Formula
public void getFields(java.util.Set fields)
Formula
getFields
in class Formula
fields
- The set a collected fields.public Formula subIdent(java.lang.String a, Formula b)
Formula
subIdent
in class Formula
a
- the substituted string correspondingto an identifierb
- the new formula
public boolean equals(java.lang.Object f)
Formula
equals
in class Formula
f
- the checked parameter
true
if the formula syntaxically equals the
parameter, false
otherwisepublic boolean is(Formula f)
Formula
is
in class Formula
f
- a read formula coming from a jpo file
true
if the formula equals to the read formula,
false
otherwise.public int contains(java.util.Vector selectedFields)
contains
in class Formula
public boolean isObvious(boolean atTheEnd)
Formula
isObvious
in class Formula
true
if the formula is considered as obvious,
false
otherwisepublic void save(IJml2bConfiguration config, IOutputStream s, IJmlFile jf) throws java.io.IOException
Formula
save
in class Formula
config
- s
- the ouputstream corresponding to a jpo filejf
-
java.io.IOException
- when the formula cannot be saved.public Formula getExp()
exp
public BasicType getBasicType()
Formula
getBasicType
in class Formula
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |