Programming requires understanding, using, and changing abstract source code and other rep- resentations 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.
Toni Mattis University of Potsdam; Hasso Plattner Institute, Lukas Böhme Hasso Plattner Institute, University of Potsdam, Potsdam, Germany, Stefan Ramson Hasso Plattner Institute, Germany, Tom Beckmann Hasso Plattner Institute, Martin C. Rinard Massachusetts Institute of Technology, Robert Hirschfeld Hasso Plattner Institute; University of Potsdam