problem frames 7 - model domains and real worlds

19
Problem Frames 7 - Model domains and real worlds

Upload: christina-little

Post on 17-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Problem Frames 7 - Model domains and real worlds

Problem Frames 7 - Model domains and real worlds

Page 2: 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

Page 3: Problem Frames 7 - Model domains and real worlds

Information Display:problem frame diagram

Realworld

Display

Informationmachine

C

C

Display -Real world

RW!C1

IM!E2

C3

Y4

Page 4: Problem Frames 7 - Model domains and real worlds

Information Display with model

Realworld

Display

Displaymachine

C

C

Display -Model

RW!C1

IM!E2

C3

Y4

Model

X

Model

X

Modelingmachine

Model -Real world

Y6

Y6MM!E5

DM!E7

Page 5: Problem Frames 7 - Model domains and real worlds

Decomposing

• Invent the model

• Split requirements into requirements for building the model, and requirements for displaying the results

• Make two specifications

Page 6: Problem Frames 7 - Model domains and real worlds

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

Page 7: Problem Frames 7 - Model domains and real worlds

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

Page 8: Problem Frames 7 - Model domains and real worlds

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

Page 9: Problem Frames 7 - Model domains and real worlds

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

Page 10: Problem Frames 7 - Model domains and real worlds

Model Imperfections

• Incompleteness: missing samples or values– Value doesn’t exist– Value is unknown

• Errors

Page 11: Problem Frames 7 - Model domains and real worlds

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

Page 12: Problem Frames 7 - Model domains and real worlds

More experimental voltages

• Display the average voltage of each point since the experiment began

– Discrete– Finite number of samples– Time lag

• Model: for each point, a count and a total€

averagei(s) = v i0

s

∫ (t)dt /s

Page 13: Problem Frames 7 - Model domains and real worlds

More experimental voltages

• Average over last 5 minutes– Must keep set of samples for 5 minutes

• Maximum voltage– Keep maximum for each point

Page 14: Problem Frames 7 - Model domains and real worlds

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

Page 15: Problem Frames 7 - Model domains and real worlds

Payroll problem diagram fitted to information display frame

Payroll System

Payroll forms

Output

C

C d

a

b

c

Requirements for payroll

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

Page 16: Problem Frames 7 - Model domains and real worlds

Payroll input

Real world

PayrollDB

C

X Y6

RW!C1

PI!E5

C3

DB - Real world

Reports machine

PayrollDB

Reports

X

C Y4

MD!Y7

RM!E2

Y6

Reports -DB

Page 17: Problem Frames 7 - Model domains and real worlds

Checkwriting machine

PayrollDB

Paycheck

X

C Y4

PD!Y7

CM!E2

Y6

Paychecks - DB

W2 machine

PayrollDB

W2

X

C Y4

PD!Y7

WM!E2

Y6

W2 - DB

Page 18: Problem Frames 7 - Model domains and real worlds

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

Page 19: Problem Frames 7 - Model domains and real worlds

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