Equational bases for if-then-else
SIAM Journal on Computing
Journal of the ACM (JACM)
ACM Transactions on Computational Logic (TOCL)
Hi-index | 0.00 |
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.