Improving the compilation of Prolog to C using moded types and determinism information

Morales Caballero, José Francisco and Carro Liñares, Manuel and Hermenegildo, Manuel V. (2004). Improving the compilation of Prolog to C using moded types and determinism information. Monografía (Technical Report). Facultad de Informática (UPM), Madrid, España.

Description

Title: Improving the compilation of Prolog to C using moded types and determinism information
Author/s:
  • Morales Caballero, José Francisco
  • Carro Liñares, Manuel
  • Hermenegildo, Manuel V.
Item Type: Monograph (Technical Report)
Date: April 2004
Subjects:
Freetext Keywords: Prolog; C; Optimizing compilation; Global analysis
Faculty: Facultad de Informática (UPM)
Department: Inteligencia Artificial
Creative Commons Licenses: Recognition - No derivative works - Non commercial

Full text

[img]
Preview
PDF - Requires a PDF viewer, such as GSview, Xpdf or Adobe Acrobat Reader
Download (218kB) | Preview

Abstract

Este trabajo describe el estado actual y ofrece resultados de rendimiento de un compilador de Prolog a C. La novedad de esta aproximación radica en un diseño flexible que acepta diferentes tipos de información de alto nivel, expresada en un lenguaje estándar de aserciones y obtenida típicamente por medio de análisis automático del programa Prolog inicial, para optimizar el código C resultante, que es procesado por un compilador C genérico para generar código nativo directamente ejecutable. El proceso de traducción básico esencialmente mimetiza la expansión (unfolding) de un emulador de bytecode codificado en C con respecto al código correspondiente al programa Prolog. Se aplican optimizaciones al programa expandido. Esto es facilitado por un diseno˜ flexible de las instrucciones de bytecode y sus componentes de bajo nivel. Esta aproximación permite reusar una cantidad considerable de maquinaria del emulador: código C, representación de datos, rutinas de manejo de memoria y áreas, etc., así como combinar código emulado con código nativo de una forma relativamente directa. Presentamos el rendimiento de programas compilados con la versión actual del sistema, tanto usando como no usando información de análisis.---ABSTRACT---We describe the current status of and provide performance results for a prototype compiler of Prolog to C. The compiler is novel in that it is designed to accept different kinds of high-level information, typically obtained via an automatic analysis of the initial Prolog program and expressed in a standardized language of assertions, and use this information to optimize the resulting C code, which is then further processed by an off-the-shelf C compiler. The basic translation process used essentially mimics an unfolding of a C-coded bytecode emulator with respect to the particular bytecode corresponding to the Prolog program. Optimizations are then applied to this unfolded program. This is facilitated by a more flexible design of the bytecode instructions and their lower-level components. This approach allows reusing a sizable amount of the machinery of the bytecode emulator: ancillary pieces of C code, data definitions, memory management routines and areas, etc., as well as mixing bytecode emulated code with natively compiled code in a relatively straightforward way. We report on the performance of programs compiled by the current version of the system, both with and without analysis information.

More information

Item ID: 55503
DC Identifier: http://oa.upm.es/55503/
OAI Identifier: oai:oa.upm.es:55503
Official URL: http://cliplab.org/papers/morales04:compilation-tr.pdf
Deposited by: Biblioteca Facultad de Informatica
Deposited on: 19 Jun 2019 14:28
Last Modified: 19 Jun 2019 14:28
  • Logo InvestigaM (UPM)
  • Logo GEOUP4
  • Logo Open Access
  • Open Access
  • Logo Sherpa/Romeo
    Check whether the anglo-saxon journal in which you have published an article allows you to also publish it under open access.
  • Logo Dulcinea
    Check whether the spanish journal in which you have published an article allows you to also publish it under open access.
  • Logo de Recolecta
  • Logo del Observatorio I+D+i UPM
  • Logo de OpenCourseWare UPM