A functional view of rewriting and strategies for a semantics of ELAN
Abstract
In this paper, we consider term rewriting from a functional point of view. A rewrite rule is a function that can be applied to a term using an explicit application function. From this starting point, we show how to define more elaborated functions, describing first rewrite derivations, then sets of derivations. These functions that we call strategies, can themselves be defined by rewrite rules and the construction can be iterated leading to higher order strategies. Furthermore the application function is itself defined using rewriting in the same spirit. We show how this calculus can be defined and we study some of its properties. Its implementation in the ELAN language is used to motivate and exemplify the whole approach.