|
|||||||||||
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.BinaryForm
This class implements binary formula. The token assoc iated with those formulas can be
Field Summary |
Constructor Summary | |
BinaryForm(BinaryForm f)
|
|
BinaryForm(byte nodeType,
Formula left,
Formula right)
Constructs a binary formula from two formulas and a token. |
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 |
static BinaryForm |
getDefaultRefDecl()
Returns the default type declaration for a reference |
static BinaryForm |
getDefaultRefDecl(Formula x)
|
void |
getFields(java.util.Set fields)
Collects the fields that occur in the formula. |
Formula |
getLeft()
Returns the left formula. |
Formula |
getRight()
Returns the right 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. |
Formula |
renameParam(Parameters signature,
java.util.Vector newSignature)
|
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. |
java.util.Vector |
toVector()
Converts comma separated formulas into a set of formulas. |
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 |
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 BinaryForm(BinaryForm f)
public BinaryForm(byte nodeType, Formula left, Formula right)
nodeType
- token of the new formulaleft
- left part of the new formularight
- right part of the new formulaMethod Detail |
public static BinaryForm getDefaultRefDecl()
REFENCES - (instances \/ {null})
public static BinaryForm getDefaultRefDecl(Formula x)
public java.lang.Object clone()
clone
in class Formula
Formula.clone()
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 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 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 Formula renameParam(Parameters signature, java.util.Vector newSignature)
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 void garbageIdent()
Formula
garbageIdent
in class Formula
public java.util.Vector toVector()
Formula
toVector
in class Formula
toVector()
public void getFields(java.util.Set fields)
Formula
getFields
in class Formula
fields
- The set a collected fields.public Formula getLeft()
left
public Formula getRight()
right
public BasicType getBasicType()
Formula
getBasicType
in class Formula
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |