Smaller, More Evolvable Software

Slides:



Advertisements
Similar presentations
2 nd Microsoft Rotor Workshop, Pisa, April 23-25, SCOOPLI for.NET: a library for concurrent object-oriented programming Volkan Arslan, Piotr Nienaltowski.
Advertisements

Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
February R. McFadyen1 Polymorphism Indirection Pure Fabrication Protected Variations (Law of Demeter) More GRASP Patterns.
October - December 2013CSC5021: The Problem With Aspects (J P Gibson)1 The Problem With Aspects (AOP) A style of programming that attempts to abstract.
University of British Columbia Software Practices Lab CAS Seminar 06 Fluid AJ - A Simple Fluid AOP Tool Terry Hon Gregor Kiczales.
March R. McFadyen1 Principle of Least Knowledge – page 265 Principle: talk only to your immediate friends Also called Law of Demeter (LoD)
(C) 1998 Tendril Software Inc. StructureBuilder Tendril Software Inc. OOPSLA ‘98 Demo Neeraj Sangal, President Tendril Software Karl.
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
Polymorphism, Inheritance Pt. 1 COMP 401, Fall 2014 Lecture 7 9/9/2014.
Pattern Language for AP1 Pattern Language for Adaptive Programming (AP) Karl Lieberherr Northeastern University.
Expression evaluation E : S | C. S = int. C = Op E E. Op : A | M. A = “+”. M = “*”.
Generative Programming. Automated Assembly Lines.
Slides for Gregor Kiczales Two versions –short version: Crosscutting capabilities for Java and AspectJ through DJ (4 viewgraphs only) –long version: Controlling.
Not only mark-up languages! There are other many other grammar formalisms and tools than XML. Some of them standardized (ASN). Even XML does not always.
Drawbacks of object-oriented software development Lecture P12 T120B pavasario sem.
Features of AOP languages AOP languages have the following main elements: –a join point model (JPM) wrt base PL –a specification language for expressing.
Pattern Language for AP1 Pattern Language for Adaptive Programming (AP) Karl Lieberherr Northeastern University.
CSG 7111 Structure and Interpretation of an Aspect Language for Datatype Karl Lieberherr.
Adaptive Software Kevin Cella Graduate Seminar 02/04/2005.
Demeter Aspects We study techniques for the emerging area of Aspect-Oriented Software Development and focus on the following areas:  Aspectual Collaborations.
DJ: traversal-visitor-style programming in Java Josh Marshall/ Doug Orleans Want to add more on traversal through collections and Aspectual Components.
Lorenz: Visitor Beans: An Aspect-Oriented Pattern Aspect-oriented pattern: describes a solution to a tangling problem in a particular context.
AOP/cross-cutting What is an aspect?. An aspect is a modular unit that cross-cuts other modular units. What means cross-cutting? Apply AOP to AOP. Tease.
Pattern Language for AP1 Pattern Language for Adaptive Programming (AP) Karl Lieberherr Northeastern University.
Talk only to your friends that share the same concerns (Law of Demeter for Concerns) Midterm Review February 2004.
Unified Modeling Language (UML)
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
Pattern Language for AP1 Pattern Language for Adaptive Programming (AP) Karl Lieberherr Northeastern University.
Chapter 0: Introduction
Crosscutting Capabilities for Java and AspectJ through DJ
Component and Deployment Diagrams
Pattern Language for Adaptive Programming (AP)
Types for Programs and Proofs
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Behavioral Design Patterns
Structure and Interpretation of an Aspect Language for Datatype
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Discussion with Gregor Kiczales at UBC
Demeter Aspects Who We Are Aspectual Collaborations
Generic Programming using Adaptive and Aspect-Oriented Programming
Adaptive Object-Oriented Software Development
Software Design and Development
ADAPTIVE PROGRAMMING Sezen ERDEM December 2005.
Review lecture AOO/Demeter.
Ada – 1983 History’s largest design effort
Software Design and Development
Software Architecture
Third lecture Review Visitor pattern DemeterJ 12/25/2018 SD.
Midterm Review CSU 670 Spring 2004.
AP/DJ AP: a generic technology
Analysis models and design models
Lecture 21: Crosscutting Aspect-Oriented Programming Background
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Better Separation of Crosscutting Concerns with Aspectual Components
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
Third lecture Review Visitor pattern DemeterJ 2/17/2019 SD.
Requirements for better object-oriented design and programming languages Could be organized better.
Lecture 8 Evolution of object behavior Behavioral patterns
APPCs revisited 2/25/2019 APPCs revisited.
AOSD and the Law of Demeter: Shyness in Programming
Software Development CSU 670 Karl Lieberherr
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Objects, components, and Frameworks with UML
Agenda Software development (SD) & Software development methodologies (SDM) Orthogonal views of the software OOSD Methodology Why an Object Orientation?
Coordination aspect Review of AOP Summary of threads in Java
Adaptive Programming in JAsCo
Software Development Process Using UML Recap
Presentation transcript:

Smaller, More Evolvable Software Karl J. Lieberherr Northeastern University College of Computer Science lieber@ccs.neu.edu/www.ccs.neu.edu/home/lieber 11/14/2018 AOP/Demeter

Smaller, More Evolvable Software Use standard Java and OMG technology (UML) with better design and implementation techniques Make smaller by eliminating redundancies Make more evolvable by bringing code closer to design and by avoiding tangling in code 11/14/2018 AOP/Demeter

Thanks to Industrial Collaborators/Sponsors Citibank, SAIC: Adaptive Programming IBM: Theory of contracts, Adaptive Programming Mettler Toledo: OO Evolution Xerox PARC: Aspect-Oriented Programming (Gregor Kiczales et al.) supported by DARPA (EDCS) and NSF 11/14/2018 AOP/Demeter

Many Contributors The Demeter/C++ team (Cun Xiao, Walter Huersch, Ignacio Silva-Lepe, Linda Seiter, …) The Demeter/Java team (Doug Orleans, Johan Ovlinger, Crista Lopes, Kedar Patankar, Joshua Marshall, Binoy Samuel, Geoff Hulten, Linda Seiter, ...) Faculty: Mira Mezini, Jens Palsberg, Boaz Patt-Shamir, Mitchell Wand 11/14/2018 AOP/Demeter

Plan for talk AOP and AP (avoid code tangling) Bus simulation example (untangle structure and behavior) Law of Demeter dilemma and AP Tools for AOP and AP Synchronization aspect History, Technology Transfer 11/14/2018 AOP/Demeter

Theme, Idea good separation of concerns is the goal concerns should be cleanly localized programs should look like designs avoid code tangling Big picture 11/14/2018 AOP/Demeter

Some sources of code tangling Code for a requirement is spread through many classes. In each class, code for different requirements is tangled together. Synchronization code is tangled with sequential code. Data structure information is tangled with behavior. 11/14/2018 AOP/Demeter

Drawbacks of object-oriented software development programs are tangled and redundant data-structure tangling, data structure encoded repeatedly synchronization tangling distribution tangling behavior tangling, pattern tangling programs are hard to maintain and too long because of tangling and redundancy 11/14/2018 AOP/Demeter

Eliminating drawbacks with aspect-oriented programming (AOP) Solution: Split software into cooperating, loosely coupled components and aspect-descriptions. Untangles and eliminates redundancy. Aspect description examples: marshalling, synchronization, exceptions etc. 11/14/2018 AOP/Demeter

Cross-cutting of components and aspects better program ordinary program structure-shy functionality Components structure Aspect 1 avoid tangled programs AOP synchronization Aspect 2 11/14/2018 AOP/Demeter

Aspect-Oriented Programming components and aspect descriptions High-level view, implementation may be different Source Code (tangled code) From Gregor: maybe source code should say: intermediate source code add: picture of a preprocessor style implementation of an AOP system not all AOP systems will be preprocessor like. It is reasonable to expect that in the future the better ones won’t be this is a picture of what AOP is equivalent to, not necessarily how it works. general AOP weaver (compile- time) 11/14/2018 AOP/Demeter

Examples of Aspects Data Structure Synchronization of methods across classes Remote invocation (e.g., using Java RMI) Quality of Service (QoS) Failure handling External use (e.g., being a Java bean) Replication 11/14/2018 AOP/Demeter

What is adaptive programming (AP)? A special case of AOP One of the aspects or the components use graphs which are referred to by traversal strategies. A traversal strategy defines traversals of graphs without referring to the details of the graphs. Adaptive programming is aspect-oriented programming with traversal strategies. 11/14/2018 AOP/Demeter

AOP is useful with and without objects AOP not tied to OO Also AP not tied to OO From now on focus on OO AP Remember: OO AP is a special kind of OO AOP. 11/14/2018 AOP/Demeter

Objects serve many purposes Software objects need to serve many purposes. For each purpose, some of the object structure is noise. Want to filter out that noise and not talk about it. Focus only on what is relevant. Specify object structure in one place. 11/14/2018 AOP/Demeter

Objects serve many purposes shorter A(E+C)... A(D+F)... ABC… A(B+G)... B D A Four purposes F G E 11/14/2018 AOP/Demeter

Benefits of OO AP robustness to changes shorter programs design matches program more understandable code partially automated evolution keep all benefits of OO technology improved productivity ideas can be used without tools Applicable to design and documentation of your current systems. 11/14/2018 AOP/Demeter

Five Patterns Structure-shy Traversal Selective Visitor Structure-shy Object Class Graph Growth Plan Structure is viewed as a separate “module”. 11/14/2018 AOP/Demeter

On-line information $D = www.ccs.neu.edu/research/demeter $D is Demeter Home Page $AOO =$D/course/f97/ Lectures are in: $AOO/lectures Patterns in powerpoint/PLAP.ppt and powerpoint/PLAP-v4.ppt 11/14/2018 AOP/Demeter

1: Basic UML class diagrams Graph with nodes and directed edges and labels for nodes and edges Nodes: classes, edges: relationships labels: class kind, edge kind, cardinality explain details give an example exercise to re-enforce learning 11/14/2018 AOP/Demeter

UML Class Diagram busStops BusRoute BusStopList buses 0..* BusStop BusList waiting Example for developing strategies and writing adaptive programs 0..* passengers Bus PersonList Person 0..* 11/14/2018 AOP/Demeter

2: Traversals / Collaborating classes To process objects we need to traverse them Traversal can be specified by a group of collaborating classes 11/14/2018 AOP/Demeter

Collaborating Classes use connectivity in class diagram to define them succinctly using strategy diagrams separating structure from behavior teasing out the structure aspect from Customer to Agent from Company to Employee 11/14/2018 AOP/Demeter

Collaborating Classes find all persons waiting at any bus stop on a bus route busStops BusRoute BusStopList OO solution: one method for each red class buses 0..* BusStop BusList waiting 0..* passengers Bus PersonList Person 0..* 11/14/2018 AOP/Demeter

3: Traversal Strategy Graphs Want to define traversals succinctly Use graph to express abstraction of class diagram Express traversal intent: useful for documentation of object-oriented programs 11/14/2018 AOP/Demeter

find all persons waiting at any bus stop on a bus route Traversal Strategy first try: from BusRoute to Person busStops BusRoute BusStopList buses 0..* BusStop BusList waiting 0..* passengers Bus PersonList Person 0..* 11/14/2018 AOP/Demeter

find all persons waiting at any bus stop on a bus route Traversal Strategy from BusRoute through BusStop to Person busStops BusRoute BusStopList buses 0..* BusStop BusList waiting 0..* passengers Bus PersonList Person 0..* 11/14/2018 AOP/Demeter

find all persons waiting at any bus stop on a bus route Traversal Strategy Altern.: from BusRoute bypassing Bus to Person busStops BusRoute BusStopList buses 0..* BusStop BusList waiting 0..* passengers Bus PersonList Person 0..* 11/14/2018 AOP/Demeter

Robustness of Strategy find all persons waiting at any bus stop on a bus route Robustness of Strategy from BusRoute bypassing Bus to Person villages BusRoute BusStopList buses VillageList busStops 0..* 0..* BusStop BusList Village waiting 0..* passengers Bus PersonList Person 0..* 11/14/2018 AOP/Demeter

Filter out noise in class diagram only three out of seven classes are mentioned in traversal strategy! from BusRoute through BusStop to Person explain why strategy better replaces traversal methods for the classes BusRoute VillageList Village BusStopList BusStop PersonList Person 11/14/2018 AOP/Demeter

Nature Analogy same strategy in different class graphs: similar traversals same seeds in different climates: similar trees warm climate cold climate 11/14/2018 AOP/Demeter

same cone different planes define different point sets same strategy different class graphs define different path sets Mathematical Analogy 11/14/2018 AOP/Demeter

Why Traversal Strategies? Law of Demeter: a method should talk only to its friends: arguments and part objects (computed or stored) and newly created objects Dilemma: Small method problem of OO (if followed) or Unmaintainable code (if not followed) Traversal strategies are the solution to this dilemma problem solved by traversal strategies 11/14/2018 AOP/Demeter

Law of Demeter (simplified) All suppliers should be preferred suppliers B, C: Class M: Method preferred_supplier supplier B M member_variable_class preferred_supplier supplier B M argument_class C member_function OR 11/14/2018 AOP/Demeter

4: Adaptive Programming How can we use strategies to program? Need to do useful work besides traversing: visitors Incremental behavior composition using visitors 11/14/2018 AOP/Demeter

Writing Adaptive Programs with Strategies strategy: from BusRoute through BusStop to Person BusRoute { traversal waitingPersons(PersonVisitor) { through BusStop to Person; } // from is implicit int printWaitingPersons() // traversal/visitor weaving instr. = waitingPersons(PrintPersonVisitor); PrintPersonVisitor { before Person (@ … @) … } PersonVisitor {init (@ r = 0; @) … } can we really program with strategies? Here is how. Extension of Java: keywords: traversal init through bypassing to before after etc. 11/14/2018 AOP/Demeter

Strategy Diagrams Class Diagrams Object Diagrams Adaptive Programming are use-case based abstractions of Class Diagrams define family of New: abstractions of class diagrams notice affinity to design patterns: some of them also talk about families of class structures explain strategies Object Diagrams 11/14/2018 AOP/Demeter

Strategy Diagrams Object Diagrams Adaptive Programming define traversals of explain strategies Object Diagrams 11/14/2018 AOP/Demeter

Strategy Diagrams Visitors Adaptive Programming guide and inform explain strategies Visitors 11/14/2018 AOP/Demeter

AP An application of automata theory. Apply idea of regular expressions and finite automata to data navigation. 11/14/2018 AOP/Demeter

Strategy Diagrams BusRoute BusStop Person Nodes: positive information: Mark corner stones in class diagram: Overall topology of collaborating classes. 3 nodes: from BusRoute through BusStop to Person explain strategies 11/14/2018 AOP/Demeter

Strategy Diagrams Edges: negative information: bypassing edges incident with Bus BusRoute Person Edges: negative information: Delete edges from class diagram. explain strategies from BusRoute bypassing Bus to Person 11/14/2018 AOP/Demeter

5: Tools for Aspect-Oriented and Adaptive Programming many free tools available, including Aspect/J from Xerox PARC one commercial tool which uses a point and-click interface to define traversals (StructureBuilder from Tendril) 11/14/2018 AOP/Demeter

What is Demeter A high-level interface to object-oriented programming and specification systems Demeter System/OPL = Demeter Method + Demeter Tools/OPL So far: OPL = {Java, C++, Perl, Borland Pascal, Flavors} Demeter Tools/OPL = Demeter/OPL 11/14/2018 AOP/Demeter

Demeter/Java in Demeter/Java structure (*.cd) class diagrams compiler/ weaver structure-shy behavior (*.beh) strategies and visitors structure-shy communication (*.ridl) distribution (under development) more details on Demeter components and aspects structure-shy object description (*.input, at runtime) synchronization (*.cool) multi threading 11/14/2018 AOP/Demeter

Goal of Demeter/Java Avoid code tangling traversal strategies and visitors untangle structure and behavior visitors untangle code for distinct behaviors COOL untangles synchronization issues and behavior RIDL untangles remote invocation issues and behavior 11/14/2018 AOP/Demeter

Free Tools on WWW Demeter/C++ Demeter/Java Demeter/StKlos Dem/Perl5 Dem/C++ Dem/CLOS Demeter/Object Pascal last five developed outside our group this technology is catching on Aspect/J from Xerox 11/14/2018 AOP/Demeter

Cross-cutting in Demeter/Java generated Java program Demeter/Java program structure-shy functionality structure replicated! aspect descriptions are not just copied into programs, they may be replicated several times. synchronization 11/14/2018 AOP/Demeter

Demeter/Java www.ccs.neu.edu/research/demeter class diagrams functionality strategies visitors etc. Executable Java code for your favorite commercial Java Software Development Environment more details on Demeter/Java weaver 11/14/2018 AOP/Demeter

AP Studio visual development of traversal strategies relative to class diagram visual feedback about collaborating classes visual development of annotated UML class diagrams drawing class diagrams and visualizing strategies 11/14/2018 AOP/Demeter

Strengths of Demeter/Java Theory Novel algorithms for strategies Formal semantics correctness theorems Practice Extensive feedback (7 years) Reflective implementation 11/14/2018 AOP/Demeter

Meeting the Needs Demeter/Java Easier evolution of class diagrams (with strategy diagrams) Easier evolution of behavior (with visitors) Easier evolution of objects (with sentences) 11/14/2018 AOP/Demeter

Commercial Tools available on WWW StructureBuilder from Tendril Software Inc. Has support for traversals Neeraj Sangal, CEO www.tendril.com 11/14/2018 AOP/Demeter

Tendril Software, Inc. Researched in Fall/Winter of 1995 Founded in 1996 Sells a new generation of Java development tools using some of the Demeter ideas: point and click traversals and object transportation 11/14/2018 AOP/Demeter

Generated Methods Sequence of actions which contain enough detail to actually generate code Contains a palette of data structures New data structures can be added by writing new templates 11/14/2018 AOP/Demeter

Synchronization Aspect Developed by Crista Lopes Separate synchronization and behavior 11/14/2018 AOP/Demeter

Problem with synchronization code: it is tangled with component code class BoundedBuffer { Object[] array; int putPtr = 0, takePtr = 0; int usedSlots = 0; BoundedBuffer(int capacity){ array = new Object[capacity]; } 11/14/2018 AOP/Demeter

Tangling synchronized void put(Object o) { while (usedSlots == array.length) { try { wait(); } catch (InterruptedException e) {}; } array[putPtr] = o; putPtr = (putPtr +1 ) % array.length; if (usedSlots==0) notifyall(); usedSlots++; // if (usedSlots++==0) notifyall(); The if (usedSlots == 0) is used for efficiency reasons so that other threads are only notified if the buffer switches from empty to nonempty 11/14/2018 AOP/Demeter

Solution: tease apart basics and synchronization write core behavior of buffer write coordinator which deals with synchronization use weaver which combines them together simpler code replace synchronized, wait, notify and notifyall by coordinators 11/14/2018 AOP/Demeter

With coordinator: basics Using Demeter/Java, *.beh file With coordinator: basics BoundedBuffer { public void put (Object o) (@ array[putPtr] = o; putPtr = (putPtr+1)%array.length; usedSlots++; @) public Object take() (@ Object old = array[takePtr]; array[takePtr] = null; takePtr = (takePtr+1)%array.length; usedSlots--; return old; @) 11/14/2018 AOP/Demeter

Coordinator Using Demeter/COOL, put into *.cool file coordinator BoundedBuffer { selfex {put, take} mutex {put, take} boolean empty=(@true@), full=(@false@); exclusion sets coordinator variables 11/14/2018 AOP/Demeter

Coordinator method managers with requires clauses and entry/exit clauses put requires (@ !full @) { on exit (@ empty=false; if (usedSlots==array.length) full=true; @)} take requires (@ !empty @) { on exit (@ full=false; if (usedSlots==0) empty=true; @)} } 11/14/2018 AOP/Demeter

exclusion sets selfex {f,g} mutex {g,h,i} mutex {f,k,l} only one thread can call a selfex method mutex {g,h,i} mutex {f,k,l} if a thread calls a method in a mutex set, no other thread may call a method in the same mutex set. 11/14/2018 AOP/Demeter

Design decisions behind COOL The smallest unit of synchronization is the method. The provider of a service defines the synchronization (monitor approach). Coordination is contained within one coordinator. Association from object to coordinator is static. 11/14/2018 AOP/Demeter

Design decisions behind COOL Deals with thread synchronization within each execution space. No distributed synchronization. Coordinators can access the objects’ state, but they can only modify their own state. Synchronization does not “disturb” objects. Currently a design rule not checked by implementation. 11/14/2018 AOP/Demeter

COOL Provides means for dealing with mutual exclusion of threads, synchronization state, guarded suspension and notification coordinator ! Thread 1 Thread 2 11/14/2018 AOP/Demeter

COOL Identifies “good” abstractions for coordinating the execution of OO programs coordination, not modification of the objects mutual exclusion: sets of methods preconditions on methods coordination state (history-sensitive schemes) state transitions on coordination 11/14/2018 AOP/Demeter

COOL Shape plain Java public class Shape { coordinator Shape { protected double x_ = 0.0; protected double y_ = 0.0; protected double width_ = 0.0; protected double height_ = 0.0; double x() { return x_(); } double y() { return y_(); } double width(){ return width_(); } double height(){ return height_(); void adjustLocation() { x_ = longCalculation1(); y_ = longCalculation2(); void adjustDimensions() { width_ = longCalculation3(); height_ = longCalculation4(); coordinator Shape { selfex {adjustLocation, adjustDimensions} mutex {adjustLocation,x} mutex {adjustLocation,y} mutex {adjustDimensions, width} height} } 11/14/2018 AOP/Demeter

Risks of adaptive OO Advantages: Simpler programs for next project (compensates for learning curve). Programs are easier to evolve and maintain. Disadvantages: Additional training costs. New concepts, debugging techniques and tools to learn. 11/14/2018 AOP/Demeter

Experience regarding training costs GTE project which took approximately four man months by non-adaptive techniques, took only 7 days to complete with adaptive techniques (using Demeter/Java). Our experience with Demeter/C++ is that the first project also has a shorter development time and maintenance is much simpler. 11/14/2018 AOP/Demeter

Real Life Used in several commercial projects Implemented by several independent developers Used in several courses, both academic and commercial 11/14/2018 AOP/Demeter

Scenarios Best: Use Demeter/Java for future projects. Build library of adaptive components. Reduce software development and maintenance costs significantly. Worst: Use Demeter/Java only to generate Java code, but then you maintain Java code manually. You still win since a lot of useful Java code is produced. 11/14/2018 AOP/Demeter

History Hades (HArdware DEScription language by Niklaus Wirth at ETH Zurich) Zeus (a brother of Hades, a silicon compilation language developed at Princeton University/MIT, implemented at GTE Labs; predecessor of VHDL) Demeter (a sister of Zeus, used to implement Zeus, started at GTE Labs) 1982 82-85 1985- 11/14/2018 AOP/Demeter

History First traversal specifications Separation of Concerns paper by Huersch and Lopes started “untangling” movement TR NU-CCS-95-03. Collaboration with Xerox PARC started (initiated in 1994). Gregor Kiczales and his group name and further develop AOP. 1990 1995 1996 11/14/2018 AOP/Demeter

Technology Evolution Object-Oriented Programming Law of Demeter dilemma Tangled structure/behavior Traversal/ Visitor style Adaptive Programming Tangled code Aspect-Oriented Programming 11/14/2018 AOP/Demeter

Benefits of Demeter robustness to changes shorter programs design matches program, more understandable code partially automated evolution keep all benefits of OO technology improved productivity ideas can be used without tools Applicable to design and documentation of your current systems. 11/14/2018 AOP/Demeter

Related Work Gregor Kiczales and his group: Open Implementation, Aspect-Oriented Programming Polytypic programming and shape-polymorphism Alberto Mendelzon: GraphLog query language, query languages for semi-structured data 11/14/2018 AOP/Demeter

Where to get more information Adaptive Programming book Demeter/Java page Demeter home page: www.ccs.neu.edu/research/demeter/ 11/14/2018 AOP/Demeter

Summary What has been learned: Concepts of AOP, simple UML class diagrams, strategies and adaptive programs How can you apply: Demeter/Java takes adaptive programs as input Document object-oriented programs with aspect-descriptions and strategies Design in terms of traversals and visitors and aspects. state what has been learned define ways to apply training 11/14/2018 AOP/Demeter

Idle = <off_hook> Active. Active : PlayingDialTone | Dialing | Connecting | Talking common <on_hook> Idle. PlayingDialTone = <digit> Dialing. Dialing = [<digit> Dialing] <complete> Connecting. Connecting = <connected> Talking. Talking = . Idle off_hook PlayingDialTone 11/14/2018 AOP/Demeter