Is AP a sound methodology compared to OO? - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Is AP a sound methodology compared to OO?

Description:

A comparison of effort and static analysis support when working with AP and OO. 9/4/09 ... in many cases AP less effort. Danger of wrong traversals: testing needed. ... – PowerPoint PPT presentation

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

less

Transcript and Presenter's Notes

Title: Is AP a sound methodology compared to OO?


1
Is AP a sound methodology compared to OO?
  • A comparison of effort and static analysis
    support when working with AP and OO

2
Motivation
  • AP has the AI flavor that it automatically
    transforms programs when the context (class
    graph) changes.
  • Some people see this power as a danger.
  • We point out that when a proper software
    engineering process is followed there is no
    danger.
  • Powerful tools can be used in bad ways.

3
Motivation
  • Some people feel that AP tools cannot give the
    same static error messages as OO tools. We show
    that this is not the case.

4
What does AP save during evolution? Terminology.
  • T(G) traversal methods for G.
  • TG(G,S) traversal graph for G and S.
  • Compatible(G,S) Is G compatible with S? For all
    edges (x,y) in S there is a path in G from x to y.

5
What does AP save during evolution? Terminology.
  • Diff(TG1, TG2), Diff(T(G1), T(G2)) list
    differences for each node.
  • Errors(G2,T(G1)) compiler error messages
  • Errors(G2, G1) if G1 has an edge (A,B) then G2
    has such an edge, otherwise report error.

6
For AP library
  • Errors(G2, G1) if G1 has an edge (A,B) then G2
    has such an edge, otherwise report error.
  • Intent Lists all the places where the old
    traversal (G1) brakes if used in new class graph
    (G2).
  • Information for test specification check whether
    redirections are correct.

7
For AP library
  • Errors(G2, G1) if G1 has an edge (A,B) then G2
    has such an edge, otherwise report error.
  • Note The Errors(G2,G1) function is similar to
    checking whether G1 is an instance of G2.

8
What does AP save during evolution?
Written by user
Inspected by user, generated by compiler
  • Both Class graphs G1 and G2. Traversal methods
    T(G1) and T(G2) to be tested.
  • AP Strategy graphs S1, S2. Traversal graphs
    TG(G1,S1) producing T(G1) and TG(G2,S2)
    producing T(G2). Compatible(G1,S1),
    Compatible(G2,S2). Errors(G2, Graph(TG(G1,S1))).
    Diff(TG(G1,S1), TG (G2,S2)).
  • OO T(G1) and T(G2). Compatible(G2,T(G2)). Errors
    (G2,T(G1)). Diff(T(G1), T(G2)).

9
Comparing AP versus OO during evolution effort
Written by user
Inspected by user, generated by compiler
  • AP
  • S1,TS ? S2
  • Compatible(G2,S2)
  • Errors(G2, Graph(TG(G1,S1)))
  • Diff (TG(G1,S1), TG(G2,S2))
  • OO
  • T(G1),TS ? T(G2)
  • Compatible(G2,T(G2))
  • Errors(G2,T(G1))
  • Diff (T(G1), T(G2))

Common G1 ? G2, test(T(G1)), test(T(G2)), trav.
change spec. TS Comparable effort testing
AP less effort on average
10
Comparing AP versus OO during evolution static
checking
Written by user
Inspected by user, generated by compiler
  • AP
  • S1,TS ? S2
  • Compatible(G2,S2)
  • Errors(G2, Graph(TG(G1,S1)))
  • Diff (TG(G1,S1), TG(G2,S2))
  • OO
  • T(G1),TS ? T(G2)
  • Compatible(G2,T(G2))
  • Errors(G2,T(G1))
  • Diff (T(G1), T(G2))

Common G1 ? G2, test(T(G1)), test(T(G2)), trav.
change spec. TS Comparable information
11
Example
S1
A
C
S2
A
B
C
A
B
C
K
A
B
C
G1
G2
X
K
A
B
C
A
B
C
T(G2)
T(G1)
AP
OO
A
B
C
Errors
A
B
C
Errors
K
K
C
C
A
B
A
B
Diff
Diff
12
Example
  • S1 from A to C
  • G1A,BB,C
  • T(G1)A B C
  • Compatible yes
  • Errors no B,C
  • Diff B,CgtB,K. new K,C
  • S2 from A via B to C
  • G2A,BA,XB,KK,CX,C
  • T(G2) A B K C
  • Compatible yes
  • Errors no B,C
  • DiffB,CgtB,K. new K,C

13
Comparison AP versus OO during evolution
  • Static analysis information
  • AP gives similar static information as OO
  • Evolution effort
  • AP never worse than OO
  • in many cases AP less effort
  • Danger of wrong traversals testing needed.
  • OO possibility of errors not detected
    statically.
  • AP possibility of strategy being wrong. If
    strategy correct, traversal guaranteed to be
    correct.

14
Comparison AP versus OO during evolution
  • If class graph changes, it is necessary to
    re-test generated program.
  • Whether program is hand-coded or generated, it
    needs to be tested.

15
Abusing AP
  • No retesting after class graph change. Reusing a
    piece of software (e.g., a strategy) in a new
    context (a new class graph) requires retesting.
    Antidecomposition adequacy rule (Weyuker)
  • There exists a program P and a component Q of P
    such that T is adequate for P, T' is the set of
    vectors of values that variables can assume on
    entrance to Q for some t of T and T' is not
    adequate for Q.

16
Abusing AP
  • Ignoring Errors() and Diff() output because the
    regenerated program compiles. Uncritical
    acceptance of the analogical transformation done
    by the AP compiler.
Write a Comment
User Comments (0)
About PowerShow.com