Term Rewriting with Type-safe Traversal Functions |
| |
Authors: | M.G.J. van den Brand P. Klint J.J. Vinju |
| |
Affiliation: | aCentrum voor Wiskunde en Informatica, Kruislaan 413, NL-1098 SJ, Amsterdam, The Netherlands |
| |
Abstract: | Term rewriting is an appealing technique for performing program analysis and program transformation. Tree (term) traversal is frequently used but is not supported by standard term rewriting. In this paper, many-sorted first-order term rewriting is extended with automatic tree traversal by adding two primitive tree traversal strategies and complementing them with three types of traversals. These so-called traversal functions can be either top-down or bottom-up. They can be sort preserving, mapping to a single sort, or a combination of these two. Traversal functions have a simple design, their application is type-safe in a first-order many-sorted setting and can be implemented efficiently. We describe the operational semantics of traversal functions and discuss applications. |
| |
Keywords: | |
本文献已被 ScienceDirect 等数据库收录! |
|