The Pivot is a framework for static analysis and transformation of C++ programs, being developed at Texas A&M University. It aims at the support for high-level parallel and distributed programming techniques. It "understands" the higher levels of C++ (e.g. templates, specializations, concepts), crucial for advanced optimizations, validation of safety, enforcement of dialects, support for staging libraries.
The Pivot infrastructure consists in:
- data structures for Internal Program Representation (IPR);
- a persistent form named eXternal Program Representation (XPR);
- tools for converting between IPR and XPR;
- general traversal and transformation tools.
In addition, there are IPR generator compiler interfaces. Those serve as the building blocks for specific tools such as IDL generators, style checkers, etc.
The goals set for The Pivot directly guide the design criteria of IPR. It aims at the support of all C++, with the exception of macros. Our ideals are that IPR should
- be complete — it should represent all Standard C++ constructs, but not macros before expansions, not other programming languages;
- be general — not targeted to a small area of applications; it should be useful to the wide C++ community;
- be regular — it should contain full C++, but not mimic irregularities. In particular, general rules should be preferred to long lists of special cases;
- emphasize types — types give meaning to programs and IPR can be thought of as a fully typed abstract syntax tree;
- be compiler neutral — it should not be tied to a particular compiler details or implementations;
- be efficient and elegant — it should be able to handle hundreds of thousands of lines of code on common machines.