An Empirical Study of the Demeter System Pengcheng Wu and Mitchell Wand Northeastern University.

Slides:



Advertisements
Similar presentations
Search in Source Code Based on Identifying Popular Fragments Eduard Kuric and Mária Bieliková Faculty of Informatics and Information.
Advertisements

ASTA Aspect Software Testing Assistant Juha Gustafsson, Juha Taina, Jukka Viljamaa University of Helsinki.
Efficient Software Performance Estimation Methods for Hardware/Software Codesign Kei Suzuki Alberto Sangiovanni-Vincentelli Present: Yanmei Li.
Object-Oriented Metrics. Characteristics of OO ● Localization ● Encapsulation ● Information hiding ● Inheritence ● Object abstraction.
A First Attempt towards a Logical Model for the PBMS PANDA Meeting, Milano, 18 April 2002 National Technical University of Athens Patterns for Next-Generation.
Object-Oriented Metrics
1 Improving Hash Join Performance through Prefetching _________________________________________________By SHIMIN CHEN Intel Research Pittsburgh ANASTASSIA.
(C) 1998 Tendril Software Inc. StructureBuilder Tendril Software Inc. OOPSLA ‘98 Demo Neeraj Sangal, President Tendril Software Karl.
Generative Programming. Generic vs Generative Generic Programming focuses on representing families of domain concepts Generic Programming focuses on representing.
Click to highlight each section of the article one by one Read the section, then click once to view the description of it If you want to read it, you.
UML class diagrams and XML schemas Karl Lieberherr UBS AG Northeastern University.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
3/7/2003Bioinformatics1 How To Address Rapidly Changing Data Representations in an Evolving Scientific Domain Using Aspect-oriented Programming Techniques.
Measuring the Effort for Creating and Using Domain-Specific Models Yali Wu PhD Candidate 18 October 2010.
Demeter Interfaces: AP without Surprises Prof. Karl Lieberherr and Therapon Skotiniotis, Jeffrey Palm.
Ch. 2: Planning a Study (cont’d) pp THE RESEARCH PROPOSAL  In all empirical research studies, you systematically collect and analyze data 
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
1 Advance Computer Architecture CSE 8383 Ranya Alawadhi.
Pattern Language for AP1 Pattern Language for Adaptive Programming (AP) Karl Lieberherr Northeastern University.
Generative Programming. Automated Assembly Lines.
1 Introduction to Software Engineering Lecture 1.
Project Report. Suggested TOC Executive Summary Project Background and Assumptions Vision and Mission Statements Objectives SWOT Analysis Recommended.
Synchronization Transformations for Parallel Computing Pedro Diniz and Martin Rinard Department of Computer Science University of California, Santa Barbara.
Law of Demeter. What is it: Style Rule for building systems. Proposed by my research group: The Demeter Research Group in 1987, published in Covered.
Not only mark-up languages! There are other many other grammar formalisms and tools than XML. Some of them standardized (ASN). Even XML does not always.
Efficient Instant-Fuzzy Search with Proximity Ranking Authors: Inci Centidil, Jamshid Esmaelnezhad, Taewoo Kim, and Chen Li IDCE Conference 2014 Presented.
Towards the better software metrics tool motivation and the first experiences Gordana Rakić Zoran Budimac.
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.
Pattern Language for AP1 Pattern Language for Adaptive Programming (AP) Karl Lieberherr Northeastern University.
Dale Roberts Object Oriented Programming using Java - Introduction Dale Roberts, Lecturer Computer Science, IUPUI Department.
Adaptive Software Kevin Cella Graduate Seminar 02/04/2005.
Software Safety Case Why, what and how… Jon Arvid Børretzen.
Slicing AspectJ Woven Code Luca Cavallaro Mattia Monga Antonio Castaldo D'Ursi Davide Balzarotti Politecnico di Milano.
Center for Software Sciences Northeastern University A domain specific language for Traversal Specification Johan Ovlinger Mitchell Wand Northeastern.
Behavioural Design Patterns Quote du jour: ECE450S – Software Engineering II I have not failed. I've just found 10,000 ways that won't work. - Thomas Edison.
BARD / April BARD: Bayesian-Assisted Resource Discovery Fred Stann (USC/ISI) Joint Work With John Heidemann (USC/ISI) April 9, 2004.
Demeter Aspects We study techniques for the emerging area of Aspect-Oriented Software Development and focus on the following areas:  Aspectual Collaborations.
Improving Dependability in Service Oriented Architectures using Ontologies and Fault Injection Binka Gwynne Jie Xu School of Computing University of Leeds.
Checking LoD in AspectJ Show the idea, not the details. How can we precisely express it in a programming language?
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Ordered Linked Lists using Abstract Data Types (ADT) in Java Presented by: Andrew Aken.
Design Reuse Earlier we have covered the re-usable Architectural Styles as design patterns for High-Level Design. At mid-level and low-level, design patterns.
Translating Traversals to AspectJ. Outline Motivation Demeter Process for Traversals AspectJ Translation Process.
DJ: traversal-visitor-style programming in Java Josh Marshall/ Doug Orleans Want to add more on traversal through collections and Aspectual Components.
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.
Information Reduces uncertainty Helps focus decision making.
CS223: Software Engineering
Pattern Language for AP1 Pattern Language for Adaptive Programming (AP) Karl Lieberherr Northeastern University.
UBC software modularity group 1/14/02 UCSD1 Discussion with Kiczales at UBC Ontology of AOP Ontology is the study of what there is, an inventory of what.
COM1205 TraversalJ Project* Pengcheng Wu Feb.25,2003.
AO Mechanisms in Demeter1 Discussion with Gregor Kiczales at UBC Ontology of AOP Ontology is the study of what there is, an inventory of what exists. An.
Talk only to your friends that share the same concerns (Law of Demeter for Concerns) Midterm Review February 2004.
Csontos Péter, Porkoláb Zoltán Eötvös Loránd Tudományegyetem, Budapest ECOOP 2001 On the complexity of exception handling.
Jesse proposal1 Jesse’s proposal Karl Lieberherr.
Pattern Language for AP1 Pattern Language for Adaptive Programming (AP) Karl Lieberherr Northeastern University.
Features of AOP languages AOP languages have the following main elements: –a join point model (JPM) wrt base PL –a specification language for expressing.
STATIC CODE ANALYSIS. OUTLINE  INTRODUCTION  BACKGROUND o REGULAR EXPRESSIONS o SYNTAX TREES o CONTROL FLOW GRAPHS  TOOLS AND THEIR WORKING  ERROR.
Discussion with Gregor Kiczales at UBC
Demeter Aspects Who We Are Aspectual Collaborations
ADAPTIVE PROGRAMMING Sezen ERDEM December 2005.
An Empirical Study of the Demeter System
Midterm Review CSU 670 Spring 2004.
LoD in AspectJ Karl Lieberherr.
Bidirectional Query Planning Algorithm
AOSD and the Law of Demeter: Shyness in Programming
Dependency Injection Mechanism
Presentation transcript:

An Empirical Study of the Demeter System Pengcheng Wu and Mitchell Wand Northeastern University

Motivation Collect evidence to support the claim: Demeter system improves the – ilities of software systems. In this talk, we focus on a specific – ility: Comprehensibility.

System overview Problem addressed: manual implementation of a traversal on a complex object structure is tedious and error-prone. E.g., AST traversal. Solution: have a high-level description of traversals, then generate the code!

System overview (cont.) Demeter ’ s high-level traversal language: strategy Subgraph of transitive closure of class graph Graph language: may be cyclic E.g., from class A via class B to class E A bunch of traversal generating algorithms. E.g., FIRST algorithm [Lieberherr and Wand 2002]

class A { void t1() { if(b!=null) b.t1(); } void t1prime() { access(e); if(b!=null) b.t1(); } class B { void t1() { d.t1(); } class D { void t1() { a.t1prime(); } from A via B to E FIRST Algorith m

class A { void t1() { if(b!=null) b.t1(); } void t1prime() { access(e); if(b!=null) b.t1(); } class B { void t1() { d.t1(); } class D { void t1() { a.t1prime(); } from A via B to E High-level description is much easier to understand!

Q: Do you have any more convincing statistics? A: YES! The largest software system using Demeter ’ s traversal strategies: the DemeterJ Compiler. It has 413 classes, 80 traversals on ASTs

How complex are those traversals?

How complex are those traversals? (cont.)

Traversal strategies improve comprehensibility How to measure the improvement? Abstractness of a traversal strategy = Length(MethodCallPaths)/Length(Strategy) The larger the ratio is, the more abstract the strategy is, then the more details are left out and the better comprehensibility we achieve.

The abstractness metric

Conclusion Traversals on complex object structures tend to be complex too. High level description of traversals helps improve the comprehensibility of the traversal concerns in software system. The improvements are nontrivial.

Tradeoff in AOP Specific, explicit, closed Controls spuriousness Leads to Brittleness Predictability Rigidity Generic, implicit, open-ended Controls brittleness Leads to Spuriousness comprehensability Evolvability

Tradeoff in AOP Specific, explicit, closed Controls spuriousness Leads to Brittleness Predictability Rigidity Complex request to base Hospital, go left,right,up Base can refuse Generic, implicit, open-ended Controls brittleness Leads to Spuriousness comprehensability Evolvability Complex request to base Place where they heal people

Questions and Discussions...

Edinburgh, Scottish symbols Mik: Effects of control flow advice Query languages 3 layer structure, editing at second layer

NSF design proposal CME and Demeter Use selector language to define editing Selector language needs unification, pattern matching Enhancement: SelectorExpression(p1, … ) {body}

Mario Visitor makes assumptions on class graph Analyze traversal graph: another graph intersection

Pengcheng Traversal graph: pcd and call graph call f()) from main() to call f() cflow(call f()) = from main() via call f() to * Cflow(p) = from main() via pathset to * Pathset starts at Main Join(Pathset(p), target( … ) to *

!call f() = !pathset(from main to f()) Same source, same target: all other paths !(from A to B) : from A to !B: forward from A, backward from all other nodes !(from A via B to C) = from A via !B to C or from A via B to !C or from A via !B to !C !([A,B].[B,C]) =[A,!B].[!B,C] or [A,B][B,!C] !(D1.D2) =!D1.D2 ’ || D1.!D2