A program transformation for returning states in functional-logic programs

  • Authors:
  • Rafael Caballero

  • Affiliations:
  • University Complutense, Madrid, Spain

  • Venue:
  • Proceedings of the 20th ACM SIGPLAN workshop on Partial evaluation and program manipulation
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper studies the conditions necessary to safely introduce new values as part of the results of function rules in functional-logic programs. The idea is to consider an initial functional-logic program and to produce, by means of a program transformation, a new program including states. Each rule of the new program returns pairs of values, with the first value the same as in the original program, and the second one a new value that can be defined in terms of the values returned by the function calls occurring in the rule. We prove that the transformation ensures the equivalence of the two programs with respect to the Constructor-based ReWriting Logic, a suitable semantics for functional-logic programs.