1 / 32

StructureBuilder Tendril Software Inc.

StructureBuilder Tendril Software Inc. OOPSLA ‘98 Demo Neeraj Sangal , President Tendril Software Karl Lieberherr , Northeastern University (presenter). Overview. Problems Addressed The Concept: Interaction Graphs The Tool: Structure Builder (SB) Generation of executable code from

kchipman
Download Presentation

StructureBuilder Tendril Software Inc.

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. StructureBuilderTendril Software Inc. OOPSLA ‘98 Demo Neeraj Sangal, President Tendril Software Karl Lieberherr, Northeastern University (presenter) www.tendril.com

  2. Overview • Problems Addressed • The Concept: Interaction Graphs • The Tool: Structure Builder (SB) • Generation of executable code from • UML class diagrams • Generalized UML sequence diagrams (interaction graphs) • Other capabilities www.tendril.com

  3. C1 C4 C2 C3 C5 Motivation Interact-1 OOAD C1 Requirements C4 C2 C3 C5 Interact-4 Interact-2 Interact-3 Implementation --> Tangling www.tendril.com

  4. C1 C4 C2 C3 C5 Motivation Structure Builder let‘s you operate at interaction level Interact-1 OOAD C1 Requirements C4 C2 C3 C5 Interact-4 Interact-2 Interact-3 --> Tangling www.tendril.com

  5. Four problems addressed • TANGLING • Cross-cutting of interactions • UPDATE • Difficulty of maintaining UML interaction diagrams • TRANSPORTATION • Object transportation code is difficult to maintain • CONTEXT DEPENDENCY • Context changes are tedious to make www.tendril.com

  6. TANGLING Problem one addressed SB program ordinary program interaction1 interaction2 interaction3 www.tendril.com

  7. TANGLING Problem one addressed • Consequences • No need to distribute interactions manually over several classes • Work at level of interactions • No need to identify interactions from tangled code during maintenance • The interactions are explicit www.tendril.com

  8. TANGLING Problem one addressed • Related to Aspect-Oriented Programming (AOP) • Xerox PARC, Demeter Research Group, OOPSLA ’92 • AOP • Solves complex tangling problems • StructureBuilder • Solves two specific tangling problems: Interaction tangling and transportation tangling www.tendril.com

  9. TANGLING Interaction Tangling SB program ordinary program interaction1 interaction2 interaction3 www.tendril.com

  10. TANGLING Transportation Tangling SB program ordinary program interaction summary interaction properties class diagram www.tendril.com

  11. UPDATE Problem two addressed • UML interaction diagrams are difficult to keep up-to-date with the code. www.tendril.com

  12. UPDATE Problem two addressed So, what? Forget about interaction diagrams? INTERACTION DIAGRAMS No. The point is that they are incomplete. Let’s make them into into complete specifications. www.tendril.com

  13. TRANSPORTATION Problem three addressed • Code for object interactions includes much low-level object transportation code v Class Z v Class A www.tendril.com

  14. CONTEXT DEPENDENCY Problem four addressed • Code for object interactions includes much context-dependent information that makes the code hard to maintain www.tendril.com

  15. CONTEXT DEPENDENCY UML Class Diagram Book LibrarySystem books 0..* HashTable or Vector: Find operation looks very different at code level. users 0..* User www.tendril.com

  16. Solution • Interaction Graph language • Extend interaction diagrams to make them a specification language for object interactions. • Generate code and interaction diagrams • Untangle high-level actions from context information • Untangle object transportation glue code from other interaction code www.tendril.com

  17. Solution (continued) • Programs look like designs • UML class diagrams • Interaction graphs are similar to UML sequence diagrams www.tendril.com

  18. Interaction Graphs • Nodes • Participants/classes: labeled by an access path • Edges • Message sends • Local variables • Communication between participants • Properties • Context of actions www.tendril.com

  19. UML Class Diagram Book Copy LibrarySystem copies books 0..* 0..* book copy users CheckOutItem items 0..* 0..* User www.tendril.com

  20. Sequence diagram CHECKOUT librarySystem books.Find copies.Find users.Find user.addItem CheckOutItem.new items.Add copy.unAvailable user www.tendril.com

  21. Sequence Diagram www.tendril.com

  22. > output < input Summary view of an interaction graph CHECKOUT(bn, uId) librarySystem.books.Find >book< bn book.copies.Find >copy librarySystem.users.Find >user < uId user.addItem CheckOutItem.new >item < book,copy user.items.Add <item copy.unAvailable www.tendril.com

  23. > output < input Where is the graph? It is a tree librarySystem.books.Find >book book.copies.Find >copy librarySystem.users.Find >user user.addItem CheckOutItem.new >item < book,copy user.items.Add <item copy.unAvailable www.tendril.com

  24. > output < input Where is the graph? It is a tree librarySystem librarySystem.books.Find >book book.copies.Find >copy librarySystem.users.Find >user user.addItem CheckOutItem.new >item < book,copy user.items.Add <item copy.unAvailable user www.tendril.com

  25. > output < input What are the properties? CHECKOUT(bn, uId) librarySystem.books.Find >book< bn condition: bn == $curobj.bookName return: book = $curobj book.copies.Find >copy condition: $curobj.isAvailable() return: copy = $curobj www.tendril.com

  26. > output < input What are the properties? CHECKOUT(bn, uId) librarySystem.users.Find >user < uId condition: uId == $curobj.userId user = $curobj user.addItem CheckOutItem.new >item < book,copy item=CheckOutItem(book,copy) user.items.Add <item copy.unAvailable www.tendril.com

  27. Interaction Graph • Defines properties of actions • Provides complete specification • But: is incomplete without a UML class diagram www.tendril.com

  28. Differences Interaction Diagrams - Interaction Graphs • Interaction Graphs • Computationally complete • Have properties containing code and context information • Each action keeps track of input/output www.tendril.com

  29. StructureBuilder capabilities • Full support for UML class diagrams • Reverse engineering of Java code • Immediate code generation • Code and diagrams are synchronized • User can add to generated code but it is not necessary www.tendril.com

  30. StructureBuilder capabilities (continued) • Support for Interaction Graphs • Support for Sequence Diagrams • Generate sequence diagrams from interaction graphs and vice-versa • Object tracker: tells you which variables are currently available • Will be demonstrated for library checkout example www.tendril.com

  31. Connection to Demeter • StructureBuilder was influenced by Demeter/C++ and Demeter/Java • Interaction Graphs are related to propagation patterns: both address tangling of interactions • Object transportation is used in Demeter/C++ www.tendril.com

  32. Next: demo • Summary so far: StructureBuilder introduces a generalization of sequence diagrams to solve four important problems related to OO software development. www.tendril.com

More Related