Lecture M1: Overview and Introduction

Overview of the course

The course is based on 4 parallel streams of activity:

     Case studies, to include:

          Vehicle Cruise Controller Simulation (VCCS)

          Railway Station Animation

          Digital Watch Simulation

     Tutorial Introduction to Software Tools

     Practical exercises, based on a railway simulation theme

     Seminars

Timetable & Introductions

Nature of the assignments for the course: see Coursework

Sources:

     - papers

          [B92] and references therein

          Booch, Deutsch, Backus, Harel, Cantwell-Smith, Baldwin

     - books

          William James, Lamb, Davis

     - software

          public files in the ~wmb/public directory [demos & projects]

          sources for the translators and interpreters

     - documentation

          eden and scout, theses

          online documentation is accessible at  http://www.dcs.warwick.ac.uk/modelling/

     - video concerned with railway signalling

Orientation:

There are several aspects to studying Empirical Modelling for concurrent systems.  There are principles and techniques to be understood and applied.  This is best done through studying models and the papers that have been written about them.   There are papers specifically concerned with the VCCS, the digital watch, the billiards and OXO models, the sailboat, jugs etc that introduce the basic concepts applied in model building, and discuss their practical implications.  From the beginning, it is useful to develop an elementary knowledge of how to use the modelling tools and gain some personal experience of constructing simple models.  To complement this practical experience of Empirical Modelling, it is helpful to read papers and books concerned with the problems of integrating the scientific, human and social perspectives that are encountered in modern applications of computing in areas such as requirements modelling, AI and software development.  These include a number of papers that address these issues from an Empirical Modelling standpoint.

This course combines all the elements discussed above.   An overall impression of the course content can be obtained by consulting a typical timetable for the course, and reading the course summary.

Begin by looking at VCCS: use this as a convenient place from which to explore abstract issues (what are we doing? and why are we doing it?) and practical concerns (how do we construct our models? and what tools have we developed for the purpose?). Seminars and analysis of case studies address abstract issues; description of tools, illustrations and exercises address practical aspects.

Case study of VCCS intermediate between top-down and bottom-up perspectives:

     top-down      why?      motivation/issues        seminars

     bottom-up     how?     tools/techniques          lectures/tutorials

There is a gap between these two perspectives. Some issues we can't address adequately with our current tools, some of our practical work raises issues that are hard to slot into the whole picture. Aim of the course is to supply a framework for the study of Empirical Modelling for concurrent systems.

Caveat: this course is not primarily directed towards issues of parallel programming or a mathematical theory of concurrency. The underlying theme of this module is that the problems of general-purpose parallel programming are deeply bound up with fundamental issues and concepts in concurrent systems modelling in the large. What is more, these issues cannot be satisfactorily addressed in the traditional mathematical manner of "abstracting away from the application". Our subject matter is the relationship between form and content, and content involves real-world illustrations. Hence the electronic cat-flap, the railway station animation, the room layout, the cricket simulation etc. Understanding these examples leads to a new perspective on concurrent systems in general and on parallel programming in particular.

M1.1. Introduction to the Vehicle Cruise Control Simulation (VCCS)

Software case study initially proposed by Booch [Booch] and further studied by Deutsch [Deutsch]. Our version developed by Ian Bridge and Simon Yung [BBY]. Available in ~wmb/public/demos/cruise. Uses family of Eden files referenced by main.e, and visualisation and interface file cruise.s.

Two ways to view. Animation of requirements for reactive system. Exercise in engineering design and simulation.

Animation involves:

-     identifying state-changing agents in the VCCS

-     describing their roles

-     creating an interface that allows the designer to play the role of the driver, simulating operation of brake, accelerator and cruise controller

Construct and animate a model of the concurrent action of the agents.

Components of the animation display ....

-     vehicle, with forces acting on it

-     speedometer

-     cruise control interface

-     brake and accelerator

-     position of vehicle on road

-     clock, displaying time elapsed in simulation

-     internal throttle position, indicating effects of use of accelerator and action of the automatic throttle
 
 

Functions performed in the simulation -     dynamic model of the vehicle, based on environmental forces and power output of the engine

-     controller with simple feedback mechanism

-     switches and buttons for the driver to operate
 
 

More significant than what simulation does is how it is defined:

-     simulation was developed incrementally

-     dynamic model and visualisation were independently developed

-     designer can make further changes easily

-     model has explanatory power, allowing designer to explore the roles of the component agents and the way in which they interact.

Key idea: modelling that is based upon observation and experiment.
 

M1.2. Nature and structure of the VCCS specification

Prototyping in VCCS is based on tkeden: an interpreter comprising several software tools that have been developed at Warwick, including:

     eden         an evaluator / engine for definitive notations [YWY]

     donald     a definitive notation for line-drawing

     scout         a definitive notation for text and window layout [YPY]

eden is an interpreter for a general-purpose programming language.

donald and scout are translators that act as preprocessors for eden.

Note: The latest versions of tkeden incorporate sasami, a definitive notation for 3D geometric modelling based on openGL, and also support the interactive introduction of additional notations, of which eddi, a definitive notation for manipulating relational tables is one example.  The principal features of tkeden are briefly reviewed in the first tutorial.

A definitive notation is a simple formal language in which to formulate scripts of definitions of the form:

     variable = function of other variables and constants.

[We use the term definition in a technical sense to be clarified in the course, and use (abuse?) the term definitive to mean "definition-based".]

Definitive notations are distinguished by the types of the variables on the LHS, and the operators that can occur on the RHS. The values of the variables typically correspond to observable quantities. E.g. donald variables define points and lines in the plane, and a donald script defines a 2d line-drawing. A definitive script is viewed as defining a state: to change the state, we typically redefine a variable in the script, or else introduce a new definition (see illustration in section 1.3 below).

The implementation of definitive notations within tkeden implicitly uses a UNIX pipeline, as in:

 
     cat <inputfile> | donald | eden -n
It is conceptually helpful to regard the donald and scout translators as agents that pass their input through to eden suitably transformed.  The eden code that results from this translation generally comprises definitions (the "internal representations" of donald and scout entities) together with additional actions (to maintain the external representations of donald and scout entities).  In the cruise.s file, scout, donald and eden definitions are differentiated via the %scout, %donald and %eden annotations.   It is possible, and to some extent necessary, to interact with models both by introducing definitions in donald and scout, and by subsequently modifying the eden code generated by translating these definitions.

The tkeden interpreter combines scout, donald and eden by using a tk/tcl interface. It is the preferred interpreter to use for practical work.  When textual input-output is sufficient, pure eden input can be interpreted using a command line version of the eden interpreter, ttyeden. The pipeline approach can still be used in conjunction with ttyeden, and may be required when interfacing our tools with other system utilities. It also allows access to other experimental definitive notations (such as ARCA and CADNO) and is useful when developing new definitive notations.

For examples of scout and donald extracts from the script, see the script for the speedometer window and its contents in the Appendix.
 

M1.3. Concepts behind the development of the VCCS

There are several ingredients in the development of an animation:

-     analysis of the application to identify the participating agents

-     identification of the observables needed to specify the interaction between the family of agents

-     representation of the role of agents using definitive scripts to describe the way in which changes to observables are indivisibly linked

-     animation of observables and agent interactions within a computer model by visualisation and interface creation.
 

The concept behind the modelling technique resembles conventional engineering: perform experiments on components in isolation, observing how they respond; on this basis, predict how the entire system will behave when all components are combined. The computer model that is constructed in VCCS can be viewed as analogous to the experimental apparatus and measuring instruments that make observables accessible to the experimentor. David Harel's observation concerning the importance of visualisation in comprehending the state of complex systems is relevant here [Harel].

The principal techniques used in Empirical Modeling are

agent-oriented modelling + definitive representation of state.
The agent-oriented modelling process makes use of a special-purpose notation LSD in which to represent the interfaces between agents. Definitive representation of state is expressed via scout, donald and eden definitions. The end-result is an eden program, but conceptually the design is largely specified at a higher-level of abstraction.

The LSD specification in the Appendix is animated in main.e and associated files. This describes the dynamic model of the vehicle.

The screen display is described by the scout and donald scripts in cruise.s.

These enable the designer to inspect the state of the interface as seen by the driver as well as the behaviour of the cruise controller and the state of the dynamic model.

There is an important distinction between the VCCS specification and a logical model of the circumscribed behaviour of the system. The VCCS specification is not made up of universally valid statements about the entire state-space of the simulation. Instead it is (to some approximation) a representation of a particular state - resembling a set of experimental observations - that incorporates information about the expected effect of changing a parameter in the experiment. This reflects a fundamental distinction between incomplete and uncertain knowledge that is being acquired through experiment and comprehensive and reliable knowledge that has been acquired from experiment.
 

M1.4. Use and Development of the VCCS Script

We  use the term "observable" to refer to any value in a physical system being modelled that can be measured by some appropriate experiment. The designer has total knowledge of the state of the system in terms of all such observables, and can consider the implications of changing parameters associated with observables. For instance: change sampling rate of speed transducer, modify the layout of the speedometer, or the mode of visualisation etc. In principle, the designer can treat every observable as a parameter, but in practice it doesn't make much sense to do so. For example, we don't usually change the force of gravity, or make the length of the vehicle inversely proportional to its speed.

The definitive script for VCCS is a record of all these observables, as represented by variables in the script. Redefinition of a variable is the activity that corresponds to "changing a parameter". In principle, any redefinition is interpretable insofar as it assigns new values to variables recorded in the script, but only certain redefinitions are meaningful.

The VCCS script is a means to express many different views of the vehicle cruise control system. When we refer to the state of the system, we generally have the comprehensive set of observables conceived by the designer (the "global state") in mind. The concept of state is much more subtle than even this suggests. State is to be understood relative to a particular agent and to the context for observation. For instance, by the state of the screen display a designer might be referring only to those aspects of the display that concern layout of the windows and form of the graphical objects. The relevant observables in this context are the scout and donald definitions in cruise.s. On the other hand, the simulation can be observed over time, and the state described in terms of how variables change over time. In this context, the model is enriched by consideration of the analogue variables represented continuously changing quantities, such as the speed and position of the vehicle.

A characteristic set of observables associated with each agent determines the state of the system relative to that agent. The actions of an agent are associated with privileges to change certain parameters. These are modelled by redefinitions.

The actions of agents affect the global state of the system in ways that are modelled by redefinition in the VCCS script. Illustrations:

How the speedometer script is to be interpreted: the designer agent.
How forces act in the model: have persistent definition

accel = f(accel')where accel' = "previous value" of accel

hence redefinition t = t'+1  leads to automatic update of approximate acceleration.

Driver operates buttons, applies brake.
 
 

Plan of module:  

VCCS => agent-oriented modelling + definitive representations of state


                  agent-oriented modelling                              definitive representations of state

M                                                                                                         EDEN     DoNaLD-EDEN

T                                  LSD                                                              SCOUT-DoNaLD-EDEN

W                                 LSD

Th                                 ADM

                             LSD-ADM-EDEN

Progression of subjects: agentification, visualisation and animation.

General philosophy of the module in respect of concurrent systems: concurrency is created in the mind of an observer. To understand the process of developing a theory of concurrent systems, it is essential to trace its empirically-based evolution from commonsense concurrency. And in respect of programming: most of contemporary programming culture has been shaped by sequential programming and batch programming on VN machines. To find a generalisation that embraces this view and might accommodate general-purpose parallel programming, need to move out of the current framework, then return with a new vision of the subject.

Progression of perspectives: interfaces, modelling, agents, programming

Overall orientation towards open development rather than a closed world view of engineering in the sense introduced by Brödner. The modelling methods we are developing are intended to redress the balance between empirical and theoretical ingredients in engineering. The empirical roots of our approach have general relevance to the development of skills, theories and instruments.

References

B92     New Paths for Programming in Theory and Practice

               informal paper prepared for IBM WSDL, September 1992

All subsequent references to papers associated with research on definitive methods at Warwick etc are fully referenced in the Appendix to [B92]. BBY      Agent-oriented Modelling for a Vehicle Cruise Control System

Booch     Object-oriented Development

Deutsch     Enhancing Testability with Scenario-Oriented Engineering

Harel          On Visual Formalisms

Brödner     The Two Cultures in Engineering in Skill, Technology and Enlightenment, Springer-Verlag 1995, 249-260

YWY     EDEN Handbook

YPY     Scout Technical Document