Dimensions of Examples: Toward a Framework for Qualifying Examples in Programming

Toni Mattis, Lukas Böhme, Stefan Ramson, Tom Beckmann, Martin C. Rinard, Robert Hirschfeld

Published: 2025, Last Modified: 03 May 2026Programming 2025EveryoneRevisionsBibTeXCC BY-SA 4.0
Abstract: Programming requires understanding, using, and changing abstract source code and other representations of programs. Concrete examples demonstrate a particular instance of their abstract behavior. Hence, they play an important role in program comprehension, specification, and testing of requirements. Authoring examples entails a range of - often implicit - decisions about the content and presentation of the example. In this work, we attempt to structure this decision space by describing a set of dimensions that characterize examples in programming. As the manual effort of creating examples is increasingly automated, e.g., through the use of generative AI, we expect this catalog of dimensions to help users and tool developers parametrize, guide, and evaluate the generation of examples in terms of the vocabulary we present here.
Loading