1 / 44

BabyUML-rOOts: Towards a New Discipline of Programming with the BabyUML Language Laboratory (2005)

This article explores the BabyUML language laboratory and its application in programming. It discusses the roots of the BabyUML language, the limitations of program testing, the importance of comprehensible programs, and the challenges faced in open systems and distributed components. It also introduces the five projections of BabyUML and collaboration and interaction concepts.

skelvin
Download Presentation

BabyUML-rOOts: Towards a New Discipline of Programming with the BabyUML Language Laboratory (2005)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Towards aNew Discipline of Programmingwith the BabyUML Language Laboratory rOOts 2005 Trygve Reenskaug University of Oslo http://heim.ifi.uio.no/~trygvertrygver@ifi.uioi.no BabyUML-rOOts

  2. ”Nusse”Stored program, binary computer ”Nusse”(1953-59) • Stored Program • Binary (512 words a 32 bits) • An innocuous change in one corner broke program in opposite corner BabyUML-rOOts

  3. Smalltalk: Stored Program, Object Computer (1973---) • Stored Program • 300.000 objects • An innocuous change in one corner breaks program in opposite corner BabyUML-rOOts

  4. Dijkstra - 1:Exhaustive testing ofa(32 bits)* b(32 bits)at one million tests per second. Exhaustive test takes nearly 600.000 years !! "Program testing can be used to show the presence of bugs, but never to show their absence!" Testing is of limited utility Dijkstra - 1:Exhaustive testing ofa(32 bits)* b(32 bits)at one million tests per second. Exhaustive test takes nearly 600.000 years !! "Program testing can be used to show the presence of bugs, but never to show their absence!" http://en.wikiquote.org/wiki/Edsger_Wybe_Dijkstra BabyUML-rOOts

  5. Dijkstra - 2: As a slow-witted human being I have a very small head and I had better learn to live with it and to respect my limitations… Limiting factor is human brain http://www.cs.utexas.edu/users/EWD/ewd02xx/EWD249.PDF BabyUML-rOOts

  6. All Meaningful Programs All Comprehensible Programs Deal WithComprehensible Programs All Programs Two ways of constructing asoftware design (C.A.R. Hoare) Make it 1) so simple that there are obviously no deficiencies 2) so complicated that there are no obvious deficiencies. BabyUML-rOOts

  7. Program: ~ 3000 FORTRAN statements Unit test: ~ One error/400 LOC System Test: No errors Use: No errors Process: Specification Database schema For each subroutine: Design, Write, Peer review, Test System test Use 1973The Last Comfortable Program BabyUML-rOOts

  8. Open Systems Distributed components, No closed boundaries Evolution: Requirements change during development and forever after Multi Process Ownership Computer Literate users Demand better control New Challenges After 1973 • Open Systems • Distributed components, • No closed boundaries • Evolution: • Requirements change during development • and forever after • Multi Process • Ownership • Computer Literate users • Demand better control BabyUML-rOOts

  9. ObjectsImplicit in Class Browser BabyUML-rOOts

  10. Projections BabyUML-rOOts

  11. actA actC (2) (3) «Component»ProductionControl actD (2)<2203> actB (7) Tool2 MaterialsManagement «Port» «Component» sampleNet «Port» «Port» Tool 1 Manufacturing A BabyUML Componentencapsulates other objects «Port» «Port» BabyUML-rOOts

  12. required (client) provided (server) Link by matchingrequired / provided interfaces Desmond D’Souza: Objects, Components, and Frameworks with UML (Catalysis) BabyUML-rOOts

  13. Five Projections – 1Encapsulated Object «interface» +name + frontload (firstWeek: Integer) +descriptor (name: String) : Dictionary objectID= <2203> Black box: Encapsulated BabyUML-rOOts

  14. <2272>actC (3) <2200>actA (2) <2203>actD (2) <2261>actB (7) Five Projections - 2Collaboration BabyUML-rOOts

  15. Five Projections - 3Interaction <2261> <0321> <2203> <2200> <2272> port actD actA actC actB (2) (2) (3) (7) frontload: 1 frontload: 1 frontload: 3 frontload: 6 frontload: 1 frontload: 8 BabyUML-rOOts

  16. Five Projections – 4Conceptual Object objectID = <2203> 'actD ' activityName = 3 duration = attributes 14 earlyStart = 16 earlyFinish = predecessors = {act B. actC .} name : String = = method methodDict frontload (firstWeek : Integer) = method descriptor : Dictionary = method firstWeek White box: Conceptual : Integer) = BabyUML-rOOts

  17. objectID = <0002> superclass {inspect ... methodDict = 2 format = nil superclass = {} attributes= #Object className = ... = method » ... = method ...= method subclassOf superclass objectID = <0148> objectID = <2203> class « {frontLoa d:... methodDict = 'actD ' activityName = instance ... format = 2 duration = class Object superclass = 8 earlyStart = « instanceOf » #Activity className = 9 earlyFinish = {activityName… attributes= {act B. actC .} predecessors = method #new = name : String = method method #compile: = frontload ( firstWeek : : Integer) = method ...= method descriptor : Dictionary = method Five Projections – 5The Object Descriptor BabyUML-rOOts

  18. «merge» «merge» class instance superclass merged receiving merged receiving Smalltalk - merge1 superclass class instance <0002> Object <0148> Activity <2203> actD 'actD ' {frontLoad:... {inspect ... methodDict = methodDict = 3 ... 2 format = format = 14 Object superclass= nil superclass = #Activity className = 16 {} attributes= {'act B'. ' actC' .} {activityName... attributes= #Object className = method #new = method xxx = method #compile: = Smalltalk - merge2 xxx= method merged receiving merged receiving Component Merge BabyUML-rOOts

  19. <0321> port <2200> actA <2261> actB <2272> actC <2203> actD (2) (7) (3) (2) frontload (1) frontload (1) frontload (3) frontload (6) frontload (1) frontload (8) The Simple Component sampleNet «Component» members <2203> actD < 0321 > « port» name = ' actD' newActivity (name : String, duration : Integer) duration = 2 addDependency (from, to : String) earlyStart = 8 frontload (firstWeek : Integer) earlyFinish = 9 () : String [] {sorted} activityNames predecessors = { actB . ' actC .} activityDescriptor (name: String) : Dictionary successors { } frontload ( firstWeek : Integer) example- white5 BabyUML-rOOts firstWeek : Integer)

  20. sampleNet «Component» «provided interface» <0321> <4002> port maestro newActivity: aString duration: anInteger addDependencyFrom: predName to: succName frontload: firstWeek <2203> actD activityNames activityDescriptor: actName name = 'actD' duration = 2 earlyStart = 8 earlyFinish = 9 predecessors = { actB. 'actC.} successors { } frontload (firstWeek : Integer) The Mastered ComponentConceptual BabyUML-rOOts

  21. frontload: firstWeek | frontActs | activities do: [:act | act resetFrontload]. [(frontActs := activities select: [:act | act earlyStart isNil and: [act predecessors allSatisfy: [:pred | pred earlyStart notNil]]] ) notEmpty] whileTrue: [frontActs do: [:act | act frontload: firstWeek] ] resetFrontload self earlyStart : nil. frontload : start self earlyStart : start. self predecessors do: [ : pred | self earlyStart : (self earlyStart max: pred earlyFinish + 1) ]. The Mastered ComponentInteraction <2261>actB <2203>actD <2200>actA <2272>actC <4002> maestro (2) (7) (3) (2) frontload (1) resetFrontload () resetFrontload () resetFrontload () resetFrontload () frontload (1) frontload (1) frontload (1) earlyFinish () frontload (1) earlyFinish () earlyFinish () BabyUML-rOOts

  22. <2203> : Activity Network «schema» name = ' actD' Activity duration = 2 preds name: string earlyStart = 8 duration: integer * earlyStart : integer earlyFinish = 9 / earlyFinish : integer frontload : firstWeek * succs The Declarative ComponentConceptual sampleNet « port» «Component» maestro <4002> <0321> «database» <0983> BabyUML-rOOts

  23. The Declarative ComponentLayered BabyUML-rOOts

  24. activitiesContext allActs • define query frontAct as • select act • from activities • where act.earlyStart.isNil • and • ( select succ • from dependencies • where succ = act • and pred.earlyStart.isNil) • ) isEmpty resetEarlyStart [frontAc t notNil ] frontContext frontAct frontPreds frontload: : firstWeek frontload : firstWeek self earlyStart : firstWeek . self frontPreds do: [: pred | resetEarlyStart self earlyStart : (self earlyStart max: ( pred earlyFinish + 1))]. self earlyStart : nil. The Declarative Componentfrontloading sequence diagram maestro frontload : firstWeek Network «schema» Activity pred name: duration: * earlyStart / earlyFinish * succ BabyUML-rOOts

  25. actA actC (2) (3) «Component»ProductionControl actD (2)<2203> actB (7) Tool2 MaterialsManagement «Port» «Component» sampleNet «Port» «Port» Tool 1 Manufacturing Summary-1:Divide and Conquer with Components «Port» «Port» BabyUML-rOOts

  26. <2272>actC (3) <2200>actA (2) <2203>actD (2) <2261>actB (7) objectID = <2203> «interface» 'actD ' activityName = name 3 duration = frontload ( firstWeek : Integer) attributes 14 earlyStart = descriptor (name: String) : Dictionary 16 earlyFinish = predecessors = {act B. actC .} name : String = method methodDict objectID = <2203> frontload ( firstWeek : : Integer) = method descriptor : Dictionary = method Summary-2:Four Projections <2261> <0321> <2203> <2200> <2272> port actD actA actC actB (2) (2) (3) (7) frontload: 1 frontload: 1 frontload: 3 frontload: 6 frontload: 1 frontload: 8 Interaction Collaboration White box: Conceptual Black box: Encapsulated BabyUML-rOOts

  27. Output Output Input Input Central Processing Unit Input Communication Bus Central Processing Unit Central Processing Unit Output Memory Disk Memory Tape Tape Disk Memory Tape Communication-Centered CPU-Centered Storage-Centered Procedures Databases [4GL] Schema Language(NIAM) [1G L]Binary HTTP / HTML [ 2GL ] Assembly [3GL++] C ++, Java, C # [ 3GL ]FORTRAN, Algol A Discipline of ProgrammingCombining Three Architectures Conceptual schema (classes) External schema (roles) Internal schema (descriptors) Methods Components Interactions BabyUML-rOOts

  28. New Challenges After 1973 • Evolution: • Requirements change during development • and forever after • Open Systems • Distributed components, • No closed boundaries • Multi Process • Ownership • Computer Literate users • Demand better control • Evolution: • Requirements change during development • and forever after • Open Systems • Distributed components, • No closed boundaries • Multi Process • Ownership • Computer Literate users • Demand better control BabyUML-rOOts

  29. Master Complexity Divide and conquer Scale inner -> global Safe and Secure protect component boundaries Controlled system evolution stored program Support reuse & interchange persistent components BabyUML Goals • Master Complexity • Divide and conquer • Scale • inner -> global • Safe and Secure • protect component boundaries • Controlled system evolution • stored program • Support reuse & interchange • persistent components BabyUML-rOOts

  30. Thank You More info at heim.ifi.uio.no/~trygver BabyUML-rOOts

  31. http://www.ifi.uio.no/~trygvermailto: trygver ‘at’ ifi.uio.no Trygve Reenskaug: Towards a New Discipline of Programming with the BabyUML Language Laboratory.http://heim.ifi.uio.no/~trygver/2005/babyuml/BabyUML.book.pdf [UML] Unified Modeling Language: Superstructure. Version 2.0.Object Management Group. Document ptc/04-10-02 or later http://www.omg.org Edsger Dijkstra: A Discipline of Programming, 1976 Trygve Reenskaug: Empowering People with BabyUML: A sixth GenerationProgramming Language. Opening talk, ECOOP 2004, Oslo.http://heim.ifi.uio.no/~trygver/2004/ECOOP-04/EcoopHandout.pdf Model Driven Architecture See: http://www.omg.org/mda/ Cattell, Barry: The Object Data Standard: ODMG 3.0. Academic Press,London, 2000. ISBN 1-55860-647-4 More details …. BabyUML-rOOts

  32. END END END END END END END BabyUML-rOOts

  33. Early UML Layered architecture Core/MOF M3 Class «instanceOf» «instanceOf» UML M2 Attribute Class «instanceOf» «instanceOf» Design Person M1 age: Integer «instanceOf» Application Mike: Person M0 age = 11 BabyUML-rOOts

  34. BMetaMetaclass M3 «instance of» «instance of» M2 BMetaSimpleclass «instance of» M1 BActivity BBehavior «instance of» BObject M0 actA actB actC Instatiation contra Inheritance BabyUML-rOOts

  35. BMetaMetaclass M3 «instance of» «instance of» M2 BMetaSimpleclass «instance of» M1 BActivity BBehavior «instance of» BObject M0 actA actB actC BabyUMLInitial instantiation structure BabyUML-rOOts

  36. BabyUMLClass Inheritance Structure ProtoObject (Squeak) BBObject BBehavior BActivity BMetaMetaclass BMetaSimpleclass Inheritance5.sdr BabyUML-rOOts

  37. define query frontActivities as • select act • from activities • where act.earlyStart.isNil • and • ( select succ • from dependencies • where succ = act • and pred.earlyStart.isNil) • ) isEmpty frontActivities query BabyUML-rOOts

  38. Smalltalk Object Space (Image)) Object Object Object Object Object Stored Program, Object Computer BabyUML-rOOts

  39. Stored Program, Object Computer Challenge: Comprehend 300.000 objects BabyUML-rOOts

  40. Components UML SuperstructureTop Level Packages CommonBehaviors Profiles Classes AuxiliaryConstructs CompositeStructures UseCases StateMachines Interactions Components Activities Deployments Actions Behavior Structural BabyUML-rOOts

  41. Goal Model (Not UML) Business process model (Activity model. Manual-man/machine-automatic activities) Business information model Stakeholders (Use case model) Main Use Case Model Subsystem Use Case Models Detailed Use Case Models Generated Code & Deployment files Manual Hierarchical Component Models Component Information Models Interface Models Component Class Models GUI Design Sequence Diagrams COMBINEDevelopment Process Overview Business Model Requirements Model Architecture & Design Model Platform Specific Model Business Application www.opengroup.org/combine/ BabyUML-rOOts

  42. New tools needed forcommunication-centered architectures Burj Dubai – 800 m BabyUML-rOOts

  43. actA actC (2) (3) actD (2)<2203> actB (7) Object Object «Port» «Component» sampleNet Object Object «Port» «Port» «Port» Object Object A BabyUML Componentencapsulates other objects «Component» «Port» BabyUML-rOOts

  44. Summary-1:Divide and Conquer with Components BabyUML-rOOts

More Related