College of Computer Science

Slides:



Advertisements
Similar presentations
Threads, SMP, and Microkernels
Advertisements

Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
Software modularity group Gregor Kiczales Professor and NSERC/Xerox/Sierra Systems Software Design Chair University of British Columbia Principal Scientist.
1 Model Interface Implementation for Two-Way Obliviousness in Aspect-Oriented Modeling Presented by Wuliang Sun Department of Computer Science Baylor University.
Controlling the Complexity of Software Designs Karl Lieberherr College of Computer and Information Science Northeastern University.
Overview of Wireless LANs Use wireless transmission medium Issues of high prices, low data rates, occupational safety concerns, & licensing requirements.
Aspect Oriented Programming Razieh Asadi University of Science & Technology Mazandran Babol Aspect Component Based Software Engineering (ACBSE)
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
College of Computer Science Karl Lieberherr. Projects Focus on two Projects: –Karl Lieberherr: Demeter and Aspect-Oriented Programming Java tools XML.
Controlling the Complexity of Software Designs Karl Lieberherr College of Computer and Information Science Northeastern University.
Take-Home Final COM 3205 Fall Stamp Coupling Def: data structure is passed as parameter, but called method operates on only some of the` individual.
Aspect Oriented Programming Gülşah KARADUMAN.
AOSD1 Aspect-Oriented Software Design Karl Lieberherr Theo Skotiniotis.
The following viewgraphs about RIDL from: D: A Framework for Distributed Programming Cristina Videira Lopes.
Cross cutting Cross-cutting of components and aspects ordinary program structure-shy functionality structure synchronization better program Components.
1 An Aspect-Oriented Implementation Method Sérgio Soares CIn – UFPE Orientador: Paulo Borba.
AOP Foundations Doug Orleans Karl Lieberherr. What we did earlier AOP languages have the following main elements: –a join point model (JPM) wrt base PL.
Features of AOP languages AOP languages have the following main elements: –a join point model (JPM) wrt base PL –a specification language for expressing.
Adaptive Software Kevin Cella Graduate Seminar 02/04/2005.
1 XAspects An Extensible System for Domain- Specific Aspect Languages Macneil Shonle (UCSD) Karl Lieberherr (Northeastern University) Ankit Shah (Northeastern.
1 Modularization of crosscutting concerns Write this public class Shape { protected double x_= 0.0, y_= 0.0; protected double width_=0.0, height_=0.0;
Controlling the Complexity of Software Designs Karl Lieberherr College of Computer and Information Science Northeastern University.
Controlling the Complexity of Software Designs Karl Lieberherr College of Computer and Information Science Northeastern University.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Demeter Aspects We study techniques for the emerging area of Aspect-Oriented Software Development and focus on the following areas:  Aspectual Collaborations.
Chapter 8: Aspect Oriented Programming Omar Meqdadi SE 3860 Lecture 8 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Controlling the Complexity of Software Designs Karl Lieberherr College of Computer and Information Science Northeastern University.
XAspects slides Cross-cutting of concerns ordinary program structure-shy functionality structure synchronization better program Chapter 1 Chapter 2 Chapter.
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.
Aspect-Oriented Software Development (AOSD)
Features of AOP languages AOP languages have the following main elements: –a join point model (JPM) wrt base PL –a specification language for expressing.
In the name of God.
Dominik Kaspar, Eunsook Kim, Carles Gomez, Carsten Bormann
Inheritance ITI1121 Nour El Kadri.
Object-Oriented Programming Basics
Lecture 28 Mobile Ad hoc Network Dr. Ghalib A. Shah
Ad-hoc Networks.
Discussion with Gregor Kiczales at UBC
Chair of Communication Networks
Controlling the Complexity of Software Designs
Demeter Aspects Who We Are Aspectual Collaborations
Introduction to Wireless Sensor Networks
Net 435: Wireless sensor network (WSN)
Inheritance "Question: What is the object oriented way of getting rich? Answer: Inheritance.“ “Inheritance is new code that reuses old code. Polymorphism.
Protocols and the TCP/IP Suite
Controlling the Complexity of Software Designs
ADAPTIVE PROGRAMMING Sezen ERDEM December 2005.
Software Design and Development
Lecture 45 Review of Lectures Dr. Ghalib A. Shah
Chapter 20 Object-Oriented Analysis and Design
Building Modular Object-Oriented Systems with Reusable Collaborations
Analysis models and design models
Adaptive and Aspect-Oriented Object-Oriented Software Development
Karl J. Lieberherr Northeastern University College of Computer Science
Sustainable Software Karl Lieberherr Northeastern University
An Introduction to Software Architecture
Adaptive Plug and Play Components for
Structuring Adaptive Applications using AspectJ and AOM
Better Separation of Crosscutting Concerns with Aspectual Components
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
Aspect-oriented programming
Software Development CSU 670 Karl Lieberherr
Subject Name: Adhoc Networks Subject Code: 10CS841
Nested Collaborations
Declarative Techniques for Improving Aspect Orthogonality
Protocols and the TCP/IP Suite
EEL 6935 Wireless Ad Hoc Networks
Design Yaodong Bi.
Overview Structure-shy Object pattern
Aspect Oriented Software Design
Presentation transcript:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Prof. Guevara Noubir, noubir@ccs.neu.edu Background: 1996: PhD from ETH-Lausanne 1997-2000: 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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