Querying large C and C++ code bases: the open approach
Loading...
Authors
Telea, Alexandru
Byelas, Heorhiy
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
Static code analysis offers a number of tools for the assessment of complexity, maintainability, modularity and safety of industrysize
source code bases. Most analysis scenarios include two main phases. First, the code is parsed and ’raw’ information is extracted
and saved, such as syntax trees, possibly annotated with semantic (type) information. In the second phase, the raw information is queried to check the presence or absence of specific code
patterns which supports or invalidates specific claims on the code. Whereas parsing source code is largely standardized, and several solutions (parsers) exist already, querying the outputs of such parsers is still a complex task. The main problem resides in the difficulty of easily translating high-level concerns in the problem domain into low-level queries into the raw data domain. We present here an open system for constructing and executing queries on
industry-size C++ code bases. Our query system adds several so-called query primitives atop a flexible C++ parser, offers several
options to combine these predicates into arbitrarily complex expressions, and has a very efficient way to evaluate such expressions
on syntax trees of millions of nodes. We demonstrate the integration of our query system, C++ parser, and interactive visualizations,
into the SOLIDFXintegrated environment for industrial code analysis.
Description
The Post-Proceedings of this Festschrift will be formally published in The South African Computer Journal number 41.
Keywords
Software Visualisation, Empirical Software Engineering
Sustainable Development Goals
Citation
Telea, A & Byelas, H 2008, 'Querying large C and C++ code bases: the open approach', in Colloquium and Festschrift at the occasion of the 60th birthday of Derrick Kourie (Computer Science), Windy Brow, South Afica, 28 June 2008. [http://www.cs.up.ac.za/cs/sgruner/Festschrift/]