© 1993 by British Computer Society
Programs as Data in an Extended Prolog
Dipartimento di Matematica e Informatica, Universita di Udine, Via Zanon, 6-33100 Udine, Italy
The ability to deal with programs as data is a valuable feature of a programming language which can be advantageously exploited in a number of different applications, particularly in the artificial intelligence field and in the construction of programming environment tools. In this paper we describe the facilities for dealing with programs as data supplied by an extended Prolog, called EnvProlog. Such facilities are considered from a meta-programming viewpoint and are based on the capability of the language to designate (object level) programs via structural descriptive names (i.e. program names and program structures). A number of new built-in meta-predicates are supplied dealing with programs and meta-level representations of programs. Examples are given showing some interesting applications of these new facilities, in particular for program structuring and program composition. Finally, the implementation of the programs as data facility within the EnvProlog interpreter is briefly discussed.
Received May 1991. revised September 1992.
* Current address: Dipartimento di Matematica, Universi
di Bologna, P.zza Porta S. Donato 5, Bologna, Italy.
Dipartimento di Matematica e Informatica, Universita di Udine, Via Zanon, 6-33100 Udine, Italy