30 research outputs found
Variable shunting for the WAM
This paper describes how to extend the garbage collection for
WAM so that it will shunt chains of bound variables if possible.
Doing so has two advantages:
1. Space is saved by making it possible to deallocate the
intermediate cells. This is particularly useful when those cells are
associated with frozen goals.
2. Later dereferencing is speeded up by not having to follow long
variable chains.
The main complication of this optimization is the treatment of the trailed
variables. We claim that all possible chains of variables are shunted by
this algorithm. The algorithm has been implemented in SICStus Prolog, and
benchmark results are presented in this paper.
The full source code for the shunting algorithm is given in this paper
Making garbage collection independent of the amount of garbage
(Appendix to SICS Research Report R86009) This appendix shows in detail how to make the time for the garbage collection algorithm presented in [AHS 86] become proportional to n log n , where n is the number of non-garbage cells. It is assumed that the reader is familiar with [AHS 86] since no further presentation of the notation used is made here. The compaction phase of that algorithm is proportional to the amount of memory, i.e. proportional to the sum of garbage and non-garbage. This is unfortunate since for instance a garbage collection using copying is just proportional to the amount of non-garbage. If a program generates much more garbage than non-garbage, it might be a severe drawback of a garbage collection algorithm to depend on the amount of garbage. This paper shows how to make the garbage collection in [AHS] independent of the amount of garbage
An Intuitionistic Predicate Logic Theorem Prover
A complete theorem prover for intuitionistic predicate logic based on
the cut-free calculus is presented.
It includes a treatment of "quasi-free" identity based on a delay
mechanism and a special form of unification. Several important
optimizations of the basic algorithm are introduced.
The resulting system is available in source form from SICS; an
Appendix gives some idea of its performance
Garbage Collection for Prolog Based on WAM (Revised version)
Warren Abstract Machine (WAM) has become a generally accepted standard
Prolog implementation technique. Garbage collection is an important aspect
in the implementation of any Prolog system. We first present a synopsis of
the WAM and then show marking and compaction algorithms that take advantage
of WAM's unique use of the data areas. Marking and compaction are
performed on both the heap and the trail. The marking and compaction
algorithms use pointer reversal techniques, which obviate the need for
extra stack space. However, two bits for every pointer on the heap are
reserved for the garbage collection algorithm. The algorithm can work on
segments of the heap, which may lead to a significant reduction of the
total garbage collection time. The time of the algorithms are linear in
the size of the areas
An Automatic Partial Evaluator for Full Prolog
A partial evaluator for Prolog takes a program and a query and returns a program specialized for all instances of that query. The intention is that the generated program will execute more efficiently than the original one for those instances. This thesis presents "Mixtus", an automatic partial evaluator for full Prolog, i.e. including non-logical features such as cut, assert, var, write etc. Mixtus does not need any annotations to guide it in its process, but will automatically generate a program given only an input program and a query. A definition of partial evaluation based on the procedural semantics rather than declarative semantics is presented. A program transformed by Mixtus will behave identically as the original one, including side-effects and the order of the solutions returned. The three basic program transformations "unfolding", "folding" and "definition" are adapted to full Prolog. The most important transformation is "unfolding" which is used by all partial evaluators to..
Fixpoint Analysis of Type and Alias in AKL Programs
We have defined and implemented a method for
analysis of the CCP language AKL in the spirit of abstract
interpretation that uses a static set of semantic equations
which abstracts the concurrent execution of an AKL program.
The method strictly separates the setting up of the equation
system from the solving of the system with a fixpoint
procedure. The computation strategies used, results for a
number of test programs and the conclusions we draw from this
experimental effort are reported.
The software implementing the system described herein, is
deliverable number D.WP.1.6.1.M2 in the ESPRIT project
ParForce 6707