skip to main content
10.1145/2069216.2069252acmotherconferencesArticle/Chapter ViewAbstractPublication PagessoictConference Proceedingsconference-collections
research-article

Automatic code generation from event-B models

Published:13 October 2011Publication History

ABSTRACT

This paper presents a translation tool that automatically generates efficient target programming language code (C, C++, Java and C#) from Event-B formal specification related to the analysis of complex problems. This tool is a collection of plug-ins, which are used for translating Event-B formal specifications into different kinds of programming languages. The translation tool is rigorously developed with safety properties preservation. The results detailed in this paper are an architecture of the translation process, to generate a target language code from Event-B models using Event-B grammar through syntax-directed translation, code scheduling architecture and verification of an automatic generated code. The translator checks syntax and type consistency before generating the target programming language code. The translation tool has been developed as a set of Rodin plug-ins under the Eclipse development framework. An assessment of the proposed approach is given through a case study, relative to the development of a cardiac pacemaker system.

References

  1. J.-R. Abrial. Modeling in Event-B: System and Software Engineering. Cambridge University Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. J.-R. Abrial. The B-book: assigning programs to meanings. Cambridge University Press, New York, NY, USA, 1996. Google ScholarGoogle ScholarCross RefCross Ref
  3. Ken Arnold, James Gosling, and David Holmes. The Java Programming Language (Fourth Edition). Addison-Wesley Professional, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Atelier B. Atelier de génie logiciel permettant de développer des logiciels prouvés sans défaut. http://www.atelierb.eu/.Google ScholarGoogle Scholar
  5. S. Serge Barold, Roland X. Stroobandt, and Alfons F. Sinnaeve. Cardiac Pacemakers Step by Step. Futura Publishing, 2004. ISBN 1-4051-1647-1.Google ScholarGoogle ScholarCross RefCross Ref
  6. Marco Bernardo and Edoardo Bontà. Generating well-synchronized multithreaded programs from software architecture descriptions. In WICSA, pages 167--176, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Marco Bernardo and Edoardo Bontà. Preserving architectural properties in multithreaded code generation. In COORDINATION, LNCS, pages 188--203, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Didier Bert, Sylvain Boulmé, Marie-Laure Potet, Antoine Requet, and Laurent Voisin. Adaptable Translator of B Specifications to Embedded C Programs. In FME, pages 94--113, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  9. Dirk Beyer, Thomas Henzinger, Ranjit Jhala, and Rupak Majumdar. The software model checker BLAST, Applications to software engineering. STTT, 9:505--525, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Dines Bjørner and Cliff B. Jones, editors. The Vienna Development Method: The Meta-Language, London, UK, 1978. Springer-Verlag.Google ScholarGoogle ScholarCross RefCross Ref
  11. E. Bonta and M. Bernardo. PADL2Java: A Java code generator for process algebraic architectural descriptions. In Software Architecture, 2009 European Conference on Software Architecture. WICSA/ECSA 2009., pages 161--170, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  12. Carlos Paiz Christopher Pohl and Mario Porrmann. vMAGIC-Automatic Code Generation for VHDL. In International Journal of Reconfigurable Computing.Google ScholarGoogle Scholar
  13. D. Coleman and J. W. Hughes. The clean termination of Pascal programs. Acta Informatica, 11:195--210, 1979. 10.1007/BF00289066.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Patrick Cousot, Radhia Cousot, Jérôme Feret, Laurent Mauborgne, Antoine Miné, David Monniaux, and Xavier Rival. Combination of abstractions in the astrée static analyzer. In Proceedings of the 11th Asian computing science conference on Advances in computer science: secure software and related issues, ASIAN'06, pages 272--300, Berlin, Heidelberg, 2007. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. EB2ALL. Automatic code generation from Event-B to many Programming Languages. http://eb2all.loria.fr/, 2011.Google ScholarGoogle Scholar
  16. Andrew Edmunds and Michael Butler. Tool Support for Event-B Code Generation. In WS-TBFM2010, February 2010.Google ScholarGoogle Scholar
  17. Andrew Edmunds and Michael Butler. Tasking Event-B: An Extension to Event-B for Generating Concurrent Code. In PLACES 2011, February 2011.Google ScholarGoogle Scholar
  18. James Gosling, Bill Joy, Guy Steele, and Gilad Bracha. Java(TM) Language Specification, The (3rd Edition). Addison-Wesley Professional, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Brian W. Kernighan and Dennis Ritchie. C Programming Language. Prentice Hall, 1988. ISBN-100131103628. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Dominique Méry and Neeraj Kumar Singh. Pacemaker's Functional Behaviors in Event-B. Research Report (http://hal.inria.fr/inria-00419973/en/), 2009.Google ScholarGoogle Scholar
  21. Dominique Méry and Neeraj Kumar Singh. EB2C: A Tool for Event-B to C Conversion Support, Poster and Tool Demo submission and published in a CNR Technical Report in SEFM. 2010.Google ScholarGoogle Scholar
  22. Dominique Méry and Neeraj Kumar Singh. Technical Report on Formal Development of Two-Electrode Cardiac Pacing System. (http://hal.archives-ouvertes.fr/inria-00465061/en/), 2010.Google ScholarGoogle Scholar
  23. Dominique Méry and Neeraj Kumar Singh. Functional behavior of a cardiac pacing system. International Journal of Discrete Event Control Systems, 1(2):129--149, 2011.Google ScholarGoogle Scholar
  24. Overture Tool Box. Overture: Formal Modelling in VDM. http://www.overturetool.org/.Google ScholarGoogle Scholar
  25. David J. Pearce, Paul H. J. Kelly, and Chris Hankin. Efficient field-sensitive pointer analysis of c. ACM Trans. Program. Lang. Syst., 30(1):4, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Project RODIN. Rigorous open development environment for complex systems. http://rodin-b-sharp.sourceforge.net/, 2004.Google ScholarGoogle Scholar
  27. Jeffrey Richter. CLR Via C#, Second Edition. Microsoft Press, Redmond, 2006.Google ScholarGoogle Scholar
  28. Richard L. Sites. Clean Termination of Computer Programs. Ph.D. dissertation, Stanford University, Stanford, California, June 1974.Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Jeffrey E. Smith, Mieczyslaw M. Kokar, and Kenneth Baclawski. Formal verification of uml diagrams: A first step towards code generation. In The Unified Modeling Language, pages 224--240. GI, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Bjarne Stroustrup. The C++ Programming Language, Third Edition. Addison-Wesley, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Steve Wright. Automatic Generation of C from Event-B. In Workshop on Integration of Model-based Formal Methods and Tools IMFMT'2009 -- in IFM'2009, Düsseldorf, Germany.Google ScholarGoogle Scholar

Index Terms

  1. Automatic code generation from event-B models

                Recommendations

                Comments

                Login options

                Check if you have access through your login credentials or your institution to get full access on this article.

                Sign in
                • Published in

                  cover image ACM Other conferences
                  SoICT '11: Proceedings of the 2nd Symposium on Information and Communication Technology
                  October 2011
                  225 pages
                  ISBN:9781450308809
                  DOI:10.1145/2069216

                  Copyright © 2011 ACM

                  Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 13 October 2011

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • research-article

                  Acceptance Rates

                  Overall Acceptance Rate147of318submissions,46%

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader