jashley@copper.ucs.indiana.edu (J. Michael Ashley) (09/22/90)
I asked several days ago for references to extending the WAM to accomodate
assert and retract. A few people replied, and there seemed to be general
interest in the results. So this is a post of the few references I
received/located in bibtex format. An abstract for each reference is
included.
I'm still plenty open to more references.
Cheers.
Mike Ashley
jashley@copper.ucs.indiana.edu
---------------------------
@inproceedings{jwmills:ad,
author = {Jonathan Wayne Mills and Kevin A. Buettner},
title = {Assertive Demons},
booktitle = {Logic Programming: Proceedings of the Fifth International
Conference and Symposium},
year = 1988,
editor = {Robert A. Kowalski and Keeneth A. Bowen},
pages = {1402--1414},
publisher = {The MIT Press},
abstract = {If the Prolog built-in {\em assert} is implemented in its
most general form it requires a full compiler and retention of
the compile-time environment during execution. Many programs
do not need this much generality because they assert clauses
- often ground unit clauses - for only one predicate whose
functor, arity, arguments' types and possibly even the
arguments' values are known at compile time. We categorize
a family of these {\em simple clauses} in this paper.
Programs that assert simple clauses compile a clause template
for each predicate and generate a clause-specific routine
called an {\em assertive demon}. At run time the demon copies
and fills in the template for each clause asserted. Assertive
demons either replace the full compiler at run time, or
limit its use to clauses too complex for the demon to handle.}
}
% This reference suggested by pereira@research.att.com
% It's very good.
@inproceedings{tglindholm:eidsdpc,
author = {Timothy G. Lindholm and Richard A. O'Keefe},
title = {Efficient Implementation of a Defensible Semantics for
Dynamic Prolog Code},
booktitle = {Logic Programming: Proceedings of the Fourth International
Conference and Symposium},
year = 1987,
editor = {Jean-Louis Lassez},
pages = {21--39},
publisher = {The MIT Press},
abstract = {This paper argues that a coherent semantics for predicates
manipulating the Prolog database is required if Prolog
programs are to be easily understood and easily ported. It
shows how this can be attained, without sacrificing time
and efficiency, by extending any WAM-based Prolog
implementation. Statistics are given for local stack
performance of a commercial Prolog system based on the
extended WAM architecture, and issues in the contruction of
a Prolog system based on the extended WAM are discussed.}
}
% This reference suggested by naim@uswest.com
% I'm not interested in indexing right now, but this paper might come in
% handy in the future.
@inproceedings{bdemoen:ipc,
author = {Bart Demoen and Andr\'{e} Mari\"{e}n and Alain
Callebaut},
title = {Indexing Prolog Clauses},
booktitle = {Logic Programming: Proceedings of the North American
Conference 1989},
year = 1989,
editor = {Ewing L. Lusk and Ross A. Overbeek},
pages = {1001--1012},
publisher = {The MIT Press},
abstract = {Indexing of Prolog clauses is an optimization technique
whose aim is to reduce the number of clauses to be
tried and avoid the pushing of a choicepoint. We describe
here in detail how indexing is implemented in a commercial
Prolog system for dynamic code. In BIM_Prolog, dynamic code
is emulated WAM code, so we assume the reader is familiar
with the WAM. The description of indexing for dynamic code
is thus in terms of generated intermediate code and the
implementation of this code is in C. We point out the
benefits of this approach and give some figures to support
the choices made.}
}
% This paper is hard to read. I haven't tried to understand it, since I
% like the assertive demons proposed by Mills and Buettner, referenced above.
@inproceedings{chenxi:ipcd,
author = {Zhang Chenxi and Tzu Yungui and Li Liangliang and
Hu Yunfa},
title = {An Approach to the Implementation of Prolog Code
Database and Source Database in Compiler-based Systems},
booktitle = {Proceedings of the 1987 Symposium on Logic Programming},
year = 1987,
pages = {398--405},
publisher = {Computer Society Press of the IEEE},
abstract = {Due to the existence of the built-in predicates that
that operate on databases, such as assert and retract, in
the PROLOG language, the management of PROLOG databases is
an important but difficult problem in a compiler-based
system. There are conceptually two PROLOG databases in such
a system: the Code DataBase (CDB), and the Source DataBase
(SDB). In this paper, an approach to the implementation of
the CDB and SDB in WAM-based systems is described, with
emphasis being put on the implementation of the CDB. The
method for the reclamation of retracted clauses used in
our approach is the reference counting method. At the end
of the paper, we briefly discuss how the predicates that
operate on databases can be implemented easily with supports
from the CDB and the SDB. Though the approach is mainly for
use in GKD-PROLOG-2 which is a compiler-based system, it can
be applied to other WAM-based systems with minor modification.}
}