Overview of SAIP and LSSA

Download Report

Transcript Overview of SAIP and LSSA

Problem Frames 7 - Model
domains and real worlds
Adding a “model” domain
• Technique for information display problems
• A problem frame variant
• A way of decomposing a problem into two
subproblems
• Makes the problem simpler
• Describes the machine more accurately
Information Display:
problem frame diagram
RW!C1
Real
world
C
C3
Information
machine
Display Real world
Display
IM!E2
C
Y4
Information Display with model
RW!C1
Real
world
C
C3
Modeling
machine
Model Real world
MM!E5
DM!E7
Model
X
Model
X
Display
machine
Display
IM!E2
C
Y6
Y6
Display Model
Y4
Decomposing
• Invent the model
• Split requirements into requirements for
building the model, and requirements for
displaying the results
• Make two specifications
Composition
• Two requirements should compose to form
the original requirements
– Except for extra model phenomena
• Two specifications should compose to form
the original specification
– Compositions should be easy, because
– One creates model, the other reads it
Why use a model?
• Lets machine remember phenomena from
the past
– Model determines the questions that can be
answered
– Model indicates memory that is needed
• Lets machine carry out some calculations
incrementally
Why use a model?
• Can model defined terms as if they
correspond to separate phenomena
• Can model processes of a conceptual
domain as if they were physical entities
• Can capture and embody inference rules
• Can provide surrogates for private
phenomena of the modelled domain
Model imperfections
• Model makes assumptions
• Continuously varying phenomena are
modeled by discrete samples
• Samples are gathered at different times
• Time lag: sample is gathered after event
happened
Model Imperfections
• Incompleteness: missing samples or values
– Value doesn’t exist
– Value is unknown
• Errors
Example: Experimental voltages
• Measure voltages at 32 points in a circuit
• Display voltages as columns side by side on
the screen
• Display average voltage over all the points
More experimental voltages
• Display the average voltage of each point
since the experiment began
averagei (s) 
s
 v (t)dt /s
i
0

– Discrete
– Finite number of samples
– Time lag
• Model: for each point, a count and a total
More experimental voltages
• Average over last 5 minutes
– Must keep set of samples for 5 minutes
• Maximum voltage
– Keep maximum for each point
Example: Payroll System
• Inputs: Time cards, New employee form,
benefit choice, raise, W4 form
• Outputs: Pay checks, W1 form, W2 form,
check and forms to insurance company
Payroll problem diagram fitted to
information display frame
a
Payroll
System
b
Payroll
forms C
Output
C
c
Requirements
for payroll
d
a: Pf! {time cards, new employee form, benefit choice, raise, W4} C1
b: PS! {paychecks, W1, W2, checks and forms to insurance} E2
c: Pf! {time cards, new employee form, benefit choice, raise, W4} C3
d: O! {paychecks, W1, W2, checks and forms to insurance} Y4
RW!C1
Payroll
input
PI!E5
MD!Y7
Real
world
Payroll
DB
Payroll
DB
Reports
machine
C3
C
X
DB - Real
world
Y6
Y6
X
Reports -DB
RM!E2
Reports
C
Y4
PD!Y7
Checkwriting
machine
Payroll
DB X
Y6
Paychecks
- DB
Paycheck
CM!E2
PD!Y7
C
Payroll
DB
W2
machine
Y4
Y6
X
W2 - DB
WM!E2
W2
C
Y4
Model Domains are common
• Compilers (Transformation)
– symbol table, abstract syntax tree
• Robotics (controlled behavior)
– map, where we are on the map
• Commanded behavior, Workpieces
– undo, selections
Conclusion
• Models are useful for information display
• Models are probably useful for other
problem frames
• Models are an example of a problem
variant, and an example of decomposing
problems and composing specifications