WHY UNTYPED NONGROUND METAPROGRAMMING IS NOT (MUCH OF) A PROBLEM

Citation
B. Martens et D. Deschreye, WHY UNTYPED NONGROUND METAPROGRAMMING IS NOT (MUCH OF) A PROBLEM, The journal of logic programming, 22(1), 1995, pp. 47-99
Citations number
45
Categorie Soggetti
Computer Sciences, Special Topics","Computer Science Theory & Methods
ISSN journal
07431066
Volume
22
Issue
1
Year of publication
1995
Pages
47 - 99
Database
ISI
SICI code
0743-1066(1995)22:1<47:WUNMIN>2.0.ZU;2-E
Abstract
We study a semantics for untyped, vanilla metaprograms, using the non- ground representation for object level variables. We introduce the not ion of language independence, which generalizes range restriction. We show that the vanilla metaprogram associated with a stratified normal object program is weakly stratified. Far language independent, stratif ied normal object programs, we prove that there is a natural one-to-on e correspondence between atoms p(t(1),...,t(r)) in the perfect Herbran d model of the object program and solve(p(t(1),...,t(r))) atoms in the weakly perfect Herb and model of the associated vanilla metaprogram. Thus, for this class of programs, the weakly perfect Herbrand model pr ovides a sensible semantics for the metaprogram. We show that this res ult generalizes to nonlanguage independent programs in the context of an extended Herbrand semantics, designed to closely mirror the operati onal behavior of logic programs. Moreover, we also consider a number o f interesting extensions and/or variants of the basic vanilla metainte rpreter. For instance, we demonstrate how our approach provides a sens ible semantics for a limited form of amalgamation.