Programming errors in traversal programs over structured data
Ralf Laemmel, Simon Thompson, and Markus Kaiser

TL;DR
This paper investigates common programming errors in traversal programs over structured data, analyzing static typing and analysis methods to prevent issues like divergence and dead code, with language-agnostic insights.
Contribution
It identifies key error categories in traversal programs and proposes improvements to strategy libraries and languages to enhance correctness.
Findings
Static analysis can prevent certain traversal errors
Identifies divergence and dead code as common issues
Provides language-agnostic suggestions for safer traversal programming
Abstract
Traversal strategies \'a la Stratego (also \'a la Strafunski and 'Scrap Your Boilerplate') provide an exceptionally versatile and uniform means of querying and transforming deeply nested and heterogeneously structured data including terms in functional programming and rewriting, objects in OO programming, and XML documents in XML programming. However, the resulting traversal programs are prone to programming errors. We are specifically concerned with errors that go beyond conservative type errors; examples we examine include divergent traversals, prematurely terminated traversals, and traversals with dead code. Based on an inventory of possible programming errors we explore options of static typing and static analysis so that some categories of errors can be avoided. This exploration generates suggestions for improvements to strategy libraries as well as their underlying programming…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Advanced Database Systems and Queries · Model-Driven Software Engineering Techniques
