From: Akyl Tulegenov
Subject: Automatic code synthesis
Date: 
Message-ID: <Pine.GSO.4.21.0305231156190.25298-100000@granby.ccc.nottingham.ac.uk>
Dear All!

Is Lisp the best choice for automatic code synthesis?
If yes, what is the theory behind the subject? 

P.S. I tried Google already. 

From: Kaz Kylheku
Subject: Re: Automatic code synthesis
Date: 
Message-ID: <cf333042.0305230925.5823d6e7@posting.google.com>
Akyl Tulegenov <······@unix.ccc.nottingham.ac.uk> wrote in message news:<········································@granby.ccc.nottingham.ac.uk>...
> Dear All!
> 
> Is Lisp the best choice for automatic code synthesis?

Yes, if you actually intend to *run* the synthesized code, and
possibly wish to dynamically compile it to efficient machine code, and
possibly wish to perform complex transformations on it.

The Common Lisp language provides run-time access to the evaluator and
compiler as an ANSI standard feature via the COMPILE and EVAL
functions.

Moreover, code is conveniently represented in Lisp as a data structure
that is easy to manipulate. The input to the compiler and evaluator is
that data structure, rather than a textual representation of the
program.

A parser for the textual representation, as well as a formatter that
can render data to that representation, are also standard language
features.

> If yes, what is the theory behind the subject?

The theory is that you write code that bangs together a data
structure, then transforms it in some useful ways if necessary, feeds
it to a compiler to obtain a function, and then invokes it. Wait,
that's the practice. Skip the theory! :)

Code that writes code doesn't have to be complicated, but of course
there is no upper bound to how complicated it can be. It can be as
simple as inserting some variant pieces into a code template, an
operation that is useful as a primitive even in more complex code
generation tasks. Lisp provides a special syntax, the backquote
notation, to make it easy to insert variant pieces into a static
template structure.
From: Franz Kafka
Subject: Re: Automatic code synthesis
Date: 
Message-ID: <Y2tza.192$gP.53@news01.roc.ny.frontiernet.net>
"Kaz Kylheku" <···@ashi.footprints.net> wrote in message
·································@posting.google.com...

>
> The theory is that you write code that bangs together a data
> structure, then transforms it in some useful ways if necessary, feeds
> it to a compiler to obtain a function, and then invokes it. Wait,
> that's the practice. Skip the theory! :)
>

I would love to make a automatic programming system, I think Lisp would be
ideal, I want it to genrate code from High Level specifications.

I would combind it with a Genetic Programming system that could improve the
code & with an Expert System that encapsulated the knowledge of a Lisper.
Maybe some fuzzy logic to express that
I/O might be fuzzy and Neural Networks for some of the hairy
I/O

in order words it would have to be a hybird approch 2 get the flexibility
that would |3 needed to do the job. (& parse a|| the $y/\/\|3()|$.)

Do any automatic programming systems exist, I know that in the 1970-1980's
an automatic system called Reduce was being developed. But, I don't know
what was done in Automated
Programming since than.

Thanx
From: Richard Fateman
Subject: Re: Automatic code synthesis
Date: 
Message-ID: <3ECE6DFD.702@cs.berkeley.edu>
Franz Kafka wrote:
<snip>
> 
> Do any automatic programming systems exist, I know that in the 1970-1980's
> an automatic system called Reduce was being developed. 

REDUCE was and still is a computer algebra system, competition for
Mathematica, Maple, Macsyma, Mupad, ... written in Lisp.
It was used as a computer algebra
engine for various topics, e.g. see

http://citeseer.nj.nec.com/keller94knowledgebased.html

but it is no more (or less) automatic programming than other
computer algebra systems.


> But, I don't know
> what was done in Automated
> Programming since than.

Why post, then?  And why not provide your return email so that
someone could respond more particularly to you without posting
to all?


> 
> Thanx
> 
\


> 
From: Franz Kafka
Subject: Re: Automatic code synthesis
Date: 
Message-ID: <ctzza.252$xJ2.100@news01.roc.ny.frontiernet.net>
"Richard Fateman" <·······@cs.berkeley.edu> wrote in message
·················@cs.berkeley.edu...
>
>
> Franz Kafka wrote:
> <snip>
> >
> > Do any automatic programming systems exist, I know that in the
1970-1980's
> > an automatic system called Reduce was being developed.
>
> REDUCE was and still is a computer algebra system, competition for
> Mathematica, Maple, Macsyma, Mupad, ... written in Lisp.
> It was used as a computer algebra
> engine for various topics, e.g. see
>
> http://citeseer.nj.nec.com/keller94knowledgebased.html
>
> but it is no more (or less) automatic programming than other
> computer algebra systems.
>
>

I meant Refine by Reasoning Systems it was a tool that
turned very high level specifications into Lisp Code.
(I am intrested if any program could turn psudocode or
natural language specs into code.)

I'd say it would be like an extended logic programming lanuage with NLP
built in.

I think I read about it in 1988 in some Guide to AI applications.

In the same book I read about a project by Richard C. Water's at MIT called
the Programmers Apprentice--is any info about this prog. avail.? thanx.

How far did Automated Programming research get?
From: Kirk Kandt
Subject: Re: Automatic code synthesis
Date: 
Message-ID: <vd7uvmbkjtgseb@corp.supernews.com>
See http://www.bayfronttechnologies.com/ to learn about DRACO and what Jim
Neighbors has been doing since.
Also see http://www.semdesigns.com/.

"Franz Kafka" <Symbolics _ XL1201 _ Sebek _ Budo _ Kafka @ hotmail . com>
wrote in message ······················@news01.roc.ny.frontiernet.net...
>
> "Richard Fateman" <·······@cs.berkeley.edu> wrote in message
> ·················@cs.berkeley.edu...
> >
> >
> > Franz Kafka wrote:
> > <snip>
> > >
> > > Do any automatic programming systems exist, I know that in the
> 1970-1980's
> > > an automatic system called Reduce was being developed.
> >
> > REDUCE was and still is a computer algebra system, competition for
> > Mathematica, Maple, Macsyma, Mupad, ... written in Lisp.
> > It was used as a computer algebra
> > engine for various topics, e.g. see
> >
> > http://citeseer.nj.nec.com/keller94knowledgebased.html
> >
> > but it is no more (or less) automatic programming than other
> > computer algebra systems.
> >
> >
>
> I meant Refine by Reasoning Systems it was a tool that
> turned very high level specifications into Lisp Code.
> (I am intrested if any program could turn psudocode or
> natural language specs into code.)
>
> I'd say it would be like an extended logic programming lanuage with NLP
> built in.
>
> I think I read about it in 1988 in some Guide to AI applications.
>
> In the same book I read about a project by Richard C. Water's at MIT
called
> the Programmers Apprentice--is any info about this prog. avail.? thanx.
>
> How far did Automated Programming research get?
>
>
>
From: Paul Wallich
Subject: Re: Automatic code synthesis
Date: 
Message-ID: <pw-4C306E.15051023052003@reader1.panix.com>
In article <···············@news01.roc.ny.frontiernet.net>,
 "Franz Kafka" <Symbolics _ XL1201 _ Sebek _ Budo _ Kafka @ hotmail . 
 com> wrote:

> "Kaz Kylheku" <···@ashi.footprints.net> wrote in message
> ·································@posting.google.com...
> 
> >
> > The theory is that you write code that bangs together a data
> > structure, then transforms it in some useful ways if necessary, feeds
> > it to a compiler to obtain a function, and then invokes it. Wait,
> > that's the practice. Skip the theory! :)
> >
> 
> I would love to make a automatic programming system, I think Lisp would be
> ideal, I want it to genrate code from High Level specifications.
> 
> I would combind it with a Genetic Programming system that could improve the
> code & with an Expert System that encapsulated the knowledge of a Lisper.
> Maybe some fuzzy logic to express that
> I/O might be fuzzy and Neural Networks for some of the hairy
> I/O
> 
> in order words it would have to be a hybird approch 2 get the flexibility
> that would |3 needed to do the job. (& parse a|| the $y/\/\|3()|$.)
> 
> Do any automatic programming systems exist, I know that in the 1970-1980's
> an automatic system called Reduce was being developed. But, I don't know
> what was done in Automated
> Programming since than.

You might want to take a look at the folks at <http://www.kestrel.edu> 
who've been doing this kind of stuff for upwards of 20 years (they have 
a partial bibiliography on their site, or their (iirc) spinoff 
Reasoning, or the folks at Hamilton Technologies, who have been doing it 
for going on 40 years with a completely different tool base <http://world.std.com/~hti/>.
One of the big issues is creating a high level specification that is 
capable of being transformed into usable code.

paul
From: Burton Samograd
Subject: Re: Automatic code synthesis
Date: 
Message-ID: <87d6i92xvl.fsf@kruhft.vc.shawcable.net>
> "Kaz Kylheku" <···@ashi.footprints.net> wrote in message
> ·································@posting.google.com...
> I would love to make a automatic programming system, I think Lisp would be
> ideal, I want it to genrate code from High Level specifications.

There was a recent post on a paper called "A Hacker's Introduction to
Partial Evaluation" which covered some very interesting code
generation macros.  It's a bit over my head as a relative lisp novice
but it gives some great examples of what can be done with the macro
system. Google for it and it's the first link.

-- 
burton samograd
······@kruhft.dyndns.org
http://kruhftwerk.dyndns.org
From: Scott McKay
Subject: Re: Automatic code synthesis
Date: 
Message-ID: <4Foza.694331$OV.648886@rwcrnsc54>
"Akyl Tulegenov" <······@unix.ccc.nottingham.ac.uk> wrote in message
·············································@granby.ccc.nottingham.ac.uk...
> Dear All!
>
> Is Lisp the best choice for automatic code synthesis?

Yes, that or Scheme.

> If yes, what is the theory behind the subject?

Lisp is its own meta-language.
From: Joe Marshall
Subject: Re: Automatic code synthesis
Date: 
Message-ID: <1xypbv5e.fsf@ccs.neu.edu>
"Scott McKay" <···@attbi.com> writes:

> Lisp is its own meta-language.

So is XML....
From: Kaz Kylheku
Subject: Re: Automatic code synthesis
Date: 
Message-ID: <cf333042.0305230930.636f10a3@posting.google.com>
Joe Marshall <···@ccs.neu.edu> wrote in message news:<············@ccs.neu.edu>...
> "Scott McKay" <···@attbi.com> writes:
> 
> > Lisp is its own meta-language.
> 
> So is XML....

Sorry, no. That would be like saying 

   Lisp is its own meta-language.
   So are its parentheses.

XML has no semantics by which we can interpret a piece of XML to be an
XML-generating program. We have to add semantics to XML in order to
turn it into a language that can operate on itself. This requires a
lot of work, because XML doesn't bring enough to the table; it's just
parenthesized (in its way) text.
From: Akyl Tulegenov
Subject: Re: Automatic code synthesis
Date: 
Message-ID: <Pine.GSO.4.21.0305231352170.10826-100000@granby.ccc.nottingham.ac.uk>
> Lisp is its own meta-language.
Sorry, but I didn't understand this. 
Are there any good references on the theory? 
Is it the branch of theory of compilers or something more
specific? 

Akyl.
From: Pascal Costanza
Subject: Re: Automatic code synthesis
Date: 
Message-ID: <bal78q$pfi$1@f1node01.rhrz.uni-bonn.de>
Akyl Tulegenov wrote:
>>Lisp is its own meta-language.
> 
> Sorry, but I didn't understand this. 
> Are there any good references on the theory? 

http://www.paulgraham.com/rootsoflisp.html gives you an excellent 
introduction and a fair amount of links and keywords to google for.


Pascal
From: Akyl Tulegenov
Subject: Re: Automatic code synthesis
Date: 
Message-ID: <Pine.GSO.4.21.0305231800260.18576-100000@granby.ccc.nottingham.ac.uk>
> http://www.paulgraham.com/rootsoflisp.html gives you an excellent 
> introduction and a fair amount of links and keywords to google for.
Thanks a lot the paper in ACM is all I needed!!!

Cheers,
Akyl Tulegenov