5 research outputs found
Exploranative Code Quality Documents
Good code quality is a prerequisite for efficiently developing maintainable
software. In this paper, we present a novel approach to generate exploranative
(explanatory and exploratory) data-driven documents that report code quality in
an interactive, exploratory environment. We employ a template-based natural
language generation method to create textual explanations about the code
quality, dependent on data from software metrics. The interactive document is
enriched by different kinds of visualization, including parallel coordinates
plots and scatterplots for data exploration and graphics embedded into text. We
devise an interaction model that allows users to explore code quality with
consistent linking between text and visualizations; through integrated
explanatory text, users are taught background knowledge about code quality
aspects. Our approach to interactive documents was developed in a design study
process that included software engineering and visual analytics experts.
Although the solution is specific to the software engineering scenario, we
discuss how the concept could generalize to multivariate data and report
lessons learned in a broader scope.Comment: IEEE VIS VAST 201
Recommended from our members
Speaking for the Trees: a new (old) approach to languages and syntax
Programmers in many fields are interested in building new languages. In the same way that high-level languages increase productivity by allowing programmers to accomplish more with a given amount of code, a special-purpose language can reduce repetitive code and hide implementation detail, making a program\u27s structure and function more evident. Sometimes an entire new language is called for, and other times an existing language serves most needs but could benefit from a few additional elements. However, current tools support this kind of extension poorly.
Language tools typically represent programs internally as trees which are easily extended with new types of nodes. However, in today\u27s languages the programmer only indirectly manipulates this tree---through a parser which analyzes free-form text (that is, concrete syntax) and builds an abstract syntax tree (AST). The limitations of parsers make languages difficult to extend and severely constrain the choice of notation. In other words, what one writes and reads is dictated by what the parser is able to handle.
I explore an alternative approach: represent source code directly as an AST and derive both an executable program and a readable presentation from it. I present a flexible representation for ASTs, a general mechanism for transforming these trees, and a language for grammars which allows concrete syntax and semantics to be defined via these transformations. I show that this approach is modular, easy to understand, and expressive enough to define novel syntax and semantics.
My prottype system, Lorax, demonstrates the new approach. Reductions for presentation and execution are written in a functional language with meta-programming features. Syntax is not limited to simple text but may include richer notation for easier reading and understanding. A structure editor renders this rich syntax, using algorithms from TEX. In Lorax, the barrier to entry for the creation of languages is lowered, making it practical for programmers to express solutions in the terms and the notation which are closest to the problem domain