Structural Reflection by Java Bytecode Instrumentation

Size: px
Start display at page:

Download "Structural Reflection by Java Bytecode Instrumentation"

Transcription

1 Vol. 42 No. 11 Nov Java, Java API introspection API Javassist Java JVM Javassist JVM Javassist Structural Reflection by Java Bytecode Instrumentation Shigeru Chiba, and Michiaki Tatsubori The standard reflection API of Java provides the ability to introspect a program but not to alter program behavior. This paper presents an extension to the reflection API for addressing this limitation. Unlike other extensions enabling behavioral reflection, our extension called Javassist enables structural reflection in Java. For using a standard Java virtual machine (JVM) and avoiding a performance problem, Javassist allows structural reflection only before a class is loaded into the JVM. This paper presents the design principles of Javassist, which distinguish Javassist from related work. 1. Java API Application Programming Interface introspection Java behavioral reflection Graduate School of Information Science and Engineering, Tokyo Institute of Technology 21 PRESTO, Japan Science and Technology Corporation Doctral Program in Engineering, University of Tsukuba structural reflection Javassist Javassist Java Java Java 2752

2 Vol. 42 No. 11 Java 2753 Javassist 3 Javassist 4 Javassist API Java Java Java P P C P P C P P D m() D m() D m() Reflective Java 18) Kava 17) MetaXa 9),14) Java 3. Java Javassist

3 2754 Nov Smalltalk 8) ObjVlisp 4) CLOS 11) API Application Programming Interface API C++ C++ API Javassist Java JVM Java JVM JIT final final final Java 15) 3.2 Java JVM Javassist Java Javassist Javassist JVM Javassist JVM 4. Javassist API Javassist API Application Programming Interface 4.1 Javassist Java JVM byte Javassist byte Javassist 1 JVM CtClass compile-time class reify stream InputStream CtClass c = new CtClass(stream); CtClass CtClass Input- Stream String Javassist CtClass

4 Vol. 42 No. 11 Java CtClass Table 1 Methods in CtClass for introspection. String getname() int getmodifiers() ( public ) boolean isinterface() CtClass getsuperclass() CtClass[] getinterfaces() CtField[] getdeclaredfields() CtMethod[] getdeclaredmethods() CtMethod[] getconstructors() byte[] bcode = c.tobytecode(); bcode JVM CtClass reflect Class tobytecode() Javassist JVM Javassist CtClass c2 = new CtNewClass(); CtClass c2 4.2 introspection introspection Javassist Java API newinstance() 1 CtClass getsuperclass() getinterfaces() Ct- Class JVM CtClass new URL 2 Table 2 Methods for alteration. CtClass void bepublic() public void notfinal() final void setname(string name) void setsuperclass(ctclass) void addinterfaces(ctclass[]) void addconstructor(...) void addmethod(...) void addfield(...) CtField void bepublic() public void notfinal() final CtMethod void bepublic() public void notfinal() final void instrument(...) void setbody(...) void makewrapped(...) Glue code getdeclaredfields() CtField getdeclaredmethods() Ct- Method Java API Field Method CtMethod 4.3 alteration Javassist Java API Javassist Javassist 2 3 (1) Java (2) (3) 1 Javassist API Java Javassist API Java Javassist

5 2756 Nov Java Javassist this this Javassist Java Java setname() 2 Javassist API Javassist Javassist 7) Java 10) Javassist final Javassist Java 6) Javassist 4.4 Javassist 3 N Javassist Javassist Javassist 5.2 Javassist CtMethod 1 CtMethod glue code Glue code Object

6 Vol. 42 No. 11 Java 2757 Object lookup(object[] args) { return hashtable.get(args[0]); } hashtable java.util. Hashtable glue code String String String stringlookup(string key) { Object[] args = { key }; return (String)hashtable.get(args[0]); } String Object Javassist CtField int 4.5 Java Javassist C++ new. CodeConverter Javassist Javassist 3 CodeConverter Table 3 Methods in CodeConverter. void replacenew() new void replacefieldread() void replacefieldwrite() void redirectfieldaccess() void redirectfieldaccess() Javassist Kava 17) Javassist 750 Java Javassist Kava 2) Javassist API GUI Graphical User Interface Addistant Javassist 16) 2 Javassist Javassist Addistant Javassist 19)

7 2758 Nov Java JavaClass API 5) JOIE 3) Javassist Java Javassist API JVM 12) OpenC++ 1) OpenJava 20) Javassist Javassist Java Kirby 13) linguistic reflection 5.2 OpenJava OpenJava 20) Java 1) Javassist OpenJava OpenJava public OpenJava Javassist Javassist OpenJava Javassist OpenJava Javassist SPECjvm TM Java Open- Java JVM OpenJava OpenJava Sun Ultra10 UltraSPARC IIi 440 MHz Solaris 7 JVM Sun JDK HotSpot TM Client VM Sun JDK javac IBM Jikes javac Java Jikes 1 OpenJava Javassist Javassist Java 34 KB 0.7 1KB 0.03 OpenJava

8 Vol. 42 No. 11 Java 2759 Fig. 1 1 Execution time of reification and reflection. Javassist 6. Java API Javassist Javassist Javassist Javassist Javassist JVM Javassist Java Javassist Javassist OpenJava 20) Javassist Javassist Javassist Javassist Javassist Javassist 1) Chiba, S.: A Metaobject Protocol for C++, Proc. ACM Conf. on Object-Oriented Programming Systems, Languages, and Applications, SIGPLAN Notices, Vol.30, No.10, pp , ACM (1995). 2) Chiba, S.: Load-time structural reflection in Java, ECOOP 2000, LNCS 1850, pp , Springer-Verlag (2000). 3) Cohen, G.A., Chase, J.S. and Kaminsky, D.L.: Automatic Program Transformation with JOIE, USENIX Annual Technical Conference 98 (1998). 4) Cointe, P.: Metaclasses are first class: The ObjVlisp model, Proc. ACM Conf. on Object-

9 2760 Nov Oriented Programming Systems, Languages, and Applications, pp (1987). 5) Dahm, M.: Byte Code Engineering with the JavaClass API, Techincal Report B-17-98, Institut für Informatik, Freie Universität Berlin (1999). 6) Drossopoulou, S., Wragg, D. and Eisenbach, S.: What is Java Binary Compatibility?, Proc. ACM Conf. on Object-Oriented Programming Systems, Languages, and Applications, pp (1998). 7) Forman, I., Conner, M., Danforth, S. and Raper, L.: Release-to-Release Binary Compatibility in SOM, Proc. ACM Conf. on Object- Oriented Programming Systems, Languages, and Applications, pp (1995). 8) Goldberg, A. and Robson, D.: Smalltalk- 80: The Language and Its Implementation, Addison-Wesley (1983). 9) Golm, M. and Kleinöder, J.: Jumping to the Meta Level, Behavioral Reflection Can Be Fast and Flexible, Proc. Reflection 99, LNCS 1616, pp.22 39, Springer (1999). 10) Gosling, J., Joy, B., Steele, G. and Bracha, G.: The Java Language Specification, 2nd edition, Addison-Wesley (2000). 11) Kiczales, G., des Rivières, J. and Bobrow, D.G.: The Art of the Metaobject Protocol, The MIT Press (1991). 12) Kiczales, G.: Foil for the Workshop on Open Implementation, internet publication ( Xerox PARC (1994). 13) Kirby, G., Morrison, R. and Stemple, D.: Linguistic Reflection in Java, Software Practice and Experience, Vol.28, No.10, pp (1998). 14) Kleinöder, J. and Golm, M.: MetaJava: An Efficient Run-Time Meta Architecture for Java, Proc. International Workshop on Object Orientation in Operating Systems (IWOOS 96 ), IEEE (1996). 15) Malabarba, S., Pandey, R., Gragg, J., Barr, E. and Barnes, J.F.: Runtime Support for Type-Safe Dynamic Java Classes, ECOOP 2000, LNCS 1850, pp , Springer-Verlag (2000). 16) Tatsubori, M., Sasaki, T., Chiba, S. and Itano, K.: A Bytecode Translator for Distributed Execution of Legacy Java Software, ECOOP 2001, LNCS 2072, pp , Springer-Verlag (2001). 17) Welch, I. and Stroud, R.: From Dalang to Kava The Evolution of a Reflective Java Extension, Proc.Reflection 99, LNCS 1616, pp.2 21, Springer (1999). 18) Wu, Z.: Reflective Java and A Reflective- Component-Based Transaction Architecture, Proc.OOPSLA 98 Workshop on Reflective Programming in C++ and Java, Fabre, J.-C. and Chiba, S. (Eds.) (1998). 19) Vol.17, No.2, pp (2000). 20) Java Vol.41, No.8, pp (2000). ( ) ( ) ACM ACM

Josh. Java. AspectJ weave. 2 AspectJ. Josh Javassist[1] Javassist Java. AspectJ[3, 4] Java. AspectJ. weave. weave. weave. weave. weaver 1.

Josh. Java. AspectJ weave. 2 AspectJ. Josh Javassist[1] Javassist Java. AspectJ[3, 4] Java. AspectJ. weave. weave. weave. weave. weaver 1. Josh Java Aspect Weaver weaver 1 AspectJ Java AspectJ Java weave AspectJ weave Josh weave Javassist weave 1 weaver 1 AspectJ[3, 4] 1 Java AspectJ Java weave Java AspectJ weave Josh Josh Java weave weave

More information

Load-Time Structural Reflection in Java

Load-Time Structural Reflection in Java Load-Time Structural Reflection in Java Shigeru Chiba Institute of Information Science and Electronics University of Tsukuba and Japan Science and Technology Corp. chiba@is.tsukuba.ac.jp, chiba@acm.org

More information

Profiler Instrumentation Using Metaprogramming Techniques

Profiler Instrumentation Using Metaprogramming Techniques Profiler Instrumentation Using Metaprogramming Techniques Ritu Arora, Yu Sun, Zekai Demirezen, Jeff Gray University of Alabama at Birmingham Department of Computer and Information Sciences Birmingham,

More information

Shigeru Chiba Michiaki Tatsubori. University of Tsukuba. The Java language already has the ability for reection [2, 4]. java.lang.

Shigeru Chiba Michiaki Tatsubori. University of Tsukuba. The Java language already has the ability for reection [2, 4]. java.lang. A Yet Another java.lang.class Shigeru Chiba Michiaki Tatsubori Institute of Information Science and Electronics University of Tsukuba 1-1-1 Tennodai, Tsukuba, Ibaraki 305-8573, Japan. Phone: +81-298-53-5349

More information

Addistant. Java. Addistant

Addistant. Java. Addistant AOP Addistant Addistant 2 Addistant Java JVM Addistant 2 join point 1 crosscutting concerns AOP [2] Addistant[1] Tokyo Institute of Technology, Faculity of Science Doctral Program in Engineering, University

More information

Jarcler: Aspect-Oriented Middleware for Distributed Software in Java

Jarcler: Aspect-Oriented Middleware for Distributed Software in Java Jarcler: Aspect-Oriented Middleware for Distributed Software in Java Muga Nishizawa Shigeru Chiba Dept. of Mathematical and Computing Sciences Tokyo Institute of Technology Email: {muga,chiba@csg.is.titech.ac.jp

More information

Josh: An Open AspectJ-like Language

Josh: An Open AspectJ-like Language Josh: An Open AspectJ-like Language Shigeru Chiba Tokyo Institute of Technology 2-12-1 Ohkayama, Meguro-ku, Tokyo 152-8552, Japan chiba@is.titech.ac.jp Kiyoshi Nakagawa Tokyo Institute of Technology 2-12-1

More information

Altering Java Semantics via Bytecode Manipulation

Altering Java Semantics via Bytecode Manipulation Altering Java Semantics via Bytecode Manipulation Éric Tanter 1, Marc Ségura-Devillechaise 2, Jacques Noyé 2, and José Piquer 1 1 University of Chile, Computer Science Dept. Avenida Blanco Encalada 2120,

More information

Proceedings of the 6 th USENIX Conference on Object-Oriented Technologies and Systems (COOTS '01)

Proceedings of the 6 th USENIX Conference on Object-Oriented Technologies and Systems (COOTS '01) USENIX Association Proceedings of the 6 th USENIX Conference on Object-Oriented Technologies and Systems (COOTS '01) San Antonio, Texas, USA January 29 - February 2, 2001 THE ADVANCED COMPUTING SYSTEMS

More information

Composition and Separation of Concerns in the Object-Oriented Model

Composition and Separation of Concerns in the Object-Oriented Model ACM Computing Surveys 28A(4), December 1996, http://www.acm.org/surveys/1996/. Copyright 1996 by the Association for Computing Machinery, Inc. See the permissions statement below. Composition and Separation

More information

Independent Extensibility for Aspect-Oriented Systems

Independent Extensibility for Aspect-Oriented Systems Independent Extensibility for Aspect-Oriented Systems Pascal Costanza, Günter Kniesel, and Michael Austermann University of Bonn, Institute of Computer Science III Römerstr. 164, D-53117 Bonn, Germany

More information

Macro Processing in Object-Oriented Languages

Macro Processing in Object-Oriented Languages Macro Processing in Object-Oriented Languages Shigeru Chiba Institute of Information Science and Electronics, University of Tsukuba and PRESTO, Japan Science and Technology Corporation E-mail: chiba@is.tsukuba.ac.jp

More information

Reflex Towards an Open Reflective Extension of Java

Reflex Towards an Open Reflective Extension of Java Reflex Towards an Open Reflective Extension of Java Éric Tanter 2, Noury M. N. Bouraqadi-Saâdani 1, and Jacques Noyé 1 1 École des Mines de Nantes La Chantrerie - 4, rue Alfred Kastler B.P. 20722 F-44307

More information

Prototyping Languages Related Constructs and Tools with Squeak

Prototyping Languages Related Constructs and Tools with Squeak Prototyping Languages Related Constructs and Tools with Squeak Alexandre Bergel Distributed Systems Group Dept. of Computer Science Trinity College Dublin 2, Ireland www.cs.tcd.ie/alexandre.bergel Marcus

More information

The Extensible Java Preprocessor Kit. and a Tiny Data-Parallel Java. Abstract

The Extensible Java Preprocessor Kit. and a Tiny Data-Parallel Java. Abstract The Extensible Java Preprocessor Kit and a Tiny Data-Parallel Java Yuuji ICHISUGI 1, Yves ROUDIER 2 fichisugi,roudierg@etl.go.jp 1 Electrotechnical Laboratory, 2 STA Fellow, Electrotechnical Laboratory

More information

Program Transformation with Reflective and Aspect-Oriented Programming

Program Transformation with Reflective and Aspect-Oriented Programming Program Transformation with Reflective and Aspect-Oriented Programming Shigeru Chiba Dept. of Mathematical and Computing Sciences Tokyo Institute of Technology, Japan Abstract. A meta-programming technique

More information

SmartMethod: an Efficient Replacement for Method

SmartMethod: an Efficient Replacement for Method SmartMethod: an Efficient Replacement for Method Walter Cazzola DICo - Department of Informatics and Communication, Università degli Studi di Milano cazzola@dico.unimi.it ABSTRACT In the last few years

More information

Safe Metaclass Composition Using Mixin-Based Inheritance

Safe Metaclass Composition Using Mixin-Based Inheritance Safe Metaclass Composition Using Mixin-Based Inheritance Noury Bouraqadi bouraqadi@ensm-douai.fr http://csl.ensm-douai.fr/noury Dépt. G.I.P. - Ecole des Mines de Douai 941, rue Charles Bourseul - B.P.

More information

Bugdel: An Aspect-Oriented Debugging System

Bugdel: An Aspect-Oriented Debugging System Bugdel: An Aspect-Oriented Debugging System Yoshiyuki Usui and Shigeru Chiba Dept. of Mathematical and Computing Sciences Tokyo Institute of Technology 2-12-1-W8-50 Ohkayama, Meguro-ku Tokyo 152-8552,

More information

Run-Time Evolution through Explicit Meta-Objects

Run-Time Evolution through Explicit Meta-Objects Run-Time Evolution through Explicit Meta-Objects Jorge Ressia, Lukas Renggli, Tudor Gîrba and Oscar Nierstrasz Software Composition Group University of Bern Switzerland http://scg.unibe.ch Abstract. Software

More information

A Meta-Model for Composition Techniques in Object-Oriented Software Development

A Meta-Model for Composition Techniques in Object-Oriented Software Development A Meta-Model for Composition Techniques in Object-Oriented Software Development Bedir Tekinerdogan Department of Computer Science University of Twente P.O. Box 217, 7500 AE Enschede, The Netherlands E-Mail:

More information

Embedded Device Cooperative System Using Java Bytecode Instrumentation

Embedded Device Cooperative System Using Java Bytecode Instrumentation THE SCIENCE AND ENGINEERING REVIEW OF DOSHISHA UNIVERSITY, VOL. 51, NO. 1 April 2010 Embedded Device Cooperative System Using Java Bytecode Instrumentation Ryota AYAKI *, Kohei KADOWAKI *, Hideki SHIMADA

More information

Standard JIT Compiler - Ad-hoc construction - Limited/overspec optim - restricted portability

Standard JIT Compiler - Ad-hoc construction - Limited/overspec optim - restricted portability OpenJIT A Reective Java JIT Compiler Short Version for the OOPSLA'98 Reection Workshop Satoshi Matsuoka Tokyo Institute of Technology and Japan Science and Technology Corporation Hirotaka Ogawa Tokyo Institute

More information

Speeding up the Meta-level Processing of Java Through Partial. Evaluation.

Speeding up the Meta-level Processing of Java Through Partial. Evaluation. Speeding up the Meta-level Processing of Java Through Partial Evaluation Mathias Braux mathias.braux@emn.fr Ecole des Mines de Nantes La Chantrerie - 4, rue Alfred Kastler - B.P. 20722-44307 Nantes Cedex

More information

JAVA. Reflection API. Java, summer semester

JAVA. Reflection API. Java, summer semester JAVA Reflection API 26.2.2013 1 Overview Reflection changes structure/state of objects Introspection exploring a structure of objects similar to RTTI in C++ but more powerful allows obtaining information

More information

PROXY WORLD WRAPPED WORLD. link V V V. link FSV FSV DFSV. link. V: Vector FSV: FSVector DFS: DFSVector

PROXY WORLD WRAPPED WORLD. link V V V. link FSV FSV DFSV. link. V: Vector FSV: FSVector DFS: DFSVector Engineering Java Proxy Objects using Reection Karen Renaud & Huw Evans University of Glasgow fkaren,huwg@dcs.gla.ac.uk Abstract Java programmers need to be able to locally specialise the run-time behaviour

More information

COFFEESTRAINER - Statically Checking Structural Constraints on Java Programs

COFFEESTRAINER - Statically Checking Structural Constraints on Java Programs COFFEESTRAINER - Statically Checking Structural Constraints on Java Programs Boris Bokowski bokowski@inf.fu-berlin.de Technical Report B-98-14 December 1998 Abstract It is generally desirable to detect

More information

Lecture 9 : Basics of Reflection in Java

Lecture 9 : Basics of Reflection in Java Lecture 9 : Basics of Reflection in Java LSINF 2335 Programming Paradigms Prof. Kim Mens UCL / EPL / INGI (Slides partly based on the book Java Reflection in Action, on The Java Tutorials, and on slides

More information

Implementing Software-Fault Tolerance in C++ and Open C++: An Object-Oriented and Reflective Approach

Implementing Software-Fault Tolerance in C++ and Open C++: An Object-Oriented and Reflective Approach Implementing Software-Fault Tolerance in C++ and Open C++: An Object-Oriented and Reflective Approach Jie Xu, Brian Randell and Avelino F. Zorzo Department of Computing Science University of Newcastle

More information

Fighting Class Name Clashes in Java Component Systems

Fighting Class Name Clashes in Java Component Systems Fighting Class Name Clashes in Java Component Systems Petr Hnětynka, Petr Tůma Charles University Department of Software Engineering Distributed System Research Group Malostranské náměstí 25, 118 00 Prague

More information

Characteristics of Runtime Program Evolution

Characteristics of Runtime Program Evolution Characteristics of Runtime Program Evolution Mario Pukall and Martin Kuhlemann School of Computer Science, University of Magdeburg, Germany {pukall, kuhlemann}@iti.cs.uni-magdeburg.de Abstract. Applying

More information

Aspect-Oriented Programming On Lisp

Aspect-Oriented Programming On Lisp 6 th International Conference on Applied Informatics Eger, Hungary, January 27 31, 2004. Aspect-Oriented Programming On Lisp Miklós Espák Department of Information Technology, University of Debrecen e-mail:

More information

History Introduction to Java Characteristics of Java Data types

History Introduction to Java Characteristics of Java Data types Course Name: Advanced Java Lecture 1 Topics to be covered History Introduction to Java Characteristics of Java Data types What is Java? An Object-Oriented Programming Language developed at Sun Microsystems

More information

Implementing Software Connectors through First-Class Methods

Implementing Software Connectors through First-Class Methods Implementing Software Connectors through First-Class Methods Cheoljoo Jeong and Sangduck Lee Computer & Software Technology Laboratory Electronics and Telecommunications Research Institute Taejon, 305-350,

More information

OpenC: Extending C Programs with Computational Reflection

OpenC: Extending C Programs with Computational Reflection OpenC: Extending C Programs with Computational Reflection Songqing Yue * and Jeff Gray * Department of Mathematics and Computer Science, University of Central Missouri Warrensburg, Missouri 64093, USA

More information

The Dark Sides of Integration. Anton Arhipov JRebel,

The Dark Sides of Integration. Anton Arhipov JRebel, The Dark Sides of Integration Anton Arhipov JRebel, ZeroTurnaround @antonarhipov Observe results Make a change Build, deploy, wait Where the time goes? Where the time goes? Build Container start Just don

More information

Programming Language Concepts: Lecture 10

Programming Language Concepts: Lecture 10 Programming Language Concepts: Lecture 10 Madhavan Mukund Chennai Mathematical Institute madhavan@cmi.ac.in http://www.cmi.ac.in/~madhavan/courses/pl2009 PLC 2009, Lecture 10, 16 February 2009 Reflection

More information

Programming Support of Design Patterns with Compile-time Reflection

Programming Support of Design Patterns with Compile-time Reflection Programming Support of Design Patterns with Compile-time Reflection Michiaki Tatsubori and Shigeru Chiba Institute of Information Sciences and Electronics, University of Tsukuba, Japan mt,chiba@is.tsukuba.ac.jp

More information

Living with Reflection

Living with Reflection Living with Reflection Towards Coexistence of Program Transformation by Middleware and Reflection in Java Applications Michiaki Tatsubori IBM Tokyo Research Laboratory 1623-14, Shimotsuruma, Yamato, Kanagawa,

More information

Middleware Spoon: Compile-time Annotation Processing for Middleware

Middleware Spoon: Compile-time Annotation Processing for Middleware October 2006 (vol. 7, no. 11), art. no. 0611-oy001 1541-4922 2006 IEEE Published by the IEEE Computer Society Middleware Spoon: Compile-time Annotation Processing for Middleware Renaud Pawlak INRIA and

More information

Technical Report. Computer Science Department. Operating Systems IMMD IV. Friedrich-Alexander-University Erlangen-Nürnberg, Germany

Technical Report. Computer Science Department. Operating Systems IMMD IV. Friedrich-Alexander-University Erlangen-Nürnberg, Germany MetaJava: An Efficient Run-Time Meta Architecture for Java Jürgen Kleinöder, Michael Golm June 1996 TR-I4-96-03 Technical Report Computer Science Department Operating Systems IMMD IV Friedrich-Alexander-University

More information

Reflective Java and A Reflective Component-Based Transaction Architecture

Reflective Java and A Reflective Component-Based Transaction Architecture Reflective Java and A Reflective Component-Based Transaction Architecture Zhixue Wu APM Ltd., Poseidon House, Castle Park, Cambridge CB3 0RD UK +44 1223 568930 zhixue.wu@citrix.com ABSTRACT In this paper,

More information

MetaJava: An Efficient Run-Time Meta Architecture for Java

MetaJava: An Efficient Run-Time Meta Architecture for Java MetaJava: An Efficient Run-Time Meta Architecture for Java Jürgen Kleinöder 1, Michael Golm University of Erlangen-Nürnberg, Dept. of Computer Science IV Martensstr. 1, D-91058 Erlangen, Germany {kleinoeder,

More information

Linguistic Reflection Via Mirrors

Linguistic Reflection Via Mirrors Linguistic Reflection Via Mirrors Gilad Bracha Joint work with David Ungar 1 Reflection: Overview Reflection is the ability of a program to manipulate itself More than just metaprogramming Earliest Reflective

More information

Experimental Evaluation of Fault-Tolerant Mechanisms for Object-Oriented Software

Experimental Evaluation of Fault-Tolerant Mechanisms for Object-Oriented Software Experimental Evaluation of Fault-Tolerant Mechanisms for Object-Oriented Software Avelino Zorzo, Jie Xu, and Brian Randell * Department of Computing Science, University of Newcastle upon Tyne, NE1 7RU,UK

More information

COMPOSABILITY, PROVABILITY, REUSABILITY (CPR) FOR SURVIVABILITY

COMPOSABILITY, PROVABILITY, REUSABILITY (CPR) FOR SURVIVABILITY AFRL-IF-RS-TR-2002-61 Final Technical Report April 2002 COMPOSABILITY, PROVABILITY, REUSABILITY (CPR) FOR SURVIVABILITY Kestrel Institute Sponsored by Defense Advanced Research Projects Agency DARPA Order

More information

JAVA.LANG.CLASS CLASS

JAVA.LANG.CLASS CLASS JAVA.LANG.CLASS CLASS http://www.tutorialspoint.com/java/lang/java_lang_class.htm Copyright tutorialspoint.com Introduction The java.lang.class class instance represent classes and interfaces in a running

More information

Outline. Introduction to Java. What Is Java? History. Java 2 Platform. Java 2 Platform Standard Edition. Introduction Java 2 Platform

Outline. Introduction to Java. What Is Java? History. Java 2 Platform. Java 2 Platform Standard Edition. Introduction Java 2 Platform Outline Introduction to Java Introduction Java 2 Platform CS 3300 Object-Oriented Concepts Introduction to Java 2 What Is Java? History Characteristics of Java History James Gosling at Sun Microsystems

More information

A Case For. Binary Component Adaptation. Motivation. The Integration Problem. Talk Outline. Using Wrapper Classes. The Interface Evolution Problem

A Case For. Binary Component Adaptation. Motivation. The Integration Problem. Talk Outline. Using Wrapper Classes. The Interface Evolution Problem Case For inary Modifying s On The Fly Urs Hölzle and Ralph Keller Department of Computer Science University of California, Santa arbara http://www.cs.ucsb.edu/oocsb/bca Motivation OOP vision: Pervasive

More information

Incremental Replication for Mobility Support in OBIWAN Λ

Incremental Replication for Mobility Support in OBIWAN Λ Incremental Replication for Mobility Support in OBIWAN Λ Luís Veiga Paulo Ferreira INESC/IST, Rua Alves Redol 9, Lisboa, Portugal phone: 35 2 3292 E-mail: fluis.veiga,paulo.ferreirag@inesc.pt Abstract

More information

1. Introduction. Java. Fall 2009 Instructor: Dr. Masoud Yaghini

1. Introduction. Java. Fall 2009 Instructor: Dr. Masoud Yaghini 1. Introduction Java Fall 2009 Instructor: Dr. Masoud Yaghini Outline Introduction Introduction The Java Programming Language The Java Platform References Java technology Java is A high-level programming

More information

THE IMPLEMENTATION OF A DISTRIBUTED FILE SYSTEM SUPPORTING THE PARALLEL WORLD MODEL. Jun Sun, Yasushi Shinjo and Kozo Itano

THE IMPLEMENTATION OF A DISTRIBUTED FILE SYSTEM SUPPORTING THE PARALLEL WORLD MODEL. Jun Sun, Yasushi Shinjo and Kozo Itano THE IMPLEMENTATION OF A DISTRIBUTED FILE SYSTEM SUPPORTING THE PARALLEL WORLD MODEL Jun Sun, Yasushi Shinjo and Kozo Itano Institute of Information Sciences and Electronics University of Tsukuba Tsukuba,

More information

Extending Applications using Reflective Assistant Agents

Extending Applications using Reflective Assistant Agents Extending Applications using Reflective Assistant Agents Antonella Di Stefano Giuseppe Pappalardo Corrado Santoro Emiliano Tramontana Dipartimento di Ingegneria Informatica e delle Telecomunicazioni Dipartimento

More information

Presented at the European Interactive Workshop on Aspects in Software 2004 Motivation and Requirements for a Versatile AOP Kernel

Presented at the European Interactive Workshop on Aspects in Software 2004 Motivation and Requirements for a Versatile AOP Kernel Presented at the European Interactive Workshop on Aspects in Software 2004 Motivation and Requirements for a Versatile AOP Kernel Éric Tanter 1,2 Jacques Noyé 3,2 1 University of Chile, DCC/CWR Avenida

More information

Extensible Type System Framework. for a Java Pre-Processor : EPP (DRAFT) Yuuji ICHISUGI. Electrotechnical Laboratory, PRESTO JST

Extensible Type System Framework. for a Java Pre-Processor : EPP (DRAFT) Yuuji ICHISUGI. Electrotechnical Laboratory, PRESTO JST Extensible Type System Framework for a Java Pre-Processor : EPP (DRAFT) Yuuji ICHISUGI ichisugi@etl.go.jp Electrotechnical Laboratory, PRESTO JST Abstract The author is developing an extensible Java pre-processor,

More information

Java TM Introduction. Renaud Florquin Isabelle Leclercq. FloConsult SPRL.

Java TM Introduction. Renaud Florquin Isabelle Leclercq. FloConsult SPRL. Java TM Introduction Renaud Florquin Isabelle Leclercq FloConsult SPRL http://www.floconsult.be mailto:info@floconsult.be Java Technical Virtues Write once, run anywhere Get started quickly Write less

More information

metaxa and the Future of Reflection

metaxa and the Future of Reflection metaxa and the Future of Reflection Michael Golm, Jürgen Kleinöder University of Erlangen-Nürnberg Dept. of Computer Science 4 (Operating Systems) Martensstr. 1, D-91058 Erlangen, Germany {golm, kleinoeder}@informatik.uni-erlangen.de

More information

with a Meta-Level Architecture Department of Information Science, The University oftokyo In Proceedings of 7th European Conference on Object-Oriented

with a Meta-Level Architecture Department of Information Science, The University oftokyo In Proceedings of 7th European Conference on Object-Oriented Designing an Extensible Distributed Language with a Meta-Level Architecture Shigeru Chiba Takashi Masuda Department of Information Science, The University oftokyo E-mail: fchiba,masudag@is.s.u-tokyo.ac.jp

More information

A Metaobject Protocol for Fault-Tolerant CORBA Applications *

A Metaobject Protocol for Fault-Tolerant CORBA Applications * A Metaobject Protocol for Fault-Tolerant CORBA Applications * Marc-Olivier Killijian 1, Jean-Charles Fabre, Juan-Carlos Ruiz-Garcia LAAS-CNRS, 7 Avenue du Colonel Roche 31077 Toulouse cedex, France Shigeru

More information

Asynchronous Patterns for Dynamic Maintenance

Asynchronous Patterns for Dynamic Maintenance Asynchronous Patterns for Dynamic Maintenance Manuel Oriol ETH Zurich (Swiss Federal Institute of Technology) Department of Computer Science CH-8092 Zürich, Switzerland moriol@inf.ethz.ch Abstract Software

More information

When Java technology burst onto the Internet scene in 1995,

When Java technology burst onto the Internet scene in 1995, MOBILE CODE SECURITY SECURE JAVA CLASS LOADING The class loading mechanism, LI GONG Sun Microsystems central to Java, plays a key role in JDK 1.2 by enabling When Java technology burst onto the Internet

More information

: Primitive data types Variables Operators if, if-else do-while, while, for. // // First Java Program. public class Hello {

: Primitive data types Variables Operators if, if-else do-while, while, for. // // First Java Program. public class Hello { 2110211 : 2110211 Primitive data types Variables Operators if, if-else do-while, while, for 2110211 7/11/2002 2 // // First Java Program public class Hello { // // main method public static void main(string[]

More information

Fundamentals of Programming. By Budditha Hettige

Fundamentals of Programming. By Budditha Hettige Fundamentals of Programming By Budditha Hettige Overview Exercises (Previous Lesson) The JAVA Programming Languages Java Virtual Machine Characteristics What is a class? JAVA Standards JAVA Keywords How

More information

Introduction to Programming (Java) 2/12

Introduction to Programming (Java) 2/12 Introduction to Programming (Java) 2/12 Michal Krátký Department of Computer Science Technical University of Ostrava Introduction to Programming (Java) 2008/2009 c 2006 2008 Michal Krátký Introduction

More information

Supporting Variability with Late Semantic Adaptations of Domain-Specific Modeling Languages

Supporting Variability with Late Semantic Adaptations of Domain-Specific Modeling Languages Supporting Variability with Late Semantic Adaptations of Domain-Specific Modeling Languages Tom Dinkelaker Martin Monperrus Mira Mezini Technische Universität Darmstadt, Germany {dinkelaker,monperrus,mezini}@cs.tu-darmstadt.de

More information

Untyped Memory in the Java Virtual Machine

Untyped Memory in the Java Virtual Machine Untyped Memory in the Java Virtual Machine Andreas Gal and Michael Franz University of California, Irvine {gal,franz}@uci.edu Christian W. Probst Technical University of Denmark probst@imm.dtu.dk July

More information

Advantages of dynamic method-oriented mechanism in a statically typed object-oriented programming language Z0

Advantages of dynamic method-oriented mechanism in a statically typed object-oriented programming language Z0 Advantages of dynamic method-oriented mechanism in a statically typed object-oriented programming language Z0 Sašo Greiner, Janez Brest, Viljem Žumer University of Maribor, Faculty of Electrical Engineering

More information

2 Haskell. Haskell (629) 59. Haskell. B. Curry. 1.2, 1.3, Haskell 98 [16] 1. Haskell. Haskell. ( Haskell.

2 Haskell. Haskell (629) 59. Haskell. B. Curry. 1.2, 1.3, Haskell 98 [16] 1. Haskell. Haskell. (  Haskell. (629) 59 Haskell 1 Haskell Haskell Hugs GHC 2 Haskell 2.1 Haskell 1987 FPCA (Functional Programming Languages and Computer Architechture) Programming Language Haskell and Systems Yoshiyuki ONOUE,, Graduate

More information

Lecture 1: Overview of Java

Lecture 1: Overview of Java Lecture 1: Overview of Java What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed for easy Web/Internet applications Widespread

More information

An Approach to Implementing Dynamic Adaptation in C++

An Approach to Implementing Dynamic Adaptation in C++ An Approach to Implementing Dynamic Adaptation in C++ Scott D. Fleming, Betty H.C. Cheng, R. E. Kurt Stirewalt and Philip K. McKinley Software Engineering and Network Systems Laboratory Department of Computer

More information

Multi-Level Virtual Machine Debugging using the Java Platform Debugger Architecture

Multi-Level Virtual Machine Debugging using the Java Platform Debugger Architecture Multi-Level Virtual Machine Debugging using the Java Platform Debugger Architecture Thomas Würthinger 1, Michael L. Van De Vanter 2, and Doug Simon 2 1 Institute for System Software Johannes Kepler University

More information

Parallelism of Java Bytecode Programs and a Java ILP Processor Architecture

Parallelism of Java Bytecode Programs and a Java ILP Processor Architecture Australian Computer Science Communications, Vol.21, No.4, 1999, Springer-Verlag Singapore Parallelism of Java Bytecode Programs and a Java ILP Processor Architecture Kenji Watanabe and Yamin Li Graduate

More information

An Aspect-Oriented Language for Exception Handling

An Aspect-Oriented Language for Exception Handling Vol. 47 No. 4 Apr. 2006 GluonJ/R GluonJ/R block recover GluonJ/R An Aspect-Oriented Language for Exception Handling Natsuko Kumahara, Kenichi Kourai and Shigeru Chiba We must often handle exceptions raised

More information

CS 11 java track: lecture 1

CS 11 java track: lecture 1 CS 11 java track: lecture 1 Administrivia need a CS cluster account http://www.cs.caltech.edu/ cgi-bin/sysadmin/account_request.cgi need to know UNIX www.its.caltech.edu/its/facilities/labsclusters/ unix/unixtutorial.shtml

More information

OpenCorba: a Reflective Open Broker

OpenCorba: a Reflective Open Broker OpenCorba: a Reflective Open Broker Thomas Ledoux École des Mines de Nantes 4 rue Alfred Kastler F-44307 Nantes cedex 3, France Thomas.Ledoux@emn.fr Abstract. Today, CORBA architecture brings the major

More information

Mobile Process Resumption In Java Without Bytecode Rewriting

Mobile Process Resumption In Java Without Bytecode Rewriting Mobile Process Resumption In Java Without Bytecode Rewriting Matthew Sowders University of Nevada, Las Vegas Las Vegas, Nevada 89154 E-mail: sowders@unlv.nevada.edu Jan Bækgaard Pedersen University of

More information

A ROLLBACK MANAGER FOR OPTMISTIC DISTRIBUTED HLA SIMULATIONS

A ROLLBACK MANAGER FOR OPTMISTIC DISTRIBUTED HLA SIMULATIONS ua Ktraes ae computadores 183 A ROLLBACK MANAGER FOR OPTMISTIC DISTRIBUTED HLA SIMULATIONS Fernando Vardânega, Carlos Maziero Programa de PósGraduação em Informática Aplicada Pontifícia Universidade Católica

More information

MetaVM: A Transparent Distributed Object System Supported by Runtime Compiler

MetaVM: A Transparent Distributed Object System Supported by Runtime Compiler MetaVM: A Transparent Distributed Object System Supported by Runtime Compiler Kazuyuki Shudo Yoichi Muraoka School of Science and Engineering Waseda University Okubo 3-4-1, Shinjuku-ku, Tokyo 169-8555,

More information

2 Egon Borger, Wolfram Schulte: Initialization Problems for Java 1 class A implements I{ } 2 3 interface I { static boolean dummy = Main.sideeffect =

2 Egon Borger, Wolfram Schulte: Initialization Problems for Java 1 class A implements I{ } 2 3 interface I { static boolean dummy = Main.sideeffect = Initialization Problems for Java? Egon Borger 1, Wolfram Schulte 2 1 Universita di Pisa, Dipartimento di Informatica, I-56125 Pisa, Italy, e-mail: boerger@di.unipi.it 2 Universitat Ulm, Fakultat fur Informatik,

More information

Lecture 2. COMP1406/1006 (the Java course) Fall M. Jason Hinek Carleton University

Lecture 2. COMP1406/1006 (the Java course) Fall M. Jason Hinek Carleton University Lecture 2 COMP1406/1006 (the Java course) Fall 2013 M. Jason Hinek Carleton University today s agenda a quick look back (last Thursday) assignment 0 is posted and is due this Friday at 2pm Java compiling

More information

Advanced programming for Java platform. Introduction

Advanced programming for Java platform. Introduction Advanced programming for Java platform Introduction About course Petr Hnětynka hnetynka@d3s.mff.cuni.cz http://d3s.mff.cuni.cz/teaching/vsjava/ continuation of "Java (NPRG013)" basic knowledge of Java

More information

Evolution of Collective Object Behavior in Presence of Simultaneous Client-Specific Views

Evolution of Collective Object Behavior in Presence of Simultaneous Client-Specific Views Evolution of Collective Object Behavior in Presence of Simultaneous Client-Specific Views Bo Nørregaard Jørgensen, Eddy Truyen The Maersk Mc-Kinney Moller Institute for Production Technology, University

More information

Exploiting Reflection to Add Persistence and Query Optimization to a Statically Typed Object-Oriented Language

Exploiting Reflection to Add Persistence and Query Optimization to a Statically Typed Object-Oriented Language Exploiting Reflection to Add Persistence and Query Optimization to a Statically Typed Object-Oriented Language Gökhan Kutlu J. Eliot B. Moss Department of Computer Science University of Massachusetts Amherst,

More information

FT-Java: A Java-Based Framework for Fault-Tolerant Distributed Software

FT-Java: A Java-Based Framework for Fault-Tolerant Distributed Software FT-Java: A Java-Based Framework for Fault-Tolerant Distributed Software Vicraj Thomas, Andrew McMullen, and Lee Graba Honeywell Laboratories, Minneapolis MN 55418, USA Vic.Thomas@Honeywell.com Abstract.

More information

JavaSplit. A Portable Distributed Runtime for Java. Michael Factor Assaf Schuster Konstantin Shagin

JavaSplit. A Portable Distributed Runtime for Java. Michael Factor Assaf Schuster Konstantin Shagin JavaSplit A Portable Distributed Runtime for Java Michael Factor Assaf Schuster Konstantin Shagin Motivation Interconnected commodity workstations can yield a cost-effective substitute to super-computers.

More information

Java Programming Language Mr.Rungrote Phonkam

Java Programming Language Mr.Rungrote Phonkam 2 Java Programming Language Mr.Rungrote Phonkam rungrote@it.kmitl.ac.th Contents 1. Intro to Java. 2. Java Platform 3. Java Language 4. JDK 5. Programming Steps 6. Visual Programming 7. Basic Programming

More information

Reflection and Object-Oriented Analysis

Reflection and Object-Oriented Analysis Walter Cazzola, Andrea Sosio, and Francesco Tisato. Reflection and Object-Oriented Analysis. In Proceedings of the 1 st Workshop on Object-Oriented Reflection and Software Engineering (OORaSE 99), pages

More information

Before you start with this tutorial, you need to know basic Java programming.

Before you start with this tutorial, you need to know basic Java programming. JDB Tutorial 1 About the Tutorial The Java Debugger, commonly known as jdb, is a useful tool to detect bugs in Java programs. This is a brief tutorial that provides a basic overview of how to use this

More information

Compiling Techniques

Compiling Techniques Lecture 10: Introduction to 10 November 2015 Coursework: Block and Procedure Table of contents Introduction 1 Introduction Overview Java Virtual Machine Frames and Function Call 2 JVM Types and Mnemonics

More information

Chair of Software Engineering. Java and C# in depth. Carlo A. Furia, Marco Piccioni, Bertrand Meyer. Java: reflection

Chair of Software Engineering. Java and C# in depth. Carlo A. Furia, Marco Piccioni, Bertrand Meyer. Java: reflection Chair of Software Engineering Carlo A. Furia, Marco Piccioni, Bertrand Meyer Java: reflection Outline Introductory detour: quines Basic reflection Built-in features Introspection Reflective method invocation

More information

The Art of Metaprogramming in Java. Falguni Vyas Dec 08, 2012

The Art of Metaprogramming in Java. Falguni Vyas Dec 08, 2012 The Art of Metaprogramming in Java Falguni Vyas Dec 08, 2012 Metadata What is Metadata? Data that describes other data Defined as data providing information about one or more aspects of the data, such

More information

Java A Prototype Dynamic Diversity for Protecting Java Software

Java A Prototype Dynamic Diversity for Protecting Java Software Copyright c The Institute of Electronics, Information and Communication Engineers SCIS 2012 The 29th Symposium on Cryptography and Information Security Kanazawa, Japan, Jan. 30 - Feb. 2, 2012 The Institute

More information

TRAP/J: Transparent Generation of Adaptable Java Programs

TRAP/J: Transparent Generation of Adaptable Java Programs TRAP/J: Transparent Generation of Adaptable Java Programs S. Masoud Sadjadi 1, Philip K. McKinley 2, Betty H.C. Cheng 2, and R.E. Kurt Stirewalt 2 1 School of Computer Science, Florida International University,

More information

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved. Assoc. Prof. Dr. Marenglen Biba (C) 2010 Pearson Education, Inc. All rights reserved. Course: Object-Oriented Programming with Java Instructor : Assoc. Prof. Dr. Marenglen Biba Office : Faculty building

More information

CHAPTER 1. Introduction to JAVA Programming

CHAPTER 1. Introduction to JAVA Programming CHAPTER 1 Introduction to JAVA Programming What java is Java is high level You can use java to write computer applications that computes number,process words,play games,store data, etc. History of Java.

More information

Efficient and Portable Implementation of Java-style Exception Handling in C

Efficient and Portable Implementation of Java-style Exception Handling in C Regular Paper Efficient and Portable Implementation of Java-style Exception Handling in C Seiji Umatani, Hirokazu Shobayashi, Masahiro Yasugi and Taiichi Yuasa An important issue in implementing high-level

More information

Executable Connectors: Towards Reusable Design Elements

Executable Connectors: Towards Reusable Design Elements Executable Connectors: Towards Reusable Design Elements Appeared in ESEC 97 Stéphane Ducasse and Tamar Richner Software Composition Group, Institut für Informatik (IAM), Universität Bern (ducasse,richner)@iam.unibe.ch

More information

A Thought on Specification Reflection

A Thought on Specification Reflection A Thought on Specification Reflection Yoonsik Cheon, Yoshiki Hayashi Department of Computer Science, University of Texas at El Paso El Paso, Texas 79912 USA cheon@cs.utep.edu Gary T. Leavens Department

More information

Research on Embedded Java Virtual Machine and its Porting

Research on Embedded Java Virtual Machine and its Porting IJCSNS International Journal of Computer Science and Network Security, VOL.7 No.9, September 2007 157 Research on Embedded Java Virtual Machine and its Porting Jun QIN, Qiaomin LIN, Xiujin WANG College

More information

Aspect-Oriented Programming using Reflection

Aspect-Oriented Programming using Reflection Aspect-Oriented Programming using Reflection Gregory T. Sullivan Artificial Intelligence Laboratory, Massachusetts Institute of Technology gregs@ai.mit.edu http://www.ai.mit.edu/~gregs August 3, 2001 [For

More information