PAG
The Program Analyzer Generator

Introduction:

In order to produce high-quality code, compilers have to rely on the results of static program analyses. To date, implementing these analyses has been difficult, expensive, and error-prone.

The PAG Program Analyzer Generator provides for a generation of efficient analyzers from concise specifications. PAG-generated interprocedural analyzers can be easily integrated into existing compilers.

PAG has been successfully used in an ESPRIT project to generate several analyzers (including alias analysis and constant propagation) for industrial grade ANSI-C and Fortran90 compilers. One of the main reasons it is currently widely used in university circles is because it generates efficient code (ANSI-C) and enables analyzers to be generated which are flexible, maintainable and portable.

Overview:

In order to generate an analyzer using PAG, two specifications have to be written: one for the definition of the data structures, including the abstract domain, and one containing the analysis parameters, definition of the transfer functions and, optionally, some support functions.

From these files PAG generates C files and a compile script that creates a library which has to be linked to the compiler. A call to the analyzer has to be inserted in the compiler driver.

Structure of PAG and integration of generated analyzers

Obtaining and Using PAG:

The company AbsInt offers commercial licenses of PAG. Look here.

There is a Web interface to the PAG system. It has restricted capabilities and a simplified specification mechanism. Just have a look at it.

To obtain the full PAG system a license is required:

To decide whether you like to obtain a license you can take a look at the manual (PS, 990kB).

Thanks to Hanne Riis Nielson, I have a list of suggested exercises for PAG/WWW:

The solutions for these exercises can be found here (with a proper password).

Publications about PAG:

Links:


Keywords: abstract interpretation, compiler, compiler technology, PAG, program analysis, optimization, program analyzer generator, program optimization, static program analysis, Programmanalyse, statische Programmanalyse, Programmanalysatorgenerator, data flow analysis, compiler construction, tool, optimisation

Florian Martin
Martin@cs.uni-saarland.de