Implementing Dynamic-Cut in TOY

  • Authors:
  • R. Caballero;Y. García-Ruiz

  • Affiliations:
  • Departamento de Sistemas Informáticos y Programación, Universidad Complutense de Madrid, Madrid, Spain;Departamento de Sistemas Informáticos y Programación, Universidad Complutense de Madrid, Madrid, Spain

  • Venue:
  • Electronic Notes in Theoretical Computer Science (ENTCS)
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper presents the integration of the optimization known as dynamic cut within the functional-logic system TOY. The implementation automatically detects deterministic functions at compile time, and includes in the generated code the test for detecting at run-time the computations that can actually be pruned. The outcome is a much better performance when executing deterministic functions including either or-branches in their definitional trees or extra variables in their conditions, with no serious overhead in the rest of the computations. The paper also proves the correctness of the criterion used for detecting deterministic functions w.r.t. the semantic calculus CRWL.