Presentation is loading. Please wait.

Presentation is loading. Please wait.

College of Computer Science

Similar presentations


Presentation on theme: "College of Computer Science"— Presentation transcript:

1 College of Computer Science
Karl Lieberherr 5/6/2019 ABB Aspects

2 Northeastern University
Downtown Boston: Between Symphony Hall and Museum of Fine Arts. About students. College of Computer Science and College of Engineering, etc. Focus on Practice-Oriented Education: COOP program 5/6/2019 ABB Aspects

3 Projects Focus on two Projects: Both have connections to Switzerland.
Karl Lieberherr: Demeter and Aspect-Oriented Programming Java tools XML tools Guevara Noubir: Wireless Networks (MANET) Both have connections to Switzerland. There are several more we can draw upon. 5/6/2019 ABB Aspects

4 Benefits for ABB CH Technology transfer
Software design know-how Wireless technology PhD students working for ABB CH in house (about 2 months) in Boston (20 hours per week) Access to faculty and graduate students 5/6/2019 ABB Aspects

5 Possible Collaborations
Minimum yearly presentation for ABB Software developers about trends and techniques in software development Next level: send an ABB employee on Sabbatical at NEU in Boston. Goal: learn about AOSD technology; build prototype. 5/6/2019 ABB Aspects

6 Possible Collaborations
Next level: Support one or more PhD students. 5/6/2019 ABB Aspects

7 Some of my Background Dr. sc. math ETH 1977
Princeton, GTE, Northeastern (since 1985) Demeter Project: Early AOSD project IBM, Mettler-Toledo, Xerox PARC, Citibank, … DARPA project PCES (Doug Schmidt PM) Several presentations at Brown Boveri Research Center (Dr. Speiser) 5/6/2019 ABB Aspects

8 AOSD Aspect-Oriented Software Development
The job of a SOC technology is to turn a tangled and scattered implementation of a concern into a well-modularized implementation of a concern. 5/6/2019 ABB Aspects

9 AOSD Aspect-Oriented Software Development
The job of an AOP (Aspect-Oriented Programming) technology, a special case of SOC, is to turn a tangled and scattered implementation of a crosscutting concern into a well-modularized implementation of a concern. 5/6/2019 ABB Aspects

10 Aspect-Oriented Programming (AOP)
Turn tangled and scattered implementations of a crosscutting concern into a well-modularized implementation of a concern. Tools: AspectJ, DJ, DemeterJ. Design and implementation techniques. 5/6/2019 ABB Aspects

11 Features of AOP languages
AOP languages have the following main elements: a join point model (JPM) wrt base PL a specification language for expressing sets of join points (JPS) a means of specifying behavior involving join points (BJP) encapsulated units combining JPS and BJP (CSB) method of attachment of units to base program (AU) JPS and BJP are sometimes overlapping. JPS might already define an initial behavior plus a set of join points in that behavior. 5/6/2019 ABB Aspects

12 Comparing AspectJ DemeterJ DJ ATC AspectC Aspectual Collaborations
D (COOL, RIDL) BETA RG ABB Aspects 5/6/2019 ABB Aspects

13 Applications of AOP Network-aware applications Resource management
Fault tolerance Adaptive programming 5/6/2019 ABB Aspects

14 AOP Join point model Express sets of join points
Express code to be executed at join points 5/6/2019 ABB Aspects

15 Cross-cutting of components and aspects
better program ordinary program structure-shy functionality Components structure Aspect 1 avoid tangled programs AOP synchronization Aspect 2 5/6/2019 ABB Aspects

16 From Crista Lopes PhD thesis (NU/Xerox PARC)
public class Shape implements ShapeI { protected AdjustableLocation loc; protected AdjustableDimension dim; public Shape() { loc = new AdjustableLocation(0, 0); dim = new AdjustableDimension(0, 0); } double get_x() throws RemoteException { return loc.x(); } void set_x(int x) throws RemoteException { loc.set_x(); } double get_y() throws RemoteException { return loc.y(); } void set_y(int y) throws RemoteException { loc.set_y(); } double get_width() throws RemoteException { return dim.width(); } void set_width(int w) throws RemoteException { dim.set_w(); } double get_height() throws RemoteException { return dim.height(); } void set_height(int h) throws RemoteException { dim.set_h(); } void adjustLocation() throws RemoteException { loc.adjust(); void adjustDimensions() throws RemoteException { dim.adjust(); class AdjustableLocation { protected double x_, y_; public AdjustableLocation(double x, double y) { x_ = x; y_ = y; synchronized double get_x() { return x_; } synchronized void set_x(int x) {x_ = x;} synchronized double get_y() { return y_; } synchronized void set_y(int y) {y_ = y;} synchronized void adjust() { x_ = longCalculation1(); y_ = longCalculation2(); class AdjustableDimension { protected double width_=0.0, height_=0.0; public AdjustableDimension(double h, double w) { height_ = h; width_ = w; synchronized double get_width() { return width_; } synchronized void set_w(int w) {width_ = w;} synchronized double get_height() { return height_; } synchronized void set_h(int h) {height_ = h;} width_ = longCalculation3(); height_ = longCalculation4(); interface ShapeI extends Remote { double get_x() throws RemoteException ; void set_x(int x) throws RemoteException ; double get_y() throws RemoteException ; void set_y(int y) throws RemoteException ; double get_width() throws RemoteException ; void set_width(int w) throws RemoteException ; double get_height() throws RemoteException ; void set_height(int h) throws RemoteException ; void adjustLocation() throws RemoteException ; void adjustDimensions() throws RemoteException ; From Crista Lopes PhD thesis (NU/Xerox PARC) public class Shape { protected double x_= 0.0, y_= 0.0; protected double width_=0.0, height_=0.0; double get_x() { return x_(); } void set_x(int x) { x_ = x; } double get_y() { return y_(); } void set_y(int y) { y_ = y; } double get_width(){ return width_(); } void set_width(int w) { width_ = w; } double get_height(){ return height_(); } void set_height(int h) { height_ = h; } void adjustLocation() { x_ = longCalculation1(); y_ = longCalculation2(); } void adjustDimensions() { width_ = longCalculation3(); height_ = longCalculation4(); coordinator Shape { selfex adjustLocation, adjustDimensions; mutex {adjustLocation, get_x, set_x, get_y, set_y}; mutex {adjustDimensions, get_width, get_height, set_width, set_height}; portal Shape { double get_x() {} ; void set_x(int x) {}; double get_y() {}; void set_y(int y) {}; double get_width() {}; void set_width(int w) {}; double get_height() {}; void set_height(int h) {}; void adjustLocation() {}; void adjustDimensions() {}; Write this Instead of writing this 5/6/2019 ABB Aspects

17 What's the problem? TANGLING
OOAD Z customer service center teller service self-service Collab-1 C1 C4 C2 C3 C5 Collab-4 Collab-2 Collab-3 Object-oriented languages do not provide adequate constructs to capture collaborations between several classes. Has been recognized in different forms in the object-oriented community: OO accommodates the addition of new variants of data types better than procedural programming but, the opposite is true when new operations on existing data types are needed visitor pattern: the matter of concern -- definition of new operations on an existing object structure (aggregation is involved besides inheritance) several works complain the lack of constructs for expressing collaboration-based designs C1 C4 C2 C3 Implementation C5 Collaboration -- a distinct (relatively independent aspect of an application that involves several participants, or roles roles played by application classes each class may play different roles in different collaborations each role embodies a separate aspect of the overall class behavior 5/6/2019 ABB Aspects Collaboration-based design s Require to view oo applications in two different ways: (a) in terms of participants or types involved (b) in terms of the tasks or concerns of the design

18 Reconciliation of Both Worlds: Aspectual Collaborations
in den vorherigen Kapiteln wurde erklärt: 1. in der Informatik darum, Rechnermodelle zu bauen, die Prozessen in der reellen Welt simulieren. 2. Es gibt formale Mitteln, die es erlauben, die Modelle in eine für den Rechner verständlich en Sprache zu schreiben.t. In dieser Vorlesung erden wir das sogenannte objekt-orientierte Programmiermodel als das Mittel für die Beschreibung der Modelle benutzen. Mit anderen Worten, werden wir objekt-orientierte Rechnermodelle der reellen Welt bauen. Wir werden zuerst, die Konstrukte des objekt-orientierten Programmiermodels kennenlernen, d.h. die Bestandteile unsere Toolboxes. Als zweites werden wir kurz

19 Prof. Guevara Noubir, noubir@ccs.neu.edu Background:
1996: PhD from ETH-Lausanne : senior research scientist at CSEM (Neuchâtel) Participated in main 3G-UMTS European Projects (FRAMES, RAINBOW, SLATS) and other projects on wireless networks (European Space Agency: IPSAT, MAD: Hiperlan 2, etc.) Main Research Area: Quality of Service for Wireless Systems Optimal resource management Reliability, fault-tolerance Security 5/6/2019 ABB Aspects

20 Current Research Development of adaptive schemes for optimal resource management in wireless systems with applications in multi-hop wireless ad-hoc networks and cellular wireless communication systems Underlying technology: IEEE802.11, Bluetooth (scatternets), home built low-power wireless interfaces 5/6/2019 ABB Aspects

21 Constraints in Wireless Multi-Hop Ad Hoc Networks (MANET)
Limited radio spectrum Broadcast Medium (resulting in collisions and interference) Limited power available at the nodes (i.e., energy, computation) Limited storage memory Connection QoS requirements (e.g., delay, packet loss) Unreliable network connectivity (depends on the channel) Dynamic topology (i.e., mobility of nodes => variable density) Need to provide a full coverage Need to enforce fairness 5/6/2019 ABB Aspects

22 Parameters Available to System Designer in MANET
Use of various coding/modulation schemes Use of packets fragmentation Use of various transmission power level Use of a single hop or multiple hops Use of multiple RF interfaces (multiple IF characteristics) Clustering and backbone formation Planning of the fixed nodes location Packets scheduling schemes Application adaptivity 5/6/2019 ABB Aspects

23 Approach: Adaptivity and Cooperation
Classical networking stacks have only minimum interaction between adjacent layers Multi-hop wireless ad hoc networks require more cooperation between layers because: Channel variation and network topology changes affect the application Routing versus single hop communication considerably affects the medium access control (MAC) performance and physical layer interference Collisions versus channel fading affects both the physical layer and the MAC Battery power has implications on all layers Network layer needs info on status of the channel to nodes to decide on one or multiple hop transmission 5/6/2019 ABB Aspects

24 ABB versus AOSD view of aspects
Compare ABB view of aspects with views of AOSD community. I am on the steering committee for the new series of conferences on AOSD. 5/6/2019 ABB Aspects

25 ABB Aspects page 4: Each aspect is modeled separately. AOSD: Each aspect needs its own class graph and behavior expressed for classes in class graph. page 5, figure 4: need to customize an aspect. page 19: Many aspects provide some degree of configurability: AOSD: adapters. 5/6/2019 ABB Aspects

26 ABB Aspects page 4: an aspect object is a container of references to implementations of different aspects. AOSD: an object may play multiple roles. page 5: An aspect is implemented by an aspect system which stores, manages and presents its information in an optimal way. AOSD: different implementations: s/d 5/6/2019 ABB Aspects

27 Comparison ABB aspect AOSD aspect
aspect adds data members or methods to an object AOSD aspect aspect adds data members or methods to an object enhances existing methods of an object 5/6/2019 ABB Aspects

28 What is Aspect-Oriented Software Development
Covers analysis, design and implementation of software Maintains separation of crosscutting concerns down to implementation level. Turn tangled and scattered implementations of a crosscutting concern into a well-modularized implementation of a concern. 5/6/2019 ABB Aspects

29 Object exists in many structures
ABB: from page 6: Depending on what aspect we look at, the same entity fits naturally in several different structures. AOSD: Object plays several roles each role playing places object in structure of corresponding collaboration 5/6/2019 ABB Aspects

30 Object exists in many structures
ABB: Example (from page 7) functional structure location structure batch structure AOSD: Object plays several roles each role playing places object in structure of corresponding collaboration 5/6/2019 ABB Aspects

31 Perspectives/Views/Aspects
Aspect: a well modularized cross-cutting concern Perspective/view: a special kind of aspect that adds members to a group of objects page 4: each object can be described from several different perspectives 5/6/2019 ABB Aspects

32 Attach aspects dynamically
page 8: when an instance of an object type is created, it inherits the aspects that are defined in the object type. You can add aspects to a specific instance. AOSD: composite aspects; dynamically add aspects to an object. 5/6/2019 ABB Aspects

33 How ABB aspects fit in: an open object model
Join point model dynamic: objects Express sets of join points enumerate objects Express code to be added at join points members “open objects” 5/6/2019 ABB Aspects

34 ABB implementation Aspect Framework (Afw) 5/6/2019 ABB Aspects


Download ppt "College of Computer Science"

Similar presentations


Ads by Google