Completeness for Two Left-Sequential Logics
Left-sequential logics provide a means for reasoning about (closed) propositional terms with atomic propositions that may have side effects and that are evaluated sequentially from left to right. Such propositional terms are commonly used in programming languages to direct the flow of a program. In this thesis we explore two such left-sequential logics. First we discuss Fully Evaluated Left-Sequential Logic, which employs a full evaluation strategy, i.e., to evaluate a term every one of its atomic propositions is evaluated causing its possible side effects to occur. We then turn to Short-Circuit (Left-Sequential) Logic as presented in [BP10b], where the evaluation may be ‘short-circuited’, thus preventing some, if not all, of the atomic propositions in a term being evaluated. We propose evaluation trees as a natural semantics for both logics and provide axiomatizations for the least identifying variant of each. From this, we define a logic with connectives that prescribe a full evaluation strategy as well as connectives that prescribe a short-circuit evaluation strategy.
💡 Research Summary
The paper addresses a gap in formal reasoning about propositional expressions that involve side‑effects and are evaluated sequentially from left to right, a pattern that is ubiquitous in modern programming languages (e.g., the &&, ||, and ?: operators). To capture this phenomenon, the author introduces two left‑sequential logics: Fully Evaluated Left‑Sequential Logic (FEL) and Short‑Circuit Left‑Sequential Logic (SCL). Both logics share the same syntactic grammar—atomic propositions, negation, conjunction, and disjunction—but they differ fundamentally in their evaluation strategies.
In FEL every atomic proposition occurring in a formula is guaranteed to be evaluated exactly once, regardless of the truth values of other sub‑formulas. Consequently, all side‑effects encoded in the atomic propositions are always realized. The semantics of FEL is given by “evaluation trees”. An evaluation tree is a rooted binary tree whose internal nodes are logical connectives and whose leaves are atomic propositions. A pre‑order traversal of the tree corresponds to the left‑to‑right execution order, and because the traversal never prunes any branch, the tree records a complete execution trace.
SCL, by contrast, models the familiar short‑circuit behaviour: in a conjunction p ∧ q the evaluation of q is skipped if p evaluates to false; in a disjunction p ∨ q the evaluation of q is skipped if p evaluates to true. The same evaluation‑tree framework is reused, but now the tree is equipped with a pruning operation. When a node’s value determines the overall result, the subtree beneath that node is cut off, faithfully representing the omission of side‑effects that would have occurred in a real program.
A central technical contribution is the definition of the “least identifying variant” for each logic. This variant is the coarsest equivalence relation on formulas that still respects the evaluation‑tree semantics. For both FEL and SCL the author presents a complete axiomatization (A_FEL and A_SCL respectively) that captures exactly this equivalence. The axioms include the usual Boolean laws (double negation, commutativity, associativity, distributivity) together with strategy‑specific principles. For example, FEL validates the standard distributive law p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r), whereas SCL requires a modified law that accounts for short‑circuiting, such as p ∧ (q ∨ r) ≡ (p ∧ q) ∨ r, because when p is false the right‑hand disjunct r may still be evaluated.
The completeness proofs proceed in two stages. First, any formula of either logic can be transformed into a normal form that directly corresponds to a canonical evaluation tree. This transformation is achieved by a set of rewrite rules that are themselves justified by the axioms. Second, the author shows that two normal‑form formulas are equivalent under the evaluation‑tree semantics if and only if their trees are isomorphic. An explicit tree‑isomorphism decision procedure is described, and each elementary tree manipulation is shown to be derivable from the axioms. Together these steps establish both soundness (axioms preserve tree equivalence) and completeness (tree equivalence can be derived from the axioms) for FEL and SCL.
Beyond the two individual logics, the paper proposes a combined logic that incorporates both a “full‑evaluation connective” (often denoted ⨀) and a “short‑circuit connective” (denoted ⟂). This enriched language allows programmers or language designers to annotate sub‑expressions with the desired evaluation strategy, enabling fine‑grained control over side‑effects while still benefiting from a unified formal theory.
In the related‑work discussion, the author positions this contribution against earlier sequential logics that either ignored side‑effects or treated evaluation as a purely parallel process. By grounding both strategies in a single, tree‑based semantics and by delivering a least‑identifying axiomatization together with rigorous completeness results, the paper provides a solid theoretical foundation for static analysis tools, compiler optimizations, and formal verification frameworks that must reason about the exact order of side‑effect execution. The work thus bridges a notable gap between abstract logical reasoning and the concrete operational behaviour of real‑world programming languages.