braibant / icfp-contest-2014

3 stars 0 forks source link

Implement a compiler from mini ml to the CPU #3

Closed braibant closed 10 years ago

bobot commented 10 years ago

Je vais déjà faire les parties basse, description language d'arrivé, printer, ... . Est-ce que vous pensez à une définition précise de mini ml.

bobot commented 10 years ago

Si vous avez un mini-ml générique sous la main je suis preneur. J'ai repris un code open-source mais je ne suis pas sure que ce soit une bonne idée au final.

bobot commented 10 years ago

pinger moi 06.84.65.85.92 si je suis un facteur limitant. Je dois avouer que je n'ai jamais travaillé avec des machines SECD...

braibant commented 10 years ago

Yo, on peut aussi faire un salon irc si tu veux. pour ce qui est du mini ml, on a pas trop d'idees. On bosse sur le simulateur, avec Damien, et Gabriel debugge sa machine. Il vient de debugguer l'addition, donc on a du temps devant nous

bobot commented 10 years ago

I going to forbid partial application

bobot commented 10 years ago

I don't know what to do on the backend part of the compilers that will not be optimizations (tail-call, successive let,...) which can be done later if the AI we write are too slow. Is there some blocking thing I can tackle? Help Gabriel in some way? Do boring stuff? @gasche

gasche commented 10 years ago

I think the priority right now is to start actually writing some AIs. So I've lowered the FFI manually to use tuples (which are supported now) instead of records (not yet properly supported), and will now try to compile a very first OCaml program to run on the simulator with Pierre.

If you are interested in working on record lowering, I think that would be a valuable thing to do -- otherwise I may do that. Records are not strictly necessary but I think they are actually very useful. Otherwhise if you want to start writing Minimax or Alpha-Betas, that would surely be helpful as well.

gasche commented 10 years ago

Re. record lowering: I think the best thing to do would be to lower records into nested tuples (I thought of lowering them into nested records, but that's a bit more painful to manage). Finding out how to transform record declarations into such tuples require a bit of Typedtree hackery. One idea would be to translate type t = {a:int; b:int; c:int} into type t = T of int * (int * int), to retain the fact that it is a datatype declaration and not a structural type synonym.

bobot commented 10 years ago

Okay i will work on record lowering it can done from far away. And let you do AI that should be fun. (And i'm a Wp guy not an AI one ;) ) Le 27 juil. 2014 09:59, "gasche" notifications@github.com a écrit :

Re. record lowering: I think the best thing to do would be to lower records into nested tuples (I thought of lowering them into nested records, but that's a bit more painful to manage). Finding out how to transform record declarations into such tuples require a bit of Typedtree hackery. One idea would be to translate type t = {a:int; b:int; c:int} into type t = T of int * (int * int), to retain the fact that it is a datatype declaration and not a structural type synonym.

— Reply to this email directly or view it on GitHub https://github.com/braibant/icfp-2014/issues/3#issuecomment-50258458.

bobot commented 10 years ago

There is a problem with the current compilegcc main_ia and the javascript simulator of the organizers. I will investigate

gasche commented 10 years ago

I'm not sure which problem you see; I test world_ia.ml in the simulator and it seems to work. Anyway, heading for lunch. Good luck!

bobot commented 10 years ago

Which simulator? the one of the organizers? Try to access the argument world and ghost code and the bug appear (they are on the first frame).