Automated translation of VDM to JML-annotated Java']Java

被引:7
|
作者
Tran-Jorgensen, Peter W. V. [1 ]
Larsen, Peter Gorm [1 ]
Leavens, Gary T. [2 ]
机构
[1] Aarhus Univ, Aarhus, Denmark
[2] Univ Cent Florida, Orlando, FL 32816 USA
基金
美国国家科学基金会;
关键词
Design-by-Contract; Formal methods; VDM; !text type='Java']Java[!/text; JML; Code-generation;
D O I
10.1007/s10009-017-0448-3
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
When a system specified using the Vienna Development Method (VDM) is realised using code-generation, no guarantees are currently made about the correctness of the generated code. In this paper, we improve code-generation of VDM models by taking contract-based elements such as invariants and pre- and postconditions into account during the code-generation process. The contract-based elements of the Vienna Development Method Specification Language (VDM-SL) are translated into corresponding constructs in the Java Modelling Language (JML) and used to validate the generated code against the properties of the VDM model. VDM-SL and JML are both Design-by-Contract (DbC) languages, with the difference that VDM-SL supports abstract modelling and system specification, while JML is used for detailed specification of Java classes and interfaces. We describe the semantic differences between the contract-based elements of VDM-SL and JML and formulate the translation as a set of rules. We further demonstrate how dynamic JML assertion checks can be used to ensure the consistency of VDM's subtypes when a model is code-generated. The translator is fully automated and produces JML-annotated Java programs that can be checked for correctness using JML tools.
引用
收藏
页码:211 / 235
页数:25
相关论文
共 50 条
  • [1] Automated translation of VDM to JML-annotated Java
    Peter W. V. Tran-Jørgensen
    Peter Gorm Larsen
    Gary T. Leavens
    [J]. International Journal on Software Tools for Technology Transfer, 2018, 20 : 211 - 235
  • [2] The KRAKATOA tool for certification of JAVA']JAVA/JAVA']JAVACARD programs annotated in JML
    Marché, C
    Paulin-Mohring, C
    Urbain, X
    [J]. JOURNAL OF LOGIC AND ALGEBRAIC PROGRAMMING, 2004, 58 (1-2): : 89 - 106
  • [3] JML and OpenJML for Java']Java 16
    Cok, David R.
    [J]. PROCEEDINGS OF THE 23RD ACM INTERNATIONAL WORKSHOP ON FORMAL TECHNIQUES FOR JAVA-LIKE PROGRAMS (FTFJP '21), 2021, : 65 - 67
  • [4] Developing Translation Rules of Java']Java-JML Source Code to Event-B
    Hadiputra, Faisal Ibrahim
    Asnar, Yudistira D. W.
    Hendradjaya, Bayu
    [J]. 2014 INTERNATIONAL CONFERENCE ON DATA AND SOFTWARE ENGINEERING (ICODSE), 2014,
  • [5] Automated Translation of Java']Java Source Code to Eiffel
    Trudel, Marco
    Oriol, Manuel
    Furia, Carlo A.
    Nordio, Martin
    [J]. OBJECTS, MODELS, COMPONENTS, PATTERNS, TOOLS 2011, 2011, 6705 : 20 - 35
  • [6] A formal specification in JML of Java']Java security package
    Agarwal, Poonam
    Rubio-Medrano, Carlos E.
    Cheon, Yoonsik
    Teller, Patricia. J.
    [J]. ADVANCES AND INNOVATIONS IN SYSTEMS, COMPUTING SCIENCES AND SOFTWARE ENGINEERING, 2007, : 363 - 368
  • [7] OpenJML: JML for Java']Java 7 by Extending OpenJDK
    Cok, David R.
    [J]. NASA FORMAL METHODS, 2011, 6617 : 472 - 479
  • [8] The LOOP compiler for java and JML
    Computing Science Institute, University of Nijmegen, Toernooiveld 1, 6525 ED Nijmegen, Netherlands
    [J]. Lect. Notes Comput. Sci., 1600, (299-312):
  • [9] Measuring a Java']Java Test Suite Coverage Using JML Specifications
    Dadeau, F.
    Ledru, Y.
    du Bousqueta, L.
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2007, 190 (02) : 21 - 32
  • [10] JML4: Towards an Industrial Grade IVE for Java']Java and Next Generation Research Platform for JML
    Chalin, Patrice
    James, Perry R.
    Karabotsos, George
    [J]. VERIFIED SOFTWARE: THEORIES, TOOLS, EXPERIMENTS, 2008, 5295 : 70 - 83