|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jml2b.util.Profiler jml2b.pog.lemma.Lemma jml2b.pog.lemma.ExsuresLemma
This class contains the information extracted from an exsures pragma.
Field Summary |
Constructor Summary | |
ExsuresLemma(IJml2bConfiguration config,
Exsures ex,
Expression b,
GoalOrigin origin)
Constructs an exsures lemma from an exsures clause |
|
ExsuresLemma(IJml2bConfiguration config,
Exsures ex,
GoalOrigin origin)
Constructs an exsures lemma from an exsures clause |
|
ExsuresLemma(Type t,
Field f,
SimpleLemma p)
Constructs an exsures lemma |
Method Summary | |
boolean |
catches(AClass c)
Returns whether a exsures lemma catches a given exception. |
java.lang.Object |
clone()
Clones a lemma. |
void |
garbageIdent()
Annotates all the fields that appear in the lemma to declare them in the Atelier B files. |
java.lang.String |
getBName()
Returns the name of the catched variable or a temporary variable if there is no catched variable |
Field |
getExceptionField()
|
Type |
getExceptionType()
Returns the exceptionType. |
void |
getFields(java.util.Set fields)
|
SimpleLemma |
getLemma()
Returns the lemma. |
void |
getTypesException(java.util.Set s)
Adds the exception type to the set |
Proofs |
impliesExceptional(ExceptionalBehaviourStack ebs)
Returns the proof that the exsures lemma implies an exceptionnal behaviour. |
void |
oldParam(java.util.Vector enum)
Adds a old param around the element of the enumeration corresponding to the parameter of the method. |
boolean |
proveObvious(java.util.Vector hyp,
boolean atTheEnd)
Supress in the lemma the obvious goals. |
void |
selectLabel(java.util.Vector labels)
Selects in the labelled lemmas, the cases corresponding to labels. |
void |
setExceptionType(Type exceptionType)
Sets the exceptionType. |
void |
sub(Substitution s)
Apply a substitution to the lemma. |
void |
suppressSpecialOld(int token)
Suppress the Called Old expressions. |
Lemma |
throwException(Formula vv,
Formula c)
Returns the lemma to prove to ensure that the thrown of an exception ensures the current lemma. |
Lemma |
throwException(java.lang.String vv,
AClass c)
Returns the lemma to prove to ensure that the thrown of an exception ensures the current lemma. |
Methods inherited from class jml2b.pog.lemma.Lemma |
catchException, nbPo, nbPoChecked, nbPoProved, nbPoProved |
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 ExsuresLemma(Type t, Field f, SimpleLemma p)
t
- The exception typef
- The catched variablep
- The associated lemmapublic ExsuresLemma(IJml2bConfiguration config, Exsures ex, Expression b, GoalOrigin origin) throws Jml2bException, PogException
config
- The current configurationex
- The exsures clauseb
- The expression that should be used to instancie the clauseorigin
- The origin of the exsures clause, it can come from a
method or a loop
PogException
Jml2bException
public ExsuresLemma(IJml2bConfiguration config, Exsures ex, GoalOrigin origin) throws Jml2bException, PogException
config
- The current configurationex
- The exsures clauseorigin
- The origin of the exsures clause, it can come from a
method or a loop
PogException
Jml2bException
Method Detail |
public java.lang.Object clone()
Lemma
clone
in class Lemma
public java.lang.String getBName()
public Lemma throwException(java.lang.String vv, AClass c)
Lemma
throwException
in class Lemma
vv
- Instance of the thrown exception.c
- Class of the thrown exception.
vv
if c
is a subtype of the exception type.public Lemma throwException(Formula vv, Formula c)
Lemma
throwException
in class Lemma
vv
- Instance of the thrown exception.c
- Formula containing the class of the thrown exception.
c
is a subtype
of the excpetion type where the exception field has been substituted with
vv
.public void oldParam(java.util.Vector enum)
ILemma
enum
- fields enumerationTheorem#oldParam(Enumeration)
public void suppressSpecialOld(int token)
ILemma
Theorem#suppressCalledOld()
public void garbageIdent()
ILemma
Theorem#garbageIdent()
public void sub(Substitution s)
ILemma
s
- substitution to apply.Proofs.sub(Substitution)
public boolean proveObvious(java.util.Vector hyp, boolean atTheEnd)
ILemma
true
if the lemma contains only obvious goals,
false
otherwise.Proofs.proveObvious(boolean, boolean)
public void selectLabel(java.util.Vector labels) throws WrongLabelException
Lemma
selectLabel
in class Lemma
labels
- set of labels that have to be selected
WrongLabelException
- if a behaviour lemma does not contain any
remaining case after the selection.public void getTypesException(java.util.Set s)
getTypesException
in class Lemma
s
- set of Type
Theorem#getTypesException(Set)
public void getFields(java.util.Set fields)
getFields
in class Lemma
public Proofs impliesExceptional(ExceptionalBehaviourStack ebs)
ebs
- The exceptional behaviour
public boolean catches(AClass c)
Lemma
catches
in class Lemma
c
- The class of the tested exception
c
is a subclass of the exception type.public Type getExceptionType()
exceptionType
public SimpleLemma getLemma()
lemma
public void setExceptionType(Type exceptionType)
exceptionType
- The exceptionType to setpublic Field getExceptionField()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |