SlideShare una empresa de Scribd logo
1 de 93
Rely-Guarantee Approach to
Reasoning about Aspect-Oriented
           Programs
  Raffi Khatchadourian and Neelam Soundarajan
             The Ohio State University
Introduction




• AOP enables modular implementation of cross-
  cutting concerns.
• Reasoning about AOP presents some key
  challenges.
The Problem
The Problem



• Addition of an aspect can change the behavior of
  the base code.
The Problem

                                  Desirable!

• Addition of an aspect can change the behavior of
  the base code.
The Problem

                                  Desirable!

• Addition of an aspect can change the behavior of
  the base code.
• Prior reasoning about the base code may no longer
  be valid.
The Problem

                                   Desirable!

• Addition of an aspect can change the behavior of
  the base code.
• Prior reasoning about the base code may no longer
  be valid.
• May be forced to reason about the entire system
  again accounting for the interleaving.
The Problem

                                   Desirable!

• Addition of an aspect can change the behavior of
  the base code.
• Prior reasoning about the base code may no longer
  be valid.
• May be forced to reason about the entire system
  again accounting for the interleaving.
• Can we make base-code specifications more robust
  to aspectual changes?
Motivation




• [Sullivan FSE’05]:
 1. Separate base and crosscutting concerns.
 2. Implement base concerns in an OO style ignoring
    crosscutting concerns.
 3. Implement the crosscutting concerns as aspects
    that advise the base code directly.


                         4
Insight
Insight

• Aspect-oriented weaving and concurrent execution
  present similar challenges for program analysis.
Insight

• Aspect-oriented weaving and concurrent execution
  present similar challenges for program analysis.
 • AOP case much simpler (restricted interleaving)
Insight

• Aspect-oriented weaving and concurrent execution
  present similar challenges for program analysis.
 • AOP case much simpler (restricted interleaving)
  • Well-defined join points, sequential programs,
     only aspect can intercept the base-code.
Insight

• Aspect-oriented weaving and concurrent execution
  present similar challenges for program analysis.
 • AOP case much simpler (restricted interleaving)
  • Well-defined join points, sequential programs,
     only aspect can intercept the base-code.
 • Concurrent program reasoning generally requires
    knowledge of all processes.
Insight

• Aspect-oriented weaving and concurrent execution
  present similar challenges for program analysis.
 • AOP case much simpler (restricted interleaving)
  • Well-defined join points, sequential programs,
     only aspect can intercept the base-code.
 • Concurrent program reasoning generally requires
    knowledge of all processes.
   • Not the case in AOP.
Insight

• Aspect-oriented weaving and concurrent execution
  present similar challenges for program analysis.
 • AOP case much simpler (restricted interleaving)
  • Well-defined join points, sequential programs,
     only aspect can intercept the base-code.
 • Concurrent program reasoning generally requires
    knowledge of all processes.
   • Not the case in AOP.
• An approach known from concurrent
  programming, rely-guarantee [Xu97], can be
  adapted and then used to make AO programs more
  analyzable.
Notation




                the set of all variables of
     σ          the program

                states in which each
σi , σj , ...   variable has a particular
                value
!1




!2




!3
!1

      Aspect




!2'




!3
The Rely() Clause
The Rely() Clause




• Identify a relation rely() that is a predicate over two
  states, σa and σb.
The Rely() Clause




• Identify a relation rely() that is a predicate over two
  states, σa and σb.
• rely() will not correspond to the actual behavior of
  advice.
The Rely() Clause




• Identify a relation rely() that is a predicate over two
  states, σa and σb.
• rely() will not correspond to the actual behavior of
  advice.
  • specify the kinds of behavior acceptable to m().
!a

     Aspect




!b
The state at a point in the execution
           of a class is σa.

      !a

                        Aspect




      !b
The state at a point in the execution
           of a class is σa.

      !a

                        Aspect




      !b

The state when the class gets control
     back from an aspect is σb.
The state at a point in the execution
           of a class is σa.

      !a

                        Aspect
  rely(σa, σb)


      !b

The state when the class gets control
     back from an aspect is σb.
Rely-Guarantee Approach for AOP
Rely-Guarantee Approach for AOP

A method M under the influence of advice satisfies
        an R/G specification denoted by
Rely-Guarantee Approach for AOP

A method M under the influence of advice satisfies
        an R/G specification denoted by
       M sat (pre, rely, guar, post)
Rely-Guarantee Approach for AOP

A method M under the influence of advice satisfies
        an R/G specification denoted by
       M sat (pre, rely, guar, post)
                       if
Rely-Guarantee Approach for AOP

  A method M under the influence of advice satisfies
           an R/G specification denoted by
           M sat (pre, rely, guar, post)
                           if
1) M is invoked in a state which satisfies pre, and
Rely-Guarantee Approach for AOP

  A method M under the influence of advice satisfies
            an R/G specification denoted by
           M sat (pre, rely, guar, post)
                            if
1) M is invoked in a state which satisfies pre, and
2) all advice transitions satisfies rely,
Rely-Guarantee Approach for AOP

  A method M under the influence of advice satisfies
            an R/G specification denoted by
           M sat (pre, rely, guar, post)
                             if
1) M is invoked in a state which satisfies pre, and
2) all advice transitions satisfies rely,
                           then
Rely-Guarantee Approach for AOP

  A method M under the influence of advice satisfies
            an R/G specification denoted by
            M sat (pre, rely, guar, post)
                             if
1) M is invoked in a state which satisfies pre, and
2) all advice transitions satisfies rely,
                           then
3) all states prior to M being intercepted by advice
will satisfy guar, and
Rely-Guarantee Approach for AOP

  A method M under the influence of advice satisfies
            an R/G specification denoted by
            M sat (pre, rely, guar, post)
                             if
1) M is invoked in a state which satisfies pre, and
2) all advice transitions satisfies rely,
                           then
3) all states prior to M being intercepted by advice
will satisfy guar, and
4) if the computation terminates, the final state will
satisfy post.
Rely-Guarantee Approach for AOP

  A method M under the influence of advice satisfies
            an R/G specification denoted by
            M sat (pre, rely, guar, post)
                             if
1) M is invoked in a state which satisfies pre, and
2) all advice transitions satisfies rely, Pointcut
                           then
3) all states prior to M being intercepted by advice
will satisfy guar, and
4) if the computation terminates, the final state will
satisfy post.
Rely-Guarantee Approach for AOP

  A method M under the influence of advice satisfies
            an R/G specification denoted by
            M sat (pre, rely, guar, post)
                             if
1) M is invoked in a state which satisfies pre, and
2) all advice transitions satisfies rely, Pointcut
                           then
3) all states prior to M being intercepted by advice
will satisfy guar, and for advice
                      pre
4) if the computation terminates, the final state will
satisfy post.
Rely() Example




rely(σ, σ ) ≡ (σ = σ )
Rely() Example


         The entire state
              of C


rely(σ, σ ) ≡ (σ = σ )
Rely() Example




rely(σ, σ ) ≡ (σ = σ )
                        ble ny
                     ica g a
                   pl in !
               y ap ak te
             an m m sta
           ds fro the
         bi e
       or ic s in
      F v
        ad ange
          ch
Rely() Example

      This is
 “Harmless”[D&W
     POPL’06]



rely(σ, σ ) ≡ (σ = σ )
1   class Point {
 2     int x, y;                                      co
 3     int s;                                         pa
 4                                                    qu
 5       public Point(int xi, int yi)                 mi
 6                  { x=xi; y=yi; s=1; }              ha
 7       public int getX() { return (x*s); }          on
 8       public int getY() { return (y*s); }          ma
 9
                                                      dif
10       public void move(int nx, int ny)
11                  { x=nx; y=ny; }
                                                      of
12   }                                                po
13                                                    rel
14   aspect adjustScale    {                          as
15     pointcut m(Point    p):
16       execution(void    Point.move(int,int))       cla
17         && target( p    );                         tha
18
                                                      ad
19       after(Point p) : m(p) {
                                                      in
20          if ((p.x < 5) && (p.y < 5)) { p.s=10; }
21       }                                            we
22   }                                                wi
                                                      ap
                                                      the
                 Figure 1. Point Class and Aspect     on
                                                      po
1   class Point {
  2     int x, y;                                      co
  3     int s;                                         pa
  4                                                    qu
  5       public Point(int xi, int yi)                 mi
  6                  { x=xi; y=yi; s=1; }              ha
  7       public int getX() { return (x*s); }          on
  8       public int getY() { return (y*s); }          ma
  9
                                                       dif
 10   public void move(int nx, int ny)
                                                       of
Coordinates { x=nx; y=ny; }
 11
                                                       po
 12 }
 13                                                    rel
 14   aspect adjustScale    {                          as
 15     pointcut m(Point    p):
 16       execution(void    Point.move(int,int))       cla
 17         && target( p    );                         tha
 18
                                                       ad
 19       after(Point p) : m(p) {
                                                       in
 20          if ((p.x < 5) && (p.y < 5)) { p.s=10; }
 21       }                                            we
 22   }                                                wi
                                                       ap
                                                       the
                  Figure 1. Point Class and Aspect     on
                                                       po
1   class Point {
 2     int x, y;                                      co
 3     int s;                                         pa
                                                      qu
 4
 5       public Point(int xi, int yi)       Scaled    mi
 6                  { x=xi; y=yi; s=1; }              ha
 7       public int getX() { return (x*s); }          on
 8       public int getY() { return (y*s); }          ma
 9
                                                      dif
10       public void move(int nx, int ny)
11                  { x=nx; y=ny; }
                                                      of
12   }                                                po
13                                                    rel
14   aspect adjustScale    {                          as
15     pointcut m(Point    p):
16       execution(void    Point.move(int,int))       cla
17         && target( p    );                         tha
18
                                                      ad
19       after(Point p) : m(p) {
                                                      in
20          if ((p.x < 5) && (p.y < 5)) { p.s=10; }
21       }                                            we
22   }                                                wi
                                                      ap
                                                      the
                 Figure 1. Point Class and Aspect     on
                                                      po
1   class Point {
 2     int x, y;                                      co
 3     int s;                                         pa
 4                                                    qu
 5       public Point(int xi, int yi)                 mi
 6                  { x=xi; y=yi; s=1; }              ha
 7       public int getX() { return (x*s); }          on
 8       public int getY() { return (y*s); }          ma
 9
                                                      dif
10       public void move(int nx, int ny)
11                  { x=nx; y=ny; }
                                                      of
12   }                                                po
13                                                    rel
14   aspect adjustScale    {                          as
15     pointcut m(Point    p):
16       execution(void    Point.move(int,int))       cla
17         && target( p    Too close!
                           );                         tha
18
                                                      ad
19       after(Point p) : m(p) {
                                                      in
20          if ((p.x < 5) && (p.y < 5)) { p.s=10; }
21       }                                            we
22   }                                                wi
                                                      ap
                                                      the
                 Figure 1. Point Class and Aspect     on
                                                      po
1   class Point {
 2     int x, y;                                      co
 3     int s;                                         pa
 4                                                    qu
 5       public Point(int xi, int yi)                 mi
 6                  { x=xi; y=yi; s=1; }              ha
 7       public int getX() { return (x*s); }          on
 8       public int getY() { return (y*s); }          ma
 9
                                                      dif
10       public void move(int nx, int ny)
11                  { x=nx; y=ny; }
                                                      of
12   }                                                po
13                                                    rel
14   aspect adjustScale    {                          as
15     pointcut m(Point    p):
16       execution(void    Point.move(int,int))       cla
17         && target( p    );                         tha
18
                                                      ad
19       after(Point p) : m(p) {
                                                      in
20          if ((p.x < 5) && (p.y < 5)) { p.s=10; }
21       }                                            we
22   }                                                wi
                                   Adjust             ap
                                                      the
                 Figure 1. Point Class and Aspect     on
                                                      po
1   class Point {
 2     int x, y;                                      co
 3     int s;                                         pa
 4                                                    qu
 5       public Point(int xi, int yi)                 mi
 6                  { x=xi; y=yi; s=1; }              ha
 7       public int getX() { return (x*s); }          on
 8       public int getY() { return (y*s); }          ma
 9
                                                      dif
10       public void move(int nx, int ny)
11                  { x=nx; y=ny; }
                                                      of
12   }                                                po
13                                                    rel
14   aspect adjustScale    {                          as
15     pointcut m(Point    p):
16       execution(void    Point.move(int,int))       cla
17         && target( p    );                         tha
18
                                                      ad
19       after(Point p) : m(p) {
                                                      in
20          if ((p.x < 5) && (p.y < 5)) { p.s=10; }
21       }                                            we
22   }                                                wi
                                                      ap
                                                      the
                 Figure 1. Point Class and Aspect     on
                                                      po
Questions
Questions




• Isolated and robust reasoning?
Questions




• Isolated and robust reasoning?
• rely()?
Questions




• Isolated and robust reasoning?
• rely()?
• Verification?
Questions




• Isolated and robust reasoning?
• rely()?
• Verification?
• guar()?
Questions




• Isolated and robust reasoning?
• rely()?
• Verification?
• guar()?
• More verification?
Questions




• Isolated and robust reasoning?
• rely()?
• Verification?
• guar()?
• More verification?
• Composition?
A rely() for class Point




rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)]
A rely() for class Point

rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)]
A rely() for class Point

rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)]



            (σ.s = σ .s)
A rely() for class Point

 rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)]

• Not a fault of the reasoning approach!
A rely() for class Point

 rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)]

• Not a fault of the reasoning approach!
• Must be sure not to impose stronger requirements
  than necessary on aspects that might be developed
  later.
A rely() for class Point

 rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)]

• Not a fault of the reasoning approach!
• Must be sure not to impose stronger requirements
  than necessary on aspects that might be developed
  later.
• Otherwise, we may be forced to redo the task of
  reasoning about the class ...
A rely() for class Point

 rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)]

• Not a fault of the reasoning approach!
• Must be sure not to impose stronger requirements
  than necessary on aspects that might be developed
  later.
• Otherwise, we may be forced to redo the task of
  reasoning about the class ...
• BUT, it is only in these cases where we must redo our
  reasoning.
The guar() Clause
The guar() Clause



• Concurrent programs: the two processes act
  symmetrically.
The guar() Clause



• Concurrent programs: the two processes act
  symmetrically.
• AOP: base-code can’t intercept advice.
The guar() Clause



• Concurrent programs: the two processes act
  symmetrically.
• AOP: base-code can’t intercept advice.
• guar() for AOP
The guar() Clause



• Concurrent programs: the two processes act
  symmetrically.
• AOP: base-code can’t intercept advice.
• guar() for AOP
• The assertion is true in this case.
The guar() Clause



• Concurrent programs: the two processes act
  symmetrically.
• AOP: base-code can’t intercept advice.
• guar() for AOP
• The assertion is true in this case.
 • Aspect not available at time of construction.
The guar() Clause



• Concurrent programs: the two processes act
  symmetrically.
• AOP: base-code can’t intercept advice.
• guar() for AOP
• The assertion is true in this case.
 • Aspect not available at time of construction.
 • Need to consider many possible joinpoints.
The guar() Clause



• Concurrent programs: the two processes act
  symmetrically.
• AOP: base-code can’t intercept advice.
• guar() for AOP
• The assertion is true in this case.
 • Aspect not available at time of construction.
 • Need to consider many possible joinpoints.
 • guar() may not be strong enough for future.
9                                                                 d
             public void move(int nx, int ny)                         o
    10
    11                  { x=nx; y=ny; }
                                        The Reasoning          Processp
            class Point {
•                                                                     r
    12   }    1
    Do not have information
    13    2   int x, y;                   about the value of          a
    Point.s s;
    14 aspect int
          3   adjustScale {
    15       pointcut m(Point p):
              4
                                                                      c
    16             public Point(int xi, int yi)
              5 execution(void Point.move(int,int))
    17        6   && target( p {);
                                 x=xi; y=yi; s=1; }
                                                                      t
    18        7   public int getX() { return (x*s); }                 a
    19       after(Point p) : getY() { return (y*s); }
              8   public int m(p) {                                   i
    20        9   if ((p.x < 5) && (p.y < 5)) { p.s=10; }             w
    21       }
             10       public void move(int nx, int ny)                w
    22   }   11                  { x=nx; y=ny; }                      a
             12   }                                                   t
             13          Figure 1. Point Class and Aspect             o
            aspect adjustScale {
             14                                                       p
         15     pointcut m(Point p):                                  f
                   execution(void Point.move(int,int))
       That is, indeed, precisely what the adjustScale aspect does.
         16                                                           (
                     && target( to an
    The pointcut m() corresponds p ); execution of the move()
         17                                                           o
    method. The after advice specified states that if the point p is
           18                                                         a
    sufficientlyafter(Point p) then the scale factor is set equal to
           19
                 close to the origin, : m(p) {                        P
    ten4 . 20        if ((p.x < the class Point, we see that the
           Thus, if we consider just5) && (p.y < 5)) { p.s=10; }      r
9                                                                 d
             public void move(int nx, int ny)                         o
    10
    11                  { x=nx; y=ny; }
                                        The Reasoning          Processp
            class Point {
•                                                                     r
    12   }    1
    Do not have information
    13    2   int x, y;                   about the value of          a
    Point.s s;
    14 aspect int
          3   adjustScale {
    15       pointcut m(Point p):
              4
                                                                      c
    16             public Point(int xi, int yi)
              5 execution(void Point.move(int,int))
    17        6   && target( p {);
                                 x=xi; y=yi; s=1; }
                                                                      t
    18        7   public int getX() { return (x*s); }                 a
    19       after(Point p) : getY() { return (y*s); }
              8   public int m(p) {                                   i
    20        9   if ((p.x < 5) && (p.y < 5)) { p.s=10; }             w
    21       }
             10       public void move(int nx, int ny)                w
    22   }   11                  { x=nx; y=ny; }                      a
             12   }                                                   t
             13          Figure 1. Point Class and Aspect             o
            aspect adjustScale {
             14                                                       p
         15     pointcut m(Point p):                                  f
                   execution(void Point.move(int,int))
       That is, indeed, precisely what the adjustScale aspect does.
         16                                                           (
                     && target( to an
    The pointcut m() corresponds p ); execution of the move()
         17                                                           o
    method. The after advice specified states that if the point p is
           18                                                         a
    sufficientlyafter(Point p) then the scale factor is set equal to
           19
                 close to the origin, : m(p) {                        P
    ten4 . 20        if ((p.x < the class Point, we see that the
           Thus, if we consider just5) && (p.y < 5)) { p.s=10; }      r
9                                                                 d
             public void move(int nx, int ny)                         o
    10
    11                  { x=nx; y=ny; }
                                        The Reasoning          Processp
            class Point {
•                                                                     r
    12   }    1
    Do not have information
    13    2   int x, y;                   about the value of          a
    Point.s s;
    14 aspect int
          3   adjustScale {
    15       pointcut m(Point p):
              4
                                                                      c
    16             public Point(int xi, int yi)
              5 execution(void Point.move(int,int))
    17        6   && target( p {);
                                 x=xi; y=yi; s=1; }
                                                                      t
    18        7   public int getX() { return (x*s); }                 a
    19       after(Point p) : getY() { return (y*s); }
              8   public int m(p) {                                   i
    20        9   if ((p.x < 5) && (p.y < 5)) { p.s=10; }             w
    21       }
             10       public void move(int nx, int ny)                w
    22   }   11                  { x=nx; y=ny; }                      a
             12   }                                                   t
             13          Figure 1. Point Class and Aspect             o
            aspect adjustScale {
             14                                                       p
         15     pointcut m(Point p):                                  f
                   execution(void Point.move(int,int))
       That is, indeed, precisely what the adjustScale aspect does.
         16                                                           (
                     && target( to an
    The pointcut m() corresponds p ); execution of the move()
         17                                                           o
    method. The after advice specified states that if the point p is
           18                                                         a
    sufficientlyafter(Point p) then the scale factor is set equal to
           19
                 close to the origin, : m(p) {                        P
    ten4 . 20        if ((p.x < the class Point, we see that the
           Thus, if we consider just5) && (p.y < 5)) { p.s=10; }      r
9                                                                   d
             public void move(int nx, int ny)                           o
    10
    11                  { x=nx; y=ny; }
                                        The Reasoning            Processp
            class Point {
•                                                                       r
    12   }    1
    Do not have information
    13    2   int x, y;                about the value of               a
    Point.s s;
    14 aspect int
          3   adjustScale {
    15       pointcut m(Point p):
              4
                                                                         c
    16             public Point(int xi, int yi)
              5 execution(void Point.move(int,int))
    17        6   && target( p {);
                                 x=xi; y=yi; s=1; }
                                                                         t
    18        7   public int getX() { return (x*s); }                    a
    19       after(Point p) : getY() { return (y*s); }
              8   public int m(p) {                                      i
    20        9   if ((p.x < 5) && (p.y < 5)) { p.s=10; }                w
    21       }
             10    public void move(int nx, int ny)                      w
    22   }   11               { x=nx; y=ny; }                            a
•   History variable [Hoare78]
        12 }

             Figure 1. Point Class and Aspect
             13
                                                                         t
                                                                         o
 •     aspect adjustScale {
   Provides additional information required to
             14
         pointcut m(Point p):
             15
                                                                         p
                                                                         f
         establishexecution(voidof the combined system.
                       the behavior Point.move(int,int))
          That is, indeed, precisely what the adjustScale aspect does.
            16                                                           (
                      && target( to an
    The pointcut m() corresponds p ); execution of the move()
           17                                                            o
    method. The after advice specified states that if the point p is
           18                                                            a
    sufficientlyafter(Point p) then the scale factor is set equal to
           19
                 close to the origin, : m(p) {                           P
    ten4 . 20        if ((p.x < the class Point, we see that the
           Thus, if we consider just5) && (p.y < 5)) { p.s=10; }         r
4
 5       public Point(int xi, int History Variable
                                      yi)
 6                    { x=xi; y=yi; s=1; }
 7       Consider intbehavior of Point.move(): }
         public the getX() { return (x*s);
 8       public int getY() { return (y*s); }
 9
10       public void move(int nx, int ny)
11                  { x=nx; y=ny; }
12   }
13
14   aspect What’s the value{of Point.s?
            adjustScale
15     pointcut m(Point p):
16       execution(void Point.move(int,int))
17         && target( p );
18
19       after(Point p) : m(p) {
20          if ((p.x < 5) && (p.y < 5)) { p.s=1
21       }
4
     5       public Point(int xi, int History Variable
                                          yi)
     6                    { x=xi; y=yi; s=1; }
     7       Consider intbehavior of Point.move(): }
             public the getX() { return (x*s);
     8       public int getY() { return (y*s); }
     9
    10       public void move(int nx, int ny)
    11                  { x=nx; y=ny; }
    12   }
    13
    14 aspect What’s the value{of Point.s?
               adjustScale
    15   pointcut m(Point p):
           execution(void Point.move(int,int))
•
    16
     From the && target( p ); know that it does not
    17
              body of move(), we
     change the value of s.
    18


    •
    19
    20
           after(Point p) : m(p) {
         must have been due to aspectual (i.e.,
               if ((p.x < 5) && (p.y < 5)) { p.s=1
    21
         environmental) influence.
           }
Post-condition of Point.move()
Post-condition of Point.move()



• Post-condition of move() will state:
 • Values of x and y are equal to the values for the
    corresponding arguments received.
 • Value of s will be equal to whatever it was when
    the final advice to execute during the execution of
    move() completes.
Post-condition of Point.move()



• Post-condition of move() will state:
 • Values of x and y are equal to the values for the
    corresponding arguments received.
 • Value of s will be equal to whatever it was when
    the final advice to execute during the execution of
    move() completes.

• Can conclude that s will be 10 or what it was at the
  start of the method.
1   class Point {
                                                         But
 2     int x, y;                                      condit
 3     int s;                                         particu
 4                                                    questi
 5       public Point(int xi, int yi)                 might
 6                  { x=xi; y=yi; s=1; }              have t
 7       public int getX() { return (x*s); }          on an
 8       public int getY() { return (y*s); }          may h
 9
                                                      differe
10       public void move(int nx, int ny)
11                  { x=nx; y=ny; }
                                                      of exp
12   }                                                pointc
13                                                    rely()
14   aspect adjustScale    {                          as (1)
15     pointcut m(Point    p):                            Ho
16       execution(void    Point.move(int,int))       class a
17         && target( p    );                         that ap
18
                                                      advice
19       after(Point p) : m(p) {
                                                      in whi
20          if ((p.x < 5) && (p.y < 5)) { p.s=10; }
21       }                                            we wi
22   }                                                will, t
                                                      a pote
                                                      the cla
                 Figure 1. Point Class and Aspect     one or
                                                      possib
1   class Point {
                                                         But
 2     int x, y;                                      condit
 3     int s;                                         particu
 4                                                    questi
 5       public Point(int xi, int yi)                 might
 6                  { x=xi; y=yi; s=1; }              have t
 7       public int getX() { return (x*s); }          on an
 8       public int getY() { return (y*s); }          may h
 9
                                                      differe
10       public void move(int nx, int ny)
11                  { x=nx; y=ny; }
                                                      of exp
12   }                                                pointc
13                                                    rely()
14   aspect adjustScale    {                          as (1)
15     pointcut m(Point    p):                            Ho
16       execution(void    Point.move(int,int))       class a
17         && target( p    );                         that ap
18
                                                      advice
19       after(Point p) : m(p) {
                                                      in whi
20          if ((p.x < 5) && (p.y < 5)) { p.s=10; }
21       }                                            we wi
22   }                                                will, t
                                                      a pote
                                                      the cla
                 Figure 1. Point Class and Aspect     one or
                                                      possib
Conclusion and Future Work
Conclusion and Future Work

• AO programmers already think implicitly about
  rely(), our proposed approach makes this explicit.
Conclusion and Future Work

• AO programmers already think implicitly about
  rely(), our proposed approach makes this explicit.
   • Formally capture properties of we want AO
     programs to exhibit.
Conclusion and Future Work

• AO programmers already think implicitly about
  rely(), our proposed approach makes this explicit.
   • Formally capture properties of we want AO
     programs to exhibit.
   • rely() specifies the kinds of aspectual influence
     the base-code is willing to tolerate so that it
     would not be adversely affected by advice.
Conclusion and Future Work

• AO programmers already think implicitly about
  rely(), our proposed approach makes this explicit.
   • Formally capture properties of we want AO
      programs to exhibit.
   • rely() specifies the kinds of aspectual influence
      the base-code is willing to tolerate so that it
      would not be adversely affected by advice.
• Specifying rely().
Conclusion and Future Work

• AO programmers already think implicitly about
  rely(), our proposed approach makes this explicit.
   • Formally capture properties of we want AO
     programs to exhibit.
   • rely() specifies the kinds of aspectual influence
     the base-code is willing to tolerate so that it
     would not be adversely affected by advice.
• Specifying rely().
• Formal framework, obtaining richer behavior.
Conclusion and Future Work

• AO programmers already think implicitly about
  rely(), our proposed approach makes this explicit.
   • Formally capture properties of we want AO
     programs to exhibit.
   • rely() specifies the kinds of aspectual influence
     the base-code is willing to tolerate so that it
     would not be adversely affected by advice.
• Specifying rely().
• Formal framework, obtaining richer behavior.
• Multiple applicable advice.
Conclusion and Future Work

• AO programmers already think implicitly about
  rely(), our proposed approach makes this explicit.
   • Formally capture properties of we want AO
     programs to exhibit.
   • rely() specifies the kinds of aspectual influence
     the base-code is willing to tolerate so that it
     would not be adversely affected by advice.
• Specifying rely().
• Formal framework, obtaining richer behavior.
• Multiple applicable advice.
• Tool-supported verification.

Más contenido relacionado

Similar a Rely-Guarantee Approach to Reasoning about Aspect-Oriented Programs

Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs
 Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs
Enforcing Behavioral Constraints in Evolving Aspect-Oriented ProgramsRaffi Khatchadourian
 
Paper Study - Incremental Data-Flow Analysis Algorithms by Ryder et al
Paper Study - Incremental Data-Flow Analysis Algorithms by Ryder et alPaper Study - Incremental Data-Flow Analysis Algorithms by Ryder et al
Paper Study - Incremental Data-Flow Analysis Algorithms by Ryder et alMin-Yih Hsu
 
Backdoors to Satisfiability
Backdoors to SatisfiabilityBackdoors to Satisfiability
Backdoors to Satisfiabilitymsramanujan
 
Stevbros phần 10 hành trang thi pmp và capm
Stevbros phần 10 hành trang thi pmp và capmStevbros phần 10 hành trang thi pmp và capm
Stevbros phần 10 hành trang thi pmp và capmStevbros Training
 
FE3.ppt
FE3.pptFE3.ppt
FE3.pptasde13
 
Rcm modelling uncertainties in rcm with dempster shaffer approach
Rcm modelling uncertainties in rcm with dempster shaffer approachRcm modelling uncertainties in rcm with dempster shaffer approach
Rcm modelling uncertainties in rcm with dempster shaffer approachMehdi Shayestehfar
 
Innoslate's Ontology - LML, SysML, DoDAF, and more
Innoslate's Ontology - LML, SysML, DoDAF, and moreInnoslate's Ontology - LML, SysML, DoDAF, and more
Innoslate's Ontology - LML, SysML, DoDAF, and moreElizabeth Steiner
 
Concepts of predictive control
Concepts of predictive controlConcepts of predictive control
Concepts of predictive controlJARossiter
 
Bounded Model Checking
Bounded Model CheckingBounded Model Checking
Bounded Model CheckingIlham Amezzane
 
The Search for a Better Risk Model - MPT Forum Tokyo March 1st 2012
The Search for a Better Risk Model - MPT Forum Tokyo March 1st 2012The Search for a Better Risk Model - MPT Forum Tokyo March 1st 2012
The Search for a Better Risk Model - MPT Forum Tokyo March 1st 2012yamanote
 
Evaluating long-term predictive power of standard reliability growth models o...
Evaluating long-term predictive power of standard reliability growth models o...Evaluating long-term predictive power of standard reliability growth models o...
Evaluating long-term predictive power of standard reliability growth models o...RAKESH RANA
 
Lec16: Medical Image Registration (Advanced): Deformable Registration
Lec16: Medical Image Registration (Advanced): Deformable RegistrationLec16: Medical Image Registration (Advanced): Deformable Registration
Lec16: Medical Image Registration (Advanced): Deformable RegistrationUlaş Bağcı
 
Textual & Sentiment Analysis of Movie Reviews
Textual & Sentiment Analysis of Movie ReviewsTextual & Sentiment Analysis of Movie Reviews
Textual & Sentiment Analysis of Movie ReviewsYousef Fadila
 
[ASE2014] An Empirical Study on Reducing Omission Errors in Practice
[ASE2014] An Empirical Study on Reducing Omission Errors in Practice[ASE2014] An Empirical Study on Reducing Omission Errors in Practice
[ASE2014] An Empirical Study on Reducing Omission Errors in PracticeJihun Park
 
2007 03-16 modeling and static analysis of complex biological systems dsr
2007 03-16 modeling and static analysis of complex biological systems dsr2007 03-16 modeling and static analysis of complex biological systems dsr
2007 03-16 modeling and static analysis of complex biological systems dsrDebora Da Rosa
 

Similar a Rely-Guarantee Approach to Reasoning about Aspect-Oriented Programs (20)

Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs
 Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs
Enforcing Behavioral Constraints in Evolving Aspect-Oriented Programs
 
Paper Study - Incremental Data-Flow Analysis Algorithms by Ryder et al
Paper Study - Incremental Data-Flow Analysis Algorithms by Ryder et alPaper Study - Incremental Data-Flow Analysis Algorithms by Ryder et al
Paper Study - Incremental Data-Flow Analysis Algorithms by Ryder et al
 
AI Lesson 12
AI Lesson 12AI Lesson 12
AI Lesson 12
 
Design of Design of Technology Transfer Services
Design of Design of Technology Transfer ServicesDesign of Design of Technology Transfer Services
Design of Design of Technology Transfer Services
 
Backdoors to Satisfiability
Backdoors to SatisfiabilityBackdoors to Satisfiability
Backdoors to Satisfiability
 
Essentials for Reliability Practitioners
Essentials for Reliability PractitionersEssentials for Reliability Practitioners
Essentials for Reliability Practitioners
 
Stevbros phần 10 hành trang thi pmp và capm
Stevbros phần 10 hành trang thi pmp và capmStevbros phần 10 hành trang thi pmp và capm
Stevbros phần 10 hành trang thi pmp và capm
 
FE3.ppt
FE3.pptFE3.ppt
FE3.ppt
 
Rcm modelling uncertainties in rcm with dempster shaffer approach
Rcm modelling uncertainties in rcm with dempster shaffer approachRcm modelling uncertainties in rcm with dempster shaffer approach
Rcm modelling uncertainties in rcm with dempster shaffer approach
 
Innoslate's Ontology - LML, SysML, DoDAF, and more
Innoslate's Ontology - LML, SysML, DoDAF, and moreInnoslate's Ontology - LML, SysML, DoDAF, and more
Innoslate's Ontology - LML, SysML, DoDAF, and more
 
Concepts of predictive control
Concepts of predictive controlConcepts of predictive control
Concepts of predictive control
 
Bounded Model Checking
Bounded Model CheckingBounded Model Checking
Bounded Model Checking
 
2_CFD_SEicher.pdf
2_CFD_SEicher.pdf2_CFD_SEicher.pdf
2_CFD_SEicher.pdf
 
The Search for a Better Risk Model - MPT Forum Tokyo March 1st 2012
The Search for a Better Risk Model - MPT Forum Tokyo March 1st 2012The Search for a Better Risk Model - MPT Forum Tokyo March 1st 2012
The Search for a Better Risk Model - MPT Forum Tokyo March 1st 2012
 
Evaluating long-term predictive power of standard reliability growth models o...
Evaluating long-term predictive power of standard reliability growth models o...Evaluating long-term predictive power of standard reliability growth models o...
Evaluating long-term predictive power of standard reliability growth models o...
 
Lec16: Medical Image Registration (Advanced): Deformable Registration
Lec16: Medical Image Registration (Advanced): Deformable RegistrationLec16: Medical Image Registration (Advanced): Deformable Registration
Lec16: Medical Image Registration (Advanced): Deformable Registration
 
Textual & Sentiment Analysis of Movie Reviews
Textual & Sentiment Analysis of Movie ReviewsTextual & Sentiment Analysis of Movie Reviews
Textual & Sentiment Analysis of Movie Reviews
 
m7-logic.ppt
m7-logic.pptm7-logic.ppt
m7-logic.ppt
 
[ASE2014] An Empirical Study on Reducing Omission Errors in Practice
[ASE2014] An Empirical Study on Reducing Omission Errors in Practice[ASE2014] An Empirical Study on Reducing Omission Errors in Practice
[ASE2014] An Empirical Study on Reducing Omission Errors in Practice
 
2007 03-16 modeling and static analysis of complex biological systems dsr
2007 03-16 modeling and static analysis of complex biological systems dsr2007 03-16 modeling and static analysis of complex biological systems dsr
2007 03-16 modeling and static analysis of complex biological systems dsr
 

Más de Raffi Khatchadourian

Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Raffi Khatchadourian
 
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...Automated Evolution of Feature Logging Statement Levels Using Git Histories a...
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...Raffi Khatchadourian
 
A Tool for Rejuvenating Feature Logging Levels via Git Histories and Degree o...
A Tool for Rejuvenating Feature Logging Levels via Git Histories and Degree o...A Tool for Rejuvenating Feature Logging Levels via Git Histories and Degree o...
A Tool for Rejuvenating Feature Logging Levels via Git Histories and Degree o...Raffi Khatchadourian
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Raffi Khatchadourian
 
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...Raffi Khatchadourian
 
An Empirical Study of Refactorings and Technical Debt in Machine Learning Sys...
An Empirical Study of Refactorings and Technical Debt in Machine Learning Sys...An Empirical Study of Refactorings and Technical Debt in Machine Learning Sys...
An Empirical Study of Refactorings and Technical Debt in Machine Learning Sys...Raffi Khatchadourian
 
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...Automated Evolution of Feature Logging Statement Levels Using Git Histories a...
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...Raffi Khatchadourian
 
An Empirical Study on the Use and Misuse of Java 8 Streams
An Empirical Study on the Use and Misuse of Java 8 StreamsAn Empirical Study on the Use and Misuse of Java 8 Streams
An Empirical Study on the Use and Misuse of Java 8 StreamsRaffi Khatchadourian
 
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams
Safe Automated Refactoring for Intelligent Parallelization of Java 8 StreamsSafe Automated Refactoring for Intelligent Parallelization of Java 8 Streams
Safe Automated Refactoring for Intelligent Parallelization of Java 8 StreamsRaffi Khatchadourian
 
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams
Safe Automated Refactoring for Intelligent Parallelization of Java 8 StreamsSafe Automated Refactoring for Intelligent Parallelization of Java 8 Streams
Safe Automated Refactoring for Intelligent Parallelization of Java 8 StreamsRaffi Khatchadourian
 
A Brief Introduction to Type Constraints
A Brief Introduction to Type ConstraintsA Brief Introduction to Type Constraints
A Brief Introduction to Type ConstraintsRaffi Khatchadourian
 
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...Raffi Khatchadourian
 
A Tool for Optimizing Java 8 Stream Software via Automated Refactoring
A Tool for Optimizing Java 8 Stream Software via Automated RefactoringA Tool for Optimizing Java 8 Stream Software via Automated Refactoring
A Tool for Optimizing Java 8 Stream Software via Automated RefactoringRaffi Khatchadourian
 
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...Raffi Khatchadourian
 
Towards Safe Refactoring for Intelligent Parallelization of Java 8 Streams
Towards Safe Refactoring for Intelligent Parallelization of Java 8 StreamsTowards Safe Refactoring for Intelligent Parallelization of Java 8 Streams
Towards Safe Refactoring for Intelligent Parallelization of Java 8 StreamsRaffi Khatchadourian
 
Proactive Empirical Assessment of New Language Feature Adoption via Automated...
Proactive Empirical Assessment of New Language Feature Adoption via Automated...Proactive Empirical Assessment of New Language Feature Adoption via Automated...
Proactive Empirical Assessment of New Language Feature Adoption via Automated...Raffi Khatchadourian
 
Defaultification Refactoring: A Tool for Automatically Converting Java Method...
Defaultification Refactoring: A Tool for Automatically Converting Java Method...Defaultification Refactoring: A Tool for Automatically Converting Java Method...
Defaultification Refactoring: A Tool for Automatically Converting Java Method...Raffi Khatchadourian
 
Defaultification Refactoring: A Tool for Automatically Converting Java Method...
Defaultification Refactoring: A Tool for Automatically Converting Java Method...Defaultification Refactoring: A Tool for Automatically Converting Java Method...
Defaultification Refactoring: A Tool for Automatically Converting Java Method...Raffi Khatchadourian
 
Automated Refactoring of Legacy Java Software to Default Methods Talk at ICSE...
Automated Refactoring of Legacy Java Software to Default Methods Talk at ICSE...Automated Refactoring of Legacy Java Software to Default Methods Talk at ICSE...
Automated Refactoring of Legacy Java Software to Default Methods Talk at ICSE...Raffi Khatchadourian
 
Poster on Automated Refactoring of Legacy Java Software to Default Methods
Poster on Automated Refactoring of Legacy Java Software to Default MethodsPoster on Automated Refactoring of Legacy Java Software to Default Methods
Poster on Automated Refactoring of Legacy Java Software to Default MethodsRaffi Khatchadourian
 

Más de Raffi Khatchadourian (20)

Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
 
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...Automated Evolution of Feature Logging Statement Levels Using Git Histories a...
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...
 
A Tool for Rejuvenating Feature Logging Levels via Git Histories and Degree o...
A Tool for Rejuvenating Feature Logging Levels via Git Histories and Degree o...A Tool for Rejuvenating Feature Logging Levels via Git Histories and Degree o...
A Tool for Rejuvenating Feature Logging Levels via Git Histories and Degree o...
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
 
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...
Actor Concurrency Bugs: A Comprehensive Study on Symptoms, Root Causes, API U...
 
An Empirical Study of Refactorings and Technical Debt in Machine Learning Sys...
An Empirical Study of Refactorings and Technical Debt in Machine Learning Sys...An Empirical Study of Refactorings and Technical Debt in Machine Learning Sys...
An Empirical Study of Refactorings and Technical Debt in Machine Learning Sys...
 
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...Automated Evolution of Feature Logging Statement Levels Using Git Histories a...
Automated Evolution of Feature Logging Statement Levels Using Git Histories a...
 
An Empirical Study on the Use and Misuse of Java 8 Streams
An Empirical Study on the Use and Misuse of Java 8 StreamsAn Empirical Study on the Use and Misuse of Java 8 Streams
An Empirical Study on the Use and Misuse of Java 8 Streams
 
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams
Safe Automated Refactoring for Intelligent Parallelization of Java 8 StreamsSafe Automated Refactoring for Intelligent Parallelization of Java 8 Streams
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams
 
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams
Safe Automated Refactoring for Intelligent Parallelization of Java 8 StreamsSafe Automated Refactoring for Intelligent Parallelization of Java 8 Streams
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams
 
A Brief Introduction to Type Constraints
A Brief Introduction to Type ConstraintsA Brief Introduction to Type Constraints
A Brief Introduction to Type Constraints
 
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
Safe Automated Refactoring for Intelligent Parallelization of Java 8 Streams ...
 
A Tool for Optimizing Java 8 Stream Software via Automated Refactoring
A Tool for Optimizing Java 8 Stream Software via Automated RefactoringA Tool for Optimizing Java 8 Stream Software via Automated Refactoring
A Tool for Optimizing Java 8 Stream Software via Automated Refactoring
 
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...
 
Towards Safe Refactoring for Intelligent Parallelization of Java 8 Streams
Towards Safe Refactoring for Intelligent Parallelization of Java 8 StreamsTowards Safe Refactoring for Intelligent Parallelization of Java 8 Streams
Towards Safe Refactoring for Intelligent Parallelization of Java 8 Streams
 
Proactive Empirical Assessment of New Language Feature Adoption via Automated...
Proactive Empirical Assessment of New Language Feature Adoption via Automated...Proactive Empirical Assessment of New Language Feature Adoption via Automated...
Proactive Empirical Assessment of New Language Feature Adoption via Automated...
 
Defaultification Refactoring: A Tool for Automatically Converting Java Method...
Defaultification Refactoring: A Tool for Automatically Converting Java Method...Defaultification Refactoring: A Tool for Automatically Converting Java Method...
Defaultification Refactoring: A Tool for Automatically Converting Java Method...
 
Defaultification Refactoring: A Tool for Automatically Converting Java Method...
Defaultification Refactoring: A Tool for Automatically Converting Java Method...Defaultification Refactoring: A Tool for Automatically Converting Java Method...
Defaultification Refactoring: A Tool for Automatically Converting Java Method...
 
Automated Refactoring of Legacy Java Software to Default Methods Talk at ICSE...
Automated Refactoring of Legacy Java Software to Default Methods Talk at ICSE...Automated Refactoring of Legacy Java Software to Default Methods Talk at ICSE...
Automated Refactoring of Legacy Java Software to Default Methods Talk at ICSE...
 
Poster on Automated Refactoring of Legacy Java Software to Default Methods
Poster on Automated Refactoring of Legacy Java Software to Default MethodsPoster on Automated Refactoring of Legacy Java Software to Default Methods
Poster on Automated Refactoring of Legacy Java Software to Default Methods
 

Último

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 

Último (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 

Rely-Guarantee Approach to Reasoning about Aspect-Oriented Programs

  • 1. Rely-Guarantee Approach to Reasoning about Aspect-Oriented Programs Raffi Khatchadourian and Neelam Soundarajan The Ohio State University
  • 2. Introduction • AOP enables modular implementation of cross- cutting concerns. • Reasoning about AOP presents some key challenges.
  • 4. The Problem • Addition of an aspect can change the behavior of the base code.
  • 5. The Problem Desirable! • Addition of an aspect can change the behavior of the base code.
  • 6. The Problem Desirable! • Addition of an aspect can change the behavior of the base code. • Prior reasoning about the base code may no longer be valid.
  • 7. The Problem Desirable! • Addition of an aspect can change the behavior of the base code. • Prior reasoning about the base code may no longer be valid. • May be forced to reason about the entire system again accounting for the interleaving.
  • 8. The Problem Desirable! • Addition of an aspect can change the behavior of the base code. • Prior reasoning about the base code may no longer be valid. • May be forced to reason about the entire system again accounting for the interleaving. • Can we make base-code specifications more robust to aspectual changes?
  • 9. Motivation • [Sullivan FSE’05]: 1. Separate base and crosscutting concerns. 2. Implement base concerns in an OO style ignoring crosscutting concerns. 3. Implement the crosscutting concerns as aspects that advise the base code directly. 4
  • 11. Insight • Aspect-oriented weaving and concurrent execution present similar challenges for program analysis.
  • 12. Insight • Aspect-oriented weaving and concurrent execution present similar challenges for program analysis. • AOP case much simpler (restricted interleaving)
  • 13. Insight • Aspect-oriented weaving and concurrent execution present similar challenges for program analysis. • AOP case much simpler (restricted interleaving) • Well-defined join points, sequential programs, only aspect can intercept the base-code.
  • 14. Insight • Aspect-oriented weaving and concurrent execution present similar challenges for program analysis. • AOP case much simpler (restricted interleaving) • Well-defined join points, sequential programs, only aspect can intercept the base-code. • Concurrent program reasoning generally requires knowledge of all processes.
  • 15. Insight • Aspect-oriented weaving and concurrent execution present similar challenges for program analysis. • AOP case much simpler (restricted interleaving) • Well-defined join points, sequential programs, only aspect can intercept the base-code. • Concurrent program reasoning generally requires knowledge of all processes. • Not the case in AOP.
  • 16. Insight • Aspect-oriented weaving and concurrent execution present similar challenges for program analysis. • AOP case much simpler (restricted interleaving) • Well-defined join points, sequential programs, only aspect can intercept the base-code. • Concurrent program reasoning generally requires knowledge of all processes. • Not the case in AOP. • An approach known from concurrent programming, rely-guarantee [Xu97], can be adapted and then used to make AO programs more analyzable.
  • 17. Notation the set of all variables of σ the program states in which each σi , σj , ... variable has a particular value
  • 18.
  • 20.
  • 21.
  • 22. !1 Aspect !2' !3
  • 24. The Rely() Clause • Identify a relation rely() that is a predicate over two states, σa and σb.
  • 25. The Rely() Clause • Identify a relation rely() that is a predicate over two states, σa and σb. • rely() will not correspond to the actual behavior of advice.
  • 26. The Rely() Clause • Identify a relation rely() that is a predicate over two states, σa and σb. • rely() will not correspond to the actual behavior of advice. • specify the kinds of behavior acceptable to m().
  • 27.
  • 28. !a Aspect !b
  • 29. The state at a point in the execution of a class is σa. !a Aspect !b
  • 30. The state at a point in the execution of a class is σa. !a Aspect !b The state when the class gets control back from an aspect is σb.
  • 31. The state at a point in the execution of a class is σa. !a Aspect rely(σa, σb) !b The state when the class gets control back from an aspect is σb.
  • 33. Rely-Guarantee Approach for AOP A method M under the influence of advice satisfies an R/G specification denoted by
  • 34. Rely-Guarantee Approach for AOP A method M under the influence of advice satisfies an R/G specification denoted by M sat (pre, rely, guar, post)
  • 35. Rely-Guarantee Approach for AOP A method M under the influence of advice satisfies an R/G specification denoted by M sat (pre, rely, guar, post) if
  • 36. Rely-Guarantee Approach for AOP A method M under the influence of advice satisfies an R/G specification denoted by M sat (pre, rely, guar, post) if 1) M is invoked in a state which satisfies pre, and
  • 37. Rely-Guarantee Approach for AOP A method M under the influence of advice satisfies an R/G specification denoted by M sat (pre, rely, guar, post) if 1) M is invoked in a state which satisfies pre, and 2) all advice transitions satisfies rely,
  • 38. Rely-Guarantee Approach for AOP A method M under the influence of advice satisfies an R/G specification denoted by M sat (pre, rely, guar, post) if 1) M is invoked in a state which satisfies pre, and 2) all advice transitions satisfies rely, then
  • 39. Rely-Guarantee Approach for AOP A method M under the influence of advice satisfies an R/G specification denoted by M sat (pre, rely, guar, post) if 1) M is invoked in a state which satisfies pre, and 2) all advice transitions satisfies rely, then 3) all states prior to M being intercepted by advice will satisfy guar, and
  • 40. Rely-Guarantee Approach for AOP A method M under the influence of advice satisfies an R/G specification denoted by M sat (pre, rely, guar, post) if 1) M is invoked in a state which satisfies pre, and 2) all advice transitions satisfies rely, then 3) all states prior to M being intercepted by advice will satisfy guar, and 4) if the computation terminates, the final state will satisfy post.
  • 41. Rely-Guarantee Approach for AOP A method M under the influence of advice satisfies an R/G specification denoted by M sat (pre, rely, guar, post) if 1) M is invoked in a state which satisfies pre, and 2) all advice transitions satisfies rely, Pointcut then 3) all states prior to M being intercepted by advice will satisfy guar, and 4) if the computation terminates, the final state will satisfy post.
  • 42. Rely-Guarantee Approach for AOP A method M under the influence of advice satisfies an R/G specification denoted by M sat (pre, rely, guar, post) if 1) M is invoked in a state which satisfies pre, and 2) all advice transitions satisfies rely, Pointcut then 3) all states prior to M being intercepted by advice will satisfy guar, and for advice pre 4) if the computation terminates, the final state will satisfy post.
  • 43. Rely() Example rely(σ, σ ) ≡ (σ = σ )
  • 44. Rely() Example The entire state of C rely(σ, σ ) ≡ (σ = σ )
  • 45. Rely() Example rely(σ, σ ) ≡ (σ = σ ) ble ny ica g a pl in ! y ap ak te an m m sta ds fro the bi e or ic s in F v ad ange ch
  • 46. Rely() Example This is “Harmless”[D&W POPL’06] rely(σ, σ ) ≡ (σ = σ )
  • 47. 1 class Point { 2 int x, y; co 3 int s; pa 4 qu 5 public Point(int xi, int yi) mi 6 { x=xi; y=yi; s=1; } ha 7 public int getX() { return (x*s); } on 8 public int getY() { return (y*s); } ma 9 dif 10 public void move(int nx, int ny) 11 { x=nx; y=ny; } of 12 } po 13 rel 14 aspect adjustScale { as 15 pointcut m(Point p): 16 execution(void Point.move(int,int)) cla 17 && target( p ); tha 18 ad 19 after(Point p) : m(p) { in 20 if ((p.x < 5) && (p.y < 5)) { p.s=10; } 21 } we 22 } wi ap the Figure 1. Point Class and Aspect on po
  • 48. 1 class Point { 2 int x, y; co 3 int s; pa 4 qu 5 public Point(int xi, int yi) mi 6 { x=xi; y=yi; s=1; } ha 7 public int getX() { return (x*s); } on 8 public int getY() { return (y*s); } ma 9 dif 10 public void move(int nx, int ny) of Coordinates { x=nx; y=ny; } 11 po 12 } 13 rel 14 aspect adjustScale { as 15 pointcut m(Point p): 16 execution(void Point.move(int,int)) cla 17 && target( p ); tha 18 ad 19 after(Point p) : m(p) { in 20 if ((p.x < 5) && (p.y < 5)) { p.s=10; } 21 } we 22 } wi ap the Figure 1. Point Class and Aspect on po
  • 49. 1 class Point { 2 int x, y; co 3 int s; pa qu 4 5 public Point(int xi, int yi) Scaled mi 6 { x=xi; y=yi; s=1; } ha 7 public int getX() { return (x*s); } on 8 public int getY() { return (y*s); } ma 9 dif 10 public void move(int nx, int ny) 11 { x=nx; y=ny; } of 12 } po 13 rel 14 aspect adjustScale { as 15 pointcut m(Point p): 16 execution(void Point.move(int,int)) cla 17 && target( p ); tha 18 ad 19 after(Point p) : m(p) { in 20 if ((p.x < 5) && (p.y < 5)) { p.s=10; } 21 } we 22 } wi ap the Figure 1. Point Class and Aspect on po
  • 50. 1 class Point { 2 int x, y; co 3 int s; pa 4 qu 5 public Point(int xi, int yi) mi 6 { x=xi; y=yi; s=1; } ha 7 public int getX() { return (x*s); } on 8 public int getY() { return (y*s); } ma 9 dif 10 public void move(int nx, int ny) 11 { x=nx; y=ny; } of 12 } po 13 rel 14 aspect adjustScale { as 15 pointcut m(Point p): 16 execution(void Point.move(int,int)) cla 17 && target( p Too close! ); tha 18 ad 19 after(Point p) : m(p) { in 20 if ((p.x < 5) && (p.y < 5)) { p.s=10; } 21 } we 22 } wi ap the Figure 1. Point Class and Aspect on po
  • 51. 1 class Point { 2 int x, y; co 3 int s; pa 4 qu 5 public Point(int xi, int yi) mi 6 { x=xi; y=yi; s=1; } ha 7 public int getX() { return (x*s); } on 8 public int getY() { return (y*s); } ma 9 dif 10 public void move(int nx, int ny) 11 { x=nx; y=ny; } of 12 } po 13 rel 14 aspect adjustScale { as 15 pointcut m(Point p): 16 execution(void Point.move(int,int)) cla 17 && target( p ); tha 18 ad 19 after(Point p) : m(p) { in 20 if ((p.x < 5) && (p.y < 5)) { p.s=10; } 21 } we 22 } wi Adjust ap the Figure 1. Point Class and Aspect on po
  • 52. 1 class Point { 2 int x, y; co 3 int s; pa 4 qu 5 public Point(int xi, int yi) mi 6 { x=xi; y=yi; s=1; } ha 7 public int getX() { return (x*s); } on 8 public int getY() { return (y*s); } ma 9 dif 10 public void move(int nx, int ny) 11 { x=nx; y=ny; } of 12 } po 13 rel 14 aspect adjustScale { as 15 pointcut m(Point p): 16 execution(void Point.move(int,int)) cla 17 && target( p ); tha 18 ad 19 after(Point p) : m(p) { in 20 if ((p.x < 5) && (p.y < 5)) { p.s=10; } 21 } we 22 } wi ap the Figure 1. Point Class and Aspect on po
  • 54. Questions • Isolated and robust reasoning?
  • 55. Questions • Isolated and robust reasoning? • rely()?
  • 56. Questions • Isolated and robust reasoning? • rely()? • Verification?
  • 57. Questions • Isolated and robust reasoning? • rely()? • Verification? • guar()?
  • 58. Questions • Isolated and robust reasoning? • rely()? • Verification? • guar()? • More verification?
  • 59. Questions • Isolated and robust reasoning? • rely()? • Verification? • guar()? • More verification? • Composition?
  • 60. A rely() for class Point rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)]
  • 61. A rely() for class Point rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)]
  • 62. A rely() for class Point rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)] (σ.s = σ .s)
  • 63. A rely() for class Point rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)] • Not a fault of the reasoning approach!
  • 64. A rely() for class Point rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)] • Not a fault of the reasoning approach! • Must be sure not to impose stronger requirements than necessary on aspects that might be developed later.
  • 65. A rely() for class Point rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)] • Not a fault of the reasoning approach! • Must be sure not to impose stronger requirements than necessary on aspects that might be developed later. • Otherwise, we may be forced to redo the task of reasoning about the class ...
  • 66. A rely() for class Point rely(σ, σ ) ≡ [(σ.x = σ .x) ∧ (σ.y = σ .y)] • Not a fault of the reasoning approach! • Must be sure not to impose stronger requirements than necessary on aspects that might be developed later. • Otherwise, we may be forced to redo the task of reasoning about the class ... • BUT, it is only in these cases where we must redo our reasoning.
  • 68. The guar() Clause • Concurrent programs: the two processes act symmetrically.
  • 69. The guar() Clause • Concurrent programs: the two processes act symmetrically. • AOP: base-code can’t intercept advice.
  • 70. The guar() Clause • Concurrent programs: the two processes act symmetrically. • AOP: base-code can’t intercept advice. • guar() for AOP
  • 71. The guar() Clause • Concurrent programs: the two processes act symmetrically. • AOP: base-code can’t intercept advice. • guar() for AOP • The assertion is true in this case.
  • 72. The guar() Clause • Concurrent programs: the two processes act symmetrically. • AOP: base-code can’t intercept advice. • guar() for AOP • The assertion is true in this case. • Aspect not available at time of construction.
  • 73. The guar() Clause • Concurrent programs: the two processes act symmetrically. • AOP: base-code can’t intercept advice. • guar() for AOP • The assertion is true in this case. • Aspect not available at time of construction. • Need to consider many possible joinpoints.
  • 74. The guar() Clause • Concurrent programs: the two processes act symmetrically. • AOP: base-code can’t intercept advice. • guar() for AOP • The assertion is true in this case. • Aspect not available at time of construction. • Need to consider many possible joinpoints. • guar() may not be strong enough for future.
  • 75. 9 d public void move(int nx, int ny) o 10 11 { x=nx; y=ny; } The Reasoning Processp class Point { • r 12 } 1 Do not have information 13 2 int x, y; about the value of a Point.s s; 14 aspect int 3 adjustScale { 15 pointcut m(Point p): 4 c 16 public Point(int xi, int yi) 5 execution(void Point.move(int,int)) 17 6 && target( p {); x=xi; y=yi; s=1; } t 18 7 public int getX() { return (x*s); } a 19 after(Point p) : getY() { return (y*s); } 8 public int m(p) { i 20 9 if ((p.x < 5) && (p.y < 5)) { p.s=10; } w 21 } 10 public void move(int nx, int ny) w 22 } 11 { x=nx; y=ny; } a 12 } t 13 Figure 1. Point Class and Aspect o aspect adjustScale { 14 p 15 pointcut m(Point p): f execution(void Point.move(int,int)) That is, indeed, precisely what the adjustScale aspect does. 16 ( && target( to an The pointcut m() corresponds p ); execution of the move() 17 o method. The after advice specified states that if the point p is 18 a sufficientlyafter(Point p) then the scale factor is set equal to 19 close to the origin, : m(p) { P ten4 . 20 if ((p.x < the class Point, we see that the Thus, if we consider just5) && (p.y < 5)) { p.s=10; } r
  • 76. 9 d public void move(int nx, int ny) o 10 11 { x=nx; y=ny; } The Reasoning Processp class Point { • r 12 } 1 Do not have information 13 2 int x, y; about the value of a Point.s s; 14 aspect int 3 adjustScale { 15 pointcut m(Point p): 4 c 16 public Point(int xi, int yi) 5 execution(void Point.move(int,int)) 17 6 && target( p {); x=xi; y=yi; s=1; } t 18 7 public int getX() { return (x*s); } a 19 after(Point p) : getY() { return (y*s); } 8 public int m(p) { i 20 9 if ((p.x < 5) && (p.y < 5)) { p.s=10; } w 21 } 10 public void move(int nx, int ny) w 22 } 11 { x=nx; y=ny; } a 12 } t 13 Figure 1. Point Class and Aspect o aspect adjustScale { 14 p 15 pointcut m(Point p): f execution(void Point.move(int,int)) That is, indeed, precisely what the adjustScale aspect does. 16 ( && target( to an The pointcut m() corresponds p ); execution of the move() 17 o method. The after advice specified states that if the point p is 18 a sufficientlyafter(Point p) then the scale factor is set equal to 19 close to the origin, : m(p) { P ten4 . 20 if ((p.x < the class Point, we see that the Thus, if we consider just5) && (p.y < 5)) { p.s=10; } r
  • 77. 9 d public void move(int nx, int ny) o 10 11 { x=nx; y=ny; } The Reasoning Processp class Point { • r 12 } 1 Do not have information 13 2 int x, y; about the value of a Point.s s; 14 aspect int 3 adjustScale { 15 pointcut m(Point p): 4 c 16 public Point(int xi, int yi) 5 execution(void Point.move(int,int)) 17 6 && target( p {); x=xi; y=yi; s=1; } t 18 7 public int getX() { return (x*s); } a 19 after(Point p) : getY() { return (y*s); } 8 public int m(p) { i 20 9 if ((p.x < 5) && (p.y < 5)) { p.s=10; } w 21 } 10 public void move(int nx, int ny) w 22 } 11 { x=nx; y=ny; } a 12 } t 13 Figure 1. Point Class and Aspect o aspect adjustScale { 14 p 15 pointcut m(Point p): f execution(void Point.move(int,int)) That is, indeed, precisely what the adjustScale aspect does. 16 ( && target( to an The pointcut m() corresponds p ); execution of the move() 17 o method. The after advice specified states that if the point p is 18 a sufficientlyafter(Point p) then the scale factor is set equal to 19 close to the origin, : m(p) { P ten4 . 20 if ((p.x < the class Point, we see that the Thus, if we consider just5) && (p.y < 5)) { p.s=10; } r
  • 78. 9 d public void move(int nx, int ny) o 10 11 { x=nx; y=ny; } The Reasoning Processp class Point { • r 12 } 1 Do not have information 13 2 int x, y; about the value of a Point.s s; 14 aspect int 3 adjustScale { 15 pointcut m(Point p): 4 c 16 public Point(int xi, int yi) 5 execution(void Point.move(int,int)) 17 6 && target( p {); x=xi; y=yi; s=1; } t 18 7 public int getX() { return (x*s); } a 19 after(Point p) : getY() { return (y*s); } 8 public int m(p) { i 20 9 if ((p.x < 5) && (p.y < 5)) { p.s=10; } w 21 } 10 public void move(int nx, int ny) w 22 } 11 { x=nx; y=ny; } a • History variable [Hoare78] 12 } Figure 1. Point Class and Aspect 13 t o • aspect adjustScale { Provides additional information required to 14 pointcut m(Point p): 15 p f establishexecution(voidof the combined system. the behavior Point.move(int,int)) That is, indeed, precisely what the adjustScale aspect does. 16 ( && target( to an The pointcut m() corresponds p ); execution of the move() 17 o method. The after advice specified states that if the point p is 18 a sufficientlyafter(Point p) then the scale factor is set equal to 19 close to the origin, : m(p) { P ten4 . 20 if ((p.x < the class Point, we see that the Thus, if we consider just5) && (p.y < 5)) { p.s=10; } r
  • 79. 4 5 public Point(int xi, int History Variable yi) 6 { x=xi; y=yi; s=1; } 7 Consider intbehavior of Point.move(): } public the getX() { return (x*s); 8 public int getY() { return (y*s); } 9 10 public void move(int nx, int ny) 11 { x=nx; y=ny; } 12 } 13 14 aspect What’s the value{of Point.s? adjustScale 15 pointcut m(Point p): 16 execution(void Point.move(int,int)) 17 && target( p ); 18 19 after(Point p) : m(p) { 20 if ((p.x < 5) && (p.y < 5)) { p.s=1 21 }
  • 80. 4 5 public Point(int xi, int History Variable yi) 6 { x=xi; y=yi; s=1; } 7 Consider intbehavior of Point.move(): } public the getX() { return (x*s); 8 public int getY() { return (y*s); } 9 10 public void move(int nx, int ny) 11 { x=nx; y=ny; } 12 } 13 14 aspect What’s the value{of Point.s? adjustScale 15 pointcut m(Point p): execution(void Point.move(int,int)) • 16 From the && target( p ); know that it does not 17 body of move(), we change the value of s. 18 • 19 20 after(Point p) : m(p) { must have been due to aspectual (i.e., if ((p.x < 5) && (p.y < 5)) { p.s=1 21 environmental) influence. }
  • 82. Post-condition of Point.move() • Post-condition of move() will state: • Values of x and y are equal to the values for the corresponding arguments received. • Value of s will be equal to whatever it was when the final advice to execute during the execution of move() completes.
  • 83. Post-condition of Point.move() • Post-condition of move() will state: • Values of x and y are equal to the values for the corresponding arguments received. • Value of s will be equal to whatever it was when the final advice to execute during the execution of move() completes. • Can conclude that s will be 10 or what it was at the start of the method.
  • 84. 1 class Point { But 2 int x, y; condit 3 int s; particu 4 questi 5 public Point(int xi, int yi) might 6 { x=xi; y=yi; s=1; } have t 7 public int getX() { return (x*s); } on an 8 public int getY() { return (y*s); } may h 9 differe 10 public void move(int nx, int ny) 11 { x=nx; y=ny; } of exp 12 } pointc 13 rely() 14 aspect adjustScale { as (1) 15 pointcut m(Point p): Ho 16 execution(void Point.move(int,int)) class a 17 && target( p ); that ap 18 advice 19 after(Point p) : m(p) { in whi 20 if ((p.x < 5) && (p.y < 5)) { p.s=10; } 21 } we wi 22 } will, t a pote the cla Figure 1. Point Class and Aspect one or possib
  • 85. 1 class Point { But 2 int x, y; condit 3 int s; particu 4 questi 5 public Point(int xi, int yi) might 6 { x=xi; y=yi; s=1; } have t 7 public int getX() { return (x*s); } on an 8 public int getY() { return (y*s); } may h 9 differe 10 public void move(int nx, int ny) 11 { x=nx; y=ny; } of exp 12 } pointc 13 rely() 14 aspect adjustScale { as (1) 15 pointcut m(Point p): Ho 16 execution(void Point.move(int,int)) class a 17 && target( p ); that ap 18 advice 19 after(Point p) : m(p) { in whi 20 if ((p.x < 5) && (p.y < 5)) { p.s=10; } 21 } we wi 22 } will, t a pote the cla Figure 1. Point Class and Aspect one or possib
  • 87. Conclusion and Future Work • AO programmers already think implicitly about rely(), our proposed approach makes this explicit.
  • 88. Conclusion and Future Work • AO programmers already think implicitly about rely(), our proposed approach makes this explicit. • Formally capture properties of we want AO programs to exhibit.
  • 89. Conclusion and Future Work • AO programmers already think implicitly about rely(), our proposed approach makes this explicit. • Formally capture properties of we want AO programs to exhibit. • rely() specifies the kinds of aspectual influence the base-code is willing to tolerate so that it would not be adversely affected by advice.
  • 90. Conclusion and Future Work • AO programmers already think implicitly about rely(), our proposed approach makes this explicit. • Formally capture properties of we want AO programs to exhibit. • rely() specifies the kinds of aspectual influence the base-code is willing to tolerate so that it would not be adversely affected by advice. • Specifying rely().
  • 91. Conclusion and Future Work • AO programmers already think implicitly about rely(), our proposed approach makes this explicit. • Formally capture properties of we want AO programs to exhibit. • rely() specifies the kinds of aspectual influence the base-code is willing to tolerate so that it would not be adversely affected by advice. • Specifying rely(). • Formal framework, obtaining richer behavior.
  • 92. Conclusion and Future Work • AO programmers already think implicitly about rely(), our proposed approach makes this explicit. • Formally capture properties of we want AO programs to exhibit. • rely() specifies the kinds of aspectual influence the base-code is willing to tolerate so that it would not be adversely affected by advice. • Specifying rely(). • Formal framework, obtaining richer behavior. • Multiple applicable advice.
  • 93. Conclusion and Future Work • AO programmers already think implicitly about rely(), our proposed approach makes this explicit. • Formally capture properties of we want AO programs to exhibit. • rely() specifies the kinds of aspectual influence the base-code is willing to tolerate so that it would not be adversely affected by advice. • Specifying rely(). • Formal framework, obtaining richer behavior. • Multiple applicable advice. • Tool-supported verification.

Notas del editor

  1. Hello, my name is Raffi Khatchadourian and today I&amp;#x2019;m going to be discussing a rely-guarantee approach to reasoning about Aspect-Oriented Programs, which is joint work at The Ohio State University with my advisor, Neelam Soundarajan.
  2. We all know how AOP can help us write modular implementations of cross-cutting concerns but what may not be as obvious is the tradeoffs that are presented in respect to the so-called &apos;-ilities&apos; &amp;#x2014; comprehensibility, evolvability, modularity, and analyzability&amp;#x2014; of such programs. In fact, analyzing AO programs can be a non-trivial task and consequently present some key challenges.
  3. To set up some motivation for this notion, let&amp;#x2019;s take a look at a common, yet perhaps unfortunate, design process and architectural style for AOP systems. In fact, Kevin Sullivan and his colleges used this description to motivate their approach on AOP system design in their FSE 2005 paper.
  4. Let&amp;#x2019;s set up an example to demonstrate our proposed approach. In the spirit of previous reasoning papers on AOP, we use a very simplified version of the classic example inspired by JHotDraw. Here, we will consider just a Point class consisting of two coordinates, x and y. &lt;click&gt; We also have corresponding accessor methods for these coordinates that return a potentially modified version of the values. That is, objects of the point class are intended to be drawn on a canvas and we can imagine that the designer of the Point class has built in an optional scaling functionality. &lt;click&gt; The coordinate values are therefore returned scaled to the factor &amp;#x2018;s&amp;#x2019;, an instance variable of class Point, which is initially set to 1 thus having no net affect. &lt;click&gt; Now let&amp;#x2019;s say that figure scaling is considered a cross-cutting concern in the enclosing system and we have a suitable aspect that encapsulates this cross-cutting functionality. It is considered that points too close to the origin (5 in this example) should be scaled accordingly in order preserve visibility. This is precisely what the adjustScale aspect does. In this simplified example, the aspect advises execution of the method move of class Point (which sets the coordinates to the values provided by its parameters). If after execution of this method &lt;click&gt; the coordinates come within a threshold, the scale factor is set accordingly. &lt;click&gt; 10 in this example. Internally, the point retains its intended position but through its accessor methods getX and getY it is painted on the canvas according to the rule we have presented.
  5. Let&amp;#x2019;s set up an example to demonstrate our proposed approach. In the spirit of previous reasoning papers on AOP, we use a very simplified version of the classic example inspired by JHotDraw. Here, we will consider just a Point class consisting of two coordinates, x and y. &lt;click&gt; We also have corresponding accessor methods for these coordinates that return a potentially modified version of the values. That is, objects of the point class are intended to be drawn on a canvas and we can imagine that the designer of the Point class has built in an optional scaling functionality. &lt;click&gt; The coordinate values are therefore returned scaled to the factor &amp;#x2018;s&amp;#x2019;, an instance variable of class Point, which is initially set to 1 thus having no net affect. &lt;click&gt; Now let&amp;#x2019;s say that figure scaling is considered a cross-cutting concern in the enclosing system and we have a suitable aspect that encapsulates this cross-cutting functionality. It is considered that points too close to the origin (5 in this example) should be scaled accordingly in order preserve visibility. This is precisely what the adjustScale aspect does. In this simplified example, the aspect advises execution of the method move of class Point (which sets the coordinates to the values provided by its parameters). If after execution of this method &lt;click&gt; the coordinates come within a threshold, the scale factor is set accordingly. &lt;click&gt; 10 in this example. Internally, the point retains its intended position but through its accessor methods getX and getY it is painted on the canvas according to the rule we have presented.
  6. Let&amp;#x2019;s set up an example to demonstrate our proposed approach. In the spirit of previous reasoning papers on AOP, we use a very simplified version of the classic example inspired by JHotDraw. Here, we will consider just a Point class consisting of two coordinates, x and y. &lt;click&gt; We also have corresponding accessor methods for these coordinates that return a potentially modified version of the values. That is, objects of the point class are intended to be drawn on a canvas and we can imagine that the designer of the Point class has built in an optional scaling functionality. &lt;click&gt; The coordinate values are therefore returned scaled to the factor &amp;#x2018;s&amp;#x2019;, an instance variable of class Point, which is initially set to 1 thus having no net affect. &lt;click&gt; Now let&amp;#x2019;s say that figure scaling is considered a cross-cutting concern in the enclosing system and we have a suitable aspect that encapsulates this cross-cutting functionality. It is considered that points too close to the origin (5 in this example) should be scaled accordingly in order preserve visibility. This is precisely what the adjustScale aspect does. In this simplified example, the aspect advises execution of the method move of class Point (which sets the coordinates to the values provided by its parameters). If after execution of this method &lt;click&gt; the coordinates come within a threshold, the scale factor is set accordingly. &lt;click&gt; 10 in this example. Internally, the point retains its intended position but through its accessor methods getX and getY it is painted on the canvas according to the rule we have presented.
  7. Let&amp;#x2019;s set up an example to demonstrate our proposed approach. In the spirit of previous reasoning papers on AOP, we use a very simplified version of the classic example inspired by JHotDraw. Here, we will consider just a Point class consisting of two coordinates, x and y. &lt;click&gt; We also have corresponding accessor methods for these coordinates that return a potentially modified version of the values. That is, objects of the point class are intended to be drawn on a canvas and we can imagine that the designer of the Point class has built in an optional scaling functionality. &lt;click&gt; The coordinate values are therefore returned scaled to the factor &amp;#x2018;s&amp;#x2019;, an instance variable of class Point, which is initially set to 1 thus having no net affect. &lt;click&gt; Now let&amp;#x2019;s say that figure scaling is considered a cross-cutting concern in the enclosing system and we have a suitable aspect that encapsulates this cross-cutting functionality. It is considered that points too close to the origin (5 in this example) should be scaled accordingly in order preserve visibility. This is precisely what the adjustScale aspect does. In this simplified example, the aspect advises execution of the method move of class Point (which sets the coordinates to the values provided by its parameters). If after execution of this method &lt;click&gt; the coordinates come within a threshold, the scale factor is set accordingly. &lt;click&gt; 10 in this example. Internally, the point retains its intended position but through its accessor methods getX and getY it is painted on the canvas according to the rule we have presented.
  8. Let&amp;#x2019;s set up an example to demonstrate our proposed approach. In the spirit of previous reasoning papers on AOP, we use a very simplified version of the classic example inspired by JHotDraw. Here, we will consider just a Point class consisting of two coordinates, x and y. &lt;click&gt; We also have corresponding accessor methods for these coordinates that return a potentially modified version of the values. That is, objects of the point class are intended to be drawn on a canvas and we can imagine that the designer of the Point class has built in an optional scaling functionality. &lt;click&gt; The coordinate values are therefore returned scaled to the factor &amp;#x2018;s&amp;#x2019;, an instance variable of class Point, which is initially set to 1 thus having no net affect. &lt;click&gt; Now let&amp;#x2019;s say that figure scaling is considered a cross-cutting concern in the enclosing system and we have a suitable aspect that encapsulates this cross-cutting functionality. It is considered that points too close to the origin (5 in this example) should be scaled accordingly in order preserve visibility. This is precisely what the adjustScale aspect does. In this simplified example, the aspect advises execution of the method move of class Point (which sets the coordinates to the values provided by its parameters). If after execution of this method &lt;click&gt; the coordinates come within a threshold, the scale factor is set accordingly. &lt;click&gt; 10 in this example. Internally, the point retains its intended position but through its accessor methods getX and getY it is painted on the canvas according to the rule we have presented.
  9. Let&amp;#x2019;s set up an example to demonstrate our proposed approach. In the spirit of previous reasoning papers on AOP, we use a very simplified version of the classic example inspired by JHotDraw. Here, we will consider just a Point class consisting of two coordinates, x and y. &lt;click&gt; We also have corresponding accessor methods for these coordinates that return a potentially modified version of the values. That is, objects of the point class are intended to be drawn on a canvas and we can imagine that the designer of the Point class has built in an optional scaling functionality. &lt;click&gt; The coordinate values are therefore returned scaled to the factor &amp;#x2018;s&amp;#x2019;, an instance variable of class Point, which is initially set to 1 thus having no net affect. &lt;click&gt; Now let&amp;#x2019;s say that figure scaling is considered a cross-cutting concern in the enclosing system and we have a suitable aspect that encapsulates this cross-cutting functionality. It is considered that points too close to the origin (5 in this example) should be scaled accordingly in order preserve visibility. This is precisely what the adjustScale aspect does. In this simplified example, the aspect advises execution of the method move of class Point (which sets the coordinates to the values provided by its parameters). If after execution of this method &lt;click&gt; the coordinates come within a threshold, the scale factor is set accordingly. &lt;click&gt; 10 in this example. Internally, the point retains its intended position but through its accessor methods getX and getY it is painted on the canvas according to the rule we have presented.
  10. Let&amp;#x2019;s set up an example to demonstrate our proposed approach. In the spirit of previous reasoning papers on AOP, we use a very simplified version of the classic example inspired by JHotDraw. Here, we will consider just a Point class consisting of two coordinates, x and y. &lt;click&gt; We also have corresponding accessor methods for these coordinates that return a potentially modified version of the values. That is, objects of the point class are intended to be drawn on a canvas and we can imagine that the designer of the Point class has built in an optional scaling functionality. &lt;click&gt; The coordinate values are therefore returned scaled to the factor &amp;#x2018;s&amp;#x2019;, an instance variable of class Point, which is initially set to 1 thus having no net affect. &lt;click&gt; Now let&amp;#x2019;s say that figure scaling is considered a cross-cutting concern in the enclosing system and we have a suitable aspect that encapsulates this cross-cutting functionality. It is considered that points too close to the origin (5 in this example) should be scaled accordingly in order preserve visibility. This is precisely what the adjustScale aspect does. In this simplified example, the aspect advises execution of the method move of class Point (which sets the coordinates to the values provided by its parameters). If after execution of this method &lt;click&gt; the coordinates come within a threshold, the scale factor is set accordingly. &lt;click&gt; 10 in this example. Internally, the point retains its intended position but through its accessor methods getX and getY it is painted on the canvas according to the rule we have presented.
  11. Let&amp;#x2019;s set up an example to demonstrate our proposed approach. In the spirit of previous reasoning papers on AOP, we use a very simplified version of the classic example inspired by JHotDraw. Here, we will consider just a Point class consisting of two coordinates, x and y. &lt;click&gt; We also have corresponding accessor methods for these coordinates that return a potentially modified version of the values. That is, objects of the point class are intended to be drawn on a canvas and we can imagine that the designer of the Point class has built in an optional scaling functionality. &lt;click&gt; The coordinate values are therefore returned scaled to the factor &amp;#x2018;s&amp;#x2019;, an instance variable of class Point, which is initially set to 1 thus having no net affect. &lt;click&gt; Now let&amp;#x2019;s say that figure scaling is considered a cross-cutting concern in the enclosing system and we have a suitable aspect that encapsulates this cross-cutting functionality. It is considered that points too close to the origin (5 in this example) should be scaled accordingly in order preserve visibility. This is precisely what the adjustScale aspect does. In this simplified example, the aspect advises execution of the method move of class Point (which sets the coordinates to the values provided by its parameters). If after execution of this method &lt;click&gt; the coordinates come within a threshold, the scale factor is set accordingly. &lt;click&gt; 10 in this example. Internally, the point retains its intended position but through its accessor methods getX and getY it is painted on the canvas according to the rule we have presented.
  12. Let&amp;#x2019;s set up an example to demonstrate our proposed approach. In the spirit of previous reasoning papers on AOP, we use a very simplified version of the classic example inspired by JHotDraw. Here, we will consider just a Point class consisting of two coordinates, x and y. &lt;click&gt; We also have corresponding accessor methods for these coordinates that return a potentially modified version of the values. That is, objects of the point class are intended to be drawn on a canvas and we can imagine that the designer of the Point class has built in an optional scaling functionality. &lt;click&gt; The coordinate values are therefore returned scaled to the factor &amp;#x2018;s&amp;#x2019;, an instance variable of class Point, which is initially set to 1 thus having no net affect. &lt;click&gt; Now let&amp;#x2019;s say that figure scaling is considered a cross-cutting concern in the enclosing system and we have a suitable aspect that encapsulates this cross-cutting functionality. It is considered that points too close to the origin (5 in this example) should be scaled accordingly in order preserve visibility. This is precisely what the adjustScale aspect does. In this simplified example, the aspect advises execution of the method move of class Point (which sets the coordinates to the values provided by its parameters). If after execution of this method &lt;click&gt; the coordinates come within a threshold, the scale factor is set accordingly. &lt;click&gt; 10 in this example. Internally, the point retains its intended position but through its accessor methods getX and getY it is painted on the canvas according to the rule we have presented.
  13. Let&amp;#x2019;s set up an example to demonstrate our proposed approach. In the spirit of previous reasoning papers on AOP, we use a very simplified version of the classic example inspired by JHotDraw. Here, we will consider just a Point class consisting of two coordinates, x and y. &lt;click&gt; We also have corresponding accessor methods for these coordinates that return a potentially modified version of the values. That is, objects of the point class are intended to be drawn on a canvas and we can imagine that the designer of the Point class has built in an optional scaling functionality. &lt;click&gt; The coordinate values are therefore returned scaled to the factor &amp;#x2018;s&amp;#x2019;, an instance variable of class Point, which is initially set to 1 thus having no net affect. &lt;click&gt; Now let&amp;#x2019;s say that figure scaling is considered a cross-cutting concern in the enclosing system and we have a suitable aspect that encapsulates this cross-cutting functionality. It is considered that points too close to the origin (5 in this example) should be scaled accordingly in order preserve visibility. This is precisely what the adjustScale aspect does. In this simplified example, the aspect advises execution of the method move of class Point (which sets the coordinates to the values provided by its parameters). If after execution of this method &lt;click&gt; the coordinates come within a threshold, the scale factor is set accordingly. &lt;click&gt; 10 in this example. Internally, the point retains its intended position but through its accessor methods getX and getY it is painted on the canvas according to the rule we have presented.
  14. Let&amp;#x2019;s set up an example to demonstrate our proposed approach. In the spirit of previous reasoning papers on AOP, we use a very simplified version of the classic example inspired by JHotDraw. Here, we will consider just a Point class consisting of two coordinates, x and y. &lt;click&gt; We also have corresponding accessor methods for these coordinates that return a potentially modified version of the values. That is, objects of the point class are intended to be drawn on a canvas and we can imagine that the designer of the Point class has built in an optional scaling functionality. &lt;click&gt; The coordinate values are therefore returned scaled to the factor &amp;#x2018;s&amp;#x2019;, an instance variable of class Point, which is initially set to 1 thus having no net affect. &lt;click&gt; Now let&amp;#x2019;s say that figure scaling is considered a cross-cutting concern in the enclosing system and we have a suitable aspect that encapsulates this cross-cutting functionality. It is considered that points too close to the origin (5 in this example) should be scaled accordingly in order preserve visibility. This is precisely what the adjustScale aspect does. In this simplified example, the aspect advises execution of the method move of class Point (which sets the coordinates to the values provided by its parameters). If after execution of this method &lt;click&gt; the coordinates come within a threshold, the scale factor is set accordingly. &lt;click&gt; 10 in this example. Internally, the point retains its intended position but through its accessor methods getX and getY it is painted on the canvas according to the rule we have presented.
  15. Let&amp;#x2019;s set up an example to demonstrate our proposed approach. In the spirit of previous reasoning papers on AOP, we use a very simplified version of the classic example inspired by JHotDraw. Here, we will consider just a Point class consisting of two coordinates, x and y. &lt;click&gt; We also have corresponding accessor methods for these coordinates that return a potentially modified version of the values. That is, objects of the point class are intended to be drawn on a canvas and we can imagine that the designer of the Point class has built in an optional scaling functionality. &lt;click&gt; The coordinate values are therefore returned scaled to the factor &amp;#x2018;s&amp;#x2019;, an instance variable of class Point, which is initially set to 1 thus having no net affect. &lt;click&gt; Now let&amp;#x2019;s say that figure scaling is considered a cross-cutting concern in the enclosing system and we have a suitable aspect that encapsulates this cross-cutting functionality. It is considered that points too close to the origin (5 in this example) should be scaled accordingly in order preserve visibility. This is precisely what the adjustScale aspect does. In this simplified example, the aspect advises execution of the method move of class Point (which sets the coordinates to the values provided by its parameters). If after execution of this method &lt;click&gt; the coordinates come within a threshold, the scale factor is set accordingly. &lt;click&gt; 10 in this example. Internally, the point retains its intended position but through its accessor methods getX and getY it is painted on the canvas according to the rule we have presented.
  16. The following questions arise: &lt;click&gt; how to reason about the behaviors of the methods getX(), getY(), and move() of the Point class in isolation of any applicable advice and how to develop reasoning robust to environmental influence. &lt;click&gt; In the rely-guarantee context, what rely() condition that will be applicable to any aspect that may act on the methods of Point should we assume? &lt;click&gt; Then, how do we show that the behavior of the advice defined in the adjustScale aspect is consistent with the rely() condition imposed by the Point class? &lt;click&gt; Also, does the correct functioning of advice require us to impose any conditions on the behaviors of the methods of Point? And if so, how do we go about specifying those conditions? &lt;click&gt; Once we have established that, how do we check that the actual behavior of the Point class satisfies the guar() clause? &lt;click&gt; And finally, how do we arrive at the resulting behavior that the combined system will exhibit?
  17. The following questions arise: &lt;click&gt; how to reason about the behaviors of the methods getX(), getY(), and move() of the Point class in isolation of any applicable advice and how to develop reasoning robust to environmental influence. &lt;click&gt; In the rely-guarantee context, what rely() condition that will be applicable to any aspect that may act on the methods of Point should we assume? &lt;click&gt; Then, how do we show that the behavior of the advice defined in the adjustScale aspect is consistent with the rely() condition imposed by the Point class? &lt;click&gt; Also, does the correct functioning of advice require us to impose any conditions on the behaviors of the methods of Point? And if so, how do we go about specifying those conditions? &lt;click&gt; Once we have established that, how do we check that the actual behavior of the Point class satisfies the guar() clause? &lt;click&gt; And finally, how do we arrive at the resulting behavior that the combined system will exhibit?
  18. The following questions arise: &lt;click&gt; how to reason about the behaviors of the methods getX(), getY(), and move() of the Point class in isolation of any applicable advice and how to develop reasoning robust to environmental influence. &lt;click&gt; In the rely-guarantee context, what rely() condition that will be applicable to any aspect that may act on the methods of Point should we assume? &lt;click&gt; Then, how do we show that the behavior of the advice defined in the adjustScale aspect is consistent with the rely() condition imposed by the Point class? &lt;click&gt; Also, does the correct functioning of advice require us to impose any conditions on the behaviors of the methods of Point? And if so, how do we go about specifying those conditions? &lt;click&gt; Once we have established that, how do we check that the actual behavior of the Point class satisfies the guar() clause? &lt;click&gt; And finally, how do we arrive at the resulting behavior that the combined system will exhibit?
  19. The following questions arise: &lt;click&gt; how to reason about the behaviors of the methods getX(), getY(), and move() of the Point class in isolation of any applicable advice and how to develop reasoning robust to environmental influence. &lt;click&gt; In the rely-guarantee context, what rely() condition that will be applicable to any aspect that may act on the methods of Point should we assume? &lt;click&gt; Then, how do we show that the behavior of the advice defined in the adjustScale aspect is consistent with the rely() condition imposed by the Point class? &lt;click&gt; Also, does the correct functioning of advice require us to impose any conditions on the behaviors of the methods of Point? And if so, how do we go about specifying those conditions? &lt;click&gt; Once we have established that, how do we check that the actual behavior of the Point class satisfies the guar() clause? &lt;click&gt; And finally, how do we arrive at the resulting behavior that the combined system will exhibit?
  20. The following questions arise: &lt;click&gt; how to reason about the behaviors of the methods getX(), getY(), and move() of the Point class in isolation of any applicable advice and how to develop reasoning robust to environmental influence. &lt;click&gt; In the rely-guarantee context, what rely() condition that will be applicable to any aspect that may act on the methods of Point should we assume? &lt;click&gt; Then, how do we show that the behavior of the advice defined in the adjustScale aspect is consistent with the rely() condition imposed by the Point class? &lt;click&gt; Also, does the correct functioning of advice require us to impose any conditions on the behaviors of the methods of Point? And if so, how do we go about specifying those conditions? &lt;click&gt; Once we have established that, how do we check that the actual behavior of the Point class satisfies the guar() clause? &lt;click&gt; And finally, how do we arrive at the resulting behavior that the combined system will exhibit?
  21. The following questions arise: &lt;click&gt; how to reason about the behaviors of the methods getX(), getY(), and move() of the Point class in isolation of any applicable advice and how to develop reasoning robust to environmental influence. &lt;click&gt; In the rely-guarantee context, what rely() condition that will be applicable to any aspect that may act on the methods of Point should we assume? &lt;click&gt; Then, how do we show that the behavior of the advice defined in the adjustScale aspect is consistent with the rely() condition imposed by the Point class? &lt;click&gt; Also, does the correct functioning of advice require us to impose any conditions on the behaviors of the methods of Point? And if so, how do we go about specifying those conditions? &lt;click&gt; Once we have established that, how do we check that the actual behavior of the Point class satisfies the guar() clause? &lt;click&gt; And finally, how do we arrive at the resulting behavior that the combined system will exhibit?