arXiv:2611.06208cs.LONov 2026

Manuscript Offprint

arXiv:2611.06208

Executable Specifications in Transition Algebra

Daniel Găină, Adrián Riesco, Ionuţ Ţuţu

DANIEL GÄINÄ, Kyushu University, Japan

ADRIÁN RIESCO, Universidad Complutense de Madrid, Spain

IONUT TUTU, Simion Stoilow Institute of Mathematics of the Romanian Academy, Romania

Transition Algebra can be viewed as an extension of many-sorted first-order logic by borrowing essential features from dynamic logic. This leads us to new, more expressive sentences that include transitions labelled with actions, which are built from terms using union, composition, and iteration operators. We define a suitable notion of Horn clause, develop a system of proof rules for reasoning about clauses, and subsequently show that the proof system is sound and complete. We then introduce a rewriting relation based on Horn clauses, capturing transitions along established paths expressed as actions. This rewriting relation is naturally extended to a narrowing procedure for solving queries, thereby laying foundation for logic programming in Transition Algebra. As usual, soundness for both rewriting and narrowing is straightforward, whereas completeness requires additional conditions. Finally, we provide a prototype tool that demonstrates the practical aspects and shows the effectiveness of the proposed method.

CCS Concepts: • Theory of computation → Logic and verification; Equational logic and rewriting; Constraint and logic programming; Finite Model Theory.

Additional Key Words and Phrases: Transition algebra, Horn clause, rewriting, narrowing, calculi, tool support

1 Introduction

Motivation. As software systems become more complex and safety-critical, ensuring their correctness becomes not only desirable but essential. Subtle defects in such systems can lead to significant economic losses, security vulnerabilities, or even threats to human life, making rigorous verification a fundamental concern [8]. Traditional testing techniques, while valuable, are often insufficient to guarantee correctness across all possible scenarios [15]. Consequently, there is a growing need for specification languages that are sufficiently expressive to capture intricate system behaviours, yet executable so that models can be validated, simulated, and analyzed efficiently. Such languages bridge the gap between formal reasoning and practical validation, enabling early detection of inconsistencies and providing scalable mechanisms to assess system correctness. In this regard, a novel denotational semantics called Transition Algebra (TA) [27] was introduced for algebraic specification languages that are executable through rewriting. This semantics is defined by extending first-order logic with constructs inspired by dynamic logic [26], thereby enabling a more expressive and structured framework for describing state transitions. Within the new framework, TA supports actions, which are composed from binary relations using standard relational operators: union (∪), composition (⊆), and iteration (*). Moreover, the algebraic structure of TA can be easily extended further to include additional action operators (e.g., tests, converse, or parallel composition). To simplify the presentation and highlight the core ideas of the proposed method, this initial formulation focuses only on the original three relational operators. Another notable feature of TA is that it offers a rigorous foundation, in logical terms, for a core fragment of the Maude strategy language [16]. Maude [4] is a specification language that implements Rewriting Logic [34], and also a state-of-the-art and highly efficient tool for equational reasoning and term rewriting. The strategy language significantly enhances its expressive power by enabling fine-grained control over the application of transition rules—that is, the rules that govern how terms, representing system states, change through rewriting. By modelling strategies as algebraic constructs, TA offers a natural and uniform

Authors' Contact Information: Daniel Găină, daniel@imi.kyushu-u.ac.jp, Kyushu University, Fukuoka, Japan; Adrián Riesco, ariesco@fdi.ucm.es, Universidad Complutense de Madrid, Madrid, Spain; Ionut Tutu, ittutu@gmail.com, Simion Stoilow Institute of Mathematics of the Romanian Academy, Bucharest, Romania.

Gäinä, Riesco and Tutu

2

framework for reasoning about strategic control in rewriting systems. It is worth noting that iteration (*) significantly increases the expressive power of TA at the expense of other good properties such as compactness. For example, [28] establishes a categoricity property for TA, roughly showing that theories formulated in TA can control the cardinality of any of their models, including those of singular cardinality. This result holds under the Generalized Continuum Hypothesis and assuming the nonexistence of inaccessible cardinals.

Institutional approach. The formulation of TA adheres to the principles of institution theory [23], a general and abstract model-theoretic framework that formalizes the notion of a logical system through four key components: signatures, sentences, models, and a satisfaction relation between models and sentences. A cornerstone of this framework is the satisfaction condition, a fundamental requirement for supporting modularity and composability in logical systems. The satisfaction condition ensures that the truth of sentences is preserved under translations induced by signature morphisms—structure-preserving mappings between signatures that coherently translate syntax and reduce semantics. Much of the theoretical foundation of modern specification languages has been developed within the institutional framework [12, 13, 43], grounded in the principle that formal specification should be based on a well-defined underlying institution. Two prominent examples of specification languages that were explicitly designed following the institutional approach are CafeOBJ [14], developed in Japan, and CASL [1], developed in Europe. Both languages are built upon logical systems that have been rigorously formulated as institutions, ensuring strong support for modularity, compositionality, and interoperability between different logics. A notable exception to this institution-based design philosophy is the Maude system [4]. As mentioned above, Maude is based on Rewriting Logic [34], a framework which does not have, in full, an institutional formalization. As a result, the development of Maude has taken, in some respects, a different path from that of mainstream institution-theoretic approaches—particularly in areas such as modularization and logical heterogeneity [7].

Quantification. In [27], each signature is equipped with a separate set of plain, unstructured transition labels, which are interpreted in models as atomic transition relations. In contrast, the present work adopts a more minimalistic approach: the signatures are ordinary algebraic signatures, and we use terms both to denote elements in models and to form atomic transition labels. Concretely, given a term tt and a model A\mathfrak{A} defined over a signature Σ\Sigma, the interpretation tAt^{\mathfrak{A}} is an element of the carrier of A\mathfrak{A}, as in standard algebraic semantics. In addition to this, for every sort ss in Σ\Sigma, we associate tsAt_s^{\mathfrak{A}} with a binary transition relation on the carrier set As\mathfrak{A}_s; that is, tsA⊆As×Ast_s^{\mathfrak{A}} \subseteq \mathfrak{A}_s \times \mathfrak{A}_s. This dual semantic role of terms—as both elements and binary relations—enables a flexible treatment of transitions within the model-theoretic framework. This approach has a powerful consequence: it allows us to quantify over atomic transitions using ordinary first-order variables. This feature proves particularly useful in applications such as the formal specification of process calculi like Milner's Calculus of Communicating Systems (CCS) [38, 39], where the ability to abstract over transitions is essential. Effectively, this mechanism serves as a method of encoding second-order quantification (over transition relations) using first-order quantifiers. By avoiding the complexity of a second-order logic, we retain a simpler logical foundation while still enabling expressive reasoning about behaviours and interactions in concurrent systems.

Entailments. In the present work, we focus on defining a fragment of TA with good computational properties, making specifications written in this logical framework executable via rewriting and narrowing. To that end, we introduce a notion of Horn clause tailored to TA, which appears in two distinct forms: (a) equational, ∀X⋅ℓ=r\forall X \cdot \ell = r if HH, and (b) transitional, ∀X⋅τ(ℓ,r)\forall X \cdot \tau(\ell, r) if HH, where ℓ\ell and rr are terms with variables from XX, τ\tau is also a term with variables from XX representing a transition label, and HH is a set of conditions consisting of equations and transitions along actions.

Importantly, for transitional clauses, the head τ(ℓ,r)\tau(\ell, r) needs to be atomic, meaning that τ\tau is not constructed from any other actions using operators such as union, composition, or iteration. This differs from the approach taken by systems such as Maude and CafeOBJ. The latter does not take into account labelled transitions, whereas the former admits them, but does not support explicit references to labels in conditions. In contrast, in TA, the use of labelled atomic transitions is unconstrained, as they can occur anywhere in clauses. Moreover, the framework allows the conditions in HH to include actions that are arbitrarily complex and not necessarily atomic. That is a key feature of our approach, allowing more expressive and flexible specifications. We define a system of proof rules for reasoning about clauses in TA, and we establish that the resulting entailment system is both sound and complete. Notably, our completeness proof does not rely on the use of a cut rule. This means that properties of systems specified by clauses in TA can be proved without requiring the discovery of intermediate results—a process often referred to as lemma discovery in the formal-methods community. However, permitting arbitrary actions in the conditions of clauses introduces a distinctive challenge: to establish the validity of a clause, it may be necessary to reason beyond the space of clauses themselves. This requirement compels us to go beyond traditional clause-based reasoning techniques, leading to both theoretical insights and practical consequences for the design of executable specification languages. As a result, the completeness theorem established in this work departs significantly from those found in earlier approaches (e.g., [6, 19, 20]) where clause conditions are restricted to simpler forms, typically limited to equations or plain relations.

Rewriting. The rewrite rules we employ in TA are derived from general Horn clauses by imposing restrictions on the occurrences of variables in order to ensure that the rules are executable—that is, to ensure that rules can be applied in rewriting and narrowing steps. We distinguish between two kinds of rewrite rules: (a) equational rewrite rules of the form ∀X⋅ℓ=r\forall X \cdot \ell = r if HH, where the set of variables in the right-hand side is restricted by the condition var(r)⊆var(ℓ)∪var(H)\text{var}(r) \subseteq \text{var}(\ell) \cup \text{var}(H), and (b) transitional rewrite rules of the form ∀X⋅τ(ℓ,r)\forall X \cdot \tau(\ell, r) if HH, with a similar restriction: var(r)⊆var(ℓ)∪var(τ)∪var(H)\text{var}(r) \subseteq \text{var}(\ell) \cup \text{var}(\tau) \cup \text{var}(H). In both cases, the hypothesis HH is a finite set of equations and transitions, which act as side conditions that must be satisfied for the rule to be applied. These conditions, while not themselves rewrite rules, may include complex compositions of actions and thus require their own operational semantics. To manage this, we proceed in two stages.

First, we define a rewriting relation on sets of conditions. To that end, it is more convenient to regard those sets of conditions as goals GG that are meant to be proved by rewriting, where proving a goal amounts to rewriting it to the empty set (meaning that all the conditions get discharged). This preliminary definition is intentionally broad: to prove GG we may need to apply other rewrite rules, which may be conditional; unlike term rewriting, for goal rewriting we do not check the conditions of rules straight away; instead, we add them to GG so that they are checked at some point during rewriting. Moreover, we do not commit to a specific mechanism for computing matching substitutions, nor do we assume that the matches are unique. The purpose, at this stage, is to develop a framework for rewriting that is as general as possible, independent of any particular computational strategy.

Second, we define term rewriting using equational rewrite rules and, separately, term transitions using transitional rewrite rules. The latter captures the idea of rewriting along a path described by an action, thereby giving an operational interpretation to transitions in the system. This separation clarifies how terms transition in response to rules and how side conditions are validated through structured rewriting. Within this framework, we establish a completeness result for rewriting, thus ensuring that a goal GG follows (semantically) from a set Γ\Gamma of clauses only if GG can be operationally reduced to the empty set through a sequence of rewriting steps. In symbols, Γ⊨G\Gamma \models G implies G→∼∅G \xrightarrow{\sim} \emptyset. This result bridges

Gäinä, Riesco and Tuutu

4

the gap between the model-theoretic semantics of TA and its operational semantics defined via rewriting. To achieve it, the set of rules needs to satisfy two key assumptions:

  • Confluence of equational rewriting rules. This guarantees the consistency and determinism of computations based on equational reasoning. Confluence together with termination are crucial for ensuring that the rewriting of terms with respect to equational rules yields unique normal forms, irrespective of the rewriting path taken.
  • Coherence of transitional rewrite rules. This property ensures that the interaction between equational and transitional reasoning behaves uniformly, i.e., the application of transitional rules respects the structure induced by equational rewriting. Coherence avoids discrepancies between the logical entailment of transitions and their realizability via rewriting sequences.

Narrowing. The definition of narrowing can be obtained directly from rewriting by replacing matching with unification. We use the same rewrite rules as those used for rewriting, without restricting ourselves to unconditional transitional rewrite rules. We consider queries defined as existentially quantified goals, revisit the classical notion of solution to a query, and propose a suitable narrowing relation. In this setting, we show that a query ∃X⋅Q\exists X \cdot Q is satisfiable with respect to a set Γ\Gamma of clauses, meaning that there exists a substitution θ\theta such that QθQ\theta follows from Γ\Gamma, if and only if ∃X⋅Q\exists X \cdot Q can be reduced to a trivial query of the form ∃X′⋅∅\exists X' \cdot \emptyset through a sequence of narrowing steps that 'compute' θ\theta (or another suitable substitution that is more general than θ\theta). In symbols, Γ⊨Qθ\Gamma \models Q\theta if and only if ∃X⋅Q↠ψ∃X′⋅∅\exists X \cdot Q \twoheadrightarrow_{\psi} \exists X' \cdot \emptyset for some substitutions ψ\psi and δ\delta such that θ=ψ⋄δ\theta = \psi \diamond \delta. The completeness of narrowing holds under similar conditions as those required for the completeness of rewriting: we need confluence, coherence, and also an additional termination requirement for goal rewriting.

To the best of our knowledge, the standard narrowing algorithm implemented in Maude 3.5 operates over rewrite theories that use only unconditional rules. This provides a solid foundation for equational reasoning and symbolic execution, but it limits the expressiveness of the rewrite theories that the system can handle. To address this limitation, the framework has been extended in recent work to support rewrite theories with conditional rules, allowing more complex computational behaviours to be modeled directly. Notably, Meseguer [35] and López-Rueda et al. [31] extended the standard narrowing algorithm with conditional rules that consist of SMT constraints, thereby broadening the scope of symbolic reasoning in Maude. Roughly, the conditional rules include quantifier-free first-order formulae. This extension significantly enhances the expressiveness of the framework, enabling the formal specification and analysis of systems with rich logical constraints within the narrowing-based symbolic reasoning paradigm [17, 18, 36, 44]. The narrowing relation proposed in this paper also supports unrestricted transitional rewrite rules, allowing for greater flexibility in the kinds of rewrite theories it can handle. However, we achieve that flexibility entirely within the scope of Transition Algebra, meaning that, instead of SMT constraints we use plain TA conditions that get solved by rewriting or narrowing, thus avoiding calls to external SMT solvers.

Theorem proving. In [28], we showed that TA is sufficiently expressive to control the cardinality of its own models. In particular, TA can naturally model both reachable and finite systems, two classes of structures that frequently arise in computer science. In this paper, we propose a verification method for proving properties of such models. The method is based on TA clauses and employs rewriting and narrowing techniques to discharge proof obligations. We illustrate the approach through two case studies: the natural numbers and the integers modulo a natural number. Although simple, these examples are particularly instructive, as they highlight both the strengths and the limitations of our framework. On the one hand, the method provides a high degree of automation in the verification process. On the other hand, the expressiveness and non-compactness of the underlying logical system entail certain inherent challenges, such as the necessity of employing the cut rule when reasoning about properties formalized by employing the transitive closures of relations despite the fact that completeness does not require the cut rule. This apparent contradiction arises from the fact that we employ infinitary proof rules, that is, proof rules with infinitely many premises. Such rules cannot, in general, be applied by a purely mechanical proof search procedure and must instead be justified by inductive arguments. Consequently, while our framework admits a highly automated treatment of many verification tasks through rewriting and narrowing, inductive reasoning remains indispensable for establishing the soundness of certain proof steps and for handling properties involving transitive closure. In this sense, the need for the cut rule should not be viewed as a deficiency of the method, but rather as a reflection of the intrinsic complexity of reasoning in a highly expressive setting, where finite proof objects are required to capture computational behaviours, possibly infinite.

Tool support. We have implemented a tool prototype for writing Transition Algebra specifications, reducing terms, checking transitions, and solving queries. This was made possible by SpeX [45], which is both a heterogeneous logical environment and a collection of Maude libraries that facilitate the development of new specification languages. We also took advantage of the fact that Rewriting Logic is reflective [5], and that Maude supports meta-level computations where modules and terms can be used as standard data. Thus it has been possible to define a dedicated syntax for TA specifications, to parse specifications, transform them into internal Maude representations, and then use those representations to reduce terms and solve queries. It is worth noting, however, that both the sentences and the execution mechanisms of Rewriting Logic and Transition Algebra are different, hence no direct translation is possible. For that reason, the tool that we have developed builds on the features provided by Maude to obtain specially designed resolution procedures for Transition Algebra, in line with the theoretical foundations described in the following sections.

Finally, we have worked in detail a medium-sized case study on process algebra in order to assess the effectiveness of both the logical framework and of the tool. We have conducted the case study at two levels of abstraction. First, at a more general level, we have developed a thorough TA specification of CCS; this showcases the expressiveness of TA, as it allows us to capture the operational semantics of CCS with minimal conceptual and notational overhead. Second, at a more particular level, building on the TA specification of CCS, we have given a formalization of the MapReduce programming model [9], and then we have checked that an instance of it is correct using narrowing; this demonstrates the potential of the TA framework for formal reasoning.

Organization of the paper. The rest of the paper is structured as follows: Section 2 presents Transition Algebra. Some preliminary concepts required to understand the rest of the paper are described in Section 3. Section 4 discusses conditions to ensure completeness of the proof rules for reasoning about queries. Sections 5 and 6 are devoted to the operational semantics, while Sections 7 and 8 discuss completeness. Section 9 demonstrates the expressiveness of TA by presenting methods for modeling reachability and finiteness, as well as verification techniques for ensuring the correctness of reachable and finite systems. Section 10 presents the tool support developed for Transition Algebra and an important case study from the domain of concurrent and distributed systems, namely MapReduce, a widely used framework for processing large datasets across distributed computing infrastructures. In Section 11, we present our conclusions and outline several directions for future work.