Year: 2007
Type: report
Abstract: 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.
Author: Neng‐Fa Zhou
Institution: City University of New York
Language: English
Subfield: Software
Field: Computer Science
Domain: Physical Sciences
Keywords: stack machines, Warren Abstract Machine
Open Access status: green
OpenAlex ID: W2286675855
