Typed Generic Traversal With Term Rewriting Strategies [article]

Ralf Laemmel
<span title="2002-07-28">2002</span> <i > arXiv </i> &nbsp; <span class="release-stage" >pre-print</span>
A typed model of strategic term rewriting is developed. The key innovation is that generic traversal is covered. To this end, we define a typed rewriting calculus S'_gamma. The calculus employs a many-sorted type system extended by designated generic strategy types gamma. We consider two generic strategy types, namely the types of type-preserving and type-unifying strategies. S'_gamma offers traversal combinators to construct traversals or schemes thereof from many-sorted and generic
more &raquo; ... The traversal combinators model different forms of one-step traversal, that is, they process the immediate subterms of a given term without anticipating any scheme of recursion into terms. To inhabit generic types, we need to add a fundamental combinator to lift a many-sorted strategy s to a generic type gamma. This step is called strategy extension. The semantics of the corresponding combinator states that s is only applied if the type of the term at hand fits, otherwise the extended strategy fails. This approach dictates that the semantics of strategy application must be type-dependent to a certain extent. Typed strategic term rewriting with coverage of generic term traversal is a simple but expressive model of generic programming. It has applications in program transformation and program analysis.
<span class="external-identifiers"> <a target="_blank" rel="external noopener" href="https://arxiv.org/abs/cs/0205018v2">arXiv:cs/0205018v2</a> <a target="_blank" rel="external noopener" href="https://fatcat.wiki/release/jbqr27ef7rgfnni5urp6xunz7q">fatcat:jbqr27ef7rgfnni5urp6xunz7q</a> </span>
<a target="_blank" rel="noopener" href="https://archive.org/download/arxiv-cs0205018/cs0205018.pdf" title="fulltext PDF download" data-goatcounter-click="serp-fulltext" data-goatcounter-title="serp-fulltext"> <button class="ui simple right pointing dropdown compact black labeled icon button serp-button"> <i class="icon ia-icon"></i> File Archive [PDF] <div class="menu fulltext-thumbnail"> <img src="https://blobs.fatcat.wiki/thumbnail/pdf/26/65/2665a5ca66753ec01a5f8a18b9e39bcd66f84d03.180px.jpg" alt="fulltext thumbnail" loading="lazy"> </div> </button> </a> <a target="_blank" rel="external noopener" href="https://arxiv.org/abs/cs/0205018v2" title="arxiv.org access"> <button class="ui compact blue labeled icon button serp-button"> <i class="file alternate outline icon"></i> arxiv.org </button> </a>