ChAsE allows to check whether the side-effects of a Java method are correctly specified, and in particular whether a method is pure. The tool uses a syntactic method to check assignable clauses, and it is neither sound nor complete, but intended to be practical -- because it can find the most common errors in assignable clauses very efficiently. ChAsE is an extension of ESC/Java, a static checker for Java programs, which in its current state does not check assignable clauses at all.
The current implementation of ChAsE can check assignable clauses containing assignable expressions as described by the following grammar (model variables are not handled).
<Assignable-exp> ::= <Identifier> | <Identifier>[Exp] | <Identifier>[Exp .. Exp] | <Identifier>[*] | \fields\_of(<Field-exp>) | \nothing | \everything <Field-exp> ::= <Point-identif> | this | \reach(<Point-identif>) | reach(this) <Point-identif> ::= <Identifier>.<Point-identif> | <Identifier>ChAsE and the specifications we constructed for Formal specification of Gemplus' electronic purse case study can be downloaded from here. When you unzip and untar this file, you will find instructions in the file README.txt.
ChAsE and the underlying method will be described in the paper A static checker for JML's assignable clause, by Néstor Cataño and Marieke Huisman (manuscript).
Classname | Remarks |
Annee | 1 side-effects free method |
Jour | 1 side-effects free method |
Mois | 1 side-effects free method |
PacapException | 1 side-effects free method |
DecimalException | |
Decimal | 12 side-effects free methods, 9 specification problems found |
Classname | Remarks |
LoyaltyLoyaltyInterface | 2 side-effects free methods |
LoyaltyPurseInterface | 2 side-effects free methods |
PurseLoyaltyInterface | 4 side-effects free methods |
TransactionInterface | 10 side-effects free methods |
Classname | Remarks |
DateException | |
Date | 5 side-effects free methods, 2 specification problems found in 2 methods |
HeureException | |
Heure | 2 side-effects free methods, 2 specification problems found in 2 methods |
PartnerID | 1 side-effects free method |
SalerID | 1 side-effects free method, 4 specification problems found in 3 methods |
LoyaltiesTableException | |
LoyaltiesTable | 4 side-effects free methods |
AllowedLoyaltyException | |
AllowedLoyalty | 6 side-effects free methods, 3 specification problems found in 3 methods |
AccessConditionException | |
AccessCondition | 4 side-effects free methods |
AccessControlTable | 2 side-effects free methods |
AccessControl | 1 side-effects free method |
Currencies | 3 side-effects free methods |
ExchangeSession | 10 side-effects free methods, 7 specification problems found in 4 methods |
ExchangeRecord | 5 side-effects free methods, 16 specification problems found in 2 methods |