Taming Obliviousness in Aspects with Data-flow Analysis and Design by Contract Tim Molderez and Dirk Janssens Ansymo Antwerp Systems and Software Modelling.

Slides:



Advertisements
Similar presentations
Scenarios for applying crosscutting concerns. Aspects should be visible throughout the full lifecycle of a software product. While most AOP-efforts currently.
Advertisements

Design by Contract.
Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
1 Computer Science 340 Software Design & Testing Inheritance & Design By Contract.
Modular Reasoning in Aspect-oriented Languages Tim Molderez Ansymo Antwerp Systems and Software Modelling.
An Aspect-Oriented Approach For Web Application Access Control Presented by: Mohamed Hassan Carleton University Carleton University
ASTA Aspect Software Testing Assistant Juha Gustafsson, Juha Taina, Jukka Viljamaa University of Helsinki.
1 JAC : Aspect Oriented Programming in Java An article review by Yuval Nir and Limor Lahiani.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development.
Aspect Oriented Programming - AspectJ Radhika Rajput.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Modularization.
Error Management with Design Contracts Karlstad University Computer Science Error Management with Design Contracts Eivind J. Nordby, Martin Blom, Anna.
Figures – Chapter 21. Figure 21.1 Cross-cutting concerns.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
Aspect-Oriented Programming In Eclipse ® Aspect-Oriented Programming in Eclipse with AspectJ Dr Helen Hawkins and Sian January.
Object Oriented Design An object combines data and operations on that data (object is an instance of class) data: class variables operations: methods Three.
On the Relation between Design Contracts and Errors Karlstad University Computer Science On the Relation Between Design Contracts and Errors A Software.
ASPECT ORIENTED SOFTWARE DEVELOPMENT Prepared By: Ebru Doğan.
University of British Columbia Software Practices Lab CAS Seminar 06 Fluid AJ - A Simple Fluid AOP Tool Terry Hon Gregor Kiczales.
Categories of Aspects Shmuel Katz Computer Science Department The Technion Haifa, Israel.
OOP #10: Correctness Fritz Henglein. Wrap-up: Types A type is a collection of objects with common behavior (operations and properties). (Abstract) types.
Aspect Oriented Programming Written by Michael Beder.
Harmless Advice Daniel S Dantas Princeton University with Prof. David Walker.
1 FM Overview of Adaptation. 2 FM RAPIDware: Component-Based Design of Adaptive and Dependable Middleware Project Investigators: Philip McKinley, Kurt.
Generative Programming. Generic vs Generative Generic Programming focuses on representing families of domain concepts Generic Programming focuses on representing.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development 2.
1 Model Interface Implementation for Two-Way Obliviousness in Aspect-Oriented Modeling Presented by Wuliang Sun Department of Computer Science Baylor University.
A Formal Model of Modularity in Aspect-Oriented Programming Jonathan Aldrich : Objects and Aspects Carnegie Mellon University.
Ranga Rodrigo. Class is central to object oriented programming.
Introduction to Aspect- Oriented Programming CS 3360 Gregor Kiczales, et. al. Getting started with AspectJ, CACM, 44(10):59-65, October Fall 2012.
1 Aspects and Modularity: The Hope and the Challenge Jonathan Aldrich Institute for Software Research International School of Computer Science Carnegie.
Outline Introduction Problem Statement Object-Oriented Design Aspect-Oriented Design Conclusion Demo.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Debugging Support.
Introduction to AOP.
Modular Reasoning in Aspect-oriented Languages Tim Molderez Promotor: prof. dr. Dirk Janssens Ansymo Antwerp Systems and Software Modelling.
Introduction to Aspect Oriented Programming Presented By: Kotaiah Choudary. Ravipati M.Tech IInd Year. School of Info. Tech.
Aspect Oriented Programming (AOP) in.NET Brent Krueger 12/20/13.
1 Abstraction  Identify important aspects and ignore the details  Permeates software development programming languages are abstractions built on hardware.
Aspect Oriented Programming Razieh Asadi University of Science & Technology Mazandran Babol Aspect Component Based Software Engineering (ACBSE)
VERIFICATION OF ASPECT ORIENTED MODELS BY DON MARTIN JAYASHREE VENKIPURAM PATHANGI PIYUSH SRIVASTAVA REFERENCES F. Mostefaoui and J. Vachon,” Design level.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development 1.
MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective.
Aspect Oriented Programming Sumathie Sundaresan CS590 :: Summer 2007 June 30, 2007.
Aspect Oriented Programming Gülşah KARADUMAN.
On the Modularity Assessment of Aspect- Oriented Multi-Agent Systems Product Lines: a Quantitative Study Camila Nunes
Joel Phinney March 31, ◦ Concerns  Separation of Concerns, Tangled and Scattered Concerns, Cross-Cutting Concerns, Aspects ◦ Aspect-Oriented Software.
Methodology: The AOP Refactoring Process Aspect-Oriented Refactoring of the Apache Cocoon Shared-Object Resource Allocation System Jeff Dalton Advisor:
A Distributed Aspect-Oriented System for J2EE Applications Muga Nishizawa and Shigeru Chiba (Tokyo Institute of Technology, Japan) Background - As benefits.
Design Rules for Increasing Modularity with CaesarJ Carlos Eduardo Pontual Advisor: Paulo Borba 17/06/2010.
AOSD1 Aspect-Oriented Software Design Karl Lieberherr Theo Skotiniotis.
AOP-1 Aspect Oriented Programming. AOP-2 Aspects of AOP and Related Tools Limitation of OO Separation of Concerns Aspect Oriented programming AspectJ.
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.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Methods of Software Development Karl Lieberherr Spring 2007.
POSL (Principles of Software Languages) Gr. Kyushu Institute of Technology, Japan 1 A Verification Mechanism for Weaving.
Towards an Aspect-oriented Language Module: Aspects for Petri Nets Tim Molderez, Bart Meyers, Dirk Janssens and Hans Vangheluwe Ansymo Antwerp Systems.
AOSD'04, Lancaster, UK 1 Remote Pointcut - A Language Construct for Distributed AOP Muga Nishizawa (Tokyo Tech) Shigeru Chiba (Tokyo Tech) Michiaki Tatsubori.
CSSE501 Object-Oriented Development. Chapter 10: Subclasses and Subtypes  In this chapter we will explore the relationships between the two concepts.
1 Separation of Context Concerns --- Applying Aspect Orientation to VDM Naoyasu Ubayashi (Kyushu Institute of Technology) Shin Nakajima (National Institute.
R R R A Brief Introduction to Aspect-Oriented Programming.
Aspect-Oriented Software Development (AOSD)
1 Aspectual Caml an Aspect-Oriented Functional Language Hideaki Tatsuzawa Hidehiko Masuhara Akinori Yonezawa University of Tokyo.
Inspections on Testing Aspect-Oriented Programs Rodrigo Manuel Lopes de Matos Moreira 4 th Doctoral Symposium on Informatics Engineering Porto, 6 th February.
PPL 2004, Gamagori, AICHI1 Remote Pointcut - A Language Construct for Distributed AOP Muga Nishizawa (Tokyo Tech, Japan) Shigeru Chiba (Tokyo Tech, Japan)
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Chenchen Xi CNC Supervisor: Prof. John R. Gurd
Aspect Oriented Software Design
Presentation transcript:

Taming Obliviousness in Aspects with Data-flow Analysis and Design by Contract Tim Molderez and Dirk Janssens Ansymo Antwerp Systems and Software Modelling

Aspect-oriented programming (AOP)  Typically extension of object-oriented language  Aims to separate crosscutting concerns into their own modules, i.e. aspects  Crosscutting concerns: Scattered in several places Tangled with other concerns Examples: logging, authentication, caching, profiling, … 2

3 aspect Logging { after: call(* Bank.do*(..)) { log.write(stuff);} Pointcut (when) Advice (what)

AOP’s inherent problem  Pointcuts are an implicit mechanism Classes (and aspects!) are not aware that their behaviour can be modified by aspects May lead to unexpected/undesired behaviour as the system evolves 4

Cornering the problem  Goal: Detect undesired behaviour caused by aspects  Data-flow analysis: Automatically detect interactions caused by aspects Present them to the developer  Design by contract: Distinguish harmless from (potentially) harmful aspects 5

Data-flow analysis  Expose interactions caused by aspects, both to aspect and class developers  Focus on data dependencies: What data is being modified by advice? Who uses this modified data? 6

7 aspect CloseStreamAfterUse { after: execution(Export.write*(stream)) { stream.close(); } Someone unaware of the aspect might still use the stream later on.

Advice impact analysis  Based on definition-use analysis Find all definitions (assignments) during the execution of advice which may affect the base system (or other aspects).. as well as their corresponding uses.  Implemented on top of the AspectBench Compiler Uses AST + call graph generated from (woven) Soot representation 8

Incremental updates  Analysis aimed to run in the background of an IDE  Determine what to invalidate and reanalyse per type of source code change  Evaluated by performing a large set of random (though realistic) changes on existing systems 9

Design by Contract (DbC)  DbC, an intuitive and modular means to specify desired behaviour of an application  In OOP, the Liskov substitution principle: Preconditions: must be eq. or weaker in subtype Postconditions: must be eq. or stronger Invariants: must be preserved  What if you add aspects? 10

Advice substitutability  Considering all advice are around advice: Whenever a pointcut matches, the corresponding advice effectively substitutes the original join point.  Liskov substitution can be easily adjusted to aspects. The contracts of an advice have to comply with the contracts of the join point where it is applied. 11

Relation to obliviousness  If the advice substitution principle is strictly applied, the base system can remain unaware of aspects.  However, some aspects have to break the principle: e.g. authentication: Postcondition is weakened if the user is not logged in  The base system must become aware of the aspect.  Principle not meant to be strictly enforced; it simply defines the border between safe/unsafe obliviousness 12

Where DFA and DbC meet  Data flow analysis + Design by contract: Detect which interactions are desired or undesired 13

Detecing (un)desired interactions  Given an interaction (definition+use), will the altered value cause a contract violation where the new value is used?  If the original code implements its contracts, does this still hold with the altered value?  Look into ESC/Java2, Spec#, … 14

Summary  Aim: Detect undesired behaviour caused by aspects  Data-flow analysis: Detect interactions caused by aspects  Design by contract: Advice subst. principle rejects aspects with undesired behaviour  DFA+DbC: Detect (un)desired interactions by aspects 15 Contact: |