SlideShare a Scribd company logo
Modelling Systems Practical Tools and Techniques in
Software Development 2nd Edition John Fitzgerald -
PDF Download (2025)
https://ebookultra.com/download/modelling-systems-practical-
tools-and-techniques-in-software-development-2nd-edition-john-
fitzgerald/
Visit ebookultra.com today to download the complete set of
ebooks or textbooks
We have selected some products that you may be interested in
Click the link to download now or visit ebookultra.com
for more options!.
Data Mining Practical Machine Learning Tools and
Techniques 2nd Edition Ian H. Witten
https://ebookultra.com/download/data-mining-practical-machine-
learning-tools-and-techniques-2nd-edition-ian-h-witten/
Emerging trends in computational biology bioinformatics
and systems biology algorithms and software tools 1st
Edition Arabnia
https://ebookultra.com/download/emerging-trends-in-computational-
biology-bioinformatics-and-systems-biology-algorithms-and-software-
tools-1st-edition-arabnia/
VCE Software Development Core Techniques and Principles
4th Edition Adrian Janson
https://ebookultra.com/download/vce-software-development-core-
techniques-and-principles-4th-edition-adrian-janson/
Software Development and Professional Practice 1st Edition
John Dooley
https://ebookultra.com/download/software-development-and-professional-
practice-1st-edition-john-dooley/
Techniques and Tools for the Design and Implementation of
Enterprise Information Systems Angappa Gunasekaran
https://ebookultra.com/download/techniques-and-tools-for-the-design-
and-implementation-of-enterprise-information-systems-angappa-
gunasekaran/
Practical Electronics Components and Techniques 1st
Edition John M. Hughes
https://ebookultra.com/download/practical-electronics-components-and-
techniques-1st-edition-john-m-hughes/
Biophysical Tools for Biologists Volume One In Vitro
Techniques 1st Edition John J. Correia
https://ebookultra.com/download/biophysical-tools-for-biologists-
volume-one-in-vitro-techniques-1st-edition-john-j-correia/
Risk Management in Software Development Projects Computer
Weekly Professional 1st Edition John Mcmanus
https://ebookultra.com/download/risk-management-in-software-
development-projects-computer-weekly-professional-1st-edition-john-
mcmanus/
Logic in computer science modelling and reasoning about
systems 2nd ed Edition Michael Huth
https://ebookultra.com/download/logic-in-computer-science-modelling-
and-reasoning-about-systems-2nd-ed-edition-michael-huth/
Modelling Systems Practical Tools and Techniques in Software Development 2nd Edition John Fitzgerald
Modelling Systems Practical Tools and Techniques in
Software Development 2nd Edition John Fitzgerald
Digital Instant Download
Author(s): John Fitzgerald, Peter GormLarsen
ISBN(s): 9780521899116, 0521899117
Edition: 2
File Details: PDF, 2.78 MB
Year: 2009
Language: english
Modelling Systems Practical Tools and Techniques in Software Development 2nd Edition John Fitzgerald
MODELLING SYSTEMS: PRACTICAL TOOLS AND
TECHNIQUES IN SOFTWARE DEVELOPMENT
Second Edition
How can we make sure that the software we build does what it is supposed to
do? This book provides an insight into established techniques that help developers
overcome the complexity of software development by constructing models of soft-
ware systems in early design stages. It uses one of the leading formal methods, the
Vienna Development Method (VDM), and combines training in the formalism with
industry-strength tool support and examples derived from real industrial applica-
tions. The principles taught here also apply to many of the current generation of
formal methods.
This second edition has been updated to include advanced online tool support
for formal modelling as well as up-to-date reports on real commercial applications
in areas as diverse as business information systems and firmware design.
Modelling Systems Practical Tools and Techniques in Software Development 2nd Edition John Fitzgerald
MODELLING SYSTEMS:
PRACTICAL TOOLS AND TECHNIQUES
IN SOFTWARE DEVELOPMENT
Second Edition
JOHN FITZGERALD
and
PETER GORM LARSEN
C A M B R I D G E U N I V E R S I T Y P R E S S
Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paulo, Delhi
Cambridge University Press
The Edinburgh Building, Cambridge CB2 8RU, UK
Published in the United States of America by Cambridge University Press, New York
www.cambridge.org
Information on this title: www.cambridge.org/9780521899116
c
 Cambridge University Press 1998, 2009
This publication is in copyright. Subject to statutory exception
and to the provisions of relevant collective licensing agreements,
no reproduction of any part may take place without
the written permission of Cambridge University Press.
First published 1998
Second edition 2009
Printed in the United Kingdom at the University Press, Cambridge
A catalogue record for this publication is available from the British Library
ISBN 978-0-521-89911-6 hardback
Additional resources for this publication at www.vdmbook.com
Cambridge University Press has no responsibility for
the persistence or accuracy of URLs for external or
third-party Internet websites referred to in this publication,
and does not guarantee that any content on such
websites is, or will remain, accurate or appropriate.
Contents
Foreword page ix
Preface xi
1 Introduction 1
1.1 Software 1
1.2 Modelling and analysis 2
1.3 This book 3
1.4 VDM-SL 4
1.5 The structure of a VDM-SL model 4
1.6 Analysing a model 9
2 Constructing a Model 13
2.1 Introduction 13
2.2 Requirements for an alarm system 13
2.3 Constructing a model from scratch 14
2.4 Reading the requirements 15
2.5 Extracting possible types and functions 16
2.6 Sketching type representations 16
2.7 Sketching function signatures 22
2.8 Completing the type definitions 23
2.9 Completing the function definitions 24
2.10 Reviewing requirements 29
3 VDMTools Lite 35
3.1 Introduction 35
3.2 Installing VDMTools Lite 36
3.3 Configuring the alarm example 36
3.4 Syntax and type checking models 38
3.5 Interpreting and debugging models 42
3.6 Test coverage 48
v
vi Contents
3.7 Integrity checking 49
3.8 Setting options 50
4 Describing System Properties Using Logical Expressions 55
4.1 Introduction 55
4.2 The temperature monitor 55
4.3 Logical expressions 57
4.4 Presenting and evaluating predicates 64
4.5 Using quantifiers 66
4.6 Coping with undefinedness 71
5 The Elements of a Formal Model 77
5.1 Introduction 77
5.2 A traffic light control kernel 78
5.3 Union and basic types 81
5.4 Basic type constructors 83
5.5 Record types 84
5.6 Invariants 85
5.7 Explicit function definitions 87
5.8 Functions for changing signals 88
5.9 Reviewing the safety requirements 96
5.10 Optional types: modelling failure behaviour 96
6 Sets 99
6.1 Introduction 99
6.2 The set type constructor 100
6.3 Defining sets 101
6.4 Modelling with sets 103
6.5 Distributed set operators 115
6.6 Summary 118
7 Sequences 121
7.1 Introduction 121
7.2 The sequence type constructor 122
7.3 Defining sequences 122
7.4 Modelling with sequences 125
7.5 Further operators on sequences 132
7.6 Abstraction lesson: choosing abstraction levels 135
8 Mappings 137
8.1 Introduction 137
8.2 The mapping type constructor 139
8.3 Defining mappings 139
8.4 Modelling with mappings 140
8.5 Summary 154
Contents vii
9 Recursive Structures 157
9.1 Recursive data structures: trees 157
9.2 Abstract syntax trees 161
9.3 Directed graphs 164
9.4 An application of directed graphs: code optimisation 167
9.5 Abstraction lesson: executability 169
10 Validating Models 171
10.1 Introduction 171
10.2 Internal consistency: proof obligations 173
10.3 Visualisation of a model 180
10.4 Interfacing to legacy code 182
10.5 Systematic testing 183
10.6 Using proofs 184
10.7 Choosing a validation technique 187
11 State-Based Modelling 189
11.1 Introduction 189
11.2 State-based modelling 190
11.3 A state-based model of the explosives store controller 191
11.4 A state-based model of the trusted gateway 196
11.5 Validation of state-based models 199
12 Large-Scale Modelling 203
12.1 Introduction 203
12.2 A structure for the tracker model 204
12.3 Information hiding 212
12.4 Object-oriented structuring 214
13 Using VDM in Practice 217
13.1 Introduction 217
13.2 Development activities and processes 218
13.3 Common development problems 219
13.4 Advantages of VDM technology 220
13.5 Getting started 223
13.6 VDM and its extensions 226
13.7 Industrial applications of VDM 227
13.8 Moving on: information resources 232
Appendix A Language Guide 235
A.1 Identifiers 235
A.2 Type definitions 236
A.3 Basic data types and type constructors 236
A.4 Data type operator overview 237
A.5 Expressions 246
viii Contents
A.6 Patterns 248
A.7 Bindings 249
A.8 Explicit function definition 249
A.9 Implicit functions 250
A.10 Operations 250
A.11 The state definition 251
A.12 Syntax overview 252
Appendix B Solutions to Exercises 263
B.1 Solutions for Chapter 2 Exercises 263
B.2 Solutions for Chapter 3 Exercises 263
B.3 Solutions for Chapter 4 Exercises 264
B.4 Solutions for Chapter 5 Exercises 265
B.5 Solutions for Chapter 6 Exercises 266
B.6 Solutions for Chapter 7 Exercises 268
B.7 Solutions for Chapter 8 Exercises 268
B.8 Solutions for Chapter 9 Exercises 270
B.9 Solutions for Chapter 10 Exercises 273
B.10 Solutions for Chapter 11 Exercises 275
Bibliography 277
Subject Index 283
Definitions Index 287
Foreword
Software engineers produce many descriptions: those of the environment or
domain in which a desired computing system software is to exist; descriptions of
the requirements put on the software; and descriptions of the software design that
implements the requirements. Thus the descriptions span the spectrum from appli-
cation domain, via requirements and software architecture, program organisation
and lower level designs, to executable code. While its concerns may be general,
software engineering is unique among engineering disciplines in that its primary
products are descriptions that must eventually satisfy the laws of mathematical
logic and metamathematics.
Other engineering disciplines have to handle a quantum leap into physical real-
ity – the stuff of natural science. In software engineering there is a different
quantum leap: that from description to execution. Software engineering is thus
about structuring and relating descriptions.
Abstraction and modelling taken together are the keys to mastering the com-
plexity of environments and systems. Formal specification is employed to express
abstractions and to ensure affinity to real domains. Such specifications open up
ways to establish the proper relation between domain and requirements models as
well as potentially verifying the links between software architecture, requirements
models and the stages of design. This increases the chance of achieving a proper fit
to the environment, to user expectations and of the correctness of implementation.
VDM was first conceived at the IBM Vienna Laboratory during the summer of
1973. The quarter of a century which separates that date from the publication of
this book has shown that VDM is characterised by having remarkably robust, yet
simple and elegant, means of abstraction and modelling. Careful attention was paid
during the 1980s to ensuring a consistent and comprehensive final version of the
VDM Specification Language (VDM-SL). This was supported by a method for
specification refinement (reification) including a Logic for Partial Functions Proof
ix
x Foreword
System. VDM is today as powerful a tool and technique for software development
as any available.
Software development is pursued in a world where the engineer is not always
allowed to pursue the ideas of formal development as epitomised by VDM-SL.
But anyone who is aware of the fundamental idea of building abstract models can
benefit from its immense power to aid understanding and communication.
In this delightful book former students of ours bring you realistic and effective
techniques for abstraction and modelling. The practical, tool-based, approach is
one which should give their readers and students (present and future software engi-
neers) the ability to employ these techniques in their everyday work.
Dines Bjørner
Cliff Jones
Hiroshima, November 1997
Preface
For developers of computer-based systems, capturing and understanding the com-
plex functional requirements and behaviour of software components has come to
represent a considerable challenge. This book aims to equip readers with skills and
techniques which will help them to address this challenge. It does so by stressing
the value of abstract system models which can be analysed and tested before an
expensive commitment is made to a particular design strategy. The book enables
the reader to understand the role and nature of abstract models as well as gain
practical experience in their creation.
In order to permit machine-supported analysis, system models must be formu-
lated in a well-defined notation. In this text, we use a formally defined language
called VDM-SL (the Vienna Development Method Specification Language). The
Vienna Development Method is a collection of techniques for developing comput-
ing systems from models expressed in the language. Since its origin in an industrial
environment, VDM has become one of the most widely used of a class of tech-
niques known as model-oriented formal methods. The language VDM-SL was
recently standardised by the International Organization for Standardization (ISO).
Although VDM-SL is used as a teaching medium in this text, the principles taught
apply equally well to other model-based formal methods such as B, RAISE and Z.
In this book we take a pragmatic approach to the use of formal methods. We aim
to illustrate the concepts and techniques used in VDM without overwhelming the
reader with mathematics. Unlike most teaching texts on formal methods, this book
does not treat formal refinement or formal proof. Instead it focuses on the construc-
tion of abstract and formal models for a range of computer systems. Mastering the
construction and validation of abstract models is in our view a prerequisite for
entering the world of verification.
This book is unusual in two other respects. First, the majority of the examples
presented are inspired by models developed in industrial projects over recent years.
xi
xii Preface
We believe that examples grounded in industrial practice provide motivating illus-
trations of the fact that this technology can be used for development of real systems
and not simply for stacks and vending machines. Second, the skills to develop
abstract models can only be acquired through practice. Throughout the text, the
use of an industrial tool is encouraged, in order to develop the reader’s intuitive
grasp of the reality of modelling.
Robust and appropriate tool support is essential for industrial application of
modelling technology, so hands-on experience is stressed throughout this book.
Readers will gain the most benefit if they use the freely available VDMTools tool
set1
introduced in Chapter 3. It is possible to carry out the exercises without tool
support, but this will not give the reader an appreciation of what can be expected
from such tools.
The web site accompanying this book (http://www.vdmbook.com) pro-
vides all the example models presented in the book, additional models used
for exercises and links to the full VDM-SL language manuals. This book uses
the (ASCII) interchange syntax of VDM-SL rather than the mathematical syn-
tax which is used in most some of the older texts. It is our experience that this
notation presents less of a barrier to the novice who does not have experience in
mathematical logic.
The subset of VDM-SL used in this book includes facilities for state-based spec-
ification. However, readers already familiar with VDM will notice that the tutorial
content is biased towards a functional modelling style. The functional style pro-
vides an environment in which type constructors and operators can be covered
without the distraction of operation syntax, side-effects and access restrictions
to external variables. Once the elements of data and functional modelling have
been covered, the ‘state and operations’ paradigm is introduced. The text omits
a discussion of explicit operations, because it is our experience that those who
learn abstraction skills within the language subset we have chosen can learn to
use explicit operations very easily, on the basis of experience from programming
languages.
Using this book
This text is aimed at software engineers who wish to investigate how the use
of models can improve the software development process, and at university
students studying software engineering or computing science. The material in
1 The URL is http://www.vdmtools.jp/en or via the book’s support pages at http://www.
vdmbook.com.
Preface xiii
the book has been used successfully on industrial training courses, undergradu-
ate and postgraduate level [Larsen08]. The text is designed with independent
study in mind, and the support materials and discussion lists accessible via
http://www.vdmbook.com provide further support for readers not studying
this material as part of a university course.
No formal mathematical background is assumed, but the authors find that stu-
dents gain most benefit when they have some familiarity with programming and
with the realities of software development. In the university context, students’
experience of constructing a large piece of software in a group project, sometimes
suffering serious setbacks during integration, has been found to provide a valuable
motivating lesson.
The objective of this book is to bring readers to a point where they are able to
read, write and analyse formal models of computing systems using VDM-SL and
have an understanding of the kind of problems to which these techniques can be
applied cost-effectively.
The book is divided into four parts. Chapters 1 to 3 form the introductory mate-
rial. The first two chapters motivate and introduce the notion of modelling using
a formal language and indicate a systematic approach for using this kind of tech-
nology. On reaching the end of Chapter 2, the reader will have seen most of the
elements of VDM-SL covered in the book. Chapter 3 introduces VDMTools Lite,
the tool support provided for the tutorial material. Chapters 4 to 8 form the core of
the book, covering the use of logic, basic data types, type constructors and func-
tions in constructing models. Each of these chapters contains a description of the
requirements for an application for which a model is developed, introducing each
modelling construct in VDM-SL as it is needed. Chapters 10 to 12 are concerned
with the use of models in practice, in particular validation techniques, the repre-
sentation of persistent state and dealing with large-scale system models. The final
part of the book examines the introduction and use of formal modelling in the com-
mercial context. Chapter 13 discusses the introduction of modelling technology in
the industrial environment. The appendices include a language guide for the subset
of VDM-SL used in the text and supported by VDMTools along with solutions to
exercises.
Readers using the book as an introduction to formal modelling can follow the
text in the order in which it is presented. Practising software engineers may prefer
to read Chapter 13 after Chapter 1 for a consideration of the costs and benefits of
applying the techniques covered in depth in the remainder of the book.
Although the book is intended to embody a single course in formal modelling,
Chapters 1 to 9 would be suitable for a course covering modelling only. The
material in Chapter 9 on recursive structures is slightly more demanding than
the preceding chapters. Chapters 10 to 13 could be used in a second and more
xiv Preface
advanced course including a significant assignment in which students can explore
the construction and analysis of a model.
Exercises are included in the flow of the text and should be attempted as they are
encountered. More substantial exercises are normally included at the end of each
of the central chapters. Those exercises marked with a star () are more demand-
ing than the average. It is our experience presenting this material that instructors
are asked for large numbers of small exercises which increase familiarity with the
language. Often, lecturers also require more demanding exercises for the most
enthusiastic and capable students. Teaching material including samples of lec-
ture notes, slides and exercises of both these kinds will become available from
the World Wide Web Page at http://www.vdmportal.org/.
The production of a formal model is much less straightforward than a textbook
might lead one to suppose. By presenting particular models as solutions to prob-
lems, we do not intend to imply that they are the only, or even the best, solutions.
In addition, the developer of a model runs into many “dead ends” before reach-
ing a good solution. We are unable to present this process in all its detail in
this volume, but we do record some aspects of our practical experience which
we feel would be most helpful. This is done in distinguished boxes of text such
as this.
Developments since the first edition
When we published the first edition of this book ten years ago, our aim was
to lower the barrier to using formal modelling techniques that were still seen
as forbidding, specialised and expensive. By emphasising tool support, and by
using examples derived from industry applications, we hoped to encourage read-
ers to apply abstraction and modelling principles in a wide range of applications.
Although the underlying aim remains unchanged, this second edition takes account
of the significant developments in formal modelling, tool support, industry appli-
cation and experience gained in teaching and training in formal methods in the last
decade.
Tool support for the first edition took the form of a limited-capability version of
the VDM Toolbox, then being developed by IFAD A/S in Denmark. The Toolbox
technology was subsequently acquired and extended by CSK Systems in Japan,
following their successful application of VDM to a major financial back-office
system (TradeOne, described in Chapter 13). The tool that accompanies this second
edition takes advantage of CSK’s developments. VDMTools Lite now supports the
full VDM-SL language instead of just the subset covered in the book. Restrictions
Preface xv
on the size of model have been removed. The full functionality of the tool set is now
available, with the exception of the application programmer interface, the dynamic
linking facility and the C++ code generator.
Since the first edition was published, both of us have worked in the software
industry, in areas as diverse as business development and design of binary trans-
lation technology. The experience has reinforced our view that formal modelling
technology must work with existing development tools and processes, rather than
supplant them, if its benefits are to be realised. We have also become more aware
of the trade-off between the effort expended in analysing models and the insights
gained by doing so. As a result, we have added material on recent industrial appli-
cations of VDM (Chapter 13) and updated the industry-based examples throughout
the book. Our experience teaching formal modelling to practitioner engineers and
to university students has emphasised the importance of abstraction as a core skill
in modelling. We reinforce this point with abstraction lessons in each of the core
chapters.
This book concentrates on the core VDM-SL notation and the fundamentals of
abstraction and rigorous reasoning about system models. Over the last ten years,
the capabilities of the VDM formalism itself have been extended to encompass
development of concurrent and object-oriented systems, and real-time and dis-
tributed systems. We have added pointers into these more specialised and advanced
applications in the expanded Chapter 13.
Acknowledgements
We would like to thank our former professors Cliff Jones and Dines Bjørner for
introducing us to the subject of formal methods and to VDM in particular. Our
thanks also go to our supportive and patient editor David Tranah from Cambridge
University Press and to our colleagues at CSK in Japan, especially Shin Sahara.
Many colleagues have provided valuable comments on drafts of the book in
both editions: Sten Agerholm, Bernhard Aichernig, Mo Ajmal, Paul Ammann,
Nick Battle, Peer Bonnerup, Carsten Breum, Jeremy Bryans, Hanne Carlsen,
Tim Clement, Ian Cottam, Lionel Devauchelle, Albert Esterline, Kelsey Francis,
Brigitte Fröhlich, Anne Haxthausen, Niels Kirkegaard, Ole Bjerg Larsen, Janusz
Laski, Yves Ledru, David Morgan, Paul Mukherjee, Anne Berit Nielsen,
Erik Toubro Nielsen, Takahiko Ogino, José Nuno Oliveira, Lars Toftegaard
Olsen, Richard Payne, Jan Storbank Pedersen, Marie-Laure Potet, Abd-El-Kader
Sahraoui, Paul Smith, Vincent Stephan, Elliot Sullivan, Marcel Verhoef, Henrik
Voss and Mark Wigmans.
The first edition was published in a Japanese translation by the Iwanami Shoten
publisher in 2003. We are particularly grateful to our skilled translators: Keijiro
xvi Preface
Araki, Takahiko Ogino, Shin Sahara and Makoto Someya. Their work has been
a major stepping stone towards the adoption of formal modelling technology in
Japan.
Many colleagues were kind enough to use the first edition in courses on formal
modelling, and to provide us with comments and corrections. We are particularly
grateful to Bernhard Aichernig, V. S. Alagar, Pascal André, Keijiro Araki, Andreas
Bollin, Dan Cristea, Albert Esterline, Pascal Fenkam, Mats Heimdahl, Keith Hop-
per, Zarinah Mohd Kasirun, Janusz Laski, Yves Ledru, Peter Lucas, Michael Lutz,
Dominique Mery, Farid Mezidane, Pascal Molli, David Morgan, Tony Moynihan,
José Nuno Oliveira, Kasi Periyasamy, Steve Riddle, Angela Shiflet, Ivor Spence
and Robert Topp. Our thanks are also due to the hundreds of students who have
participated in our courses at Newcastle University and the Engineering College of
Aarhus.
We gratefully acknowledge the support of the European Union Framework 7
IST Project “DEPLOY” on industrial deployment of advanced system engineering
methods and the Erasmus programme for supporting our continued collaboration
on the learning and teaching of formal methods.
As always, we reserve our deepest thanks for our closest friends and families
who allowed us, once again, a decade on, to take advantage of their patience.
John Fitzgerald
Peter Gorm Larsen
Aarhus, Denmark
1
Introduction
Aims
The aim of this chapter is to provide a motivation for studying the mod-
elling of computing systems by discussing the challenges of developing correct
software. On completion of this chapter, the reader should be aware of the main
concepts to be presented in the book and know where to find the relevant mate-
rial in the text.
1.1 Software
Software is pervasive, error-prone, expensive to develop and, as an en-
gineering medium, extraordinarily seductive. Its seemingly infinite flexibility,
increasing power and the absence of physical characteristics, such as weight,
make it an ideal medium in which to express complex models which might not
exist at all were it not for software. As a result, software is often developed for
applications which are critical either to an enterprise’s mission or to the quality
of life of those with whom the system interacts.
Challenged by the variety and scale of software applications, the participants
in the 1968 NATO Conference on Software Engineering foresaw a discipline of
software development with a sound scientific basis [Naur69]. Over the last 40
years, there is little doubt that enormous advances have been made in our ability
to control software development. However, software projects continue to suffer
from serious difficulties which can lead to the delivery of faulty goods that are
over budget and behind schedule.
The rapid increase in processor power has naturally led to increasing demands
being made on software and its developers. Software is almost always devel-
oped as part of a larger system involving computing hardware, special systems
such as sensors and actuators, human-computer interfaces and human beings.
However, the long lead-times associated with the production of special items of
hardware mean that additional functionality caused by changes in customers’
requirements is often realised in software because that medium is seen as more
flexible.
1
2 1 Introduction
A comparison between software engineering and the engineering in other me-
dia, whether mechanical, fluid, chemical or electronic, is difficult because of the
different characteristics of those media. However, there is little doubt that soft-
ware engineers can still learn from other more mature engineering disciplines.
1.2 Modelling and analysis
One of the major differences between software engineering and other
forms of engineering is that the other disciplines have a longer tradition of con-
structing abstract models of the product in the early stages of development. Such
models serve as a proving ground for design ideas and as a communication
medium between engineers and customers. As a result of modelling, engineers
can avoid errors which might otherwise only become obvious in the very late
stages of development, when expensive commitments have been made to mate-
rials and designs. There are two aspects of these models which are crucial to
their successful use: abstraction and rigour.
Engineering models are abstract in the sense that aspects of the product not
relevant to the analysis in hand are not included. For example, an aeronautical
engineer investigating the aerodynamics of an aircraft design may model the air
flow over the surfaces (mathematically or in a wind tunnel) because air flow is a
dominant design parameter. The model is unlikely to include the user interface
of the cockpit instruments. Similarly, human factors engineers who design cock-
pit instruments model the cockpit, not the aerodynamics of the wing surfaces.
The choice of which aspects of a system should be included in the model (its
level of abstraction) is a matter of engineering skill.
Perhaps the most significant property of a system model is its suitability for
analysis. The purpose of such an analysis is to provide an objective assess-
ment of a model’s properties. For example, a model of a new design of bridge
might be used to assess the design’s ability to withstand physical stresses with
acceptable risk of collapse. This contrasts with the more subjective analysis of
a review or inspection in which the outcome may depend on the consultants
carrying out the job. It is also important to be able to repeat the assessment on
alternative models and to be able to perform as much as possible of the analysis
mechanically, in order to minimise the risk of subjectivity and error as well as
the required human effort. To obtain this level of objectivity, mechanisation and
repeatability, mathematics is often used in the analysis. Indeed, many system
models exist only as mathematical constructions and not as physical entities at
all.
How do these concepts of system modelling transfer to the development of
1.3 This book 3
computing systems, and in particular to software? A wide range of modelling
techniques has been developed for computing systems, including pseudo-code,
natural language, graphical and mathematical notations. Ultimately, a computer
program could be seen as a model of the system which is to be provided: an ex-
ecutable model which meets all the relevant user requirements, or at least a large
enough subset of them to make the product acceptable. Although a wide variety
of modelling techniques is available, comparatively few provide the combina-
tion of abstraction and rigour which could bring the benefits of early detection
of errors and increased confidence in designs.
This book describes well-established modelling techniques which combine
abstraction with rigour. We will introduce the elements of a modelling language
that can be combined effectively with existing software engineering techniques,
opening up the possibility of improved analysis in early development stages.
Models expressed very abstractly in the early stages of system development
would normally be treated as specifications of a system. If the models instead
are described at a lower level of abstraction later in the process, they will nor-
mally be called designs. The borderlines between specification, design and im-
plementation are not clearly defined and the modelling and analysis techniques
discussed in this book are not confined to any particular stage of software de-
velopment. We will therefore tend to avoid loaded terms such as “specification”
and use the general term “model” to refer to the system descriptions we develop.
Nevertheless, we focus on requirements analysis and early design stages because
these are the phases in which the application of modelling is most beneficial.
1.3 This book
This book is concerned with the construction of abstract models for
computing systems. The notation used to describe such models is a subset of
the ISO standardised language VDM-SL [ISOVDM96]. The VDM-SL nota-
tion supports abstraction in a variety of ways which will be introduced in the
text. The rigour of the language lies mainly in its definition in the ISO standard,
which is extremely thorough and detailed. Indeed, the language is referred to
as a formal modelling language because its syntax and the meaning of models
expressed in the language are so thoroughly defined. This formality allows anal-
yses to be carried out consistently because the formal definition of the meaning
of the language constructs leaves little or no room for interpretations to differ
between support tools or practitioners.
This book is about the practical exploitation of modelling techniques. Our
pragmatic approach is realised in three ways. First, we make extensive use of a
Other documents randomly have
different content
side, when suddenly a voice, a low but clear voice, said distinctly in
my ear, “Stop!”
I looked about me, but I could see no one. There was positively no
living creature near me,—unless I except a wasp which at the
moment was flying about my head, and which I struck away with my
hand.
I walked down the road some twenty paces, peering about for the
person who had spoken, and becoming more and more perplexed;
and as I was about to enter the forest the same voice, still low but
quite distinct, spoke again close into my ear: “Stop!”
I stopped in bewilderment. The forest was silent as the sky; no living
creature, not even a bird, could I see anywhere; there was nothing;
—nothing, indeed, except the wasp which was still flying about my
head and which now began to annoy me exceedingly.
I went on again, striking out at the wasp, and in a moment (I assure
you I began to doubt my senses), the same voice spoke again, this
time close into my left ear.
“Stop! Just a moment!” it said. “Look, if you please! On your left
shoulder!”
I craned my neck about, and there was nothing on my left shoulder
except the wasp. The wasp was there, indeed, and I made as if to
brush him off; but the voice said, “Don’t, if you please!” and I stayed
my hand.
You may imagine that I was more astonished than ever. I gazed at
the wasp intently, and as I did so the voice began to murmur, in a
kind of rapid, buzzing drone, into my left ear.
“Mercy on us!” I cried. “It’s the wasp that’s talking!”
It was true, beyond a doubt. “Yes!” said the voice. “Please listen! If
you’d only be so good—I really wish you would!”
The Prince Listens to a Curious Discourse
I stood perfectly still in the roadway, and I know that my mouth
hung open as I listened. The wasp buzzed into my ear a kind of
rapid, droning song, so low that I had to strain my attention a little
to catch it all, and these were the words I heard:
“I know it’s rude to speak to you, it’s something I but seldom do,
to speak before I’m spoken to,
Or buttonhole a stranger;
Excuse me if I do not pause to think just now of social laws, I can
not spare the time, because
I’m in the gravest danger;
In gravest danger, yes, it’s true, I’m sure I don’t know what I’ll
do, I’ll positively die if you
Refuse me your assistance;
Come, follow me without delay, I pray you do not say me nay,
it’s life or death,—and anyway
It’s scarcely any distance.
“My lot is sad in the extreme, I really am not what I seem,
I once was held in high esteem
By every friend and neighbor:
A man entirely free of guile, who lived but in his children’s smile,
and kept them all in modest style
By hard and patient labor,
A man of pleasing manners who, whatever other men might do,
spoke seldom unless spoken to,
A practice much commended;
My trade in such a way I plied upon the highway far and wide
(I say it with a modest pride)
I scarcely once offended.
“It used to be my pleasant way (it always made my work seem
play) to take the air from day to day,—
Unless, of course,’twas raining,—
Upon the road to watch and wait from early morn to rather late,
but always coming home by eight
(Such was my early training),
I used to watch and wait, I say, and when a trav’ler came my
way, which happened every other day
Unless too cold or sunny,
I never spoke a word not I I merely breathed a patient sigh
I never spoke a word, not I, I merely breathed a patient sigh,
and held my trusty blade on high
And took from him his money.
“’Twas thus I kept my children ten, a decent, worthy citizen,
the happiest of mortal men
My humble sphere adorning,
The father of ten daughters fair who needed tons of clothes to
wear, and that was why I took the air
Upon the road each morning,
But oh, alas for them and me, it’s over now, as you may see,
and you are incontestably
Our only hope remaining;
And all our truly dreadful plight is just because one rainy night
I simply for a moment quite
Forgot my early training.
“I held my trusty blade on high
And took from him his money”
“’Twas rainy and ’twas after eight, I knew that I was out too
late, but when your trade’s in such a state
You hardly know what cash is,
You cannot stop because you get your feet all muddy, cold and wet,
I knew I should be ill, and yet,—
My children needed sashes.
I shivered with the wet and cold, I counted twenty times all told
I’d meant to have my shoes half-soled
And still they’d not been cobbled,
‘I’ll certainly,’ I thought, ‘be sick,’—and then from out the darkness
thick an ancient woman with a stick
In fearsome silence hobbled.
“She was an ancient, crooked crone, an ugly thing of skin and
bone, she passed me silent as a stone
(I thought it rather funny),
But I could hear my children cry, ‘Oh, buy us ribbons, father, buy,’
and stopping her, my blade on high,
I shouted, ‘Stand! Your money!’
Ah, that was just where I did make a most unfortunate mistake,
for she with mirth began to shake
(It made my blood run colder),
And up she raised her crooked staff, she gave a most unearthly
laugh, a thing I did not like by half,
And touched me on the shoulder.
“She stood, she looked me through and through, she said not even
‘How d’ye do,’ she merely gave a laugh or two,
And munched her gums together:
A witch, a sorceress of the wood! I nearly fainted where I stood,
I really truly think you could
Have felled me with a feather.
A witch, as sure, as sure could be! You see what she has done to
me! And all because I carelessly
Forgot my early training.
From which you learn this lesson true that it will never never
From which you learn this lesson true, that it will never, never
do to speak before you’re spoken to
Or stay out when it’s raining.”
The voice stopped, and the wasp flew off, directly before my nose,
as if leading me away.
“Why, dear me!” interrupted the Queen. “I believe this wasp was
nothing more nor less than a Highwayman.”
“What I don’t understand is,” said the King, “how a Highwayman
could have learned to make up verses.”
“In the Forest of Wen, your majesty,” said Solario, “the Highwaymen
always talked in that fashion. It was their regular custom. I am told
that no Highwayman could get his certificate until he had passed an
examination in arithmetic, swordplay, and composition; and of
course composition included verse making.”
“Well,” said the King, “I don’t see what that had to do with making a
good Highwayman of him; but then I don’t pretend to understand
these notions about education. As far as I’m concerned, if I had to
pass an examination in arithmetic in order to be a King, I’d simply
have to look about for something else to do. I never could see the
sense in teaching a King arithmetic, and I don’t see the sense in
teaching a Highwayman how to make verses. I know it’s done in
some places; it’s gotten to be quite the thing, I understand that
perfectly well; but I don’t see any sense in it.”
“My dear,” said the Queen, “you mustn’t forget that a Highwayman
has to know a great deal more than a King. It’s so very much harder
to be a good Highwayman. But I don’t think I should like to be
married to one.”
“This one was a widower, evidently,” said the King. “I know I
shouldn’t like to be a widower with ten daughters on my hands. I
don’t see how any human being could keep ten daughters in ribbons
and—”
“When Dorobel was little,” said the Queen, “I always had the most
terrible time to make her remember that she mustn’t speak until she
was spoken to. I don’t wonder the poor man forgot it, when he was
so worried about sashes for his dear children,—and out so late at
night, and in the rain, too!”
“Why don’t you let the man go on with his story?” said the King.
“We’ll never get to bed at this rate. Solario, be kind enough to
proceed.”
The wasp flew off (said the King of Wen), directly before my nose,
as if leading me away; and I followed him down the road.
We had gone about a mile, when the wasp turned off into the forest.
I hesitated a moment, but I was curious to know what this
unfortunate Highwayman intended, and I pushed on after him into a
portion of the forest which was wilder and gloomier than any I had
yet seen. The branches of the trees hung low, and the ground was
thick with underbrush; I had to part the bushes and branches with
my hands in order to get through.
The wasp flew within a foot of my nose, and I kept on after him thus
for more than half an hour. He seemed to know the way, but for my
part I began to wonder whether I should ever be able to find my
way back. Suddenly he flew off, and I saw him no more.
The Prince, Alone in the Forest, Hears the Bark of a
Dog
I was at this moment in an uncommonly thick part of the forest. The
trees were perhaps less close, but the underbrush was taller; so tall
that I could not see through. I stopped for a moment, and listened.
All was still. Not a bird twittered among the leaves overhead. I was
vexed that I had allowed myself to be drawn upon such a wild-goose
chase, and I decided that I had better begin to make my way back
to the road; and as I was considering this, I heard the bark of a dog.
It was a single, sharp bark, and it stopped abruptly, as if a hand had
been clapped over the animal’s mouth. I listened again, but it came
no more. “What should a dog be doing here?” I thought; and full of
curiosity I pushed on through the underbrush in the direction of the
sound. In a moment I had broken through the tanglewood, and I
was standing at the edge of a clearing, in the midst of which was a
little house.
It was a very tiny house indeed,—not much more, in fact, than a
hut. Its door was closed, and the window beside the door was
barred with shutters. I listened intently, thinking to hear again the
bark of a dog, but I heard nothing. Evidently the place was deserted.
I crossed the open space before the door, and as I did so I noticed,
clinging to the trunk and lower branches of a tree at the side of the
clearing, what appeared to be a wasp’s nest; but an enormous
wasp’s nest, big enough, in all conscience, to contain a man if need
be; a wasp’s nest greater than I should have thought could exist in
the world. I looked at it curiously, and coming nearer I saw, crawling
over it, a number of wasps. I counted them, and there were eleven.
They arose with one accord and flew in great agitation about my
head; and at the same time I heard a voice from inside the wasp’s
nest,—the voice of a human being, but not the one I had already
heard; a voice much stronger and louder. I put my ear against the
wasp’s nest, and from within came these words:
“Don’t speak before you’re spoken to!”
“Who is it?” I said. “Where are you?”
“Beware the dog!” said the voice again.
“But who—what—?” I began.
The Prisoner Inside the Wasp’s Nest
“I can’t get out! I’m imprisoned inside the wasp’s nest! Do as you’re
bid, and don’t speak before you’re spoken to. Beware the dog!”
At this moment I heard the click of a latch, and I turned round in
time to see the door of the hut open.
In the doorway was standing an old woman, and by her side a dog.
She was a hideous old crone, wrinkled and bent, with little, beady
eyes and a hooked nose and no teeth. She stood there munching
her gums and blinking her eyes at me, and I noticed that she wore
about her neck a string of what looked like ivory buttons, ten of
them, white and flat.
With her left hand she leaned on a crooked stick, and with her right
hand she held, by a leather thong, the biggest and fiercest-looking
dog I had ever seen in my life. His head came nearly to the old
woman’s shoulder. He was chocolate brown in color, and his skin was
entirely naked of hair, except for a patch of long wiry hair which
fringed his neck. He bared his sharp, white teeth at me and growled.
I felt decidedly uneasy.
The eleven wasps were flying about my head in violent agitation.
The old woman said nothing, but continued to blink at me and
munch her gums. Suddenly the dog barked, and without a word the
old woman flung the thong from her hand. The dog gave a bound
toward me and crouched for a spring, growling and bristling. In
another instant I knew that I would be torn to pieces. I started back
and cried out in alarm.
“Call him off!” I shouted. “Stop him! Call him off!”
At these words, a groan came from inside the wasps’ nest. At the
same time one of the eleven wasps, which were flying directly
before my face, dropped to the ground at my feet as if dead. I
realized that I had spoken before being spoken to, and one of the
wasps—one of the Highwayman’s daughters, in fact,—had suffered
for my error. But the worst consequence was now to come.
The old woman shook her stick and danced up and down in hideous
glee.
“He’s spoken!” she cried. “Ha! ha! Spoken before he was spoken to!
He’s done for himself now! At him, dog, he’s helpless! Seize him,
dog, destroy him!”
The Dog Leaps Upon Him to Devour Him
Before I could turn, the dog was upon me. No man on earth could
have stood up under such an attack. With one leap he was upon my
breast, and bore me to the ground; and as I fell his sharp teeth sank
into my shoulder, and I nearly fainted with pain and terror.
“A hair of the dog that bit you!” It was the voice from within the
wasp’s nest, and it was crying: “A hair of the dog that bit you!”
My senses were slipping away, and I hardly knew what I did; but
somehow or other I put my hand on the beast’s neck, and plucked
from it a long hair; and as I did so the dog bounded away from me
and stood cowering and quivering, as if in fear.
“At him!” screamed the witch—for it was a witch, beyond a doubt;
and she rushed upon the dog and began to beat him violently with
her stick. “At him again!” she screamed, but to my amazement the
dog turned upon her, snarling; and at that moment the voice came
again from the wasp’s nest, and it cried:
“A ring of the hair! Make a ring of the hair for your finger!”
I sat up and quickly wound about my finger, in a ring, the hair which
I had plucked from the dog’s neck. The effect of this was startling.
The witch shrieked, plainly in terror, and sprang away from the dog;
and the brute came to me and cringed before me on the ground and
whined; and behold, all the pain was gone from my shoulder.
“Command him to be himself again!” cried the voice from the wasp’s
nest.
“Be yourself again!” I cried, not knowing what I said.
The Prince, Sitting on the Ground, Looks Up at a
Genie
Instantly, in the flash of an eye, the dog was gone; and in his place
stood, towering above me full seven yards or more, a monstrous
creature in the shape of a man, chocolate brown in color,
baldheaded except for a fringe of long hair at the base of his skull,
and bare except for a cloth twisted about his middle, in which hung
a gleaming scimitar. It was a genie. He was panting with anger or
some other strong emotion, and as he panted jets of fire shot forth
from his nostrils. His mighty chest heaved, and I shrank back in
alarm; but he spread out his hands and bowed low before me. I
remembered the ring of hair on my finger, and grew bolder.
The witch was creeping quietly away, stick in hand, toward the door
of her hut; but as she reached it the genie stooped and caught her
in his hand and held her fast. I sprang to my feet.
“Set free your victims!” I cried to her. “The wasps and the prisoner
inside the nest! Release them! or by the power of the genie’s hair, I
will command him to destroy you!”
She kicked and squirmed and shrieked, but all in vain. There was no
escaping from that terrible grasp. She grew quiet, and began to
mutter to herself. “I will count ten,” I cried, “and if at the tenth—”
But she did not wait for me to count. With one look up at the genie’s
face she waved her crooked stick in the air and began to pour out
strange words, and then, giving a despairing cry, she let the stick fall
to the ground; and as it touched the ground, there came from the
wasp’s nest—I assure you it was an extraordinary sight—I scarcely
know how to tell you, it all happened so quickly—
The One-Armed Sorcerer Appears from Within the
Wasp’s Nest
Well, the wasp’s nest opened from top to bottom, and inside it was
sitting a young man, who leaped down with a laugh and stood
before me, bowing. I noticed that he had but one arm, the left; his
eyes were blue, and his skin was fair and rosy; and he wore a long
blue gown spangled with silver stars.
The Highwayman and Nine of His Daughters Appear
in Proper Person
Almost at the same instant there were standing before me nine
young maidens, all of extraordinary beauty; and in their midst an
elderly man with a gray beard and a long thin face, and spindly legs.
The nine maidens were gazing at an object on the ground, and the
elderly man looked down at it also, and they all began to wring their
hands together and moan.
“Oh!” said the elderly man, sniffling,—
“Just see what he has gone and done, he can’t deny it, he’s the
one, he ought to hide his head where none
Could ever look upon it,
He knew, he did, he surely knew, I told him it would never do
to speak before you’re spoken to,
And now he’s gone and done it.”
“I warned him,” said the one-armed young man, “but he was
frightened, and he forgot.”
“Oh, yes,” said the elderly man, wiping his tears away with the back
of his hand,—
“Oh, yes, it’s well enough to say it slipped his mind a bit to-day
and in an absent sort of way
He slew my darling daughter;
But that will hardly, hardly do, I really can’t agree with you, it’s
simply from my point of view
A case of plain manslaughter.”
“Oh, sister! sister!” cried the nine maidens. “Isn’t it terrible? It’s too
terrible! It is terrible, isn’t it?”
“Let me go!” screamed the witch, struggling in the hand of the
genie.
He Sees the Highwayman’s Tenth Daughter
I pushed into the group around the elderly Highwayman, and there
at his feet I saw what made my heart stand still with grief and
remorse. On the ground was lying a maiden, far lovelier than any of
the others; and she was dead. Her eyes were closed, her face was
pale, she did not breathe; and her hair lay about her like a shower of
gold. Alas, that my carelessness had brought her to this sorrowful
end! If she had only lived! How I should have rejoiced to be her
friend, and in the course of time, perhaps, persuade her to smile
upon me—Alas! alas! At that moment, if she could but have cast one
look upon me, I would have laid at her feet all that I—
I knelt beside her and took her cold hand in mine. I stooped over
her, and in an excess of pity, and of more, far more than pity, I
kissed her softly on the lips.
Oh, wonderful! Her eyelids quivered. A faint flush came into her
cheeks. Her eyes opened, and she looked straight into my own. She
smiled, and it was like the evening sky after rain. I put my arm
beneath her shoulder, and helped her to stand up. She rubbed her
eyes and swayed a little, and I kept my arm about her. We gazed at
each other, smiling.
“Is it—?” said she.
“It is, beloved!” I cried, and folded her, unresisting, to my heart.
“Oh, isn’t it just too perfectly sweet?” cried her nine sisters, clapping
their hands and laughing merrily, all together. “It is sweet, isn’t it?
It’s love at first sight! It’s just the sweetest thing ever! Isn’t it just
too sweet for anything, though?”
But while they were still running on in this fashion, and the elderly
Highwayman was cheering faintly and the one-armed young man
was cheering lustily, a loud roar came from the genie, and we saw
that the witch had slipped from his grasp and was even now dashing
in at the door of the hut. She shut it behind her with a bang, and
the one-armed youth pounded against it in vain.
“The stolen hair!” he cried. “The genie’s hair which she stole from
me! I must get it back! Don’t let her get away!”
The Genie Breathes Fire Upon the Witch’s Hut
The genie opened his great mouth and roared with anger; then he
stooped down over the hut, and I saw that he was breathing fire
upon the roof from his nostrils; and as the sparks caught in the dry
thatch, he began to walk around the hut, bending and breathing fire
upon its roof from place to place. In a few moments it was ablaze
from end to end; the walls caught; and as I held my fair lady
trembling close beside me, the house arose in flames, crackling and
roaring, and showering sparks upward into the twilight sky.
“Oh!” said my fair one, clinging to my arm. “The poor witch! Save
her! She will be burned to death!” But the genie’s thunderous laugh
was her only answer.
We watched until the fire was out, and there remained only a heap
of smoking ashes; and the witch was gone.
“Oh, the poor thing!” said my beautiful lady.
“Isn’t it terrible?” said her nine sisters, among themselves. “It’s just
too terrible for anything! It is terrible, isn’t it? It’s simply terrible, it
is, isn’t it?”
The one-armed youth stepped up to the ruin and appeared to be
looking among the ashes near what was once the door. He looked
for a long time, and then he suddenly straightened up and cried,
“Ah!”
He came toward us, and he was holding up in his hand what seemed
to be a necklace.
“See!” he said, and I saw that it was a string of buttons, of large flat
buttons, eleven of them, threaded on what seemed to be a hair; the
same I had seen about the witch’s neck.
“It is the genie’s hair,” said the young man, “the same that she stole
from me; and it was this hair which gave her power to turn my genie
to a dog and imprison me in the wasp’s nest. Now let me see these
buttons; I must look at them with care.”
He examined each one minutely; and when he had examined them
all, he placed his finger on his lips and smiled knowingly; and while I
held the hair he broke it and slipped off the eleventh button, inviting
me to look at it closely. I looked and saw upon it, near the rim, a
crooked black line, much like the imprint of a tiny, crooked stick.
The One-Armed Sorcerer Performs Upon a Button
He threw the button upon the ground, laughing, and took from
within his gown a leather pouch, from which he sprinkled upon the
button a black powder; and then he began to speak, in a loud voice,
words which I could not understand, in the midst of which he picked
up the button, now crusted with black; and still repeating his strange
words, he swung his arm, and with a loud cry flung the button into
the branches of the nearest tree; and there, hanging on to a branch
of the tree, trying desperately to keep from toppling off, was the old
witch herself.
Instantly the young man took the threaded buttons from me and
slipped them off the hair; he wound the hair about his finger and
cried,—
“Off with her! Off with her to the Forest Kingdom, far from here, and
see that she never comes back again! Off with her, I say, to the
Kingdom of the Great Forest!”
At these words the genie strode over to the witch and—
“Well, bless my soul,” interposed the King, “what business did he
have to send that witch here, I’d like to know? So that’s how she
came to live in my Forest! A fine piece of work, I must say! A pretty
how-d’ye-do, to send their cast-off witches over here! What business
had he to—”
“Never mind, grandfather” said Bojohn, “do let him go on with his
story.”
“A fine piece of work!” said the King. “Of all the high-handed,
brazen-faced—”
“My dear!” said the Queen.
The genie strode over to the witch in three steps and plucked her
down with one hand. He then tucked her under his arm like a sack
of corn, and stood before the one-armed youth.
“Stoop down!” said the young man.
The genie bowed low, and the young man, to my surprise, reached
up and pulled from the back of his head, at the neck, ten long hairs,
one by one.
“Away!” cried the one-armed youth.
The Genie Flies Away With the Witch
The genie stood up, and opening his great mouth in a silent laugh,
stamped upon the earth so that it shook, and leaped straight up. He
rose in the air in a wide curve; and before we could blink again he
was gone like an arrow over the treetops, with the witch under his
arm, and was no more than a speck in the evening sky.
The young man tucked the ten hairs away inside his gown.
“Now,” said he, “she’s gone. And good riddance, too, I should say.”
“Sir,” said I to him, “will you tell us who you are, and what brings
you here?”
“I am a sorcerer,” said he, “and I dwell in an island far out in the
Great Sea. I am known there as the One-Armed Sorcerer. I came
here, with the genie whom I command by virtue of a ring of his hair,
in order to prove my skill against the witch. I undertook to release
our good friend the Highwayman and his ten fair daughters, but I
am bound to say that I managed it badly; so badly that the witch
got the genie’s hair away from me, and by means of that hair turned
him into a dog and shut me up inside the wasp’s nest. And all
because I didn’t know the rule, that you mustn’t speak before you’re
spoken to.”
“A pretty good rule,” said I, “but if everybody observed it, who would
ever talk?”
“Well, anyway,” said the One-Armed Sorcerer, “here I have ten
buttons, and here I have ten threads from the genie’s head. I
propose to make you a doublet, sir; a magic doublet; and for the
cloth, the wasp’s nest will be the very thing. It will be a doublet
worth having; and to you, sir, who have so nobly preserved us all, I
will present it on—er—ahem!—on your wedding day.”
“Hurrah!” piped up the elderly Highwayman, and the lady on my arm
blushed.
“Oh, isn’t that sweet of him?” cried her nine sisters. “Isn’t it just too
sweet for anything? It’s really the sweetest thing, now isn’t it? Too
perfectly sweet for words, it is, really!”
The One-Armed Sorcerer, stepping over to the wasp’s nest, pulled it
down from the tree without breaking it, and slung it on his back.
“Come with me!” I cried. “You shall all return with me to my father’s
castle. Will you consent to that?”
“Well,” said the elderly Highwayman,—
“Though anxious to accommodate, I fear it’s growing rather late,
I seldom stay out after eight—”
“Oh, father!” cried his daughters, nine of them, together, “it would
be perfectly jolly!”
“It would suit me to perfection,” said the One-Armed Sorcerer.
“Oh, won’t it be jolly? It will be jolly, won’t it? Wouldn’t it be
perfectly jolly?” cried the nine young damsels, clapping their hands.
“Will you come home with me?” I whispered to the fairest of the ten,
who had said nothing.
“If you wish it,” she whispered, blushing again.
“Oh, aren’t they just the dearest things?” cried her nine sisters. “It’s
love at first sight—oh, the dear things! Aren’t they just simply too
dear for anything? They are perfectly dear, now, aren’t they? Really
now, aren’t they just too perfectly dear?”
The Prince Leads His Beloved Home
Well, the long and the short of it is, we reached my father’s castle
late that night, under a starry sky. The attendants whom I had left in
the forest had returned without me, and the castle was a-twitter
with anxiety. But when I led my fair lady into the great hall and
presented her to my father, the King, and her nine sisters and the
elderly Highwayman and the One-Armed Sorcerer stood bowing
behind us, there was joy, I can tell you, and the rafters rang again.
My father, after a long look at the beautiful damsel at my side, and
then at me, gave a long, slow whistle, without making a sound, and
stooped and kissed her on both cheeks, nudging me with his elbow
at the same time.
A cheer went up again, and my father took me aside and whispered
in my ear.
“You rascal,” said he, “I never thought you had it in you to— Really!
You don’t say so! You astonish me! A Highwayman’s daughter! Well,
well, think of that! Very original of you, my son; I’m sure I never
would have thought of such a thing at your age. She’s got a fine
eye, my boy; there’s a look in it I’ve seen in your mother’s eye; a will
of her own, you can’t fool me about that look,—yes, yes, very
beautiful,—but a will of her own, remember I told you. A
Highwayman’s daughter! That’s good. Highly original. Well, well, it
might have been the Hangman’s daughter—but remember what I
told you about that look in the eye, I’ve seen it before,—your mother
used to—but she’s certainly beautiful all the same—when does the
wedding come off?”
The Magic Doublet Is Presented at the Wedding
We were married on the morning of the third day. Such feasting,
such dancing, such merriment,—and gifts innumerable; but the best
gift of all was a doublet, made with his left hand by the One-Armed
Sorcerer from the skin of the witch’s wasp’s nest, fastened by the
witch’s ten buttons sewed on with the genie’s hair; a doublet to
preserve the wearer from all harm. And this, as the wedding dinner
was nearing its end, the One-Armed Sorcerer, rising in his place,
presented to me with a pretty speech, for which I thanked him.
“Sir,” said my father, addressing the One-Armed Sorcerer, “I invite
you to remain with me at my court, to instruct my son in the
mystery of handling a wife. Nobody but a sorcerer should undertake
such a job. Will you try it?”
“Alas, your majesty,” said the One-Armed Sorcerer, “it is far beyond
my powers. And besides, I must return to my island home, on
pressing business.”
“Very well, then,” said my father. He took my bride’s hand in his and
patted it, while she looked down in confusion. “My dear,” said he to
her, “you must persuade your sisters to remain here with us. And as
for your father, I design to appoint him Lord Treasurer of my
kingdom. I think a Highwayman ought to be a good man to take
charge of my money. Will you persuade him to accept that office?”
“Oh!” cried the nine sisters, without giving my bride a chance to
speak. “That would be jolly! Oh, wouldn’t it be jolly? It will be just
too perfectly jolly for anything, won’t it? But really, though, won’t it
be jolly? Just too simply, perfectly, adorably jolly!”
“Your majesty,” said my father-in-law the Highwayman, rising up on
his elderly legs,—
“Although I am not confident that I’m entirely competent, I thank
you for the compliment,
I thank you most sincerely;
I fear I am not very quick in matters of arithmetic, but often when
the answers stick
I get them,—very nearly;
And if at first I don’t succeed I try again, although indeed I
cannot say I always heed
Each wretched little fraction;
And anyway you must agree if one but knows his Rule of Three
there’s hardly any need to be
Acquainted with subtraction.
“I do not wish to seem to boast, of all things I detest it most,
and yet I think I’d fill the post
Not very ill, not very:
From early youth I did betray, I’ve often heard my mother say,
a really rather taking way
In matters monetary;
A simple little rule or two I always try to keep in view, to do
what I am told to do,
And always speak politely,
And never make a saucy joke behind the backs of other folk, a rule
which I have seldom broke,
If I remember rightly.
“My motto is a simple one, that happiness depends upon the
consciousness
of duty done
(Unless it’s too unpleasant),
I value virtue more than wit, and as for riches, I admit I do not
value them a bit
(At least, not just at present),
I think, however, I should state, that though I don’t mind working
late, I like to be at home by eight,
When supper’s on the table;
When supper s on the table;
And thus, in words of simple art, I thank you, Sir, with all my
heart, and promise I will do my part
(At least, as far as able).”
TRANSCRIBER’S NOTE:
Obvious typographical errors have been corrected.
*** END OF THE PROJECT GUTENBERG EBOOK SOLARIO THE
TAILOR: HIS TALES OF THE MAGIC DOUBLET ***
Updated editions will replace the previous one—the old editions
will be renamed.
Creating the works from print editions not protected by U.S.
copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.
START: FULL LICENSE
THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK
To protect the Project Gutenberg™ mission of promoting the
free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.
Section 1. General Terms of Use and
Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.
1.B. “Project Gutenberg” is a registered trademark. It may only
be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E. Unless you have removed all references to Project
Gutenberg:
1.E.1. The following sentence, with active links to, or other
immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookultra.com

More Related Content

PDF
Software Engineering 10th Edition by Ian Sommerville (eBook PDF)
PDF
Software Engineering 10th Edition by Ian Sommerville (eBook PDF)
PDF
(Ebook) TinyOS programming by Philip Levis, David Gay ISBN 9780521896061, 052...
PDF
Applied Architecture Patterns On The Microsoft Platform An Indepth Scenariodr...
PDF
Software Engineering 2nd Edition David C. Kung
PDF
Software Engineering 2nd Edition David C. Kung
PDF
Enterprise Cloud Computing Technology Architecture Applications 1st Edition G...
PDF
Immediate download Comptia Cysa+ Study Guide Exam Cs0-002 3rd Edition Mike Ch...
Software Engineering 10th Edition by Ian Sommerville (eBook PDF)
Software Engineering 10th Edition by Ian Sommerville (eBook PDF)
(Ebook) TinyOS programming by Philip Levis, David Gay ISBN 9780521896061, 052...
Applied Architecture Patterns On The Microsoft Platform An Indepth Scenariodr...
Software Engineering 2nd Edition David C. Kung
Software Engineering 2nd Edition David C. Kung
Enterprise Cloud Computing Technology Architecture Applications 1st Edition G...
Immediate download Comptia Cysa+ Study Guide Exam Cs0-002 3rd Edition Mike Ch...

Similar to Modelling Systems Practical Tools and Techniques in Software Development 2nd Edition John Fitzgerald (20)

DOCX
ASSIGNMENT 1Fnu MohammadL20495160BUSINESS MODEL 2Fo.docx
PDF
Enterprise Cloud Computing Technology Architecture Applications 1st Edition G...
PDF
William Impey CV
PDF
Virtual Components Design And Reuse 1st Edition Jrgen Haase Auth
PDF
Enterprise Cloud Computing Technology Architecture Applications 1st Edition D...
PDF
(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel
PDF
CAD CAM Rapid prototyping Application Evaluation None
PDF
(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel
PDF
C Design Patterns And Derivatives Pricing 2nd Edition M S Joshi
PDF
Fundamentals Of Software Engineering Engineering Handbook 1st Edition Rajat G...
PDF
(eBook PDF) Computer Organization and Architecture10th Global Edition
PDF
2002 Great Global Grid Book
PDF
Fundamentals of Software Engineering Engineering Handbook 1st Edition Rajat G...
PDF
Software Modeling And Design Uml Use Cases Patterns And Software Architecture...
PDF
Fundamentals of Software Engineering Engineering Handbook 1st Edition Rajat G...
PDF
CAD CAM Principles And Applications 2nd Edition P. N. Rao
PDF
CAD CAM Principles And Applications 2nd Edition P. N. Rao
DOCX
software Documentation Certificate in department of computer
PDF
Computer Programming With C Kunal Pimparkhede
PDF
Software Engineering 10th Edition by Ian Sommerville (eBook PDF)
ASSIGNMENT 1Fnu MohammadL20495160BUSINESS MODEL 2Fo.docx
Enterprise Cloud Computing Technology Architecture Applications 1st Edition G...
William Impey CV
Virtual Components Design And Reuse 1st Edition Jrgen Haase Auth
Enterprise Cloud Computing Technology Architecture Applications 1st Edition D...
(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel
CAD CAM Rapid prototyping Application Evaluation None
(eBook PDF) C++ How to Program 10th Edition by Paul J. Deitel
C Design Patterns And Derivatives Pricing 2nd Edition M S Joshi
Fundamentals Of Software Engineering Engineering Handbook 1st Edition Rajat G...
(eBook PDF) Computer Organization and Architecture10th Global Edition
2002 Great Global Grid Book
Fundamentals of Software Engineering Engineering Handbook 1st Edition Rajat G...
Software Modeling And Design Uml Use Cases Patterns And Software Architecture...
Fundamentals of Software Engineering Engineering Handbook 1st Edition Rajat G...
CAD CAM Principles And Applications 2nd Edition P. N. Rao
CAD CAM Principles And Applications 2nd Edition P. N. Rao
software Documentation Certificate in department of computer
Computer Programming With C Kunal Pimparkhede
Software Engineering 10th Edition by Ian Sommerville (eBook PDF)
Ad

Recently uploaded (20)

PPTX
Pharma ospi slides which help in ospi learning
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Classroom Observation Tools for Teachers
PDF
Complications of Minimal Access Surgery at WLH
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
01-Introduction-to-Information-Management.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
RMMM.pdf make it easy to upload and study
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
Pharma ospi slides which help in ospi learning
Basic Mud Logging Guide for educational purpose
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Classroom Observation Tools for Teachers
Complications of Minimal Access Surgery at WLH
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
01-Introduction-to-Information-Management.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Microbial disease of the cardiovascular and lymphatic systems
RMMM.pdf make it easy to upload and study
O5-L3 Freight Transport Ops (International) V1.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Final Presentation General Medicine 03-08-2024.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Microbial diseases, their pathogenesis and prophylaxis
Anesthesia in Laparoscopic Surgery in India
Renaissance Architecture: A Journey from Faith to Humanism
Ad

Modelling Systems Practical Tools and Techniques in Software Development 2nd Edition John Fitzgerald

  • 1. Modelling Systems Practical Tools and Techniques in Software Development 2nd Edition John Fitzgerald - PDF Download (2025) https://ebookultra.com/download/modelling-systems-practical- tools-and-techniques-in-software-development-2nd-edition-john- fitzgerald/ Visit ebookultra.com today to download the complete set of ebooks or textbooks
  • 2. We have selected some products that you may be interested in Click the link to download now or visit ebookultra.com for more options!. Data Mining Practical Machine Learning Tools and Techniques 2nd Edition Ian H. Witten https://ebookultra.com/download/data-mining-practical-machine- learning-tools-and-techniques-2nd-edition-ian-h-witten/ Emerging trends in computational biology bioinformatics and systems biology algorithms and software tools 1st Edition Arabnia https://ebookultra.com/download/emerging-trends-in-computational- biology-bioinformatics-and-systems-biology-algorithms-and-software- tools-1st-edition-arabnia/ VCE Software Development Core Techniques and Principles 4th Edition Adrian Janson https://ebookultra.com/download/vce-software-development-core- techniques-and-principles-4th-edition-adrian-janson/ Software Development and Professional Practice 1st Edition John Dooley https://ebookultra.com/download/software-development-and-professional- practice-1st-edition-john-dooley/
  • 3. Techniques and Tools for the Design and Implementation of Enterprise Information Systems Angappa Gunasekaran https://ebookultra.com/download/techniques-and-tools-for-the-design- and-implementation-of-enterprise-information-systems-angappa- gunasekaran/ Practical Electronics Components and Techniques 1st Edition John M. Hughes https://ebookultra.com/download/practical-electronics-components-and- techniques-1st-edition-john-m-hughes/ Biophysical Tools for Biologists Volume One In Vitro Techniques 1st Edition John J. Correia https://ebookultra.com/download/biophysical-tools-for-biologists- volume-one-in-vitro-techniques-1st-edition-john-j-correia/ Risk Management in Software Development Projects Computer Weekly Professional 1st Edition John Mcmanus https://ebookultra.com/download/risk-management-in-software- development-projects-computer-weekly-professional-1st-edition-john- mcmanus/ Logic in computer science modelling and reasoning about systems 2nd ed Edition Michael Huth https://ebookultra.com/download/logic-in-computer-science-modelling- and-reasoning-about-systems-2nd-ed-edition-michael-huth/
  • 5. Modelling Systems Practical Tools and Techniques in Software Development 2nd Edition John Fitzgerald Digital Instant Download Author(s): John Fitzgerald, Peter GormLarsen ISBN(s): 9780521899116, 0521899117 Edition: 2 File Details: PDF, 2.78 MB Year: 2009 Language: english
  • 7. MODELLING SYSTEMS: PRACTICAL TOOLS AND TECHNIQUES IN SOFTWARE DEVELOPMENT Second Edition How can we make sure that the software we build does what it is supposed to do? This book provides an insight into established techniques that help developers overcome the complexity of software development by constructing models of soft- ware systems in early design stages. It uses one of the leading formal methods, the Vienna Development Method (VDM), and combines training in the formalism with industry-strength tool support and examples derived from real industrial applica- tions. The principles taught here also apply to many of the current generation of formal methods. This second edition has been updated to include advanced online tool support for formal modelling as well as up-to-date reports on real commercial applications in areas as diverse as business information systems and firmware design.
  • 9. MODELLING SYSTEMS: PRACTICAL TOOLS AND TECHNIQUES IN SOFTWARE DEVELOPMENT Second Edition JOHN FITZGERALD and PETER GORM LARSEN
  • 10. C A M B R I D G E U N I V E R S I T Y P R E S S Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paulo, Delhi Cambridge University Press The Edinburgh Building, Cambridge CB2 8RU, UK Published in the United States of America by Cambridge University Press, New York www.cambridge.org Information on this title: www.cambridge.org/9780521899116 c Cambridge University Press 1998, 2009 This publication is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press. First published 1998 Second edition 2009 Printed in the United Kingdom at the University Press, Cambridge A catalogue record for this publication is available from the British Library ISBN 978-0-521-89911-6 hardback Additional resources for this publication at www.vdmbook.com Cambridge University Press has no responsibility for the persistence or accuracy of URLs for external or third-party Internet websites referred to in this publication, and does not guarantee that any content on such websites is, or will remain, accurate or appropriate.
  • 11. Contents Foreword page ix Preface xi 1 Introduction 1 1.1 Software 1 1.2 Modelling and analysis 2 1.3 This book 3 1.4 VDM-SL 4 1.5 The structure of a VDM-SL model 4 1.6 Analysing a model 9 2 Constructing a Model 13 2.1 Introduction 13 2.2 Requirements for an alarm system 13 2.3 Constructing a model from scratch 14 2.4 Reading the requirements 15 2.5 Extracting possible types and functions 16 2.6 Sketching type representations 16 2.7 Sketching function signatures 22 2.8 Completing the type definitions 23 2.9 Completing the function definitions 24 2.10 Reviewing requirements 29 3 VDMTools Lite 35 3.1 Introduction 35 3.2 Installing VDMTools Lite 36 3.3 Configuring the alarm example 36 3.4 Syntax and type checking models 38 3.5 Interpreting and debugging models 42 3.6 Test coverage 48 v
  • 12. vi Contents 3.7 Integrity checking 49 3.8 Setting options 50 4 Describing System Properties Using Logical Expressions 55 4.1 Introduction 55 4.2 The temperature monitor 55 4.3 Logical expressions 57 4.4 Presenting and evaluating predicates 64 4.5 Using quantifiers 66 4.6 Coping with undefinedness 71 5 The Elements of a Formal Model 77 5.1 Introduction 77 5.2 A traffic light control kernel 78 5.3 Union and basic types 81 5.4 Basic type constructors 83 5.5 Record types 84 5.6 Invariants 85 5.7 Explicit function definitions 87 5.8 Functions for changing signals 88 5.9 Reviewing the safety requirements 96 5.10 Optional types: modelling failure behaviour 96 6 Sets 99 6.1 Introduction 99 6.2 The set type constructor 100 6.3 Defining sets 101 6.4 Modelling with sets 103 6.5 Distributed set operators 115 6.6 Summary 118 7 Sequences 121 7.1 Introduction 121 7.2 The sequence type constructor 122 7.3 Defining sequences 122 7.4 Modelling with sequences 125 7.5 Further operators on sequences 132 7.6 Abstraction lesson: choosing abstraction levels 135 8 Mappings 137 8.1 Introduction 137 8.2 The mapping type constructor 139 8.3 Defining mappings 139 8.4 Modelling with mappings 140 8.5 Summary 154
  • 13. Contents vii 9 Recursive Structures 157 9.1 Recursive data structures: trees 157 9.2 Abstract syntax trees 161 9.3 Directed graphs 164 9.4 An application of directed graphs: code optimisation 167 9.5 Abstraction lesson: executability 169 10 Validating Models 171 10.1 Introduction 171 10.2 Internal consistency: proof obligations 173 10.3 Visualisation of a model 180 10.4 Interfacing to legacy code 182 10.5 Systematic testing 183 10.6 Using proofs 184 10.7 Choosing a validation technique 187 11 State-Based Modelling 189 11.1 Introduction 189 11.2 State-based modelling 190 11.3 A state-based model of the explosives store controller 191 11.4 A state-based model of the trusted gateway 196 11.5 Validation of state-based models 199 12 Large-Scale Modelling 203 12.1 Introduction 203 12.2 A structure for the tracker model 204 12.3 Information hiding 212 12.4 Object-oriented structuring 214 13 Using VDM in Practice 217 13.1 Introduction 217 13.2 Development activities and processes 218 13.3 Common development problems 219 13.4 Advantages of VDM technology 220 13.5 Getting started 223 13.6 VDM and its extensions 226 13.7 Industrial applications of VDM 227 13.8 Moving on: information resources 232 Appendix A Language Guide 235 A.1 Identifiers 235 A.2 Type definitions 236 A.3 Basic data types and type constructors 236 A.4 Data type operator overview 237 A.5 Expressions 246
  • 14. viii Contents A.6 Patterns 248 A.7 Bindings 249 A.8 Explicit function definition 249 A.9 Implicit functions 250 A.10 Operations 250 A.11 The state definition 251 A.12 Syntax overview 252 Appendix B Solutions to Exercises 263 B.1 Solutions for Chapter 2 Exercises 263 B.2 Solutions for Chapter 3 Exercises 263 B.3 Solutions for Chapter 4 Exercises 264 B.4 Solutions for Chapter 5 Exercises 265 B.5 Solutions for Chapter 6 Exercises 266 B.6 Solutions for Chapter 7 Exercises 268 B.7 Solutions for Chapter 8 Exercises 268 B.8 Solutions for Chapter 9 Exercises 270 B.9 Solutions for Chapter 10 Exercises 273 B.10 Solutions for Chapter 11 Exercises 275 Bibliography 277 Subject Index 283 Definitions Index 287
  • 15. Foreword Software engineers produce many descriptions: those of the environment or domain in which a desired computing system software is to exist; descriptions of the requirements put on the software; and descriptions of the software design that implements the requirements. Thus the descriptions span the spectrum from appli- cation domain, via requirements and software architecture, program organisation and lower level designs, to executable code. While its concerns may be general, software engineering is unique among engineering disciplines in that its primary products are descriptions that must eventually satisfy the laws of mathematical logic and metamathematics. Other engineering disciplines have to handle a quantum leap into physical real- ity – the stuff of natural science. In software engineering there is a different quantum leap: that from description to execution. Software engineering is thus about structuring and relating descriptions. Abstraction and modelling taken together are the keys to mastering the com- plexity of environments and systems. Formal specification is employed to express abstractions and to ensure affinity to real domains. Such specifications open up ways to establish the proper relation between domain and requirements models as well as potentially verifying the links between software architecture, requirements models and the stages of design. This increases the chance of achieving a proper fit to the environment, to user expectations and of the correctness of implementation. VDM was first conceived at the IBM Vienna Laboratory during the summer of 1973. The quarter of a century which separates that date from the publication of this book has shown that VDM is characterised by having remarkably robust, yet simple and elegant, means of abstraction and modelling. Careful attention was paid during the 1980s to ensuring a consistent and comprehensive final version of the VDM Specification Language (VDM-SL). This was supported by a method for specification refinement (reification) including a Logic for Partial Functions Proof ix
  • 16. x Foreword System. VDM is today as powerful a tool and technique for software development as any available. Software development is pursued in a world where the engineer is not always allowed to pursue the ideas of formal development as epitomised by VDM-SL. But anyone who is aware of the fundamental idea of building abstract models can benefit from its immense power to aid understanding and communication. In this delightful book former students of ours bring you realistic and effective techniques for abstraction and modelling. The practical, tool-based, approach is one which should give their readers and students (present and future software engi- neers) the ability to employ these techniques in their everyday work. Dines Bjørner Cliff Jones Hiroshima, November 1997
  • 17. Preface For developers of computer-based systems, capturing and understanding the com- plex functional requirements and behaviour of software components has come to represent a considerable challenge. This book aims to equip readers with skills and techniques which will help them to address this challenge. It does so by stressing the value of abstract system models which can be analysed and tested before an expensive commitment is made to a particular design strategy. The book enables the reader to understand the role and nature of abstract models as well as gain practical experience in their creation. In order to permit machine-supported analysis, system models must be formu- lated in a well-defined notation. In this text, we use a formally defined language called VDM-SL (the Vienna Development Method Specification Language). The Vienna Development Method is a collection of techniques for developing comput- ing systems from models expressed in the language. Since its origin in an industrial environment, VDM has become one of the most widely used of a class of tech- niques known as model-oriented formal methods. The language VDM-SL was recently standardised by the International Organization for Standardization (ISO). Although VDM-SL is used as a teaching medium in this text, the principles taught apply equally well to other model-based formal methods such as B, RAISE and Z. In this book we take a pragmatic approach to the use of formal methods. We aim to illustrate the concepts and techniques used in VDM without overwhelming the reader with mathematics. Unlike most teaching texts on formal methods, this book does not treat formal refinement or formal proof. Instead it focuses on the construc- tion of abstract and formal models for a range of computer systems. Mastering the construction and validation of abstract models is in our view a prerequisite for entering the world of verification. This book is unusual in two other respects. First, the majority of the examples presented are inspired by models developed in industrial projects over recent years. xi
  • 18. xii Preface We believe that examples grounded in industrial practice provide motivating illus- trations of the fact that this technology can be used for development of real systems and not simply for stacks and vending machines. Second, the skills to develop abstract models can only be acquired through practice. Throughout the text, the use of an industrial tool is encouraged, in order to develop the reader’s intuitive grasp of the reality of modelling. Robust and appropriate tool support is essential for industrial application of modelling technology, so hands-on experience is stressed throughout this book. Readers will gain the most benefit if they use the freely available VDMTools tool set1 introduced in Chapter 3. It is possible to carry out the exercises without tool support, but this will not give the reader an appreciation of what can be expected from such tools. The web site accompanying this book (http://www.vdmbook.com) pro- vides all the example models presented in the book, additional models used for exercises and links to the full VDM-SL language manuals. This book uses the (ASCII) interchange syntax of VDM-SL rather than the mathematical syn- tax which is used in most some of the older texts. It is our experience that this notation presents less of a barrier to the novice who does not have experience in mathematical logic. The subset of VDM-SL used in this book includes facilities for state-based spec- ification. However, readers already familiar with VDM will notice that the tutorial content is biased towards a functional modelling style. The functional style pro- vides an environment in which type constructors and operators can be covered without the distraction of operation syntax, side-effects and access restrictions to external variables. Once the elements of data and functional modelling have been covered, the ‘state and operations’ paradigm is introduced. The text omits a discussion of explicit operations, because it is our experience that those who learn abstraction skills within the language subset we have chosen can learn to use explicit operations very easily, on the basis of experience from programming languages. Using this book This text is aimed at software engineers who wish to investigate how the use of models can improve the software development process, and at university students studying software engineering or computing science. The material in 1 The URL is http://www.vdmtools.jp/en or via the book’s support pages at http://www. vdmbook.com.
  • 19. Preface xiii the book has been used successfully on industrial training courses, undergradu- ate and postgraduate level [Larsen08]. The text is designed with independent study in mind, and the support materials and discussion lists accessible via http://www.vdmbook.com provide further support for readers not studying this material as part of a university course. No formal mathematical background is assumed, but the authors find that stu- dents gain most benefit when they have some familiarity with programming and with the realities of software development. In the university context, students’ experience of constructing a large piece of software in a group project, sometimes suffering serious setbacks during integration, has been found to provide a valuable motivating lesson. The objective of this book is to bring readers to a point where they are able to read, write and analyse formal models of computing systems using VDM-SL and have an understanding of the kind of problems to which these techniques can be applied cost-effectively. The book is divided into four parts. Chapters 1 to 3 form the introductory mate- rial. The first two chapters motivate and introduce the notion of modelling using a formal language and indicate a systematic approach for using this kind of tech- nology. On reaching the end of Chapter 2, the reader will have seen most of the elements of VDM-SL covered in the book. Chapter 3 introduces VDMTools Lite, the tool support provided for the tutorial material. Chapters 4 to 8 form the core of the book, covering the use of logic, basic data types, type constructors and func- tions in constructing models. Each of these chapters contains a description of the requirements for an application for which a model is developed, introducing each modelling construct in VDM-SL as it is needed. Chapters 10 to 12 are concerned with the use of models in practice, in particular validation techniques, the repre- sentation of persistent state and dealing with large-scale system models. The final part of the book examines the introduction and use of formal modelling in the com- mercial context. Chapter 13 discusses the introduction of modelling technology in the industrial environment. The appendices include a language guide for the subset of VDM-SL used in the text and supported by VDMTools along with solutions to exercises. Readers using the book as an introduction to formal modelling can follow the text in the order in which it is presented. Practising software engineers may prefer to read Chapter 13 after Chapter 1 for a consideration of the costs and benefits of applying the techniques covered in depth in the remainder of the book. Although the book is intended to embody a single course in formal modelling, Chapters 1 to 9 would be suitable for a course covering modelling only. The material in Chapter 9 on recursive structures is slightly more demanding than the preceding chapters. Chapters 10 to 13 could be used in a second and more
  • 20. xiv Preface advanced course including a significant assignment in which students can explore the construction and analysis of a model. Exercises are included in the flow of the text and should be attempted as they are encountered. More substantial exercises are normally included at the end of each of the central chapters. Those exercises marked with a star () are more demand- ing than the average. It is our experience presenting this material that instructors are asked for large numbers of small exercises which increase familiarity with the language. Often, lecturers also require more demanding exercises for the most enthusiastic and capable students. Teaching material including samples of lec- ture notes, slides and exercises of both these kinds will become available from the World Wide Web Page at http://www.vdmportal.org/. The production of a formal model is much less straightforward than a textbook might lead one to suppose. By presenting particular models as solutions to prob- lems, we do not intend to imply that they are the only, or even the best, solutions. In addition, the developer of a model runs into many “dead ends” before reach- ing a good solution. We are unable to present this process in all its detail in this volume, but we do record some aspects of our practical experience which we feel would be most helpful. This is done in distinguished boxes of text such as this. Developments since the first edition When we published the first edition of this book ten years ago, our aim was to lower the barrier to using formal modelling techniques that were still seen as forbidding, specialised and expensive. By emphasising tool support, and by using examples derived from industry applications, we hoped to encourage read- ers to apply abstraction and modelling principles in a wide range of applications. Although the underlying aim remains unchanged, this second edition takes account of the significant developments in formal modelling, tool support, industry appli- cation and experience gained in teaching and training in formal methods in the last decade. Tool support for the first edition took the form of a limited-capability version of the VDM Toolbox, then being developed by IFAD A/S in Denmark. The Toolbox technology was subsequently acquired and extended by CSK Systems in Japan, following their successful application of VDM to a major financial back-office system (TradeOne, described in Chapter 13). The tool that accompanies this second edition takes advantage of CSK’s developments. VDMTools Lite now supports the full VDM-SL language instead of just the subset covered in the book. Restrictions
  • 21. Preface xv on the size of model have been removed. The full functionality of the tool set is now available, with the exception of the application programmer interface, the dynamic linking facility and the C++ code generator. Since the first edition was published, both of us have worked in the software industry, in areas as diverse as business development and design of binary trans- lation technology. The experience has reinforced our view that formal modelling technology must work with existing development tools and processes, rather than supplant them, if its benefits are to be realised. We have also become more aware of the trade-off between the effort expended in analysing models and the insights gained by doing so. As a result, we have added material on recent industrial appli- cations of VDM (Chapter 13) and updated the industry-based examples throughout the book. Our experience teaching formal modelling to practitioner engineers and to university students has emphasised the importance of abstraction as a core skill in modelling. We reinforce this point with abstraction lessons in each of the core chapters. This book concentrates on the core VDM-SL notation and the fundamentals of abstraction and rigorous reasoning about system models. Over the last ten years, the capabilities of the VDM formalism itself have been extended to encompass development of concurrent and object-oriented systems, and real-time and dis- tributed systems. We have added pointers into these more specialised and advanced applications in the expanded Chapter 13. Acknowledgements We would like to thank our former professors Cliff Jones and Dines Bjørner for introducing us to the subject of formal methods and to VDM in particular. Our thanks also go to our supportive and patient editor David Tranah from Cambridge University Press and to our colleagues at CSK in Japan, especially Shin Sahara. Many colleagues have provided valuable comments on drafts of the book in both editions: Sten Agerholm, Bernhard Aichernig, Mo Ajmal, Paul Ammann, Nick Battle, Peer Bonnerup, Carsten Breum, Jeremy Bryans, Hanne Carlsen, Tim Clement, Ian Cottam, Lionel Devauchelle, Albert Esterline, Kelsey Francis, Brigitte Fröhlich, Anne Haxthausen, Niels Kirkegaard, Ole Bjerg Larsen, Janusz Laski, Yves Ledru, David Morgan, Paul Mukherjee, Anne Berit Nielsen, Erik Toubro Nielsen, Takahiko Ogino, José Nuno Oliveira, Lars Toftegaard Olsen, Richard Payne, Jan Storbank Pedersen, Marie-Laure Potet, Abd-El-Kader Sahraoui, Paul Smith, Vincent Stephan, Elliot Sullivan, Marcel Verhoef, Henrik Voss and Mark Wigmans. The first edition was published in a Japanese translation by the Iwanami Shoten publisher in 2003. We are particularly grateful to our skilled translators: Keijiro
  • 22. xvi Preface Araki, Takahiko Ogino, Shin Sahara and Makoto Someya. Their work has been a major stepping stone towards the adoption of formal modelling technology in Japan. Many colleagues were kind enough to use the first edition in courses on formal modelling, and to provide us with comments and corrections. We are particularly grateful to Bernhard Aichernig, V. S. Alagar, Pascal André, Keijiro Araki, Andreas Bollin, Dan Cristea, Albert Esterline, Pascal Fenkam, Mats Heimdahl, Keith Hop- per, Zarinah Mohd Kasirun, Janusz Laski, Yves Ledru, Peter Lucas, Michael Lutz, Dominique Mery, Farid Mezidane, Pascal Molli, David Morgan, Tony Moynihan, José Nuno Oliveira, Kasi Periyasamy, Steve Riddle, Angela Shiflet, Ivor Spence and Robert Topp. Our thanks are also due to the hundreds of students who have participated in our courses at Newcastle University and the Engineering College of Aarhus. We gratefully acknowledge the support of the European Union Framework 7 IST Project “DEPLOY” on industrial deployment of advanced system engineering methods and the Erasmus programme for supporting our continued collaboration on the learning and teaching of formal methods. As always, we reserve our deepest thanks for our closest friends and families who allowed us, once again, a decade on, to take advantage of their patience. John Fitzgerald Peter Gorm Larsen Aarhus, Denmark
  • 23. 1 Introduction Aims The aim of this chapter is to provide a motivation for studying the mod- elling of computing systems by discussing the challenges of developing correct software. On completion of this chapter, the reader should be aware of the main concepts to be presented in the book and know where to find the relevant mate- rial in the text. 1.1 Software Software is pervasive, error-prone, expensive to develop and, as an en- gineering medium, extraordinarily seductive. Its seemingly infinite flexibility, increasing power and the absence of physical characteristics, such as weight, make it an ideal medium in which to express complex models which might not exist at all were it not for software. As a result, software is often developed for applications which are critical either to an enterprise’s mission or to the quality of life of those with whom the system interacts. Challenged by the variety and scale of software applications, the participants in the 1968 NATO Conference on Software Engineering foresaw a discipline of software development with a sound scientific basis [Naur69]. Over the last 40 years, there is little doubt that enormous advances have been made in our ability to control software development. However, software projects continue to suffer from serious difficulties which can lead to the delivery of faulty goods that are over budget and behind schedule. The rapid increase in processor power has naturally led to increasing demands being made on software and its developers. Software is almost always devel- oped as part of a larger system involving computing hardware, special systems such as sensors and actuators, human-computer interfaces and human beings. However, the long lead-times associated with the production of special items of hardware mean that additional functionality caused by changes in customers’ requirements is often realised in software because that medium is seen as more flexible. 1
  • 24. 2 1 Introduction A comparison between software engineering and the engineering in other me- dia, whether mechanical, fluid, chemical or electronic, is difficult because of the different characteristics of those media. However, there is little doubt that soft- ware engineers can still learn from other more mature engineering disciplines. 1.2 Modelling and analysis One of the major differences between software engineering and other forms of engineering is that the other disciplines have a longer tradition of con- structing abstract models of the product in the early stages of development. Such models serve as a proving ground for design ideas and as a communication medium between engineers and customers. As a result of modelling, engineers can avoid errors which might otherwise only become obvious in the very late stages of development, when expensive commitments have been made to mate- rials and designs. There are two aspects of these models which are crucial to their successful use: abstraction and rigour. Engineering models are abstract in the sense that aspects of the product not relevant to the analysis in hand are not included. For example, an aeronautical engineer investigating the aerodynamics of an aircraft design may model the air flow over the surfaces (mathematically or in a wind tunnel) because air flow is a dominant design parameter. The model is unlikely to include the user interface of the cockpit instruments. Similarly, human factors engineers who design cock- pit instruments model the cockpit, not the aerodynamics of the wing surfaces. The choice of which aspects of a system should be included in the model (its level of abstraction) is a matter of engineering skill. Perhaps the most significant property of a system model is its suitability for analysis. The purpose of such an analysis is to provide an objective assess- ment of a model’s properties. For example, a model of a new design of bridge might be used to assess the design’s ability to withstand physical stresses with acceptable risk of collapse. This contrasts with the more subjective analysis of a review or inspection in which the outcome may depend on the consultants carrying out the job. It is also important to be able to repeat the assessment on alternative models and to be able to perform as much as possible of the analysis mechanically, in order to minimise the risk of subjectivity and error as well as the required human effort. To obtain this level of objectivity, mechanisation and repeatability, mathematics is often used in the analysis. Indeed, many system models exist only as mathematical constructions and not as physical entities at all. How do these concepts of system modelling transfer to the development of
  • 25. 1.3 This book 3 computing systems, and in particular to software? A wide range of modelling techniques has been developed for computing systems, including pseudo-code, natural language, graphical and mathematical notations. Ultimately, a computer program could be seen as a model of the system which is to be provided: an ex- ecutable model which meets all the relevant user requirements, or at least a large enough subset of them to make the product acceptable. Although a wide variety of modelling techniques is available, comparatively few provide the combina- tion of abstraction and rigour which could bring the benefits of early detection of errors and increased confidence in designs. This book describes well-established modelling techniques which combine abstraction with rigour. We will introduce the elements of a modelling language that can be combined effectively with existing software engineering techniques, opening up the possibility of improved analysis in early development stages. Models expressed very abstractly in the early stages of system development would normally be treated as specifications of a system. If the models instead are described at a lower level of abstraction later in the process, they will nor- mally be called designs. The borderlines between specification, design and im- plementation are not clearly defined and the modelling and analysis techniques discussed in this book are not confined to any particular stage of software de- velopment. We will therefore tend to avoid loaded terms such as “specification” and use the general term “model” to refer to the system descriptions we develop. Nevertheless, we focus on requirements analysis and early design stages because these are the phases in which the application of modelling is most beneficial. 1.3 This book This book is concerned with the construction of abstract models for computing systems. The notation used to describe such models is a subset of the ISO standardised language VDM-SL [ISOVDM96]. The VDM-SL nota- tion supports abstraction in a variety of ways which will be introduced in the text. The rigour of the language lies mainly in its definition in the ISO standard, which is extremely thorough and detailed. Indeed, the language is referred to as a formal modelling language because its syntax and the meaning of models expressed in the language are so thoroughly defined. This formality allows anal- yses to be carried out consistently because the formal definition of the meaning of the language constructs leaves little or no room for interpretations to differ between support tools or practitioners. This book is about the practical exploitation of modelling techniques. Our pragmatic approach is realised in three ways. First, we make extensive use of a
  • 26. Other documents randomly have different content
  • 27. side, when suddenly a voice, a low but clear voice, said distinctly in my ear, “Stop!” I looked about me, but I could see no one. There was positively no living creature near me,—unless I except a wasp which at the moment was flying about my head, and which I struck away with my hand. I walked down the road some twenty paces, peering about for the person who had spoken, and becoming more and more perplexed; and as I was about to enter the forest the same voice, still low but quite distinct, spoke again close into my ear: “Stop!” I stopped in bewilderment. The forest was silent as the sky; no living creature, not even a bird, could I see anywhere; there was nothing; —nothing, indeed, except the wasp which was still flying about my head and which now began to annoy me exceedingly. I went on again, striking out at the wasp, and in a moment (I assure you I began to doubt my senses), the same voice spoke again, this time close into my left ear. “Stop! Just a moment!” it said. “Look, if you please! On your left shoulder!” I craned my neck about, and there was nothing on my left shoulder except the wasp. The wasp was there, indeed, and I made as if to brush him off; but the voice said, “Don’t, if you please!” and I stayed my hand. You may imagine that I was more astonished than ever. I gazed at the wasp intently, and as I did so the voice began to murmur, in a kind of rapid, buzzing drone, into my left ear. “Mercy on us!” I cried. “It’s the wasp that’s talking!” It was true, beyond a doubt. “Yes!” said the voice. “Please listen! If you’d only be so good—I really wish you would!” The Prince Listens to a Curious Discourse
  • 28. I stood perfectly still in the roadway, and I know that my mouth hung open as I listened. The wasp buzzed into my ear a kind of rapid, droning song, so low that I had to strain my attention a little to catch it all, and these were the words I heard:
  • 29. “I know it’s rude to speak to you, it’s something I but seldom do, to speak before I’m spoken to, Or buttonhole a stranger; Excuse me if I do not pause to think just now of social laws, I can not spare the time, because I’m in the gravest danger; In gravest danger, yes, it’s true, I’m sure I don’t know what I’ll do, I’ll positively die if you Refuse me your assistance; Come, follow me without delay, I pray you do not say me nay, it’s life or death,—and anyway It’s scarcely any distance. “My lot is sad in the extreme, I really am not what I seem, I once was held in high esteem By every friend and neighbor: A man entirely free of guile, who lived but in his children’s smile, and kept them all in modest style By hard and patient labor, A man of pleasing manners who, whatever other men might do, spoke seldom unless spoken to, A practice much commended; My trade in such a way I plied upon the highway far and wide (I say it with a modest pride) I scarcely once offended. “It used to be my pleasant way (it always made my work seem play) to take the air from day to day,— Unless, of course,’twas raining,— Upon the road to watch and wait from early morn to rather late, but always coming home by eight (Such was my early training), I used to watch and wait, I say, and when a trav’ler came my way, which happened every other day Unless too cold or sunny, I never spoke a word not I I merely breathed a patient sigh
  • 30. I never spoke a word, not I, I merely breathed a patient sigh, and held my trusty blade on high And took from him his money. “’Twas thus I kept my children ten, a decent, worthy citizen, the happiest of mortal men My humble sphere adorning, The father of ten daughters fair who needed tons of clothes to wear, and that was why I took the air Upon the road each morning, But oh, alas for them and me, it’s over now, as you may see, and you are incontestably Our only hope remaining; And all our truly dreadful plight is just because one rainy night I simply for a moment quite Forgot my early training.
  • 31. “I held my trusty blade on high And took from him his money”
  • 32. “’Twas rainy and ’twas after eight, I knew that I was out too late, but when your trade’s in such a state You hardly know what cash is, You cannot stop because you get your feet all muddy, cold and wet, I knew I should be ill, and yet,— My children needed sashes. I shivered with the wet and cold, I counted twenty times all told I’d meant to have my shoes half-soled And still they’d not been cobbled, ‘I’ll certainly,’ I thought, ‘be sick,’—and then from out the darkness thick an ancient woman with a stick In fearsome silence hobbled. “She was an ancient, crooked crone, an ugly thing of skin and bone, she passed me silent as a stone (I thought it rather funny), But I could hear my children cry, ‘Oh, buy us ribbons, father, buy,’ and stopping her, my blade on high, I shouted, ‘Stand! Your money!’ Ah, that was just where I did make a most unfortunate mistake, for she with mirth began to shake (It made my blood run colder), And up she raised her crooked staff, she gave a most unearthly laugh, a thing I did not like by half, And touched me on the shoulder. “She stood, she looked me through and through, she said not even ‘How d’ye do,’ she merely gave a laugh or two, And munched her gums together: A witch, a sorceress of the wood! I nearly fainted where I stood, I really truly think you could Have felled me with a feather. A witch, as sure, as sure could be! You see what she has done to me! And all because I carelessly Forgot my early training. From which you learn this lesson true that it will never never
  • 33. From which you learn this lesson true, that it will never, never do to speak before you’re spoken to Or stay out when it’s raining.” The voice stopped, and the wasp flew off, directly before my nose, as if leading me away. “Why, dear me!” interrupted the Queen. “I believe this wasp was nothing more nor less than a Highwayman.” “What I don’t understand is,” said the King, “how a Highwayman could have learned to make up verses.” “In the Forest of Wen, your majesty,” said Solario, “the Highwaymen always talked in that fashion. It was their regular custom. I am told that no Highwayman could get his certificate until he had passed an examination in arithmetic, swordplay, and composition; and of course composition included verse making.” “Well,” said the King, “I don’t see what that had to do with making a good Highwayman of him; but then I don’t pretend to understand these notions about education. As far as I’m concerned, if I had to pass an examination in arithmetic in order to be a King, I’d simply have to look about for something else to do. I never could see the sense in teaching a King arithmetic, and I don’t see the sense in teaching a Highwayman how to make verses. I know it’s done in some places; it’s gotten to be quite the thing, I understand that perfectly well; but I don’t see any sense in it.” “My dear,” said the Queen, “you mustn’t forget that a Highwayman has to know a great deal more than a King. It’s so very much harder to be a good Highwayman. But I don’t think I should like to be married to one.” “This one was a widower, evidently,” said the King. “I know I shouldn’t like to be a widower with ten daughters on my hands. I don’t see how any human being could keep ten daughters in ribbons and—”
  • 34. “When Dorobel was little,” said the Queen, “I always had the most terrible time to make her remember that she mustn’t speak until she was spoken to. I don’t wonder the poor man forgot it, when he was so worried about sashes for his dear children,—and out so late at night, and in the rain, too!” “Why don’t you let the man go on with his story?” said the King. “We’ll never get to bed at this rate. Solario, be kind enough to proceed.” The wasp flew off (said the King of Wen), directly before my nose, as if leading me away; and I followed him down the road. We had gone about a mile, when the wasp turned off into the forest. I hesitated a moment, but I was curious to know what this unfortunate Highwayman intended, and I pushed on after him into a portion of the forest which was wilder and gloomier than any I had yet seen. The branches of the trees hung low, and the ground was thick with underbrush; I had to part the bushes and branches with my hands in order to get through. The wasp flew within a foot of my nose, and I kept on after him thus for more than half an hour. He seemed to know the way, but for my part I began to wonder whether I should ever be able to find my way back. Suddenly he flew off, and I saw him no more. The Prince, Alone in the Forest, Hears the Bark of a Dog I was at this moment in an uncommonly thick part of the forest. The trees were perhaps less close, but the underbrush was taller; so tall that I could not see through. I stopped for a moment, and listened. All was still. Not a bird twittered among the leaves overhead. I was vexed that I had allowed myself to be drawn upon such a wild-goose chase, and I decided that I had better begin to make my way back to the road; and as I was considering this, I heard the bark of a dog.
  • 35. It was a single, sharp bark, and it stopped abruptly, as if a hand had been clapped over the animal’s mouth. I listened again, but it came no more. “What should a dog be doing here?” I thought; and full of curiosity I pushed on through the underbrush in the direction of the sound. In a moment I had broken through the tanglewood, and I was standing at the edge of a clearing, in the midst of which was a little house. It was a very tiny house indeed,—not much more, in fact, than a hut. Its door was closed, and the window beside the door was barred with shutters. I listened intently, thinking to hear again the bark of a dog, but I heard nothing. Evidently the place was deserted. I crossed the open space before the door, and as I did so I noticed, clinging to the trunk and lower branches of a tree at the side of the clearing, what appeared to be a wasp’s nest; but an enormous wasp’s nest, big enough, in all conscience, to contain a man if need be; a wasp’s nest greater than I should have thought could exist in the world. I looked at it curiously, and coming nearer I saw, crawling over it, a number of wasps. I counted them, and there were eleven. They arose with one accord and flew in great agitation about my head; and at the same time I heard a voice from inside the wasp’s nest,—the voice of a human being, but not the one I had already heard; a voice much stronger and louder. I put my ear against the wasp’s nest, and from within came these words: “Don’t speak before you’re spoken to!” “Who is it?” I said. “Where are you?” “Beware the dog!” said the voice again. “But who—what—?” I began. The Prisoner Inside the Wasp’s Nest “I can’t get out! I’m imprisoned inside the wasp’s nest! Do as you’re bid, and don’t speak before you’re spoken to. Beware the dog!”
  • 36. At this moment I heard the click of a latch, and I turned round in time to see the door of the hut open. In the doorway was standing an old woman, and by her side a dog. She was a hideous old crone, wrinkled and bent, with little, beady eyes and a hooked nose and no teeth. She stood there munching her gums and blinking her eyes at me, and I noticed that she wore about her neck a string of what looked like ivory buttons, ten of them, white and flat. With her left hand she leaned on a crooked stick, and with her right hand she held, by a leather thong, the biggest and fiercest-looking dog I had ever seen in my life. His head came nearly to the old woman’s shoulder. He was chocolate brown in color, and his skin was entirely naked of hair, except for a patch of long wiry hair which fringed his neck. He bared his sharp, white teeth at me and growled. I felt decidedly uneasy. The eleven wasps were flying about my head in violent agitation. The old woman said nothing, but continued to blink at me and munch her gums. Suddenly the dog barked, and without a word the old woman flung the thong from her hand. The dog gave a bound toward me and crouched for a spring, growling and bristling. In another instant I knew that I would be torn to pieces. I started back and cried out in alarm. “Call him off!” I shouted. “Stop him! Call him off!” At these words, a groan came from inside the wasps’ nest. At the same time one of the eleven wasps, which were flying directly before my face, dropped to the ground at my feet as if dead. I realized that I had spoken before being spoken to, and one of the wasps—one of the Highwayman’s daughters, in fact,—had suffered for my error. But the worst consequence was now to come. The old woman shook her stick and danced up and down in hideous glee. “He’s spoken!” she cried. “Ha! ha! Spoken before he was spoken to! He’s done for himself now! At him, dog, he’s helpless! Seize him,
  • 37. dog, destroy him!” The Dog Leaps Upon Him to Devour Him Before I could turn, the dog was upon me. No man on earth could have stood up under such an attack. With one leap he was upon my breast, and bore me to the ground; and as I fell his sharp teeth sank into my shoulder, and I nearly fainted with pain and terror. “A hair of the dog that bit you!” It was the voice from within the wasp’s nest, and it was crying: “A hair of the dog that bit you!” My senses were slipping away, and I hardly knew what I did; but somehow or other I put my hand on the beast’s neck, and plucked from it a long hair; and as I did so the dog bounded away from me and stood cowering and quivering, as if in fear. “At him!” screamed the witch—for it was a witch, beyond a doubt; and she rushed upon the dog and began to beat him violently with her stick. “At him again!” she screamed, but to my amazement the dog turned upon her, snarling; and at that moment the voice came again from the wasp’s nest, and it cried: “A ring of the hair! Make a ring of the hair for your finger!” I sat up and quickly wound about my finger, in a ring, the hair which I had plucked from the dog’s neck. The effect of this was startling. The witch shrieked, plainly in terror, and sprang away from the dog; and the brute came to me and cringed before me on the ground and whined; and behold, all the pain was gone from my shoulder. “Command him to be himself again!” cried the voice from the wasp’s nest. “Be yourself again!” I cried, not knowing what I said. The Prince, Sitting on the Ground, Looks Up at a Genie
  • 38. Instantly, in the flash of an eye, the dog was gone; and in his place stood, towering above me full seven yards or more, a monstrous creature in the shape of a man, chocolate brown in color, baldheaded except for a fringe of long hair at the base of his skull, and bare except for a cloth twisted about his middle, in which hung a gleaming scimitar. It was a genie. He was panting with anger or some other strong emotion, and as he panted jets of fire shot forth from his nostrils. His mighty chest heaved, and I shrank back in alarm; but he spread out his hands and bowed low before me. I remembered the ring of hair on my finger, and grew bolder. The witch was creeping quietly away, stick in hand, toward the door of her hut; but as she reached it the genie stooped and caught her in his hand and held her fast. I sprang to my feet. “Set free your victims!” I cried to her. “The wasps and the prisoner inside the nest! Release them! or by the power of the genie’s hair, I will command him to destroy you!” She kicked and squirmed and shrieked, but all in vain. There was no escaping from that terrible grasp. She grew quiet, and began to mutter to herself. “I will count ten,” I cried, “and if at the tenth—” But she did not wait for me to count. With one look up at the genie’s face she waved her crooked stick in the air and began to pour out strange words, and then, giving a despairing cry, she let the stick fall to the ground; and as it touched the ground, there came from the wasp’s nest—I assure you it was an extraordinary sight—I scarcely know how to tell you, it all happened so quickly— The One-Armed Sorcerer Appears from Within the Wasp’s Nest Well, the wasp’s nest opened from top to bottom, and inside it was sitting a young man, who leaped down with a laugh and stood before me, bowing. I noticed that he had but one arm, the left; his
  • 39. eyes were blue, and his skin was fair and rosy; and he wore a long blue gown spangled with silver stars. The Highwayman and Nine of His Daughters Appear in Proper Person Almost at the same instant there were standing before me nine young maidens, all of extraordinary beauty; and in their midst an elderly man with a gray beard and a long thin face, and spindly legs. The nine maidens were gazing at an object on the ground, and the elderly man looked down at it also, and they all began to wring their hands together and moan. “Oh!” said the elderly man, sniffling,— “Just see what he has gone and done, he can’t deny it, he’s the one, he ought to hide his head where none Could ever look upon it, He knew, he did, he surely knew, I told him it would never do to speak before you’re spoken to, And now he’s gone and done it.” “I warned him,” said the one-armed young man, “but he was frightened, and he forgot.” “Oh, yes,” said the elderly man, wiping his tears away with the back of his hand,— “Oh, yes, it’s well enough to say it slipped his mind a bit to-day and in an absent sort of way He slew my darling daughter; But that will hardly, hardly do, I really can’t agree with you, it’s simply from my point of view A case of plain manslaughter.” “Oh, sister! sister!” cried the nine maidens. “Isn’t it terrible? It’s too terrible! It is terrible, isn’t it?”
  • 40. “Let me go!” screamed the witch, struggling in the hand of the genie. He Sees the Highwayman’s Tenth Daughter I pushed into the group around the elderly Highwayman, and there at his feet I saw what made my heart stand still with grief and remorse. On the ground was lying a maiden, far lovelier than any of the others; and she was dead. Her eyes were closed, her face was pale, she did not breathe; and her hair lay about her like a shower of gold. Alas, that my carelessness had brought her to this sorrowful end! If she had only lived! How I should have rejoiced to be her friend, and in the course of time, perhaps, persuade her to smile upon me—Alas! alas! At that moment, if she could but have cast one look upon me, I would have laid at her feet all that I— I knelt beside her and took her cold hand in mine. I stooped over her, and in an excess of pity, and of more, far more than pity, I kissed her softly on the lips. Oh, wonderful! Her eyelids quivered. A faint flush came into her cheeks. Her eyes opened, and she looked straight into my own. She smiled, and it was like the evening sky after rain. I put my arm beneath her shoulder, and helped her to stand up. She rubbed her eyes and swayed a little, and I kept my arm about her. We gazed at each other, smiling. “Is it—?” said she. “It is, beloved!” I cried, and folded her, unresisting, to my heart. “Oh, isn’t it just too perfectly sweet?” cried her nine sisters, clapping their hands and laughing merrily, all together. “It is sweet, isn’t it? It’s love at first sight! It’s just the sweetest thing ever! Isn’t it just too sweet for anything, though?” But while they were still running on in this fashion, and the elderly Highwayman was cheering faintly and the one-armed young man was cheering lustily, a loud roar came from the genie, and we saw
  • 41. that the witch had slipped from his grasp and was even now dashing in at the door of the hut. She shut it behind her with a bang, and the one-armed youth pounded against it in vain. “The stolen hair!” he cried. “The genie’s hair which she stole from me! I must get it back! Don’t let her get away!” The Genie Breathes Fire Upon the Witch’s Hut The genie opened his great mouth and roared with anger; then he stooped down over the hut, and I saw that he was breathing fire upon the roof from his nostrils; and as the sparks caught in the dry thatch, he began to walk around the hut, bending and breathing fire upon its roof from place to place. In a few moments it was ablaze from end to end; the walls caught; and as I held my fair lady trembling close beside me, the house arose in flames, crackling and roaring, and showering sparks upward into the twilight sky. “Oh!” said my fair one, clinging to my arm. “The poor witch! Save her! She will be burned to death!” But the genie’s thunderous laugh was her only answer. We watched until the fire was out, and there remained only a heap of smoking ashes; and the witch was gone. “Oh, the poor thing!” said my beautiful lady. “Isn’t it terrible?” said her nine sisters, among themselves. “It’s just too terrible for anything! It is terrible, isn’t it? It’s simply terrible, it is, isn’t it?” The one-armed youth stepped up to the ruin and appeared to be looking among the ashes near what was once the door. He looked for a long time, and then he suddenly straightened up and cried, “Ah!” He came toward us, and he was holding up in his hand what seemed to be a necklace.
  • 42. “See!” he said, and I saw that it was a string of buttons, of large flat buttons, eleven of them, threaded on what seemed to be a hair; the same I had seen about the witch’s neck. “It is the genie’s hair,” said the young man, “the same that she stole from me; and it was this hair which gave her power to turn my genie to a dog and imprison me in the wasp’s nest. Now let me see these buttons; I must look at them with care.” He examined each one minutely; and when he had examined them all, he placed his finger on his lips and smiled knowingly; and while I held the hair he broke it and slipped off the eleventh button, inviting me to look at it closely. I looked and saw upon it, near the rim, a crooked black line, much like the imprint of a tiny, crooked stick. The One-Armed Sorcerer Performs Upon a Button He threw the button upon the ground, laughing, and took from within his gown a leather pouch, from which he sprinkled upon the button a black powder; and then he began to speak, in a loud voice, words which I could not understand, in the midst of which he picked up the button, now crusted with black; and still repeating his strange words, he swung his arm, and with a loud cry flung the button into the branches of the nearest tree; and there, hanging on to a branch of the tree, trying desperately to keep from toppling off, was the old witch herself. Instantly the young man took the threaded buttons from me and slipped them off the hair; he wound the hair about his finger and cried,— “Off with her! Off with her to the Forest Kingdom, far from here, and see that she never comes back again! Off with her, I say, to the Kingdom of the Great Forest!” At these words the genie strode over to the witch and— “Well, bless my soul,” interposed the King, “what business did he have to send that witch here, I’d like to know? So that’s how she
  • 43. came to live in my Forest! A fine piece of work, I must say! A pretty how-d’ye-do, to send their cast-off witches over here! What business had he to—” “Never mind, grandfather” said Bojohn, “do let him go on with his story.” “A fine piece of work!” said the King. “Of all the high-handed, brazen-faced—” “My dear!” said the Queen. The genie strode over to the witch in three steps and plucked her down with one hand. He then tucked her under his arm like a sack of corn, and stood before the one-armed youth. “Stoop down!” said the young man. The genie bowed low, and the young man, to my surprise, reached up and pulled from the back of his head, at the neck, ten long hairs, one by one. “Away!” cried the one-armed youth. The Genie Flies Away With the Witch The genie stood up, and opening his great mouth in a silent laugh, stamped upon the earth so that it shook, and leaped straight up. He rose in the air in a wide curve; and before we could blink again he was gone like an arrow over the treetops, with the witch under his arm, and was no more than a speck in the evening sky. The young man tucked the ten hairs away inside his gown. “Now,” said he, “she’s gone. And good riddance, too, I should say.” “Sir,” said I to him, “will you tell us who you are, and what brings you here?” “I am a sorcerer,” said he, “and I dwell in an island far out in the Great Sea. I am known there as the One-Armed Sorcerer. I came
  • 44. here, with the genie whom I command by virtue of a ring of his hair, in order to prove my skill against the witch. I undertook to release our good friend the Highwayman and his ten fair daughters, but I am bound to say that I managed it badly; so badly that the witch got the genie’s hair away from me, and by means of that hair turned him into a dog and shut me up inside the wasp’s nest. And all because I didn’t know the rule, that you mustn’t speak before you’re spoken to.” “A pretty good rule,” said I, “but if everybody observed it, who would ever talk?” “Well, anyway,” said the One-Armed Sorcerer, “here I have ten buttons, and here I have ten threads from the genie’s head. I propose to make you a doublet, sir; a magic doublet; and for the cloth, the wasp’s nest will be the very thing. It will be a doublet worth having; and to you, sir, who have so nobly preserved us all, I will present it on—er—ahem!—on your wedding day.” “Hurrah!” piped up the elderly Highwayman, and the lady on my arm blushed. “Oh, isn’t that sweet of him?” cried her nine sisters. “Isn’t it just too sweet for anything? It’s really the sweetest thing, now isn’t it? Too perfectly sweet for words, it is, really!” The One-Armed Sorcerer, stepping over to the wasp’s nest, pulled it down from the tree without breaking it, and slung it on his back. “Come with me!” I cried. “You shall all return with me to my father’s castle. Will you consent to that?” “Well,” said the elderly Highwayman,— “Though anxious to accommodate, I fear it’s growing rather late, I seldom stay out after eight—” “Oh, father!” cried his daughters, nine of them, together, “it would be perfectly jolly!” “It would suit me to perfection,” said the One-Armed Sorcerer.
  • 45. “Oh, won’t it be jolly? It will be jolly, won’t it? Wouldn’t it be perfectly jolly?” cried the nine young damsels, clapping their hands. “Will you come home with me?” I whispered to the fairest of the ten, who had said nothing. “If you wish it,” she whispered, blushing again. “Oh, aren’t they just the dearest things?” cried her nine sisters. “It’s love at first sight—oh, the dear things! Aren’t they just simply too dear for anything? They are perfectly dear, now, aren’t they? Really now, aren’t they just too perfectly dear?” The Prince Leads His Beloved Home Well, the long and the short of it is, we reached my father’s castle late that night, under a starry sky. The attendants whom I had left in the forest had returned without me, and the castle was a-twitter with anxiety. But when I led my fair lady into the great hall and presented her to my father, the King, and her nine sisters and the elderly Highwayman and the One-Armed Sorcerer stood bowing behind us, there was joy, I can tell you, and the rafters rang again. My father, after a long look at the beautiful damsel at my side, and then at me, gave a long, slow whistle, without making a sound, and stooped and kissed her on both cheeks, nudging me with his elbow at the same time. A cheer went up again, and my father took me aside and whispered in my ear. “You rascal,” said he, “I never thought you had it in you to— Really! You don’t say so! You astonish me! A Highwayman’s daughter! Well, well, think of that! Very original of you, my son; I’m sure I never would have thought of such a thing at your age. She’s got a fine eye, my boy; there’s a look in it I’ve seen in your mother’s eye; a will of her own, you can’t fool me about that look,—yes, yes, very beautiful,—but a will of her own, remember I told you. A Highwayman’s daughter! That’s good. Highly original. Well, well, it
  • 46. might have been the Hangman’s daughter—but remember what I told you about that look in the eye, I’ve seen it before,—your mother used to—but she’s certainly beautiful all the same—when does the wedding come off?” The Magic Doublet Is Presented at the Wedding We were married on the morning of the third day. Such feasting, such dancing, such merriment,—and gifts innumerable; but the best gift of all was a doublet, made with his left hand by the One-Armed Sorcerer from the skin of the witch’s wasp’s nest, fastened by the witch’s ten buttons sewed on with the genie’s hair; a doublet to preserve the wearer from all harm. And this, as the wedding dinner was nearing its end, the One-Armed Sorcerer, rising in his place, presented to me with a pretty speech, for which I thanked him. “Sir,” said my father, addressing the One-Armed Sorcerer, “I invite you to remain with me at my court, to instruct my son in the mystery of handling a wife. Nobody but a sorcerer should undertake such a job. Will you try it?” “Alas, your majesty,” said the One-Armed Sorcerer, “it is far beyond my powers. And besides, I must return to my island home, on pressing business.” “Very well, then,” said my father. He took my bride’s hand in his and patted it, while she looked down in confusion. “My dear,” said he to her, “you must persuade your sisters to remain here with us. And as for your father, I design to appoint him Lord Treasurer of my kingdom. I think a Highwayman ought to be a good man to take charge of my money. Will you persuade him to accept that office?” “Oh!” cried the nine sisters, without giving my bride a chance to speak. “That would be jolly! Oh, wouldn’t it be jolly? It will be just too perfectly jolly for anything, won’t it? But really, though, won’t it be jolly? Just too simply, perfectly, adorably jolly!”
  • 47. “Your majesty,” said my father-in-law the Highwayman, rising up on his elderly legs,—
  • 48. “Although I am not confident that I’m entirely competent, I thank you for the compliment, I thank you most sincerely; I fear I am not very quick in matters of arithmetic, but often when the answers stick I get them,—very nearly; And if at first I don’t succeed I try again, although indeed I cannot say I always heed Each wretched little fraction; And anyway you must agree if one but knows his Rule of Three there’s hardly any need to be Acquainted with subtraction. “I do not wish to seem to boast, of all things I detest it most, and yet I think I’d fill the post Not very ill, not very: From early youth I did betray, I’ve often heard my mother say, a really rather taking way In matters monetary; A simple little rule or two I always try to keep in view, to do what I am told to do, And always speak politely, And never make a saucy joke behind the backs of other folk, a rule which I have seldom broke, If I remember rightly. “My motto is a simple one, that happiness depends upon the consciousness of duty done (Unless it’s too unpleasant), I value virtue more than wit, and as for riches, I admit I do not value them a bit (At least, not just at present), I think, however, I should state, that though I don’t mind working late, I like to be at home by eight, When supper’s on the table;
  • 49. When supper s on the table; And thus, in words of simple art, I thank you, Sir, with all my heart, and promise I will do my part (At least, as far as able).”
  • 50. TRANSCRIBER’S NOTE: Obvious typographical errors have been corrected.
  • 51. *** END OF THE PROJECT GUTENBERG EBOOK SOLARIO THE TAILOR: HIS TALES OF THE MAGIC DOUBLET *** Updated editions will replace the previous one—the old editions will be renamed. Creating the works from print editions not protected by U.S. copyright law means that no one owns a United States copyright in these works, so the Foundation (and you!) can copy and distribute it in the United States without permission and without paying copyright royalties. Special rules, set forth in the General Terms of Use part of this license, apply to copying and distributing Project Gutenberg™ electronic works to protect the PROJECT GUTENBERG™ concept and trademark. Project Gutenberg is a registered trademark, and may not be used if you charge for an eBook, except by following the terms of the trademark license, including paying royalties for use of the Project Gutenberg trademark. If you do not charge anything for copies of this eBook, complying with the trademark license is very easy. You may use this eBook for nearly any purpose such as creation of derivative works, reports, performances and research. Project Gutenberg eBooks may be modified and printed and given away—you may do practically ANYTHING in the United States with eBooks not protected by U.S. copyright law. Redistribution is subject to the trademark license, especially commercial redistribution. START: FULL LICENSE
  • 52. THE FULL PROJECT GUTENBERG LICENSE
  • 53. PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK To protect the Project Gutenberg™ mission of promoting the free distribution of electronic works, by using or distributing this work (or any other work associated in any way with the phrase “Project Gutenberg”), you agree to comply with all the terms of the Full Project Gutenberg™ License available with this file or online at www.gutenberg.org/license. Section 1. General Terms of Use and Redistributing Project Gutenberg™ electronic works 1.A. By reading or using any part of this Project Gutenberg™ electronic work, you indicate that you have read, understand, agree to and accept all the terms of this license and intellectual property (trademark/copyright) agreement. If you do not agree to abide by all the terms of this agreement, you must cease using and return or destroy all copies of Project Gutenberg™ electronic works in your possession. If you paid a fee for obtaining a copy of or access to a Project Gutenberg™ electronic work and you do not agree to be bound by the terms of this agreement, you may obtain a refund from the person or entity to whom you paid the fee as set forth in paragraph 1.E.8. 1.B. “Project Gutenberg” is a registered trademark. It may only be used on or associated in any way with an electronic work by people who agree to be bound by the terms of this agreement. There are a few things that you can do with most Project Gutenberg™ electronic works even without complying with the full terms of this agreement. See paragraph 1.C below. There are a lot of things you can do with Project Gutenberg™ electronic works if you follow the terms of this agreement and help preserve free future access to Project Gutenberg™ electronic works. See paragraph 1.E below.
  • 54. 1.C. The Project Gutenberg Literary Archive Foundation (“the Foundation” or PGLAF), owns a compilation copyright in the collection of Project Gutenberg™ electronic works. Nearly all the individual works in the collection are in the public domain in the United States. If an individual work is unprotected by copyright law in the United States and you are located in the United States, we do not claim a right to prevent you from copying, distributing, performing, displaying or creating derivative works based on the work as long as all references to Project Gutenberg are removed. Of course, we hope that you will support the Project Gutenberg™ mission of promoting free access to electronic works by freely sharing Project Gutenberg™ works in compliance with the terms of this agreement for keeping the Project Gutenberg™ name associated with the work. You can easily comply with the terms of this agreement by keeping this work in the same format with its attached full Project Gutenberg™ License when you share it without charge with others. 1.D. The copyright laws of the place where you are located also govern what you can do with this work. Copyright laws in most countries are in a constant state of change. If you are outside the United States, check the laws of your country in addition to the terms of this agreement before downloading, copying, displaying, performing, distributing or creating derivative works based on this work or any other Project Gutenberg™ work. The Foundation makes no representations concerning the copyright status of any work in any country other than the United States. 1.E. Unless you have removed all references to Project Gutenberg: 1.E.1. The following sentence, with active links to, or other immediate access to, the full Project Gutenberg™ License must appear prominently whenever any copy of a Project Gutenberg™ work (any work on which the phrase “Project
  • 55. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookultra.com