Skip to main content
Log in

Synthesis of large dynamic concurrent programs from dynamic specifications

  • Published:
Formal Methods in System Design Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

Notes

  1. 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.

  2. 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.

  3. \([1\!:\!n]\) denotes the integers from 1 to n inclusive.

  4. This interpretation was proposed by Dijkstra [27].

  5. \(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 \).

  6. 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.

  7. \(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 \).

  8. 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}\).

  9. Termination is obvious, since A is a parallel assignment and the right-hand side of \(A_{i,m}^{j}\) is a list of constants.

  10. 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}\).

  11. 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

  1. 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

  2. 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

  3. Apt K, Olderog E (1997) Verification of sequential and concurrent programs. Springer, Berlin

    Book  MATH  Google Scholar 

  4. Arons T, Pnueli A, Ruah S, Xu J, Zuck L (2001) Parameterized verification with automatically computed inductive assertions. In: CAV

  5. 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

  6. 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/

  7. 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

  8. Attie PC, Lynch N. (2016) Dynamic input/output automata: a formal and compositional model for dynamic systems. Information and Computation

  9. Attie PC (2016) Finite-state concurrent programs can be expressed in pairwise normal form. Theor Comput Sci 619:1–31

    Article  MathSciNet  MATH  Google Scholar 

  10. 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

  11. 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

  12. 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

    Article  Google Scholar 

  13. 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

  14. 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

  15. 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

    Google Scholar 

  16. 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

    Article  MATH  Google Scholar 

  17. Bonakdarpour B, Kulkarni S, Abujarad F (2012) Symbolic synthesis of masking fault-tolerant distributed programs. Distrib Comput 25(1):83–108

    Article  MATH  Google Scholar 

  18. Browne M, Clarke EM, Grumberg O (1988) Characterizing finite kripke structures in propositional temporal logic. Theor Comput Sci 59:115–131

    Article  MathSciNet  MATH  Google Scholar 

  19. Buccafurri F, Eiter T, Gottlob G, Leone N (1999) Enhancing model checking in verification by AI techniques. Artif Intell 112(1):57–104

    Article  MathSciNet  MATH  Google Scholar 

  20. Chatzieleftheriou G, Bonakdarpour B, Katsaros P, Smolka SA (2015) Abstract model repair. Log Methods Comput Sci 11(3):1–43

    MathSciNet  MATH  Google Scholar 

  21. 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

  22. 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

  23. 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

  24. 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

  25. Dijkstra EW (1974) Self-stabilizing systems in spite of distributed control. Commun ACM 17(11):643–644

    Article  MATH  Google Scholar 

  26. Dijkstra EW (1976) A discipline of programming. Prentice-Hall Inc., Englewood Cliffs

    MATH  Google Scholar 

  27. Dijkstra EW (1982) Selected writings on computing: a personal perspective. Springer, New York

    Book  MATH  Google Scholar 

  28. 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

  29. 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

  30. Emerson EA, Kahlon V (2000) Reducing model checking of the many to the few. In: Conference on automated deduction, pp 236–254

  31. Emerson EA, Namjoshi KS (1996) Automatic verification of parameterized synchronous systems (extended abstract). In: CAV, pp 87–98

  32. Emerson EA, Clarke EM (1982) Using branching time temporal logic to synthesize synchronization skeletons. Sci Comput Program 2:241–266

    Article  MATH  Google Scholar 

  33. Emerson EA, Lei C (1987) Modalities for model checking: branching time logic strikes back. Sci Comput Program 8:275–306

    Article  MathSciNet  MATH  Google Scholar 

  34. 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

  35. 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

  36. Finkbeiner B, Schewe S (2013) Bounded synthesis. Int J Softw ToolsTechnol Transf 15(5–6):519–539

    Article  MATH  Google Scholar 

  37. 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

  38. Grumberg O, Long D (1994) Model checking and modular verification. ACM Trans Program Lang Syst 16(3):843–871

    Article  Google Scholar 

  39. Hoare CAR (1969) An axiomatic basis for computer programming. Commun ACM 12(10):576–580 583

    Article  MATH  Google Scholar 

  40. 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

  41. Kupferman O, Vardi M (1997) Synthesis with incomplete information. In: 2nd international conference on temporal logic, Manchester, pp 91–106

  42. Ladin R, Liskov B, Shrira L, Ghemawat S (1992) Providing high availability using lazy replication. ACM Trans Comput Syst 10(4):360–391

    Article  Google Scholar 

  43. Liskov B (2001) Program development in java. Addison Wesley, Reading

    Google Scholar 

  44. 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

  45. Lynch NA (1996) Distribiuted algorithms. Morgan Kaufmann, Burlington

    Google Scholar 

  46. Manna Z, Pnueli A (1995) Temporal verification of reactive systems—safety. Springer, Berlin

    Book  MATH  Google Scholar 

  47. 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

  48. 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

  49. 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

  50. Pnueli A, Ruah S, Zuck L (2001) Automatic deductive verification with invisible invariants. In: TACAS

  51. 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

  52. Schneider F (1997) Verification of sequential and concurrent programs. Springer, Berlin

    Google Scholar 

  53. 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

  54. Tarjan R (1972) Depth-first search and linear graph algorithms. SIAM J Comput 1(2):146–160

    Article  MathSciNet  MATH  Google Scholar 

  55. 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

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Paul C. Attie.

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}\) :

State projection onto process i, Definition 5 and  34

\({{\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

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10703-016-0252-9

Keywords

Navigation