This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

The Quotient in Preorder Theories

Íñigo X. Íncer Romeo University of California, Berkeley, USA [email protected] Raytheon Technologies Research Center, Rome, ItalyUniversità di Verona, ItalyUniversity of California, Berkeley, USA    Leonardo Mangeruca Raytheon Technologies Research Center, Rome, Italy [email protected] Università di Verona, ItalyUniversity of California, Berkeley, USA    Tiziano Villa Università di Verona, Italy [email protected] University of California, Berkeley, USA    Alberto Sangiovanni-Vincentelli University of California, Berkeley, USA [email protected]
Abstract

Seeking the largest solution to an expression of the form AxBAx\leq B is a common task in several domains of engineering and computer science. This largest solution is commonly called quotient. Across domains, the meanings of the binary operation and the preorder are quite different, yet the syntax for computing the largest solution is remarkably similar. This paper is about finding a common framework to reason about quotients. We only assume we operate on a preorder endowed with an abstract monotonic multiplication and an involution. We provide a condition, called admissibility, which guarantees the existence of the quotient, and which yields its closed form. We call preordered heaps those structures satisfying the admissibility condition. We show that many existing theories in computer science are preordered heaps, and we are thus able to derive a quotient for them, subsuming existing solutions when available in the literature. We introduce the concept of sieved heaps to deal with structures which are given over multiple domains of definition. We show that sieved heaps also have well-defined quotients.

1 Introduction

The identification of missing objects is a common task in engineering. Suppose an engineer wishes to implement a design with a mathematical description BB, and will use a component with a description AA to implement this design. In order to find out what needs to be added to AA in order to implement BB, the engineer seeks a component xx in an expression of the form Ax=BA\bullet x=B, where \bullet is an operator yielding the composite of two design elements. Many compositional theories include the notion of a preorder, usually called refinement. The statement ACA\leq C usually reads “AA refines CC” or “AA is more specific than CC.” In this setting, the problem is recast as finding an xx such that AxBA\bullet x\leq B. It is often assumed that the composition operation is monotonic with respect to this preorder. Therefore, if xx is a solution, so is any yy satisfying yxy\leq x. This focuses our attention on finding the largest xx that satisfies the expression. The literature often calls this largest solution quotient.

1.1 Background

The logic synthesis community has been a pioneer in defining and solving special cases of the quotient problem for combinational and sequential logic circuit design ([25, 13]) under names like circuit rectification or engineering change or component replacement. In combinational synthesis, much work has been reported to support algebraic and Boolean division: given dividend ff and divisor gg, find the quotient qq and remainder rr such f=qg+rf=q\cdot g+r (for ,+\cdot,+ standard Boolean operators AND and OR, respectively), as key operation to restructure multi-level Boolean networks [18]. The quotient problem for combinational circuits was formulated as a general replacement problem in [10]: given the combinational circuits AA and CC whose synchronous composition produces the circuit specification BB, what are the legal replacements of CC that are consistent with the input-output relation of BB? The valid replacements for CC were defined as the combinational circuits xx such that AxBA\circ x\subseteq B, and the largest solution for xx was characterized by the closed formula x=(AB)x=\left(A\circ B^{\bot}\right)^{\bot}, where ()(\cdot)^{\bot} is a unary operator that complements the input-output relation of the circuit to which it is applied (switching the inputs and outputs), while a hiding operation gets rid of the internal signals.

In sequential optimization, the typical question addressed was, given a finite-state machine (FSM) AA, find an FSM xx such that their synchronous composition produces an FSM behaviorally equivalent to a specification FSM BB, i.e., solve over FSMs the equation Ax=BA\circ x=B, where \circ is synchronous composition and equality is FSM input-output equivalence. Various topologies were solved, starting with serial composition where the unknown was either the head or tail machine, to more complex interconnections with feedback. As a matter of fact, sometimes both AA and xx were known, but the goal was to change them into FSMs yielding better logical implementations, while preserving their composition, with the objective to optimize a sequential circuit by computing and exploiting the flexibility due to its modular structure and its environment (see [18, 39, 22]). An alternative formulation of FSM network synthesis was provided by encoding the problem in the logic WS1S (Weak Second-Order Logic of 1 Successor), which enables to characterize the set of permissible behaviors at a node of a given network of FSMs by WS1S formulas [2], corresponding to regular languages and so to effective operations on finite state automata. 111A detailed survey of previous work in this area can be found in [24, 41].

Another stream of contributions has been motivated by component-based design of parallel systems with an interleaving semantics (denoted in our exposition by the composition operator \diamond). The problem is stated by Merlin and Bochmann [32] as follows: “Given a complete specification of a given module and the specifications of some submodules, the method described below provides the specification of an additional submodule that, together with the other submodules, will provide a system that satisfies the specification of the given module.” The problem was reduced to solving equations or inequalities over process languages, which are usually prefix-closed regular languages represented by labeled transition systems. A closed-form solution of the inequality AxBA\diamond x\subseteq B over prefix-closed regular languages, written as proj_x(AB)proj_x(AB¯)proj_{\_}x(A\diamond B)-proj_{\_}x(A\diamond\overline{B}) (where proj_xproj_{\_}x is a projection over the alphabet of xx), was given in [32, 20].222For a discussion about the maximality of this solution and for more references, we refer to [41], Sec. 5.2.1. This approach to solve the equation Ax=BA\diamond x=B has been further extended to obtain restricted solutions that satisfy properties such as safety and liveness, or are restricted to be FSM languages, which need to be input-progressive and avoid divergence (see [20, 8, 41]). The quotient problem has been investigated also for delay-insensitive processes to model asynchronous sequential circuits, see [14, 31, 33]. Equations of the form AxBA\diamond x\leq B were defined, and their largest closed-form solutions were written as x=(AB)x=\left(A\diamond B^{\sim}\right)^{\sim}, where ()(\cdot)^{\sim} is a suitable unary operation.

An important application from discrete control theory is the model matching problem: design a controller whose composition with a plant matches a given specification (see [3, 17]). Another significant application of the quotient computation has been the protocol design problem, and in particular, the protocol conversion problem (see [28, 19, 36, 34, 26, 21, 42, 12]). Protocol converter synthesis has been studied also over a variant of Input/Output Automata (IOA, [30]), called Interface Automata (IA, [16, 15]), yielding a similar quotient equation A_IAxBA\diamond_{\_}{IA}x\subseteq B and closed-form solution (A_IAB)\left(A\diamond_{\_}{IA}B^{\bot}\right)^{\bot}, where _IA\diamond_{\_}{IA} is an appropriate interleaving composition defined for interface automata, and ()(\cdot)^{\bot} is again a unary operation [7].

Some research focused on modal specifications represented by automata whose transitions are typed with may and must modalities, as in [29, 37], with a solution of the quotient problem for nondeterministic automata provided in  [4]. It is outside the scope of this paper to address the quotient problem for real-time and hybrid systems (see [11, 9] for verification and control in such settings).

As seen above, the quotient problem was studied by different research communities working on various application domains and formalisms. Often similar formulations and solutions were reached albeit obfuscated by the different notations and objectives of the synthesis process. This motivated a concentrated effort to distill the core of the problem, modeling it as solving equations over languages of the form AxBA\parallel x\preceq B, where AA and BB are known components and xx is unknown, \parallel is a composition operator, and \preceq is a conformance relation (see [40] and the monograph [41] for full accounts). The notion of language was chosen as the most basic formalism to specify the components of the equation, and language containment \subseteq was selected as conformance relation. Two basic composition operators were defined each encapsulating a family of variants: synchronous composition (\bullet) modeling the classical step-lock coordination, and interleaving composition (\diamond) modeling asynchrony by which components may progress at different rates (there are subtle issues in comparing the two types, as mentioned in [27, 43]). Therefore two language equations were defined: AxBA\bullet x\subseteq B and AxBA\diamond x\subseteq B, where the details of the operations to convert alphabets according to the interconnection topologies are hidden in the formula. It turned out that the largest solutions have the same structure, respectively, AB¯¯\overline{A\bullet\overline{B}} and AB¯¯\overline{A\diamond\overline{B}}. This led to investigate the algebraic properties required by the composition operators to deliver the previous largest closed-form solutions to unify the two formulas [40]. This effort assumed that the underlying objects were sets, and that their operations were given in terms of set operations. This work, thus, could not account for quotient computations in more complex theories, like interface automata.

As a parallel development, in recent years we have seen the growth of a rigorous theory of system design based on the algebra of contracts (see the monograph [6]). In this theory, a strategic role is played by assume-guarantee (AG) contracts, in which the missing component problem arises: when the given components are not capable of discharging the obligations of the requirements, define a quotient operation that computes the contract for a component, so that by its addition to the original set the resulting system fulfills the requirements. The quotient of AG contracts was completely characterized very recently by a closed-form solution proved in [38]. Once again, the syntax of the quotient has the form (AB1)1\left(A\parallel B^{-1}\right)^{-1} for contracts AA and BB and standard contract operations.

In summary, even though the concrete models of the components, composition operators, conformance relations and inversion functions vary significantly across chosen models and application domains, the quotient formulas have similar syntax across theories.

1.2 Motivation and contributions

The motivation of this paper is to propose the underlying mathematical structure common to all these instances of quotient computation to be able to derive directly the solution formula for any equation satisfying the properties of this common structure.

We show that we can compute the quotient by only assuming the axioms of a preorder, enriched with a binary operation of source multiplication and a unary involution operation. In particular we introduce the new algebraic notion of preordered heaps characterized by a condition, called admissibility, which guarantees the existence of the solution and yields a closed form for it. Then we show that a number of theories in computer science meet this condition, e.g., Boolean lattices, AG contracts, and interface automata; so for all of them we are able to (re-)derive axiomatically the formulas that compute their related quotients. We also introduce the concept of sieved heaps to deal with structures defined over multiple domains, and we show that the equations AxBA\bullet x\leq B admit a solution also over sieved heaps, generalizing the known solutions of equations on languages over multiple alphabets with respect to synchronous and interleaving composition, well studied in the literature.

1.3 Organization

The paper is structured as follows. Sec. 2 develops the basic mathematical machinery of preordered heaps, whereas Sec. 3 shows that various theories are preordered heaps. Sec. 4 introduces sieved heaps, whereas Sec. 5 applies them to equations over languages with multiple alphabets. Sec. 6 concludes. Some proofs are omitted due to space constraints.

2 Preordered heaps

In this section we introduce an algebraic structure for which the existence of quotients is guaranteed. We show in Section 3 that many theories in computer science are instances of this concept. First we introduce the notation we will use:

  • Let PP be a set and let μ:P×PP\mu\colon P\times P\to P be a binary operation on PP. For any element aPa\in P, we let μa:PP\mu_{a}\colon P\to P be the function μa=μ(a×id)\mu_{a}=\mu\circ(a\times\text{id}), where id is the identity operator and (a×id):PP2(a\times\text{id})\colon P\to P^{2} is the unary function (a×id):b(a,b)(a\times\text{id})\colon b\mapsto(a,b). Similarly, we let μa=μ(id×a)\mu^{a}=\mu\circ(\text{id}\times a). If we call μ\mu multiplication, μ_a\mu_{\_}a is left multiplication by aa, and μa\mu^{a} is right multiplication by aa.

  • For any set PP, we let the mapping flip:P×PP×P\text{flip}\colon P\times P\to P\times P be flip(a,b)=(b,a)\text{flip}(a,b)=(b,a) (a,bPa,b\in P).

  • Consider a set PP and a binary relation \leq on PP. Then \leq is a preorder if it is reflexive and transitive; i.e., for all a,ba,b and cc in PP, we have aa(reflexivity)a\leq a~{}\text{(reflexivity)} and if abandbcthenaca\leq b~{}\text{and}~{}b\leq c~{}\text{then}~{}a\leq c (transitivity). If a preorder is antisymmetric, (aba\leq b and bab\leq a implies a=ba=b), then it is a partial order.

  • Let (P,)(P,\leq) be a preorder and let a,bPa,b\in P. If aba\leq b and bab\leq a, we write aba\simeq b.

  • Let F:PPF\colon P\to P. We say that FF is monotonic or order-preserving if abFaFba\leq b\Rightarrow Fa\leq Fb for all a,bPa,b\in P. Similarly, we say that FF is antitone or order-reversing if abFbFaa\leq b\Rightarrow Fb\leq Fa for all a,bPa,b\in P.

  • Suppose that L,R:PPL,R\colon P\to P are two monotonic maps on PP. We say that (L,R)(L,R) form an adjoint pair, or that LL is the left adjoint of RR (RR is respectively the right adjoint of LL), or that the pair (L,R)(L,R) forms a Galois connection when for all b,cPb,c\in P, we have LbcLb\leq c if and only if bRcb\leq Rc.

  • Let F,G:PPF,G\colon P\to P be functions on a preorder PP. We say that FGF\leq G when FaGaFa\leq Ga for all aPa\in P.

2.1 The concept of preordered heap

As we discussed in the introduction, many times in engineering and computer science one encounters expressions of the form AxBA\bullet x\leq B, and one wishes to solve for the largest xx that satisfies the expression. The symbols have different specific meanings in the various domains, yet in all applications we know, the syntax for computing the quotient always has the form AB¯¯\overline{A\bullet\overline{B}}, where ()¯\overline{(\cdot)} is an involution (i.e., a unary operator which is its own inverse). To give meaning to the inequality, at a minimum we need a preorder and a binary operation; to give meaning to the quotient expression, we need to assume the existence of an involution. In all compositional theories, the refinement order has the connotation of specificity: if aba\leq b then aa is a refinement of bb. The binary operation is usually interpreted as composition. The product aba\bullet b is understood as the design obtained when operating both aa and bb in a topology given by the mathematical description of each component. The unary operation is sometimes understood as giving an external view on an object. If a component has mathematical description aa, then a¯\overline{a} gives the view that the environment has of the design element. In Boolean algebras, this unary operation is negation. In interface theories, it’s usually an operation which switches inputs and output behaviors.

We thus introduce an algebraic structure consisting of a preorder, a binary operation which is monotonic in both arguments, and an involution which is antitone. We have called the binary operation source multiplication for reasons having to do with category theory: we will show that this operation serves as the left functor of an adjunction. Therefore, its application to an object of the preorder yields the source of one of the two arrows in the adjunction. Why not simply call it multiplication? Because source multiplication together with the involution generate another binary operation. This second operation we call target multiplication because its application to an object yields the target of one of the arrows in the adjunction. The unary operation will simply be called involution.

The algebraic structure will be called preordered heap. The inspiration came from engineering design. In some design methodologies, design elements at the same level of abstraction are not comparable in the refinement order. Indeed, a refinement of a design element usually yields a design element in a more concrete layer. But we are placing all components under the same mathematical structure. This suggested the name heap. We add the adjective preorder simply to differentiate the concept from existing algebraic heaps. We are ready for the definition:

Definition 2.1.

A preordered heap is a structure (P,,μ,γ)(P,\leq,\mu,\gamma), where (P,)(P,\leq) is a preorder; μ:P×PP\mu\colon P\times P\to P is a binary operation on PP, monotonic in both arguments, called source multiplication; and γ:PP\gamma\colon P\to P is an antitone operation on PP called involution. These operations satisfy the following axioms:

  • A1: γ2=id\gamma^{2}=\text{id}.

  • A2a (left admissibility): μaγμaγid(aP)\mu_{a}\circ\gamma\circ\mu^{a}\circ\gamma\leq\text{id}\quad\quad(a\in P).

  • A2b (right admissibility): μaγμaγid(aP)\mu^{a}\circ\gamma\circ\mu_{a}\circ\gamma\leq\text{id}\quad\quad(a\in P).

Note 2.1.

In Definition 2.1, we did not assume commutativity in μ\mu. If μ\mu is commutative, we have μ=μflip\mu=\mu\circ\text{flip}, so μa=μ(a×id)=μflip(a×id)=μ(id×a)=μa\mu_{a}=\mu\circ(a\times\text{id})=\mu\circ\text{flip}\circ(a\times\text{id})=\mu\circ(\text{id}\times a)=\mu^{a}. It follows that for a commutative preordered heap, axioms A2a and A2b become

(μaγ)2id.(\mu_{a}\circ\gamma)^{2}\leq\text{id}. (1)

We have discussed all elements in the definition of a preordered heap, except for the admissibility conditions. What are they? Consider left admissibility: μaγμaγid\mu_{a}\circ\gamma\circ\mu^{a}\circ\gamma\leq\text{id}. Let bPb\in P and set B=(γμaγ)(b)B=(\gamma\circ\mu^{a}\circ\gamma)(b). Left admissibility means that BB satisfies the expression μ(a,x)b\mu(a,x)\leq b. Similarly, set C=(γμaγ)(b)C=(\gamma\circ\mu_{a}\circ\gamma)(b). Right admissibility means that CC satisfies μ(x,a)b\mu(x,a)\leq b. When μ\mu is commutative, we of course have B=CB=C. We will soon show a surprising fact: the axioms of a preordered heap are sufficient to guarantee that BB and CC are in fact the largest solutions to both expressions, i.e., BB and CC are the quotients for left and right source multiplication, respectively. We show this immediately after introducing an important binary operation called target multiplication, but first we consider an example.

Example.

Consider a Boolean lattice BB. The lattice is clearly a preorder. Take the involution to be the negation operator. This is an antitone operator and satisfies A1: ¬¬b=b\neg\neg b=b for all bBb\in B. Take source multiplication to be the meet of the lattice (i.e., logical AND). This operation is monotonic in the preorder. Since this source multiplication is commutative, the admissibility conditions reduce to checking (1). For a,bBa,b\in B, we have (μ_aγ)2b=a¬(a¬b)=a(¬ab)=abb(\mu_{\_}a\circ\gamma)^{2}b=a\land\neg(a\land\neg b)=a\land(\neg a\lor b)=a\land b\leq b. Thus, the Boolean lattice satisfies the admissibility conditions, making it a preordered heap.

2.2 Target multiplication

For the rest of this section, let (P,,μ,γ)(P,\leq,\mu,\gamma) be a preordered heap. We define the target multiplication τ:P×PP\tau\colon P\times P\to P as τ=γμ(γ×γ)\tau=\gamma\circ\mu\circ(\gamma\times\gamma). Since γ2=id\gamma^{2}=\text{id} (axiom A1), we can also write μ=γτ(γ×γ)\mu=\gamma\circ\tau\circ(\gamma\times\gamma), i.e., the diagram P×P{P\times P}P{P}P×P{P\times P}P{P}γ×γ\scriptstyle{\gamma\times\gamma\,}μ\scriptstyle{\mu}τ\scriptstyle{\tau}γ\scriptstyle{\gamma} commutes.

We could have defined a preordered heap in terms of target multiplication instead of source multiplication. The two operations are closely linked. In fact, we will see in the next section that these operations form an adjoint pair.

Example.

We showed that Boolean lattices are preordered heaps. For BB a Boolean lattice and a,bBa,b\in B, we have τ(a,b)=γμ(γa,γb)=¬(¬a¬b)=ab\tau(a,b)=\gamma\circ\mu(\gamma a,\gamma b)=\neg(\neg a\land\neg b)=a\lor b. This suggests that the relation between source and target multiplications is a generalization of De Morgan’s identities for Boolean algebras.

We will use the following identities: for aPa\in P,

μa=γτ(γ×γ)(a×id)=γτ(γa×id)γ=γτγaγandμa=γτ(γ×γ)(id×a)=γτ(id×γa)γ=γτγaγ.\displaystyle\begin{aligned} \mu_{a}&=\gamma\circ\tau\circ(\gamma\times\gamma)\circ(a\times\text{id})=\gamma\circ\tau\circ(\gamma a\times\text{id})\circ\gamma=\gamma\circ\tau_{\gamma a}\circ\gamma\quad\quad\text{and}\\ \mu^{a}&=\gamma\circ\tau\circ(\gamma\times\gamma)\circ(\text{id}\times a)=\gamma\circ\tau\circ(\text{id}\times\gamma a)\circ\gamma=\gamma\circ\tau^{\gamma a}\circ\gamma.\end{aligned} (2)

2.3 Solving inequalities in preordered heaps

For a,bPa,b\in P, we are interested in the conditions under which we can find the largest xPx\in P such that μ(a,x)b\mu(a,x)\leq b. The following theorem says that source multiplication in a preordered heap is “invertible.”

Theorem 2.2.

Let (P,,μ,γ)(P,\leq,\mu,\gamma) be a preordered heap and let τ\tau be its target multiplication. Then for aPa\in P, (μa,τγa)(\mu_{a},\tau^{\gamma a}) and (μa,τγa)(\mu^{a},\tau_{\gamma a}) are adjoint pairs.

Proof.

Let b,cPb,c\in P with bτγa(c)b\leq\tau^{\gamma a}(c). We have μa(b)(μaτγa)(c)=(μaγμaγ)(c)c\mu_{a}(b)\leq(\mu_{a}\circ\tau^{\gamma a})(c)=(\mu_{a}\circ\gamma\circ\mu^{a}\circ\gamma)(c)\leq c, by left admissibility (by A2a).

Conversely, assume that μa(b)c\mu_{a}(b)\leq c. Then

μaγ2(b)\displaystyle\mu_{a}\circ\gamma^{2}(b) c\displaystyle\leq c (by A1)
γ(μaγ)(γb)\displaystyle\gamma\circ(\mu_{a}\circ\gamma)(\gamma b) γ(c)\displaystyle\geq\gamma(c)
(μaγ)(μaγ)(γb)\displaystyle(\mu^{a}\circ\gamma)\circ(\mu_{a}\circ\gamma)(\gamma b) (μaγ)(c)\displaystyle\geq(\mu^{a}\circ\gamma)(c)
(γb)\displaystyle(\gamma b) (μaγ)(c)\displaystyle\geq(\mu^{a}\circ\gamma)(c) (by A2b)
b\displaystyle b (γμaγ)(c)=τγa(c).\displaystyle\leq(\gamma\circ\mu^{a}\circ\gamma)(c)=\tau^{\gamma a}(c). (by A1)

The adjointness of (μa,τγa)(\mu^{a},\tau_{\gamma a}) follows from a similar reasoning. ∎

The fact that (μa,τγa)(\mu_{a},\tau^{\gamma a}) is an adjoint pair means that left source multiplication by aa is “inverted” by right target multiplication by γa\gamma a, i.e.,

μ(a,x)bif and only ifxτ(b,γa).\mu(a,x)\leq b\quad\text{if and only if}\quad x\leq\tau(b,\gamma a).

In other words, the largest solution of μ(a,x)b\mu(a,x)\leq b is x=τ(b,γa)x=\tau(b,\gamma a). Using the familiar multiplicative notation for source multiplication, and ()/a=τγa(\cdot)/a=\tau^{\gamma a} for “right division by aa,” we have shown that the largest solution of axbax\leq b is x=b/ax=b/a. Calling a\()=τγaa\backslash(\cdot)=\tau_{\gamma a} “left division by aa,” we have shown that the largest solution of xabxa\leq b is x=a\bx=a\backslash b. These two divisions are related as follows:

Corollary 2.3 (Isolating the unknown).

Let PP be a preordered heap and a,x,yPa,x,y\in P. Then ya/xy\leq a/x if and only if xy\ax\leq y\backslash a.

Proof.

By two applications of Theorem 2.2, we obtain ya/x=τγx(a)μ(x,y)axτγy(a)=y\ay\leq a/x=\tau^{\gamma x}(a)\Leftrightarrow\mu(x,y)\leq a\Leftrightarrow x\leq\tau_{\gamma y}(a)=y\backslash a. ∎

Theorem 2.2 is our main result. It shows that preordered heaps have sufficient structure for the computation of quotients. When we prove that a structure is a preordered heap, this theorem immediately yields the existence of an adjoint for multiplication, and its closed form.

In general, to show that a theory is a preordered heap, we must identify its involution and source multiplication. Then we have to verify the admissibility conditions. How difficult is that? Our original problem was identifying the largest xx satisfying μ(a,x)b\mu(a,x)\leq b for some notion of multiplication μ\mu, involution γ\gamma, and preorder \leq. As we discussed, left admissibility requires that τγab\tau^{\gamma a}b satisfies the inequality μ(a,x)b\mu(a,x)\leq b, and right admissibility requires that τ_γab\tau_{\_}{\gamma a}b satisfies μ(x,a)b\mu(x,a)\leq b. What the theorem tells us is that they are the largest solutions to μ(a,x)b\mu(a,x)\leq b and μ(x,a)b\mu(x,a)\leq b, respectively. In other words, the theorem saves us the effort of making an argument for the optimality of the solutions.

Theorem 2.2 also suggests the following observation. For a given aPa\in P, we have adjoint pairs (μ_a,τγa)(\mu_{\_}a,\tau^{\gamma a}) and (μa,τ_γa)(\mu^{a},\tau_{\_}{\gamma a}). As we noticed, this means we can find the largest xx such that μ(a,x)b\mu(a,x)\leq b or μ(x,a)b\mu(x,a)\leq b. But it also means that we can find the smallest xx such that bτ(a,x)b\leq\tau(a,x) or bτ(x,a)b\leq\tau(x,a). This is because, μ_γa\mu_{\_}{\gamma a} is the left adjoint of τa\tau^{a}, and μγa\mu^{\gamma a} is the left adjoint of τ_a\tau_{\_}{a}. For all examples we will discuss, source multiplication plays the role of the usual composition operation of the theory. But preordered heaps make it clear that μ\mu and τ\tau are closely related operations. In fact, preordered heaps generalize De Morgan’s identities (see section 2.2). Thus, while inequalities of the form μ(a,x)b\mu(a,x)\leq b are more common in the literature, preordered heaps indicate that we can also solve inequalities of the form bτ(a,x)b\leq\tau(a,x). As we will see, for some theories there is clear understanding of how target multiplication can be used, but for others its use is unknown.

Example.

In the case of a Boolean lattice BB, what is the quotient? We showed in previous examples that BB is a preordered heap, and we identified its target multiplication. For a,bBa,b\in B, we can write an expression of the form μ(a,x)b\mu(a,x)\leq b. By Theorem 2.2, we know the largest xx that satisfies this expression is τγab=τ(b,¬a)=b¬a\tau^{\gamma a}b=\tau(b,\neg a)=b\lor\neg a, i.e., the quotient is the implication aba\to b.

2.4 Preordered heaps with identity

In the definition of a preordered heap, we did not assume that source multiplication has an identity. Here we consider briefly what happens when it does. Multiplicative identities are common, and in fact, there exists a multiplicative identity in all compositional theories we know.

Suppose PP is a preordered heap and ePe\in P is a left identity for source multiplication, i.e., μeid\mu_{e}\simeq\text{id}. By Theorem 2.2, (id,τγe)(\text{id},\tau^{\gamma e}) is an adjoint pair. The right adjoint of id is id. Since adjoints are unique up to isomorphism, τγeid\tau^{\gamma e}\simeq\text{id}. This means that γe\gamma e is a right identity element for τ\tau. Moreover, in view of (2), τγeid\tau_{\gamma e}\simeq\text{id}. By Theorem 2.2, (μe,id)(\mu^{e},\text{id}) is an adjoint pair. By the same reasoning just followed, we must have μeid\mu^{e}\simeq\text{id}. We record this result:

Corollary 2.4.

Let (P,,μ,γ)(P,\leq,\mu,\gamma) be a preordered heap. If ePe\in P is a left (or right) identity for source multiplication, it is a double-sided identity for source multiplication, and γe\gamma e is a double-sided identity for target multiplication. Analogously, if ePe\in P is a left (or right) identity for target multiplication, it is a double-sided identity for target multiplication, and γe\gamma e is a double-sided identity for source multiplication.

Example.

Let BB be a Boolean lattice. The top element of the lattice, usually denoted 1, is an identity for source multiplication: 1a=a1\land a=a for all aBa\in B. The previous corollary tells us that ¬1=0\neg 1=0 is a double sided identity for target multiplication, which we identified to be disjunction.

3 Additional instances of preordered heaps

As described in Section 2, as soon as we verify that a theory is a preordered heap, we know how to compute quotients for that theory. Here we show that assume-guarantee (AG) contracts and interface automata are preordered heaps. In both cases, we first define the algebraic aspects of the theory, and then we proceed to show that it is a preordered heap, which involves verifying the axioms of Definition 2.1. After we do this, we invoke Theorem 2.2 to express its quotient in closed-form. The literature for both theories is large, and we only discuss them algebraically. To learn about their uses and the design methodologies based on them, we suggest [6] and [16].

3.1 AG contracts

Assume-guarantee contracts are an algebra and a methodology to support compositional system design and analysis. Fix once and for all a set BB whose elements we call behaviors. Subsets of BB are referred to as behavioral properties or trace properties. An AG contract is a pair of properties C=(A,G)C=(A,G) satisfying AG=BA\boldsymbol{\cup}G=B. Contracts are used as specifications: a component adheres to contract CC if it meets the guarantees GG when instantiated in an environment that satisfies the assumptions AA. The specific form of these properties is not our concern now; we are only interested in the algebraic definitions. The algebra of assume-guarantee contracts was introduced by R. Negulescu [33] (there called process spaces) to deal with assume-guarantee reasoning for concurrent programs. The algebra was reintroduced, together with a methodology for system design, by Benveniste et al. [5] to apply assume-guarantee reasoning to the design and analysis of any engineered system. Now we describe the operations of this algebra.

For C=(A,G)C^{\prime}=(A^{\prime},G^{\prime}) another contract, the partial order of AG contracts, called refinement, is given by CCC\leq C^{\prime} when GGG\subseteq G^{\prime} and AAA\supseteq A^{\prime}. The involution of AG contracts, called reciprocal, is given by γC=(G,A)\gamma C=(G,A). This operation is clearly antitone and meets axiom A1. Source multiplication is contract composition: μ(C,C)=(AA¬(GG),GG)\mu(C,C^{\prime})=\left(A\boldsymbol{\cap}A^{\prime}\boldsymbol{\cup}\neg(G\boldsymbol{\cap}G^{\prime}),G\boldsymbol{\cap}G^{\prime}\right). This operation yields the tightest contract obeyed by the composition of two design elements, each obeying contracts CC and CC^{\prime}, respectively. Composition is monotonic in the refinement order of AG contracts. We need to verify the admissibility conditions. Since source multiplication for AG contracts is commutative, we verify (1):

(μC\displaystyle(\mu_{C} γ)2C=(μCγ)(μC)(G,A)=μC(GA,AG¬(GA))\displaystyle\circ\gamma)^{2}C^{\prime}=(\mu_{C}\circ\gamma)\circ(\mu_{C})(G^{\prime},A^{\prime})=\mu_{C}(G\boldsymbol{\cap}A^{\prime},A\boldsymbol{\cap}G^{\prime}\boldsymbol{\cup}\neg(G\boldsymbol{\cap}A^{\prime}))
=(AGA¬G¬(AG¬A),G(AG¬A))\displaystyle=(A\boldsymbol{\cap}G\boldsymbol{\cap}A^{\prime}\boldsymbol{\cup}\neg G\boldsymbol{\cup}\neg(A\boldsymbol{\cap}G^{\prime}\boldsymbol{\cup}\neg A^{\prime}),G\boldsymbol{\cap}(A\boldsymbol{\cap}G^{\prime}\boldsymbol{\cup}\neg A^{\prime}))
=(AA¬G¬AA¬GA,G(AG¬A))\displaystyle=(A\boldsymbol{\cap}A^{\prime}\boldsymbol{\cup}\neg G\boldsymbol{\cup}\neg A\boldsymbol{\cap}A^{\prime}\boldsymbol{\cup}\neg G^{\prime}\boldsymbol{\cap}A^{\prime},G\boldsymbol{\cap}(A\boldsymbol{\cap}G^{\prime}\boldsymbol{\cup}\neg A^{\prime}))
=(A¬G,G(AG¬A))(A,G)=C,\displaystyle=(A^{\prime}\boldsymbol{\cup}\neg G,G\boldsymbol{\cap}(A\boldsymbol{\cap}G^{\prime}\boldsymbol{\cup}\neg A^{\prime}))\leq(A^{\prime},G^{\prime})=C^{\prime},

where in the last step we used the fact that ¬AG\neg A^{\prime}\subseteq G^{\prime}, which follows from AG=BA^{\prime}\boldsymbol{\cup}G^{\prime}=B. We conclude that AG contracts satisfy the admissibility conditions, and thus have preordered heap structure.

What is target multiplication for AG contracts? From its definition, we have τ(C,C)=γμ(γC,γC)=γμ((G,A),(G,A))=(AA,GG¬(AA))\tau(C,C^{\prime})=\gamma\circ\mu\circ(\gamma C,\gamma C^{\prime})=\gamma\circ\mu\left((G,A),(G^{\prime},A^{\prime})\right)=\left(A\boldsymbol{\cap}A^{\prime},G\boldsymbol{\cap}G^{\prime}\boldsymbol{\cup}\neg(A\boldsymbol{\cap}A^{\prime})\right). This is an operation on contracts called merging. One of the main objectives of the theory of assume-guarantee contracts is to deal with multiple viewpoints, i.e., a multiplicity of design concerns, each having a contract representing the specification for that concern (e.g., functionality, timing, etc.). In [35], it is argued that the operation of merging is used to bring multiple viewpoint specifications into a single contract object.

Since AG contracts are preordered heaps, we get their quotient formulas from Theorem 2.2. The adjoint of μC\mu_{C^{\prime}} is τγC=γμCγ\tau^{\gamma C^{\prime}}=\gamma\circ\mu^{C^{\prime}}\circ\gamma. Applying this to CC yields τγC(C)=γμC(G,A)=(AG,GA¬(AG))\tau^{\gamma C^{\prime}}(C)=\gamma\circ\mu^{C^{\prime}}(G,A)=(A\boldsymbol{\cap}G^{\prime},G\boldsymbol{\cap}A^{\prime}\boldsymbol{\cup}\neg(A\boldsymbol{\cap}G^{\prime})). This closed-form expression for the quotient of AG contracts was first reported in [38]. Also by Theorem 2.2, the left adjoint of merging by a fixed contract CC^{\prime} is the operation μ(C,γC)=μ((A,G),(G,A))=(AG¬(GA),GA)\mu(C,\gamma C^{\prime})=\mu\left((A,G),(G^{\prime},A^{\prime})\right)=\left(A\boldsymbol{\cap}G^{\prime}\boldsymbol{\cup}\neg(G\boldsymbol{\cap}A^{\prime}),G\boldsymbol{\cap}A^{\prime}\right). This operation was recently introduced under the name of separation in [35].

3.2 Interface automata

We show that Interface Automata as introduced in [16] have preordered heap structure. To achieve this result, we first provide the relevant definitions for interface automata. All definitions match those of  [16], except for our definition of alternating simulation for interface automata.

An interface automaton P=V_P,V_Pinit,𝒜_PI,𝒜_PO,𝒜_PH,𝒯_PP=\langle V_{\_}P,V_{\_}P^{\text{init}},\mathcal{A}_{\_}P^{I},\mathcal{A}_{\_}P^{O},\mathcal{A}_{\_}P^{H},\mathcal{T}_{\_}P\rangle consists of the following elements:

  • V_PV_{\_}P is a set of states.

  • V_PinitV_PV_{\_}P^{\text{init}}\subseteq V_{\_}P is a set of initial states. Following [16], we require that V_PinitV_{\_}P^{\text{init}} contains at most one state.

  • 𝒜_PI,𝒜_PO\mathcal{A}_{\_}P^{I},\mathcal{A}_{\_}P^{O}, and 𝒜_PH\mathcal{A}_{\_}P^{H} are mutually disjoint sets of input, output, and internal actions. We denote by 𝒜_P=𝒜_PI𝒜_PO𝒜_PH\mathcal{A}_{\_}P=\mathcal{A}_{\_}P^{I}\boldsymbol{\cup}\mathcal{A}_{\_}P^{O}\boldsymbol{\cup}\mathcal{A}_{\_}P^{H} the set of all actions.

  • 𝒯_PV_P×𝒜_P×V_P\mathcal{T}_{\_}P\subseteq V_{\_}P\times\mathcal{A}_{\_}P\times V_{\_}P is a set of steps.

Following [16], if a𝒜_PIa\in\mathcal{A}_{\_}P^{I} (resp. a𝒜_POa\in\mathcal{A}_{\_}P^{O}, a𝒜_PHa\in\mathcal{A}_{\_}P^{H}), then (v,a,v)(v,a,v^{\prime}) is called an input (resp. output, internal) step. We denote by 𝒯_PI\mathcal{T}_{\_}P^{I} (resp. 𝒯_PO\mathcal{T}_{\_}P^{O}, 𝒯_PH\mathcal{T}_{\_}P^{H}) the set of input (resp. output, internal) steps. An action a𝒜_Pa\in\mathcal{A}_{\_}P is enabled at a state vV_Pv\in V_{\_}P if there is a step (v,a,v)𝒯_P(v,a,v^{\prime})\in\mathcal{T}_{\_}P for some vV_Pv^{\prime}\in V_{\_}P. We indicate by 𝒜_PI(v),𝒜_PO(v),𝒜_PH(v)\mathcal{A}_{\_}P^{I}(v),\mathcal{A}_{\_}P^{O}(v),\mathcal{A}_{\_}P^{H}(v) the subsets of input, output, and internal actions that are enabled at the state vv, and we let 𝒜_P(v)=𝒜_PI(v)𝒜_PO(v)𝒜_PH(v)\mathcal{A}_{\_}P(v)=\mathcal{A}_{\_}P^{I}(v)\boldsymbol{\cup}\mathcal{A}_{\_}P^{O}(v)\boldsymbol{\cup}\mathcal{A}_{\_}P^{H}(v).

Definition 3.1.

If PP and QQ are interface automata, let shared(P,Q)=(𝒜_PI𝒜_QO)(𝒜_PO𝒜_QI)\textsf{shared}(P,Q)=(\mathcal{A}_{\_}P^{I}\boldsymbol{\cap}\mathcal{A}_{\_}Q^{O})\boldsymbol{\cup}(\mathcal{A}_{\_}P^{O}\boldsymbol{\cap}\mathcal{A}_{\_}Q^{I}). The product PQP\otimes Q is the interface automaton with the following constituents: V_PQ=V_P×V_QV_{\_}{P\otimes Q}=V_{\_}P\times V_{\_}Q, V_PQinit=V_Pinit×V_QinitV_{\_}{P\otimes Q}^{\text{init}}=V_{\_}P^{\text{init}}\times V_{\_}Q^{\text{init}}, 𝒜_PQI=(𝒜_PI𝒜_QI)shared(P,Q)\mathcal{A}_{\_}{P\otimes Q}^{I}=(\mathcal{A}_{\_}P^{I}\boldsymbol{\cup}\mathcal{A}_{\_}Q^{I})-\textsf{shared}(P,Q), 𝒜_PQO=(𝒜_PO𝒜_QO)shared(P,Q)\mathcal{A}_{\_}{P\otimes Q}^{O}=(\mathcal{A}_{\_}P^{O}\boldsymbol{\cup}\mathcal{A}_{\_}Q^{O})-\textsf{shared}(P,Q), 𝒜_PQH=𝒜_PH𝒜_QHshared(P,Q)(𝒜_PQI𝒜_PQO)\mathcal{A}_{\_}{P\otimes Q}^{H}=\mathcal{A}_{\_}P^{H}\boldsymbol{\cup}\mathcal{A}_{\_}Q^{H}\boldsymbol{\cup}\textsf{shared}(P,Q)-(\mathcal{A}_{\_}{P\otimes Q}^{I}\boldsymbol{\cup}\mathcal{A}_{\_}{P\otimes Q}^{O}), and

𝒯_PQ\displaystyle\mathcal{T}_{\_}{P\otimes Q} ={((v,u),a,(v,u))|(v,a,v)𝒯_Pa𝒜_P𝒜_QuV_Q}\displaystyle=\left\{{((v,u),a,(v^{\prime},u))}\,\,\middle|\,\,{(v,a,v^{\prime})\in\mathcal{T}_{\_}P\wedge a\in\mathcal{A}_{\_}P-\mathcal{A}_{\_}Q\wedge u\in V_{\_}Q}\right\}
{((v,u),a,(v,u))|(u,a,u)𝒯_Qa𝒜_Q𝒜_PvV_P}\displaystyle\boldsymbol{\cup}\left\{{((v,u),a,(v,u^{\prime}))}\,\,\middle|\,\,{(u,a,u^{\prime})\in\mathcal{T}_{\_}Q\wedge a\in\mathcal{A}_{\_}Q-\mathcal{A}_{\_}P\wedge v\in V_{\_}P}\right\}
{((v,u),a,(v,u))|(v,a,v)𝒯_P(u,a,u)𝒯_Qa𝒜_P𝒜_Q}.\displaystyle\boldsymbol{\cup}\left\{{((v,u),a,(v^{\prime},u^{\prime}))}\,\,\middle|\,\,{(v,a,v^{\prime})\in\mathcal{T}_{\_}P\wedge(u,a,u^{\prime})\in\mathcal{T}_{\_}Q\wedge a\in\mathcal{A}_{\_}P\boldsymbol{\cap}\mathcal{A}_{\_}Q}\right\}.

We call illegal those states of the product in which one of the interface automata can take a step through a shared action, but the other can’t. These states are removed from the product in the definition of composition of interface automata. Given two composable interface automata PP and QQ, the set Illegal(P,Q)\textsf{Illegal}(P,Q) \subseteq V_P×V_QV_{\_}P\times V_{\_}Q of illegal states of PQP\otimes Q is given by

Illegal(P,Q)={(v,u)V_P×V_Q|ashared(P,Q).(a𝒜_PO(v)a𝒜_QI(u)a𝒜_QO(u)a𝒜_PI(v))}.\textsf{Illegal}(P,Q)=\left\{{(v,u)\in V_{\_}P\times V_{\_}Q}\,\,\middle|\,\,{\exists a\in\textsf{shared}(P,Q).\left(\begin{array}[]{c}a\in\mathcal{A}_{\_}P^{O}(v)\wedge a\notin\mathcal{A}_{\_}Q^{I}(u)\\ \vee\\ a\in\mathcal{A}_{\_}Q^{O}(u)\wedge a\notin\mathcal{A}_{\_}P^{I}(v)\\ \end{array}\right)}\right\}.

An environment for an interface automaton RR is an interface automaton EE such that EE is composable with RR, EE is nonempty, 𝒜_EI=𝒜_RO\mathcal{A}_{\_}E^{I}=\mathcal{A}_{\_}R^{O}, and Illegal(R,E)=\textsf{Illegal}(R,E)=\emptyset. A legal environment for the pair (P,Q)(P,Q) is an environment for PQP\otimes Q such that no state in Illegal(P,Q)×V_E\textsf{Illegal}(P,Q)\times V_{\_}E is reachable in (PQ)E(P\otimes Q)\otimes E. We say that a pair (v,u)V_P×V_Q(v,u)\in V_{\_}P\times V_{\_}Q of states is compatible if there is an environment EE for PQP\otimes Q such that no state in Illegal(P,Q)×V_E\textsf{Illegal}(P,Q)\times V_{\_}E is reachable in (PQ)E(P\otimes Q)\otimes E from the state {(v,u)}×V_Einit\{(v,u)\}\times V_{\_}E^{\text{init}}. Two interface automata PP and QQ are compatible if the initial state (v,u)V_Pinit×V_Qinit(v,u)\in V_{\_}P^{init}\times V_{\_}Q^{init} is compatible. We write Cmp(P,Q)\textsf{Cmp}(P,Q) for the set of compatible states of PQP\otimes Q. With these notions, we can define parallel composition for interface automata.

Given two compatible interface automata PP and QQ, the composition PQP\parallel Q is an interface automaton with the same action sets as PQP\otimes Q. The states are V_PQ=Cmp(P,Q)V_{\_}{P\parallel Q}=\textsf{Cmp}(P,Q); the initial states are V_PQinitV_{\_}{P\parallel Q}^{\text{init}} == V_PQinitCmp(P,Q)V_{\_}{P\otimes Q}^{\text{init}}\boldsymbol{\cap}\textsf{Cmp}(P,Q); and the steps are 𝒯_PQ\mathcal{T}_{\_}{P\parallel Q} == 𝒯_PQ\mathcal{T}_{\_}{P\otimes Q} \boldsymbol{\cap} (Cmp(P,Q)×𝒜_PQ×Cmp(P,Q))(\textsf{Cmp}(P,Q)\times\mathcal{A}_{\_}{P\parallel Q}\times\textsf{Cmp}(P,Q)).

Let vV_Pv\in V_{\_}P, the set IntReach_P(v)\textsf{IntReach}_{\_}P(v) is the smallest set UV_PU\subseteq V_{\_}P such that vUv\in U and if uUu\in U and (u,a,u)𝒯_PH(u,a,u^{\prime})\in\mathcal{T}_{\_}P^{H}, then uUu^{\prime}\in U. Moreover, we let

ExtEn_PO(v)=_uIntReach(v)𝒜_PO(u)andExtEn_PI(v)=_uIntReach(v)𝒜_PI(u)\textsf{ExtEn}_{\_}P^{O}(v)=\bigcup_{\_}{u\in\textsf{IntReach}(v)}\mathcal{A}_{\_}P^{O}(u)\quad\text{and}\quad\textsf{ExtEn}_{\_}P^{I}(v)=\bigcup_{\_}{u\in\textsf{IntReach}(v)}\mathcal{A}_{\_}P^{I}(u)

be the sets of externally enabled output and input actions, respectively, at vv. And for all externally enabled input and output actions aExtEn_PI(v)ExtEn_PO(v)a\in\textsf{ExtEn}_{\_}P^{I}(v)\boldsymbol{\cup}\textsf{ExtEn}_{\_}P^{O}(v), we let

ExtDest_P(v,a)={u|(u,a,u)𝒯_P.uIntReach_P(v)}.\textsf{ExtDest}_{\_}P(v,a)=\left\{{u^{\prime}}\,\,\middle|\,\,{\exists(u,a,u^{\prime})\in\mathcal{T}_{\_}P.\,\,u\in\textsf{IntReach}_{\_}P(v)}\right\}.

With these notions, we can define an alternating simulation between interface automata.

Definition 3.2.

Consider two interface automata PP and QQ. A binary relation V_Q×V_P\preceq\,\subseteq V_{\_}Q\times V_{\_}P is an alternating simulation from QQ to PP if for all states uV_Qu\in V_{\_}Q and vV_Pv\in V_{\_}P such that uvu\preceq v, the following conditions hold:
(a) ExtEn_PI(v)ExtEn_QI(u),ExtEn_QO(u)ExtEn_PO(v)\textsf{ExtEn}_{\_}P^{I}(v)\subseteq\textsf{ExtEn}_{\_}Q^{I}(u),\quad\quad\textsf{ExtEn}_{\_}Q^{O}(u)\subseteq\textsf{ExtEn}_{\_}P^{O}(v).
(b) For all actions aExtEn_QO(u)a\in\textsf{ExtEn}_{\_}Q^{O}(u) and all states uExtDest_Q(u,a)u^{\prime}\in\textsf{ExtDest}_{\_}Q(u,a), there is a state vExtDest_P(v,a)v^{\prime}\in\textsf{ExtDest}_{\_}P(v,a) such that uvu^{\prime}\preceq v^{\prime} and for all actions aExtEn_PI(v)a\in\textsf{ExtEn}_{\_}P^{I}(v) and all states vExtDest_P(v,a)v^{\prime}\in\textsf{ExtDest}_{\_}P(v,a), there is a state uExtDest_Q(u,a)u^{\prime}\in\textsf{ExtDest}_{\_}Q(u,a) such that uvu^{\prime}\preceq v^{\prime}.

Now we use the notion of alternating simulation to establish a preorder for interface automata: the interface automaton QQ refines the interface automaton PP, written QPQ\preceq P, if 𝒜_PI𝒜_QI\mathcal{A}_{\_}P^{I}\subseteq\mathcal{A}_{\_}Q^{I}, 𝒜_PO𝒜_QO\mathcal{A}_{\_}P^{O}\supseteq\mathcal{A}_{\_}Q^{O}, and there is an alternating simulation \preceq from QQ to PP, a state vV_Pinitv\in V_{\_}P^{\text{init}}, and a state uV_Qinitu\in V_{\_}Q^{\text{init}} such that uvu\preceq v.

Let P=V_P,V_Pinit,A_PI,A_PO,A_PH,T_PP=\langle V_{\_}P,V_{\_}P^{\text{init}},A_{\_}P^{I},A_{\_}P^{O},A_{\_}P^{H},T_{\_}P\rangle be an interface automaton. The mirror of PP, denoted PP^{\top}, is given by P=V_P,V_Pinit,A_PO,A_PI,A_PH,T_PP^{\top}=\langle V_{\_}P,V_{\_}P^{\text{init}},A_{\_}P^{O},A_{\_}P^{I},A_{\_}P^{H},T_{\_}P\rangle. The mirror operation is clearly an involution, i.e., (P)=P\left(P^{\top}\right)^{\top}=P. Let the source multiplication μ\mu be the parallel composition of interface automata, γ\gamma be the mirror operation, and let the preorder be refinement. We state the main claim of this section:

Proposition 3.3.

A theory of interface automata is a preordered heap.

Since interface automata have preordered heap structure, for given interface automata PP and QQ, Theorem 2.2 enables us to find largest solutions RR for equations of the form μ(Q,R)P\mu(Q,R)\leq P. The quotient for interface automata was first reported in [7]. Now that we know interface automata have preordered heap structure, we can ask: what is target multiplication for interface automata? The operation is given by τ(P,Q)=(PQ)\tau(P,Q)=\left(P^{\top}\parallel Q^{\top}\right)^{\top}. We propose to call this operation merging in analogy to the case of AG contracts. Similarly, by Theorem 2.2, merging by fixed QQ, τ_Q\tau_{\_}{Q}, has a left adjoint given by μγQ(P)=PQ\mu^{\gamma Q}(P)=P\parallel Q^{\top}. For the same reason, we propose to call this binary operation separation. In AG contracts, merging and separation are used to handle multiple viewpoints in a design. To the best of our understanding, the notion of handling multiple design viewpoints has not been discussed for interface automata. Maintaining the analogy to AG contracts, we suspect that merging and separation here defined provide interface automata the ability to handle these multiple viewpoints. Exploring this idea is material for future work.

4 Sieved heaps

Some theories in computer science require manipulating objects which are not defined over the same domain. For example, consider a language L_1L_{\_}1 defined over an alphabet Σ_1\Sigma_{\_}1. Let Σ_2\Sigma_{\_}2 be another alphabet for which L_2L_{\_}2 is a language. The powerset of a set is a Boolean lattice, so we have two preordered heaps P_Σ_1=2Σ_1P_{\_}{\Sigma_{\_}1}=2^{\Sigma_{\_}1^{*}} and P_Σ_2=2Σ_2P_{\_}{\Sigma_{\_}2}=2^{\Sigma_{\_}2^{*}} whose source multiplications and involutions are intersection and negation (* is the Kleene star—we will define operations carefully in the section on languages). With the theory of preordered heaps, we know how to solve inequalities for P_Σ_1P_{\_}{\Sigma_{\_}1} and for P_Σ_2P_{\_}{\Sigma_{\_}2}. Suppose we define an operation that allows us to compose L_1P_Σ_1L_{\_}1\in P_{\_}{\Sigma_{\_}1} with L_2P_Σ_2L_{\_}2\in P_{\_}{\Sigma_{\_}2}. How do we solve inequalities involving L_1L_{\_}1 and L_2L_{\_}2 then? These languages belong to different preordered heaps. It is natural to define such an operation by mapping L_1L_{\_}1 and L_2L_{\_}2 to a common preordered heap, which by definition, has its own notion of source multiplication. We need a notion of mapping between preordered heaps:

Definition 4.1.

Let (P,,μ,γ)(P,\leq,\mu,\gamma) and (P,,μ,γ)(P^{\prime},\leq^{\prime},\mu^{\prime},\gamma^{\prime}) be two preordered heaps. A preordered heap homomorphism f:PPf\colon P\to P^{\prime} is an order-preserving map which commutes with the source multiplications and involutions, i.e., P×P{P\times P}P×P{P^{\prime}\times P^{\prime}}P{P}P{P^{\prime}}f×f\scriptstyle{f\times f}μ\scriptstyle{\mu}μ\scriptstyle{\mu^{\prime}}f\scriptstyle{f} and P{P}P{P^{\prime}}P{P}P{P^{\prime}}f\scriptstyle{f}γ\scriptstyle{\gamma}γ\scriptstyle{\gamma^{\prime}}f\scriptstyle{f} commute.

Preordered heaps P_Σ_1P_{\_}{\Sigma_{\_}1} and P_Σ_2P_{\_}{\Sigma_{\_}2} are indexed by alphabets. The common preordered heap where L_1L_{\_}1 and L_2L_{\_}2 can be mapped is determined by Σ_1\Sigma_{\_}1 and Σ_2\Sigma_{\_}2. As we will see in the next section, one option is to say that they generate the alphabet Σ_c=Σ_1Σ_2\Sigma_{\_}c=\Sigma_{\_}1\boldsymbol{\cup}\Sigma_{\_}2, and we can define maps ι_1:P_Σ_1P_Σ_c\iota_{\_}1\colon P_{\_}{\Sigma_{\_}1}\to P_{\_}{\Sigma_{\_}c} and ι_2:P_Σ_2P_Σ_c\iota_{\_}2\colon P_{\_}{\Sigma_{\_}2}\to P_{\_}{\Sigma_{\_}c} that embed languages over Σ_1\Sigma_{\_}1 and Σ_2\Sigma_{\_}2 to those defined under Σ_c\Sigma_{\_}c. This observation tells us that we can use a structure SS in order to index preordered heaps; this structure must have a binary operation defined in it. This operation will fulfill the role of identifying the alphabets where two languages can meet. Call this structure SS, and let \cdot be its binary operation. If we have two languages defined over the same alphabet, we should not need to move to another alphabet to compute the source multiplication of the two languages; thus, the binary operation of SS should be idempotent. We will also require the operation to be commutative since it makes no difference whether we go to the language generated by Σ_1\Sigma_{\_}1 and Σ_2\Sigma_{\_}2 or to that generated by Σ_2\Sigma_{\_}2 and Σ_1\Sigma_{\_}1. A similar reasoning leads us to require associativity. Thus, SS is endowed with an associative, commutative, idempotent binary operation, which means it is a semilattice. We make the choice to interpret it as an upper semi-lattice because we have the intuition that the languages generated by two smaller languages should be larger than any of the two, but this interpretation does not impose any algebraic limitations: an upper semilattice can be turned into a lower semilattice simply by flipping it upside-down.

We introduce the notion of a sieved, preordered heap (sieved heap, for short) that allows us to move objects between different domains of definition or different levels of abstraction. A sieved heap is a collection of preordered heaps indexed by an upper semilattice SS together with mappings between the preordered heaps. We call these mappings concretizations. An upper semilattice can be interpreted as a partial order: for a,bSa,b\in S, we say that aaba\leq ab. Thus, the shortest definition for a sieved heap is that it is a functor from the preorder category SS to PreHeap, the preordered heap category, whose objects are preordered heaps and whose arrows are preordered heap homomorphisms. We will give a longer definition. But first, why the adjective sieved? A sieved heap consists of a collection of preordered heaps and maps between them. We interpret these preordered heaps as structures containing varying amounts of detail about an object. This varying granularity motivated the name. This is the definition of this composite structure:

Definition 4.2.

Let SS be a semilattice. Let {(P_x,_x,μ_x,γ_x)}_xS\{(P_{\_}x,\leq_{\_}x,\mu_{\_}x,\gamma_{\_}x)\}_{\_}{x\in S} be a collection of preordered heaps such that for every x,y,zSx,y,z\in S we have a unique preordered heap homomorphism ι:P_xP_xy\iota\colon P_{\_}x\to P_{\_}{xy} referred to as a concretization and making P_xy{P_{\_}{xy}}P_x{P_{\_}x}P_xyz{P_{\_}{xyz}}ι\scriptstyle{\iota^{\prime}}ι\scriptstyle{\iota}ι′′\scriptstyle{\iota^{\prime\prime}} commute. We require the concretization ι:P_xP_x\iota\colon P_{\_}x\to P_{\_}x to be the identity. Let P=_xSP_xP=\oplus_{\_}{x\in S}P_{\_}x, where \oplus stands for disjoint union. We call (P,,μ,γ)(P,\leq,\mu,\gamma) an SS-sieved heap, where μ:P×PP\mu\colon P\times P\to P is an operation called source multiplication, and γ:PP\gamma\colon P\to P is called involution. Let aP_xa\in P_{\_}x and bP_yb\in P_{\_}y, and let ι_x:P_xP_xy\iota_{\_}x\colon P_{\_}x\to P_{\_}{xy} and ι_y:P_yP_xy\iota_{\_}y\colon P_{\_}y\to P_{\_}{xy} be concretizations. These operations are given by

μ(a,b)=μ_xy(ι_x(a),ι_y(b))andγ(a)=γ_x(a).\displaystyle\mu(a,b)=\mu_{\_}{xy}\left(\iota_{\_}{x}(a),\iota_{\_}{y}(b)\right)\quad\text{and}\quad\gamma(a)=\gamma_{\_}{x}(a).

Moreover, we say that aba\leq b if and only if there exists zSz\in S and concretizations ι:P_xP_z\iota\colon P_{\_}x\to P_{\_}z and ι:P_yP_z\iota^{\prime}\colon P_{\_}y\to P_{\_}z such that ι(a)_zι(b)\iota(a)\leq_{\_}{z}\iota^{\prime}(b), where _z\leq_{\_}{z} is the preorder of P_zP_{\_}{z}.

Target multiplication τ\tau for PP is defined in a similar way: τ(a,b)=τ_xy(ι_x(a),ι_y(b))\tau(a,b)=\tau_{\_}{xy}\left(\iota_{\_}{x}(a),\iota_{\_}{y}(b)\right), where τ_xy\tau_{\_}{xy} is the target multiplication of the preordered heap P_xyP_{\_}{xy}.

4.1 Sieved heaps are preordered heaps

Now we show that a sieved heap is itself a preordered heap. To do this, we must show that the relation \leq over sieved heaps is a preorder, that source multiplication defined for a sieved heap is monotonic, that its involution is antitone, and that it meets the admissibility conditions. The following statements show that sieved heaps have these properties.

Lemma 4.3.

The relation \leq on an SS-sieved heap PP is a preorder.

Proof.

Reflexivity. Let aP_xa\in P_{\_}x. Let ι\iota be the concretization ι:P_xP_x\iota\colon P_{\_}x\to P_{\_}x. Then ιa_xιa\iota a\leq_{\_}x\iota a because _x\leq_{\_}x is a preorder in P_xP_{\_}x; this means that aaa\leq a in PP.

Transitivity. Let bP_yb\in P_{\_}y and cP_zc\in P_{\_}z and suppose that aba\leq b and bcb\leq c. Then there exist v,wSv,w\in S such that ι_xa_vι_yb\iota_{\_}xa\leq_{\_}v\iota_{\_}yb and ι_yb_wι_zc\iota_{\_}y^{\prime}b\leq_{\_}w\iota_{\_}zc, where the diagram P_v{P_{\_}{v}}P_vw{P_{\_}{vw}}P_w{P_{\_}{w}}P_x{P_{\_}x}P_y{P_{\_}{y}}P_z{P_{\_}z}ι_v\scriptstyle{\iota_{\_}{v}}ι_w\scriptstyle{\iota_{\_}{w}}ι_x\scriptstyle{\iota_{\_}x}ι_y\scriptstyle{\iota_{\_}y}ι_y\scriptstyle{\iota_{\_}y^{\prime}}ι_z\scriptstyle{\iota_{\_}{z}} shows the relevant concretization maps (these diagrams commute per Definition 4.2). We obtain immediately ι_vι_xa_vwι_vι_yb\iota_{\_}v\circ\iota_{\_}xa\leq_{\_}{vw}\iota_{\_}v\circ\iota_{\_}yb and ι_wι_yb_vwι_wι_zc\iota_{\_}w\circ\iota_{\_}y^{\prime}b\leq_{\_}{vw}\iota_{\_}w\circ\iota_{\_}zc. From the diagram, ι_vι_y=ι_wι_y\iota_{\_}v\circ\iota_{\_}y=\iota_{\_}w\circ\iota_{\_}y^{\prime}, which means that ι_vι_xa_vwι_wι_zc\iota_{\_}v\circ\iota_{\_}xa\leq_{\_}{vw}\iota_{\_}w\circ\iota_{\_}zc, which means that aca\leq c. ∎

Lemma 4.4.

Source multiplication on PP is monotonic in both arguments.

Proof.

Let a,b,cPa,b,c\in P with aca\leq c. Suppose that aP_xa\in P_{\_}x, bP_yb\in P_{\_}y, and cP_zc\in P_{\_}z. Since aca\leq c, there exist uSu\in S such that ι_xa_uι_zc\iota_{\_}xa\leq_{\_}u\iota_{\_}zc for concretizations ι_x:P_xP_u\iota_{\_}x\colon P_{\_}x\to P_{\_}u and ι_z:P_zP_u\iota_{\_}z\colon P_{\_}z\to P_{\_}u. Note that this means there exist u,u′′Su^{\prime},u^{\prime\prime}\in S such that u=xuu=xu^{\prime} and u=zu′′u=zu^{\prime\prime}. But this implies that uy=xyuuy=xyu^{\prime} and uy=yzu′′uy=yzu^{\prime\prime}. Thus, there exist concretizations ι_xy:P_xyP_uy\iota_{\_}{xy}\colon P_{\_}{xy}\to P_{\_}{uy} and ι_yz:P_yzP_uy\iota_{\_}{yz}\colon P_{\_}{yz}\to P_{\_}{uy}, and

P_y{P_{\_}{y}}P_xy{P_{\_}{xy}}P_uy{P_{\_}{uy}}P_yz{P_{\_}{yz}}P_x{P_{\_}x}P_u{P_{\_}{u}}P_z{P_{\_}z}ι_y\scriptstyle{\iota_{\_}y^{\prime}}ι_y\scriptstyle{\iota_{\_}y}ι_y′′\scriptstyle{\iota_{\_}y^{\prime\prime}}ι_xy\scriptstyle{\iota_{\_}{xy}}ι_yz\scriptstyle{\iota_{\_}{yz}}ι_x\scriptstyle{\iota_{\_}x^{\prime}}ι_x\scriptstyle{\iota_{\_}x}ι_u\scriptstyle{\iota_{\_}u}ι_z\scriptstyle{\iota_{\_}{z}^{\prime}}ι_z\scriptstyle{\iota_{\_}z} (3)

commutes. Since aca\leq c, we have

μ_uy(ι_uι_xa,ι_yb)_uyμ_uy(ι_uι_zc,ι_yb).\displaystyle\mu_{\_}{uy}\left(\iota_{\_}u\circ\iota_{\_}xa,\iota_{\_}yb\right)\leq_{\_}{uy}\mu_{\_}{uy}\left(\iota_{\_}u\circ\iota_{\_}zc,\iota_{\_}yb\right). (4)

By the commutativity of the diagram, ι_y=ι_xyι_y=ι_yzι_y′′\iota_{\_}y=\iota_{\_}{xy}\circ\iota_{\_}y^{\prime}=\iota_{\_}{yz}\circ\iota_{\_}y^{\prime\prime} and ι_uι_x=ι_xyι_x\iota_{\_}u\circ\iota_{\_}x=\iota_{\_}{xy}\circ\iota_{\_}x^{\prime} and ι_uι_z=ι_yzι_z\iota_{\_}u\circ\iota_{\_}z=\iota_{\_}{yz}\circ\iota_{\_}z^{\prime}. Using these identities, we can rewrite (4) as

μ_uy(ι_xyι_xa,ι_xyι_yb)\displaystyle\mu_{\_}{uy}\left(\iota_{\_}{xy}\circ\iota_{\_}x^{\prime}a,\iota_{\_}{xy}\circ\iota_{\_}y^{\prime}b\right) _uyμ_uy(ι_yzι_zc,ι_yzι_y′′b),which implies that\displaystyle\leq_{\_}{uy}\mu_{\_}{uy}\left(\iota_{\_}{yz}\circ\iota_{\_}z^{\prime}c,\iota_{\_}{yz}\circ\iota_{\_}y^{\prime\prime}b\right),\quad\text{which implies that}
ι_xyμ_xy(ι_xa,ι_yb)\displaystyle\iota_{\_}{xy}\circ\mu_{\_}{xy}\left(\iota_{\_}x^{\prime}a,\iota_{\_}y^{\prime}b\right) _uyι_yzμ_yz(ι_zc,ι_y′′b) and thus ι_xyμ(a,b)_uyι_yzμ(c,b).\displaystyle\leq_{\_}{uy}\iota_{\_}{yz}\circ\mu_{\_}{yz}\left(\iota_{\_}z^{\prime}c,\iota_{\_}y^{\prime\prime}b\right)\text{ and thus }\iota_{\_}{xy}\circ\mu\left(a,b\right)\leq_{\_}{uy}\iota_{\_}{yz}\circ\mu\left(c,b\right).

This shows that μ(a,b)μ(c,b)\mu\left(a,b\right)\leq\mu\left(c,b\right). Monotonicity in the second argument is proved in the same way. ∎

Theorem 4.5.

An SS-sieved heap PP is a preordered heap.

Proof.

By lemma 4.3, we know that (P,)(P,\leq) is a preorder. By lemma 4.4, we know that source multiplication for PP is monotonic. From the definition of involution γ\gamma for PP, it is immediate that this operation is antitone and that γ2=id\gamma^{2}=\text{id}. We must show the admissibility conditions. Let aP_xa\in P_{\_}x and bP_yb\in P_{\_}y. Using the notation of (3), we have μ(a,γμ(γb,a))=μ(a,γμ_xy(ι_yγb,ι_xa))=μ_xy(ι_xa,γμ_xy(γι_yb,ι_xa))ι_yb\mu(a,\gamma\circ\mu(\gamma b,a))=\mu(a,\gamma\circ\mu_{\_}{xy}(\iota_{\_}y^{\prime}\circ\gamma b,\iota_{\_}x^{\prime}a))=\mu_{\_}{xy}(\iota_{\_}x^{\prime}a,\gamma\circ\mu_{\_}{xy}(\gamma\circ\iota_{\_}y^{\prime}b,\iota_{\_}x^{\prime}a))\leq\iota_{\_}y^{\prime}b, where we used the left admissibility of the preordered heap P_xyP_{\_}{xy}. But this means that μ(a,γμ(γb,a))b\mu(a,\gamma\circ\mu(\gamma b,a))\leq b. We conclude that PP meets the left admissibility condition. Applying the same procedure tells us that PP also has right admissibility. Thus, PP is a preordered heap. ∎

Now that we know that sieved heaps are preordered heaps, we can compute quotients in these structures. We will now consider the solution of inequalities over languages as an application of sieved heaps.

5 Sieved heaps and language inequalities

Language inequalities arise as the formalization of the problem of synthesizing an unknown component in hardware and software systems. In this section, we provide preliminaries on languages and discuss their properties and operations. A fuller treatment of language properties can be found in [43, 41]. Our objective is to show that commonly studied language structures are sieved heaps, which allows us to axiomatically find their quotients per the results of Section 4.

5.1 Operations on languages

An alphabet is a finite set of symbols. The set of all finite strings over a fixed alphabet XX is denoted by XX^{\star}. XX^{\star} includes the empty string ϵ\epsilon. A subset LXL\subseteq X^{\star} is called a language over alphabet XX. [23] is a standard reference on this subject.

A substitution ff is a mapping of an alphabet Σ\Sigma to subsets of Δ\Delta^{\star} for some alphabet Δ\Delta. The substitution ff is extended to strings by setting f(ϵ)={ϵ}f(\epsilon)=\{\epsilon\} and f(xa)=f(x)f(a)f(xa)=f(x)f(a). The following are well-studied language operations.

  • Given a language LL over alphabet XX and an alphabet VV, consider the substitution l:X2(X×V)l\colon X\rightarrow 2^{(X\times V)^{\star}} defined as l(x)={(x,v)|vV}.l(x)=\left\{{(x,v)}\,\,\middle|\,\,{v\in V}\right\}. Then the language L_V=_αLl(α)L_{\_}{\uparrow V}=\boldsymbol{\cup}_{\_}{\alpha\in L}l(\alpha) over alphabet X×VX\times V is the lifting of language LL to alphabet VV.

  • Given a language LL over alphabet XX and an alphabet VV, consider the mapping e:X2(XV)e\colon X\rightarrow 2^{(X\boldsymbol{\cup}V)^{\star}} defined as e(x)={αxβ|α,β(VX)}.e(x)=\left\{{\alpha x\beta}\,\,\middle|\,\,{\alpha,\beta\in(V-X)^{\star}}\right\}. Then the language L_V=_αLe(α)L_{\_}{\Uparrow V}=\boldsymbol{\cup}_{\_}{\alpha\in L}e(\alpha) over alphabet XVX\boldsymbol{\cup}V is the expansion of language LL to alphabet VV, i.e., words in L_VL_{\_}{\Uparrow V} are obtained from those in LL by inserting anywhere in them words from (VX)(V-X)^{\star}. Notice that ee is not a substitution and that e(ϵ)={α|αV}e(\epsilon)=\left\{{\alpha}\,\,\middle|\,\,{\alpha\in V^{\star}}\right\}.

The following proposition states that language liftings and expansions meet the properties of concretization maps of a sieved heap. These results will be used in the next section dealing with inequalities over languages.

Proposition 5.1.

Liftings and expansions are order-preserving and commute with intersection and complementation.

5.2 Composition of languages and inequalities involving languages

Consider two systems AA and BB with associated languages L(A)L(A) and L(B)L(B). The systems communicate with each other by a channel UU and with the environment by channels II and OO. The following two well-studied operators describe the external behavior of the composition of L(A)L(A) and L(B)L(B).

Definition 5.2.

Given the disjoint alphabets I,U,OI,U,O, a language L_1L_{\_}1 over I×UI\times U, and a language L_2L_{\_}2 over U×OU\times O, the synchronous composition of languages L_1L_{\_}1 and L_2L_{\_}2 is the language (L_1)_O(L_2)_I(L_{\_}1)_{\_}{\uparrow O}\boldsymbol{\cap}(L_{\_}2)_{\_}{\uparrow I}, denoted by L_1L_2L_{\_}1\bullet L_{\_}2, defined over I×U×OI\times U\times O.

Definition 5.3.

Given the disjoint alphabets I,U,OI,U,O, a language L_1L_{\_}1 over IUI\boldsymbol{\cup}U, and a language L_2L_{\_}2 over UOU\boldsymbol{\cup}O, the parallel composition of languages L_1L_{\_}1 and L_2L_{\_}2 is the language (L_1)_O(L_2)_I(L_{\_}1)_{\_}{\Uparrow O}\boldsymbol{\cap}(L_{\_}2)_{\_}{\Uparrow I}, denoted by L_1L_2L_{\_}1\diamond L_{\_}2, defined over IUOI\boldsymbol{\cup}U\boldsymbol{\cup}O.

Example.

Let L_1={a,aa}L_{\_}1=\{a,aa\} be a language of the alphabet Σ_1={a,b}\Sigma_{\_}1=\{a,b\}, and Σ_2={c,d}\Sigma_{\_}2=\{c,d\} be another alphabet for which L_2={c}L_{\_}2=\{c\} is a language. Then L_1L_2={(a,c)}L_{\_}1\bullet L_{\_}2=\{(a,c)\} and L_1L_2={ac,ca,caa,aca,aac}L_{\_}1\diamond L_{\_}2=\{ac,ca,caa,aca,aac\}.

Synchronous composition abstracts the parallel execution of modules in lock step, assuming a global clock and instant communication by a broadcasting mechanism, modeling the product semantics common in the hardware community. In asynchronous composition modules execute independently at different speeds assuming clocks which progress at arbitrary rates relative to one another, modeling the interleaving semantics common in the software community. A comparison can be found in [27]. Now we show that we can interpret the above products as the source multiplication of a sieved heap. For each product, we first need to identify a suitable indexing semilattice. Then we need to build the appropriate preordered heaps and their maps.

5.2.1 Synchronous equations

Semilattice.

Suppose we have a disjoint family F={Σ_i}_1inF=\{\Sigma_{\_}i\}_{\_}{1\leq i\leq n} of alphabets for some positive integer nn, and let S=2FS=2^{F}. Then SS is a semilattice under the operation of set union, i.e., if x,ySx,y\in S, we have xy=xyxy=x\boldsymbol{\cup}y.

Preordered heaps.

For any xSx\in S, let |x|\left|{x}\right| be the cardinality of xx. There exist natural numbers k_1,,k_|x|k_{\_}1,\dots,k_{\_}{\left|{x}\right|} such that x={Σ_k_j}_1j|x|Fx=\{\Sigma_{\_}{k_{\_}j}\}_{\_}{1\leq j\leq\left|{x}\right|}\subseteq F and 1k_i<k_jn1\leq k_{\_}i<k_{\_}j\leq n for i<ji<j. We map each xx to a preordered heap as follows. We define the alphabet over xx as α(x)=Σ_k_1××Σ_k_|x|\alpha(x)=\Sigma_{\_}{k_{\_}1}\times\cdots\times\Sigma_{\_}{k_{\_}{\left|{x}\right|}}, and we set P_x=2α(x)P_{\_}x=2^{\alpha(x)^{*}}. Source multiplication μ_x\mu_{\_}x for P_xP_{\_}x is intersection, and involution γ_x\gamma_{\_}x is complementation. (P_x,_x,μ_x,γ_x)(P_{\_}x,\leq_{\_}x,\mu_{\_}x,\gamma_{\_}x) is a Boolean lattice, thus a preordered heap, as shown in Section 2.

Concretizations.

For x,ySx,y\in S, P_xyP_{\_}{xy} is clearly a preordered heap because xySxy\in S. We also define the preordered heap P_x,y=2Σ_x,yP_{\_}{x,y}=2^{\Sigma_{\_}{x,y}^{*}} for Σ_x,y=α(x)×α(yx)\Sigma_{\_}{x,y}=\alpha(x)\times\alpha(y-x) with source multiplication equal to set intersection and involution equal to complementation. Note that the only difference between P_xyP_{\_}{xy} and P_x,yP_{\_}{x,y} is the order in which the alphabets Σ_i\Sigma_{\_}i appear in each: P_xyP_{\_}{xy} contains all sets of finite strings over the alphabet α(xy)\alpha(xy), and P_x,yP_{\_}{x,y} contains all sets of finite strings over the alphabet α(x)×α(yx)\alpha(x)\times\alpha(y-x). Thus, P_xyP_{\_}{xy} and P_x,yP_{\_}{x,y} are isomorphic as sets. Let β:P_x,yP_xy\beta\colon P_{\_}{x,y}\to P_{\_}{xy} be this isomorphism, which is easily seen to be a preordered heap isomorphism. This allows us to define the concretization ι_x\iota_{\_}x as follows: P_xy{P_{\_}{xy}}P_x{P_{\_}x}P_x,y{P_{\_}{x,y}}β\scriptstyle{\beta}()_α(yx)\scriptstyle{(\cdot)\uparrow_{\_}{\alpha(y-x)}}ι_x\scriptstyle{\iota_{\_}x} .

From Proposition 5.1, we know that ()_α(yx)(\cdot)\uparrow_{\_}{\alpha(y-x)} is a preordered heap map. Thus, we have an SS-sieved heap {(P_x,_x,μ_x,γ_x)}_xS\{(P_{\_}x,\leq_{\_}x,\mu_{\_}x,\gamma_{\_}x)\}_{\_}{x\in S}. Since sieved heaps are preordered heaps (Theorem 4.5), for AP_xA\in P_{\_}x and BP_yB\in P_{\_}y, an equation of the form AzBA\bullet z\leq B has the largest solution ZP_xyZ\in P_{\_}{xy} with

Z=¬(¬β(B_α(xy))β′′(A_α(yx))),Z=\neg\left(\neg\beta^{\prime}\left(B\uparrow_{\_}{\alpha(x-y)}\right)\boldsymbol{\cap}\,\,\beta^{\prime\prime}\left(A\uparrow_{\_}{\alpha(y-x)}\right)\right),

where β:P_y,xP_xy\beta^{\prime}\colon P_{\_}{y,x}\to P_{\_}{xy} and β′′:P_x,yP_xy\beta^{\prime\prime}\colon P_{\_}{x,y}\to P_{\_}{xy} are extensions of the alphabet permutations to languages, as described above.

Example.

Let II, UU, and OO be disjoint alphabets. Then SS consists of all subsets of {I,O,U}\{I,O,U\}. Let i={I}i=\{I\}, u={U}u=\{U\}, and o={O}o=\{O\}. The preordered heap P_iuP_{\_}{iu} consists of all languages over the alphabet I×UI\times U. P_uoP_{\_}{uo} consists of all languages over U×OU\times O. If L_1P_iuL_{\_}1\in P_{\_}{iu}, the concretization ι:P_iup_iuo\iota\colon P_{\_}{iu}\to p_{\_}{iuo} maps L_1L_{\_}1 to a language over I×U×OI\times U\times O. Observe that the order in which each alphabet appears is important and set from the beginning; this eliminates any potential ambiguities with the ordering of the alphabets (e.g., is it the alphabet I×UI\times U or U×IU\times I?). By definition, this concretization map is ()_O(\cdot)\uparrow_{\_}{O}. In the same way, the concretization ι:P_uop_iuo\iota^{\prime}\colon P_{\_}{uo}\to p_{\_}{iuo} is β()_I\beta\circ(\cdot)\uparrow_{\_}{I}, where β:P_uo,iP_iuo\beta:P_{\_}{uo,i}\to P_{\_}{iuo} permutes the symbols of the language so that they appear in the order (a,b,c)(a,b,c) with aIa\in I, bUb\in U, and cOc\in O. Thus, source multiplication is μ(L_1,L_2)=L_1_Oβ(L_2_I)\mu(L_{\_}1,L_{\_}2)=L_{\_}1\uparrow_{\_}{O}\boldsymbol{\cap}\beta\left(L_{\_}2\uparrow_{\_}{I}\right), which is the synchronous product.

5.2.2 Asynchronous equations

Now we form a semilattice SS whose elements are abstract sets and whose operation is set union. Let xSx\in S, and define P_x=2xP_{\_}x=2^{x^{*}}. For ySy\in S, the concretization P_x{P_{\_}x}P_xy{P_{\_}{xy}}ι\scriptstyle{\iota} is ι=()_yx\iota=(\cdot)\Uparrow_{\_}{y-x}. Proposition 5.1 shows that ι\iota is a preordered heap map. Thus, we have a sieved heap {(P_x,_x,μ_x,γ_x)}_xS\{(P_{\_}x,\leq_{\_}x,\mu_{\_}x,\gamma_{\_}x)\}_{\_}{x\in S}.

Since sieved heaps are preordered heaps (Theorem 4.5), we are in a position to solve language equations under asynchronous composition. Let x,ySx,y\in S, AP_xA\in P_{\_}x and BP_yB\in P_{\_}y. The largest solution to the equation AzBA\diamond z\leq B yields ZP_xyZ\in P_{\_}{xy} with Z=¬(¬B_xyA_yx)Z=\neg\left(\neg B\Uparrow_{\_}{x-y}\boldsymbol{\cap}\,\,A\Uparrow_{\_}{y-x}\right).

Example.

As before, let II, UU, and OO be disjoint alphabets, and let I,U,OSI,U,O\in S, where SS is a semilattice with the operation of set union. The preordered heap P_IUP_{\_}{IU} consists of all languages over IUI\boldsymbol{\cup}U. Similarly, the preordered heap P_UOP_{\_}{UO} consists of all languages over UOU\boldsymbol{\cup}O. The embedding ι:P_IUP_IUO\iota\colon P_{\_}{IU}\to P_{\_}{IUO} is simply ()_O(\cdot)\Uparrow_{\_}{O}, and the embedding ι:P_UOP_IUO\iota^{\prime}\colon P_{\_}{UO}\to P_{\_}{IUO} is ()_I(\cdot)\Uparrow_{\_}{I}. Thus, for L_1P_IUL_{\_}1\in P_{\_}{IU} and L_2P_UOL_{\_}2\in P_{\_}{UO}, source multiplication is μ(L_1,L_2)=L_1_OL_2_I\mu(L_{\_}1,L_{\_}2)=L_{\_}1\Uparrow_{\_}O\cap L_{\_}2\Uparrow_{\_}I, which is the asynchronous product.

6 Conclusions

The comparison of the closed form computation of quotients ranging from language equations to AG contracts suggested a new algebraic structure, called preordered heap, endowed with the axioms of preorders, together with a monotonic multiplication and an involution. We showed that an admissibility condition allows to solve equations over preordered heaps, and we gave the closed form of the solution. We showed that various theories qualify as preordered heaps and therefore admit such explicit solution. In particular, we showed that the conditions for being preordered heaps hold for Boolean lattices, assume-guarantee contracts, and for interface automata: in all cases we were able to derive axiomatically the quotients, which had been previously obtained by specific analysis of each theory. Finally we defined equations over sieved heaps to handle components defined over multiple alphabets, and rederived as special cases the solution of language equations known in the literature.

Acknowledgements

We are grateful for the comments of our anonymous reviewers. This work was supported in part by NSF Contract CPS Medium 1739816; MIUR, Project “Italian Outstanding Departments, 2018-2022”; INDAM, GNCS 2020, “Strategic Reasoning and Automated Synthesis of Multi-Agent Systems”; University of Verona, Cooperint 2019, Program for Visiting Researchers.

References

  • [1]
  • [2] A. Aziz, F. Balarin, R.K. Brayton & A. L. Sangiovanni-Vincentelli (2000): Sequential synthesis using S1S. IEEE Transactions on Computer-Aided Design 19(10), pp. 1149–1162, 10.1109/43.875301.
  • [3] G. Barrett & S. Lafortune (1998): Bisimulation, the Supervisory Control Problem and Strong Model Matching for Finite State Machines. Discrete Event Dynamic Systems: Theory & Applications 8(4), pp. 377–429, 10.1023/A:1008301317459.
  • [4] Nikola Beneš, Benoît Delahaye, Uli Fahrenberg, Jan Křetínský & Axel Legay (2013): Hennessy-Milner Logic with Greatest Fixed Points as a Complete Behavioural Specification Theory. In Pedro R. D’Argenio & Hernán Melgratti, editors: CONCUR 2013 – Concurrency Theory, Springer Berlin Heidelberg, Berlin, Heidelberg, pp. 76–90, 10.1007/978-3-642-40184-87.
  • [5] A. Benveniste, B. Caillaud, A. Ferrari, L. Mangeruca, R. Passerone & C. Sofronis (2007): Multiple Viewpoint Contract-Based Specification and Design. In Frank S. de Boer, Marcello M. Bonsangue, Susanne Graf & Willem-Paul de Roever, editors: Formal Methods for Components and Objects, Springer Berlin Heidelberg, Berlin, Heidelberg, pp. 200–225, 10.1007/978-3-540-92188-29.
  • [6] A. Benveniste, B. Caillaud, D. Nickovic, R. Passerone, J.-B. Raclet, P. Reinkemeier, A. L. Sangiovanni-Vincentelli, W. Damm, T. A. Henzinger & K. G. Larsen (2018): Contracts for System Design. Foundations and Trends®{}^{\text{\scriptsize{\textregistered}}} in Electronic Design Automation 12(2-3), pp. 124–400, 10.1561/1000000053.
  • [7] P. Bhaduri & S. Ramesh (2008): Interface synthesis and protocol conversion. Formal Asp. Comput. 20(2), pp. 205–224, 10.1007/s00165-007-0045-4.
  • [8] G. Bochmann (2013): Using logic to solve the submodule construction problem. Discrete Event Dynamic Systems 23(1), pp. 27–59, 10.1007/s10626-011-0127-6.
  • [9] Patricia Bouyer, Franck Cassez & François Laroussinie (2011): Timed Modal Logics for Real-Time Systems - Specification, Verification and Control. Journal of Logic, Language and Information 20(2), pp. 169–203, 10.1007/s10849-010-9127-4.
  • [10] J.R. Burch, D. Dill, E. Wolf & G. DeMicheli (1993): Modelling hierarchical combinational circuits. In: The Proceedings of the International Conference on Computer-Aided Design, pp. 612–617, 10.1109/ICCAD.1993.580149.
  • [11] Franck Cassez & François Laroussinie (2000): Model-Checking for Hybrid Systems by Quotienting and Constraints Solving. In E. Allen Emerson & Aravinda Prasad Sistla, editors: Computer Aided Verification, Springer Berlin Heidelberg, Berlin, Heidelberg, pp. 373–388, 10.1007/1072216729.
  • [12] G. Castagnetti, M. Piccolo, T. Villa, N. Yevtushenko, R. K. Brayton & A. Mishchenko (2015): Automated Synthesis of Protocol Converters with BALM-II. In D. Bianculli, R. Calinescu & B. Rumpe, editors: Software Engineering and Formal Methods. SEFM 2015 Collocated Workshops: ATSE, HOFM, MoKMaSD, and VERY*SCART. York, UK, September 7-8, 2015, pp. 281–296, 10.1007/978-3-662-49224-623.
  • [13] E. Cerny & M. Marin (1977): An approach to unified methodology of combinational switching circuits. IEEE Transactions on Computers vol. C-26(8), pp. 745–756, 10.1109/TC.1977.1674912.
  • [14] W. Chen, J. Udding & T. Verhoeff (1989): Networks of communicating processes and their (de-)composition. In J.L.A. van de Snepscheut, editor: Mathematics of Program Construction, Lecture Notes in Computer Science 375, Springer Berlin Heidelberg, pp. 174–196, 10.1007/3-540-51305-110.
  • [15] L. De Alfaro (2003): Game Models for Open Systems. In N. Dershowitz, editor: Verification: Theory and Practice, Lecture Notes in Computer Science 2772, Springer Verlag, pp. 269–289, 10.1007/978-3-540-39910-012.
  • [16] L. De Alfaro & T. A. Henzinger (2001): Interface Automata. SIGSOFT Softw. Eng. Notes 26(5), pp. 109–120, 10.1145/503209.503226.
  • [17] M. D. Di Benedetto, A. Sangiovanni-Vincentelli & T. Villa (2001): Model Matching for Finite State Machines. IEEE Transactions on Automatic Control 46(11), pp. 1726–1743, 10.1109/9.964683.
  • [18] M. Fujita, Y. Matsunaga & M. Ciesielski (2001): Multi-Level Logic Optimization. In R. Brayton, S. Hassoun & T. Sasao, editors: Logic Synthesis and Verification, Kluwer, pp. 29–63, 10.1007/978-1-4615-0817-52.
  • [19] P. Green (1986): Protocol Conversion. IEEE Transactions on Communications 34(3), pp. 257–268, 10.1109/32.4655.
  • [20] E. Haghverdi & H. Ural (1999): Submodule construction from concurrent system specifications. Information and Software Technology 41(8), pp. 499–506, 10.1016/S0950-5849(99)00014-2.
  • [21] H. Hallal, R. Negulescu & A. Petrenko (2000): Design of divergence-free protocol converters using supervisory control techniques. In: 7th IEEE International Conference on Electronics, Circuits and Systems, ICECS 2000, 2, pp. 705–708, 10.1109/ICECS.2000.912975.
  • [22] S. Hassoun & T. Villa (2001): Optimization of Synchronous Circuits. In R. Brayton, S. Hassoun & T. Sasao, editors: Logic Synthesis and Verification, Kluwer, pp. 225–253, 10.1007/978-1-4615-0817-52.
  • [23] J.E. Hopcroft, R. Motwani & J.D. Ullman (2001): Introduction to Automata Theory, Languages, and Computation. Addison-Wesley Publishing Company, 10.1145/568438.568455.
  • [24] T. Kam, T. Villa, R. K. Brayton & A. L. Sangiovanni-Vincentelli (1997): Synthesis of FSMs: Functional Optimization. Kluwer Academic Publishers, Boston, 10.1007/978-1-4757-2622-0.
  • [25] J. Kim & M.M. Newborn (1972): The simplification of sequential machines with input restrictions. IRE Transactions on Electronic Computers, pp. 1440–1443, 10.1109/T-C.1972.223521.
  • [26] R. Kumar, S. Nelvagal & S.I. Marcus (1997): A discrete event systems approach for protocol conversion. Discrete Event Dynamic Systems: Theory & Applications 7(3), pp. 295–315, 10.1023/A:1008258331497.
  • [27] R.P. Kurshan, M. Merritt, A. Orda & S.R. Sachs (1999): Modelling asynchrony with a synchronous model. Formal Methods in System Design vol. 15(no. 3), pp. 175–199, 10.1007/3-540-60045-061.
  • [28] S. S. Lam (1988): Protocol Conversion. IEEE Trans. Softw. Eng. 14(3), pp. 353–362, 10.1109/32.4655.
  • [29] K.G. Larsen & L. Xinxin (1990): Equation solving using modal transition systems. In: Logic in Computer Science, 1990. LICS ’90, Proceedings., Fifth Annual IEEE Symposium on e, pp. 108–117, 10.1109/LICS.1990.113738.
  • [30] N. Lynch & M. Tuttle (1989): An introduction to Input/Output automata. CWI-Quarterly 2(3), pp. 219–246, 10.1.1.83.7751.
  • [31] W.C. Mallon, J.T. Tijmen & T. Verhoeff (1999): Analysis and Applications of the XDI Model. In: International Symposium on Advanced Research in Asynchronous Circuits and Systems, pp. 231–242, 10.1109/ASYNC.1999.761537.
  • [32] P. Merlin & G. v. Bochmann (1983): On the Construction of Submodule Specifications and Communication Protocols. ACM Transactions on Programming Languages and Systems 5(1), pp. 1–25, 10.1145/357195.357196.
  • [33] R. Negulescu (2000): Process spaces. In C. Palamidessi, editor: Proceedings of CONCUR 2000, 11th International Conference on Concurrency Theory, LNCS 1877, Springer-Verlag, pp. 199–213, 10.1007/3-540-44618-416.
  • [34] R. Passerone, L. De Alfaro, T. A. Henzinger & A. L. Sangiovanni-Vincentelli (2002): Convertibility verification and converter synthesis: two faces of the same coin. In Lawrence T. Pileggi & Andreas Kuehlmann, editors: ICCAD, ACM, pp. 132–139. Available at http://doi.acm.org/10.1145/774572.774592.
  • [35] R. Passerone, Í. Íncer Romeo & A. L. Sangiovanni-Vincentelli (2019): Coherent Extension, Composition, and Merging Operators in Contract Models for System Design. ACM Trans. Embed. Comput. Syst. 18(5s), 10.1145/3358216.
  • [36] R. Passerone, J. A. Rowson & A. L. Sangiovanni-Vincentelli (1998): Automatic Synthesis of Interfaces Between Incompatible Protocols. In: DAC, pp. 8–13. Available at http://doi.acm.org/10.1145/277044.277047.
  • [37] J.-B. Raclet, E. Badouel, A. Benveniste, B. Caillaud, A. Legay & R. Passerone (2011): A modal interface theory for component-based design. Fundamenta Informaticae 108(1-2), pp. 119–149, 10.3233/FI-2011-416.
  • [38] Í. Íncer Romeo, A. L. Sangiovanni-Vincentelli, C.-W. Lin & E. Kang (2018): Quotient for Assume-Guarantee Contracts. In: 16th ACM-IEEE International Conference on Formal Methods and Models for System Design, MEMOCODE ’18, p. 67–77, 10.1109/MEMCOD.2018.8556872.
  • [39] E. Sentovich & D. Brand (2001): Flexibility in Logic. In R. Brayton, S. Hassoun & T. Sasao, editors: Logic Synthesis and Verification, Kluwer, pp. 65–88, 10.1007/978-1-4615-0817-52.
  • [40] T. Villa, A. Petrenko, N. Yevtushenko, A. Mishchenko & R. K. Brayton (2015): Component-Based Design by Solving Language Equations. Proceedings of the IEEE 103(11), pp. 2152–2167, 10.1109/JPROC.2015.2450937.
  • [41] T. Villa, N. Yevtushenko, R. K. Brayton, A. Mishchenko, A. Petrenko & A. L. Sangiovanni-Vincentelli (2012): The Unknown Component Problem: Theory and Applications. Springer, 10.1007/978-0-387-68759-9.
  • [42] S. Watanabe, K. Seto, Y. Ishikawa, S. Komatsu & M. Fujita (2007): Protocol Transducer Synthesis using Divide and Conquer approach. In: Design Automation Conference, 2007. ASP-DAC ’07. Asia and South Pacific, pp. 280–285, 10.1109/ASPDAC.2007.357999.
  • [43] N. Yevtushenko, T. Villa, R. K. Brayton, A. Mishchenko & A. L. Sangiovanni-Vincentelli (2004): Composition Operators in Language Equations. In: International Workshop on Logic and Synthesis, pp. 409–415.