Abstract
We present two methods for synthesizing large concurrent programs from temporal logic specifications. The first method deals with finite-state concurrent programs that are static, i.e., the set of processes is fixed. It produces an infinite family of static finite-state concurrent programs. The second method deals with dynamic concurrent programs, i.e., new processes can be created and added at run-time. It produces a single dynamic concurrent program. A dynamic concurrent program may be viewed as a limiting case of an infinite family of static programs, and so the second method may be viewed as generalizing the first. Our methods are algorithmically efficient, with complexity polynomial in the number of component processes (of the program) that are “alive” at any time. We do not explicitly construct the automata-theoretic product of all processes that are alive, thereby avoiding state explosion. Instead, for each interacting pair of processes, we construct (from a pair-specification) a pair-structure which embodies the interaction of the two processes. From each pair-structure, we synthesize a pair-program to coordinate the two processes. Our second method allows pair-programs to be added dynamically at run-time. They are then “composed conjunctively” with the currently alive pair-programs to “re-synthesize” the program. We can thus add new behaviors, which result in new properties being satisfied, at run-time. This “incremental composition” step has complexity independent of the total number of processes; it only requires the mechanical analysis of the two processes in the pair-program, and their immediate neighbors, i.e., the other processes which they interact directly with. Thus, any state-explosion incurred is explosion in the product of only two processes. We establish “large model” theorems which show that the synthesized global program inherits correctness properties from the pair-programs.
Similar content being viewed by others
Notes
A temporal leads-to property has the following form: if condition 1 holds now, then condition 2 eventually holds. \(\mathrm {ACTL}\) can express temporal leads-to if condition 1 is purely propositional.
We use \(i_1, \ldots , i_K\) instead of the more usual \(1, \ldots , K\) since it is important for us to take subsets of process indices and use them to define a sub-program. The more general notation \(i_1, \ldots , i_K\) emphasizes this.
\([1\!:\!n]\) denotes the integers from 1 to n inclusive.
This interpretation was proposed by Dijkstra [27].
\(f \Rightarrow {\mathsf {AF}} g\) is expressible in \(\mathrm {ACTL}\) when f is purely propositional. This will always be the case when we use \(\Rightarrow \).
Termination is obvious, since \(A_{h,m}^{\bar{h}}\) is a parallel assignment and the right-hand side of \(A_{h,m}^{\bar{h}}\) is a list of constants.
\(s_{ij}(B)\) is defined by the usual inductive scheme: \(s_{ij}(\)“\(x_{ij} = v_{ij}\)”\() = true \) iff \(s_{ij}(x_{ij}) = v_{ij}\), \(s_{ij}(B1 \wedge B2) = true \) iff \(s_{ij}(B1) = true \) and \(s_{ij}(B2) = true \), \(s_{ij}(\lnot B) = true \) iff \(s_{ij}(B) = false \).
We use \(s^n_{ij}\) to denote the \(n^{\prime }\)th state along \({\pi {\upharpoonright }ij}\), i.e., \({\pi {\upharpoonright }ij = s^0_{ij}, s^1_{ij}, \ldots }\), and we let \(s_{ij} = s^0_{ij}\).
Termination is obvious, since A is a parallel assignment and the right-hand side of \(A_{i,m}^{j}\) is a list of constants.
Since the interconnection relation I is changing dynamically, we do not use I as a subscript. We use \(\mathcal{P}\) as a subscript of \(M_\mathcal{P}\) as a reminder that \(M_\mathcal{P}\) is the global state transition diagram of \(\mathcal{P}\).
We use \(s^n_{ij}\) to denote the \(n^{\prime }\)th state along \({\pi {\upharpoonright }ij}\), i.e., \({\pi {\upharpoonright }ij = s^0_{ij}, s^1_{ij}, \ldots }\), and we let \(s_{ij} = s^0_{ij}\).
References
Almagor S, Kupferman O (2014) Latticed-ltl synthesis in the presence of noisy inputs. In: Muscholl A (ed) Foundations of software science and computation structures - 17th international conference, FOSSACS 2014, held as part of the European joint conferences on theory and practice of software, ETAPS 2014, Grenoble, France, April 5–13, 2014. Proceedings, lecture notes in computer science, vol 8412. Springer, Berlin, pp 226–241
Anuchitanukul A, Manna Z (1994) Realizability and synthesis of reactive modules. In: Proceedings of the 6th international conference on computer aided verification. Lecture notes in computer science, vol 818. Springer, Berlin, pp 156–169
Apt K, Olderog E (1997) Verification of sequential and concurrent programs. Springer, Berlin
Arons T, Pnueli A, Ruah S, Xu J, Zuck L (2001) Parameterized verification with automatically computed inductive assertions. In: CAV
Attie PC, Bensalem S, Bozga M, Jaber M, Sifakis J, Zaraket FA (2013) An abstract framework for deadlock prevention in BIP. In: Beyer D, Boreale M (eds) Formal techniques for distributed systems—joint IFIP WG 6.1 international conference, FMOODS/FORTE 2013, held as part of the 8th international federated conference on distributed computing techniques, DisCoTec 2013, Florence, Italy, June 3–5, 2013, proceedings. Lecture notes in computer science, vol 7892. Springer, Berlin, pp 161–177
Attie PC, Cherri A, Bab KDA, Sakr M, Saklawi J (2015) Model and program repair via SAT solving. In: 13. ACM/IEEE international conference on formal methods and models for codesign, MEMOCODE 2015, Austin, TX, USA, September 21–23, 2015. IEEE, pp 148–157. Tool download available at http://eshmuntool.blogspot.com/
Attie PC, Emerson EA (2001) Synthesis of concurrent systems for an atomic read/write model of computation. ACM Trans Program Lang Syst 23(2):187–242. Extended abstract appears in proceedings of the 15’th ACM symposium of principles of distributed computing (PODC), Philadelphia, May 1996, pp 111–120
Attie PC, Lynch N. (2016) Dynamic input/output automata: a formal and compositional model for dynamic systems. Information and Computation
Attie PC (2016) Finite-state concurrent programs can be expressed in pairwise normal form. Theor Comput Sci 619:1–31
Attie P, Arora A, Emerson EA (2004) Synthesis of fault-tolerant concurrent programs. ACM Trans Program Lang Syst 26(1):125–185. Extended abstract appears in proceedings of the 17’th ACM symposium of principles of distributed computing (PODC), Puerto Vallarta, Mexico, pp 173–182
Attie P, Chockler H (2005) Efficiently verifiable conditions for deadlock-freedom of large concurrent programs. In: Proceedings of VMCAI 2005: verification, model checking and abstract interpretation, Paris
Attie PC, Emerson EA (1998) Synthesis of concurrent systems with many similar processes. ACM Trans Program Lang Syst 20(1):51–115. doi:10.1145/271510.271519
Avni G, Kupferman O (2014) Synthesis from component libraries with costs. In: Baldan P, Gorla D (eds) CONCUR 2014—concurrency theory—25th international conference, CONCUR 2014, Rome, Italy, September 2–5, 2014. Proceedings, lecture notes in computer science, vol 8704. Springer, Berlin, pp 156–172
Bloem R, Jacobs S, Khalimov A, Konnov I, Rubin S, Veith H, Widder J (2015) Decidability of parameterized verification. Synthesis lectures on distributed computing theory. Morgan & Claypool Publishers, San Rafael
Bonakdarpour B, Bozga M, Jaber M, Quilbeuf J, Sifakis J (2010) From high-level component-based models to distributed implementations. In: Carloni CP, Tripakis S (eds) EMSOFT. ACM, New York, pp 209–218
Bonakdarpour B, Bozga M, Jaber M, Quilbeuf J, Sifakis J (2012) A framework for automated distributed implementation of component-based models. Distrib Comput 25(5):383–409
Bonakdarpour B, Kulkarni S, Abujarad F (2012) Symbolic synthesis of masking fault-tolerant distributed programs. Distrib Comput 25(1):83–108
Browne M, Clarke EM, Grumberg O (1988) Characterizing finite kripke structures in propositional temporal logic. Theor Comput Sci 59:115–131
Buccafurri F, Eiter T, Gottlob G, Leone N (1999) Enhancing model checking in verification by AI techniques. Artif Intell 112(1):57–104
Chatzieleftheriou G, Bonakdarpour B, Katsaros P, Smolka SA (2015) Abstract model repair. Log Methods Comput Sci 11(3):1–43
Clarke EM, Emerson EA, Sistla P (1986) Automatic verification of finite-state concurrent systems using temporal logic specifications. ACM Trans Program Lang Syst 8(2):244–263. Extended abstract in proceedings of the 10th annual ACM symposium on principles of programming languages
Clarke EM, Grumberg O, Browne MC (1986) Reasoning about networks with many identical finite-state processes. In: Proceedings of the 5th annual ACM symposium on principles of distributed computing. ACM, New York, pp 240–248
de Moura LM, Owre S, Rueß H, Rushby JM, Shankar N, Sorea M, Tiwari A (2004) SAL 2. In: Alur R, Peled DA (eds) Computer aided verification, 16th international conference, CAV 2004, Boston, MA, USA, July 13–17, 2004. Proceedings, lecture notes in computer science, vol 3114. Springer, Berlin, pp 496–500
Deng X, Dwyer MB, Hatcliff J, Mizuno M (2002) Invariant-based specification, synthesis, and verification of synchronization in concurrent programs. In: Proceedings of the 24th international conference on software engineering, ICSE ’02. ACM, New York, pp 442–452
Dijkstra EW (1974) Self-stabilizing systems in spite of distributed control. Commun ACM 17(11):643–644
Dijkstra EW (1976) A discipline of programming. Prentice-Hall Inc., Englewood Cliffs
Dijkstra EW (1982) Selected writings on computing: a personal perspective. Springer, New York
Dill D, Wong-Toi H (1990) Synthesizing processes and schedulers from temporal specifications. In: International conference on computer-aided verification, no. 531 in LNCS. Springer, Berlin, pp 272–281
Emerson EA (1990) Temporal and modal logic. In: Leeuwen JV (ed) Handbook of theoretical computer science. Formal models and semantics, vol B. The MIT Press, Cambridge
Emerson EA, Kahlon V (2000) Reducing model checking of the many to the few. In: Conference on automated deduction, pp 236–254
Emerson EA, Namjoshi KS (1996) Automatic verification of parameterized synchronous systems (extended abstract). In: CAV, pp 87–98
Emerson EA, Clarke EM (1982) Using branching time temporal logic to synthesize synchronization skeletons. Sci Comput Program 2:241–266
Emerson EA, Lei C (1987) Modalities for model checking: branching time logic strikes back. Sci Comput Program 8:275–306
Faghih F, Bonakdarpour B (2014) SMT-based synthesis of distributed self-stabilizing systems. In: Felber P, Garg VK (eds) Stabilization, safety, and security of distributed systems—16th international symposium, SSS 2014, Paderborn, Germany, September 28–October 1, 2014. Proceedings, lecture notes in computer science, vol 8756. Springer, Berlin, pp 165–179
Fekete A, Gupta D, Luchango V, Lynch N, Shvartsman A (1999) Eventually-serializable data services. Theor Comput Sci 220:113–156. Conference version appears in ACM symposium on principles of distributed computing, 1996
Finkbeiner B, Schewe S (2013) Bounded synthesis. Int J Softw ToolsTechnol Transf 15(5–6):519–539
Gascón A, Tiwari A (2014) Synthesis of a simple self-stabilizing system. In: Chatterjee K, Ehlers R, Jha S (eds) Proceedings 3rd workshop on synthesis, SYNT 2014, Vienna, Austria, July 23–24, 2014. EPTCS, vol 157, pp 5–16
Grumberg O, Long D (1994) Model checking and modular verification. ACM Trans Program Lang Syst 16(3):843–871
Hoare CAR (1969) An axiomatic basis for computer programming. Commun ACM 12(10):576–580 583
Kupferman O, Madhusudan P, Thiagarajan P, Vardi M (2000) Open systems in reactive environments: control and synthesis. In: Proceedings of the 11th international conference on concurrency theory, lecture notes in computer science, vol 1877. Springer, Berlin, pp 92–107
Kupferman O, Vardi M (1997) Synthesis with incomplete information. In: 2nd international conference on temporal logic, Manchester, pp 91–106
Ladin R, Liskov B, Shrira L, Ghemawat S (1992) Providing high availability using lazy replication. ACM Trans Comput Syst 10(4):360–391
Liskov B (2001) Program development in java. Addison Wesley, Reading
Lustig Y, Vardi MY (2009) Synthesis from component libraries. In: Proceedings of the 12th international conference on foundations of software science and computational structures: held as part of the joint European conferences on theory and practice of software. ETAPS 2009, FOSSACS ’09. Springer, Berlin, pp 395–409
Lynch NA (1996) Distribiuted algorithms. Morgan Kaufmann, Burlington
Manna Z, Pnueli A (1995) Temporal verification of reactive systems—safety. Springer, Berlin
Manna Z, Wolper P (1984) Synthesis of communicating processes from temporal logic specifications. ACM Trans Program Lang Syst 6(1):68–93. Also appears in proceedings of the workshop on logics of programs, Yorktown-Heights, NY. Lecture notes in computer science, vol 131. Springer, Berlin
Pnueli A, Rosner R (1989) On the synthesis of a reactive module. In: Proceedings of the 16th ACM symposium on principles of programming languages. ACM, New York, pp 179–190
Pnueli A, Rosner R (1989) On the synthesis of asynchronous reactive modules. In: Proceedings of the 16th ICALP. Lecture notes in computer science, vol 372. Springer, Berlin, pp 652–671
Pnueli A, Ruah S, Zuck L (2001) Automatic deductive verification with invisible invariants. In: TACAS
Schewe S, Finkbeiner B (2007) Bounded synthesis. In: Namjoshi KS, Yoneda T, Higashino T, Okamura Y (eds) Automated technology for verification and analysis, 5th international symposium, ATVA 2007, Tokyo, Japan, October 22–25, 2007. Proceedings, lecture notes in computer science, vol 4762. Springer, Berlin, pp 474–488
Schneider F (1997) Verification of sequential and concurrent programs. Springer, Berlin
Sistla AP, German SM (1992) Reasoning about systems with many processes. J ACM 39(3):675–735. Conference version appears in IEEE logic in computer science 1987
Tarjan R (1972) Depth-first search and linear graph algorithms. SIAM J Comput 1(2):146–160
Wolper P (1986) Expressing interesting properties of programs in propositional temporal logic. In: Proceedings of the 13th ACM SIGACT-SIGPLAN symposium on principles of programming languages. POPL ’86. ACM, New York, pp 184–193
Author information
Authors and Affiliations
Corresponding author
Additional information
Some results in this paper appeared in CONCUR 1999 as the paper “Synthesis of Large Concurrent Programs Via Pairwise Composition”.
Appendix: Glossary of major symbols
Appendix: Glossary of major symbols
- \(\models \) :
-
Satisfies relation of \(\mathrm {CTL}^*\), Sect. 2.2
- \(\models _{\Phi }\) :
-
Satisfies relation of \(\mathrm {CTL}^*\) relativized to fairness notion \(\Phi \), Sect. 2.3
- \(\Phi \) :
-
\(\mathrm {CTL}^*\) path formula that specifies fairness, Sect. 2.3
- \(\otimes , \bigotimes _{j \in I(i)}\) :
-
“Conjunctive” guarded-command composition operator, Definition 14
- \(\oplus , \bigoplus _{\ell \in [1:n]}\) :
-
“Disjunctive” guarded-command composition operator, Definition 14
- \(\{|{}|\}\) :
-
State to formula operator, Definition 21
- \({{{\varvec{\bigwedge }}}_{\,i j}\,}\) :
-
Static spatial modality, Definition 9
- \({{{\varvec{\bigwedge }}}_{\,i j}^{s}\,}\) :
-
Dynamic spatial modality, Definition 33
- \( AP _i\) :
-
The set of atomic propositions of process i, Sect. 2.1
- \( AP \) :
-
The set of all atomic propositions, Sect. 2.2
- \({{\upharpoonright }i}\) :
- \({{\upharpoonright } SH _{ij}}\) :
-
State projection onto the shared variables \( SH _{ij}\), Definition 5
- \({{\upharpoonright }ij}\) :
-
State or path projection onto pair-program \((S_{ij}^0, P_{i}^{j}\!\parallel \!P_{j}^{i})\), Definitions 12 and 34
- \({{\upharpoonright }J}\) :
-
State or path projection onto a J-subprogram, Definitions 12, 18, 34, and 40
- \(\mathsf {PS}\) :
-
Pair-specification, Definition 3
- \(P_{i}^{j}\) :
-
Pair-process that represents process i in the pair-program consisting of processes i and j, Definition 4
- \(a_{i}^{j}\) :
-
Arc of process \(P_{i}^{j}\), Sect. 5.3
- \(s_i, t_i\) :
-
Local state of process \(P_{i}^{j}\) or process \(P_{i}\), Sect. 2.1
- \((S_{ij}^0, P_{i}^{j}\!\parallel \!P_{j}^{i})\) :
-
Pair-program consisting of processes i and j, Definition 4
- \( SH _{ij}\) :
-
Shared variables of \((S_{ij}^0, P_{i}^{j}\!\parallel \!P_{j}^{i})\), Definition 4
- \(S_{ij}^0\) :
-
The set of initial states of \((S_{ij}^0, P_{i}^{j}\!\parallel \!P_{j}^{i})\), Definition 4
- \(S_{ij}\) :
-
The set of states of \((S_{ij}^0, P_{i}^{j}\!\parallel \!P_{j}^{i})\), Definition 6
- \(R_{ij}\) :
-
The transition relation of \((S_{ij}^0, P_{i}^{j}\!\parallel \!P_{j}^{i})\), Definition 6
- \(M_{ij}\) :
-
Pair-structure of \((S_{ij}^0, P_{i}^{j}\!\parallel \!P_{j}^{i})\), Definition 6
- \(\mathscr {I}\) :
-
Global static specification, Definition 7
- \({\mathscr {I}}. pairs \) :
-
The pairs in \(\mathscr {I}\), Definition 7
- \( I \) :
-
Interconnection relation, Definition 8
- \({ dom}(I)\) :
-
Domain of I, Definition 8
- J :
-
Subrelation of I; gives a subprogram of \((S_I^0, P_{i_1}\!\parallel \!\ldots \!\parallel \!P_{i_K})\), Definition 11
- \({ dom}(J)\) :
-
Domain of J, Sect. 5.1
- \((S_I^0, P_{i_1}\!\parallel \!\ldots \!\parallel \!P_{i_K})\) :
-
The global static program synthesized from \(\mathscr {I}\), Definition 14
- \(P_{i}\) :
-
Process i in \((S_I^0, P_{i_1}\!\parallel \!\ldots \!\parallel \!P_{i_K})\), Definition 14
- \(a_{i}\) :
-
Arc in process \(P_i\), Sect. 5.2
- s :
-
I-state, Definition 11
- \(S_I^0\) :
-
The set of initial states of \((S_I^0, P_{i_1}\!\parallel \!\ldots \!\parallel \!P_{i_K})\), Definition 14
- \(S_I\) :
-
The set of states of \((S_I^0, P_{i_1}\!\parallel \!\ldots \!\parallel \!P_{i_K})\), Definition 15
- \(R_I\) :
-
The transition relation of \((S_I^0, P_{i_1}\!\parallel \!\ldots \!\parallel \!P_{i_K})\), Definition 15
- \(M_I\) :
-
I-structure of \((S_I^0, P_{i_1}\!\parallel \!\ldots \!\parallel \!P_{i_K})\), Definition 15
- \(W_I(s)\) :
-
The wait-for-graph for \((S_I^0, P_{i_1}\!\parallel \!\ldots \!\parallel \!P_{i_K})\) in I-state s, Definition 19
- \(\mathscr {D}\) :
-
Global dynamic specification, Definition 28
- \(\mathscr {PS}\) :
-
Universal set of pair-specifications, Definition 28
- \(\mathscr {PS}_0\) :
-
Initial set of pair-specifications, Definition 28
- \(\mathsf {create}\) :
-
Create mapping, Definition 28
- \({\mathscr {I}}. pairs \) :
-
The pairs in \(\mathscr {I}\), Definition 7
- s :
-
Configuration, Definition 31
- \(s.\mathscr {I}\) :
-
Pair-specifications in configuration s, Definition 31
- \(s.\mathcal{A}\) :
-
Pair-programs in configuration s, Definition 31
- \(s.\mathcal{S}\) :
-
State-mapping of configuration s, Definition 31
- \({s}.\textit{procs}\) :
-
Processes in configuration s, Definition 31
- \({s}. pairs \) :
-
Pairs in configuration s, Definition 31
- \( I _{s}\) :
-
Dynamic interconnection relation for configuration s, Definition 32
- \(\mathcal{P}\) :
-
The global dynamic program synthesized from \(\mathscr {D}\), Definition 37
- \(P_i\) :
-
Process i in \(\mathcal{P}\), Definition 37
- \(a_{i}\) :
-
Arc in process \(P_i\), Sect. 7.2
- \(S^0\) :
-
The set of initial states of \(\mathcal{P}\), Definition 37
- S :
-
The set of states of \(\mathcal{P}\), Definition 39
- \(R_n\) :
-
The normal transitions of \(\mathcal{P}\), Definition 39
- \(R_c\) :
-
The create transitions of \(\mathcal{P}\), Definition 39
- \(M_\mathcal{P}\) :
-
Structure (transition diagram) of \(\mathcal{P}\), Definition 39
- W(s):
-
The wait-for-graph for \(\mathcal{P}\) in configuration s, Definition 42
Rights and permissions
About this article
Cite this article
Attie, P.C. Synthesis of large dynamic concurrent programs from dynamic specifications. Form Methods Syst Des 48, 94–147 (2016). https://doi.org/10.1007/s10703-016-0252-9
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10703-016-0252-9