Presentation is loading. Please wait.

Presentation is loading. Please wait.

AOP/cross-cutting What is an aspect?. An aspect is a modular unit that cross-cuts other modular units. What means cross-cutting? Apply AOP to AOP. Tease.

Similar presentations


Presentation on theme: "AOP/cross-cutting What is an aspect?. An aspect is a modular unit that cross-cuts other modular units. What means cross-cutting? Apply AOP to AOP. Tease."— Presentation transcript:

1 AOP/cross-cutting What is an aspect?

2 An aspect is a modular unit that cross-cuts other modular units. What means cross-cutting? Apply AOP to AOP. Tease an aspect apart into three units: ideal graph, labels on nodes and edges of ideal graph, application to concrete graph using connectors: specifies cross-cutting

3 Example: ACs Ideal graph: participant graph Labels on nodes and edges: participant code Concrete graph: participant graph or application class graph Connectors specify cross-cutting

4 Theory of cross cutting Model programs as graphs (e.g. class diagrams, abstract syntax trees, etc.) Aspects: model as graph editing instructions modeled with respect to an ideal graph. Graph editing: add new nodes and edges and add to node labels and edge labels

5 Specifying cross-cutting Uniform: node to nodes, edge to edges: simple weaving –explicit: {A,B,C,D} –succinct: Nodes(Graph(“From A to D”)) Non-uniform: edge to multiple edges: code is different from target edge to target edge

6 Open-Closed Principle apply to aspects? A satisfactory modular decomposition technique should support modules that are both open and closed. A module is open if it is available for extension A module is closed if it is available for use by other modules

7

8 Static model with behavior Scheduler CourseSession sessions * course * Instructor rating: Grade free(Date,Date) instructors * instructor 0..1 sessions*start: Date end: Date confirmed: Boolean overlaps( Session) Invariant (business rule): inv Instructor::qualifiedFor->includesAll(sessions.course) inv Session:: confirmed ==> instructor <> null and end = start+course.duration Static model courses duration: Duration ** qualifiedFor qualifiedInstructors

9 Minimal specification Action Scheduler::change_dates (Session s, Date d) pre: s.start > now and (1) s.course<>nil and (2) s.course.duration: Days (3) post: s.start = d (4) s.end = d + course.duration (5)

10 Minimal specification Action Scheduler::change_dates (Session s, Date d) pre: s.start > now and (1) /pre s.course<>nil and (2) s.course.duration: Days (3) post: s.start = d (4) /post s.end = d + course.duration (5)

11

12 Which parts are needed? 1, 4


Download ppt "AOP/cross-cutting What is an aspect?. An aspect is a modular unit that cross-cuts other modular units. What means cross-cutting? Apply AOP to AOP. Tease."

Similar presentations


Ads by Google