Implementing Dynamic-Cut in TOY - Caballero, R.; García-Ruiz, Y. (Electronic notes in theoretical computer science, 2007)
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.