“Whoa! It’s like Spotify but for academic articles.”

Instant Access to Thousands of Journals for just $40/month

Try 2 weeks free now

On the proof of correctness of a calendar program

Programming Languages J.J. Horning Editor On the Proof of Correctness of a Calendar Program Leslie Lamport SRI International A formal specification is given for a simple calendar program, and the derivation and proof of correctness of the program are sketched. The specification is easy to understand, and its correctness is manifest to humans. Key Words and Phrases: program specification, program verification, inductive assertions CR Category: 5.24 Introduction In [1], Geller introduced a method for proving the correctness of a program based upon the concept of test data, and illustrated it with a simple calendar program. The program accepts as input a pair of dates in the same year, and computes the number of days between those dates. Geller presented two proofs for this program: one using his method, the other using the customary inductive assertion method. He made the following valid criticism of the assertional proof: We also have less confidence in the proof that our output assertion actually ensures that the program computes values that correspond with the way real calendars behave. The formal specific a t i o n . . , could easily be off by a constant of 1 or 2. The example of http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png Communications of the ACM Association for Computing Machinery

Loading next page...

You’re reading a free preview. Subscribe to read the entire article.

DeepDyve is your
personal research library

It’s your single place to instantly
discover and read the research
that matters to you.

Enjoy unlimited access and
personalized recommendations from
over 12 million articles from more than
10,000 peer-reviewed journals.

All for just $40/month

Try 2 weeks free now

Explore the DeepDyve Library

How DeepDyve Works

Spend time researching, not time worrying you’re buying articles that might not be useful.

Unlimited reading

Read as many articles as you need. Full articles with original layout, charts and figures. Read online, from anywhere.

Stay up to date

Keep up with your field with Personalized Recommendations and Follow Journals to get automatic updates.

Organize your research

It’s easy to organize your research with our built-in tools.

Your journals are on DeepDyve

Read from thousands of the leading scholarly journals from Springer, Elsevier, Nature, IEEE, Wiley-Blackwell and more.

All the latest content is available, no embargo periods.

See the journals in your area

Simple and Affordable Pricing

14-day free trial. Cancel anytime, with a 30-day money-back guarantee.

Monthly Plan

  • Read unlimited articles
  • Personalized recommendations
  • Print 20 pages per month
  • 20% off on PDF purchases
  • Organize your research
  • Get updates on your journals and topic searches


Best Deal — 25% off

Annual Plan

  • All the features of the Professional Plan, but for 25% off!
  • For the normal price of 10 articles elsewhere, you get one full year of unlimited access to articles.

billed annually