1 JTransformer Framework Tobias Windeln Institut für Informatik III Rheinische Friedrich-Wilhelms-Universität Bonn.

Slides:



Advertisements
Similar presentations
Sml2java a source to source translator Justin Koser, Haakon Larsen, Jeffrey Vaughan PLI 2003 DP-COOL.
Advertisements

Vilmos Zsombori , Shanghai
R O O T S Conditional Transformations Fabian Noth
Debugging Natural Semantics Specifications Adrian Pop and Peter Fritzson Programming Environment Laboratory Department of Computer and Information Science.
ASTA Aspect Software Testing Assistant Juha Gustafsson, Juha Taina, Jukka Viljamaa University of Helsinki.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
Automated creation of verification models for C-programs Yury Yusupov Saint-Petersburg State Polytechnic University The Second Spring Young Researchers.
1 The JQuery Tool A Generic Query-Based Code browser for Eclipse Project leaders: Kris De Volder, Gregor Kiczales Students: Doug Janzen, Rajeswari Rajagopalan,
Software Practices Lab. -- The University of British Columbia 1 The JQuery Tool A Generic Query-Based Code browser for Eclipse Project leaders: Kris De.
Interpreter for ZOOM-I Andrew Deren Initial Presentation - SE690 5/30/03
Visual Web Information Extraction With Lixto Robert Baumgartner Sergio Flesca Georg Gottlob.
An Eclipse-based Integrated Environment for Developing Executable Structural Operational Semantics Specifications Adrian Pop and Peter Fritzson Programming.
Architecture Eclipse Framework with Plugin Concept JTransformer Plugin Analysis + Transformation interface: logical Program.language keeps representation.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
The Formalisation of Haskell Refactorings Huiqing Li Simon Thompson Computing Lab, University of Kent
Proof System HY-566. Proof layer Next layer of SW is logic and proof layers. – allow the user to state any logical principles, – computer can to infer.
Whole Platform Tesi di Dottorato di: RICCARDO SOLMI Università degli Studi di Bologna Facoltà di scienze matematiche, fisiche e naturali Corso di Dottorato.
OOP in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Generative Programming. Generic vs Generative Generic Programming focuses on representing families of domain concepts Generic Programming focuses on representing.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
ANTLR.
Spring Roo CS476 Aleksey Bukin Peter Lew. What is Roo? Productivity tool Allows for easy creation of Enterprise Java applications Runs alongside existing.
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
Sumant Tambe, et. al LEESA DSPD 2008 An Embedded Declarative Language for Hierarchical Object Structure Traversal Sumant Tambe* Aniruddha Gokhale Vanderbilt.
The Center for Advanced Research In Software Engineering (ARISE) The University of Texas at Austin Reengineering of Large-Scale Polylingual Systems Mark.
An Approach and Tool for Synchronous Refactoring of UML Diagrams and Models Using Model-to-Model Transformations Hafsteinn Þór Einarsson Helmut Neukirchen.
Xactium xDSLs Run Models Not Code Tony Clark
C++ Code Analysis: an Open Architecture for the Verification of Coding Rules Paolo Tonella ITC-irst, Centro per la Ricerca Scientifica e Tecnologica
Sumant Tambe, et. al LEESA DSPD 2008 An Embedded Declarative Language for Hierarchical Object Structure Traversal Sumant Tambe* Aniruddha Gokhale Vanderbilt.
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.
{ Graphite Grigory Arashkovich, Anuj Khanna, Anirban Gangopadhyay, Michael D’Egidio, Laura Willson.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and Server Side Programming Very rich GUI libraries Portability (machine independence) A.
Reviewing Recent ICSE Proceedings For:.  Defining and Continuous Checking of Structural Program Dependencies  Automatic Inference of Structural Changes.
Computer Science Department UoC. Outline Project Teams Key Points description Suggested Task Delegation Files Needed & previous work.
1 COMP 3438 – Part II-Lecture 1: Overview of Compiler Design Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
Hyper/J and Concern Manipulation Environment. The need for AOSD tools and development environment AOSD requires a variety of tools Life cycle – support.
© 2006 IBM Corporation JDojo & ScriptEngine Agile Planning’s Scripting Tools.
Using Aspects to Support the Software Process: XP over Eclipse Oren Mishali and Shmuel Katz Technion, Israel Institute of Technology.
© GMV S.A., 2004 Property of GMV S.A. All rights reserved 2004/05/13 XML in CCSDS CCSDS Spring Meeting - Montreal Fran Martínez GMVSA 4081/04.
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
Generative Programming. Automated Assembly Lines.
GTK Binding for Alice Robert Grabowski Eine GTK-Schnittstelle für Alice.
Eclipse Eclipse An IDE is an Integrated Development Environment Different IDEs meet different needs – BlueJ, DrJava are designed as teaching.
A Logic Meta-Programming Approach to support the Co-Evolution of Object-Oriented Design and Implementation Roel Wuyts , PROG.
A Survey on Java Modeling Languages Gergely Kovásznai,Eszterházy Károly College Wolfgang Schreiner,Johannes Kepler University Gábor Kusper,Eszterházy Károly.
1 An Aspect-Oriented Implementation Method Sérgio Soares CIn – UFPE Orientador: Paulo Borba.
Eclipse 24-Apr-17.
COP 4620 / 5625 Programming Language Translation / Compiler Writing Fall 2003 Lecture 1, 08/28/03 Prof. Roy Levow.
1 CSC/ECE 517 Fall 2010 Lec. 3 Overview of Eclipse Lectures Lecture 2 “Lecture 0” Lecture 3 1.Overview 2.Installing and Running 3.Building and Running.
1. 2 Preface In the time since the 1986 edition of this book, the world of compiler design has changed significantly 3.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
ISBN Chapter 3 Describing Semantics.
Weaving a Debugging Aspect into Domain-Specific Language Grammars SAC ’05 PSC Track Santa Fe, New Mexico USA March 17, 2005 Hui Wu, Jeff Gray, Marjan Mernik,
What am I? while b != 0 if a > b a := a − b else b := b − a return a AST == Abstract Syntax Tree.
Matt Young 1. Patterns  Reusable solution to a problem  Demonstrates good design practices  Can speed up development 2.
2000 Advanced OOSA State of the Art on Software Architecture Declarative Meta Programming Session 3: Declarative Meta Programming.
Java Software Solutions Lewis and Loftus Chapter 2 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Software Concepts -- Introduction.
On Implementing High Level Concurrency in Java G Stewart von Itzstein Mark Jasiunas University of South Australia.
PROGRAMMING PRE- AND POSTCONDITIONS, INVARIANTS AND METHOD CONTRACTS B MODULE 2: SOFTWARE SYSTEMS 13 NOVEMBER 2013.
AspectScope: An Outline Viewer for AspectJ Programs Michihiro Horie, Shigeru Chiba Tokyo Institute of Technology, Japan.
2000 Research Overview Dr. Kim Mens Programming Technology Lab Vrije Universiteit Brussel.
Java IDE Dwight Deugo Nesa Matic
Open Source Compiler Construction (for the JVM)
Introduction: From Nand to Tetris
Accessible Formal Methods A Study of the Java Modeling Language
Implementing Language Extensions with Model Transformations
Towards an Open Meta Modeling Environment
Java IDE Dwight Deugo Nesa Matic Portions of the notes for this lecture include excerpts from.
Implementing FOP Framework
Presentation transcript:

1 JTransformer Framework Tobias Windeln Institut für Informatik III Rheinische Friedrich-Wilhelms-Universität Bonn

JTransformer: A Transformationsframework for Java - Tobias Windeln JTransformer Framework  Motivation  Idea  Overview  program representation  Query and Transformation API  Conditional Transformations  Future Work: Eclipse Integration  Demo?

JTransformer: A Transformationsframework for Java - Tobias Windeln Motivation  our need for a program transformation tool with complete source code representation powerful query and transformation API  Applications program analysis refactorings design pattern detection design pattern editor aspect oriented programming  additional requirements source to source byte code analysis (interface of types)

JTransformer: A Transformationsframework for Java - Tobias Windeln Idea  combine existing approaches logic meta-programming (TyRuBa)  generative program creation  powerful reasoning about programs Conditional Transformations (JContract)  formally structured transformation description  enables transformation analysis Solution  generate a program presentation readable for a logic programming language  use a logic prog. lang. to analyse and transform the program

JTransformer: A Transformationsframework for Java - Tobias Windeln JTransformer Overview Transformation Module Abstract Syntax Tree in Prolog fact presentation Java Byte code Java Source code Condition Transformations CT Module ConditionAction generation of Prolog facts apply Parser transformed Java source code Writer Transformation Engine

JTransformer: A Transformationsframework for Java - Tobias Windeln Parser + Program Representation  parses Java Source and Byte Code  checks Java syntax and semantics for source code  adds attributes to tree elements method call: called method field access: referenced field object instantiation: called constructor...  generates Prolog facts for the whole Abstract Syntax Tree (AST) for every node class one predicate  elementNameT(ID, parentID,…) includes all transitively referenced types

JTransformer: A Transformationsframework for Java - Tobias Windeln Translation Example packageT(100002, 'example'). toplevelT(100001, , 'example/Test.java', [100003]). classDefT(100003, , 'Test', [100005, , ]). extendsT(100003, ). varDefT(100005, , , type(class, , 0), 's', 'null'). methodDefT(100006, ,'setS',[100007],type(basic, 'void', 0),[],100008). modifierT(100006, 'public'). varDefT(100007, , , type(class, , 0), 'val', 'null'). blockT(100008, , , [100009]). execT(100009, , , ). assignT(100010, , , , ). selectT(100011, , , 's', , ). identT(100013, , , 'this', ). identT(100012, , , 'val', ). methodDefT(100014, ,' ',[],type(basic, 'void', 0),[],100015). blockT(100015, , , [100016]). execT(100016, , , ). applyT(100017, , , , []). identT(100018, , , 'super', ). classDefT(100004, , 'String', [108037, ,..., ]).... Test.java world.pl package example; class Test { String s; public void setS(String val) { s = val; }

JTransformer: A Transformationsframework for Java - Tobias Windeln Transformation and Query Engine  logic programming language Prolog analyse + transform program  predicate library subtype full qualified method... higher level predicates for AST Elements  getField, setField, … transformation predicates  AOP (before, after, around) ...

JTransformer: A Transformationsframework for Java - Tobias Windeln Conditional Transformation (CT)  structure of CTs precondition  structural requirements on the program  binds variables  Prolog term without side effects action  transformation of the program  changes the program based on the variable binding in the precondition  list of Prolog predicates with side effects add, delete, replace AST Elements

JTransformer: A Transformationsframework for Java - Tobias Windeln Accessor CT ct(addGetterMethods, ( class(_CID, _, _,_), not(externT(_CID)), field(_VID, _CID, _Type, _Name, _), concat('get$',_Name,_MethName), not(method(_, _CID, _MethName, [], _, _, _)), newIDs([_MethID, _BodyID, _ReturnID, _ReadFID]),( add(method(_MethID, _CID, _MethName, [], _Type, [], _BodyID)), add(blockT(_BodyID, _MethID, _MethID, [_ReturnID])), add(returnT(_ReturnID, _BodyID, _MethID, _ReadFID)), add(getField(_ReadFID, _ReturnID, _MethID, 'null', VID)))). class C { int i; String s; } int get$i() { return i; } String get$s() { return s; } Precondition Action

JTransformer: A Transformationsframework for Java - Tobias Windeln Eclipse JDT Integration  general transformation API for Eclipse  synchronized with program representation in Eclipse with the JTransformer Framework Compiler Abstract Syntax Tree Eclipse Java Editor Transformation Module Abstract Syntax Tree in Prolog fact representation JTransformer synchronized

JTransformer: A Transformationsframework for Java - Tobias Windeln Advantages of the Integration  current approach each transformation step involves  fact generation  transformation  source generation  compiler run on new sources the source code format and comments are not preserved  Eclipse integration complete fact generation only once afterwards incremental generation of changed source code JTransformer only communicates the changed parts of the AST Eclipse preserves the source code format and comments

JTransformer: A Transformationsframework for Java - Tobias Windeln Eclipse JDT Integration (3)  will be implemented in the upcoming eXtreme Programming internchip

JTransformer: A Transformationsframework for Java - Tobias Windeln Work Based on JTransformer  ConDor Conflict Detector for CTs  LogicAJ logic meta-programming extension of AspectJ „An Aspect Language with Genericity and Interference Analysis“  DPDetect design pattern detection (Lava Patterns)  PatchWork (???)