Skip to main content

Fatal errors in conditional expressions

Extended abstract

  • Session 3: Logic and Algebra
  • Conference paper
  • First Online:
Automata, Languages and Programming (ICALP 1996)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1099))

Included in the following conference series:

  • 140 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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.

    Google Scholar 

  2. S. Burris and H.P. Sankappanavar, A Course in Universal Algebra, Graduate Texts in Mathematics 78 (Springer-Verlag, 1978).

    Google Scholar 

  3. 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

    Google Scholar 

  4. M. P. Cohn, Universal Algebra, Harper and Row, 1965.

    Google Scholar 

  5. Stephen L. Bloom and Ralph TindellVarieties of “if-then-else”, SIAM J. Comput. Vol. 12, No. 4, pp. 677–707 November 1983

    Google Scholar 

  6. D. Gries, The Science of Programming, Springer, New York, 1981.

    Google Scholar 

  7. Irène Guessarian and José MeseguerOn the axiomatization of “if-then-else” SIAM J. Comput Vol 16, No. 2, pp. 332–357 April 1987

    Google Scholar 

  8. Fernando Guzmán and Craig C. Squier; The algebra of conditional logic, Algebra Universalis, 27 (1990), pp. 88–110.

    Google Scholar 

  9. Fernando Guzman; Three-valued logics in the semantics of programming languages, Unpublished manuscript, March 1992.

    Google Scholar 

  10. 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

    Google Scholar 

  11. Ernest G. ManesAdas and the equational theory of if-then-else, Algebra Universalis, 30 (1993) pp. 272–394.

    Google Scholar 

  12. Alan H. Mekler and Evelyn M. Nelson; Equational bases for if-then-else, SIAM J. Comput. 16 (1987) pp. 465–485.

    Google Scholar 

  13. Emil L. Post, The two-valued iterative systems of mathematical logic, Annals of Math. Studies (5), Princeton University Press (1941).

    Google Scholar 

  14. J. Vuillemin, Correct and optimal implementation of recursion in a simple programming language, J. Comp. Systems Sci. 9 (1974), 332–354.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Friedhelm Meyer Burkhard Monien

Rights and permissions

Reprints 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

Publish with us

Policies and ethics