SEPIA(ID:1431/sep001)


Standard ECRC Prolog Integrating Applications. Prolog with many extensions including attributed variables ("metaterms") and declarative coroutining.



Related languages
ECRC-Prolog => SEPIA   Evolution of
SEPIA => ECLIPSE   Evolution of

References:
  • Micha Meier et al, "SEPIA" TR-LP-36 ECRC, March 1988. view details Abstract: SEPIA -Standard ECRC Prolog Integrating Advanced Ap-plicationsis a Prolog system which oers the capability to integratevarious extensions at a relatively low level that guarantees an ecient im-plementation. Apart from a general exibility, SEPIA has several uniquefeatures that support the integration of new extensions which makes itboth suitable for the development of industrial applications and a tool forfurther research. In this article we describe the system itself as well as itsconnections to the extensions. Extract: Introduction
    Introduction

    The goal of the SEPIA project is to develop a Prolog system which will bethe ’glass box’ described in [13]: on one hand it is a compact Prolog systemcomparable in performance to the current Prolog systems, on the other handit outperforms them in functionality and at the same time it is open to theworld of extensions, allowing them to be integrated at a low and thus ecientlevel. Among the possible extensions are CHIP, Constraints Handling in Prolog[7], sound negation [3], a sophisticated Prolog debugger [10], an object-orientedsystem [6] and others.Compared to usual Prolog systems, SEPIA includes several features whichin fact constitute ’sockets’ for plugging in the extensions: among them are e.g.1 the ability to modify the unication, to change the default Prolog control rule,to handle asynchronous events, and others, described later in this article. Thesefeatures allow the extensions to beintegratedinto the system.The connections to the extensions have partly been tailored to those whichare being developed in various research groups at ECRC, but apart from thatwe have tried to design the system to be as exible as possible and to includefurther types of connections so that even future, not yet specied extensionshave a relatively good chance of being able to use SEPIA as an implementationbase.Apart fromintegratingthe extensions, SEPIA allows as well to separate themby means of a module concept so that problems are avoided which could stemfrom incompatible features of some of the extensions. Extract: General Description
    General Description
    SEPIA is a WAM-based [35] system containing an incremental compiler, an emulator of the abstract code and a native code generator. The core system itselfis not just another WAM implementation, it contains many optimizations com-pared to the original WAM; the connections to the extensions give it yet anotheravor - although many of the ’sockets’ for the extensions do not constitute ma-jor dierencies compared to other Prolog systems, they nevertheless inuencealmost every detail of the implementation. This, apart from others, was themain reason to develop a completely new Prolog system rather than to adaptan existing one. In the SEPIA design we have merely used our experience fromthe ECRC-Prolog system [12] where we had the possibility to experiment withdelaying mechanisms by compiling thewait declarations[21], but the systemitself was not exible enough to be used as a basis for extensions.Even without the extensions, the system oers wider functionality than stan-dard Prolog systems. One of the extra features is thecoroutining, i.e. the possi-bility to delay the execution of a goal until some specied conditions are fullled.Waking of a suspended goal is triggered by the binding of a variable. The controlconstructs aredelay clausesin which the user can specify the explicit conditionsunder which the goal should delay, e.g.delay and(X, Y, Z) if var(X), var(Y), X\== Y, Z\== 1.species the delaying condition for logical conjunction. Unlike a call-based[5] or shorthand [25, 26, 17, 30] notation in similar systems this gives the userthe possibility to express a more elaborate control while keeping the eciencysince the delay clauses are fully compiled.Another additional feature of SEPIA is the ability to handle events, bothsynchronous (errors, exceptions) and asynchronous (interrupts). If an event israised, the corresponding event handler predicate is called and this call actuallyreplaces the original goal if the event was an error, or it is transparent to it if itwas an interrupt. All the event handlers are user-denable from Prolog whichgives the user additional power to control the system.