Abstract
Concurrent programs are often complex and they are not straightforward to develop and prove correct. Formal development methods based on refinement make it possible not only to derive programs gradually, but also to prove their correctness in a stepwise fashion. Event-B is a formal framework that has been shown useful for developing concurrent and distributed programs. In order to scale to large systems, models can be decomposed into sub-models that can be refined semi-independently and executed in parallel. In this paper, we show how to introduce explicit control flow for the concurrent sub-models in the form of event schedules. The purpose of these schedules is both to provide process-oriented specifications of the programs to complement the state-based approach in Event-B, as well as to facilitate more efficient implementation of the models. The schedules are introduced in a stepwise manner and should be designed to result in a correctness-preserving refinement step. In order to reduce the verification burden on the developers, we provide patterns for schedule introduction, together with their associated proof obligations. We demonstrate our method by applying it on the dining philosophers problem.
Similar content being viewed by others
References
Abrial J-R (2010) Modeling in Event B: system and software engineering. Cambridge University Press, Cambridge
Abrial J-R, Hallerstede S (2007) Refinement, decomposition, and instantiation of discrete models: application to Event-B. Fundam Inform 77(1–2): 1–28
Boström P, Degerlund F, Sere K, Waldén M (2011) Concurrent scheduling of Event-B models. In: Proceedings 15th international refinement workshop, pp 166–182. http://dx.doi.org/10.4204/EPTCS.55.11
Butler M, Edmunds A (2011) Tasking Event-B: an extension to Event-B for generating concurrent code. In: PLACES 2011 workshop, 2011.http://places11.di.fc.ul.pt/proceedings.pdf/view
Back R-JR, Kurki-Suonio R (1983) Decentralization of process nets with centralized control. In: Proceedings of the 2nd ACM SIGACT-SIGOPS symposium of principles of distributed computing, pp 131–142
Boström P (2010) Creating sequential programs from Event-B models. In: IFM’10 Proceedings of the 8th international conference on integrated formal methods, volume 6396 of LNCS. Springer, New York, pp 74–88
Back R-JR, Sere K (1991) Stepwise refinement of action systems. Struct Program 12: 17–30
Butler M (2000) csp2B: a practical approach to combining CSP and B. Formal Aspects Comput 12(3): 182–198
Back R, von Wright J (1990) Refinement calculus, part I: sequential nondeterministic programs. In: de Bakker J, de Roever W, Rozenberg G (eds) Stepwise refinement of distributed systems models, formalisms, correctness, volume 430 of Lecture Notes in Computer Science. Springer, Berlin, pp 42–66
Back R-JR, von Wright J (1998) Refinement calculus: a systematic introduction. Graduate Texts in Computer Science. Springer, Berlin
Back R-JR, von Wright J (1999) Reasoning algebraically about loops. Acta Inform 36: 295–334
Back R-JR, von Wright J (2003) Compositional action system refinement. Formal Aspects Comput 15: 103–117
Cavalcanti A, Sampaio A, Woodcock J (2003) A refinement strategy for circus. Formal Aspects Comput 15: 146–181
Degerlund F, Grönblom R, Sere K (2011) Code generation and scheduling of Event-B models. Technical Report 1027. Turku Centre for Computer Science (TUCS)
Edmunds A (2010) Providing concurrent implementations for Event-B developments. PhD thesis, University of Southampton, School of Electronics and Computer Science
Grönblom R (2009) A framework for code generation and parallel execution of Event-B models. Master’s thesis, Åbo Akademi University
Hoang TS, Abrial J-R (2010) Event-B decomposition for parallel programs. In: Abstract state machines, B and Z, volume 5977 of LNCS. Springer, Berlin, pp 319–333
Hallerstede S (2008) On the purpose of Event-B proof obligations. In: Abstract state machines, B and Z, volume 5238 of LNCS. Springer, Berlin, pp 125–138
Hallerstede S (2010) Structured Event-B models and proofs. In: Abstract state machines, B and Z, volume 5977 of LNCS. Springer, Berlin, pp 273–286
Hoare CAR (1978) Communicating sequential processes. Commun ACM 21: 666–677
Hoare CAR (1985) Communicating sequential processes. Prentice Hall, Upper Saddle River
Iliasov A (2009) On Event-B and control flow. Technical Report CS-TR-1159. School of Computing Science, Newcastle University
Jones CB (1983) Tentative steps toward a development method for interfering programs. Trans Program Lang Syst 5(4): 596–619
Méry D, Singh NK (2010) EB2C: a tool for Event-B to C conversion support. In: Poster and tool demo presentation at SEFM 2010.http://hal.inria.fr/inria-00540006/PDF/cameraready-sefm2010.pdf
Owicki SS, Gries D (1976) An axiomatic proof technique for parallel programs I. Acta Inform 6: 319–340
Plosila J, Sere K, Waldén M (2005) Asynchronous system synthesis. Sci Comput Program 55: 259–288
Rodin platform.http://www.event-b.org
de Roever WP et al (2001) Concurrency Verification: Introduction to compositional and noncompositional methods. Cambridge University Press, Cambridge
Sekerinski E, Sere K (1996) A theory of prioritizing composition. Comput J 39(8): 701–712
Schneider S, Treharne H, Wehrheim H (2010) A CSP approach to control in Event-B. In: Integrated formal methods 2010, volume 6396 of LNCS. Springer, Berlin, pp 260–274
Wright S (2009) Automatic generation of C from Event-B. In: Workshop on integration of model-based formal methods and tools.http://www.cs.bris.ac.uk/Publications/pub_master.jsp?id=2000990
Author information
Authors and Affiliations
Corresponding author
Additional information
Eerke Boiten, John Derrick and Steve Reeves
Rights and permissions
About this article
Cite this article
Boström, P., Degerlund, F., Sere, K. et al. Derivation of concurrent programs by stepwise scheduling of Event-B models. Form Asp Comp 26, 281–303 (2014). https://doi.org/10.1007/s00165-012-0260-5
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00165-012-0260-5