TR-2007024: A Register-free Abstract Prolog Machine with Jumbo Instructions

Neng‐Fa Zhou · CUNY Academic Works (City University of New York) · 2007

Almost all current Prolog systems are based on the Warren Abstract Machine (WAM), in which registers are used to pass procedure arguments and store temporary variables.In this paper, we present a stack machine for Prolog, named TOAM Jr., which departs from the TOAM adopted in early versions of B-Prolog in that it employs no registers for arguments or temporary variables, and offers variable-size instructions for encoding procedure calls.TOAM Jr. is suitable for fast bytecode interpretation: the use of coarse-grained instructions results in more compact code and execution of fewer instructions than the use of fine-grained instructions; and the omission of registers facilitates interpretation of tagged operands and instruction merging.TOAM Jr. has been employed in B-Prolog since Version 7.0.Benchmarking shows that TOAM Jr. significantly enhances the speed of B-Prolog.

Read the paper · More papers on PaperTik