SANER 2017

2017 IEEE 24th International Conference on Software Analysis, Evolution, and Reengineering (SANER), February 20-24, 2017, Klagenfurt, Austria

Desktop Layout

Static Analysis and Refactoring
Tool Demonstrations
srcQL: A Syntax-Aware Query Language for Source Code
Brian Bartman, Christian D. Newman, Michael L. Collard, and Jonathan I. Maletic
(Kent State University, USA; University of Akron, USA)
Abstract: A tool and domain specific language for querying source code is introduced and demonstrated. The tool, srcQL, allows for the querying of source code using the syntax of the language to identify patterns within source code documents. srcQL is built upon srcML, a widely used XML representation of source code, to identify the syntactic contexts being queried. srcML inserts XML tags into the source code to mark syntactic constructs. srcQL uses a combination of XPath on srcML, regular expressions, and syntactic patterns within a query. The syntactic patterns are snippets of source code that supports the use of logical variables which are unified during the query process. This allows for very complex patterns to be easily formulated and queried. The tool is implemented (in C++) and a number of queries are presented to demonstrate the approach. srcQL currently supports C++ and scales to large systems.

Authors:


Time stamp: 2020-02-27T19:08:32+01:00