Advertisement

Modelling by Patterns for Correct-by-Construction Process

  • Dominique Méry
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11244)

Abstract

Patterns have greatly improved the development of programs and software by identifying practices that could be replayed and reused in different software projects. Moreover, they help to communicate new and robust solutions for software development; it is clear that design patterns are a set of recipes that are improving the production of software. When developing models of systems, we are waiting for adequate patterns for building models and later for translating models into programs or even software. In this paper, we review several patterns that we have used and identified, when teaching and when developing case studies using the Event-B modelling language. The modelling process includes the use of formal techniques and the use of refinement, a key notion for managing abstractions and complexity of proofs. We have classified patterns in classes called paradigms and we illustrate three paradigms: the inductive paradigm, the call-as-event paradigm and the service-as-event paradigm. Several case studies are given for illustrating our methodology.

References

  1. 1.
    Abrial, J.-R.: Modeling in Event-B: System and Software Engineering. Cambridge University Press, Cambridge (2010)CrossRefGoogle Scholar
  2. 2.
    Abrial, J.-R., Butler, M.J., Hallerstede, S., Hoang, T.S., Mehta, F., Voisin, L.: Rodin: an open toolset for modelling and reasoning in Event-B. STTT 12(6), 447–466 (2010)CrossRefGoogle Scholar
  3. 3.
    Abrial, J.-R., Cansell, D., Méry, D.: A mechanically proved and incremental development of IEEE 1394 tree identify protocol. Formal Asp. Comput. 14(3), 215–227 (2003)CrossRefGoogle Scholar
  4. 4.
    Ameur, Y.A., Méry, D.: Making explicit domain knowledge in formal system development. Sci. Comput. Program. 121, 100–127 (2016)CrossRefGoogle Scholar
  5. 5.
    Andriamiarina, M.B., Méry, D., Singh, N.K.: Analysis of self-* and P2P systems using refinement. In: Ait Ameur, Y., Schewe, K.D. (eds.) ABZ 2014. LNCS, vol. 8477, pp. 117–123. Springer, Heidelberg (2014).  https://doi.org/10.1007/978-3-662-43652-3_9CrossRefGoogle Scholar
  6. 6.
    Andriamiarina, M.B., Méry, D., Singh, N.K.: Revisiting snapshot algorithms by refinement-based techniques. Comput. Sci. Inf. Syst. 11(1), 251–270 (2014)CrossRefGoogle Scholar
  7. 7.
    Back, R.J.R.: On correct refinement of programs. J. Comput. Syst. Sci. 23(1), 49–68 (1979)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Back, R.J.R.: A calculus of refinements for program derivations. Acta Inform. 25, 539–624 (1988).  https://doi.org/10.1007/BF00291051MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Bjorner, D.: Software Engineering 1 Abstraction and Modelling; Software Engineering 2 Specification of Systems and Languages; Software Engineering 3 Domains, Requirements, and Software Design. Texts in Theoretical Computer Science. An EATCS Series. Springer, Heidelberg (2006).  https://doi.org/10.1007/3-540-31288-9
  10. 10.
    Bjorner, D.: Software Engineering 2 Specification of Systems and Languages. Texts in Theoretical Computer Science. An EATCS Series. Springer, Heidelberg (2006). ISBN 978-3-540-21150-1Google Scholar
  11. 11.
    Bjorner, D.: Software Engineering 3 Domains, Requirements, and Software Design. Texts in Theoretical Computer Science. An EATCS Series. Springer, Heidelberg (2006).  https://doi.org/10.1007/3-540-33653-2. ISBN 978-3-540-21151-8CrossRefzbMATHGoogle Scholar
  12. 12.
    Bjørner, D.: Domain analysis & description - the implicit and explicit semantics problem. In: Laleau, R., Méry, D., Nakajima, S., Troubitsyna, E. (eds.) Proceedings Joint Workshop on Handling IMPlicit and EXplicit Knowledge in Formal System Development (IMPEX) and Formal and Model-Driven Techniques for Developing Trustworthy Systems (FM&MDD). Electronic Proceedings in Theoretical Computer Science, Xi’an, China, 16 November 2017, vol. 271, pp. 1–23. Open Publishing Association (2018)Google Scholar
  13. 13.
    Cansell, D., Paul Gibson, J., Méry, D.: Formal verification of tamper-evident storage for e-voting. In: Fifth IEEE International Conference on Software Engineering and Formal Methods (SEFM 2007), 10–14 September 2007, London, England, UK, pp. 329–338. IEEE Computer Society (2007)Google Scholar
  14. 14.
    Carriero, N., Gelernter, D.: A computational model of everything. Commun. ACM 44(11), 77–81 (2001)CrossRefGoogle Scholar
  15. 15.
    Cheng, Z., Méry, D., Monahan, R.: On two friends for getting correct programs - automatically translating event B specifications to recursive algorithms in rodin. In: Margaria, T., Steffen, B. (eds.) ISoLA 2016, Part I. LNCS, vol. 9952, pp. 821–838. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-47166-2_57CrossRefGoogle Scholar
  16. 16.
    Clearsy System Engineering. Atelier B (2002). http://www.atelierb.eu/
  17. 17.
    Clearsy System Engineering. BART (2010). http://tools.clearsy.com/tools/bart/
  18. 18.
    Dolev, S.: Self-Stabilization. MIT Press, Cambridge (2000)zbMATHGoogle Scholar
  19. 19.
    Fakhfakh, F., Tounsi, M., Mosbah, M., Méry, D., Kacem, A.H.: Proving distributed coloring of forests in dynamic networks. Comput. Sist. 21(4), 863–881 (2017)Google Scholar
  20. 20.
    Foster, I.T.: Designing and Building Parallel Programs - Concepts and Tools for Parallel Software Engineering. Addison-Wesley, Reading (1995)zbMATHGoogle Scholar
  21. 21.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns - Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1994)zbMATHGoogle Scholar
  22. 22.
    Hoang, T.S., Fürst, A., Abrial, J.-R.: Event-B patterns and their tool support. Softw. Syst. Model. 12(2), 229–244 (2013)CrossRefGoogle Scholar
  23. 23.
    Jones, C.B.: Tentative steps toward a development method for interfering programs. ACM Trans. Program. Lang. Syst. 5(4), 596–619 (1983)CrossRefGoogle Scholar
  24. 24.
    Lamport, L.: The temporal logic of actions. ACM Trans. Program. Lang. Syst. 16(3), 872–923 (1994)CrossRefGoogle Scholar
  25. 25.
    Liu, Y.A., Stoller, S.D., Lin, B.: From clarity to efficiency for distributed algorithms. ACM Trans. Program. Lang. Syst. 39(3), 12:1–12:41 (2017)CrossRefGoogle Scholar
  26. 26.
    Marquezan, C.C., Granville, L.Z.: Self-* and P2P for Network Management - Design Principles and Case Studies. Springer Briefs in Computer Science. Springer, Heidelberg (2012).  https://doi.org/10.1007/978-1-4471-4201-0CrossRefGoogle Scholar
  27. 27.
    Méry, D.: Refinement-based guidelines for algorithmic systems. Int. J. Softw. Inform. 3(2–3), 197–239 (2009)Google Scholar
  28. 28.
    Méry, D.: Playing with state-based models for designing better algorithms. Future Gener. Comp. Syst. 68, 445–455 (2017)CrossRefGoogle Scholar
  29. 29.
    Méry, D., Monahan, R.: Transforming event B models into verified c# implementations. In: Lisitsa, A., Nemytykh, A.P. (eds.) First International Workshop on Verification and Program Transformation, VPT 2013. EPiC Series in Computing, Saint Petersburg, Russia, 12–13 July 2013, vol. 16, pp. 57–73. EasyChair (2013)Google Scholar
  30. 30.
    Méry, D., Poppleton, M.: Towards an integrated formal method for verification of liveness properties in distributed systems: with application to population protocols. Softw. Syst. Model., 1–33 (2015)Google Scholar
  31. 31.
    Owicki, S., Gries, D.: An axiomatic proof technique for parallel programs I. Acta Inform. 6, 319–340 (1976)MathSciNetCrossRefGoogle Scholar
  32. 32.
    Owicki, S.S., Lamport, L.: Proving liveness properties of concurrent programs. ACM Trans. Program. Lang. Syst. 4(3), 455–495 (1982)CrossRefGoogle Scholar
  33. 33.
    Pólya, G.: How to Solve It. Doubleday, Garden City (1957)Google Scholar
  34. 34.
    The Frama-C Development Team. Frama-C. CEA. https://frama-c.com/

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  1. 1.Université de Lorraine, LORIA UMR CNRS 7503Vandœuvre-lès-NancyFrance

Personalised recommendations