chapter 17
models of the system
Models of the System
types of system model
specific
system
generic
issues
Relationship with dialogue
Irony
standard formalisms
general computing notations
to specify a particular system
standard formalisms
Uses of SE formal notations
model-based methods
model-based methods
Mathematics and programs
running example …
define your own types
Point == Nat × Nat
shape: {line, ellipse, rectangle}
x, y: Point – position of centre
wid: Nat
ht: Nat – size of shape
Shape ==
… yet another type definition
A collection of graphic objects can be identified by a ‘lookup dictionary’
use them to define state
shapes: Shape_Dict
selection: set Id – selected objects
invariants and initial state
selection ⊆ dom shapes
– selection must consist of valid objects
invariants – conditions that are always be true
– must be preserved by every operation
dom shapes = {} – no objects
selection = {} – selection is empty
initial state – how the system starts!
Defining operations
selection' = {} – new selection is empty
shapes' = shapes – but nothing else changes
unselect:
… another operation
dom shapes' = dom shapes – selection
– remove selected objects
∀ id ∈ dom shapes'
shapes' (id) = shapes(id)
– remaining objects unchanged
selection' = {} – new selection is empty
delete:
note again use of primed variables for ‘new’ state
display/presentation
Shape_Type
highlight: Bool
Visible_Shape_Type =
display:
vis_objects: set Visible_Shape_Type
vis_objects =
{ ( objects(id), sel(id) ) | id ∈ dom objects }
where sel(id ) = id ∈ selection
Interface issues
Algebraic notations
Return to graphics example
Issues for algebraic notations
Extended logics
Temporal logics
¬
¬
Explicit time
Deontic logics
Issues for extended logics
interaction models
PIE model
defining properties
undo
Interaction models
the PIE model
‘minimal’ black-box model of interactive system
focused on external observable aspects of interaction
PIE model – user input
PIE model – system response
PIE model – the connection
More formally
Expressing properties
Observability & predictability
what you get at the printer
result
display
stronger – what is in the state
P
I
E
R
D
predict
result
display
E
identity
on E
Relaxing the property
P
E
R
O
D
I
result
observe
g
f
Reachability and undo
proving things – undo
∀ c : c undo ~ null ?
only for c ≠ undo
lesson
back/forward in browsers
history window
Issues for PIE properties
continuous behaviour
mouse movement
status–event & hybrid models
granularity and gestalt
dealing with the mouse
formal aspects of status–event
interstitial behaviour
formalised …
action:
user-event x input-status x state� -> response-event x (new) state
interstitial behaviour:
user-event x input-status x state� -> response-event x (new) state
current /
history of
status–change events
meaningful events
more on status-event analysis in chapter 18
making everything continuous
x = vt –1/2gt2
= v
dx
dt
= –g
dv
dt
hybrid models
status–status
mappings
continuous
input
discrete
input
threshold
continuous
output
discrete
output
object
state
enable/disable
discrete
computation
status–change
events
depend on
discrete state
common features
granularity and Gestalt