Skip to main content Accessibility help
×
Hostname: page-component-7479d7b7d-68ccn Total loading time: 0 Render date: 2024-07-12T02:36:31.320Z Has data issue: false hasContentIssue false

5 - The Elements of a Formal Model

Published online by Cambridge University Press:  03 February 2010

John Fitzgerald
Affiliation:
University of Newcastle upon Tyne
Peter Gorm Larsen
Affiliation:
Engineering College of Århus, Denmark
Get access

Summary

Aims

This chapter aims to introduce the reader to the most basic kinds of data value available to the modeller and to show how values can be manipulated through operators and functions. These are introduced using a traffic light kernel control example. On completing this chapter the reader should be able to recognise and use all the basic data types of VDM-SL.

Introduction

A functional model of a system is composed of definitions of types which represent the kinds of data values under consideration and definitions of functions which describe the computations performed on the data. In order to develop a formal model, we therefore require a means of defining types and values, and ways to construct logical expressions which state the properties of values. This chapter illustrates these features in VDM-SL and introduces the basic types available in VDM-SL using an example based on traffic light control. A data type (or simply type) in VDM-SL is a collection of values called the elements or members of the type. For example, the type of natural numbers consists of infinitely many elements, from zero upwards. To make use of a type, we will need

  • a symbol to represent the type, e.g. nat;

  • a way of writing down the type's elements, e.g. 3, “John”;

  • value operators to permit the construction of more sophisticated expressions that represent elements of the type, e.g. + to represent addition; and

  • comparison operators, e.g. <, to allow expressions of elements of the type to be compared.

Type
Chapter
Information
Modelling Systems
Practical Tools and Techniques in Software Development
, pp. 77 - 98
Publisher: Cambridge University Press
Print publication year: 2009

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×