SlideShare a Scribd company logo
1 of 54
chapter 17

models of the system
Models of the System
Standard Formalisms
software engineering notations used to specify the
required behaviour of specific interactive systems

Interaction Models
special purpose mathematical models of interactive
systems used to describe usability properties at a
generic level

Continuous Behaviour
activity between the events, objects with continuous
motion, models of time
types of system model
• dialogue – main modes
• full state definition
• abstract interaction model

specific
system
generic
issues
Relationship with dialogue
• Dialogue modelling is linked to semantics
• System semantics affects the dialogue
structure
• But the bias is different
• Rather than dictate what actions are legal,
these formalisms tell what each action does to
the system.
Irony
• Computers are inherently mathematical
machines
• Humans are not
• Formal techniques are well accepted for
cognitive models of the user and the dialogue
(what the user should do)
• Formal techniques are not yet well accepted
for dictating what the system should do for the
user!
standard formalisms
general computing notations
to specify a particular system
standard formalisms
Standard software engineering formalisms can be used
to specify an interactive system.
Referred to as formal methods
• Model based – describe system states and operations
– Z, VDM

• Algebraic – describe effects of sequences of actions
– OBJ, Larch, ACT-ONE

• Extended logics – describe when things happen and
who is responsible
– temporal and deontic logics
Uses of SE formal notations
• For communication
– common language
– remove ambiguity (possibly)
– succinct and precise

• For analysis
– internal consistency
– external consistency
• with eventual program
• with respect to requirements (safety, security, HCI)

– specific versus generic
model-based methods
• use general mathematics:
– numbers, sets, functions

• use them to define
– state
– operations on state
model-based methods
• describe state using variables
• types of variables:
– basic type:

x: Nat

– non-negative integer {0,1,2,...}
or in the Z font:

– individual item from set:

shape_type: {line, ellipse, rectangle}

– subset of bigger set:

selection: set Nat

– function (often finite):
objects: Nat

– set of integers
or in the Z font:

→ Shape_Type
Mathematics and programs
Mathematical counterparts to common programming
constructs
Programming

Mathematics

types
basic types
constructed types
records
lists
functions
procedures

sets
basic sets
constructed sets
unordered tuples
sequences
functions
relations
running example …

a simple graphics drawing package
supports several types of shape
define your own types
an x,y location is defined by two numbers

Point == Nat × Nat
a graphic object is defined by its shape, size, and centre

Shape ==
shape: {line, ellipse, rectangle}
x, y: Point
– position of centre
wid: Nat
ht:
Nat
– size of shape
… yet another type definition
A collection of graphic objects can be identified
by a ‘lookup dictionary’
[Id]
Shape_Dict == Id → Shape
• Id is an introduced set
– some sort of unique identifier for each object

• Shap_Dict is a function
– for any Id within its domain (the valid shapes) it
gives you a corresponding shapthis means for any
use them to define state

shapes:
selection:

Shape_Dict
set Id

– selected objects
invariants and initial state
invariants

– conditions that are always be true
– must be preserved by every operation

selection ⊆ dom shapes

– selection must consist of valid objects

initial state – how the system starts!
dom shapes = {}
– no objects
selection = {}
– selection is empty
Defining operations
State change is represented as two copies of the state
before – State
after – State’
The Unselect operation deselects any selected objects

unselect:
selection' = {}

– new selection is empty

shapes' = shapes

– but nothing else changes
… another operation
delete:
dom shapes' = dom shapes – selection
– remove selected objects

∀ id ∈ dom shapes'
shapes' (id) = shapes(id)

– remaining objects unchanged

selection' = {}

– new selection is empty

note again use of primed variables for ‘new’ state
display/presentation
• details usually very complex (pixels etc.)
… but can define what is visible
Visible_Shape_Type =

Shape_Type
highlight: Bool

display:
vis_objects:

set Visible_Shape_Type

vis_objects =
{ ( objects(id), sel(id) ) | id ∈ dom objects }
where sel(id ) = id ∈ selection
Interface issues
• Framing problem
– everything else stays the same
– can be complicated with state invariants

• Internal consistency
– do operations define any legal transition?

• External consistency
– must be formulated as theorems to prove
– clear for refinement, not so for requirements

• Separation
– distinction between system functionality and presentation
is not explicit
Algebraic notations
• Model based notations
– emphasise constructing an explicit representations of the
system state.

• Algebraic notations
– provide only implicit information about the system state.

• Model based operations
– defined in terms of their effect on system components.

• Algebraic operations
– defined in terms of their relationship with the other
operations.
Return to graphics example
types
State, Pt

operations
init : → State
make ellipse : Pt × State → State
move : Pt × State → State
unselect : State → State
delete : State → State

axioms
for all st ∈ State, p ∈ Pt •
1. delete(make ellipse(st)) = unselect(st)
2. unselect(unselect(st)) = unselect(st)
3. move(p; unselect(st)) = unselect(st)
Issues for algebraic notations
• Ease of use
– a different way of thinking than traditional programming

• Internal consistency
– are there any axioms which contradict others?

• External consistency
– with respect to executable system less clear

• External consistency
– with respect to requirements is made explicit and
automation possible

• Completeness
– is every operation completely defined?
Extended logics
• Model based and algebraic notations make extended
use of propositional and predicate logic.
• Propositions
– expressions made up of
atomic terms: p, q, r, …
– composed with
logical operations: ∧ ∨ ¬ ⇒ …

• Predicates
– propositions with variables, e.g., p(x)
– and quantified expressions: ∀ ∃

• Not convenient for expressing time, responsibility and
freedom, notions sometimes needed for HCI
requirements.
Temporal logics
Time considered as succession of events
Basic operators:

¬

– always
– eventually
– never

(G funnier than A)
(G understands A)
¬ (rains in So. Cal.)

Other bounded operators:
p until q
p before q

– weaker than
– stronger than
Explicit time
• These temporal logics do not explicitly mention
time, so some requirements cannot be
expressed
• Active research area, but not so much with
HCI
• Gradual degradation more important than
time-criticality
• Myth of the infinitely fast machine …
Deontic logics
For expressing responsibility, obligation between agents
(e.g., the human, the organisation, the computer)

permission
obligation

per
obl

For example:
owns( Jane’ file `fred' ) ) ⇒
per( Jane, request( ‘print fred’ ))
performs( Jane, request( ‘print fred’ )) ) ⇒
obl( lp3, print(file ‘fred’))
Issues for extended logics
• Safety properties
– stipulating that bad things do not happen

• Liveness properties
– stipulating that good things do happen

• Executability versus expressiveness
– easy to specify impossible situations
– difficult to express executable requirements
– settle for eventual executable

• Group issues and deontics
– obligations for single-user systems have personal impact
– for groupware … consider implications for other users.
interaction models
PIE model
defining properties
undo
Interaction models
General computational models were not designed with the
user in mind
We need models that sit between the software engineering
formalism and our understanding of HCI
• formal
– the PIE model for expressing general interactive properties to
support usability

• informal
– interactive architectures (MVC, PAC, ALV) to motivate separation
and modularisation of functionality and presentation (chap 8)

• semi-formal
– status-event analysis for viewing a slice of an interactive system
that spans several layers (chap 18)
the PIE model
‘minimal’ black-box model of interactive system
focused on external observable aspects of
interaction
R
result

I

P

E

disp

D
PIE model – user input
• sequence of commands
• commands include:
– keyboard, mouse movement, mouse click

• call the set of commands C
• call the sequence P
P = seq C
PIE model – system response
• the ‘effect’
• effect composed of:
ephemeral display
the final result
• (e..g printout, changed file)

• call the set of effects E
PIE model – the connection
• given any history of commands (P)
• there is some current effect
• call the mapping the interpretation (I)
I: P → E
R
result

I

P

E

disp

D
More formally
[C;E;D;R]
P == seq C
I:P→E
display : E → D
result : E → R
Alternatively, we can derive a state transition function from
the PIE.
doit : E × P → E
doit( I(p), q) = I(p q)
doit( doit(e, p). q) = doit(e, p q)
Expressing properties
WYSIWYG (what you see is what you get)
– What does this really mean, and how can we test product
X to see if it satisfies a claim that it is WYSIWYG?

Limited scope general properties which support
WYSIWYG
• Observability
– what you can tell about the current state of the system
from the display

• Predictability
– what you can tell about the future behaviour
Observability & predictability
Two possible interpretations of WYSIWYG:
What you see is what you:
will get at the printer
have got in the system
Predictability is a special case of observability
what you get at the printer
result

R

I

P

predict

E

display
D

∃ predict ∈ ( D → R ) s.t. predict o display = result
• but really not quite the full meaning
stronger – what is in the state

P

I

R

result

E

predictE
display

D

identity
on E

∃ predictE ∈ ( D → R ) s.t. predictE o display = idE
• but too strong – only allows trivial systems where everything
is always visible
Relaxing the property
R

result

P

I

E

g

f

observe

O

D

• O – the things you can indirectly observe in the system
through scrolling etc.
• predict the result
∃ f ∈ ( O → R ) s.t. f o observe = result
• or the effect
∃ g ∈ ( O → R ) s.t. g o observe = idE
Reachability and undo
• Reachability – getting from one state to another.

∀ e, e’ ∈ E • ∃ p ∈ P • doit(e, p) = e’
• Too weak
• Undo – reachability applied between current state and
last state.

∀ c ∈ C • doit(e, c undo) = e
• Impossible except for very simple system with at most
two states!
• Better models of undo treat it as a special command to
avoid this problem
proving things – undo
∀c:

c undo ~ null

only for

?

c ≠ undo
S
a

a

undo

undo
S

S
0

S
0

b

undo
S
b

=
a

S
b
lesson
• undo is no ordinary command!
• other meta-commands:
back/forward in browsers
history window
Issues for PIE properties
• Insufficient
– define necessary but not sufficient properties for usability.

• Generic
– can be applied to any system

• Proof obligations
– for system defined in SE formalism

• Scale
– how to prove many properties of a large system

• Scope
– limiting applicability of certain properties

• Insight
– gained from abstraction is reusable
continuous behaviour
mouse movement
status–event & hybrid models
granularity and gestalt
dealing with the mouse
• Mouse always has a location
– not just a sequence of events
– a status value

• update depends on current mouse location
– doit: E × C × M → E
– captures trajectory independent behaviour

• also display depends on mouse location
– display: E × M → D
– e.g.dragging window
formal aspects of status–event
• events
– at specific moments of time
• keystrokes, beeps,
stroke of midnight in Cinderella

• status
– values of a period of time
• current computer display, location of mouse,
internal state of computer, the weather
interstitial behaviour
• discrete models
– what happens at events

• status–event analysis
– also what happens between events

• centrality …
– in GUI – the feel
• dragging, scrolling, etc.

– in rich media – the main purpose
formalised …

current /
history of

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
note:
current input-status => trajectory independent
history of input-status allows freehand drawing etc.
status–change events
• events can change status
• some changes of status are events
meaningful events
when bank balance < $100
need to do more work!

• not all changes!
– every second is a change in time
– but only some times critical
when time = 12:30 – eat lunch

• implementation issues
– system design – sensors, polling behaviour

more on status-event analysis in chapter 18
making everything continuous
• physics & engineering
– everything is continuous
• time, location, velocity, acceleration, force, mass
dx
dt = v

dv
dt = –g

x = vt –1/2gt2

• can model everything as pure continuous
ϕ ( t, t0, statet0, inputs during [t0,t) )
outputt = η ( statet)
statet =

– like interstitial behaviour

• but clumsy for events – in practice need both
hybrid models
• computing “hybrid systems” models
• physical world as differential equations
• computer systems as discrete events

status–change
events

– for industrial control, fly-by-wire aircraft

• adopted by some
– e.g. TACIT project
Hybrid Petri Nets and
continuous interactors
status–status
mappings
depend on
discrete state

continuous
input

discrete
computation

discrete
input

threshold
object
state
enable/disable
continuous
output

discrete
output
common features
• actions
– at events, discrete changes in state

• interstitial behaviour
– between events, continuous change
granularity and Gestalt
• granularity issues
– do it today
» next 24 hours, before 5pm, before midnight?

• two timing
– ‘infinitely’ fast times
» computer calculation c.f. interaction time

• temporal gestalt
– words, gestures
» where do they start, the whole matters

More Related Content

Viewers also liked (19)

E3 chap-15
E3 chap-15E3 chap-15
E3 chap-15
 
E3 chap-03-extra-wimp
E3 chap-03-extra-wimpE3 chap-03-extra-wimp
E3 chap-03-extra-wimp
 
Building an online learning environment
Building an online learning environmentBuilding an online learning environment
Building an online learning environment
 
Impact of ISO 9001 implementation in BSL
Impact of ISO 9001 implementation in BSLImpact of ISO 9001 implementation in BSL
Impact of ISO 9001 implementation in BSL
 
Ch2 operating-system structures
Ch2   operating-system structuresCh2   operating-system structures
Ch2 operating-system structures
 
Ch11
Ch11Ch11
Ch11
 
Ch24
Ch24Ch24
Ch24
 
Ch7 deadlocks
Ch7   deadlocksCh7   deadlocks
Ch7 deadlocks
 
E3 chap-10
E3 chap-10E3 chap-10
E3 chap-10
 
Ch4
Ch4Ch4
Ch4
 
Ch14
Ch14Ch14
Ch14
 
John wiley & sons operating system concepts, seventh edition
John wiley & sons   operating system concepts, seventh editionJohn wiley & sons   operating system concepts, seventh edition
John wiley & sons operating system concepts, seventh edition
 
Peubah acak-diskret-khusus
Peubah acak-diskret-khususPeubah acak-diskret-khusus
Peubah acak-diskret-khusus
 
Sergey Brin
Sergey BrinSergey Brin
Sergey Brin
 
Ch9 mass storage systems
Ch9   mass storage systemsCh9   mass storage systems
Ch9 mass storage systems
 
Hci [4]interaction
Hci [4]interactionHci [4]interaction
Hci [4]interaction
 
Cal learn sw171
Cal learn sw171Cal learn sw171
Cal learn sw171
 
GMR Hyderabad International Airport
GMR Hyderabad International AirportGMR Hyderabad International Airport
GMR Hyderabad International Airport
 
e-Business
e-Businesse-Business
e-Business
 

Similar to E3 chap-17

HCI 3e - Ch 17: Models of the system
HCI 3e - Ch 17:  Models of the systemHCI 3e - Ch 17:  Models of the system
HCI 3e - Ch 17: Models of the systemAlan Dix
 
Modeling System Requirements
Modeling System RequirementsModeling System Requirements
Modeling System RequirementsAsjad Raza
 
The Fuss about || Haskell | Scala | F# ||
The Fuss about || Haskell | Scala | F# ||The Fuss about || Haskell | Scala | F# ||
The Fuss about || Haskell | Scala | F# ||Ashwin Rao
 
Concepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming LanguagesConcepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming Languagesppd1961
 
How to obtain and install R.ppt
How to obtain and install R.pptHow to obtain and install R.ppt
How to obtain and install R.pptrajalakshmi5921
 
Slides on introduction to R by ArinBasu MD
Slides on introduction to R by ArinBasu MDSlides on introduction to R by ArinBasu MD
Slides on introduction to R by ArinBasu MDSonaCharles2
 
Keynote at IWLS 2017
Keynote at IWLS 2017Keynote at IWLS 2017
Keynote at IWLS 2017Manish Pandey
 
Free ebooks download ! Edhole
Free ebooks download ! EdholeFree ebooks download ! Edhole
Free ebooks download ! EdholeEdhole.com
 
Free ebooks download ! Edhole
Free ebooks download ! EdholeFree ebooks download ! Edhole
Free ebooks download ! EdholeEdhole.com
 
Algorithm and Data Structures - Basic of IT Problem Solving
Algorithm and Data Structures - Basic of IT Problem SolvingAlgorithm and Data Structures - Basic of IT Problem Solving
Algorithm and Data Structures - Basic of IT Problem Solvingcoolpie
 
(7) c sharp introduction_advanvced_features_part_ii
(7) c sharp introduction_advanvced_features_part_ii(7) c sharp introduction_advanvced_features_part_ii
(7) c sharp introduction_advanvced_features_part_iiNico Ludwig
 
Stack squeues lists
Stack squeues listsStack squeues lists
Stack squeues listsJames Wong
 

Similar to E3 chap-17 (20)

HCI 3e - Ch 17: Models of the system
HCI 3e - Ch 17:  Models of the systemHCI 3e - Ch 17:  Models of the system
HCI 3e - Ch 17: Models of the system
 
R programmingmilano
R programmingmilanoR programmingmilano
R programmingmilano
 
OODIAGRAMS (4).ppt
OODIAGRAMS (4).pptOODIAGRAMS (4).ppt
OODIAGRAMS (4).ppt
 
OODIAGRAMS.ppt
OODIAGRAMS.pptOODIAGRAMS.ppt
OODIAGRAMS.ppt
 
OODIAGRAMS.ppt
OODIAGRAMS.pptOODIAGRAMS.ppt
OODIAGRAMS.ppt
 
Modeling System Requirements
Modeling System RequirementsModeling System Requirements
Modeling System Requirements
 
Algorithms
Algorithms Algorithms
Algorithms
 
The Fuss about || Haskell | Scala | F# ||
The Fuss about || Haskell | Scala | F# ||The Fuss about || Haskell | Scala | F# ||
The Fuss about || Haskell | Scala | F# ||
 
Designmethodology1
Designmethodology1Designmethodology1
Designmethodology1
 
Concepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming LanguagesConcepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming Languages
 
How to obtain and install R.ppt
How to obtain and install R.pptHow to obtain and install R.ppt
How to obtain and install R.ppt
 
17641.ppt
17641.ppt17641.ppt
17641.ppt
 
Slides on introduction to R by ArinBasu MD
Slides on introduction to R by ArinBasu MDSlides on introduction to R by ArinBasu MD
Slides on introduction to R by ArinBasu MD
 
17641.ppt
17641.ppt17641.ppt
17641.ppt
 
Keynote at IWLS 2017
Keynote at IWLS 2017Keynote at IWLS 2017
Keynote at IWLS 2017
 
Free ebooks download ! Edhole
Free ebooks download ! EdholeFree ebooks download ! Edhole
Free ebooks download ! Edhole
 
Free ebooks download ! Edhole
Free ebooks download ! EdholeFree ebooks download ! Edhole
Free ebooks download ! Edhole
 
Algorithm and Data Structures - Basic of IT Problem Solving
Algorithm and Data Structures - Basic of IT Problem SolvingAlgorithm and Data Structures - Basic of IT Problem Solving
Algorithm and Data Structures - Basic of IT Problem Solving
 
(7) c sharp introduction_advanvced_features_part_ii
(7) c sharp introduction_advanvced_features_part_ii(7) c sharp introduction_advanvced_features_part_ii
(7) c sharp introduction_advanvced_features_part_ii
 
Stack squeues lists
Stack squeues listsStack squeues lists
Stack squeues lists
 

Recently uploaded

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 

Recently uploaded (20)

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 

E3 chap-17

  • 1. chapter 17 models of the system
  • 2. Models of the System Standard Formalisms software engineering notations used to specify the required behaviour of specific interactive systems Interaction Models special purpose mathematical models of interactive systems used to describe usability properties at a generic level Continuous Behaviour activity between the events, objects with continuous motion, models of time
  • 3. types of system model • dialogue – main modes • full state definition • abstract interaction model specific system generic issues
  • 4. Relationship with dialogue • Dialogue modelling is linked to semantics • System semantics affects the dialogue structure • But the bias is different • Rather than dictate what actions are legal, these formalisms tell what each action does to the system.
  • 5. Irony • Computers are inherently mathematical machines • Humans are not • Formal techniques are well accepted for cognitive models of the user and the dialogue (what the user should do) • Formal techniques are not yet well accepted for dictating what the system should do for the user!
  • 6. standard formalisms general computing notations to specify a particular system
  • 7. standard formalisms Standard software engineering formalisms can be used to specify an interactive system. Referred to as formal methods • Model based – describe system states and operations – Z, VDM • Algebraic – describe effects of sequences of actions – OBJ, Larch, ACT-ONE • Extended logics – describe when things happen and who is responsible – temporal and deontic logics
  • 8. Uses of SE formal notations • For communication – common language – remove ambiguity (possibly) – succinct and precise • For analysis – internal consistency – external consistency • with eventual program • with respect to requirements (safety, security, HCI) – specific versus generic
  • 9. model-based methods • use general mathematics: – numbers, sets, functions • use them to define – state – operations on state
  • 10. model-based methods • describe state using variables • types of variables: – basic type: x: Nat – non-negative integer {0,1,2,...} or in the Z font: – individual item from set: shape_type: {line, ellipse, rectangle} – subset of bigger set: selection: set Nat – function (often finite): objects: Nat – set of integers or in the Z font: → Shape_Type
  • 11. Mathematics and programs Mathematical counterparts to common programming constructs Programming Mathematics types basic types constructed types records lists functions procedures sets basic sets constructed sets unordered tuples sequences functions relations
  • 12. running example … a simple graphics drawing package supports several types of shape
  • 13. define your own types an x,y location is defined by two numbers Point == Nat × Nat a graphic object is defined by its shape, size, and centre Shape == shape: {line, ellipse, rectangle} x, y: Point – position of centre wid: Nat ht: Nat – size of shape
  • 14. … yet another type definition A collection of graphic objects can be identified by a ‘lookup dictionary’ [Id] Shape_Dict == Id → Shape • Id is an introduced set – some sort of unique identifier for each object • Shap_Dict is a function – for any Id within its domain (the valid shapes) it gives you a corresponding shapthis means for any
  • 15. use them to define state shapes: selection: Shape_Dict set Id – selected objects
  • 16. invariants and initial state invariants – conditions that are always be true – must be preserved by every operation selection ⊆ dom shapes – selection must consist of valid objects initial state – how the system starts! dom shapes = {} – no objects selection = {} – selection is empty
  • 17. Defining operations State change is represented as two copies of the state before – State after – State’ The Unselect operation deselects any selected objects unselect: selection' = {} – new selection is empty shapes' = shapes – but nothing else changes
  • 18. … another operation delete: dom shapes' = dom shapes – selection – remove selected objects ∀ id ∈ dom shapes' shapes' (id) = shapes(id) – remaining objects unchanged selection' = {} – new selection is empty note again use of primed variables for ‘new’ state
  • 19. display/presentation • details usually very complex (pixels etc.) … but can define what is visible Visible_Shape_Type = Shape_Type highlight: Bool display: vis_objects: set Visible_Shape_Type vis_objects = { ( objects(id), sel(id) ) | id ∈ dom objects } where sel(id ) = id ∈ selection
  • 20. Interface issues • Framing problem – everything else stays the same – can be complicated with state invariants • Internal consistency – do operations define any legal transition? • External consistency – must be formulated as theorems to prove – clear for refinement, not so for requirements • Separation – distinction between system functionality and presentation is not explicit
  • 21. Algebraic notations • Model based notations – emphasise constructing an explicit representations of the system state. • Algebraic notations – provide only implicit information about the system state. • Model based operations – defined in terms of their effect on system components. • Algebraic operations – defined in terms of their relationship with the other operations.
  • 22. Return to graphics example types State, Pt operations init : → State make ellipse : Pt × State → State move : Pt × State → State unselect : State → State delete : State → State axioms for all st ∈ State, p ∈ Pt • 1. delete(make ellipse(st)) = unselect(st) 2. unselect(unselect(st)) = unselect(st) 3. move(p; unselect(st)) = unselect(st)
  • 23. Issues for algebraic notations • Ease of use – a different way of thinking than traditional programming • Internal consistency – are there any axioms which contradict others? • External consistency – with respect to executable system less clear • External consistency – with respect to requirements is made explicit and automation possible • Completeness – is every operation completely defined?
  • 24. Extended logics • Model based and algebraic notations make extended use of propositional and predicate logic. • Propositions – expressions made up of atomic terms: p, q, r, … – composed with logical operations: ∧ ∨ ¬ ⇒ … • Predicates – propositions with variables, e.g., p(x) – and quantified expressions: ∀ ∃ • Not convenient for expressing time, responsibility and freedom, notions sometimes needed for HCI requirements.
  • 25. Temporal logics Time considered as succession of events Basic operators: ¬ – always – eventually – never (G funnier than A) (G understands A) ¬ (rains in So. Cal.) Other bounded operators: p until q p before q – weaker than – stronger than
  • 26. Explicit time • These temporal logics do not explicitly mention time, so some requirements cannot be expressed • Active research area, but not so much with HCI • Gradual degradation more important than time-criticality • Myth of the infinitely fast machine …
  • 27. Deontic logics For expressing responsibility, obligation between agents (e.g., the human, the organisation, the computer) permission obligation per obl For example: owns( Jane’ file `fred' ) ) ⇒ per( Jane, request( ‘print fred’ )) performs( Jane, request( ‘print fred’ )) ) ⇒ obl( lp3, print(file ‘fred’))
  • 28. Issues for extended logics • Safety properties – stipulating that bad things do not happen • Liveness properties – stipulating that good things do happen • Executability versus expressiveness – easy to specify impossible situations – difficult to express executable requirements – settle for eventual executable • Group issues and deontics – obligations for single-user systems have personal impact – for groupware … consider implications for other users.
  • 30. Interaction models General computational models were not designed with the user in mind We need models that sit between the software engineering formalism and our understanding of HCI • formal – the PIE model for expressing general interactive properties to support usability • informal – interactive architectures (MVC, PAC, ALV) to motivate separation and modularisation of functionality and presentation (chap 8) • semi-formal – status-event analysis for viewing a slice of an interactive system that spans several layers (chap 18)
  • 31. the PIE model ‘minimal’ black-box model of interactive system focused on external observable aspects of interaction R result I P E disp D
  • 32. PIE model – user input • sequence of commands • commands include: – keyboard, mouse movement, mouse click • call the set of commands C • call the sequence P P = seq C
  • 33. PIE model – system response • the ‘effect’ • effect composed of: ephemeral display the final result • (e..g printout, changed file) • call the set of effects E
  • 34. PIE model – the connection • given any history of commands (P) • there is some current effect • call the mapping the interpretation (I) I: P → E R result I P E disp D
  • 35. More formally [C;E;D;R] P == seq C I:P→E display : E → D result : E → R Alternatively, we can derive a state transition function from the PIE. doit : E × P → E doit( I(p), q) = I(p q) doit( doit(e, p). q) = doit(e, p q)
  • 36. Expressing properties WYSIWYG (what you see is what you get) – What does this really mean, and how can we test product X to see if it satisfies a claim that it is WYSIWYG? Limited scope general properties which support WYSIWYG • Observability – what you can tell about the current state of the system from the display • Predictability – what you can tell about the future behaviour
  • 37. Observability & predictability Two possible interpretations of WYSIWYG: What you see is what you: will get at the printer have got in the system Predictability is a special case of observability
  • 38. what you get at the printer result R I P predict E display D ∃ predict ∈ ( D → R ) s.t. predict o display = result • but really not quite the full meaning
  • 39. stronger – what is in the state P I R result E predictE display D identity on E ∃ predictE ∈ ( D → R ) s.t. predictE o display = idE • but too strong – only allows trivial systems where everything is always visible
  • 40. Relaxing the property R result P I E g f observe O D • O – the things you can indirectly observe in the system through scrolling etc. • predict the result ∃ f ∈ ( O → R ) s.t. f o observe = result • or the effect ∃ g ∈ ( O → R ) s.t. g o observe = idE
  • 41. Reachability and undo • Reachability – getting from one state to another. ∀ e, e’ ∈ E • ∃ p ∈ P • doit(e, p) = e’ • Too weak • Undo – reachability applied between current state and last state. ∀ c ∈ C • doit(e, c undo) = e • Impossible except for very simple system with at most two states! • Better models of undo treat it as a special command to avoid this problem
  • 42. proving things – undo ∀c: c undo ~ null only for ? c ≠ undo S a a undo undo S S 0 S 0 b undo S b = a S b
  • 43. lesson • undo is no ordinary command! • other meta-commands: back/forward in browsers history window
  • 44. Issues for PIE properties • Insufficient – define necessary but not sufficient properties for usability. • Generic – can be applied to any system • Proof obligations – for system defined in SE formalism • Scale – how to prove many properties of a large system • Scope – limiting applicability of certain properties • Insight – gained from abstraction is reusable
  • 45. continuous behaviour mouse movement status–event & hybrid models granularity and gestalt
  • 46. dealing with the mouse • Mouse always has a location – not just a sequence of events – a status value • update depends on current mouse location – doit: E × C × M → E – captures trajectory independent behaviour • also display depends on mouse location – display: E × M → D – e.g.dragging window
  • 47. formal aspects of status–event • events – at specific moments of time • keystrokes, beeps, stroke of midnight in Cinderella • status – values of a period of time • current computer display, location of mouse, internal state of computer, the weather
  • 48. interstitial behaviour • discrete models – what happens at events • status–event analysis – also what happens between events • centrality … – in GUI – the feel • dragging, scrolling, etc. – in rich media – the main purpose
  • 49. formalised … current / history of 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 note: current input-status => trajectory independent history of input-status allows freehand drawing etc.
  • 50. status–change events • events can change status • some changes of status are events meaningful events when bank balance < $100 need to do more work! • not all changes! – every second is a change in time – but only some times critical when time = 12:30 – eat lunch • implementation issues – system design – sensors, polling behaviour more on status-event analysis in chapter 18
  • 51. making everything continuous • physics & engineering – everything is continuous • time, location, velocity, acceleration, force, mass dx dt = v dv dt = –g x = vt –1/2gt2 • can model everything as pure continuous ϕ ( t, t0, statet0, inputs during [t0,t) ) outputt = η ( statet) statet = – like interstitial behaviour • but clumsy for events – in practice need both
  • 52. hybrid models • computing “hybrid systems” models • physical world as differential equations • computer systems as discrete events status–change events – for industrial control, fly-by-wire aircraft • adopted by some – e.g. TACIT project Hybrid Petri Nets and continuous interactors status–status mappings depend on discrete state continuous input discrete computation discrete input threshold object state enable/disable continuous output discrete output
  • 53. common features • actions – at events, discrete changes in state • interstitial behaviour – between events, continuous change
  • 54. granularity and Gestalt • granularity issues – do it today » next 24 hours, before 5pm, before midnight? • two timing – ‘infinitely’ fast times » computer calculation c.f. interaction time • temporal gestalt – words, gestures » where do they start, the whole matters