Comparing tag scheme variations using an abstract machine generator

In this paper we study, in the context of a WAM-based abstract machine for Prolog, how variations in the encoding of type information in tagged words and in their associated basic operations impact performance and memory usage.We use a high-level language to specify encodings and the associated operations. An automatic generator constructs both the abstract machine using this encoding and the associated Prolog-to-bytecode compiler. Annotations in this language make it possible to impose constraints on the final representation of tagged words, such as the effectively addressable space (fixing, for example, the word size of the target processor / architecture), the layout of the tag and value bits inside the tagged word, and how the basic operations are implemented. We evaluate a large number of combinations of the different parameters in two scenarios: a) trying to obtain an optimal general-purpose abstract machine and b) automatically generating a specially-tuned abstract machine for a particular program. We conclude that we are able to automatically generate code featuring all the optimizations present in a hand-written, highly-optimized abstract machine and we can also obtain emulators with larger addressable space and better performance

[1]  Vítor Santos Costa,et al.  Optimising Bytecode Emulation for Prolog , 1999, PPDP.

[2]  Hassan Aït-Kaci,et al.  Warren's Abstract Machine: A Tutorial Reconstruction , 1991 .

[3]  Simon L. Peyton Jones,et al.  Faster laziness using dynamic pointer tagging , 2007, ICFP '07.

[4]  Armin Rigo,et al.  Representation-based just-in-time specialization and the psyco prototype for python , 2004, PEPM '04.

[5]  HaridiSeif,et al.  Garbarge collection for Prolog based on WAM , 1988 .

[6]  Manuel V. Hermenegildo,et al.  High-level languages for small devices: a case study , 2006, CASES '06.

[7]  Robert Cartwright,et al.  Soft typing , 2004, SIGP.

[8]  Manuel V. Hermenegildo,et al.  Towards Description and Optimization of Abstract Machines in an Extension of Prolog , 2006, LOPSTR.

[9]  Hassan Aït-Kaci Integrating Data Type Inheritance into Logic Programming , 1985, Data Types and Persistence , Informal Proceedings.

[10]  Luciano Lavagno,et al.  Embedded Systems , 2005, Embedded Systems Handbook.

[11]  Manuel V. Hermenegildo,et al.  Integrated program debugging, verification, and optimization using abstract interpretation (and the Ciao system preprocessor) , 2005, Sci. Comput. Program..

[12]  Hassan Aït-Kaci Warren's Abstract Machine , 1991, ICLP.

[13]  Bart Demoen,et al.  So Many WAM Variations, So Little Time , 2000, Computational Logic.

[14]  Manuel V. Hermenegildo,et al.  A Syntactic Approach to Combining Functional Notation, Lazy Evaluation, and Higher-Order in LP Systems , 2006, FLOPS.

[15]  Manuel V. Hermenegildo,et al.  A Generator of Efficient Abstract Machine Implementations and Its Application to Emulator Minimization , 2005, ICLP.

[16]  V HermenegildoManuel,et al.  Integrated program debugging, verification, and optimization using abstract interpretation (and the Ciao system preprocessor) , 2005 .