Skip to main content

Proposition Algebra and Short-Circuit Logic

  • Conference paper

Part of the Lecture Notes in Computer Science book series (LNPSE,volume 7141)

Abstract

Short-circuit evaluation denotes the semantics of propositional connectives in which the second argument is only evaluated if the first argument does not suffice to determine the value of the expression. In programming, short-circuit evaluation is widely used.

We review proposition algebra [2010], an algebraic approach to propositional logic with side effects that models short-circuit evaluation. Proposition algebra is based on Hoare’s conditional [1985], which is a ternary connective comparable to if-then-else. Starting from McCarthy’s notion of sequential evaluation [1963] we discuss a number of valuation congruences on propositional statements and we introduce Hoare-McCarthy algebras as the structures that model these congruences. We also briefly discuss the associated short-circuit logics, i.e., the logics that define these congruences if one restricts to sequential binary connectives.

Keywords

  • Conditional composition
  • reactive valuation
  • sequential connective
  • short-circuit evaluation
  • side effect

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (Canada)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bergstra, J.A., Bethke, I., Rodenburg, P.H.: A propositional logic with 4 values: true, false, divergent and meaningless. Journal of Applied Non-Classical Logics 5(2), 199–218 (1995)

    MathSciNet  MATH  Google Scholar 

  2. Bergstra, J.A., Heering, J., Klint, P.: Module algebra. Journal of the ACM 37(2), 335–372 (1990)

    CrossRef  MathSciNet  MATH  Google Scholar 

  3. Bergstra, J.A., Middelburg, C.A.: Instruction sequence processing operators (2009), http://arxiv.org/:ArXiv:0910.5564v2 [cs.LO]

  4. Bergstra, J.A., Ponse, A.: Proposition algebra. ACM Transactions on Computational Logic 12(3), Article 21 (36 pages) (2011)

    Google Scholar 

  5. Bergstra, J.A., Ponse, A.: Short-circuit logic (2010/2011), http://arxiv.org/abs/1012.3674v3 [cs.LO]

  6. Bergstra, J.A., Ponse, A.: On Hoare-McCarthy algebras (2010), http://arxiv.org/abs/1012.5059v1 [cs.LO]

  7. Bloom, S.L., Tindell, R.: Varieties of “if-then-else”. SIAM Journal of Computing 12(4), 677–707 (1983)

    CrossRef  MathSciNet  MATH  Google Scholar 

  8. Mekler, A.H., Nelson, E.M.: Equational bases for if-then-else. SIAM Journal of Computing 16(3), 465–485 (1987)

    CrossRef  MathSciNet  MATH  Google Scholar 

  9. Hoare, C.A.R.: A couple of novelties in the propositional calculus. Zeitschrift für Mathematische Logik und Grundlagen der Mathematik 31(2), 173–178 (1985)

    CrossRef  MathSciNet  MATH  Google Scholar 

  10. Regenboog, B.C.: Reactive valuations. MSc. thesis Logic, University of Amsterdam. December 2010, http://arxiv.org/abs/1101.3132v1 [cs.LO] (2011)

  11. Sioson, F.M.: Equational bases of Boolean algebras. Journal of Symbolic Logic 29(3), 115–124 (1964)

    CrossRef  MathSciNet  MATH  Google Scholar 

  12. Terese. Term Rewriting Systems. Cambridge Tracts in Theoretical Computer Science, vol. 55. Cambridge University Press (2003)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bergstra, J.A., Ponse, A. (2012). Proposition Algebra and Short-Circuit Logic. In: Arbab, F., Sirjani, M. (eds) Fundamentals of Software Engineering. FSEN 2011. Lecture Notes in Computer Science, vol 7141. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-29320-7_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-29320-7_2

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-29319-1

  • Online ISBN: 978-3-642-29320-7

  • eBook Packages: Computer ScienceComputer Science (R0)