In the context of object-oriented programming languages we propose an extension of the Smalltalk environment which provides for the possibility of constructing software by applying the Design by Contract methodology , introduced by Meyer as a way of developing reliable software. In this sense, both correctness and robustness are increased by using the mechanisms incorporated to Smalltalk as a consequence of the proposed extension. Thus, assertions are used to guarantee the preconditions and postconditions of methods and the stability of the state of the objects, while a mechanism is provided in order to handle the exceptional situations. The Smalltalk programming philosophy is maintained, and the extension does not alter the basic concepts distinguishing this language from the rest of object-oriented languages. This means that the new possibilities incorporated to the environment are accessible by invoking appropriate methods on certain objects. Basic constructions of the language do not need to be modiied, so avoiding special sections in the method syntax. The management of execution control has been handled by using the Smalltalk language itself in a transparent way. Therefore, the extension may be easily applied to other Smalltalk systems.
[1]
David Robson,et al.
Smalltalk-80: The Language and Its Implementation
,
1983
.
[2]
Alan Snyder,et al.
Exception Handling in CLU
,
1979,
IEEE Transactions on Software Engineering.
[3]
C. T. Wu.
A better browser for object-oriented programming
,
1990
.
[4]
Ernesto Pimentel,et al.
Eiffel-like Assertions and Private Methods in Smalltalk
,
1994,
TOOLS.
[5]
Bertrand Meyer.
The new culture of software development
,
1990
.
[6]
Bertrand Meyer,et al.
Advances in object-oriented software engineering
,
1992
.
[7]
Daniel M. Berry,et al.
A modular verifiable exception handling mechanism
,
1985,
TOPL.
[8]
Jørgen Lindskov Knudsen.
Better Exception-Handling in Block-Structured Systems
,
1987,
IEEE Software.
[9]
簡聰富,et al.
物件導向軟體之架構(Object-Oriented Software Construction)探討
,
1989
.