An Architecture for Prolog Extensions

We address the task of an efficient implementation of Prolog extensions. Prolog is a very good language for prototyping and almost any extension can be quickly written in Prolog using a Prolog interpreter and tested on small examples. It is harder to find out if the results scale up to large, real life problems, though. A Prolog interpreter, even if partially evaluated with respect to a given problem, quickly hits the space and time limitations and so more elaborate approaches to the implementation are necessary. In this article we describe an architecture of a Prolog system that gives the user enough support to quickly prototype new extensions and at the same time to implement them efficiently and incrementally. This architecture has been used to build the SEPIA and ECL'PS e systems.