5 research outputs found

    On the Portability of Prolog Applications

    Get PDF
    The non-portability of Prolog programs is widely considered one of the main problems facing Prolog programmers. Although since 1995, the core of the language is covered by the ISO standard 13211-1, this standard has not been sufficient to support large Prolog applications. As an approach to address this problem, since 2007, YAP and SWI-Prolog have established a basic compatibility framework. The aim of the framework is running the same code on Edinburgh-based Prolog systems rather than having to migrate an application. This article describes the implementation and evaluates this framework by studying how it can be used on a number of libraries and an important application. © 2011 Springer-Verlag

    Propagation techniques in WAM-based architectures : the FIDO-III approach

    Get PDF
    In this paper we develop techniques to implement finite domain constraints into the Warren Abstract Machine (WAM) to solve large combinatorial problems effciently. The WAM is the de facto standard model for compiling PROLOG. The FIDO system ("FInite Domain\u27;) provides the same functionality as the finite domain part of CHIP. The extension includes the integration of several new variable types (suspended variables, domain variables and suspended domain variables) into the WAM. The "firing conditions\u27; are lookahead and forward control schemes known from CHIP. We have developed a constraint model where the constraint is divided into constraint initialization code, constraint testing code and constraint body. Furthermore, we supply a deeply integrated WAM builtin to realize the first fail principle. Besides the summary of the important theoretical results, the specification of the compilation process in the WAM Compilation Scheme is given. We also present a simple graphical analysis method to estimate the computational burden of lookahead and forward constraints. The work is an instance of exploring finite domain consistency techniques in logic programming belonging to the FIDO lab within the ARC-TEC project

    Propagation techniques in WAM-based architectures : the FIDO-III approach

    Get PDF
    In this paper we develop techniques to implement finite domain constraints into the Warren Abstract Machine (WAM) to solve large combinatorial problems effciently. The WAM is the de facto standard model for compiling PROLOG. The FIDO system ("FInite Domain';) provides the same functionality as the finite domain part of CHIP. The extension includes the integration of several new variable types (suspended variables, domain variables and suspended domain variables) into the WAM. The "firing conditions'; are lookahead and forward control schemes known from CHIP. We have developed a constraint model where the constraint is divided into constraint initialization code, constraint testing code and constraint body. Furthermore, we supply a deeply integrated WAM builtin to realize the first fail principle. Besides the summary of the important theoretical results, the specification of the compilation process in the WAM Compilation Scheme is given. We also present a simple graphical analysis method to estimate the computational burden of lookahead and forward constraints. The work is an instance of exploring finite domain consistency techniques in logic programming belonging to the FIDO lab within the ARC-TEC project

    Partial evaluation in an optimizing prolog compiler

    Get PDF
    Specialization of programs and meta-programs written in high-level languages has been an active area of research for some time. Specialization contributes to improvement in program performance. We begin with a hypothesis that partial evaluation provides a framework for several traditional back-end optimizations. The present work proposes a new compiler back-end optimization technique based on specialization of low-level RISC-like machine code. Partial evaluation is used to specialize the low-level code. Berkeley Abstract Machine (BAM) code generated during compilation of Prolog is used as the candidate low-level language to test the hypothesis. A partial evaluator of BAM code was designed and implemented to demonstrate the proposed optimization technique and to study its design issues. The major contributions of the present work are as follows: It demonstrates a new low-level compiler back-end optimization technique. This technique provides a framework for several conventional optimizations apart from providing opportunity for machine-specific optimizations. It presents a study of various issues and solutions to several problems encountered during design and implementation of a low-level language partial evaluator that is designed to be a back-end phase in a real-world Prolog compiler. We also present an implementation-independent denotational semantics of BAM code--a low-level language. This provides a vehicle for showing the correctness of instruction transformations. We believe this work to provide the first concrete step towards usage of partial evaluation on low-level code as a compiler back-end optimization technique in real-world compilers
    corecore