FJavaC (a functional Java compiler) now on F# using Mono

Stephen Tse of UPenn has just completed his cross-compilation of FJavaC with F# and OCaml, using F# 1.1 on Mono/Linux (he's made some notes about using F# with Mono/Linux on the F# Wiki - some further notes are below). 

To quote their website, FJavaC is 

"a Java 5 compiler ... our long term goal is to produce a complete and formal specification of Java compilation. To be complete, all language features and rules that are informally described in Sun's Java language specification will be included. To be formal, the specification will be written in a machine-checkable language of a logical framework (Twelf), using only axioms and inference rules. Fjava is written in a functional style to make such a formalization possible."

For parsing FJavaC uses syntactic specifications based on ordered context-free grammars (OCFGs) with datatype tags, an amazingly concise form of grammer specification described in a recent paper authored by  Stephen in conjunction with Steve Zdancewic.

Stephen has reported a number of minor issues when running F# on Mono/Linux.  The most significant things are:

  • You should not soft-link to fscp10ntc.exe: the compiler no longer knows where it is installed. If you copy it to /usr/local/bin you should copy *10ntc.dll as well.
  • fsi10ntc.exe only works with the "--no-gui" flag (otherwise it looks for System.Windows.Forms).  Also no ctrl-c handler is installed (something we should be able to address in the next release). Version of fsi10ntc.exe did not work at all.


Skip to main content