skip to main content
10.1145/2245276.2231978acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
research-article

Translating B machines to JML specifications

Published: 26 March 2012 Publication History

Abstract

In this work, we present a translation from B machines to JML specifications. Our work allows developers to use different formal methods techniques and tools at different software development phases. A developer can use B's strong support for model verification during early stages of software development to produce a fully verified model of the application, and then transition to JML to simplify the task of producing a Java implementation and to take advantage of JML (semi-) automatic tools such as runtime assertion checkers. We have validated our implementation of the translation by applying it to a moderately complex B model of a social networking site, and then by executing the resulting JML specifications against a suite of test cases developed for a hand-translation of the B model. We have implemented the translation as the B2Jml tool, which has been integrated to the ABTools suite.

References

[1]
S. Abdennadher, E. Krämer, M. Saft, and M. Schmauss. JACK: A Java constraint kit. In M. Hanus, editor, Electronic Notes in Theoretical Computer Science, volume 64. Elsevier, 2002.
[2]
J. R. Abrial. The B-Book: Assigning Programs to Meanings. Cambridge University Press, 1996.
[3]
J.-R. Abrial. Modeling in Event-B: System and Software Design. Cambridge University Press, 2010.
[4]
Atelier B. http://www.atelierb.eu/index_en.html.
[5]
M. Barnett, K. R. M. Leino, and W. Schulte. The Spec# programming system: An overview. In CASSIS, volume 3362 of LNCS, pages 49--69. Springer-, 2004.
[6]
J.-L. Boulanger. ABTools: Another B tool. In Proceedings of ACSD, 2003.
[7]
J.-L. Boulanger. B/HDL: design of safety circuit. In Information and Communication Technologies, volume 2, pages 2855--2860, 2006.
[8]
J.-L. Boulanger. The ABTools Suite. http://sourceforge.net/projects/abtools/, 2011.
[9]
F. Bouquet, F. Dadeau, and J. Groslambert. Checking JML specifications with B machines. In Proceedings of ZB, volume 3455 of Lecture Notes in Computer Science, pages 435--454. Springer Verlag, April 2005.
[10]
F. Bouquet, F. Dadeau, and J. Groslambert. JML2B: Checking JML specifications with B machines. In J. Julliand and O. Kouchnarenko, editors, Proceedings of B: Formal Specification and Development in B, volume 4355 of Lecture Notes in Computer Science, pages 285--288. Springer Berlin/Heidelberg, 2006.
[11]
L. Burdy, Y. Cheon, D. Cok, M. Ernst, J. Kiniry, G. T. Leavens, K. Leino, and E. Poll. An overview of JML tools and applications. International Journal on Software Tools for Technology Transfer (STTT), 7(3): 212--232, June 2005.
[12]
N. Cataño and M. Huisman. Chase: A static checker for JML's assignable clause. In L. D. Zuck, P. C. Attie, A. Cortesi, and S. Mukhopadhyay, editors, Proceedings of VMCAI, volume 2575 of Lecture Notes in Computer Science, pages 26--40, New York, NY, USA, January 9--11 2003. Springer-Verlag.
[13]
N. Cataño and C. Rueda. Matelas: A predicate calculus common formal definition for social networking. In M. F. et al., editor, Proceedings of ABZ 2010, volume 5977 of LNCS, Springer, pages 259--272, Québec, Canada, 2010.
[14]
N. Cataño and T. Wahls. Executing JML specifications of Java Card applications: A case study. In 24th ACM SAC, Software Engineering Track, Waikiki Beach, Honolulu, Hawaii, March 8--12 2009.
[15]
P. Chalin, J. Kiniry, G. Leavens, and E. Poll. Beyond assertions: Advanced specification and verification with JML and ESC/Java2. In Proceedings of FMCO, volume 4111 of Lecture Notes in Computer Science, pages 342--363. Springer Verlag, 2006.
[16]
D. R. Cok. OpenJML: JML for Java 7 by extending OpenJDK. In NASA Formal Methods Symposium, pages 472--479, 2011.
[17]
B. Duterte and L. de Moura. The YICES SMT solver. Technical report, Computer Science Laboratory, SRI International, 2006.
[18]
B. Dutertre and L. de Moura. A Fast Linear Arithmetic Solver for DPLL(T). In In Proceedings of CAV, volume 4144 of LNCS, pages 81--94. Springer-Verlag, 2006.
[19]
É. Jaeger and C. Dubois. Why would you trust B? In Proceedings of LPAR, volume 4790 of LNCS, pages 288--302, 2007.
[20]
D. Jin and Z. Yang. Strategies of modeling from VDM-SL to JML. In ALPIT '08: International Conference on Advanced Language Processing and Web Information Technology, pages 320--323, 2008.
[21]
B. Krause and T. Wahls. jmle: A tool for executing JML specifications via constraint programming. In L. Brim, editor, Proceedings of FMICS, volume 4346 of Lecture Notes in Computer Science, pages 293--296. Springer-Verlag, August 2006.
[22]
G. Leavens, A. Baker, and C. Ruby. Preliminary design of JML: A behavioral interface specification language for Java. ACM SIGSOFT, 31(3): 1--38, 2006.
[23]
K. R. M. Leino and R. Monahan. Dafny meets the verification benchmarks challenge. In Proceedings of VSTTE, pages 112--126, 2010.
[24]
B. Meyer. Object Oriented Software Construction. Series in Computer Science. Prentice Hall International, 1998.
[25]
T. Parr. The Definitive ANTLR Reference: Building Domain-Specific Languages. Pragmatic Bookshelf, 2007.

Cited By

View all
  • (2023)Program Synthesis for Cyber-ResilienceIEEE Transactions on Software Engineering10.1109/TSE.2022.316867249:3(962-972)Online publication date: 1-Mar-2023
  • (2023)Joining Forces! Reusing Contracts for Deductive Verifiers Through Automatic TranslationiFM 202310.1007/978-3-031-47705-8_9(153-171)Online publication date: 6-Nov-2023
  • (2020)Handling B models in the PERF integrated verification framework: Formalised and certified embeddingScience of Computer Programming10.1016/j.scico.2020.102477196(102477)Online publication date: Sep-2020
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SAC '12: Proceedings of the 27th Annual ACM Symposium on Applied Computing
March 2012
2179 pages
ISBN:9781450308571
DOI:10.1145/2245276
  • Conference Chairs:
  • Sascha Ossowski,
  • Paola Lecca
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 26 March 2012

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. B
  2. JML
  3. automated translation
  4. combined formal methods

Qualifiers

  • Research-article

Conference

SAC 2012
Sponsor:
SAC 2012: ACM Symposium on Applied Computing
March 26 - 30, 2012
Trento, Italy

Acceptance Rates

SAC '12 Paper Acceptance Rate 270 of 1,056 submissions, 26%;
Overall Acceptance Rate 1,650 of 6,669 submissions, 25%

Upcoming Conference

SAC '25
The 40th ACM/SIGAPP Symposium on Applied Computing
March 31 - April 4, 2025
Catania , Italy

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 03 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Program Synthesis for Cyber-ResilienceIEEE Transactions on Software Engineering10.1109/TSE.2022.316867249:3(962-972)Online publication date: 1-Mar-2023
  • (2023)Joining Forces! Reusing Contracts for Deductive Verifiers Through Automatic TranslationiFM 202310.1007/978-3-031-47705-8_9(153-171)Online publication date: 6-Nov-2023
  • (2020)Handling B models in the PERF integrated verification framework: Formalised and certified embeddingScience of Computer Programming10.1016/j.scico.2020.102477196(102477)Online publication date: Sep-2020
  • (2017)Code generation for Event-BInternational Journal on Software Tools for Technology Transfer (STTT)10.1007/s10009-015-0381-219:1(31-52)Online publication date: 1-Feb-2017
  • (2017)B-PERFectReliability, Safety, and Security of Railway Systems. Modelling, Analysis, Verification, and Certification10.1007/978-3-319-68499-4_11(160-172)Online publication date: 19-Oct-2017
  • (2015)On the Use of Formal Methods to Enforce Privacy-Aware Social NetworkingStandards and Standardization10.4018/978-1-4666-8111-8.ch016(307-332)Online publication date: 2015
  • (2014)Translating event-B to JML-specified Java programsProceedings of the 29th Annual ACM Symposium on Applied Computing10.1145/2554850.2554897(1264-1271)Online publication date: 24-Mar-2014
  • (2014)Developing translation rules of Java-JML source code to Event-B2014 International Conference on Data and Software Engineering (ICODSE)10.1109/ICODSE.2014.7062693(1-6)Online publication date: Nov-2014
  • (2014)Generating JML Specifications from Alloy ExpressionsHardware and Software: Verification and Testing10.1007/978-3-319-13338-6_9(99-115)Online publication date: 2014
  • (2012)The EventB2Dafny rodin plug-inProceedings of the Second International Workshop on Developing Tools as Plug-Ins10.5555/2667062.2667071(49-54)Online publication date: 3-Jun-2012
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media