Supporting Construction of Domain-Specific Representations in Textual Source Code

Tom Beckmann, Jan Reppien, Jens Lincke, Robert Hirschfeld · 2024

Domain-specific replacements (DSR) allow programmers to view code in a manner better suited to the domain they are working in. Creating such DSRs, however, is not trivial as it requires knowledge of programming language internals to detect relevant patterns in the source code. In this paper, we propose a workflow that facilitates the matching of syntax tree structures and creation of DSRs without requiring expertise in programming language internals. In our workflow, authors express the patterns they want using syntax familiar to them when possible and receive immediate feedback and means for simple discovery for the other cases. We demonstrate the feasibility of our workflow through a prototypical implementation and evaluate it through three case studies. Through this workflow, we aim to further support authors in creating views on source code that support their work better than text.

Read the paper · More papers on PaperTik