Skip to content
/ jFirm Public

Java Bindings for libFirm intended for compiler construction courses (focus is on ease of use)

Notifications You must be signed in to change notification settings

libfirm/jFirm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

                                   jFirm
                           a Java binding for libFirm

1. Introduction

libFirm is a library to repesent computer programs in order to analyse and
transform them. Its main application is compiler construction.

jFirm is a binding of the libFirm library to java.
Design goal was to make usage easy and class/type hierarchies transparent where
possible. The intended target are students in a compiler construction course.
The binding often prefers readabilty/ease of use over performance and memory
efficiency.

Note: This version contains no bindings for the optimisation functions
(students should develop their own optimisations).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2. Usage

2.1 JNA
Make sure the lib directory is in your CLASSPATH because libfirm depends on the
JNA.jar java library

2.2 Native Code
We ship several prebuilt libraries containing the native libFirm code with jFirm:

	lib/libfirm.so    - linux x86 Version
	lib/libfirm.dylib - Mac OS/X (Leopard) Version

a) Linux

You have to make sure java can find these platform specific libraries.
On Linux this works by setting the LD_LIBRARY_PATH environment variable to the
directory that contains the library.

b) Mac

You have to make sure java can find these platform specific libraries.
On the Mac this works by setting the DYLD_LIBRARY_PATH environment variable to
the directory that contains the library.

c) Windows

You have to make sure java can find these platform specific libraries.
On Windows this works by setting the PATH environment variable to the directory
that contains the library.

2.4 Compile Java Source
Just compile the java sourcecode. You have to set your java compiler to
be at least jdk 1.5 (java 5) compliant.

There's a simple brainfuck compiler included for testing.

2.3 Eclipse Users:

Remember to add JNA.jar to JFirms build Java build path and to set your jdk
compliance level to 1.5.
To set the LD_LIBRARY_PATH/DYLD_LIBRARY_PATH environment variables you have to
set them as Environment variables in your Run Configurations (pointing them to
${project_loc:JFirm}/lib or something similar).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3. Contact

	firm@ipd.info.uni-karlsruhe.de

About

Java Bindings for libFirm intended for compiler construction courses (focus is on ease of use)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages