Completeness and Incompleteness of Synchronous Kleene Algebra
Jana Wagemaker, Marcello Bonsangue, Tobias Kapp\'e, Jurriaan Rot,, Alexandra Silva

TL;DR
This paper investigates the completeness of Synchronous Kleene algebra (SKA), identifies its limitations, and proposes an alternative axiomatization that is both sound and complete with respect to language semantics.
Contribution
It demonstrates the incompleteness of existing SKA axioms and introduces a new set of axioms based on Salomaa's regular language axiomatization.
Findings
Identified a counterexample showing SKA axioms are incomplete.
Proposed an alternative axiomatization for SKA.
Proved the new axioms are sound and complete.
Abstract
Synchronous Kleene algebra (SKA), an extension of Kleene algebra (KA), was proposed by Prisacariu as a tool for reasoning about programs that may execute synchronously, i.e., in lock-step. We provide a countermodel witnessing that the axioms of SKA are incomplete w.r.t. its language semantics, by exploiting a lack of interaction between the synchronous product operator and the Kleene star. We then propose an alternative set of axioms for SKA, based on Salomaa's axiomatisation of regular languages, and show that these provide a sound and complete characterisation w.r.t. the original language semantics.
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.
\WarningFilter
latexfontFont shape \WarningFilterlatexfontSome font shapes were not available \WarningFilterthmtoolsLLNCS support disables automatic casing \WarningFilterremresetThe remreset package is obsolete
11institutetext: University College London, London, United Kingdom 22institutetext: Leiden University, Leiden, The Netherlands 33institutetext: Radboud University, Nijmegen, The Netherlands
Completeness and Incompleteness of Synchronous Kleene Algebra††thanks: This work was partially supported by ERC Starting Grant ProFoundNet (679127), a Leverhulme Prize (PLP–2016–129) and a Marie Curie Fellowship (795119).
The first author conducted part of this work at Centrum Wiskunde & Informatica, Amsterdam.
Jana Wagemaker 11
Marcello Bonsangue 22
Tobias Kappé 11
Jurriaan Rot 1133
Alexandra Silva 11
Abstract
Synchronous Kleene algebra (SKA), an extension of Kleene algebra (KA), was proposed by Prisacariu as a tool for reasoning about programs that may execute synchronously, i.e., in lock-step. We provide a countermodel witnessing that the axioms of SKA are incomplete w.r.t. its language semantics, by exploiting a lack of interaction between the synchronous product operator and the Kleene star. We then propose an alternative set of axioms for SKA, based on Salomaa’s axiomatisation of regular languages, and show that these provide a sound and complete characterisation w.r.t. the original language semantics.
1 Introduction
Kleene algebra (KA) is applied in various contexts, such as relational algebra and automata theory. An important use of KA is as a logic of programs. This is because the axioms of KA correspond well to properties expected of sequential program composition, and hence they provide a logic for reasoning about control flow of sequential programs presented as Kleene algebra expressions. Regular languages then provide a canonical semantics for programs expressed in Kleene algebra, due to a tight connection between regular languages and the axioms of KA: an equation is provable using the Kleene algebra axioms if and only if the corresponding regular languages coincide [5, 19, 16].
In [22], Prisacariu proposes an extension of Kleene algebra, called synchronous Kleene algebra (SKA). The aim was to introduce an algebra useful for studying not only sequential programs but also synchronous concurrent programs. Here, synchrony is understood as in Milner’s SCCS [21], i.e., each program executes a single action instantaneously at each discrete time step. Hence, the synchrony paradigm assumes that basic actions execute in one unit of time and that at each time step, all components capable of acting will do so. This model permits a synchronous product operator, which yields a program that, at each time step, executes some combination of the actions put forth by the operand programs.
This new operator is governed by various expected axioms such as associativity and commutativity. Another axiom describes the interaction between the synchronous product and the sequential product, capturing the intended lock-step behaviour. Crucially, the axioms do not entail certain equations that relate the Kleene star (used to describe loops) and the synchronous product.
The contributions of this paper are twofold. First, we show that the lack of connection between the Kleene star and the synchronous product is problematic. In particular, we exploit this fact to devise a countermodel that violates a semantically valid equation, thus showing that the SKA axioms are incomplete w.r.t. the language semantics. This invalidates the completeness result in [22].
The second and main contribution of this paper is a sound and complete characterisation of the equational theory of SKA in terms of a generalisation of regular languages. The key difference with [22] is the shift from least fixpoint axioms in the style of Kozen [16] to a unique fixpoint axiom in the style of Salomaa [24]. In the completeness proof, we give a reduction to the completeness result of Salomaa via a normal form for SKA expressions. As a by-product, we get a proof of the correctness of the partial derivatives for SKA provided in [7].
This paper is organised as follows. In Section 2 we discuss the necessary preliminaries. In Section 3 we discuss SKA as presented in [22]. Next, in Section 4, we demonstrate why SKA is incomplete, and in Section 5 go on to provide a new set of axioms, which we call . The latter section also includes basic results about the partial derivatives for SKA from [7]. In Section 6 we provide an algebraic characterisation of -terms; this characterisation is used in Section 7, where we prove completeness of w.r.t. to its language model. In Section 8 we consider related work and conclude by discussing directions for future work in Section 9. For the sake of readability, some of the proofs appear in the appendix.
2 Preliminaries
Throughout this paper, we write for the two-element set .
Languages
Throughout the paper we fix a finite alphabet . A word formed over is a finite sequence of symbols from . The empty word is denoted by . We write for the set of all words over . Concatenation of words is denoted by . A language is a set of words. For , we define
[TABLE]
where and .
Kleene Algebra
We define a Kleene algebra [16] as a tuple where is a set, ∗ is a unary operator, and are binary operators and [math] and are constants. Moreover, for all the following axioms are satisfied:
[TABLE]
Additionally, we write as a shorthand for , and require that the least fixpoint axioms [16] hold, which stipulate that for we have {mathpar} e + f ⋅g ≤g ⟹f^* ⋅e ≤g e + f ⋅g ≤f ⟹e ⋅g^* ≤f
The set of regular expressions, denoted , is described by the grammar:
[TABLE]
Regular expressions can be interpreted in terms of languages. This is done by defining inductively, as follows.
[TABLE]
A language is called regular if and only if for some .
We write for the smallest congruence on induced by the Kleene algebra axioms — e.g., for all , we have . Intuitively, means that the regular expressions and can be proved equivalent according to the axioms of Kleene algebra. A pivotal result in the study of Kleene algebras tells us that characterises , in the following sense:
Theorem 2.1 (Soundness and Completeness of KA [16])
For all , we have that if and only if .
Remark 1
The above can be generalised, as follows. Let be a KA, and let . Then for all such that , interpreting and according to in yields the same result. For instance, since , we know that for any element of any KA , we have that .
Linear Systems
Let be a finite set. A -vector is a function . A -matrix is a function . Let and be -vectors. Addition is defined pointwise, setting . Multiplication by a -matrix is given by
[TABLE]
When for all , we write .
Definition 1
A -linear system is a pair with a -matrix and a -vector. A solution to in KA is a -vector such that .
Non-deterministic finite automata
A non-deterministic automaton (NDA) over an alphabet is a triple where is called the termination function and called the continuation function. If is finite, is referred to as a non-deterministic finite automaton (NFA).
The semantics of an NDA can be characterised recursively as the unique map such that
[TABLE]
This coincides with the standard definition of language acceptance.
3 Synchronous Kleene Algebra
Synchronous Kleene algebra extends Kleene algebra with an additional operator denoted , which we refer to as the synchronous product [22].
Definition 2 (Synchronous Kleene Algebra)
A synchronous KA (SKA) is a tuple such that is a Kleene algebra and is a binary operator on , with closed under and a semilattice. Furthermore, the following hold for all and :
[TABLE]
Note that [math] and need not be elements of . The semilattice terms, denoted , are given by the following grammar.
[TABLE]
The synchronous regular terms, denoted , are given by the grammar:
[TABLE]
Thus we have . We then define as the smallest congruence on satisfying the axioms of . Here, plays the role of the semilattice; for instance, for we have that .
Remark 2
In [22], is declared to be idempotent on the generators of the semilattice, whereas in our definition it holds for semilattice elements in general. This does not change anything, as the axiom for generators together with commutativity and associativity results in idempotence on the semilattice. We present SKA as in 2 to prevent a meta-definition of a third sort (namely the semilattice generated by ) present in the signature of the algebra. We have also left out the second distributivity and unit axioms that follow immediately from the ones presented and commutativity.
3.1 A Language Model for SKA
Similar to Kleene algebra, there is a language model for SKA [22].
Words over are called synchronous strings, and sets of synchronous strings are called synchronous languages. The standard language operations (sum, concatenation, Kleene closure) are also defined on synchronous languages. The synchronous product of synchronous languages is given by:
[TABLE]
where we define inductively for and , as follows: {mathpar} u×ε= u = ε×u and (x⋅u)×( y⋅v) = (x∪y)⋅(u×v)
To define the language semantics for all elements in , we first give an interpretation of elements in in terms of non-empty finite subsets of .
Definition 3
For and , define by {mathpar} ⟦a⟧={a} ⟦e×f⟧ = ⟦e⟧∪⟦f⟧
Denote the smallest congruence on with respect to idempotence, associativity and commutativity of with . It is not hard to show that characterises , in the following sense.
Lemma 1 (Soundness and Completeness of SL)
For all , we have if and only if .
The semantics of synchronous regular terms is given in terms of a mapping to synchronous languages: . We have:
[TABLE]
A synchronous language is called regular when for some .
Let , that is to say, is the set of synchronous languages consisting of a single word, whose single letter is in turn a subset of . Furthermore, let denote the set of synchronous languages over . It is straightforward to prove that together with is closed under the SKA operations and satisfies the SKA axioms [22]; more precisely, we have:
Lemma 2 ()
The structure is an SKA, that is, synchronous languages over form an SKA.
As a consequence of 2, we obtain soundness of the SKA axioms with respect to the language model based on synchronous regular languages:
Lemma 3 (Soundness of SKA)
For all , we have that implies .
Remark 3
The above generalises almost analogously to 1. Let be an SKA with semilattice , and let be a function. Then for all such that , if we interpret in according to , then we should get the same result as when we interpret in according to .
In other words, when holds, it follows that is a valid equation in every SKA, provided that the symbols from are interpreted as elements of the semilattice. It is not hard to show that this claim does not hold when symbols from can be interpreted as elements of the carrier at large.
4 Incompleteness of SKA
We now prove incompleteness of the SKA axioms as presented in [22]. Fix alphabet . First, note that the language model of SKA has the following property.
Lemma 4 ()
For , we have .
If were complete w.r.t. , then the above implies that holds. In this section, we present a countermodel where all the axioms of SKA are true, but does not hold for any . This shows that ; consequently, cannot be complete w.r.t. .
Countermodel for SKA
We define our countermodel as follows. For the semilattice, let , the set containing the synchronous language . We denote the set of all synchronous languages over alphabet with ; the carrier of our model is formed by , where is a symbol not found in . The symbol exists only in the model, and not in the algebraic theory. It remains to define the SKA operators on this carrier, which we do as follows.
Definition 4
An element of is said to be infinite when it is an infinite language. For , define the SKA operators as follows:
[TABLE]
where for and and is as defined in Section 3. Here, the cases are given in order of priority — e.g., if and , then .
The intuition behind this model is that SKA has no axioms that relate to the synchronous execution of starred expressions, such as in , nor can such a relation be derived from the axioms, meaning that a model has some leeway in defining the outcome in such cases. Since the language of a starred expression is generally infinite, we choose such that it diverges to the extra element when given infinite languages as input; for the rest of the operators, the behaviour on is chosen to comply with the axioms.
First, we verify that our operators satisfy the SKA axioms.
Lemma 5 ()
* with the operators as defined in 4 forms an SKA.*
Proof
For the sake of brevity, we validate one of the least fixpoint axioms and the synchrony axiom; the other axioms are treated in the appendix.
Let . We verify that . Assume that . If , then the result follows by definition of and our choice of . Otherwise, if , we distinguish two cases. If , then must be (otherwise ); hence , and the claim holds. Lastly, if , then . In this case, all of the operands are languages, and thus the proof goes through as it does for KA.
For the synchrony axiom, we need only check
[TABLE]
for as that is the only element in . Let . If either or is , both sides of the equation reduce to . Otherwise, if or is , then both sides of the equation reduce to . If and are both infinite then and are infinite and the claim follows. In all the remaining cases where and are elements of and at most one of them is infinite, the proof goes through as it does for synchronous regular languages (3). ∎
This leads us to the following theorem:
Theorem 4.1
The axioms of SKA presented in 2 are incomplete. That is, there exist such that but .
Proof
Take . We know from 4 that . Now suppose . As our countermodel is an SKA that means in particular that should hold (c.f. 3). However, in this model we can calculate that . Hence, we have a contradiction. Thus , rendering SKA incomplete.∎
5 A new axiomatisation
We now create an alternative algebraic formalism, which we call , and prove that its axioms are sound and complete w.r.t the model of synchronous regular languages. Whereas the definition of SKA relies on Kleene algebras (with least fixpoint axioms) as presented by Kozen [16], the definition of builds on -algebras (with a unique fixpoint axiom) as presented by Salomaa [24]. The axioms of Salomaa are strictly stronger than Kozen’s [struthfoster], and we will see that the unique fixpoint axiom allows us to derive a connection between the synchronous product and the Kleene star, even though this connection is not represented in an axiom directly (see 7).
Definition 5
An -algebra [24] is a tuple where is a set, ∗ is a unary operator, and are binary operators and [math] and are constants, and such that for all the following axioms are satisfied:
[TABLE]
Additionally, the loop tightening and unique fixpoint axiom hold:
[TABLE]
Lastly, we have the following axioms for :
[TABLE]
In [24], an with is said to have the empty word property, which will be reflected in the semantic interpretation of stated below.
The set of -expressions, denoted , is described by:
[TABLE]
We can interpret -expressions in terms of languages through , defined analogously to , where furthermore for we have
[TABLE]
We write for the smallest congruence on induced by the -axioms. Additionally, we require that for , we have . A characterisation similar to Theorem 2.1 can then be established as follows111Unlike [24], we include in the syntax; one can prove that for any it holds that or , and hence any occurence of can be removed from . This is what allows us to apply the completeness result from op. cit. here.:
Theorem 5.1 (Soundness and Completeness of [24])
For all , we have that if and only if .
Remark 4
Kozen [16] noted that the above does not generalise along the same lines as in 1. In particular, the axiom is not stable under substitution; for instance, if we interpret according to the valuation in the -algebra of languages, then we obtain , whereas [math] is interpreted as .
Definition 6
A synchronous -algebra (-algebra for short) is a tuple , such that is an -algebra and is a binary operator on , with closed under and a semilattice. Furthermore, the following hold for all and :
[TABLE]
Moreover, is compatible with as well, i.e., for we have that . Lastly, for we require that .
Remark 5
The countermodel from Section 4 cannot be extended to a model of . To see this, note that we have and , but — contradicting the unique fixpoint axiom.
The set of -expressions over , denoted , is described by:
[TABLE]
We interpret in terms of languages via , defined analogously to , where furthermore for we have
[TABLE]
Note that when , then and .
Define as the smallest congruence on induced by the axioms of , where fulfills the role of the semilattice — e.g., if , then . This axiomatisation is sound with respect to the language model.222 Note that for the synchronous language model we know the least fixpoint axioms are sound as well (3). However, there might be other where the least fixpoint axioms are not valid.
Lemma 6 ()
Let . If then .
Remark 6
The caveat from 4 can be transposed to this setting. However, the condition that for we have that allows one to strengthen the above along the same lines as 3, that is, if , then interpreting and in some SKA according to some valuation of in terms of semilattice elements will produce the same outcome.
Remark 7
To demonstrate the use of the new axioms, we give an algebraic proof of for :
[TABLE]
Since , we can apply the unique fixpoint axiom to find . In , it is not hard to show that ; hence, we find .
Remark 8
Adding for as an axiom to the old axiomatisation of SKA would not have been sufficient; one can easily find another semantical truth that does not hold in our countermodel, such as . Adding as an axiom is also not an option, as this is not sound; for instance, take for . In order to keep the axiomatisation finitary, a unique fixpoint axiom provided an outcome.
5.1 Partial Derivatives
In this section we develop the theory of SKA and set up the necessary machinery for Section 6 and the completeness proof in Section 7. We start by presenting partial derivatives, which provide a termination and continuation map on . These derivatives allow us to turn the set of synchronous regular terms into a non-deterministic automaton structure, such that the language accepted by as a state in this automaton is the same as the semantics of . Furthermore, partial derivatives turn out to provide a way to algebraically characterise a term by means of acceptance and reachable terms, which is useful in the completeness proof of .
The termination and continuation map for -expressions presented below are a trivial extension of the ones from [7]. Intuitively, the termination map is if an expression can immediately terminate, and [math] otherwise; the continuation map of a term w.r.t. gives us the set of terms reachable with an -step.
Definition 7 (Termination map)
For , we define inductively, as follows:
[TABLE]
Definition 8 (Continuation map)
For , we inductively define as follows:
[TABLE]
where is defined to be when , and otherwise.
Definition 9 (Syntactic Automaton)
We call the NDA the syntactic automaton of -expressions.
In Section 6 we give a proof of correctness of partial derivatives: for the semantics of is equivalent to the language accepted by as a state in the syntactic automaton. An analogous property holds for (partial) derivatives in Kleene algebras [8, 1], which makes derivatives a powerful tool for reasoning about language models and deciding equivalences of terms [6].
In the next two sections, we want to use terms reachable from , that is to say, terms that are a result of repeatedly applying the continuation map on . To this end, we define the following function:
Definition 10
For and , we inductively define the reach function as follows:
[TABLE]
Using a straightforward inductive argument, one can prove that for all , is finite. Note that is not always a member of . To see that indeed contains all terms reachable from , we record the following.
Lemma 7 ()
For all and , we have . Also, if , then .
5.2 Normal form
In this section we develop a normal form for expressions in , which we will use in the completeness proof for . As is a surjective function it has at least one right inverse. Let us pick one and denote it by . We thus have such that is the identity on .
The normal form for expressions in is defined as follows:
Definition 11 (Normal form)
For all the normal form of , denoted as , is defined as . Let .
Intuitively, an expression in normal form is standardised with respect to idempotence, associativity and commutativity. For instance, for a term with , the chosen normal form, dictated by the chosen right inverse, could be , and all terms provably equivalent to will have this same normal form. Using 1, we can formalise this in the following two results:
Lemma 8
For all , we have that is provably equivalent to its normal form: . Moreover, if two expressions are provably equivalent, they have the same normal form: if , then .
Proof
As is a right inverse of , we can derive the following:
[TABLE]
From completeness we get . For the second part of the statement we obtain via soundness that and subsequently that .∎
Normalising normalised terms does not change anything.
Lemma 9 ()
For all we have that .
We extend from synchronous strings of length one to words and synchronous languages in the obvious way. For a synchronous string with and , and synchronous language we define: {mathpar} ε^Π=ε(aw)^Π=a^Π⋅(w^Π) L^Π={w^Π : w∈L}
We abuse notation and assume the type of is clear from the argument.
Since is a homomorphism of languages, we have the following.
Lemma 10 ()
*For synchronous languages and , all of the following hold:
(i) ,
(ii) , and
(iii) .
6 A Fundamental Theorem for
In this section we shall algebraically capture an expression in terms of its partial derivatives. This characterisation of an -term will be useful later on in proving completeness but also provides us with a straightforward method to prove correctness of the partial derivatives. Following [23, 25], we call this characterisation a fundamental theorem for . Before we state and prove the fundamental theorem, we prove an intermediary lemma:
Lemma 11
For all , we have
[TABLE]
Proof
First note the following derivation for , using 8, the fact that all axioms of are included in , and that is a right inverse of :
[TABLE]
Using distributivity, the synchrony axiom and the equation above, we can derive:
[TABLE]
The synchrony axiom can be applied because .∎
Theorem 6.1 (Fundamental Theorem)
For all , we have
[TABLE]
Proof
This proof is mostly analogous to the proof of the fundamental theorem for regular expressions, such as the one that can be found in [25].
We proceed by induction on . In the base, we have three cases to consider: or for . For , the result follows immediately. For , the only non-empty derivative is and the result follows:
[TABLE]
In the inductive step, we treat only the case for synchronous composition; the others can be found in the appendix. If , derive as follows:
[TABLE]
Correctness of partial derivatives for
We now relate the partial derivatives for to their semantics. Let be the semantics of the syntactic automaton (9), uniquely defined by Equation 1:
[TABLE]
To prove correctness of derivatives for , we prove that the language semantics of the syntactic automaton and the -expression coincide:
Theorem 6.2 (Soundness of derivatives)
For all we have:
[TABLE]
Proof
The claim follows almost immediately from the fundamental theorem. From 3 and Theorem 6.1, we obtain
[TABLE]
Note that by definition of the semantics of a term in and the fact that is a right inverse. Because is the only function satisfying Equation 2, we obtain the desired equality between and the language accepted by as a state of the automaton . ∎
7 Completeness of
In this section we prove completeness of the -axioms with respect to the synchronous language model: we prove that for , if , then . We first prove completeness of for a subset of -expressions, relying on the completeness result of (13). Then we demonstrate that for every -expression we can find an equivalent -expression in this specific subset (Theorem 7.1). This subset is formed as follows.
Definition 12
The set of -expressions in normal form, , is described by the grammar
[TABLE]
where is as defined in 11.
From this description it is immediate that an -term is formed from terms of connected via the regular -algebra operators. Hence, -expressions formed over the alphabet are the same set of terms as . We shall use this observation to prove completeness for with respect to the language model by leveraging completeness of .
We use the function to give a translation between the semantics of a term in and the semantics of that same term:
Lemma 12 ()
For all , we have .
Proof
We proceed by induction on the construction of . In the base, there are three cases to consider. If , then , and we are done. If , then , and the claim follows. If for , we use 9 to obtain . As , we know that , and the claim follows.
For the inductive step, first consider . if and otherwise. We also have if and otherwise. The induction hypothesis states that , from which we obtain that . Hence we can conclude that . All other inductive cases follow immediately from 10. The details can be found in the appendix.∎
We are now ready to prove completeness of for terms in normal form.
Lemma 13
Let . If , then .
Proof
By the premise, we have that . From 12 we get and , which results in . From Theorem 5.1 we know that this entails that . As contains all the axioms of , we may then conclude that and the claim follows.∎
In order to prove completeness with respect to the language model for all , we prove that for every there exists a term in normal form such that . To see this is indeed enough to establish completeness of , imagine we have such a procedure to transform into in normal form. We can then conclude that implies , which by 13 implies , and consequently that .
To obtain , we will make use of the “unfolding” of an -expression in terms of partial derivatives, given by the fundamental theorem, which will give rise to a linear system. We will then show that this linear system has a unique solution that has the properties we require from . Since is also a solution to this linear system, we can conclude that they are provably equivalent.
Let us start with the following property of linear systems over . A -vector is a function and a -matrix is a function . We call a matrix guarded if for all . We say a vector and matrix are in normal form if for all and for all . The following lemma is a variation of [24, Lemma 2] and the proof is a direct adaptation of the proof found in [15, Lemma 3.12].
Lemma 14 ()
Let be a -linear system such that and are guarded. We can construct -vector that is the unique (up to -equivalence) solution to in . Moreover, if and are in normal form, then so is .
We now define the linear system associated to an -expression . This linear system makes use of the partial derivatives for , and essentially represents an NFA that acceps the language described by .
Definition 13
Let , and choose , where is the reach function from 10. Define the -vector and the -matrix by {mathpar} x_e(e’)=o(e’) M_e(e’,e”)= ∑_e”∈δ(e’,A)A^Π
We can now use 14 to obtain the desired normal form :
Theorem 7.1
For all , there exists an such that .
Proof
It is clear from their definition that and are both in normal form and that is guarded. From 14 we then get that there exists a unique solution to , and is a -vector in normal form. Now consider the -vector such that for all . Using 7 and Theorem 6.1, we can derive the following:
[TABLE]
This demonstrates that is also a solution to . As we know from 14 that is unique, we get that . This means that . As is in normal form we get that . Thus, if we take , then we have obtained the desired result.∎
Combining Theorem 7.1 and 13 gives the main result of this section:
Theorem 7.2 (Soundness and Completeness)
For all , we have
[TABLE]
As a corollary of Theorem 6.2 and Theorem 7.2 we know that is decidable by deciding language equivalence in the syntactic automaton.
8 Related Work
Synchonous cooperation among processes has been extensively studied in the context of process calculi such as ASP [4] and SCCS [21]. SKA bears a strong resemblance to SCCS, with the most notable differences being the equivalence axiomatised (bisimulation vs. language equivalence), and the use of Kleene star (unbounded finite recursion) instead of fixpoint (possibly infinite recursion). Contrary to ASP, but similar to SCCS, SKA cannot express incompatibility of action synchronisation.
In the context of Kleene algebra based frameworks for concurrent reasoning, a synchronous product is just one possible interpretation of concurrency. An interleaving-based approach with a concurrent operator (a parallel operator denoted with ) is explored in Concurrent Kleene Algebra [15, 20, 12, 13, 15].
We have proved that is sound and complete with respect to the synchronous language model by making use of the completeness of [24]. The strategy of transforming an expression to an equivalent expression with a particular property is often used in literature [15, 18, 20, 14]. In particular, we adopted the use of linear systems as a representation of automata, which was first done by Conway [9] and Backhouse [2]. The machinery that we used to solve linear systems in is based on Salomaa [24] and can also be found in [15] and [17]. The idea of the syntactic automaton originally comes from Brzozowski, who did this for regular expressions [8]. He worked with derivatives which turn a Kleene algebra expression into a deterministic automaton. We worked with partial derivatives instead, resulting in a non-deterministic finite automaton for each -expression. Partial derivatives were first proposed by Antimirov [1].
Other related work is that of Hayes et al. [hayes1]. They explore an algebra of synchronous atomic steps that interprets the synchrony model SKA is based on (Milner’s SCCS calculus). However, their algebra is not based on a Kleene algebra — they use concurrent refinement algebra [10] instead. Later, Hayes et al. presented an abstract algebra for reasoning about concurrent programs with an abstract synchronisation operator [hayes2], of which their earlier algebra of atomic steps is an instance. A key difference seems to be that Hayes et al. use different units for synchronous and sequential composition. It would be interesting to compare expressive powers of the two algebras more extensively.
A decision procedure for equivalence between SKA terms is given by Broda et al. [7]. They defined partial derivatives for SKA that we also used in the proof of completeness, and used those to construct an NFA that accepts the semantics of a given SKA expression. Deciding language equivalence of two automata then leads to a decision procedure for semantic equivalence of SKA expressions.
9 Conclusions and Further Work
We have presented a complete axiomatisation with respect to the model of synchronous regular languages. We have first proved incompleteness of SKA via a countermodel, exploiting the fact that SKA did not have any axioms relating the synchronous product to the Kleene star. We then provided a set of axioms based on the -axioms from Salomaa [24] and the axioms governing the synchronous product familiar from SKA. This was shown to be a sound and complete axiomatisation with respect to the synchronous language model.
In the original SKA paper there is a presentation of synchronous Kleene algebra with tests including a wrongful claim of completeness. An obvious next step would be to see if we can prove completeness of with tests. We conjecture with tests is indeed complete and that this is straightforward to prove via a reduction to in a style similar to the completeness proof of KAT [18]. Another generalisation is to add a unit to the semilattice, making it a bounded semilattice. This will probably lead to a type of delay operation [21].
Our original motivation to study SKA was to use it as an axiomatisation of Reo, a modular language of connectors combining synchronous data flow with an asynchronous one [3]. The semantics of Reo is based on an automata model very similar to that of SKAT, in which transitions are labelled by sets of ports (representing a synchronous data flow) and constraints (the tests of SKAT). Interestingly, automata are combined using an operation analogous to the synchronous product of SKAT expressions. We aim to study the application of SKA or SKAT to Reo in future work.
Acknowledgements
The first author is grateful for discussions with Hans-Dieter Hiep and Benjamin Lion.
Appendix 0.A Appendix
See 2
Proof
The carrier is obviously closed under the operations of synchronous Kleene algebra. We need only argue that each of the SKA axioms is valid on synchronous languages.
The proof for the Kleene algebra axioms follows from the observation that synchronous languages over the alphabet are simply languages over the alphabet . Thus we know that the Kleene algebra axioms are satisfied, as languages over alphabet with and form a Kleene algebra.
For the semilattice axioms, note that is isomorphic to (by sending a singleton set in to its sole element), and that the latter forms a semilattice when equipped with . Since the isomorphism between and respects these operators, it follows that is also a semilattice.
The first SKA axiom that we check is commutativity. We prove that on synchronous strings is commutative by induction on the paired length of the strings. Consider synchronous strings and . For the base, where and equal , the result is immediate. In the induction step, we take with . If we are done immediately. Now for the case with . We have . From the induction hypothesis we know that . Combining this with commutativity of union we have . Take synchronous languages and . Now consider . This means that for and . From commutativity of synchronous strings we know that . And thus we have . The other inclusion is analogous.
It is obvious that the axioms and are satisfied.
For associativity we again first argue that on synchronous strings is associative. Take synchronous strings and . We will show by induction on the paired length of and that . If the result is immediate. Now consider for . If or equals the result is again immediate. Hence we consider the case where and for . From the induction hypothesis we know that . We can therefore derive
[TABLE]
From associativity of union, we then know that . Now consider for and synchronous languages. Thus for , and . From associativity of synchronous strings we know that , and thus we have . The other inclusion is analogous.
For distributivity consider for synchronous languages. This means that for and . Thus we know or . We immediately get that or and therefore that . The other direction is analogous.
For the synchrony axiom we take synchronous languages and . Suppose and for . Take . This means that for and . Thus we know that with and with . From this we conclude . As and and with and , we have that . For the other direction, consider . This entails for and . As we have . And for and . Thus for , , and . Hence .∎
See 3
Proof
This is proved by induction on the construction of . In the base case we need to check all the axioms generating , which we have already done for 2. For the inductive step, we need to check the closure rules for congruence preserve soundness. This is all immediate from the definition of the semantics of SKA and the induction hypothesis. For instance, if , , and , then , where use that and as a consequence of the induction hypothesis.
See 4
Proof
For the first inclusion, take . Thus we have for . Hence for and for . As with , we know that and . Assume that without loss of generality. We then know that , where synchronous string indicates copies of string concatenated. Unrolling the definition of on words, we find , and hence . For the other inclusion, take . As and , we immediately have .∎
Lemma 15
For , a non-empty finite language and an infinite language, is an infinite language.
Proof
Suppose that is a finite language. Hence we have an upper bound on the length of words in . Since the length of the synchronous product of two words is obviously the maximum of the length of the operands, this means we also have an upper bound on the length of words in , and as we have finite words over a finite alphabet in this means that is finite. Hence we get a contradiction, thus is infinite.
See 5
Proof
In the main text we treated one of the least fixpoint axioms and the synchrony axiom, and here we will treat all the remaining cases. For the sake of brevity, for each axiom we omit the cases where we can appeal to the proof for (synchronous) regular languages.
The proof that is a semilattice is the same as in 2. Next, we take a look at the Kleene algebra axioms. If , then holds by definition of union of sets. If , we get , and the axiom also holds.
For , the axiom also easily holds by definition of the plus operator. Same for and by definition of the operator for sequential composition.
It is easy to see the axioms and hold for . In case , for we have
[TABLE]
and a similar derivation for .
For the commutativity of we take . If or , we have .
For associativity of the plus operator we take . If any of , or is , it is easy to see the axiom holds.
For associativity of the sequential composition operator, consider . We first can observe that if one of , or is empty, then the equality holds trivially. Otherwise, if one of , and is , then .
Next, we verify distributivity of concatenation over . We will show a detailed proof for left-distributivity only; right-distributivity can be proved similarly. Let . If one of , , or is empty, then the claim holds immediately (the derivation is slightly different for versus or ). Otherwise, if one of , or is , then .
For the remaining least fixpoint axiom, let . Assume that . We need to prove that . If , then the claim holds immediately. If and , then must be empty, hence is empty, and the claim holds. If , then also and the proof goes through as it does for KA.
We now get to the axioms for the -operator. The commutativity axiom is obvious from the commutative definition of (as we already know that is commutative on synchronous strings). The axiom is also satisfied by definition. The same holds for the axiom as is finite.
For associativity of the synchronous product, consider . If one of , or is empty, then both sides of the equation evaluate to . Otherwise, if one of , , or is , then both sides of the equation evaluate to . If , and are all languages, and at most one of them is finite, then either , in which case the left-hand side evaluates to , or is infinite (by 15) and , in which case the right-hand side evaluates to again. The right-hand side can be shown to evaluate to by a similar argument. In the remaining cases (at least two out of , and are finite languages and none of them is or ), the proof of associativity for the language model applies.
For distributivity of synchronous product over , let . If one of , or is , then the proof is straightforward. Otherwise, if one of , or is , then both sides evaluate to . If and are infinite, then the outcome is again on both sides (note that being infinite implies that either or is infinite). In the remaining cases, , and are languages and either or (hence and ) is finite. In either case the proof for synchronous regular languages goes through. ∎
See 6
Proof
We need to verify each of the axioms of . The proof for the axioms of is immediate via the observation that synchronous languages over the alphabet are simply languages over the alphabet . Thus we know that the -axioms are satisfied, as languages over alphabet with and form an -algebra. The additional axioms are the same as the ones that were added to KA for SKA, and we know they are sound from 3. ∎
See 7
Proof
We prove the first statement by induction on the structure of . In the base, if we have , the claim holds vacuously. If we have , then and , so the claim follows. For the inductive step, there are five cases to consider.
- •
If , then immediately so the claim holds vacuously.
- •
If , then by induction we have and . Hence, we find that .
- •
If , then by induction we have and . Hence, we can calculate that
[TABLE]
- •
If , then by induction we have and for all . Hence, we can calculate that
[TABLE]
- •
If , then by induction we have . Hence, we find that
[TABLE]
For the second statement, we prove that if , then . The result of the first part tells us that , which together with proves the claim. We proceed by induction on . In the base, there are two cases to consider. First, if , then the claim holds vacuously. If , then the only is , so the claim holds. If for , we have . It trivially holds that for .
For the inductive step, there are four cases to consider.
- •
If , then , and the proof is as in the case where .
- •
If , assume w.l.o.g. that . By induction, we derive that
[TABLE]
- •
If then there are two cases to consider.
- –
If where , then we calculate
[TABLE]
- –
If , then by induction we have .
- •
If then there are three cases to consider.
- –
The first case is where and , we get and by induction. We calculate
[TABLE]
- –
For , then by induction we have .
- –
For , the argument is similar to the previous case.
- •
If , then either or for some . In the former case, . In the latter case, we find by induction that
[TABLE]
See 9
Proof
As we have that for some . From 8 we know that . So we get . Again from 8 we then know that .∎
Lemma 16
For , we have .
Proof
We proceed by induction on the lenth of . In the base, we have . Thus and . We have so the result follows immediately. In the inductive step we consider for . We have to consider two cases. In the first case we have . The induction hypothesis gives us that . We then have . In the second case we have and . We then conclude that .∎
See 10
Proof
- (i)
First, suppose . Thus we have for . This gives us or . We assume the former without loss of generality. Thus we know . Hence we know . The other direction can be proved analogously. 2. (ii)
First, suppose . Thus we have for some . This gives us for some and some . By definition of we know that and . Thus we have . From 16 we know that , which gives us the desired result of . The other direction can be proved analogously. 3. (iii)
Take . Thus we have for some . By definition of the star of a synchronous language we know that for . As , we have and . By 16, we know that . Thus we have , which is the desired result. The other direction can be proved analogously. ∎
See 6.1
Proof
Here we treat the inductive cases not displayed in the main proof, where we treated only the synchronous case.
- •
If , derive:
[TABLE]
- •
If , derive:
[TABLE]
- •
If , derive:
[TABLE]
- •
If , we derive:
[TABLE]
See 12
Proof
In the main text we have treated the base cases. The inductive cases work as follows. There are three cases to consider. If , then (10). From the induction hypothesis we obtain and . Combining these results we get , so the claim follows. Secondly, if , then (10). From the induction hypothesis we obtain and . We can then conclude that . Lastly, if , we get (10). From the induction hypothesis we obtain . Thus we have and the claim follows.∎
See 14
Proof
We will construct by induction on the size of . In the base, let . In this case the unique -vector is a solution. In the inductive step, take and let . Then construct the -linear system as follows:
[TABLE]
As is a strictly smaller set than and is guarded, we can apply our induction hypothesis to . So we know by induction that has a unique solution . Moreover, if and are in normal form, so is ; note that if and are in normal form, then so are and .
We use to construct the -vector :
[TABLE]
The first thing to show now is that is indeed a solution of . To this end, we need to show that . We have two cases. For we derive:
[TABLE]
For , we derive:
[TABLE]
We now know that is a solution to because . Furthermore, if and are in normal form, then so is , and thus is in normal form by construction.
Next we claim that is unique. Let be any solution of . We choose the -vector by taking . To see that is a solution to , we first claim that the following holds:
[TABLE]
To see that this is true, derive
[TABLE]
Note that we can apply the unique fixpoint axiom because we know that is guarded and thus that .
Now we can derive the following:
[TABLE]
Thus is a solution to . As is the unique solution to , we know that .
For we know that . For we can derive:
[TABLE]
Thus, , thereby proving that is the unique solution to . ∎
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Valentin M. Antimirov. Partial derivatives of regular expressions and finite automaton constructions. Theor. Comput. Sci. , 155(2):291–319, 1996. doi:10.1016/0304-3975(95)00182-4 . · doi ↗
- 2[2] Roland Backhouse. Closure algorithms and the star-height problem of regular languages . Ph D thesis, University of London, 1975.
- 3[3] Christel Baier, Marjan Sirjani, Farhad Arbab, and Jan J. M. M. Rutten. Modeling component connectors in reo by constraint automata. Sci. Comput. Program. , 61(2):75–113, 2006. doi:10.1016/j.scico.2005.10.008 . · doi ↗
- 4[4] Jan A. Bergstra and Jan Willem Klop. Process algebra for synchronous communication. Information and Control , 60(1-3):109–137, 1984. doi:10.1016/S 0019-9958(84)80025-X . · doi ↗
- 5[5] Maurice Boffa. Une remarque sur les systèmes complets d’identités rationnelles. ITA , 24:419–428, 1990.
- 6[6] Filippo Bonchi and Damien Pous. Checking NFA equivalence with bisimulations up to congruence. In Proc. Principles of Programming Languages (POPL) , pages 457–468, 2013. doi:10.1145/2429069.2429124 . · doi ↗
- 7[7] Sabine Broda, Sílvia Cavadas, Miguel Ferreira, and Nelma Moreira. Deciding synchronous Kleene algebra with derivatives. In Proc. Implementation and Application of Automata (CIAA) , pages 49–62, 2015. doi:10.1007/978-3-319-22360-5_5 . · doi ↗
- 8[8] Janusz A. Brzozowski. Derivatives of regular expressions. J. ACM , 11(4):481–494, 1964. doi:10.1145/321239.321249 . · doi ↗
