Introducing ABC: Programming Languages and AOP Oege de Moor Programming Tools Group University of Oxford joint work with Ganesh Sittampalam, Sascha Kuzins,

Slides:



Advertisements
Similar presentations
AspectWerkz 2 - and the road to AspectJ 5 Jonas Bonér Senior Software Engineer BEA Systems.
Advertisements

Advanced XSLT II. Iteration in XSLT we sometimes wish to apply the same transform to a set of nodes we iterate through a node set the node set is defined.
Mohamed ElBendary and John Boyland University of Wisconsin-Milwaukee.
CPSC 388 – Compiler Design and Construction
Monitoring Aspects for the Customization of Automatically Generated Code for Big-Step Models Shahram Esmaeilsabzali Bernd Fischer Joanne M. Atlee
Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
A Regression Test Selection Technique for Aspect- Oriented Programs Guoqing Xu The Ohio State University
Each design pattern is designed to facilitate one kind of change, i.e. changes in one dimension. However, software evolution can happen in multiple dimensions.
University of British Columbia Software Practices Lab Fluid AOP Join Point Models Terry Hon Gregor Kiczales.
University of British Columbia Software Practices Lab 2005 CASCON A Fluid AOP Editor Terry Hon Gregor Kiczales.
Objects and Classes David Walker CS 320. Advanced Languages advanced programming features –ML data types, exceptions, modules, objects, concurrency,...
Optimizing AspectJ Pavel Avgustinov, Aske Simon Christensen, Laurie Hendren, Sascha Kuzins, Jennifer Lhotak, Ondrej Lhotak, Oege de Moor, Damien Sereni,
University of British Columbia Software Practices Lab CAS Seminar 06 Fluid AJ - A Simple Fluid AOP Tool Terry Hon Gregor Kiczales.
Turning Eclipse Against Itself: Finding Errors in Eclipse Sources Benjamin Livshits Stanford University.
Combining Static and Dynamic Data in Code Visualization David Eng Sable Research Group, McGill University PASTE 2002 Charleston, South Carolina November.
The Caltrop Actor Language Johan Eker UC Berkeley MoBIES group, Carnegie Mellon, November 30, 2001.
More on AspectJ. aspect MoveTracking { private static boolean _flag = false; public static boolean testAndClear() { boolean result = _flag; _flag = false;
Building An Interpreter After having done all of the analysis, it’s possible to run the program directly rather than compile it … and it may be worth it.
Generative Programming. Generic vs Generative Generic Programming focuses on representing families of domain concepts Generic Programming focuses on representing.
XFindBugs: eXtended FindBugs for AspectJ Haihao Shen, Sai Zhang, Jianjun Zhao, Jianhong Fang, Shiyuan Yao Software Theory and Practice Group (STAP) Shanghai.
Presented By: Shriraksha Mohan Nathaniel Nystrom, Michael R. Clarkson, and Andrew C. Myers.
Abc Compiler Zak Fry. Who and Where Programming Tools Group at Oxford University, UK – Oege de Moor Sable Research Group at McGill University, Quebec.
Session 2: AspectJ Mark Stobbe September 13,
Extensible Plug-ins for Aspect-Oriented Programming Macneil Shonle*Ankit Shah.
4 Dec 2001Kestrel1 From Patterns to Programming Languages Matthias Felleisen Northeastern University.
Adding Trace Matching with Free Variables to AspectJ Chris Allan, Pavel Avgustinov, Sascha Kuzins, Oege de Moor, Damien Sereni, Ganesh Sittampalam and.
Chapter 7 Runtime Environments. Relationships between names and data objects As execution proceeds, the same name can denote different data objects Procedures,
Aspect Oriented Programming Sumathie Sundaresan CS590 :: Summer 2007 June 30, 2007.
/ PSWLAB On the Semantics of Matching Trace Monitoring Patterns P Avgustinov, J Tibble, O Moor (Programming Tool Group, Oxford, UK) June.
Generative Programming. Automated Assembly Lines.
A Meta-Level Specification and Profile for AspectJ in UML Joerg Evermann School of Information Management Victoria University of Wellington.
Design Rules for Increasing Modularity with CaesarJ Carlos Eduardo Pontual Advisor: Paulo Borba 17/06/2010.
AOP-1 Aspect Oriented Programming. AOP-2 Aspects of AOP and Related Tools Limitation of OO Separation of Concerns Aspect Oriented programming AspectJ.
CCC: An Aspect-Oriented Intermediate Language on.Net Platform Yingfei Xiong and Feng Wan University of Electronic Science and Technology of China, China.
1 An Aspect-Oriented Implementation Method Sérgio Soares CIn – UFPE Orientador: Paulo Borba.
McLab Tutorial Part 3 – McLab Frontend Frontend organization Introduction to Beaver Introduction to JastAdd 6/4/2011 Frontend-1McLab.
Features of AOP languages AOP languages have the following main elements: –a join point model (JPM) wrt base PL –a specification language for expressing.
IDENTIFYING SEMANTIC DIFFERENCES IN ASPECTJ PROGRAMS Martin Görg and Jianjun Zhao Computer Science Department, Shanghai Jiao Tong University.
Region Pointcut for AspectJ Shumpei Akai Shigeru Chiba Muga Nishizawa.
Inter-Type Declarations in AspectJ Awais Rashid Steffen Zschaler © Awais Rashid, Steffen Zschaler 2009.
AspectJ – AOP for Java Tom Janofsky. Instructor at Penn State Abington Consultant with Chariot Solutions JUG Member.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
1 JTransformer Framework Tobias Windeln Institut für Informatik III Rheinische Friedrich-Wilhelms-Universität Bonn.
Aspect Oriented Programming in.NET with CodeBricks Antonio Cisternino Academic Days Milan, 2004 Università di Pisa Supported by Microsoft Research grant.
Comparison of Different AOP Approaches Presented by: Xiaojing Wang.
Semantic Analysis II Type Checking EECS 483 – Lecture 12 University of Michigan Wednesday, October 18, 2006.
aspectj tools new and noteworthy Mik Kersten University of British Columbia Adrian Colyer IBM Hursley OOPSLA, October
CS412/413 Introduction to Compilers Radu Rugina Lecture 13 : Static Semantics 18 Feb 02.
AOSD'04, Lancaster, UK 1 Remote Pointcut - A Language Construct for Distributed AOP Muga Nishizawa (Tokyo Tech) Shigeru Chiba (Tokyo Tech) Michiaki Tatsubori.
Aspect Security - RaviShekhar Gopalan - Prof. Lieberherr Software Security (CSG379)
University of British Columbia Software Practices Lab Uniform Support for Modeling Crosscutting Structure Maria Tkatchenko Gregor Kiczales Work supported.
AOP with AspectJ Awais Rashid, Steffen Zschaler © Awais Rashid, Steffen Zschaler 2009.
Object Oriented Programming in Java Habib Rostami Lecture 10.
ABC: an implementation of AspectJ Oege de Moor Programming Tools Group University of Oxford joint work with Ganesh Sittampalam, Sascha Kuzins, Chris Allan,
1 Aspectual Caml an Aspect-Oriented Functional Language Hideaki Tatsuzawa Hidehiko Masuhara Akinori Yonezawa University of Tokyo.
Epsilon Compiler Advanced Compilers Progress Report James Simister 11/3/99.
Features of AOP languages AOP languages have the following main elements: –a join point model (JPM) wrt base PL –a specification language for expressing.
Precisely Selecting Regression Test for Aspect-Oriented Programs Guoqing Xu The Ohio State University
Java Basics Regular Expressions.  A regular expression (RE) is a pattern used to search through text.  It either matches the.
Software Engineering Lecture 7
C# and the .NET Framework
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Discussion with Gregor Kiczales at UBC
CPSC 388 – Compiler Design and Construction
Aspect-Oriented Programming
Lecture 15 (Notes by P. N. Hilfinger and R. Bodik)
X10 Future Plans & Discussion
Java Workflow Tooling (JWT) Release review: JWT v0
Inner Classes.
Presentation transcript:

Introducing ABC: Programming Languages and AOP Oege de Moor Programming Tools Group University of Oxford joint work with Ganesh Sittampalam, Sascha Kuzins, Chris Allan, Pavel Avgustinov, Julian Tibble, Damien Sereni (Oxford) Laurie Hendren, Jennifer Lhoták, Ondřej Lhoták, Bruno Dufour, Christopher Goard, Clark Verbrugge (McGill) Aske Simon Christensen (Århus)

Roadmap ● Novel features – The fun has just begun ● Performance – It may become cheap ● ABC: the AspectBench Compiler – Extensible: Polyglot – Analysis & optimisation: Soot

Tracecuts a d e b c g f h before a, before b, before c, after c, before d, after d, after b, before e, before f, before g, after g, before h, after h, after f, after e, after a j oinpoint tree

Observer as tracecut aspect observer { tracecut update(Subject s, Observer o): // declaration of events of interest: create_observer: after returning(o) call(Observer.new(..)) && args(s) update_subject: after call(* Subject.update(..)) && target(s); // regular expression pattern to match against suffixes of traces: create_observer update_subject+ // advice to execute (once for each (s,o) binding) { o.update_view(); }

Performance

The AspectBench Compiler AspectJ extension AspectJ source, and jars Polyglot Java compiler aspectInfo Java extracts of source Jimple intertype adjuster advice weaver Soot analysis and transformation framework class files analyse & optimise

Polyglot: scope for intertype decls public class A { int x; class B { int x; } aspect Aspect { static int x; static int y; int A.B.foo() { class C { int x = 3; int bar() {return x + A.this.x;} } return (new C()).bar() + x + y; } need to disambiguate: when do we refer to host? ● no explicit receiver? if it was introduced into environment by the host, give it “this” from host. ● explicit “this” or “super”? if there is no qualifier and we're not inside a local class, it refers to the host. If there is a qualifier Q, it refers to the host if the host has an enclosing instance of type Q. implementation: ● extend environment type ● new AST nodes “hostSpecial” (this/super) ● ITDs add accessible members from host ● rewrite rules to disambiguate this/super to “Special” or “hostSpecial”

Jimple public static int Aspect$foo$1(A$B) { A$B this$2; Aspect$1C $r0; int $i0, $i1, $i2, $i3, $i4; this$2 A$B; $r0 = new Aspect$1C; specialinvoke $r0. (A$B)>(this$2); $i0 = virtualinvoke $r0. (); $i1 = this$2. ; $i2 = $i0 + $i1; $i3 = ; $i4 = $i2 + $i3; return $i4; } ● 3-address intermediate form ● proven basis for static analysis ● easy to weave into

ABC performance

ABC Summary ● A second compiler helps language research – precise language description ● Whole-program, aimed at – extensibility, – static analysis – performance of compiled code ● Suite of tools: decompiler, performance measurement, visualisation in Eclipse ● Small, easy to learn: < 500 classes, 45 KLOC ● Current status: – pass majority of ajc tests – likely release mid-October