Because the concept of program correctness is generally taught as an activity independent of the programming process, most introductory computer science (CS) students perceive it as unnecessary and even irrelevant. The concept of contracts, on the other hand, is generally taught as an integral part of the programming process. As such, most introductory CS students have little difficulty understanding the need to establish contracts via preconditions and postconditions. In order to improve teaching program correctness concepts, we implemented ProVIDE, an enhanced integrated development environment (IDE) for Java [7]. Pro VIDE supports a modified version of the "design by contract" methodology [13] that assists its student programmers in contract construction. Rather than asking for both a precondition and postcondition for each of his/her methods, ProVIDE asks the student to simply supply a postcondition. ProVIDE then helps the student construct the appropriate precondition by leading him/her through an axiomatic proof of the correctness of the method. Thus, the proof of correctness of the method is a side-effect of the student's need to construct an appropriate precondition.
[1]
Timothy S. Gegg-Harrison.
Ancient Egyptian numbers: a CS-complete example
,
2001,
SIGCSE '01.
[2]
Robert W. Floyd,et al.
Assigning meaning to programs
,
1967
.
[3]
Susan E. Newman,et al.
Cognitive Apprenticeship: Teaching the Craft of Reading, Writing, and Mathematics. Technical Report No. 403.
,
1987
.
[4]
Bertrand Meyer,et al.
Eiffel: The Language
,
1991
.
[5]
David Gries,et al.
The Science of Programming
,
1981,
Text and Monographs in Computer Science.
[6]
E. Pellicer.
Anchored Instruction and Its Relationship to Situated Cognition
,
1990
.
[7]
原田 秀逸.
私の computer 環境
,
1998
.
[8]
Edsger W. Dijkstra,et al.
A Discipline of Programming
,
1976
.
[9]
A. Collins,et al.
Situated Cognition and the Culture of Learning
,
1989
.
[10]
Bertrand Meyer,et al.
Applying 'design by contract'
,
1992,
Computer.