Using Static Analysis to Compile Non-sequential Functional Logic Programs

  • Authors:
  • Julio Mariño;Juan José Moreno-Navarro

  • Affiliations:
  • -;-

  • Venue:
  • PADL '00 Proceedings of the Second International Workshop on Practical Aspects of Declarative Languages
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

The efficient implementation of functional logic languages relies on finding (if it exists) an optimal evaluation order for the arguments of functions. The problems of finding the best evaluation order, and the sequentiality of program rules are both difficult and can benefit from using static analysis techniques. The second problem is of special interest because the parallel evaluation of arguments is out of the question due to the possibility of backtracking and sharing of free logical variables among different arguments. However, the lack of sequentiality is often syntactic rather than semantic. In this paper we show that an adequate use of type information and strictness analysis can help a compiler to (i) derive an efficient evaluation order, and (ii) generate sequential code from most programs. Data structures (new versions of definitional trees) are introduced to take advantage of this kind of information and manage run time tests when the computation cannot be made sequential at compile time.