On the Proof of Correctness of a Calendar Program
Communications of the ACM 22 | , Vol 10: pp. 554-556
In the May, 1978 CACM, Matthew Geller published a paper titled Test Data as an Aid in Proving Program Correctness. He argued that there were some programs whose correctness is so hard to state formally that formally verifying them is useless because the specification is likely to be wrong. He gave as an example a program to compute the number of days between two dates in the same year, claiming that it would be hard to check the correctness of a precise statement of what it meant for the program to be correct. This paper proved him wrong. (It also makes the amusing observation that Geller’s solution is wrong because it fails for dates before the advent of the Gregorian calendar.) As a bonus, readers of this paper were alerted well in advance that the year 2000 is a leap year.
Copyright © 1979 by the Association for Computing Machinery, Inc.Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Publications Dept, ACM Inc., fax +1 (212) 869-0481, or [email protected]. The definitive version of this paper can be found at ACM's Digital Library --http://www.acm.org/dl/.