Formal techniques have been shown to be useful in the development of correct software. But the level of expertise required of practitioners of these techniques prohibits their widespread adoption. Formal techniques need to be tailored to the commercial software developer. Alloy is a lightweight specification language supported by the Alloy Analyzer (AA), a tool based on off-the-shelf SAT technology. The tool allows a user to check interactively whether given properties are consistent or valid with respect to a high-level specification, providing an environment in which the correctness of such a specification may be established. However, Alloy is not particularly suited to expressing program specifications and the feedback provided by AA can be misleading where the specification under analysis or the property being checked contains inconsistencies. In this paper, we address these two shortcomings. Firstly, we present a lightweight language called "Loy", tailored to the specification of object-oriented programs. An encoding of Loy into Alloy is provided so that AA can be used for automated analysis of Loy program specifications. Secondly, we present some "patterns of analysis" that guide a developer through the analysis of a Loy specification in order to establish its correctness before implementation.
[1]
C. A. R. HOARE,et al.
An axiomatic basis for computer programming
,
1969,
CACM.
[2]
Edmund M. Clarke,et al.
Formal Methods: State of the Art and Future Directions Working Group Members
,
1996
.
[3]
Albert L. Baker,et al.
Preliminary design of JML: a behavioral interface specification language for java
,
2006,
SOEN.
[4]
Daniel Jackson,et al.
Lightweight Formal Methods
,
2001,
FME.
[5]
Sarfraz Khurshid,et al.
VAlloy - Virtual Functions Meet a Relational Language
,
2002,
FME.
[6]
Robert W. Floyd,et al.
Assigning Meanings to Programs
,
1993
.
[7]
Jeannette M. Wing,et al.
A behavioral notion of subtyping
,
1994,
TOPL.
[8]
Krzysztof R. Apt,et al.
Ten Years of Hoare's Logic: A Survey—Part I
,
1981,
TOPL.
[9]
Michael D. Ernst,et al.
An overview of JML tools and applications
,
2003,
International Journal on Software Tools for Technology Transfer.
[10]
Michael Butler,et al.
Combining B and Alloy
,
2001
.
[11]
Stephen H. Edwards,et al.
Model variables: cleanly supporting abstraction in design by contract
,
2005,
Softw. Pract. Exp..