Propositional logic with short-circuit evaluation: a non-commutative and a commutative variant
Jan A. Bergstra, Alban Ponse, Daan J.C. Staudt

TL;DR
This paper explores different logical systems modeling short-circuit evaluation in programming, analyzing their axioms, semantics, and the effects of side effects and commutativity.
Contribution
It introduces and relates several short-circuit logics, providing axiomatizations and semantics for each, including non-commutative and commutative variants.
Findings
FSCL characterizes atomic side effects in evaluation.
MSCL models sequential evaluation with memorized results.
SSCL incorporates commutative sequential connectives.
Abstract
Short-circuit evaluation denotes the semantics of propositional connectives in which the second argument is evaluated only if the first argument does not suffice to determine the value of the expression. Short-circuit evaluation is widely used in programming, with sequential conjunction and disjunction as primitive connectives. We study the question which logical laws axiomatize short-circuit evaluation under the following assumptions: compound statements are evaluated from left to right, each atom (propositional variable) evaluates to either true or false, and atomic evaluations can cause a side effect. The answer to this question depends on the kind of atomic side effects that can occur and leads to different "short-circuit logics". The basic case is FSCL (free short-circuit logic), which characterizes the setting in which each atomic evaluation can cause a side effect. We recall…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
