Chapter 1. Introduction

The `srctools` distribution is a collection of utilities designed to work on top of srcML to provide additional functfor working with source code. At the core of this distribution is a set of libraries that creates an in-memory program model of the parsed source code. A number of applications are linked against this library to provide solutions to various queries about the source code.

Note that the programs in this distribution cannot operate directly on source code. It operates on the XML documents produced by the src2srcml translators. Also note that src2srcml must be run with specific flags in order for the `srctools` C++ parser to function properly.

This program anlaysis suite is rooted in my Master's thesis program "pilfer". Pilfer was originally written in python and operated in a very similar manner to the `srctools` programs. It read the XML produced by srcML, produced an in-memory model of the parsed source code and generated an XMI document that contained a UML representation of the program.

Over the last several years (and a number of revisions) pilfer has evolved into a fast and extensible parsing framework. Over time, the accuracy with which the internal C++ parser has improved significantly. I have worked very hard to make sure that the C++ model is as coherent as possible - even in the complete absence of information that would make the program compilable. The libraries of this toolkit has been used to support a number of program analysis projects.

The `srctools` distribution is under fairly active development. This will almost certainly mean that library interfaces are completely unstable, and may mean that bugs get introduced into various programs at different times. Use with caution.