Specificational functions

Citation
Jm. Morris et A. Bunkenburg, Specificational functions, ACM T PROGR, 21(3), 1999, pp. 677-701
Citations number
27
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS
ISSN journal
01640925 → ACNP
Volume
21
Issue
3
Year of publication
1999
Pages
677 - 701
Database
ISI
SICI code
0164-0925(199905)21:3<677:SF>2.0.ZU;2-D
Abstract
Mathematics supplies us with various operators for creating functions from relations, sets, known functions, and so on. Function inversion is a simple example. These operations are useful in specifying programs. However, many of them have strong constraints on their arguments to ensure that the resu lt is indeed a function. For example, only functions that are bijective may be inverted. This is a serious impediment to their use in specifications, because at best it limits the specifier's expressive power, and at worst it imposes strong proof obligations on the programmer. We propose to loosen t he definition of functions so that the constraints on operations such as in version can be greatly relaxed. The specificational functions that emerge g eneralize traditional functions in that their application to some arguments may yield no good outcome, while for other arguments their application may yield any of several outcomes unpredictably. While these functions are not in general algorithmic, they can serve as specifications of traditional fu nctions as embodied in programming languages. The idea of specificational f unctions is not new, but accommodating them in all their generality without falling foul of a myriad of anomalies has proved elusive. We investigate t he technical problems that have hindered their use, and propose solutions. In particular, we develop a formal axiomatization for reasoning about speci ficational functions, and we prove its consistency by constructing a model.