Proposed Project:

JAVAZ

 

 

 

 

 

 

 

 

 

 

Submitted to Professor Chang-Hyun Jo

CPSC 423 Language Processor Techniques

Section 4  ·  TR 5:30 - 6:45pm  ·  Fall 2002

 

 

 

 

 

Prepared by Brad Rippe (7378)
Group Name: Compilesoft

 

 

 

September 6, 2002

 

 

 

 

 

 

 

 

 

 

 

 

Abstract
The focus of this project will be to develop a Java compiler, Javaz, to gain knowledge and experience with the internals of source code compilation.  The project will expose the developer(s) to the six phases in source code compilation, Lexical Analyzer, Syntactic Analyzer, Semantic Analyzer, Intermediate Code Generation, Code Optimization, and Code Generation.

 

Objective and Scope

To develop a basic Java compiler written using C/C++ and/or Java, called Javaz. Successfully incorporate native code with Java code to produce the compiler. Scope will include all phases of compilation, a subset of the complete java grammar and generation of valid java bytecode that can be executed on any JVM. Javaz will not be able to handle any multi-threaded applications in its first release. Javaz initial release will only be available on Win32 systems.  

 

Commercial Potential

Not Yet Determined

 

Technical Background and Experience
Brad Rippe

Computer Programmer Analyst, Sr. at Fullerton College
B.S.C.S in 1999 from Florida International University
(See attached resume)

 

Technical Description
Basic compiler functionality will be written in Java and C/C++ source code. C code will be used to facilitate the Lexical analyzing and Parsing with Flex and Bison. Java will interface with the C code generated by Flex and Bison through Java Native Interface (JNI). Flex will be used for the Lexical Analyzer and Bison will be used for the source code parser.

 

High Level Overview

 

Javaz will read java source code and convert it into binary bytecode. So the following code:

 

 

public class HelloWorld {

      public static void main(String[] args) {

            System.out.println(“Hello World”);

      }

}

 

After compilation, will become:

 

Method HelloWorld()

   0 aload_0

   1 invokespecial #1 <Method java.lang.Object()>

   4 return

 

Method void main(java.lang.String[])

   0 getstatic #2 <Field java.io.PrintStream out>

   3 ldc #3 <String "Hello World">

   5 invokevirtual #4 <Method void println(java.lang.String)>

   8 return

 

 

Conversion will occur through the six phases of compilation.

 

Javaz - Six Phases of Compilation

 

 

Methods and Tools

           

Methods

Iterative development cycles based on some methodologies used with XP (Extreme Programming)

 

            References

            Introduction to Compiler Construction – Thomas Parsons

            Lex & Yacc – Tony Mason and Doug Brown

            C++ Black Book – Steven Holzner

 

Java World

            http://www.javaworld.com/javaworld/jw-09-1996/jw-09-bytecodes_p.html

                       

            DeveloperWorks

http://www-106.ibm.com/developerworks/java/library/praxis/pr29.html?dwzone=java

 

            Java Sun Web Site

http://java.sun.com

http://java.sun.com/docs/books/vmspec/

 

XP

http://www.extremeprogramming.org/

 

Barnes and Noble

Whatever I can get my hands on to read

 

            Tools

           

Java Development Kit 1.4.1

         Togethersoft Control Center 6.0

         Microsoft Visual Studio 6.0

         Microsoft Visual Source Safe 6.0

GNU Flex - http://www.gnu.org/software/flex/

         GNU Bison - http://www.gnu.org/software/bison/bison.html

 

Work Plan

(See attached)

 

Facilities

Living room sofa, Wireless internet access, and a lot of Coca-Cola with a side of Frappuccino.

 

Budget

(Budget has not yet been agreed upon from Management and the Development Team)

 

Description of Members

 

            Brad Rippe – Project lead and Developer