Peter Orbaek, a Ph.D. student at Aarhus in Denmark, now visiting at MIT, has implemented Demeter/Perl (Perl = Practical Extraction and Report Language) to bring the benefits of adaptive programming to the Perl community. He wrote a Perl program which translates Demeter/Perl programs into Perl programs (using Perl 5). He has done this in an impressively short time period of a few days! Jens Palsberg introduced him to adaptive programming. The program is freely available under the GNU license. Local copy: /proj/asl/lieber/perl

Orbaek's work demonstrates that the AP ideas are easy to implement and can be readily used in new tools. The program is much smaller than the Demeter Tools/C++ (only about 1000 lines long) and focusses on the key concepts without the bells and whistles of the Demeter Tools/C++. It can be called with

adapt -og expr.class expr.prog
where expr.class is a class graph and expr.prog is an adaptive program. Demeter/Perl generates a runnable Perl 5 module.

The Demeter/Perl compiler is at URL

	ftp://ftp.daimi.aau.dk/pub/empl/poe/adapt-1.0.tar.gz
and is also available in expanded form, including a simple example.

The concepts behind the compiler are explained in [ Adaptive Programming Book ]. You will note that Demeter/Perl uses a simplified traversal pattern notation which was proposed by Crista Lopes and Jens Palsberg. It leads to a very simple, general compiler.

Back to AP home page

Karl J. Lieberherr
College of Computer Science, Northeastern University
Cullinane Hall, Boston, MA 02115
Internet: lieberherr@ccs.neu.edu
Fax: (617) 373 5121