* [Caml-list] Caml Machine and GP @ 2003-07-23 18:53 Lukasz Stafiniak 2003-07-25 9:10 ` Xavier Leroy 0 siblings, 1 reply; 4+ messages in thread From: Lukasz Stafiniak @ 2003-07-23 18:53 UTC (permalink / raw) To: caml-list Hi precious List! I work on genetic programming with typed terms. I would like to use OCaml bytecode-system to run my programs. Evaluation scheme I've used so far: variables by de Brujin indices, beta-reduction by substitution, recurrence by rational trees (with mutable reference cells filled when first encountered in evaluation). I wonder how much of a speedup could I get? -- I guess MUCH. How big are the overheads? I guess for not computationally involved tasks evaluation would be still better, due to the overheads (but these dont give the kicks). How should I do this? Look around in Toplevel, use the path: Translcore.transl_exp --> Bytegen.compile_phrase --> Emitcode.to_memory --> Meta.reify_bytecode? Say, I put a function in Typedtree.expression at one side, and get the result at the other side? How about treatment of types -- do I need to supply them? My terms are typed, but this would involve translating types as well, unnecessarily. More -- how to call functions from outside (perhaps use the environment argument -- what to put there)... Best way to learn these things is reading the source, I guess? Can I catch exceptions from code run this way -- I guess I can, Toplevel does it probably. I also welcome Hi! responses from people interested in genetic programming. I plan to feature (type-based or some other) termination of my programs, and I've developed some generalization algorithms to use in "intelligent" recombination. Best wishes, Lukasz Uwaga! Do końca sierpnia przedłużyliśmy promocje, do pakietów wielostanowiskowych dokładamy PenDrive Sprawdź: http://www.mks.com.pl/promocja-mobile.html ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Caml Machine and GP 2003-07-23 18:53 [Caml-list] Caml Machine and GP Lukasz Stafiniak @ 2003-07-25 9:10 ` Xavier Leroy 2003-07-25 18:12 ` Lukasz Stafiniak 0 siblings, 1 reply; 4+ messages in thread From: Xavier Leroy @ 2003-07-25 9:10 UTC (permalink / raw) To: Lukasz Stafiniak; +Cc: caml-list > I work on genetic programming with typed terms. I would like to use > OCaml bytecode-system to run my programs. If I understand correctly your needs, there are two approaches that don't involve hacking the OCaml system to death: 1- The pedestrian approach: pretty-print your programs in OCaml syntax to a file, invoke the "ocamlc" compiler with Sys.command, then dynamically load the compiled bytecode using the Dynlink library. 2- The principled approach: have a look at MetaOCaml (http://www.cs.rice.edu/~taha/MetaOCaml/), which provides clean mechanisms for meta-programming in Caml, i.e. manipulating and executing Caml code from within Caml programs. Hope this helps, - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Caml Machine and GP 2003-07-25 9:10 ` Xavier Leroy @ 2003-07-25 18:12 ` Lukasz Stafiniak 2003-08-01 14:45 ` Lukasz Stafiniak 0 siblings, 1 reply; 4+ messages in thread From: Lukasz Stafiniak @ 2003-07-25 18:12 UTC (permalink / raw) To: caml-list Hi everyone, MetaOCaml... Finding again the right end of things... Thanks. Lukasz :-o Uwaga! Do konca sierpnia przedluzylismy promocje, do pakietów wielostanowiskowych dokladamy PenDrive Sprawdz: http://www.mks.com.pl/promocja-mobile.html ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Caml Machine and GP 2003-07-25 18:12 ` Lukasz Stafiniak @ 2003-08-01 14:45 ` Lukasz Stafiniak 0 siblings, 0 replies; 4+ messages in thread From: Lukasz Stafiniak @ 2003-08-01 14:45 UTC (permalink / raw) To: caml-list; +Cc: splawski Hi List, I have just discovered that I cannot (what a pity) typecheck programs before they are generated. But I have learned a bit trying it :-) For this reason I must go through Obj.t with code values. Best wishes, Lukasz Uwaga! Do konca sierpnia przedluzylismy promocje, do pakietów wielostanowiskowych dokladamy PenDrive Sprawdz: http://www.mks.com.pl/promocja-mobile.html ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-08-01 16:27 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-07-23 18:53 [Caml-list] Caml Machine and GP Lukasz Stafiniak 2003-07-25 9:10 ` Xavier Leroy 2003-07-25 18:12 ` Lukasz Stafiniak 2003-08-01 14:45 ` Lukasz Stafiniak
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox