Submodule construction from concurrent system specifications E. Haghverdi, H. Ural * School of Information Technology and Engineering, MacDonald Hall, 150 Louis Pasteur, University of Ottawa, Ottawa, Ontario KIN 6N5, Canada Received 1 June 1998; received in revised form 17 December 1998; accepted 17 February 1999 Abstract The submodule construction problem (SCP) as stated and formulated by Merlin and Bochmann [P. Merlin, G.V. Bochmann, On the construction of submodule specification and communication protocols, ACM Trans. Prog. Lang. Sys., 5(1) (1983) 1–25] is considered: given the specification of a system (module) and that of its n - 1 submodules, determine the specification of the nth submodule that together with the given n - 1 submodules will satisfy the given system specification. We recast SCP in a formal setting and proceed to present and prove the correctness of an algorithm for the solution of SCP where submodules are prefix-closed finite state machines. 1999 Elsevier Science B.V. All rights reserved. Keywords: Concurrent systems; Stepwise refinement; Submodule construction problem 1. Introduction The problem of designing concurrent systems for distrib- uted applications has been an active area during the last decade. The complexity of designing such systems has led the designers to stepwise refinement techniques where the specification of a given system is decomposed into interact- ing modules which in turn are decomposed into submodules until a satisfactory level of decomposition of the system functionality is achieved. The following problem, referred to as submodule construction problem (SCP), arises in this context: given the specification of a system (module) and that of its n - 1 submodules, determine the specification of the nth submodule that together with the given n - 1 submodules will satisfy the given system specification. A particular instance of this problem can be given for commu- nication protocols. In this case the specifications for the communication services to be provided by the protocol and by the underlying layer are given. The specification of one of the protocol entities is also given and the task is to derive the specification of the other protocol entity [8,10]. SCP is formulated and treated by Merlin and Bochmann [4]. They give a formula which defines the specification of the unknown submodule in the general case where submo- dule specifications are given in terms of sets of possible execution sequences. They find the most general specifica- tion possible for the unknown submodule. The treatment and presentation of [4] is to a large extent informal. This obscures the main ideas presented in the article and makes a mathematical and formal analysis of the material presented therein very difficult. In this article we recast the material presented in [4] in a more formal and mathematically more precise way. We next consider the case where the submodules are given by finite state machines (FSM) and present an algorithm for SCP. The algorithm is then proven to be correct. Beside treating the material in [4] in a more formal way, our work extends theirs along the following lines: (1) we present and prove correct an algorithm for the solution of SCP in the case of FSM modules, whereas in [4] no explicit algorithm is given for the solution of SCP. (2) Although not explicitly mentioned in [4], the examples considered there involve FSMs with all states as accepting states. Our proposed algorithm, however, handles the general case where each module is considered to be a prefix-closed FSM (i.e. it accepts prefix-closed languages) with arbitrary accepting states (cf. Example 1). Hence, the examples trea- ted in [4] are special cases of SCP that can be solved by our algorithm (cf. Example 3). (3). The proposed algorithm produces a prefix-closed FSM, however the method in [4] does not yield a prefix-closed module in general. The rest of the article is organized as follows: in Section 2 we recast the material presented in [4] and formulate the main result presented there in Proposition 1 and Theorem 1. Information and Software Technology 41 (1999) 499–506 0950-5849/99/$ - see front matter 1999 Elsevier Science B.V. All rights reserved. PII: S0950-5849(99)00014-2 This work is supported in part by the Natural Sciences and Engineering Research Council of Canada under grant number STR0149338. * Corresponding author. Tel.: + 1-613-562-5800; fax: + 1-613-562- 5185. E-mail address: ural@site.uottawa.ca (H. Ural)