Self-interpreter for Prolog

Aseel Alkhelaiwi, University of Rhode Island


The semantics of Prolog programs is usually given in terms of model theoretic semantics. However, this does not adequately characterize the computational behavior of Prolog programs. Prolog implementations typically use a depth-first left-to-right evaluation strategy based on the textual order of clauses and literals in a program. In this paper we introduce a self-interpreter for Prolog, which is a formalization of the syntax and semantics of Prolog using Prolog. This interpreter is a running program that mimics the depth-first left-to-right evaluation strategy of Prolog interpreters. This means that, the computational behavior of Prolog is captured by obtaining an operational semantics of Prolog based on the logic + control perspective of Prolog. In addition, this paper explains the important difference between the self-interpretation approach used in this paper and the meta-circular interpretation approach. And how self-interpretation considered a true semantic definition of the object language as it sheds light onto all features of the object language, and does not hide features in the features of the defining language.^

Subject Area

Computer Science

Recommended Citation

Aseel Alkhelaiwi, "Self-interpreter for Prolog" (2012). Dissertations and Master's Theses (Campus Access). Paper AAI1508337.