| | |
Summary: Formalization and Abstract Implementation
of Rewriting with Nested Rules #
Sergio Antoy and Stephen Johnson
Computer Science Department
Portland State University
P.O. Box 751, Portland, OR 97207, U.S.A.
{antoy,stephenj}@cs.pdx.edu
ABSTRACT
This paper formalizes term rewriting systems (TRSs), called
scoped, in which a rewrite rule can be nested within another
rewrite rule. The righthand side and/or the condition of a
nested rule can refer to any variable in the lefthand 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 nar
rowing. In particular, we consider a class of nonconfluent
and nonterminating TRSs well suited for modeling mod
ern functional logic programs. We describe an abstract im
plementation of rewriting and narrowing for scoped TRSs
|