vix.ing · top · new · best · stats · spec

Description and Optimization of Abstract Machines in a Dialect of Prolog

2014/11/20 by Jose F. Morales, JOSÉ F. MORALES, Manuel Carro +3 · 1 citation
Computer Science · #Abstract machine #Bytecode #Closeness #Formal Methods in Verification #Implementation #Logic, programming, and type systems #Parallel Computing and Optimization Techniques #Program transformation #Prolog #Semantics (computer science) #cs.PL

paper · pdf · doi:10.1017/s1471068414000672

published as Theory and Practice of Logic Programming 16 (2016) 1-58 · 56 pages, 46 figures, 5 tables, To appear in Theory and Practice of Logic Programming (TPLP)

arxiv created 2014/11/20 · openalex publication_date 2015/01/05 · openalex created_date 2016/06/24 · arxiv updated 2020/02/19 · openalex updated_date 2026/08/05

Abstract

Abstract In order to achieve competitive performance, abstract machines for Prolog and related languages end up being large and intricate, and incorporate sophisticated optimizations, both at the design and at the implementation levels. At the same time, efficiency considerations make it necessary to use low-level languages in their implementation. This makes them laborious to code, optimize, and, especially, maintain and extend. Writing the abstract machine (and ancillary code) in a higher-level language can help tame this inherent complexity. We show how the semantics of most basic components of an efficient virtual machine for Prolog can be described using (a variant of) Prolog. These descriptions are then compiled to C and assembled to build a complete bytecode emulator. Thanks to the high-level of the language used and its closeness to Prolog, the abstract machine description can be manipulated using standard Prolog compilation and optimization techniques with relative ease. We also show how, by applying program transformations selectively, we obtain abstract machine implementations whose performance can match and even exceed that of state-of-the-art, highly-tuned, hand-crafted emulators.

Citations

Cited by