Evolution of Software Through Adaptive Programming - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Evolution of Software Through Adaptive Programming

Description:

Karl Lieberherr, Cristina Lopes, Mira Mezini, Doug Orleans, Jens Palsberg, Boaz ... Families: Nature Analogy for AP. 10/23/09. EDCS/Demeter - March 98. 7 ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 27
Provided by: karllie
Learn more at: https://www2.ccs.neu.edu
Category:

less

Transcript and Presenter's Notes

Title: Evolution of Software Through Adaptive Programming


1
Evolution of Software Through Adaptive Programming
  • Karl Lieberherr, Cristina Lopes, Mira Mezini,
    Doug Orleans, Jens Palsberg, Boaz Patt-Shamir,
    Mitchell Wand, et al.
  • Northeastern University/
  • Purdue University

1. Tangling 2. AOP/AP 3. Law of Demeter 4.
Visitors/Adjusters 5.Evaluation 6. Demo
2
Many evolution problems come from tangled
designs/programs
  • Code for a requirement is spread through many
    artifacts. In each artifact, code for different
    requirements is tangled together.
  • For example
  • Information structure is tangled with behavior.
    We want structure-shyness.
  • Synchronization code is tangled with sequential
    code (Lopes/Lieberherr (ECOOP 94)).

3
Eliminating drawbacks with Aspect-Oriented
Programming (AOP)
  • Solution Split software into cooperating,
    loosely coupled components and aspect-descriptions
    .
  • Untangles design/programs and eliminates
    redundancy.
  • Aspect description examples marshalling,
    synchronization, information structure etc.

4
Cross-cutting of components and aspects
better program easier to understand!
ordinary program
structure-shy functionality
Components
structure
Aspect 1
synchronization
Aspect 2
5
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.
  • Adaptive programming is aspect-oriented
    programming with traversal strategies.

6
Families Nature Analogy for AP
same seeds in different climates
similar trees same strategy in different class
graphs similar traversals
warm climate
cold climate
7
Families of systems
same cone different planes define
similar point sets same strategy different class
graphs define similar path sets
Mathematical Analogy for AP
8
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
  • If followed Small method problem of OO
  • If not followed Unmaintainable code
  • Traversal strategies are the solution to this
    dilemma

10 year anniversary
Widely used, for example, at JPL for the Mars
exploration software.
Graph patterns for implementing patterns
9
Software Architecture View
  • Software architectures where connections
    necessary for a specific behavior are specified
    approximately, yet precisely, using regular
    expression-like constructs.
  • Improves on conventional architectures by
    supporting structure-shyness allowing both
    simpler and more flexible architectures.

10
Software Architecture View
Behavioral architecture Hierarchies of
strategy graphs
Strategic traversal automata
Visitor/Adjuster
graphs Structural architecture Class
graphs Control
Object graphs
11
Implementation of traversal strategies
  • Based on novel applications and variations of
    standard techniques
  • Intersection of non-deterministic finite automata
  • Simulation of non-deterministic finite automata

12
How to do the interesting work?
  • Traversal strategies only navigate.
  • Visitors and adjusters specify what is done in
    addition to navigation Components.
  • Visitors
  • change group of classes during a traversal
  • plug-and-play organization based on ports
  • parameterized by traversal strategies
  • tree organization

13
  • Specify two interfaces
  • to the class structure they are supposed to
    visit
  • to other visitors they may be connected to

14
getNextResult()
data
c0
c1
c1
next
next
next
c2
c2
control
next()
Higher level
Lower level
15
Adjusters
  • Builds on Batorys mixin layers and supports
    adaptiveness by parameterization with traversal
    strategies.
  • Permanent modification of a group of
    collaborating classes
  • Encapsulate group of related adaptive programs

16
Goal of Demeter/Java
Tools using Demeter ideas Demeter/C,
Demeter/CLOS (BBN), Demeter/Perl5 (MIT), AspectJ
(Xerox PARC)
  • Avoid code tangling and redundancy
  • traversal strategies and visitors untangle
    structure and behavior
  • visitors and adjusters untangle code for distinct
    behaviors
  • COOL untangles synchronization issues and
    behavior
  • RIDL untangles remote invocation issues and
    behavior and structure

17
Success indicators
  • Used in several commercial projects (HP (printer
    family installation), GTE (compiler), Motorola
    (pattern generator), Novell (schema comparator)
  • AspectJ from Xerox PARC (EDCS project) based on
    Cristina Lopes Ph.D. thesis (1998) at
    Northeastern University supported by Xerox PARC.

18
Success indicators Commercialization effort
StructureBuilder from Tendril Software Inc. Has
support for traversals and generates code
controlled by structure.
www.tendril.com
19
EDCS Collaborations
  • Xerox PARC, Gregor Kiczales and Cristina Lopes on
    AOP
  • Don Batory, University of Texas, Austin on
    composing adaptive programs (mixin layers and
    adjusters) and P3, a Jakarta tool.

20
Contributions
  • Productivity
  • reduce labor intensive activities
  • eliminate redundancies, make programs like
    designs
  • Incrementality
  • adapt and build incrementally, reuse of effort
  • plug-and-play visitors parameterized by
    strategies
  • Certainty
  • change with high confidence and predictability
  • cluster related information, avoid tangling

21
More information/getting software
  • Demeter home page
  • www.ccs.neu.edu/research/demeter/

22
Demo Plan
  • Demeter/Java
  • productivity tool for the Web
  • generic aspect weaver
  • used for Behavior, Coordination, Remote
    Invocation
  • strategies
  • Simulation demo

23
New this year
  • Traversal strategies including graphical
    development environment Visual adaptive
    programming
  • A version of plug and play visitors (adaptive
    methods)
  • COOL, RIDL
  • Platform independence

24
Next
  • Adaptive systems
  • plug-and-play visitors and adjusters
  • strategic traversal automata
  • support for hierarchies of strategy graphs
  • Java beans aspect

25
More Examples of Aspects
  • Quality of Service (QoS)
  • Failure handling
  • External use (e.g., being a Java bean)
  • Replication

26
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
Write a Comment
User Comments (0)
About PowerShow.com