[m-dev.] compiling minizinc tools with java grade

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Jun 2 00:41:33 AEST 2009


The following is what happened what happened when I attempted to
compile the MiniZinc tools (a subset of the G12 system) in the java

(1) MiniZinc-to-FlatZinc converter (mzn2fzn)

This appears to have killed the Java compiler:

Making Java class files
Mercury/javas/mercury/minizinc_to_flatzinc.java:38373: code too large
   private static java.lang.Object [] flatten_gen_app_expr_7_p_0(

minizinc_to_flatzinc.java is 66,833 lines of Java generated from
about 9400 lines of Mercury.  Searching for the above error message
on the web indicates that this is a result of the class file format
limiting each method to 64Kb of bytecode.

(2) FlatZinc-to-XML converter (fzn2xml)

Compiles and "links".  Aborts with an exception, due to
NYI RTTI by the looks of it.

(3) FlatZinc solution post-processor (solns2dzn)

As above.

(4) XML-to-FlatZinc converter (xml2fzn)

This fails to compile because Mercury function names are not
being mangled into Java method names correctly, e.g.

     :- func ('7') = int.

     ('7') = 0x37.

becomes the following in Java:

     public static int 7_0_f_0()
            boolean succeeded = false;
            int HeadVar__1_1 = (int) 55;

            return HeadVar__1_1;

Actually, the problem here is that mlds_to_java.m just re-uses the name
mangler for the C backends and that assumes that the module name will be
prefixed to the function name in the target language.  Since the Java
backend doesn't do that ...

mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au

More information about the developers mailing list