[Push] Wondering about Code
Lee Spector
lspector at hampshire.edu
Wed Apr 14 20:09:13 EDT 2010
Rud,
The CODE versions of DO and related instructions may or may not be strictly necessary in a world with EXEC, but either way they may be useful for a variety of things. For example, you might want to manipulate code in complicated ways and then execute it in the same program execution. In the spec there EXEC doesn't haveall of the same code manipulation instructions as CODE does, but you can manipulate on CODE and then use DO or DO* etc. to execute. Of course one could also just implement more code manipulation instructions for EXEC. But even so, it can be handy to have more than one stack for such things, so that the code you're manipulating doesn't get mixed up with the code that you're executing except when you want it to.
There could definitely also be CODE versions of the Y, S, and K combinators.
On orthogonality and engineering practices: On the one hand I do think it would be good to shore up the Push spec and encourage standardization, but it seems that most of us who work on this stuff (including me) are a little too eager to make new systems all of the time that add or subtract things or make other changes. For example the last two systems I've made (schush and clojush) deal with configuration in a totally different way from the spec and have omitted the NAME type (just because I didn't think I'd need it and didn't have the time). And instruction names are changed a bunch in clojush because of Clojure/Java naming restrictions. Still, it'd be nice to impose some order on all of this diversity, but I'm not sure how.
On orthogonality more specifically I think it's important to bear in mind that things that are good practice for human engineering teams may not make as much sense for evolution. Might be the opposite in some cases. That'd be an interesting research question to explore.
-Lee
On Apr 14, 2010, at 5:14 PM, Rud Merriam wrote:
> I've been working on my own C++ implementation of Push for years. Started with Push2 and am somewhere between it and Push3. Right now I just call my work PushX - for unknown. Its been an off again / on again project but it does get closer to completion. I'm actually getting to the point of trying to implement code to do evolution.
>
> I was just looking at the project again and re-read the Push3 documentation.
>
> I am wondering why the CODE type still has the execution statements like DO, DO*, etc. Keeping them for historical reasons is one possible good answer. But it seems the main reason for CODE is as a workspace for manipulation of code, rather than execution. EXEC is the place for execution in Push3.
>
> I also wonder if the EXEC.Y, .S, and .K should be CODE instructions and not EXEC.
>
> All these, I guess, are questions about regularizing or making the types orthogonal. As a decades of experience developer I see this as good software engineering. Shouldn't good evolved good follow good engineering practices? (he says a bit tongue in cheek)
>
>
> - 73 -
> Rud Merriam K5RUD
> http://mysticlakesoftware.com/
>
> _______________________________________________
> Push mailing list
> Push at lists.hampshire.edu
> https://lists.hampshire.edu/mailman/listinfo/push
--
Lee Spector, Professor of Computer Science
School of Cognitive Science, Hampshire College
893 West Street, Amherst, MA 01002-3359
lspector at hampshire.edu, http://hampshire.edu/lspector/
Phone: 413-559-5352, Fax: 413-559-5438
Check out Genetic Programming and Evolvable Machines:
http://www.springer.com/10710 - http://gpemjournal.blogspot.com/
More information about the Push
mailing list