|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjml2b.util.Profiler
jml2b.pog.util.ContextFromPureMethod
This class contains the context issued from pure method that is used when
translating an expression into a formula.
When the expression to translate does not contain any call to a pure method,
only the field f is usefull and contains the result of the
translation. When the expression contains calls to pure method, a context is
returned containing the returned variable choosen for theis method and its
ensures clause. For example the expression m() == 3 with
m ensures : \result <= 2 will be translated in
\forall byte r; r <= 2 ==> r == 3 and temporary during the
translation m() is translated in a context where
results contains the field r of type
byte, ensures contains r <= 2 and
f contains r.
The context is translated into a formula with it is possible, i.e. when the
expression becomes a predicate.
For example, when translating m() + m() == 3, the two contexts
will be concatened before being translated (when the equality will be
translated).
| Field Summary |
| Constructor Summary | |
ContextFromPureMethod(ContextFromPureMethod c1,
ContextFromPureMethod c2,
ContextFromPureMethod c3,
Formula f)
Constructs a context from the translation of a 3-ary operator. |
|
ContextFromPureMethod(ContextFromPureMethod c1,
ContextFromPureMethod c2,
Formula f)
Constructs a context from the translation of a binary operator. |
|
ContextFromPureMethod(ContextFromPureMethod c,
Formula f)
Constructs a context from an existing context and a formula. |
|
ContextFromPureMethod(ContextFromPureMethod c,
java.lang.String res,
Formula f,
Type t,
Formula ens)
Constructs a context from a method call with parameter. |
|
ContextFromPureMethod(Formula f)
Constructs a context form a formula, the context is empty. |
|
ContextFromPureMethod(java.lang.String f,
Formula res,
Type t,
Formula ens)
Constructs a context from a method call without parameter. |
|
| Method Summary | |
Formula |
getFormula()
Returns the formula. |
Formula |
getFormulaWithContext()
Returns the result of the translation. |
| Methods inherited from class jml2b.util.Profiler |
runGC |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ContextFromPureMethod(Formula f)
f - formula resulting form the translation of an expression without
method call or from a expression that is a predicate.
public ContextFromPureMethod(ContextFromPureMethod c,
Formula f)
c - context that is taken into account, except its formula.f - formula resulting form the translation of an expression without
method call or from a expression that is a predicate.
public ContextFromPureMethod(java.lang.String f,
Formula res,
Type t,
Formula ens)
res - the field corresponding to the result of the callt - the returned type of the method calledens - the ensures clause of the method called
public ContextFromPureMethod(ContextFromPureMethod c,
java.lang.String res,
Formula f,
Type t,
Formula ens)
c - context issued from the translation of the parameters.res - the field corresponding to the result of the callt - the returned type of the method calledens - the ensures clause of the method called
public ContextFromPureMethod(ContextFromPureMethod c1,
ContextFromPureMethod c2,
Formula f)
c1 - context issued form the translation of one part.c2 - context issued form the translation of the other part.f - translation resulting formula
public ContextFromPureMethod(ContextFromPureMethod c1,
ContextFromPureMethod c2,
ContextFromPureMethod c3,
Formula f)
c1 - context issued form the translation of a part.c2 - context issued form the translation of another part.c3 - context issued form the translation of another part.f - translation resulting formula| Method Detail |
public Formula getFormulaWithContext()
public Formula getFormula()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||