An Abstract Machine for Fixed-Order Dynamically Stratified Programs

Click on the title to obtain a gzip-ed PostScript version of the paper (68K).


It is known that a fixed computation rule, such as used in most logic programming systems, does not suffice for normal logic programs. For instance, SLS resolution, which evaluates programs according to the well-founded semantics, makes use of an oracle to determine the next literal to select. Given these limits, it is natural to define a subclass of normal programs for which a fixed computation rule is adequate. This class, left-to-right dynamically stratified programs, properly includes other stratification classes.

Left-to-right dynamically stratified programs are of interest because they are posited to be amenable to efficient implementation. We demonstrate that this is in fact the case with an implementation based on the SLG-WAM of XSB. The SLG-WAM is an extension to the underlying implementation model of Prolog, the WAM, and has been shown to be extremely efficient for definite programs. We show that extending the engine for left-to-right dynamically stratified programs does not slow down execution for definite programs or for Prolog-style SLD evaluation. Indeed, implementation of stratification leads to the technique of early completion which can also benefit definite programs.