Re: Supercompiled Perl

[email protected] (Helmut Enck-Radana)
Newsgroups perl.ai
Message-ID <[email protected]>
At 00:21 10-08-01, Gidon Wise wrote:
>I might be off base here, but aren't you describing
>caching results of a program by your "Meta-Program"???

Not caching results, but specialized versions of the original program. 
Consider following simple example: A command line tool takes 2 arguments 
and produces some output dependent on them. In 50% of all invocations the 
2nd argument is the same. The supercompiler can transform the program to a 
specialized one, which has only 1 argument. The 2nd argument has become a 
constant within the program. The new program is as efficient as if it had 
been designed from scratch for being dependent on only 1 argument. AFAIU 
this is possible, because the semantics of the whole program is analyzed, a 
model is created, and a complete new program with the same semantics is 
generated.

This is possible even in more complex situations, were the argument is 
itself a program. I saw working examples of programs which were generated 
by a supercompiler as it was applied to an XSL interpreter specialized by 
providing certain given XSL style sheets. These programs had the same 
semantics as the corresponding style sheets, but were quite short and very 
fast.

-- Helmut


>"Andrei P. Nemytykh" wrote:
> > [...]
> >  I remember an idea ( by Sergei Romanenko ). He suggests
> >  to use supercompiler together with a meta-program. The meta-program
> >  has to be a part of a concrete operating system. It is a dispatcher
> >  of supercompilation.
> >  The program has to observe the behavior of users:
> >   - how often a concrete Perl-program is used ?
> >   - maybe, some arguments of a program have a constant intrivial
> >     properties, so its specialized version makes sense ?
> >   - maybe, something else ...
> >
> >  If the meta-program decides to transform a Perl-program, then it does
> >  that and creates a new residual version. After that any call to
> >  the original Perl-program ( within the chosen context ) is replaced
> >  with the residual version automatically.
> > [...]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.