Abstract

A typed model of strategic rewriting with coverage of generic traversals is developed. The corresponding calculus offers, for example, a strategy operator □(·), which applies the argument strategy to all immediate subterms. To provide a typeful model for generic strategies, one has to identify signature-independent, that is, generic types. In the present article, we restrict ourselves to TP—the generic type of all Type-Preserving strategies. TP is easily integrated into a standard many-sorted type system for rewriting. To inhabit TP, we need to introduce a (left-biased) type-driven choice operator &. The operator applies its left argument (corresponding to a many-sorted strategy) if the type of the given term fits, and the operator resorts to the right argument (corresponding to a generic default) otherwise. This approach dictates that the semantics of strategy application must be type-dependent to a certain extent.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call