Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MODULARITY:aosd•13 Keynote Talk by Prof. Reiss

MODULARITY:aosd•13 Keynote Talk by Prof. Reiss

The keynote talk of MODULARITY:aosd•13 titled with "Motherhood and Apple Pie: Modularity in Modern Applications and Tools to Support It" by Steven P. Reiss http://aosd.net/2013/keynotes.html#Reiss

Yoshiki Sato

March 29, 2013
Tweet

More Decks by Yoshiki Sato

Other Decks in Research

Transcript

  1. Motherhood and Apple Pie: Modularity in Modern Applications and Tools

    to Support it Steven P. Reiss Brown University March 22, 2013 Page 1
  2. Motherhood and Apple Pie Motherhood and apple pie :: (US)

    Principles or values with which few disagree. 3/22/13 Page 2
  3. What is Modularity Modularity is the ability to view everything

    related to a particular task on one screen 3/22/13 Page 4
  4. What is Modularity The division of a system into a

    set of independent modules Where modules Represents a set of related concerns Communicate in a loosely-coupled fashion 3/22/13 Page 5
  5. Problem The squiggle is sometimes out of place after a

    character is typed 3/22/13 Page 9
  6. Character Input • Update editor(s) • For the character and

    other effects • Compile and report errors • Update underlying AST structure • Repaint the screen • Handle layout and reflow • Handle reformatting 3/22/13 Page 10
  7. Character Input 3/22/13 Page 11 Event Dispatch Update Selection Auto

    Indent Repaint Request Document Dispatch Auto Completion Update Other Editors Repaint Text Compute Layout Update Eclipse Eclipse AST Update Update Error Set Eclipse Errors Update Annotations Error Notification Update elements Update Elements
  8. Squiggle Code • On ProblemsUpdatedEvent • Lock file { Update

    Problems } Unlock • In update AST structure • { Clear problems } Update tree { Update problems } • Update Problems • Maintain the set of active problems • Remove styles for nonexistent problems • Add squiggle styles for new/cleared problems • When drawing text w/ squiggle style • Use squiggle paint to underline text 3/22/13 Page 12
  9. Is This Modularity? The code is modular ? The dynamics

    of the code are not Which is more important? 3/22/13 Page 14
  10. What are the Problems Black box code (Swing, Eclipse) Separate

    interacting processes Unknown control flow • Multiple threads running at once • Callback orders Our issues are dynamic • We want modularity to reflect the dynamics 3/22/13 Page 15
  11. Smart Sign Code 3/22/13 Page 17 Controller Picture Frame (?)

    Calendar Checker Arduino (C) Bluetooth (C) Arduino Monitor Event Adder Events (Data)
  12. Is this Modular? In terms of code? Adding new events

    (NOTIN) was easy Adding calendar was so-so Adding a new sensor is messy 3/22/13 Page 18
  13. What Are The Problems Externally imposed modularity • Multiple languages

    • Multiple processes • Multiple machines • External code (calendar, obexftp) Part of the program is data • Passed between applications • Representing the rule set 3/22/13 Page 19
  14. Twitter Data Access 3/22/13 Page 22 Streamer Data Insertion Zip/District

    Encoder Web Server HTML Script CSS Data Database Twitter
  15. Is This Modular? What happens when we want to optionally

    normalize the tweet counts? What happens if we want to add author names? 3/22/13 Page 23
  16. Problems Multiple programs Messages (data) are part of the system

    Database is a system component Web application has its own constraints • Front end: HTML, JavaScript, CSS • Back end: JavaScript (Node.JS) 3/22/13 Page 24
  17. Transforms Are Modular Easy to write • Average 300 lines

    each (135-941) Independent • Automatic configuration • Automatic application/detection • Adding a new transform is trivial 3/22/13 Page 28
  18. Difficulties Here We need heuristics to guide transforms • While

    keeping transforms simple to write • While keeping transforms independent • While keeping it easy to add transforms We must modularize transform dynamics • Not their coding 3/22/13 Page 30
  19. What Have We Learned Modularity is in the eye of

    the beholder 3/22/13 Page 32 Modularity
  20. Solutions If we can’t achieve modularity in the code, can

    we achieve it in the view? 3/22/13 Page 37
  21. Multiple View Systems • Scott Myers: SPG-based representation • CMU

    Sheets • IBM Visual Age • UML editors • Grundy’s & Hosking’s Mviews • Hon’s Fluid AOP • Taivalsaari’s Multidimensional Browsing • Microsoft’s Intentional Programming • … 3/22/13 Page 43
  22. Why These Don’t Work Database View-Update Problem • View updates

    are ambiguous in general • No single representation supports all views 3/22/13 Page 44
  23. What Can Be Done Severely restrict allowed editable views •

    Predetermined set, limited restrictions Explicitly define editing operations • Making view creation prohibitive Use read-only views • Limiting their uses and applicability 3/22/13 Page 45
  24. Code Bubbles Modularity Code Bubbles Working Sets • Are static

    modular views of a system • That can be build dynamically Modularization Techniques • Show individual functions or components • Use elision within the components • Include all types of software artifacts • Allow save/restore of working sets 3/22/13 Page 48
  25. Dynamic Software Visualization Visualization for Program Understanding • Needs to

    be done in the programmer’s terms • Needs to be done using proper abstractions Requires dynamic modular views 3/22/13 Page 50
  26. Dynamic Visualizations Generic tools only solve generic problems • They

    don’t solve specific problems • Generic views aren’t modular 3/22/13 Page 56
  27. Why This Doesn’t Work The set of thread states is

    not intuitive nor is the set of events. The whole process is too complex. 3/22/13 Page 60
  28. Automating the Process Can we build these models automatically •

    In general? For particular classes of problems • Threads, Tasks, and Transactions 3/22/13 Page 61
  29. Threads, Tasks, Transactions Automatically • Find event handlers • Find

    significant subtasks • Find Threads and tasks • Find Thread Queues • Based on programmer’s problem definition Provide customized time-based views 3/22/13 Page 62
  30. Challenges Paper titles for Modularity 201x • Automatic creation of

    modular views • Dynamic modularity • Programmer-specified editable modular views • Static views of a program’s dynamic behavior • Behavioral modularity • Dynamic modularity across threads • Modular views of a multilingual web application • Automatic creation of dynamic modular views 3/22/13 Page 66
  31. What is Modularity? • Modularity refers to the compartmentalization and

    inter-relation of the parts of a software package • Modularity is designing a system that is divided into a set of functional units (named modules) that can be composed into a larger application. A module represents a set of related concerns. It can include a collection of related components, such as features, views, or business logic, and pieces of infrastructure, such as 3/22/13 Page 68
  32. Defining Modularity • What is a module? • Source code,

    documentation, design notes, requirements, … • What is a concern? • Whatever we need to look at • For coding, debugging, understanding, … 3/22/13 Page 69
  33. Measuring Modularity • Various measures of metrics for dependencies and

    relationships • How much work to add, modify, or understand a concern • Can you fit the code for one concern on one screen 3/22/13 Page 70
  34. S6 Input Flow 3/22/13 Page 71 SVIWEB (GWT) Firewall XML

    Engine Request Servlet Test Builder Ant Script Test Prototype File Tester Output Generator Solution Set
  35. Problem • Adding a new input test feature • Contracts,

    security constraints • Requires Changing • GWT code, XML, Servlet code, Request structure, Engine, Test builder, test prototype, Ant script 3/22/13 Page 72
  36. Difficulties • Modularity constrained by system • Separate programs are

    needed • Communications protocols are part of code • Multiple languages • Including non-languages (ant) • Including data languages 3/22/13 Page 73