analysis patterns Daniel Jackson MIT Lab for Computer Science - - PowerPoint PPT Presentation

analysis patterns
SMART_READER_LITE
LIVE PREVIEW

analysis patterns Daniel Jackson MIT Lab for Computer Science - - PowerPoint PPT Presentation

analysis patterns Daniel Jackson MIT Lab for Computer Science 6898: Advanced Topics in Software Design March 4, 2002 wh what at ar are e an analys alysis is pat patter erns? background Martin Fowler, 1996 based on


slide-1
SLIDE 1

analysis patterns

Daniel Jackson MIT Lab for Computer Science 6898: Advanced Topics in Software Design March 4, 2002

slide-2
SLIDE 2 2

wh what at ar are e an analys alysis is pat patter erns?

background › Martin Fowler, 1996 › based on experience applying object modelling to large corporate information systems › focus on models themselves, not process according to MF › ideas from one context useful in another › useful across business areas (health, finance, manufacturing) › type models provide ‘language of the business’ › modelling = Business Process Reengineering › simple models obvious only in retrospect

slide-3
SLIDE 3 3

pla plan

look more deeply into one pattern › “Referring to objects” apply Alloy › express constraints formally › investigate dynamic aspects too consider applications of pattern › what problems does this fit?

slide-4
SLIDE 4 4

exam example: n ple: nam amin ing

motivation › systems need to deal with entities using names › humans use names to refer to entities › how names/entities are related can be tricky › (anything object oriented here?) patterns › Referring to Objects › Identification Scheme › Object Merge

slide-5
SLIDE 5 5
  • bjects & names

sig Object {} sig Name {} sig Scheme {

  • bjects: set Object,

names: set Name, denotes: names -> objects }

Name Name names names Object bject

  • bjects
  • bjects

denotes denotes

slide-6
SLIDE 6 6

static ic co constrain ints

fun UniqueIdentifiers (s: Scheme) { func (s.denotes) } fun NoAliases (s: Scheme) { inj (s.denotes) } fun AllNamed (s: Scheme) { s.objects in ran (s.denotes) } fun AllDenote (s: Scheme) { s.names in dom (s.denotes) }

slide-7
SLIDE 7 7

play play tim ime… e…

slide-8
SLIDE 8 8

matching atching constraints constraints to to problem problems

constraints › UniqueIdentifiers › NoAliases › AllDenote › AllNamed problems › machine/mac, machine/IP, machine/domain name › person/social security number › aircraft/flight number › MIT class/class number › medical procedure/health plan treatment code › Java object/heap address › roadway/number

slide-9
SLIDE 9 9

dynam dynamic constraints ic constraints

questions › can the name/object mapping change? › if an object exists at two times, are its names the same? › if a name exists at two times, are its objects the same? › can names be recycled?

slide-10
SLIDE 10 10

sample dyna le dynamic cons ic constraint ints

fun RetainNames (s, s': Scheme) { all o: s.objects & s'.objects | s.denotes.o = s'.denotes.o } fun NamesSticky' (s, s': Scheme) { all n: s.names & s'.names | all o: s.objects & s'.objects | n->o in s.denotes iff n->o in s'.denotes }

slide-11
SLIDE 11 11

a generic ric co const stra rain int

fun FixedFor (s, s': Scheme, ns: set Name, os: set Object) { let r = ns->os | s.denotes & r = s'.denotes & r } says › for the names in ns and objects in os › naming is fixed symmetrical in s and s’ › surprising?

slide-12
SLIDE 12 12

varie rietie ies s of dynamic ic co const stra rain int

fun NamingFixed (s, s': Scheme) { FixedFor (s,s',Name,Object) } fun Sticky (s, s': Scheme) { FixedFor (s,s',s.names & s'.names, s.objects & s'.objects) } fun NSticky (s, s': Scheme) { FixedFor (s,s',s.names & s'.names, Object) } fun OSticky (s, s': Scheme) { FixedFor (s,s',Name, s.objects & s'.objects) }

slide-13
SLIDE 13 13

pla play y tim ime

slide-14
SLIDE 14 14

id identif ifica icatio ion sch cheme

sig SchemeName {} sig World { schemes: set Scheme, names: set Name, scheme: names -> schemes } constraints › naming constraints across schemes? › how can schemes change?

slide-15
SLIDE 15 15

a sam a sample o ple operatio peration

code refinement › classification scheme › each name refers to set of objects › find need to refine classification by introducing new names fun SameNames (s: Scheme): Object -> Object { result = {o,o': s.objects | s.denotes.o = s.denotes.o'} } fun Refines (s, s': Scheme) { s.objects in s'.objects some SameNames (s) - SameNames (s') NSticky (s, s') AllDenote (s) AllDenote (s') AllNamed (s) AllNamed (s') }

slide-16
SLIDE 16 16

talkin lking g po poin ints

“conceptual patterns only useful to software engineers if they can see how to implement them” “models are not right or wrong; they are more or less useful” “analysis & design techniques may be rigorous but they don’t have to be” “I try to develop very conceptual models that focus entirely on the problem, yet my techniques are object oriented, and hence reflect a design approach”