Small-step pipelines reduce the complexity of XSLT/XPath programs
Marcel Schaeben
m.schaeben@uni-koeln.de
Gioele Barabucci
gioele.barabucci@uni-koeln.de
Abstract
As code is adapted to deal with unclean external data, it tends to grow in size and complexity.
The use of small-step pipelines (a programming style in which data is manipulated through small, independent steps; a variation on the point-free and concatenative programming paradigms) has been suggested as a way to reduce this complexity, resulting in simpler programs.
Our preliminary quantitative results show that writing data-curation and data-analysis XSLT/XPath programs as small-step pipelines leads to a significant reduction of the peak McCabe cyclomatic complexity. This reduction of complexity is associated with a parallel increase in readability of the resulting code.
Reproducible results
The support material is archived at Zenodo: https://zenodo.org/record/5115788.
It contains everything that is needed to reproduce the results presented in this paper: datasets, original (XSLT/XPath) and transpiled (JS) programs, validation scripts, complexity analysis scripts