Programming with miracles

  • Authors:
  • Rajeev Joshi

  • Affiliations:
  • Laboratory for Reliable Software, NASA Jet Propulsion Laboratory, Pasadena, CA

  • Venue:
  • IFM'10 Proceedings of the 8th international conference on Integrated formal methods
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

In his seminal book, A Discipline of Programming [EWD 76], Dijkstra proposed that all sequential programs satisfy four laws for their weakest preconditions. By far the catchiest name was reserved for the Law of the Excluded Miracle, which captured the intuition that, started in a given state, a program execution must either terminate or loop forever. In the late 1980s, both Nelson [GN 89] and Morgan [CCM 90] noted that the law was unnecessarily restrictive when writing programs to be used as specifications. In the years since, "miracles" have become a standard feature in specification languages (for instance, the assume statement in JML [LLP+00] and BoogiePL [DL 05]). What is perhaps surprising is that miracles are not as commonly used in programs written as implementations. This is surprising because for many everyday tasks, programming in a language with miracles is often far superior to the popular scripting languages that are used instead. In this talk, we build upon pioneering work by Burrows and Nelson [GN 05] who designed the language LIM ("Language of the Included Miracle"). We describe a language LIMe ("LIM with extensions"), and discuss its application in the context of flight software testing, including the analysis of spacecraft telemetry logs.