|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jmlspecs.jmlrac.VarGenerator
A class for generating various uniques variable names for RAC.
| Nested Class Summary | |
private static class |
VarGenerator.VarGenForClass
A variable generator for classes. |
private static class |
VarGenerator.VarGenForMethod
A variable generator for methods. |
| Field Summary |
| Fields inherited from interface org.jmlspecs.jmlrac.RacConstants |
MN_CHECK_HC, MN_CHECK_INV, MN_CHECK_POST, MN_CHECK_PRE, MN_CHECK_XPOST, MN_EVAL_OLD, MN_GHOST, MN_INIT, MN_INTERNAL, MN_MODEL, MN_MODEL_PUBLIC, MN_RESTORE_FROM, MN_SAVE_TO, MN_SPEC, MN_SPEC_PUBLIC, TN_JMLCHECKABLE, TN_JMLSURROGATE, TN_JMLUNIT_TEST_POSTFIX, TN_JMLUNIT_TESTDATA_POSTFIX, TN_JMLVALUE, TN_SURROGATE, VN_ASSERTION, VN_CATCH_VAR, VN_CLASS_INIT, VN_CONSTRUCTED, VN_DELEGEE, VN_ERROR_SET, VN_EXCEPTION, VN_FREE_VAR, VN_INIT, VN_OLD_VAR, VN_POST_VAR, VN_PRE_VAR, VN_PRECOND, VN_RAC_COMPILED, VN_RAC_LEVEL, VN_RESULT, VN_STACK_VAR, VN_XRESULT |
| Constructor Summary | |
VarGenerator()
|
|
| Method Summary | |
static VarGenerator |
forClass()
Return a variable generator for classes |
static VarGenerator |
forMethod(VarGenerator forcls)
Return a variable generator for methods |
abstract String |
freshCatchVar()
Return a fresh variable name for use in a catch clause. |
abstract String |
freshOldVar()
Return a fresh variable name for storing the result of an old expression or an old variable. |
abstract String |
freshPostVar()
Return a fresh variable name for storing the result of evaluating a specification case of a postcondition. |
abstract String |
freshPreVar()
Return a fresh variable name for storing the result of evaluating a specification case of a precondtion. |
abstract String |
freshStackVar()
Return a fresh variable name for a stack for use as saving to and restoring from pre-state values for potential recursive method calls. |
abstract String |
freshVar()
Return a fresh variable name unique in the method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public VarGenerator()
| Method Detail |
public static VarGenerator forClass()
public static VarGenerator forMethod(VarGenerator forcls)
forcls - a variable generator for classes
requires forcls != null && (forcls instanceof VarGenForClass); ensures \fresh(\result);
public abstract String freshOldVar()
VN_OLD_VAR +
n, where n is a unique number.
RacConstants.VN_OLD_VARpublic abstract String freshPreVar()
VN_PRE_VAR +
n, where n is a unique number.
RacConstants.VN_PRE_VARpublic abstract String freshPostVar()
VN_POST_VAR +
n, where n is a unique number.
RacConstants.VN_POST_VARpublic abstract String freshStackVar()
VN_STACK_VAR +
n, where n is a unique number.
RacConstants.VN_STACK_VARpublic abstract String freshVar()
VN_FREE_VAR + n,
where n is a unique number.
RacConstants.VN_FREE_VARpublic abstract String freshCatchVar()
VN_CATCH_VAR + n, where n is
a unique number.
RacConstants.VN_FREE_VAR
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||