A generic functional representation of sorted trees supporting attribution (Haskell can do it)

1Citations
Citations of this article
4Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Many important tasks and algorithms in computer science build on sorted trees. Typical examples are the translation of programs represented by syntax trees or the processing of (recursive) data structures following some XML schema. In purely functional programming, sorted trees are usually implemented by terms of recursive data types such that a term represents a tree node and the subterms represent its children. The drawback of this representation is that the context of a tree node is not accessible and has to be managed by different means, e.g., by additional arguments of the functions working on the tree. In this paper, we present a pattern for the realization of sorted trees that overcomes this drawback. The technique is fully declarative. In contrast to competing patterns for trees such as Zippers, it supports pattern matching on the tree data structure. Functions on tree nodes can be used to express the decoration of trees by attribute values in a flexible way. In particular, links between tree nodes can easily be defined and attributions can be modularized into phases with clear interfaces. Techniques adapted from the "Scrap your boilerplate" approach allow for the highlevel specification of contextual constraints. We show how our approach can be realized in Haskell and discuss tool support. © Springer-Verlag Berlin Heidelberg 2013.

Cite

CITATION STYLE

APA

Gaillourdet, J. M., Michel, P., Poetzsch-Heffter, A., & Rauch, N. (2013). A generic functional representation of sorted trees supporting attribution (Haskell can do it). Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 7797 LNCS, 72–89. https://doi.org/10.1007/978-3-642-37651-1_4

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free