Infinite Unfolding and Transformations of Nondeterministic Programs

  • Authors:
  • Bjórn Lisper

  • Affiliations:
  • (Correspd.) Dept. of Computer Science and Electronics Mälardalen University P.O. Box 883, SE-721 23 Västerås, Sweden

  • Venue:
  • Fundamenta Informaticae - Program Transformation: Theoretical Foundations and Basic Techniques. Part 1
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

We prove some new results about the correctness of transformations of nondeterministic programs. The reported work formalises the intuitive idea that two recursive programs ought to be equivalent, also in a nondeterministic setting, if they can be symbolically unfolded, through deterministic reductions, to the same, possibly infinite, term. In order to do this we develop two related semantics, based on computations modeled by reduction sequences, and argue that they are operationally meaningful. We then specialise to the case of Combinatory Reduction Systems, which provides a suitable rewrite setting for higher order functional programs with nondeterministic constructs, e.g., stream or process primitives. In this setting we prove a theorem about equivalence of programs based on possibly infinite, deterministic unfoldings of programs converging to the same term. We then use the theorem to show a correctness criterion for unfold/fold-transformations of nondeterministic recursive programs. This criterion is similar to the well-known Tamaki-Sato correctness criterion for unfold/fold-transformations of logic programs.