A semantics for tracing declarative multi-paradigm programs

  • Authors:
  • B. Brassel;M. Hanus;F. Huch;G. Vidal

  • Affiliations:
  • Institut für Informatik, Kiel, Germany;Institut für Informatik, Kiel, Germany;Institut für Informatik, Kiel, Germany;Technical University of Valencia, Valencia, Spain

  • Venue:
  • PPDP '04 Proceedings of the 6th ACM SIGPLAN international conference on Principles and practice of declarative programming
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

We introduce the theoretical basis for tracing lazy functional logic computations in a declarative multi-paradigm language like Curry. Tracing computations is a difficult task due to the subtleties of the underlying operational semantics which combines laziness and non-determinism. In this work, we define an instrumented operational semantics that generates not only the computed values and bindings but also an appropriate data structure---a sort of redex trail---which can be used to trace computations at an adequate level of abstraction. In contrast to previous approaches, which rely solely on a transformation to instrument source programs, the formal definition of a tracing semantics improves the understanding of the tracing process. Furthermore, it allows us to formally prove the correctness of the computed trail. A prototype implementation of a tracer based on this semantics demonstrates the usefulness of our approach.