T2.0 Background and Motivation
History of LSD and ADM
LSD notation
cf user-interface designer not abstract formal specification
Aim to represent
ie complex specifications for systems can only be constructed by
building and experimenting on components
cf mimicing the global behaviour of a system without explicitly modelling
the relationship between its component parts: cf formal specification,
statistical simulation tools, naive physics
The LSD specification of an agent comprises 4 kinds of variable:
oracle - a variable to which it responds
state - a variable that it owns
handle - a variable conditionally under its control
derivate - an indivisibly coupled stimulus-response relation
+protocol = list of privileges of the form
enabling condition -> sequence of actions
LSD simulation is from a set of instances of specified agents
each action eitherchanges a parameter
or
invokes / deletes an agent instance
agent sm() { // The station master:
state (time) tarrive = |Time|, // registers time of arrival
(bool) can_move = false, // determines whether driver can start engineoracle (time) Limit, Time, // knows the time to elapse before departure due(bool) whistle = false, // controls the whistle
(bool) whistled = false; // remembers whether he has blown the whistle
(bool) sm_flag = false, // controls the flag
(bool) sm_raised_flag = false // remembers whether he has raised the flag
(bool) guard_raised_flag, // knows whether the guard has raised his flaghandle (bool) can_move, whistle, whistled, sm_flag, sm_raised_flag,(bool) driver_ready, // knows the driver is ready
(bool) around[d] (d = 1 .. number_of_doors), // knows whether there's anybody around doorway
(bool) door_open[d] (d = 1 .. number_of_doors) // the doors status
(bool) door_open[d] (d = 1 .. number_of_doors) // partially controls the doorsderivate (bool) ready = ^ (! door_open[d]) | d = 1 .. number_of_doors), // monitors whether all doors are shut
(bool) timeout = (Time - tarrive) > Limit; // monitors whether departure dueprotocol
door_open[d] ^ around[d] -> door_open[d] = false, (d = 1 .. number_of_doors)}ready ^ timeout ^ ! whistled -> whistle = true; whistled = true; guard(); whistle = false,
ready ^ whistled ^ ! sm_raised_flag -> sm_flag = true; sm_raised_flag = true,
sm_flag ^ guard_raised_flag -> sm_flag = false,
ready ^ guard_raised_flag ^ driver_ready ^ engaged ^ ! can_move -> can_move = true
Terminology: illustrated by the VCCS LSD specification
"variable" neutral term for oracles, states, handles and derivates:
same identifier may appear in many agent specifications:
all observations by different agents of the same
thing i.e. of one observable
e.g. observables subject to different modes of observation
measSpeed
state for speed_transducer
oracle for throttle_manager
oracle for the driver
cruiseStts
state for cruise_cutoutoracle, state, handle, derivate characterisation <-> status of the observable with respect to the agent
oracle for the driver
oracle for the throttle_manager.
v-observation = observation of observable with identifier v
In simulation - in general:
identifier instances <--> different variablessystem designer identifies observables in LSD specification
<--> what would record and subject to experiment to relate
(pre-act-of-faith) behaviour of the systemto(post-act-of-faith) reliable activity of the components
Classification of variables associated with an agent
states
= observables associated with an agent that would disappear were the agent instance to disappear
e.g. accel, windF, actSpeed, .... states of vehicle agent
A state variable v is the primary source of all v-observations:
at any time, all v-observations correspond to ≤1 state variable.
state variable v = "authentic value" of v-observations
ie variable may be an oracle and a state to the same agentObserver and actor agents tend to have few state variables
eg "Time as recorded by my watch", or "my bank balance".
e.g. no state variables associated with driver agent in VCCS
consts
Constants =state variable, value not subject to changeIn the VCCS as implemented, could vary some "constants" e.g.
e.g. the physical parameters of the vehicle: mass, windK, rollK.
to take account of loading the vehicle
to relate the wind resistance to the vehicle profile
In anthropomorphic terms:an oracle = value as perceived by an agent.NB no guarantee that its value is accurate.an oracle is not simply an input
e.g. actSpeed is state in vehicle though used by a derivate
cf in the privilege
!door_locked and !door_open -> door_open = truedoor is locked not referenced as an oracle to the door useWhether the door can be opened or not
- independent of perception of whether it is or isn't locked
- the effect of locking the door isn't subject to delay.
handles
handle = parameter agent can manipulate subject to certain enabling conditions being meta handle of an agent is not necessarily bound to the agent
v-handle and v-oracle co-exist => agent communication
NB need assumptions about communication for animation
e.g, the VCCS specification does not specify how vehicle speed,
as measured by the speed_transducer, is communicated to the throttle_manager
In animation:
might assume idealised communication might refine the specification of the communication channel
protocols
agent acts subject to enabling conditions
e.g. if engine switched off, the driver can switch on, and v.v.
No fixed set of rules to interpret agent protocols operationally
Considerations include:
privileges are not obligations to act
e.g. in driver protocol; when the cruise controller switched on: driver canswitch it offrequest it to maintain the vehicle
either at the specified cruise speedreset the specified cruise speed.
or at the current measured speed
e.g. cruise controller cuts out once the driver touches the brake
e.g. driver doesn't switch cruise controller on and off frantically
What the LSD specification addresses:
handle parameter that can be changedoracle parameter that can be observed
derivate perceived dependency between observables
Hooke's Law
change load (handle) and observe extension (oracle)States and protocols have a more controversial role e.g.
protocol may express a sequence of steps in experiment? Scientific experiment not concerned with subjective observation
state may represent characteristic of the experimentor
Many distinctions to be made between kinds of experiment
Use experimentation for developing conviction, skills, instruments
e.g. timeless (Hooke's Law) vs time-based
cf analogue variables, clocks and events
More about behaviour
Behaviour is a concept that presumes an objective observer
Engineer postulates simultaneous values for all observables but can't in general simultaneously observe
LSD doesn't define an unambiguous behaviour for a system.
Issues for animation, even when presuming an objective stance
e.g. Stationmaster illustrates
derivate as an indivisible relationship as perceived by an agent
BUTdefinition in animation <-> objective FD and synchronisationderivate as an indivisible relationship as perceived by an agent
NOT the same as a definition in animation from an LSD specification
Illustrative example
Spreadsheet user updates though cells yet to be made consistent
if o1 is displayed value of cell1 and o2 is displayed value of cell2
then the relation o2 = f(o1) is guaranteed only when up-to-date
o2 is oracle to user to be observed after awaiting update
cf protocol for an experimental observation
Hence spreadsheet user perceives definitive relationships
that aren't universally valid in the view of the objective observer
oracle assumes subtle conventions re communication/observation
User continues to enter data whilst the spreadsheet is still updating
on premise that no other agent can interrupt the updating process
Indivisible may not mean synchronised in time but not interruptable
T2.3. Other Illustrative Examples
VCCSRailway Station Animation
Digital Watch
Electronic Catflap
Telephone