Kamp Theorem for Pomset Languages of Higher Dimensional Automata
Abstract
Temporal logics are a powerful tool to specify properties of computational systems. For concurrent programs, Higher Dimensional Automata (HDA) are a very expressive model of non-interleaving concurrency. HDA recognize languages of partially ordered multisets, or pomsets. Recent work has shown that Monadic Second Order (MSO) logic is as expressive as HDA for pomset languages. In the case of words, Kamp’s theorem states that First Order (FO) logic is as expressive as Linear Temporal Logic (LTL). In this paper, we extend this result to pomsets. To do so, we first investigate the class of pomset languages that are definable in FO. As expected, this is a strict subclass of MSO-definable languages. Then, we define a Linear Temporal Logic for pomsets (), and show that it is equivalent to FO.
Keywords and phrases:
Higher dimensional automata, temporal logic, Kamp’s theoremCopyright and License:
2012 ACM Subject Classification:
Theory of computation Modal and temporal logics ; Theory of computation ConcurrencyFunding:
This work was partly supported by ANR projects BisoUS (ANR-22-CE48-0012) and PaVeDyS (ANR-23-CE48-0005).Editors:
Stefano Guerrini and Barbara KönigSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Context.
Higher-Dimensional Automata (HDA) [20] are a powerful model of concurrency that enriches standard finite-state automata with higher-dimensional cells, allowing to specify that some events may occur simultaneously. HDA represent asynchronous concurrent computations where events are non-atomic, and can overlap in various complex patterns. Thus, they are a model of non-interleaving concurrency, which is concerned with simultaneity between events rather than commutation of events. HDA have been shown to be a very expressive model of concurrency: comparisons with other models (such as Petri nets, event structures) can be found in [26], based on history-preserving bisimulations, or in [14], based on adjunctions.
A notion of language of HDA was developed only recently [10]. The key idea is that an execution of an HDA may not be represented as a word (where the events/letters are totally ordered); instead, it is a partially ordered multiset, or pomset for short. This is illustrated in Figure 1. On the left, an HDA is depicted, with two processes running in parallel. One process is executing two events , then , while the second process is running , then . One possible execution path is depicted in red. This execution can equivalently be depicted using intervals (center of Figure 1): time flows from left to right, and the duration of events is depicted by stretching horizontally the boxes representing the events. When two events overlap vertically, this means that they are occurring simultaneously. Finally, a third representation of this execution is depicted on the right of Figure 1, as a pomset. The events are ordered according to Lamport’s happens before relation [17]: means that event terminates before starts. In particular, overlapping events are not ordered.
Thus, HDA recognize languages of pomsets. Note that, just as sequential executions are a special case of concurrent executions; words are also a special case of pomsets, where the order between events happens to be total. A recent line of work has been extending classic results of automata theory to the setting of pomset languages of HDA. They have been shown to enjoy a variant of Kleene theorem [11], a Myhill-Nerode theorem [12], a pumping Lemma [3], and a Büchi-Elgot-Trakhtenbrot theorem [2]. The latter result will be of particular importance for us: it says that Monadic Second-Order (MSO) logic describes the same class of languages as HDA. To establish this result, the authors used an equivalent representation of pomsets called ST-sequences (see Section 2.2), which are words over a finite alphabet. This proof technique, further developed in [1], provides a way to lift some results from words to pomsets.
In this paper, we investigate the class of languages obtained by restricting to First Order (FO) logic instead of MSO. Over finite words, FO-definable languages form a strict subclass of regular languages, called aperiodic languages [23]. There are many equivalent characterizations of this class, such as star-free regular expressions and counter-free automata [19]. Of particular interest to us is Kamp’s theorem [16, 22], which states that Linear Temporal Logic (LTL) is as expressive as FO logic over finite words.
Contributions: FO and LTL for pomset languages.
This paper studies the class of FO-definable languages of pomsets. As expected, they form a strict subclass of HDA languages (Corollary 11). Our main goal is to define an LTL-style logic over pomsets, that defines the same class of languages as FO logic; thus extending Kamp’s theorem to pomset languages. To that end, we first show that FO formulas over pomsets can be translated into equivalent FO formulas over ST-sequences (Theorem 10). A similar result for MSO formulas was proved in [2]. However, it cannot be easily adapted: it relies heavily on a relation , that relates different occurrences of the same event in an ST-sequence. To show that this relation is definable in MSO, the authors use second-order quantification. In our first technical contribution (Lemma 9), we show that the relation is FO-definable. Instead of giving directly an FO formula (which would be very tedious), we define a counter-free automaton.
We then define a variant of LTL for pomsets that we call and prove that is equivalent to FO (Theorem 22). We sum up the proof of Theorem 22 by the chain of translations depicted in Figure 2.
Relationship with Mazurkiewicz traces.
Pomsets also appear in the literature in the context of Mazurkiewicz traces [18], a notion also at the intersection between automata theory and concurrency theory. Many variants of LTL on traces have been defined, and their expressivity has been extensively studied [24, 5, 25, 7, 6, 13]. Thus, it is important to distinguish this line of work with what we are studying in this paper.
The set of Mazurkiewicz traces can be described as the free partially commutative monoid over a dependence alphabet. Thus, a trace is an equivalence class of finite words where some letters are allowed to commute. Equivalently, they can also be regarded as pomsets, using their dependence graph. In the dependence graph of a Mazurkiewicz trace, denotes causal dependency. Two incomparable events are independent, i.e., it does not matter in which order they occur. In contrast, for HDA pomsets, the precedence order indicates that terminates before starts, and two events are incomparable when they are simultaneous (i.e., the time intervals during which they are executed overlap). This semantic distinction results in several technical differences:
-
(i)
HDA pomsets are always required to be interval orders (see Definition 1). This is not the case for Mazurkiewicz traces.
-
(ii)
For HDA, it may very well be the case that (i.e., happens before ) in one execution, while and are incomparable (i.e., simultaneous) in another execution. This is not allowed for Mazurkiewicz traces. Indeed, they are defined with respect to a dependence alphabet, which determines in advance which events may or may not be comparable in the dependence graph.
-
(iii)
Lastly, HDA pomsets actually have an extra relation called the event order. Indeed, we require simultaneous events (events that are incomparable for the relation ) to be ordered by the event order. This is a way of managing process identity: if two processes are running in parallel, the event order allows to distinguish the two events .
Other related work.
Modal logics over HDA have been previously investigated. In [21], the author introduces a logic called Higher-Dimensional Modal Logic (HDML), which is interpreted directly on an HDA. It has two variants of the “next” operator: one that can start an event, and one that can terminate an event. A sound and complete axiomatization of this logic is given, as well as tentative definitions of LTL-like and CTL-like extensions. The language theory over pomsets is not investigated since pomset languages of HDA had not been defined at the time. However, an encoding of LTL for Mazurkiewicz traces into HDML is given. A more recent paper [27] introduces IPomset Modal Logic (IPML). This logic features a forward modality and a backwards modality, in the spirit of path logic [15]. No temporal variant of IPML is defined, the focus of this paper being on bisimulation equivalence.
Plan of the paper.
In Section 2, we recall the key definitions that we will be using. Then, in Section 3, we investigate FO over pomsets, and show our first technical contribution: FO over pomsets can be translated to FO over ST-sequences (Theorem 10). In Section 4, we define our temporal logic , and study its expressivity in Section 5 (Theorem 22).
2 Preliminaries
In this section, we define several notions that we will need in this paper: interval pomsets with interfaces [10], their ST-decomposition [1], and MSO logic on pomsets [2].
2.1 Interval pomsets with interfaces
Pomsets, interfaces, dimension.
Let be a finite alphabet. A partially ordered multiset (or pomset) over is a generalization of words, where the letters need not be totally ordered. This can represent situations where two or more events occur at the same time. An intuitive representation of some pomsets is given in Figure 3, where the events are depicted as intervals, and the horizontal axis represents the elapsing time. For instance, in Figure 3(a), both events and occur before , which we denote by and . However, since the intervals for and overlap, the two events are concurrent: they are incomparable for the precedence relation .
As seen in Figure 3, the partial orders that we are interested in arise from an interval representation, where means that ’s interval terminates before ’s interval starts. This is called an interval order.
Definition 1 (Interval order).
Let be a partially ordered set. The relation is an interval order if there exist , with , satisfying the following condition:
Not all partial orders are interval orders: for example, the pomset depicted in Figure 4 does not have an interval representation. Indeed, if we try to assign intervals to the four events, with before and before , we always end up with an extra relation: either before , or before , or both. In fact, interval orders can be characterized as exactly those partial orders that do not have an induced subposet isomorphic to .
We can now define the notion of pomsets, interval pomsets, and their variants with interfaces. Pomsets are also equipped with a binary relation called the event order, which orders concurrent events. The intuition of pomsets with interfaces is that we allow some events to be already active at the beginning of a pomset, or still running at the end (see Figure 3(d)).
Definition 2 (iiPomset).
A partially ordered multiset (also called pomset) over an alphabet is a tuple where is a finite set, is a strict partial order over called precedence, and is an acyclic relation on called the event order, and is a labeling function, s.t. for all , exactly one of the following holds:
We write when and . When there is no ambiguity, we denote and as and .
-
A pomset is an interval pomset if is an interval order.
-
An interval pomset with interfaces is an interval pomset together with two sets and , called the starting (resp. terminating) interfaces. We require elements of (resp. ) to be minimal (resp. maximal) elements w.r.t. .
The set of interval pomsets with interfaces is denoted . Note that pomsets are a special case of pomsets with interfaces, where the interfaces are . In the rest of the paper, pomsets are always assumed to be interval pomsets with interfaces, so we drop the extra adjectives. Moreover, pomsets are (often implicitly) considered up to isomorphism: the underlying set itself does not matter as long as the rest of the structure is the same.
The dimension of a pomset is the size of a maximal -antichain in , that is, a maximal set of elements of that are pairwise incomparable w.r.t. the precedence relation . Such events are called concurrent. Note that any set of concurrent events is totally ordered by the event order . Intuitively, the dimension of a pomset is the maximal number of processes running concurrently at any time during this execution. We denote by the set of pomsets of dimension .
When we draw pomsets in pictures, we use a plain arrow instead of for the precedence order, and a gray dashed arrow for the event order. We represent the interfaces using a bullet symbol . We denote an event as when it belongs to the starting interface ; when it belongs to the terminating interface ; and when it belongs to both. Four pomsets (with and without interface) are depicted in Figure 3, next to their interval representation.
Gluing of pomsets.
Gluing is an operation on pomsets that extends word concatenation. The gluing of two pomsets and is a pomset , where all the events of happen before those of . However, we must also take care of the interfaces of and . Indeed, if an event is still active when finishing , it must be active when beginning . Hence, the terminating interface of and the starting interface of must match. Formally, we can view and as pomsets (inheriting the labeling and event order from and , respectively), and we require that and must be isomorphic as pomsets (i.e., the labels and event order must be preserved). For the purpose of this paper, we only define gluing when the interfaces match exactly ( as pomsets); see [11] for a more robust definition. For instance, the pomset of Figure 3(d) can be obtained as:
=
Definition 3 (Gluing).
Let be two pomsets such that . The gluing of and , denoted by , is defined as where:
2.2 ST decomposition
Starter-Terminator decomposition of pomsets is a tool introduced in [3, 12] to decompose a pomset as a gluing of elementary elements, i.e. pomsets with empty precedence order. This technique allows to describe pomsets over of dimension as finite words over a finite alphabet . This makes it possible to lift results from words to pomsets.
A pomset is called discrete when it has an empty precedence order. In that case, the event order is a total order. Thus, we will write discrete pomsets as lists of events, between square brackets, where the event order is omitted and goes implicitly from top to bottom. For instance, is a discrete pomset with two concurrent events , where and . A discrete pomset can be:
-
a conclist if ,
-
a starter if ,
-
a terminator if ,
-
an identity if it is both a starter and a terminator.
For example, is a conclist, is a starter, is a terminator, and is an identity. Intuitively, a starter can only start new events: so, all events must belong to the terminating interface, because they must keep running, hence the . Conversely, a terminator is allowed to terminate some events, but it cannot start new ones: all events were already running at the start, thus . Note that the discrete pomset is neither a starter nor a terminator, since it both starts and terminates . A conclist has no interface, it simply denotes an (ordered) list of events that are running concurrently, hence the name, short for concurrency list.
We denote the set of conclists by . We write for the set of all starters and terminators, and for the ones of dimension at most . Notice that since the alphabet is finite, the set is also finite. A finite word is called coherent if for all . When that is the case, we can glue the successive elements in the sequence to obtain a pomset . A coherent word on is also called an ST-sequence. If is an ST-sequence, we write for its associated pomset.
Proposition 4 (ST decomposition [12]).
Every pomset can be decomposed as an ST-sequence: there exists such that .
Let us take our running example of Figure 3(d) and express an ST-decomposition of this pomset:
An ST decomposition is called sparse if it alternates between starters and terminators, and contains no identities. For example, the ST decomposition given above is sparse: from left to right, we first start , terminate , start , terminate , start , and terminate .
In general, ST decompositions are not unique. Indeed, one can always add any number of identities (see example on the left); and when several events start at the same time, we can equivalently start one before the other, or both at once (see example on the right).
However, every pomset admits a unique sparse ST decomposition (see [12] for a proof).
2.3 Monadic Second Order logic over pomsets
We now recall the Monadic Second Order (MSO) logic over pomsets introduced in [2]. The main result of [2] is a variant of Büchi’s theorem for pomsets, which states that MSO logic captures the same class of pomset languages as higher dimensional automata.
The syntax of MSO formulas for pomsets is generated by the grammar:
where is a letter of the alphabet, are first order variables and is a second-order variable. The symbols and are unary predicates, meaning that belongs to the starting (resp. terminating) interface. The binary relation symbols and stand for the precedence and event order.
Definition 5 (Semantics of MSO over pomsets).
An MSO formula is evaluated over a pomset , together with an interpretation function .
The function gives the interpretation of free variables of : first-order variables are mapped to events of , and second-order variables are mapped to sets of events of .
The satisfaction relation is defined inductively as follows:
We write when does not have any free variables, and .
In order to prove that MSO over pomsets is as expressive as higher dimensional automata, the authors of [2] used a detour via ST-sequences. An MSO formula over pomsets can be translated into a formula over ST-sequences that accepts the representations of the pomsets accepted by . The precise statement of this translation is reproduced below, in Lemma 6. Recall that ST-sequences are simply words over a different alphabet , so MSO logic over ST-sequences is the standard MSO logic over finite words.
Lemma 6 (cf. [2, Lemma 12]).
Let be an MSO formula for pomsets without free variables. Then, for any , there exists an MSO formula over , such that:
where denotes the empty pomset.
3 First Order logic over pomsets and ST-sequences
In this section, our goal is to prove a variant of Lemma 6 for FO formulas. Unfortunately, the proof given in [2] cannot be easily adapted: even if we start with an FO formula , the translation that they give yields a formula that contains second-order quantification. This is because their translation makes extensive use of an MSO-definable relation that keeps track of the position of an event in an ST-sequence. This relation relies on second-order quantification, and is used in several cases of the inductive translation. In Section 3.2, we show that the relation can actually be expressed in first order. The translation from FO formulas on pomsets to FO formulas on ST-sequences then follows in Theorem 10.
3.1 First Order logics for pomsets
First Order (FO) logic is obtained by removing the second-order quantification from the MSO logic described in Section 2.3. Given a finite alphabet , the syntax of FO formulas over pomsets is generated by the following grammar:
where is a first order variable and . The semantics is the same as the one of Definition 5, ignoring the two cases related to second-order variables. When dealing with pomsets of dimension , we also consider FO formulas over ST-sequences. Recall that an ST-sequence is simply a word over the finite alphabet , whose elements are starters/terminators. So this is the usual FO logic over words, whose syntax is generated by:
where is a first order variable and . It is interpreted over words , with the usual semantics. We write for the set of FO formulas over .
3.2 The same-event relation
When translating FO formulas from pomsets to ST-sequences, a key difficulty is that first-order variables contain very different information in those two representations. In an FO formula evaluated over a pomset , a variable is interpreted as an element of the pomset, i.e., an event. However, for an formula evaluated over ST-sequences, a variable is interpreted as a position in the sequence, labeled by a letter . Each such letter contains several events (up to , the dimension of the language), but it also contains only a small portion of those events. As seen in the example below, the event of the pomset depicted on the left spans over 4 letters of the ST-sequence on the right.
Thus, to keep track of events in an ST-sequence, we will use pairs where is a first-order variable, selecting one starter/terminator in the ST-sequence; and is the position of the event that we are currently tracking in this starter/terminator. Note that, since we are interested in pomsets of dimension , there are only finitely many possible values for . Since the same event may span several starters/terminators, it may be the case that two different pairs and designate the same event, as in the example below:
Hence, we will need to use the same-event relation , which is true if and only if the -th event of the evaluation of is the -th event of the evaluation of . This is the same idea as in the proof of Lemma 6 found in [2]; however, we will need to show that this relation can actually be defined using only first order formulas. We do so in Lemma 9, by providing a counter-free automaton recognizing it. Counter-free automata are restrictions of finite state automata whose languages are first-order definable.
Definition 7 ([19], Counter-Free Automata).
Let be a deterministic finite-state automaton. is counter-free if there exists a positive integer such that for any non-empty word and for any state , the state-transition function satisfies the following equality: .
Proposition 8 ([19]).
Counter-free automata are as expressive as FO logic over words.
Lemma 9.
Fix . Then, the binary relation is definable by an formula with two free variables and .
Proof (Sketch).
Given an event and two indexes , we build a counter-free automaton that scans an ST-sequence and accepts if and only if the -th element of is the same -event as the -th element of . Figure 5 depicts an example of such an automaton, with event alphabet and pomsets of dimension at most . The -event that the automaton is currently following is depicted in red on each starter/terminator that it reads. Inside the states, we keep track of the list of currently active events (i.e. a conclist ), and the position () of the followed event. Hence, the set of states is , plus an initial, a final and a sink state. See Section B.1 for the precise formal definition of the automaton.
To prove that all are counter-free, consider a state , and an ST-sequence . We need to show that will never fall in a non-trivial cycle when reading repeatedly from . There are several cases:
-
If or , then the execution fails and falls in a sink state after one or two iterations.
-
If and the -th element of is the -th element of , then we are in a trivial cycle (an execution reading from arrives in )
-
If and the -th element of is the -th element of , with (the opposite case is similar), then will keep decreasing strictly as we iterate . The example below illustrates what might happen, with a pomset of dimension . We start in state , so three ’s are running concurrently, and we are tracking the third one (in red). When the automaton reads the word below, the first is terminated, and another is started, but this new is placed after the other two according to event order. The tracked ends up in position 2, so the state of the automaton is now . After decreasing a finite number of times, the execution arrives in the sink state – and fails.
Hence, from any state , the execution enters a trivial cycle in at most steps. Since any execution leaves the initial state in one step, is counter-free (by taking in Definition 7). So can be expressed as an FO formula, and with a disjunction over all we get an FO formula for . See Section B.1 for details.
3.3 Translation of FO formulas from pomsets to ST-sequences
Now that we have proven that the same-event relation is FO-definable, we can inductively translate FO formulas on pomsets to formulas on ST-sequences. The inductive definition of is the same as the one of [2]. We reproduce it in the full version for completeness [4].
Theorem 10.
Let be an FO formula over pomsets without free variables. Then, for any , there exists an formula over such that:
In the full version [4], we show that in the worst case, the size of is , where is the size of . As a corollary of Theorem 10, we can can show that FO is strictly weaker than MSO for pomset languages.
Corollary 11.
FO is strictly weaker than MSO.
Proof.
Consider the language of pomsets , where the exponent denotes gluing iteration. Viewed as a language of ST-sequences (i.e., words on ), this corresponds to . As a language of words, is not definable in (see e.g. [8] for a proof). By the contrapositive of Theorem 10, cannot be defined in FO.
4 A Linear Temporal Logic for Pomsets
In this section, we introduce our Linear Temporal Logic for pomsets, . Using the terminology of [6], it is a local temporal logic, meaning that it is interpreted over a single event of the pomset, rather than on a global state. However, since events can span a long period of time, they are split into so-called sub-events (see Figure 6). While defining a temporal logic directly over events might seem more straightforward, we show in Appendix A that such a logic is strictly less expressive than FO over pomsets. Nonetheless, we will show in Section 5, Theorem 22 that with sub-events, is as expressive as FO over pomsets of dimension .
4.1 Syntax and Semantics
Let us first give an intuitive explanation of the notion of sub-event, relying on the interval representation of a pomset. Consider the pomset depicted in Figure 6. The interval representation of is decomposed in three “slices” (delimited by dotted lines). Each slice corresponds to two consecutive elements of the sparse ST-decomposition of , i.e., a starter and a terminator. Thus, in every slice, some events start, then some events terminate. Intuitively, a sub-event is given by an event together with one of the slices it crosses. For instance, event spans two slices: therefore, it is divided into two sub-events and .
Our formal definition of sub-events does not rely on the ST-decomposition of the pomset. Instead, we define it directly on the pomset itself. A sub-event is a pair of two events, , where is the event being considered, and acts as a timestamp indicating the current slice. One can think of as the latest event to have started. For example, in Figure 6, the sub-event is given by the pair ; while is given by the pair . However, notice that not all pairs of events define sub-events: makes no sense since event is not running when starts. Definition 12 introduces an order that captures these situations.
Definition 12.
Let be a pomset. We say that starts before , denoted if there exists such that and . We write when and , and when or .
Intuitively, means that in every interval representation of , the interval representing starts before the one representing . For example in the pomset of Figure 6, we have and . Observe that is an equivalence relation whose equivalence classes correspond intuitively to the slices of (for example, in Figure 6). Hence, is a total preorder on the events of , and we think of it as a total order on the slices.
Definition 13 (Sub-event).
A sub-event of a pomset is a pair where and . When and , we write .
Note that, when several events start in the same slice, two sub-events may actually represent the same point in the interval representation. This is why we introduce the relation over sub-events. When , we think of and as representing “the same” sub-event. For example, the sub-event denoted by in Figure 6 can be formalized either by or , since . To simplify the presentation, we do not explicitly quotient by the relation . However, we will make sure that whenever , the two sub-events satisfy the same formulas, i.e., iff (see Proposition 18).
Next, we define an order between sub-events. This order will be crucial to ensure that our temporal logic operators can only go forward in time. There are two ways to advance in time: either stay within the same event , but move to a later slice; or terminate the current event and jump to a new event that occurs after .
Definition 14 (Order over sub-events).
Given two sub-events and , we say that precedes in , denoted , if either , or and .
We denote by the non-strict version: if or . Observe that is a (partial) preorder on sub-events. In Figure 6, we have for example and . However, and : it is not allowed to jump to a different event that is concurrent with the current one. Indeed, we want our temporal operators to be able to follow the local view of individual processes. (There will, however, be a different modality allowing to jump to a concurrent event within the same slice.)
Finally, we introduce a one-step version of , which plays the role of our “next” modality.
Definition 15.
if and there is no such that .
Intuitively, the relation only orders events in adjacent slices. For instance, in Figure 6, we have , but . Note that Definition 15 is more restrictive than the requirement that “there is no such that ”. The latter would allow jumping directly from to in Figure 6, skipping a slice. We prefer to ensure that our “next” modality always advances by exactly one slice.
We are now ready to introduce our logic . The “next” modality, denoted , jumps to a successor sub-event in the next slice. Note that it is existential, since there may be more than one successor. The modalities and jump to a concurrent sub-event within the same slice. Recall that in our pomsets, concurrent events are totally ordered by the event order . Finally, the atomic formula (resp. ) checks whether the current sub-event is being started (resp. terminated) in the current slice.
Definition 16 ().
The syntax of is generated by the following grammar:
where . Given a formula and a sub-event , we define the satisfaction relation by induction on the formula :
-
1.
if
-
2.
if and
-
3.
if and there is no s.t. and
-
4.
if
-
5.
if and
-
6.
if there is a sub-event such that and .
-
7.
if there is such that is a sub-event, is a direct successor of by , and
-
8.
if there is such that is a sub-event, is a direct predecessor of by , and
-
9.
if there exists such that , and, for all such that , .
To define what “ satisfies ” means for a given pomset and formula , we need to choose a canonical “source” sub-event of the pomset. Let be the set of events that are minimal according to . Notice that is totally ordered by the event-order relation . Then we let , where . Intuitively, this is the top-left sub-event in an interval representation. Finally, define iff .
Example 17.
In the pomset represented in Figure 7, while . Notice that : since event belongs to the starting interface of the pomset, it was already started in the first slice. Similarly, . The modality allows to jump from to either or , with an existential quantification. It can be read as an “exists next” modality. For instance, we have and , but . However, note that : the “next” modality does not allow to jump to a different event since event is still running (cf. Definition 15). The dual “for all next” modality can be defined as .
The operators and allow to move to a concurrent event following the event order relation, while staying within the current slice. So, crucially, . This was our motivation to introduce the notion of sub-events. Without them, one could inadvertently move forwards or backwards in time by only following event order relations. Note that, within a slice, the event order relation is total. Thus, there can be at most one direct successor. The operator is still existential in a degenerate sense: if there is no successor, the formula is not satisfied. For instance, .
The operator is the usual Until modality with regard to . However, it might be slightly counter-intuitive. Despite the universal quantification over all intermediary sub-events, it may seemingly “miss” events that are concurrent with one of the two endpoints. For instance, in the pomset of Figure 7, : since event is parallel with , the sub-event is not reachable from . In the next section, we will define a variant of the Until operator that also takes into account these parallel events.
As stated earlier, our logic is consistent with the relation. This is proven by induction over the formula; the full proof can be found in Section B.2.
Proposition 18.
Let be a pomset, and let two equivalent sub-events of , then for every formula of , if and only if .
4.2 Derived operators
The precise choice of operators for the logic may seem somewhat arbitrary. It will be justified in Section 5, where we show that it is equivalent to FO. So, any first-order definable temporal operators can also be defined in . We give a few useful examples below. Recall that in the whole paper, we are working with pomsets of bounded dimension . So there can be at most parallel events at any time.
-
Exists parallel: . This operator jumps to some sub-event in the current slice. iff there exists such that is a subevent and . The dual universally quantified operator is .
-
Exists strict parallel: . Similar to the previous one, but this operator must jump to a different sub-event. In particular, if there is no other event currently running, this formula is always false.
-
Finally and Globally: . This is the usual Finally operator of temporal logics: iff there exists a sub-event of such that and . Its dual operator is Globally, defined as .
-
Finally parallel and Globally parallel: . This variant of covers all sub-events that happen later or at the same time as the current sub-event, even those that are on parallel events. iff there exists a sub-event of such that and . The dual universally quantified operator is . Equivalently, one can also define it as .
-
Until parallel: . This variant of the Until modality takes into account events that are concurrent with the two endpoints. More formally, iff there exists a sub-event of the form with such that and for every sub-event such that , .
4.3 Toy example
To illustrate how our logic allows to concisely express properties of concurrent systems, let us consider a very simple example: specifying the correctness of a mutual exclusion algorithm using locks. Thus, suppose that we have a lock mechanism available, with two operations: action to acquire the lock, and action to release it [9]. Now assume that we want our processes to use some critical resource (perhaps a shared data structure) that cannot be accessed concurrently. So, we want to ensure that there can never be two processes executing action concurrently. The obvious solution to this problem is the following: every process runs the program . That is, first acquire the lock, then perform action , and then release the lock (and repeat).
We would like to specify that this implementation of a critical section is correct. For that, we need to specify (i) the behavior of the lock, and (ii) the expected behavior of the mutual exclusion algorithm. We express both of those properties in the language of .
-
(i)
Lock specification. .
This formula expresses that at any point during the execution of the program, whenever an action terminates (i.e., a process acquires the lock), then no other process can acquire the lock () until the lock is released ().
-
(ii)
Mutual exclusion specification. .
This formula expresses that there are never two overlapping events .
What we want to verify is that, assuming the actions behave according to the lock specification, our algorithm ensures the mutual exclusion property is satisfied. The algorithm itself (say, for processes) can be modeled as an HDA, obtained as the parallel composition of copies of one process performing a loop . Executions of this HDA are pomsets, but not all of them satisfy the lock specification. We want to check that every execution that satisfies also satisfies . This amounts to model-checking that every pomset in the language of the HDA satisfies the formula .
5 Expressivity
In this section, we show that has the same expressive power as first order logic for pomsets of bounded dimension. We prove this by providing well-chosen translations between pomset and word logics, thus allowing us to use directly the results of Kamp’s theorem. The translation from to FO can be done by writing the semantics of in FO formulas (see Proposition 21). Since we already gave the translation from FO on pomsets to FO on ST-sequences in Theorem 10, we now have to prove that any LTL formula over ST-sequences can be translated to an equivalent formula.
First, we formalize the intuition given at the start of Section 4.1: the “slices” of a pomset can be obtained by gluing two consecutive elements (a starter and a terminator) of its sparse ST-decomposition. The following definition allows padding the sparse ST-decomposition with identity elements, in order to make sure that it always starts with a starter, and ends with a terminator. We write for the identity pomset with starting and terminating interface .
Definition 19.
Given a pomset with sparse ST-decomposition , the even-sparse ST-decomposition of is where if is a terminator, or otherwise, and if is a starter, or otherwise.
Proposition 20.
For any , for any LTL formula over -dimensional ST-sequences, there exists an formula such that for any pomset with even-sparse decomposition , we have if and only if .
Proof sketch.
Notice that, since one “slice” of a pomset corresponds to two symbols in the ST-decomposition, one application of the Next modality of corresponds to two applications of the Next modality of LTL. Thus, we actually define two translations and by mutual induction. The first translation is the one required to prove the Proposition, . The second translation is used after one application of , when the ST-decomposition starts with a terminator.
For the base case where for some starter or terminator , checks that is indeed a starter, and that the elements in the current slice are exactly those of . Similarly for , we check that is a terminator. To translate the modality, if the current element is a starter, then the next one is the terminator of the same slice: . If, on the contrary, the current element is a terminator, we need to jump to the next slice: . For the Until modality, we need to ensure that any intermediate slice satisfies for both the starter and terminator parts, until the final slice which satisfies either in its starter or terminator part: and .
The complete proof is in the full version [4].
Proposition 21 is proved by expressing the semantics of Definition 16 in FO. All details are in the full version [4]. Then we conclude the proof of expressivity of in Theorem 22.
Proposition 21.
For any formula , there exists an FO formula over pomsets such that, for any pomset , if and only if .
Theorem 22.
For any pomset language of bounded dimension , the two following statements are equivalent:
-
1.
There exists , an FO formula, such that for any pomset , if and only if .
-
2.
There exists , an formula, such that for any pomset , if and only if .
Proof.
Let us proceed as depicted in Figure 8. By Theorem 10, any FO formula over pomsets can be translated into an equivalent FO formula over ST-sequences, accepting exactly the ST-decompositions of pomsets accepted by . This formula can in turn be translated into an equivalent LTL formula by Kamp’s theorem [22]. Finally, by Proposition 20, there is an formula , such that for any pomset , if and only if ’s even-sparse ST-decomposition validates , which in turn is equivalent to the fact that . This proves that FO is at most as expressive as . Proposition 21 ensure that they are in fact equivalent by providing the converse translation.
Remark 23.
All our proofs are constructive, in the sense that algorithms can easily be extracted from our translations and from Kamp’s theorem [22]. Given an FO formula , the size of the associated formula is non-elementary in the size of . This is because there is a non-elementary succinctness gap between FO and LTL over words [22]. For the converse translation, given an formula , the size of the translated formula FO is linear in the size of . The complexity for each translation depicted in Figure 8 can be found alongside the associated proofs in the full version [4].
6 Conclusion and future work
This paper is a first step towards understanding temporal logics on HDA pomset languages. We have established two key results. The first one, Theorem 10, shows that FO formulas on pomsets can be translated to FO on ST-sequences. Our second result is Theorem 22, asserting that the temporal logic is equivalent to FO over pomsets, thus extending Kamp’s theorem to pomset languages.
As future work, it would be insightful to find other characterizations of the class of FO-definable pomset languages, such as defining a notion of counter-free higher dimensional automata. More importantly, a central purpose of temporal logics is the specification and verification of program properties. Thus, the obvious next steps of this work is to design efficient algorithms for deciding satisfiability and model-checking of formulas. It is already known (see [2], Corollary 10) that these problems are decidable for MSO formulas, and thus also for FO formulas. We hope however that verifying formulas directly should yield a better complexity than relying on their FO translation.
References
- [1] Amazigh Amrane, Hugo Bazille, Emily Clement, Uli Fahrenberg, and Krzysztof Ziemianski. Presenting interval pomsets with interfaces. In Uli Fahrenberg, Wesley Fussner, and Roland Glück, editors, Relational and Algebraic Methods in Computer Science - 21st International Conference, RAMiCS 2024, Prague, Czech Republic, August 19-22, 2024, Proceedings, volume 14787 of Lecture Notes in Computer Science, pages 28–45. Springer, 2024. doi:10.1007/978-3-031-68279-7_3.
- [2] Amazigh Amrane, Hugo Bazille, Uli Fahrenberg, and Marie Fortin. Logic and languages of higher-dimensional automata. In Joel D. Day and Florin Manea, editors, Developments in Language Theory - 28th International Conference, DLT 2024, Göttingen, Germany, August 12-16, 2024, Proceedings, volume 14791 of Lecture Notes in Computer Science, pages 51–67. Springer, 2024. doi:10.1007/978-3-031-66159-4_5.
- [3] Amazigh Amrane, Hugo Bazille, Uli Fahrenberg, and Krzysztof Ziemianski. Closure and decision properties for higher-dimensional automata. In Erika Ábrahám, Clemens Dubslaff, and Silvia Lizeth Tapia Tarifa, editors, Theoretical Aspects of Computing - ICTAC 2023 - 20th International Colloquium, Lima, Peru, December 4-8, 2023, Proceedings, volume 14446 of Lecture Notes in Computer Science, pages 295–312. Springer, 2023. doi:10.1007/978-3-031-47963-2_18.
- [4] Emily Clement, Enzo Erlich, and Jérémy Ledent. Expressivity of linear temporal logic for pomset languages of higher dimensional automata. CoRR, abs/2410.12493, 2024. doi:10.48550/arXiv.2410.12493.
- [5] Volker Diekert and Paul Gastin. LTL is expressively complete for mazurkiewicz traces. J. Comput. Syst. Sci., 64(2):396–418, 2002. doi:10.1006/jcss.2001.1817.
- [6] Volker Diekert and Paul Gastin. From local to global temporal logics over mazurkiewicz traces. Theoretical Computer Science, 356(1):126–135, 2006. In honour of Professor Christian Choffrut on the occasion of his 60th birthday. doi:10.1016/j.tcs.2006.01.035.
- [7] Volker Diekert and Paul Gastin. Pure future local temporal logics are expressively complete for mazurkiewicz traces. Inf. Comput., 204(11):1597–1619, 2006. doi:10.1016/j.ic.2006.07.002.
- [8] Volker Diekert and Paul Gastin. First-order definable languages. In Jörg Flum, Erich Grädel, and Thomas Wilke, editors, Logic and Automata: History and Perspectives [in Honor of Wolfgang Thomas], volume 2 of Texts in Logic and Games, pages 261–306. Amsterdam University Press, 2008.
- [9] Edsger W. Dijkstra. The structure of "the"-multiprogramming system. Commun. ACM, 11(5):341–346, 1968. doi:10.1145/363095.363143.
- [10] Uli Fahrenberg, Christian Johansen, Georg Struth, and Krzysztof Ziemianski. Languages of higher-dimensional automata. Math. Struct. Comput. Sci., 31(5):575–613, 2021. doi:10.1017/S0960129521000293.
- [11] Uli Fahrenberg, Christian Johansen, Georg Struth, and Krzysztof Ziemianski. A kleene theorem for higher-dimensional automata. In Bartek Klin, Slawomir Lasota, and Anca Muscholl, editors, 33rd International Conference on Concurrency Theory, CONCUR 2022, September 12-16, 2022, Warsaw, Poland, volume 243 of LIPIcs, pages 29:1–29:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.CONCUR.2022.29.
- [12] Uli Fahrenberg and Krzysztof Ziemianski. A myhill-nerode theorem for higher-dimensional automata. In Luís Gomes and Robert Lorenz, editors, Application and Theory of Petri Nets and Concurrency - 44th International Conference, PETRI NETS 2023, Lisbon, Portugal, June 25-30, 2023, Proceedings, volume 13929 of Lecture Notes in Computer Science, pages 167–188. Springer, 2023. doi:10.1007/978-3-031-33620-1_9.
- [13] Paul Gastin and Dietrich Kuske. Uniform satisfiability in PSPACE for local temporal logics over mazurkiewicz traces. Fundam. Informaticae, 80(1-3):169–197, 2007. doi:10.3233/FUN-2007-801-310.
- [14] Eric Goubault and Samuel Mimram. Formal relationships between geometrical and classical models for concurrency. In Lisbeth Fajstrup, Eric Goubault, and Martin Raussen, editors, Proceedings of the workshop on Geometric and Topological Methods in Computer Science, GETCO 2010, Aalborg, Denmark, January 11-15, 2010, volume 283 of Electronic Notes in Theoretical Computer Science, pages 77–109. Elsevier, 2010. doi:10.1016/j.entcs.2012.05.007.
- [15] André Joyal, Mogens Nielsen, and Glynn Winskel. Bisimulation from open maps. Inf. Comput., 127(2):164–185, 1996. doi:10.1006/inco.1996.0057.
- [16] Johan Anthony Willem Kamp. Tense Logic and the Theory of Linear Order. PhD thesis, Computer Science Department, University of California at Los Angeles, USA, 1968.
- [17] Leslie Lamport. On interprocess communication. part I: basic formalism. Distributed Comput., 1(2):77–85, 1986. doi:10.1007/BF01786227.
- [18] Antoni W. Mazurkiewicz. Trace theory. In Wilfried Brauer, Wolfgang Reisig, and Grzegorz Rozenberg, editors, Petri Nets: Central Models and Their Properties, Advances in Petri Nets 1986, Part II, Proceedings of an Advanced Course, Bad Honnef, Germany, 8-19 September 1986, volume 255 of Lecture Notes in Computer Science, pages 279–324. Springer, 1986. doi:10.1007/3-540-17906-2_30.
- [19] Robert McNaughton and Seymour Papert. Counter-Free Automata, volume Research Monograph, 65. The M.I.T. Press, Cambridge, Mass., 1971.
- [20] Vaughan R. Pratt. Modeling concurrency with geometry. In David S. Wise, editor, Conference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages, Orlando, Florida, USA, January 21-23, 1991, pages 311–322. ACM Press, 1991. doi:10.1145/99583.99625.
- [21] Cristian Prisacariu. Modal logic over higher dimensional automata. In Paul Gastin and François Laroussinie, editors, CONCUR 2010 - Concurrency Theory, 21th International Conference, CONCUR 2010, Paris, France, August 31-September 3, 2010. Proceedings, volume 6269 of Lecture Notes in Computer Science, pages 494–508. Springer, 2010. doi:10.1007/978-3-642-15375-4_34.
- [22] Alexander Rabinovich. A proof of kamp’s theorem. Logical Methods in Computer Science, Volume 10, Issue 1:730, 2014. doi:10.2168/LMCS-10(1:14)2014.
- [23] Marcel Paul Schützenberger. On finite monoids having only trivial subgroups. Information and Control, 8(2):190–194, 1965. doi:10.1016/S0019-9958(65)90108-7.
- [24] P. S. Thiagarajan. A trace based extension of linear time temporal logic. In Proceedings of the Ninth Annual Symposium on Logic in Computer Science (LICS ’94), Paris, France, July 4-7, 1994, pages 438–447. IEEE Computer Society, 1994. doi:10.1109/LICS.1994.316047.
- [25] P.S. Thiagarajan and I. Walukiewicz. An expressively complete linear time temporal logic for mazurkiewicz traces. Information and Computation, 179(2):230–249, 2002. doi:10.1006/inco.2001.2956.
- [26] Rob J. van Glabbeek. On the expressiveness of higher dimensional automata. Theor. Comput. Sci., 356(3):265–290, 2006. doi:10.1016/j.tcs.2006.02.012.
- [27] Safa Zouari, Krzysztof Ziemianski, and Uli Fahrenberg. Bisimulations and logics for higher-dimensional automata. CoRR, abs/2402.01589, 2024. doi:10.48550/arXiv.2402.01589.
Appendix A Discussion: Why we need sub-events
In this section, we present a temporal logic that is weaker than FO, which we call Event-based Pomset Temporal Logic (EPTL). This is a straightforward attempt at defining a local temporal logic for pomsets, with two “Exists Next” operators for the precedence order and for the event order . It is similar to the local temporal logic over Mazurkiewicz traces defined in [7]. This example showcases why it is not easy to design an LTL-like logic over pomsets that is equivalent to FO, and why we had to introduce the notion of sub-events.
Definition 24 (Events-based Pomset Temporal Logic (EPTL)).
The syntax of EPTL formulas is defined by the following grammar, where :
An EPTL formula is evaluated over a single event of a pomset :
-
if , if , if ,
-
if , if and ,
-
if , is a direct successor of for and ,
-
if , is a direct successor of for and ,
-
if and such that , .
In order to define , where is an EPTL formula, we need to fix a canonical from which will be interpreted. This motivates Definition 25.
Definition 25.
Given a non-empty pomset , the source of , denoted , is the minimal event according to of .
We write if . Note that the unary predicate verifying whether is a source is FO-definable, define .
Proposition 26.
EPTL is stricly less expressive than FO.
Proof (Sketch).
First, EPTL is at most as expressive as FO since its semantics expressed in Definition 24 can be translated into first order formulas. To show that the inclusion is strict, consider the following two families of pomsets, depicted in Figure 9:
Consider the FO formula , where and denote the direct successor w.r.t. and , respectively. The formula separates the two languages, i.e., but for all . Now we must show that any EPTL formula of size cannot distinguish the pomsets and . First, atomic formulas (, and ) cannot distinguish between elements of and , since all events are labeled by , and the interfaces are empty. Moreover, notice that starting from (in orange in Figure 9) or (in purple), there is a chain of length for both relations and . Thus, using modalities and to distinguish from would require to reach the last elements of the pomset, which cannot be done in less than steps. Finally, the until modality cannot distinguish them either: this is a bit more technical but fairly standard. So we conclude that the language is not definable in EPTL.
Remark 27.
To separate the two languages in , one can remark that in the second slice of the pomsets , there is an event (in orange) which is both started and terminated. Thus, the formula is satisfied in all pomsets of the form , but in none of the pomsets .
Appendix B Omitted proofs
B.1 Proof of Lemma 9
Lemma 28.
Fix . Then, the binary relation is definable by an formula with two free variables and .
Proof.
We define a finite state automaton that scans the ST-sequence between the two positions and . During all the execution, the automaton keeps track the position of the event represented by the -th position of . Showing that this automaton is counter-free yields an formula for the relation, thus proving the lemma. Formally, given and , we define a finite state automaton over the alphabet , parameterized by , as follows:
-
The set of states is given by:
The states represent the initial state, final state, and sink state, respectively. All other states are of the form , where is the list of currently active events, and the event that we are following is the -th element in this conclist.
-
The initial state is .
-
The set of accepting states is (recall that is a parameter fixed in advance).
-
The transition function is defined as follows, for any :
if is a non-terminating if is a terminating and for any when and is an if is a terminating otherwise where denotes is the -th element of the conclist .
Figure 10 shows the automaton , for and . For the sake of readability, when an interface is represented enclosed in parenthesis (e.g. ), we mean that both transitions exist, with and without the interface (e.g. and ). The event that we are tracking is colored in red.
Note that is deterministic and complete. We now show that it is counter-free. So we need to find an such that, for any non-empty word and any state , we have . Choose . Consider an arbitrary state and a non-empty word . We have three cases:
-
1.
If or , the only accessible state on a non-empty word is the sink state , verifying the property.
-
2.
If , let us consider .
-
(a)
If , we indeed have .
-
(b)
If , with , then since either the starting interface or the terminating interface of will be incompatible with . Thus, the property is verified.
-
(c)
If , with , assume that (the opposite case is similar). We claim that, as we keep iterating the word , the index will keep decreasing strictly, until we reach either the state or after at most iterations. So at iteration , we end up in , where we stay, making the property true. To prove our claim, let us write the sequence of visited states. We need to show that the sequence is strictly decreasing.
The example below illustrates what might happen, with a pomset of dimension . We start in state , so three ’s are running concurrently, and we are tracking the third one (in red). When the automaton reads the word below, the first is terminated, and another is started, but this new happens to be placed after the other two according to event order. The tracked ends up in position 2, so the state of the automaton is now .
Let us assume that for some , , we will show that at the next step, . Let be the pomset generated by gluing (the automaton ensures that is coherent, otherwise we end up in the sink state ). Let denote the events of at position and respectively, in the starting interface . (In the example above, they are the red and blue events, respectively.) Since , we must have according to event order. In the terminating interface , both events are still active. Event ends up at position and ends up at position . Since these are still the same events, the event order did not change, so we still have , i.e., as required.
-
(a)
-
3.
If , we have since is non-empty and there is no incoming transition in . So we land in one in the previous cases, with one extra step. Hence, .
This proves that is counter-free. By Proposition 8, let be a closed first-order formula equivalent that recognizes the same language as . By , we denote the restriction of to the portion of the ST-sequence located between and , i.e. where subformulas of the form are inductively replaced by . Then the following formula defines :
B.2 Proof of Proposition 18
Proposition 29.
Let be a pomset, and let two equivalent sub-events of , then for every formula of , if and only if .
Proof.
First observe that is an equivalence relation over events. Indeed, it is reflexive since implies and symmetric by construction. As for transitivity, assume that . To show that , it is enough to show . Assume by contradiction that there is s.t. , and . Then, we prove as follows:
-
If , then because . But this is false since .
-
If , then since . This implies that , which is false by hypothesis.
Since , . Therefore, as , it cannot be that . Since this was a hypothesis, we have a contradiction, and .
We can now proceed to the main proof. It is sufficient to prove that implies . First, observe that by definition of , hence we write from now on. We proceed by induction over .
-
implies , thus
-
implies . Since , this yields , which in turn becomes
-
implies that there is no such that and . Since , is equivalent to . This in turn implies .
-
implies , which implies, by induction hypothesis, . Thus, .
-
implies and . Hence, by induction hypothesis, and . It comes that .
-
implies that there exists a sub-event such that and . Because , we have that and there is no such that . Since , it comes that and there is no such that . Thus, and .
-
implies that there is such that , is a direct successor of by and . Since , is a sub-event and by induction. Hence, .
-
For , the argument is identical.
-
Finally, for , fix to be such that and and any such that verifies . Since , we have that implies , and the same goes for the intermediary . Hence, .
