John J. Sung TA Consulting. Motivation for TraversalJ KL Enterprises identified AOP Enter into the AOP market early Add value by adding traversals to.

Slides:



Advertisements
Similar presentations
Write a program step by step. Step 1: Problem definition. Given the coordinate of two points in 2-D space, compute and print their straight distance.
Advertisements

L3:CSC © Dr. Basheer M. Nasef Lecture #3 By Dr. Basheer M. Nasef.
Chapter 7 User-Defined Methods. Chapter Objectives  Understand how methods are used in Java programming  Learn about standard (predefined) methods and.
 2005 Pearson Education, Inc. All rights reserved Introduction.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 Chapter 12 More OOP, Interfaces, and Inner Classes.
BROOM: A Matrix Language Chris Tobin Michael Weiss Gabe Glaser Brian Pellegrini.
1 Introduction to Java and Applet. 2 Download Java Compiler (1)
Object-Oriented Enterprise Application Development Javadoc Last Updated: 06/30/2001.
CS211 Data Structures Sami Rollins Fall 2004.
CS 110 Intro to Computer Science I Sami Rollins Fall 2006.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Software Engineering Principles and C++ Classes
UML Class Diagram: class Rectangle
CS 2511 Fall  Abstraction Abstract class Interfaces  Encapsulation Access Specifiers Data Hiding  Inheritance  Polymorphism.
Data Structures Using C++1 Chapter 1 Software Engineering Principles and C++ Classes.
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
Integration of Demeter and AspectJ (DAJ) John J. Sung.
Getting Started With Java Downloading and installing software Running your first program Dr. DwyerFall 2012.
Fall CIS 764 Database Systems Engineering L3: Two Assignments Relating to J2EE.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
Introduction to Aspect Oriented Programming Presented By: Kotaiah Choudary. Ravipati M.Tech IInd Year. School of Info. Tech.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
Master’s Thesis Defense: Aspectual Concepts John J. Sung.
Extensible Plug-ins for Aspect-Oriented Programming Macneil Shonle*Ankit Shah.
Graph Visualization Plug-in for Eclipse Gong Jun CCIS Northeastern Univ 10/2003 How To Finish your Project within Four Weeks.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Expression evaluation E : S | C. S = int. C = Op E E. Op : A | M. A = “+”. M = “*”.
Chapter 9: MuPAD Programming II Procedures MATLAB for Scientist and Engineers Using Symbolic Toolbox.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Practice and Evaluation. Practice Develop a java class called: SumCalculator.java which computes a sum of all integer from 1 to 100 and displays the result.
Slides for Gregor Kiczales Two versions –short version: Crosscutting capabilities for Java and AspectJ through DJ (4 viewgraphs only) –long version: Controlling.
Data Structures Using C++1 Chapter 1 Software Engineering Principles and C++ Classes.
Master’s Thesis Defense: Aspectual Concepts John J. Sung.
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.
Lab 5 CPIT 250 System Analysis and Design.
Chapter 3 Introduction to Classes and Objects Definitions Examples.
Translating Traversals to AspectJ. Outline Motivation Demeter Process for Traversals AspectJ Translation Process.
Java FilesOops - Mistake Java lingoSyntax
Objective You will be able to define the basic concepts of object-oriented programming with emphasis on objects and classes by taking notes, seeing examples,
 2005 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Computer Science Reaching Wider Summer School 2012.
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
Chapter – 8 Software Tools.
3 Project Objectives Aspectual Collaborations (AC) for the Connection Aspect –Metric: Does the restructuring of the UAV code with AC reduce the tangling.
1 COMS 261 Computer Science I Title: Classes Date: November 4, 2005 Lecture Number: 27.
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.
Data Structures Using Java1 Chapter 1 Software Engineering Principles and Java Classes.
Talk only to your friends that share the same concerns (Law of Demeter for Concerns) Midterm Review February 2004.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
Chapter 6 Testing and running a solution. Errors X Three types Syntax Logic Run-time.
Features of AOP languages AOP languages have the following main elements: –a join point model (JPM) wrt base PL –a specification language for expressing.
Textual Visualization Plug-in for Eclipse Gong Jun CCIS Northeastern Univ 02/2004.
ICS143a 2017 Programming Assignment
Crosscutting Capabilities for Java and AspectJ through DJ
Objects as a programming concept
About the Presentations
Discussion with Gregor Kiczales at UBC
For John.
CompSci 230 Software Construction
UML Class Diagram: class Rectangle
Using local variable without initialization is an error.
ADAPTIVE PROGRAMMING Sezen ERDEM December 2005.
Third lecture Review Visitor pattern DemeterJ 12/25/2018 SD.
Third lecture Review Visitor pattern DemeterJ 2/17/2019 SD.
Options for Demeter intergration into AspectJ
ENERGY 211 / CME 211 Lecture 27 November 21, 2008.
Presentation transcript:

John J. Sung TA Consulting

Motivation for TraversalJ KL Enterprises identified AOP Enter into the AOP market early Add value by adding traversals to Java Contract COM 1205 Inc. TA Consulting Recommendations

High-Level System Overview traversal.trv TraversalJ traversal.java AspectJ traversal.class

System Components traversal.trv – TraversalJ file with class graph and traversal declarations TraversalJ – DemeterJ program by COM1205 traversal.java – Traversal code in AspectJ AspectJ – Aspect Oriented Programming Tool

TraversalJ Overview Implement using DemterJ –class dictionary –traversals Obtain Class Graph using AspectJ & DJ –CreateClassGraph.java Output traversal java code –AspectJTraversal.java

TraversalJ System traversal.trv COM1205 Middle-ware CreateClassGraph AspectJTraversaltraversal.java Main ClassGraphEvent(args, cg)

AspectJTraversal Java code to translate class graph + strategy into AspectJ code Processes DJ classes to do most of the work

TraversalJ Syntax ClassGraph Specification –ClassGraph cgvar; –ClassGraph cgvar = new ClassGraph(cg, “strategy”); Traversal Specification –declare traversal tvar : “strategy”; –declare traversal tvar(cgvar) : “strategy”;

TraversalJ Syntax Traversal Aspect Specification –aspect aspectName { – class graph declaration; – traversal declaration; –}

TraversalJ Syntax Example aspect MyTraversal { ClassGraph defaultCG; ClassGraph cg1 = new ClassGraph(defaultCG, “from * bypassing {java.lang.String} to *”); declare traversal t1: “from CompoundFile to SimpleFile”; declare traversal t2(cg1): “from CompoundFile to *”; }

Graphs and Traversals? Need to obtain Default Class Graph Keep track of declared Class Graphs Process traversal with specific Class Graph

TraversalJ System traversal.trv COM1205 Middle-ware CreateClassGraph AspectJTraversaltraversal.java Main ClassGraphEvent(args, cg)

ClassGraphListener/Factory ClassGraphListenerFactory –Need a way to obtain an instance of Middle-ware code –ClassGraphListener getNew(); ClassGraphListener –need a way to pass ClassGraph and arguments –abstract void ClassGraphEvent(String [] args, ClassGraph cg);

ClassGraphListener/Factory ClassGraphFactory ClassGraphListener MyListener getNew() new MyListener() ClassGraphListener CreateClassGraph

ClassGraphListener/Factory ClassGraphListener MyListener CreateClassGraph ClassGraphEvent(args, cg) Some Other Code

.prj File Copy CreateClassGraph.java and AspectJTravearsal.java into a directory Add the directory for the JAVADIR option in.prj file COMPILER = ajc TEST_ARGS = -d trav some.trv TEST_INPUT = some.trv

Testing TraversalJ Create some traversal file that implements a traversal that’s used in TraversalJ. Generate the.java file into a directory Add the directory for JAVADIRS Add code to call the traversal method in.beh files. Compile with traversal code and test

Fun with Recursion traversal.trv COM1205 Middle-ware DemeterJ traversal.java AspectJ TraversalJ

Debugging Strategy Traversals –You can use DJ to output traversal graphs –Look for error messages from demeterj General Debugging –have some variable debug to turn on debug output AspectJTraversal –debug : outputs processing information –addPrintingAdvice : Outputs code for printing traversal method calls

TraversalJ Project Phases Phase1 – Generate Class Dictionary for the traversal language Phase 2 – Implement –d directory option, basic traversal with default Class Graph Phase 3 – Implement Class Graph declaration and definition Phase 4 – Test code by generating a traversal used in TraversalJ

Project Submission Use ~jser/submit-proj README –How to compile your program –How to generate traversal code –How to test traversal code Due Date: March 8, 2002

Project Write Up Class Graph UML Diagram Document Traversals Document Testing of Traversal Code Evaluate software design and usefulness of TraversalJ Drop it off in class or mail box of TA Due Date: March 11, 2002

Questions? Reaches both KLE and TAC. ectJ_Usage.html