Why untyped nonground metaprogramming is not (much of) a problem

We study a semantics for untyped, vanilla metaprograms, using the nonground representation for object level variables. We introduce the notion of language independence, which generalizes range restriction. We show that the vanilla metaprogram associated with a stratified normal object program is wea...

Celý popis

Uložené v:
Podrobná bibliografia
Vydané v:The journal of logic programming Ročník 22; číslo 1; s. 47 - 99
Hlavní autori: Martens, Bern, de Schreye, Danny
Médium: Journal Article
Jazyk:English
Vydavateľské údaje: New-York, NY Elsevier Inc 1995
Elsevier
Predmet:
ISSN:0743-1066, 1873-5789
On-line prístup:Získať plný text
Tagy: Pridať tag
Žiadne tagy, Buďte prvý, kto otaguje tento záznam!
Popis
Shrnutí:We study a semantics for untyped, vanilla metaprograms, using the nonground representation for object level variables. We introduce the notion of language independence, which generalizes range restriction. We show that the vanilla metaprogram associated with a stratified normal object program is weakly stratified. For language independent, stratified normal object programs, we prove that there is a natural one-to-one correspondence between atoms p( t 1,…, t r ) in the perfect Herbrand 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 provides a sensible semantics for the metaprogram. We show that this result generalizes to nonlanguage independent programs in the context of an extended Herbrand semantics, designed to closely mirror the operational behavior of logic programs. Moreover, we also consider a number of interesting extensions and/or variants of the basic vanilla metainterpreter. For instance, we demonstrate how our approach provides a sensible semantics for a limited form of amalgamation.
ISSN:0743-1066
1873-5789
DOI:10.1016/0743-1066(94)00015-X