Constructing Weakly Terminating Interface Protocols
Debjyoti Bera, Tim A.C. Willemse · 2026
Read Constructing Weakly Terminating Interface Protocols by Debjyoti Bera, Tim A.C. Willemse (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-15675.txt.
Introduction
Bera and Willemse build interface protocols that cannot trap users in deadlock. Interfaces set which talks a server and its clients may hold. Heavy concurrency raises the risk of deadlocks and livelocks. Weak termination promises an exit path from each reachable state. The authors widen older by-construction results for such compositions. From one sound server spec, they derive whole classes of clients. A partial mirroring relation does the work. An open-source tool guides modelers who apply the method.
Catalog record
| CREATOR | Debjyoti Bera, Tim A.C. Willemse |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 76198 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2603.15675
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Constructing Weakly Terminating Interface Protocols Debjyoti Bera, Tim A.C. Willemse Abstract Interfaces play a central role in determining compatible component compositions by prescribing permissible interactions between a service provider (server) and its consumers (clients). The high degree of concurrency in asynchronous communicating systems increases the risk of unintentionally introducing deadlocks and livelocks. The weak termination property serves as a basic sanity check to avoid such problems. It assures that in each reachable state, the system has the option to eventually terminate. This paper generalizes existing results that, by construction, guarantee weakly terminating interface compositions. Our generalizations make the theory applicable more broadly in practice. Starting with an interface specification of a server satisfying certain properties, we show how a class of clients modeling different usage contexts can be derived using a partial mirroring relation. Furthermore, we discuss an embedding of our results in an open-source tool to guide modelers in designing weakly terminating interfaces. 1 Introduction The first step in the design of a component-based system involves the decomposition of a given system design problem into functionally coherent units of execution called components [ 11 , 16 ] . Starting from an abstract model, each component is further detailed by means of stepwise refinements. To accomplish a common goal, components may need to interact with each other. In modern distributed systems, these interactions are typically asynchronous via message passing. The set of permissible interactions between pairs of components defines an interface protocol (contract) having two sides: a server side providing the functionality and a client side consuming it. The use of state machine formalisms [ 7 ] to specify such interactions is quite prevalent. When interfaces between components have been defined, the resulting system is obtained by composing shared client-server interfaces satisfying some pre-defined notion of compatibility. A direct consequence of a component-based approach is the high degree of complexity induced by concurrency and asynchronous communication making it difficult to avoid subtle yet critical design errors, resulting in deadlocks or livelocks. It turns out that even if a server side protocol is free of these issues, simply mirroring this protocol to obtain client side protocols to define their usage does not guarantee the absence of errors. Therefore the use of formal modeling and analysis techniques becomes inevitable. Petri nets provide a natural way to model an asynchronous communicating system and are supported by a rich set of verification methods and tools [ 1 ] . The graphical representation of a Petri net structure provides an intuitive way of modeling systems and in particular, structural analysis techniques overcome the drawbacks of state space exploration techniques for verifying system behavior. A basic requirement for any component-based system is that all components in the system should always have the option to reach a desired, final state, and that all messages that have been sent have been received. This property is called weak termination . Weak termination does not imply that the system always terminates but that there is always an option to do so. As a consequence of this property the freedom of deadlocks and livelocks is guaranteed. Many interesting results exist for subclasses of Petri nets such that weak termination is implied by their structure. In [ 17 ] a sufficient condition is presented to pairwise verify weak termination for tree-structured compositions. For a subclass of compositions of pairs of components, called ATIS-nets, this condition is implied by their structure [ 18 ] . ATIS-nets are constructed from pairs of acyclic marked graphs and isomorphic state machines, and the simultaneous refinement of pairs of places with weakly terminating multi-workflow nets. In [ 6 ] , an architectural framework based on the notion of components and ports (defining a communication protocol) is proposed. The sufficient conditions for port compatibility, as well as on the acyclic network structure of component compositions, induces the weak termination property on the resulting system (network of asynchronous communicating components). In [ 5 ] , another architectural framework based on the notion of components and interaction patterns (a parameterized multi-workflow net defining a communication protocol) is proposed. The interaction patterns cover three commonly occurring ones in practice, namely remote procedure call, cancellation (goal-feedback-result) and publish-subscribe. In each communication refinement of the existing system, a new component is added to the system as part of an interaction pattern. In [ 4 ] , the architectural framework [ 5 ] is extended with the mirrored port pattern by lifting the notion of compatible ports from [ 6 ] to interaction patterns. Figure 1 : The Mirrored Portnet Interaction Pattern The mirrored port pattern defines a class of weakly terminating single server and multiple client interaction patterns, where each client is an isomorphic mirror of the server state machine satisfying structural properties that enforce communication conditions such as the choice and leg property. The former guarantees that only one of the parties make a choice whenever there is a conflict, while the latter guarantees that every path between a split and a join always requires the participation of a server and one of the clients. An example of a mirrored port pattern is shown in Fig. 1 . It turns out that for practical applications, the mirrored port pattern is quite limiting for at least three reasons: (i) the choice property requires there are no races between a server and client, i.e., the initiative of resolving conflicting transitions is either with the server or one of its client, but not both. This restriction is quite limiting for practical applications where races are often intensional. For instance, in Fig. 1 , it is not possible to model a race between a client firing one of its transitions from the place ready and a server that may emit an error from ready . (ii) mirrored portnets do not allow multiple transitions in a server/client to be connected to the same interface place. This means that it is not possible to send/receive the same message from more than one state. For instance, in Fig. 1 , the transition reinit had to be introduced since, transition init cannot occur twice and share the same interface place. (iii) the isomorphism requirement implies that client portnets must fully mirror the server portnet even though they may not use all functionality. For instance, in Fig. 1 , all clients C_{1},\ldots,C_{n} are required to implement both choices from the place ready , even though some of the clients may only use one of them. This is a common requirement since each client may require a different usage of a server depending on the context of the component they occur. This paper revisits the mirrored port interaction pattern [ 4 ] and extends it with a labeling function, relaxes constraints on its structure and weakens the isomorphism requirement on portnets. We call this class of interaction patterns partial mirrored portnet and show that the weak termination property holds for these patterns. The results provide a structured method to design and reason about the correctness of a large class of interfaces encountered in practice. Since partial mirrored portnets are an interaction pattern of the component-based framework, we may reuse the stepwise refinements based construction method to design a weakly terminating network of