Incremental Context-Dependent Analysis for Language-Based Editors
ACM Transactions on Programming Languages and Systems (TOPLAS)
MPC '02 Proceedings of the 6th International Conference on Mathematics of Program Construction
Journal of Functional Programming
Journal of Functional Programming
Self-adjusting computation
ATerms for manipulation and exchange of structured data: It's all about sharing
Information and Software Technology
Clowns to the left of me, jokers to the right (pearl): dissecting data structures
Proceedings of the 35th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A lightweight approach to datatype-generic rewriting
Proceedings of the ACM SIGPLAN workshop on Generic programming
Generic programming with fixed points for mutually recursive datatypes
Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
Type-safe diff for families of datatypes
Proceedings of the 2009 ACM SIGPLAN workshop on Generic programming
SSDGP'06 Proceedings of the 2006 international conference on Datatype-generic programming
Proceedings of the 6th ACM SIGPLAN workshop on Generic programming
Generic selections of subexpressions
Proceedings of the 6th ACM SIGPLAN workshop on Generic programming
Monads, zippers and views: virtualizing the monad stack
Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
MPC'06 Proceedings of the 8th international conference on Mathematics of Program Construction
Lazy stateless incremental evaluation machinery for attribute grammars
Proceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation
Hi-index | 0.00 |
Applications which deal with editing of structured data over multiple iterations, such as structure editors, exercise assistants, or applications which support incremental computation, need to represent transformations between different versions of data. A general notion of "transformation" should be more informative than what is obtained by computing the difference between the old and the new term, as diff algorithms generally consider only insert, copy, and delete operations. Transformations, however, may involve swapping elements, or duplicating them, and a good representation of transformations should not involve unnecessary repetition of data, or lose shared structure between the old and new term. In this paper we take a detailed look at the notion of transformation on strongly-typed structures. Our transformations are datatype-generic, and thus can be applied to a large class of data structures. We focus on representing transformations in a way that maximally captures the common substructure between the old and new term. This is of particular importance to a specific class of applications: that of incremental computations which recompute information only for the parts of the tree that are affected by a transformation. We present three different approaches to the problem, of varying complexity, flexibility, and user-friendliness; different approaches might be better suited for one particular application area or another. We provide practical examples of how to encode transformations in each of the approaches, as well as suggestions on how to apply our solution to larger applications. All approaches use the same underlying generic programming library, and support transformations over families of mutually recursive datatypes.