[Paper Review] On Hoare-McCarthy algebras
This paper introduces Hoare-McCarthy algebras (HMAs) as a novel algebraic semantics for propositional logic with side effects, using Hoare's conditional connective $x\triangleleft y\triangleright z$ as the sole primitive. It establishes that HMAs directly characterize valuation congruences without relying on intermediate valuation equivalences, and proves that the equational theory $\text{CP}_K$ is complete for each congruence $=_{K}$, where $K$ ranges over free, repetition-proof, contractive, weakly memorizing, memorizing, and static semantics.
We discuss an algebraic approach to propositional logic with side effects. To this end, we use 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 and we introduce Hoare-McCarthy algebras as the structures that characterize these congruences.
Motivation & Objective
- To develop a new semantic framework for propositional logic with side effects that captures evaluation order and side effects systematically.
- To address the limitation of valuation algebra (VA) semantics, which requires defining valuation equivalence before deriving congruence, by introducing a direct semantics via HMAs.
- To provide complete equational axiomatizations for multiple valuation congruences—free, repetition-proof, contractive, weakly memorizing, memorizing, and static—using the conditional connective as primitive.
- To clarify the relationship between different congruences and show that HMAs naturally support the construction of congruences without intermediate equivalence relations.
Proposed method
- Define Hoare-McCarthy algebras (HMAs) as algebraic structures equipped with a ternary operation $x\triangleleft y\triangleright z$ representing Hoare's conditional, satisfying axioms from [8] (CP1–CP4).
- Introduce a valuation congruence $=_{K}$ directly via HMA semantics, bypassing the need to first define a valuation equivalence $\equiv_{K}$, unlike in prior VA-based approaches.
- Establish that for each congruence type $K \in \{fr, rp, cr, wm, mem, st\}$, the equational theory $\text{CP}_K$ is complete: $\text{CP}_K \vdash t = t'$ if and only if $t =_K t'$.
- Use the HMA framework to compare with VA-based semantics, showing that HMA semantics imposes stronger constraints on valuation transformations, e.g., $a \bullet s = s$ for static congruence.
- Analyze the expressive power of binary connectives (e.g., left-sequential conjunction $x~{}\mathbin{\text{\textasciibreve{\textbackslash}}\textbackslashwedge}~{}y = y\triangleleft x\triangleright F$) under different congruences, showing they can express the conditional only modulo $=_{mem}$ or $=_{st}$.
- Investigate the definability of memorizing semantics via weakened axioms, comparing HMA conditions with VA-based axioms to assess whether $\text{CP}_K$ remains complete under such modifications.
Experimental results
Research questions
- RQ1Can a direct algebraic semantics for propositional logic with side effects be constructed without first defining valuation equivalence?
- RQ2Is the equational theory $\text{CP}_K$ complete for each valuation congruence $=_{K}$, where $K$ denotes free, repetition-proof, contractive, weakly memorizing, memorizing, or static semantics?
- RQ3How do the valuation transformation rules in HMA semantics differ from those in valuation algebras (VAs), particularly in the case of static and memorizing congruences?
- RQ4Can the conditional connective be expressed using only binary connectives under different congruences, and if so, under which congruences is this possible?
- RQ5Is the class of memorizing semantics definable via weakened axioms in the HMA framework, and how does this compare to the VA-based characterization?
Key findings
- Hoare-McCarthy algebras (HMAs) provide a direct and elegant semantics for propositional logic with side effects, where valuation congruences are defined directly via algebraic structure, avoiding the need for intermediate valuation equivalence relations.
- For each congruence type $K \in \{fr, rp, cr, wm, mem, st\}$, the equational theory $\text{CP}_K$ is complete: $\text{CP}_K \vdash t = t'$ if and only if $t =_K t'$, establishing full axiomatization for each semantics.
- The HMA semantics reveals a stronger constraint on valuation transformation than VA semantics: for static congruence, $a \bullet s = s$ holds universally, whereas in VA semantics, the condition $a \mathbf{!} (b \bullet s) = a \mathbf{!} s$ is required only for $a \neq b$.
- The conditional connective $x\triangleleft y\triangleright z$ cannot be expressed using only binary connectives modulo $=_{cr}$, but it can be expressed modulo $=_{mem}$ and $=_{st}$, showing a hierarchy of expressiveness.
- The paper refutes certain alternative axiomatizations (e.g., $\text{CP} + \{T\triangleleft x\triangleright T = T\}$) by showing they are inconsistent with the TRS (term rewriting system) semantics, highlighting the necessity of the original CP axioms.
- The HMA framework clarifies that the memorizing semantics, which tracks evaluation history, is not definable by weakening the axioms of the SPAs (sequential valuation algebras) to equations (19) and (20), indicating a deeper structural distinction between VA and HMA semantics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.