Design, implementation, and evaluation of a dynamic compilation framework for the YAP system

  • Authors:
  • Anderson Faustino da Silva;Vítor Santos Costa

  • Affiliations:
  • COPPE-Systems Engineering, Federal University of Rio de Janeiro, Rio de Janeiro, RJ, Brazil;COPPE-Systems Engineering, Federal University of Rio de Janeiro, Rio de Janeiro, RJ, Brazil

  • Venue:
  • ICLP'07 Proceedings of the 23rd international conference on Logic programming
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

We propose dynamic compilation for Prolog, in the style of Just-In-Time compilers. Our approach adapts to the actual characteristics of the target program by (i) compiling only the parts of the program that are executed frequently, and (ii) adapting to actual call patterns. This allows aggressive optimization of the parts of the program that are really executed, and better informed heuristics to drive these optimizations. Our compiler does need to support all features in the language, only what is deemed important to performance. Complex execution patterns, such as the ones caused by error handling, may be left to the interpreter. On the other hand, compilation is now part of the run-time, and thus incurs run-time overheads. We have implemented dynamic compilation for YAP system. Our initial results suggest that dynamic compilation achieves very substantial performance improvements over the original interpreter, and that it can approach and even out-perform state-of-theart native code systems. We believe that we have shown that dynamic compilation is worthwhile and fits naturally with Prolog execution.