The VDM++ to Java Code

The VDM++ to Java Code - CSKSYSTEMSCORPORATION VDMTools The...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSKSYSTEMSCORPORATION VDMTools The VDM++ to Java Code Generator ver.1.0 How to contact CSK SYSTEMS CORPORATION: http://www.csk.com/systems Web @ VDM.SP@csk.com General information The VDM++ to Java Code Generator 1.0 Revised for VDMTools v8.2 c COPYRIGHT 2009 by CSK SYSTEMS CORPORATION The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. This document is subject to change without notice The VDM++ to Java Code Generator Contents 1 Introduction 1 2 The Code Generator - Getting Started 2 2.1 Generating Code Using the VDM++ Toolbox . . . . . . . . . . . . . . . 2 2.2 Interfacing the Generated Code . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 Compiling and Running the Java Code . . . . . . . . . . . . . . . . . . . 7 3 The Code Generator - Advanced Issues 9 3.1 Options of the VDM++ to Java Code Generator . . . . . . . . . . . . . 9 3.2 Implementing Implicit and Preliminary Functions/Operations . . . . . . 12 3.3 Generation of Abstract Classes . . . . . . . . . . . . . . . . . . . . . . . 14 3.4 Substituting Parts of the Generated Java Code . . . . . . . . . . . . . . 16 3.4.1 Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.4.2 Rules for keep tags . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.5 Generating Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.6 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.6.1 Requirements of VDM++ specifications due to language differences 23 3.6.2 Unsupported Constructs . . . . . . . . . . . . . . . . . . . . . . . 26 4 Code Generating VDM++ Specifications 29 4.1 The VDM Java Library . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.2 Code Generating Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.3 Inheritance Structure of the Generated Java Classes . . . . . . . . . . . 32 4.4 Code Generating Types . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.4.1 Mapping Anonymous VDM++ Types to Java . . . . . . . . . . . 35 4.4.2 Mapping VDM++ Type Definitions to Java . . . . . . . . . . . . 38 4.4.3 Invariants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.5 Code Generating Values . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.6 Code Generating Instance Variables . . . . . . . . . . . . . . . . . . . . 43 4.7 Code Generating Functions and Operations . . . . . . . . . . . . . . . . 44 4.7.1 Explicit Function and Operation Definitions . . . . . . . . . . . . 45 4.7.2 Preliminary Function and Operation Definitions . . . . . . . . . 45 4.7.3 Implicit Function and Operation Definitions . . . . . . . . . . . . 45 4.7.4 Pre and Post Conditions . . . . . . . . . . . . . . . . . . . . . . . 46 4.8 Code Generating Expressions and Statements . . . . . . . . . . . . . . . 46 4.9 Name Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .....
View Full Document

This note was uploaded on 03/31/2010 for the course CAS 707 taught by Professor Ridhakhedri during the Spring '10 term at McMaster University.

Page1 / 67

The VDM++ to Java Code - CSKSYSTEMSCORPORATION VDMTools The...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online