|
ABSTRACT
This paper formalizes term rewriting systems (TRSs), called scoped, in which a rewrite rule can be nested within another rewrite rule. The right-hand side and/or the condition of a nested rule can refer to any variable in the left-hand side of a nesting rule. Nesting of rewrite rules is intended to define a lexical scope with static binding. Our work is applicable to programming languages in which programs are modeled by TRSs and computations are executed by rewriting or narrowing. In particular, we consider a class of non-confluent and non-terminating TRSs well suited for modeling modern functional logic programs. We describe an abstract implementation of rewriting and narrowing for scoped TRSs to show that scopes can be easily handled irrespective of the evaluation strategy. The efficiency of rewriting within a scoped TRS, measured using a narrowing virtual machine, is comparable to the efficiency of rewriting for non-scoped TRSs.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
S. Antoy. Evaluation strategies for functional logic programming. In B. Gramlich and S. Lucas, editors, Electronic Notes in Theoretical Computer Science, volume 57. Elsevier, 2001.
|
| |
3
|
S. Antoy, M. Hanus, A. Tolmach, and J. Liu. Architecture of a virtual machine for functional logic computations. Preliminary draft, 2003. Available at http://www.cs.pdx.edu/~antoy/.
|
| |
4
|
|
| |
5
|
|
| |
6
|
P. Borovansky, C. Kirchner, H. Kirchner, P.-E. Moreau, and C. Ringeissen. An overview of ELAN. In C. Kirchner and H. Kirchner, editors, Electronic Notes in Theoretical Computer Science, volume 15. Elsevier, 2000.
|
| |
7
|
|
| |
8
|
M. Clavel, F. Durán, S. Eker, P. Lincoln, N. Martí-Oliet, J. Meseguer, and C. Talcott. The Maude 2.0 system. In R. Nieuwenhuis, editor, Rewriting Techniques and Applications (RTA 2003), number 2706 in Lecture Notes in Computer Science, pages 76--87. Springer-Verlag, June 2003.
|
| |
9
|
|
| |
10
|
|
| |
11
|
M. Hanus, S. Antoy, M. Engelke, K. Höppner, J. Koj, P. Niederau, R. Sadre, and F. Steiner. PAKCS: The Portland Aachen Kiel Curry System, 2003.
|
| |
12
|
M. Hanus (ed.). Curry: An integrated functional logic language (vers. 0.7.2). Available at http://www.informatik.uni-kiel.de/~curry, 2002.
|
 |
13
|
|
| |
14
|
G. Huet and J.-J. Lévy. Computations in orthogonal term rewriting systems. In J.-L. Lassez and G. Plotkin, editors, Computational logic: essays in honour of Alan Robinson, pages 395--443. MIT Press, Cambridge, MA, 1991.
|
| |
15
|
|
| |
16
|
|
| |
17
|
|
| |
18
|
|
| |
19
|
Mark G. J. van den Brand , Arie van Deursen , Jan Heering , H. A. de Jong , Merijn de Jonge , Tobias Kuipers , Paul Klint , Leon Moonen , Pieter A. Olivier , Jeroen Scheerder , Jurgen J. Vinju , Eelco Visser , Joost Visser, The ASF+SDF Meta-environment: A Component-Based Language Development Environment, Proceedings of the 10th International Conference on Compiler Construction, p.365-370, April 02-06, 2001
|
| |
20
|
E. Visser. Scoped dynamic rewrite rules. In M. van den Brand and R. Verma, editors, Electronic Notes in Theoretical Computer Science, volume 59. Elsevier, 2001.
|
|