Papers

D. Demange, T. Jensen and D. Pichardie. A Provably Correct Stackless Intermediate Representation For Java Bytecode. In Proc. of the 8th Asian Symposium on Programming Languages and Systems (APLAS 2010), Lecture Notes in Computer Science. Springer-Verlag, 2010. To appear. [.pdf]

D. Demange, T. Jensen and D. Pichardie. A Provably Correct Stackless Intermediate Representation For Java Bytecode. Research Report 7021, INRIA, 2009. [.pdf]

Download

Download and install the Javalib/Sawja sources here

Test:
#load "str.cma"
#load "unix.cma"
#directory "+javalib"
#load "zip.cma"
#load "extLib.cma"
#load "ptrees.cma"
#load "javalib.cma"
#load "sawja.cma"


let run filename =
Javalib.iter
(fun j_iorc ->
try
Javalib.JPrint.print_class
(Javalib.map_interface_or_class_context JBir.transform j_iorc)
JBir.print
stdout;
with JBir.Subroutine -> ())
filename

#cd "... directory of you favorite .class file ..."

let _ = run "BubbleSort.class"

let _ = run "javacc.jar"

Online demo

Lauch the web demonstrator of bc2ir here, and test it on your own class files.