Abstract
We propose a semantic model based on multivalued logic for the study of conditional expressions in programming languages. This model allows one to distinguish between different types of observable errors, whereas the coarser 3-valued model considers only one type of undefined result.
We investigate the equational properties of this multivalued model. We present a finite equational basis for if-then-else, for the short-circuit operators +,·,−, and also for the fully-evaluated operators ⊕, ⊙.
Finally, we present formulas for the number of distinct n-ary functions that can be expressed as combinations of short-circuit or fully-evaluated operators.
Preview
Unable to display preview. Download preview PDF.
References
J. Berman, Free spectra of 3-element algebras, in: R. Freese and O. Garcia, eds. Universal Algebra and Lattice Theory, Lecture Notes in Mathematics 1004, (Springer, Berlin, 1983), pp. 10–53.
S. Burris and H.P. Sankappanavar, A Course in Universal Algebra, Graduate Texts in Mathematics 78 (Springer-Verlag, 1978).
John McCarthyA basis for a mathematical theory of computation, Computer Programming and Formal Systems, P. Braffort D. Hirschberg editors North Holland Publishing Company, 1963, pages 33–70
M. P. Cohn, Universal Algebra, Harper and Row, 1965.
Stephen L. Bloom and Ralph TindellVarieties of “if-then-else”, SIAM J. Comput. Vol. 12, No. 4, pp. 677–707 November 1983
D. Gries, The Science of Programming, Springer, New York, 1981.
Irène Guessarian and José MeseguerOn the axiomatization of “if-then-else” SIAM J. Comput Vol 16, No. 2, pp. 332–357 April 1987
Fernando Guzmán and Craig C. Squier; The algebra of conditional logic, Algebra Universalis, 27 (1990), pp. 88–110.
Fernando Guzman; Three-valued logics in the semantics of programming languages, Unpublished manuscript, March 1992.
Ernest G. ManesEquations for “if-then-else”, Proceedings Math. Found, of Programming Semantics, 7th international conference Pittsburgh, march 25–28, 1991 LNCS 598 pp. 446–456 Springer-Verlag, 1992
Ernest G. ManesAdas and the equational theory of if-then-else, Algebra Universalis, 30 (1993) pp. 272–394.
Alan H. Mekler and Evelyn M. Nelson; Equational bases for if-then-else, SIAM J. Comput. 16 (1987) pp. 465–485.
Emil L. Post, The two-valued iterative systems of mathematical logic, Annals of Math. Studies (5), Princeton University Press (1941).
J. Vuillemin, Correct and optimal implementation of recursion in a simple programming language, J. Comp. Systems Sci. 9 (1974), 332–354.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Billaud, M. (1996). Fatal errors in conditional expressions. In: Meyer, F., Monien, B. (eds) Automata, Languages and Programming. ICALP 1996. Lecture Notes in Computer Science, vol 1099. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61440-0_124
Download citation
DOI: https://doi.org/10.1007/3-540-61440-0_124
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61440-1
Online ISBN: 978-3-540-68580-7
eBook Packages: Springer Book Archive