Eiffel library to generate Java bytecodes DIPLOMA PROJECT PLAN 1. PROJECT DESCRIPTION. Overview. Scope of the work

Similar documents
02 B The Java Virtual Machine

Checking Access to Protected Members in the Java Virtual Machine

CA Compiler Construction

C Compiler Targeting the Java Virtual Machine

2 Introduction to Java. Introduction to Programming 1 1

n Introduction n Art of programming language design n Programming language spectrum n Why study programming languages? n Overview of compilation

INTRODUCTION TO JAVA PROGRAMMING LANGUAGE

- Applet java appaiono di frequente nelle pagine web - Come funziona l'interprete contenuto in ogni browser di un certo livello? - Per approfondire

Program Optimization for Multi-core Architectures

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

Quantitative Analysis for Java Microprocessor Architectural Requirements: Instruction Set Design 1

Designing an Innovative Client PROJECT PLAN

CSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution

Chapter 1 Fundamentals of Java Programming

Objects for lexical analysis

Contents. Java - An Introduction. Java Milestones. Java and its Evolution

Interactive Game Design with Greenfoot YEAR 1 Greenfoot Single-player Interactive Game

A Typing System for an Optimizing Multiple-Backend Tcl Compiler

The Hotspot Java Virtual Machine: Memory and Architecture

From Eiffel to the Java Virtual Machine

Virtual Machines as an Aid in Teaching Computer Concepts

Java and Real Time Storage Applications

Connect Here. Go Anywhere.

Report of the case study in Sistemi Distribuiti A simple Java RMI application

Briki: a Flexible Java Compiler

1. Overview of the Java Language

How to make the computer understand? Lecture 15: Putting it all together. Example (Output assembly code) Example (input program) Anatomy of a Computer

Section 1.4. Java s Magic: Bytecode, Java Virtual Machine, JIT,

Online Recruitment System 1. INTRODUCTION

Comparing a fully online course to a blended one: the case of compilers

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program

A Thread Monitoring System for Multithreaded Java Programs

An evaluation of the Java Card environment

ATSBA: Advanced Technologies Supporting Business Areas. Programming with Java. 1 Overview and Introduction

Artificial Intelligence. Class: 3 rd

Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java

Lab Experience 17. Programming Language Translation

jmonitor: Java Runtime Event Specification and Monitoring Library

Compiler I: Syntax Analysis Human Thought

Programming in Python. Basic information. Teaching. Administration Organisation Contents of the Course. Jarkko Toivonen. Overview of Python

Syllabus: IST451. Division of Business and Engineering. Penn State Altoona

William Paterson University of New Jersey Department of Computer Science College of Science and Health Course Outline

Antlr ANother TutoRiaL

Language Processing Systems

An Overview of Java. overview-1

Chapter 1 Java Program Design and Development

Programming Languages

Cross-platform IL code manipulation library for runtime instrumentation of.net applications

Checking Access to Protected Members in the Java Virtual Machine

9/11/15. What is Programming? CSCI 209: Software Development. Discussion: What Is Good Software? Characteristics of Good Software?

Crash Course in Java

1. Properties of Transactions

Java applets. SwIG Jing He

U11 Boys Black March 21st Monday 6:00-7:30 p.m. Damien Training Field 2 March 24th Thursday 4:30-6:00 p.m. Damien Training Field 2 March 28th Monday 6

Lecture 32: The Java Virtual Machine. The Java Virtual Machine

A Programming Language for Processor Based Embedded Systems

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

Enumerated Types in Java

Configuration Management Plan

Problems and Measures Regarding Waste 1 Management and 3R Era of public health improvement Situation subsequent to the Meiji Restoration

IT UNIVERSITY OF COPENHAGEN. Abstract. Department of Software Development and Technology (SDT) Master s Thesis. Generic deobfuscator for Java

C. Cross-Platform Java also presented a middleware threat to Microsoft s operating system monopoly

Limitations of Data Encapsulation and Abstract Data Types

Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam.

Principles of Programming Languages Topic: Introduction Professor Louis Steinberg

Portable Profiling of Memory Allocation in Java

Lesson 06: Basics of Software Development (W02D2

Introduction to Java

A PRODUCT METRICS TOOL INTEGRATED INTO

Java Virtual Machine Locks

Virtual Machines. Virtual Machines

College of Visual and Performing Arts Planning Calendar

EASTERN MICHIGAN UNIVERSITY DIVISION OF ACADEMIC AFFAIRS REQUEST FOR NEW COURSE

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Solar Power Systems Web Monitoring

GUI application set up using QT designer. Sana Siddique. Team 5

Business Consulting Masters (MSc)

On Performance of Delegation in Java

Fixture List 2018 FIFA World Cup Preliminary Competition

NEW YORK CITY COLLEGE OF TECHNOLOGY/CUNY Computer Systems Technology Department

Using the Java Native Interface to Introduce Device Driver Basics

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz

South East of Process Main Building / 1F. North East of Process Main Building / 1F. At 14:05 April 16, Sample not collected

FAQs about the M.St. in Chinese Studies at the University of Oxford

CSC 551: Web Programming. Spring 2004

Programming Language Inter-conversion

Instrumenting Java bytecode

Parsing Technology and its role in Legacy Modernization. A Metaware White Paper

Curriculum Form. 1. Name of the curriculum Küberturbe tehnoloogiad 2. Name of the curriculum in Cyber Security Engineering

MieruCompiler: Integrated Visualization Tool with Horizontal Slicing for Educational Compilers

Rakudo Perl 6 on the JVM. Jonathan Worthington

Programming Languages

GUIDE FOR MASTER'S STUDENTS Biological Systems Engineering

Securing PHP Based Web Application Using Vulnerability Injection

Programming Languages

Habanero Extreme Scale Software Research Project

Universidad Simón Bolívar

Using Java To Develop Educational Engineering Software

Computer Science Theory. From the course description:

Java History. Java History (cont'd)

Transcription:

Eiffel library to generate Java bytecodes DIPLOMA PROJECT PLAN Project period: 2003-05-26 Monday 2003-09-25 Thursday Student name: Daniel Gisel Email address: daniel@gisel.ch Supervising Assistant: Karine Arnout Supervising Professor: Bertrand Meyer 1. PROJECT DESCRIPTION Overview One goal of the Java language environment is making write once, run anywhere possible. To achieve this, the Java compiler translates Java programs into an intermediate language called Java bytecodes the platform-independent codes executed by the Java Virtual Machine (JVM) [6]. This means that as long as a computer has a JVM, a program in Java bytecodes can run on it, independent of the operating system or the hardware of the computer. Even if the JVM and the Java bytecodes are designed and optimized for the Java programming language, the JVM does not assume that the instructions it executes were generated from Java code. It is also possible to compile other programming languages to Java bytecodes. The Java bytecodes of one class is always stored in class files (name.class). This file contains all information about the class, like the access rights, references to the parent class and all the interfaces the class implements, tables with all the fields and the methods (including their code) of the class and the constant pool. The constant pool is a table of structures representing various string constants, class and interface names, field names and other constants that are referred to within the class file structure and its substructures. Scope of the work The main work of my diploma project is to design and implement an Eiffel library which is able to generate Java class files that can be executed by a Java Virtual Machine. To achieve this goal, I will do the following steps. First I have to create an object oriented data structure that maps the structure of a Java class file. This data structure will contain classes that represent a Java class, a method, a field, the constant pool, and so on. These classes will be fully contracted to catch as many errors as possible in the code generation to avoid invalid class files. Based on this data structure I will build a layer that allows an easy Java class file creation for the client. In this layer there will be generators for classes, methods and fields. To test this library and also to give examples how to use the framework, I will create a simple language with a corresponding compiler that uses the library as backend. The language will be similar to the Java language, but much simpler. 1

Intended results Library: The created library will be fully contracted and produce correct Java class files. It will be built up of two layers. The first layer is very close to the structure of the class files and allows direct access to the elements. The second layer implements generators for classes and methods and allows an easy creation of class files. Compiler: I will design a simple language similar to Java that is compiled to Java bytecodes. The backend of the compiler will be the library created in the first part of my project. The goal of this compiler is to test the library and to show how to use it. Documentation: The documentation will contain three documents. The first one is the report of the whole project. The other two documents are a user and a developer manual for the library. 2. BACKGROUND MATERIAL Reading list Eiffel: - Object-Oriented Software Construction [7] - Gobo Eiffel Project [2] Java: - Byte Code Engineering Library (BCEL) [3] - The Java Language Specification, 2nd edition [5] - The Java Virtual Machine Specification, 2nd edition [6] Compiler: - Gobo Eiffel Project [2] - Compilers: Principles, Techniques and Tools, Addison-Wesley [1] - Advanced Compiler Design and Implementation [8] 3. PROJECT MANAGEMENT Objectives and priorities Objective Priority Library (lower level) 1 Library (higher level) 2 Compiler 3 Report 1 User manual 3 Developer manual 2 2

Criteria for success The main goal of this project is to create a well designed, correct and comprehensible library to generate Java bytecodes. So, the criteria for success are the quality of the software and the documentation. To achieve a high quality, the following points must be satisfied: Quality of software: - Design by Contract - core principles of Object-Oriented Software Construction, 2nd edition [7] - good design of the interfaces - completeness: o The library should cover all aspects of a Java class file. It should provide an interface that allows the user to directly work with the structures of a class file (lower level). On the other hand there should also be an interface that makes it possible to easily create a correct class file with a generator (higher level). o The compiler and its corresponding language should be as simple as possible. Their only purpose is to be a tool for testing the library and to give examples how the library can be used. Quality of documentation: - good structure - understandability - completeness - covers the final state of the work Method of work I will use the following technologies for my project: - Eiffel programming language - Gobo Eiffel Lex and Yacc [2] for implementing the scanner and parser of the compiler - Gobo Eiffel Test [2] for implementing the test cases - Java application launcher (java) [9] to execute the generated Java class files - Java class file disassembler (javap) [9] to analyze the generated Java class files 3

Quality management Documentation - Report: The report contains all aspects of the project: the design of the library, its implementation, the design of the generator classes, their implementation, the grammar of the language, a description of the compiler, report of the tests and theoretical background for all the mentioned parts. - User manual: The user manual is a short description of the interface, in addition to the contracts. - Developer manual: The developer manual describes the ideas of the implementation of the library (in addition to the comments in the code) and lists possible extensions and the limits of the library. Validation steps Every Friday I will send Karine a short report of the work I have done during the week. I will also discuss my ideas and solutions with Karine and with Emmanuel Stapf to work towards the right goal. 4. PLAN WITH MILESTONES Project steps - Design a data structure to map the structures of a Java class file - Implement the data structure - Design classes to easily create Java byte codes (for example class generator, method generator, and so on) - Implement classes - Create a language and a corresponding compiler to test the framework as compiler backend - Three presentations (introductory presentation, intermediary presentation, final presentation) Parallel to all these points I will write the documentation. Deadline 2003-09-25 Thursday 17 weeks and 4 days = 89 days 4

Tentative schedule 2003-05-26 2003-06-02 2003-06-09 2003-06-16 2003-06-23 2003-06-30 2003-07-07 2003-07-14 2003-07-21 2003-07-28 2003-08-04 2003-08-11 2003-08-18 2003-08-25 2003-09-01 2003-09-08 2003-09-15 2003-09-22 Start End 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 Thesis 22 39 Introductory presentation 23 23 Intermediary presentation 32 32 Final presentation 38 39 Final corrections 38 38 Reserve, unexpected events 36 37 Report Writing report 22 35 Writing user manual 29 35 Writing developper manual 26 35 Bytecode generator Designing interface to Java bytecodes 22 22 Implementing interface 23 25 Designing generator classes 27 27 Implementing generator classes 28 29 Creating test-language 31 31 Implementing compiler 32 33 Testing the whole software 34 34 REFERENCES [1] Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman: Compilers: Principles, Techniques and Tools, Addison-Wesley, 1986. [2] Eric Bezault: Gobo Eiffel Project, Online at http://www.gobosoft.com, consulted in April 2003. [3] Byte Code Engineering Library (BCEL), Online at: http://jakarta.apache.org/bcel/, consulted in May 2003. [4] Chair of Software Engineering: Semester-/Diplomarbeiten, Online at: http://se.inf.ethz.ch/projects/index.html, consulted in March 2003. [5] James Gosling, Bill Joy, Guy Steele, Gilad Bracha: The Java Language Specification, 2nd edition, Addison-Wesley, 2000, http://java.sun.com/docs/books/jls/. [6] Tim Lindholm, Frank Yellin: The Java Virtual Machine Specification, 2nd edition, Addison-Wesley, 1999, http://java.sun.com/docs/books/vmspec/. [7] Bertrand Meyer: Object-Oriented Software Construction, 2nd edition, Prentice Hall, 1997. [8] Seven Muchnick, Advanced Compiler Design and Implementation, Morgan Kaufmann Publishers, 1997. [9] Java 2 Platform, available from http://java.sun.com. 5