From: Stephen Reed (reed@cyc.com)
Date: Sat Jun 15 2002 - 21:13:50 MDT
On Sat, 15 Jun 2002, Ben Houston wrote:
> Interestly, you can now generate from C# code its corresponding CodeDOM
> using a new tool by Ivan Zderadicka. This means that you can load in a
> piece of source code and manipulate it in a semi-compiled and highly
> information representation. Imagine the possibilities.... ;-)
As an exercise a year and a half ago I used the Open Source ANTLR parser to
generate abstract syntax trees from java source code. I created KB
concepts for each kind of syntax node and KB relationships for each
kind of link in the abstract syntax tree. Then I took a large
body of java source code and stored its structure into the KB after
parsing it. I further wrote some code to extract the java syntax tree for
a given class and to generate java source code. I compiled the result and
ran its regression test to ensure that I had fidelity in the java --> KB
--> java transformations.
I am concentrating my thinking nowadays on interpretation of large grained
actions described in the KB, rather than expend effort now on code
synthesis. In my opinion the issue will come down to the deliberative use
of algorithms to generate and refine code, and I can bridge the narrower
gap between algorithms and large grained activities than between algorithms
and lines of program source code.
With an upcoming release of OpenCyc we will have a demo of a simple
algorithm which generates source code in several languages.
-Steve
-- =========================================================== Stephen L. Reed phone: 512.342.4036 Cycorp, Suite 100 fax: 512.342.4040 3721 Executive Center Drive email: reed@cyc.com Austin, TX 78731 web: http://www.cyc.com download OpenCyc at http://www.opencyc.org ===========================================================
This archive was generated by hypermail 2.1.5 : Wed Jul 17 2013 - 04:00:39 MDT