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

Peter Wang novalazy at gmail.com
Tue Jun 2 09:22:54 AEST 2009


On 2009-06-02, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>
> 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.

I guess we'll have to break up large methods somehow.  But 9400 lines of
Mercury is.. I assume it's generated, so the generator can be changed.

> (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.

I have an incomplete patch that fixes some RTTI problems so that getopt
works.  Maybe that's the problem here?  I'll send it to you later.

> (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.
>
...
> 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 ...

Yes.  The same problem occurs with the name '', which appears in moose
(unused).

Peter

--------------------------------------------------------------------------
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