Logic programming with functions and predicates: the language Babel
Journal of Logic Programming
Specialization of lazy functional logic programs
PEPM '97 Proceedings of the 1997 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Term rewriting and all that
POPL '85 Proceedings of the 12th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
Operational semantics of rewriting with the on-demand evaluation strategy
SAC '00 Proceedings of the 2000 ACM symposium on Applied computing - Volume 2
Lazy rewriting on eager machinery
ACM Transactions on Programming Languages and Systems (TOPLAS)
Advanced topics in term rewriting
Advanced topics in term rewriting
Modular termination of context-sensitive rewriting
Proceedings of the 4th ACM SIGPLAN international conference on Principles and practice of declarative programming
Context-sensitive rewriting strategies
Information and Computation
Termination of (Canonical) Context-Sensitive Rewriting
RTA '02 Proceedings of the 13th International Conference on Rewriting Techniques and Applications
Termination of on-demand rewriting and termination of OBJ programs
Proceedings of the 3rd ACM SIGPLAN international conference on Principles and practice of declarative programming
ICFEM '97 Proceedings of the 1st International Conference on Formal Engineering Methods
Refining weakly outermost-needed rewriting and narrowing
Proceedings of the 5th ACM SIGPLAN international conference on Principles and practice of declaritive programming
Transformation techniques for context-sensitive rewrite systems
Journal of Functional Programming
Proving termination of context-sensitive rewriting by transformation
Information and Computation
Natural narrowing for general term rewriting systems
RTA'05 Proceedings of the 16th international conference on Term Rewriting and Applications
Context-sensitive dependency pairs
Information and Computation
Hi-index | 5.23 |
In functional languages such as OBJ*, CafeOBJ, and Maude, symbols are given strategy annotations that specify (the order in) which subterms are evaluated. Syntactically, strategy annotations are given either as lists of natural numbers or as lists of integers associated to function symbols whose (absolute) values refer to the arguments of the corresponding symbol. A positive index prescribes the evaluation of an argument whereas a negative index means ''evaluation on-demand''. These on-demand indices have been proposed to support laziness in OBJ-like languages. While strategy annotations containing only natural numbers have been implemented and investigated to some extent (regarding, for example, termination, confluence, and completeness), fully general annotations (including positive and negative indices) have been disappointingly under-explored to date. In this paper, we first point out a number of problems of current proposals for handling on-demand strategy annotations. Then, we propose a solution to these problems by keeping an accurate track of annotations along the evaluation sequences. We formalize this solution as a suitable extension of the evaluation strategy of OBJ-like languages (which only consider annotations given as natural numbers) to on-demand strategy annotations. Our on-demand evaluation strategy (ODE) overcomes the drawbacks of previous proposals and also has better computational properties. For instance, we show how to use this strategy for computing (head-)normal forms. We also introduce a transformation which allows us to prove the termination of the new evaluation strategy by using standard rewriting techniques. Finally, we present two interpreters of the new strategy together with some encouraging experiments which demonstrate the usefulness of our approach.