Sunday, November 10, 2002, 9:23:17 AM, Ben Goertzel wrote: >> I'm sure this has been attempted by various folks in various ways, but >> I've always felt code optimization is a rich target for AI. There's a >> clearly definable goal; the environment (compiler, initial code, >> generated code, test inputs and outputs or validation program) doesn't >> need much setting up; and the whole thing can be self-contained and >> self-running on a single computer. Given some technique for >> optimizing the optimizer, theoretically you could just set it running >> and get on with your business... >> >> -- >> Cliff
BG> I am involved with a team that is building the world's most advanced code BG> optimizer, the Supercompiler, which does source-to-source code rewriting. BG> It takes a source program, transforms it into an abstract mathematical BG> graph, simplifies the graph, and then creates new source representing the BG> simplified graph. BG> Check out www.supercompilers.com; there's a white-paper on there that I BG> wrote some time ago. Thanks for the supercompiler links, I wasn't aware of that project (or had lost the links deep in my bookmark list). BG> There are big uses for AI in this process, but they're 3-5 years down the BG> road given the current pace of Supercompilers engineering (which is, BG> surprise surprise, kinda slow due to their very limited resources). BG> The problem with creating an advanced optimizer for a real programming BG> language, is that real-world programming languages are BIG, nasty beasts. BG> There's a lot of detail-work that has nothing to do with AI or advanced BG> math, that has to be done just to make the basic framework within which BG> advanced code optimization ideas can be inserted. For Java, the BG> Supercompilers guys are beyond that right now, and after several years of BG> work are finally into the "advanced mathematical optimization" stuff... but BG> not yet to the AI stage. BG> "Optimizing the optimizer" is what we've called "supercompiling the BG> supercompiler", it's a natural idea, but we're not there yet. I didn't mean "supercompiling the supercompiler" but rather, "evolving" the supercompiler through known techniques such as GA. I have no idea how feasible something like that is...the main attraction I see is that -- assuming it can be set up properly -- it can run without human intervention (e.g., it even could, with the right PR, be run as a SETI-like wide-distribution problem). Obviously, once you've got something that works pretty well, supercompiling the supercompiler is the next step... BG> Making a test suite for supercompilation is not as easy as you imply, BG> actually. Testing speedup is easy, but checking that the supercompiler BG> hasn't introduced subtle errors into the program, is very hard. I can see where that's the case with real-world modern languages...I'm surprised (pleasantly!) to see this idea applied there, rather than in (forgot the correct term) "provable" languages and others restricted mostly to academia. BG> My experience working with Supercompilers LLC has been a lesson in BG> the startling short-sightedness of the software industry. The BG> researchers involved with Supercompilers are top-notch with BG> decades of published experience, and their approach is a "natural" BG> conceptually and mathematically. And yet, so far, it hasn't been BG> possible to get any kind of co-development deal with a major BG> software company. I had some discussions with IBM that went BG> nowhere. Discussions with a certain other large software company BG> are going slowly, but at least seem to be progressing in a good BG> direction.... Well, I hope something works out there...it seems the most natural application area for AI to me. Tangentially related -- I think what it does is essentially "partial evaluation" optimization -- is PSYCO at http://psyco.sourceforge.net/ which applied to Python programs provides significant speedups. -- Cliff ------- To unsubscribe, change your address, or temporarily deactivate your subscription, please go to http://v2.listbox.com/member/