|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jmlspecs.jmlrac.TransMethod.SpecCase
An abstract superclass for conjoining multiple specification
clauses, such as requires and ensures
clauses, in a specification case.
| Field Summary | |
protected JmlSpecBodyClause[] |
bodyClauses
|
| Constructor Summary | |
protected |
TransMethod.SpecCase(JmlSpecBodyClause[] bc)
|
| Method Summary | |
protected static JExpression |
conjoin(List clauses)
Returns a new conjoined expression made out of predicates of the given specification clauses. |
private JmlSignalsClause |
desugar(JmlSignalsOnlyClause sig)
Desugars a signals_only clause into a signals clause. |
JmlSignalsClause[] |
exceptionalPostcondition()
Returns the exceptional postcondition of this spec case. |
boolean |
hasExceptionalPostcondition()
Returns true if this spec case has the postcondition. |
boolean |
hasPostcondition()
Returns true if this spec case has the normal postcondition specified. |
abstract boolean |
hasPrecondition()
Returns true if this spec case has the precondition specified. |
abstract boolean |
hasSpecVarDecls()
Returns true if this spec case has any specification variable declarations. |
protected boolean |
isCheckable(JmlSpecBodyClause clause)
Returns true if the given spec body clause is checkable. |
JExpression |
postcondition()
Returns the normal postcondition of this spec case. |
abstract JExpression |
precondition()
Returns the precondition of this spec case. |
abstract JmlSpecVarDecl[] |
specVarDecls()
Returns the specification variable declarations of this spec case. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected JmlSpecBodyClause[] bodyClauses
| Constructor Detail |
protected TransMethod.SpecCase(JmlSpecBodyClause[] bc)
| Method Detail |
public abstract boolean hasSpecVarDecls()
public abstract boolean hasPrecondition()
public boolean hasPostcondition()
public boolean hasExceptionalPostcondition()
public abstract JmlSpecVarDecl[] specVarDecls()
public abstract JExpression precondition()
requires clauses, the
clauses are conjoined.
conjoin(List)public JExpression postcondition()
ensures clauses,
the clauses are conjoined.
conjoin(List)protected boolean isCheckable(JmlSpecBodyClause clause)
public JmlSignalsClause[] exceptionalPostcondition()
signals
clauses, the clauses are conjoined. If this spec case has a
signals_only clause, it is first desugared into a signals
clause.
ensures \result != null ==> \result.length > 0;
conjoin(List)private JmlSignalsClause desugar(JmlSignalsOnlyClause sig)
signals_only \nothing;is desugared into the following signals clause:
signals (java.lang.Exception e) false;Furthermore, a signals_only clause of the form
signals_only E1, E2, ..., En;is desugared into the following signals clause:
signals (java.lang.Exception e)
e instanceof E1
|| e instanceof E2
...
|| e instanceof En;
protected static JExpression conjoin(List clauses)
\not_specified is desugared into true.
requires clauses != null && (\forall Object o; clauses.contains(o); (o instanceof JmlRequiresClause) || (o instanceof JmlEnsuresClause));
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||