Year: 2026
Type: conference-paper
Abstract: Compilers and other source code analysis tools are typically tested at the system level, running the tool on an input program and checking generated results. However, this does not fit agile test-driven development, where internal results need to be individually unit tested. Such unit tests are seldom written as they typically require cumbersome code navigating the internal representation.We suggest a solution to this problem through the introduction of text probes: structured comments that embed tests into input source files. Text probes are placed at the position they test, keeping navigation code short. We have implemented support for text probes, both as a standalone test runner and as an integration into an editor, supporting live feedback on test results as well as code completion for internal properties and expected values.We have evaluated the approach by assessing its applicability for several tools and languages, including a Java 11 compiler, finding that it has good performance and supports a wide range of tests. We have also used it in courses on compilers and program analysis and received overall positive feedback from students.
Institution: Lund University
Language: English
Subfield: Software
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7204018444
