CPPX Examples

For most examples, we show:

  1. The source code
  2. The dump generated by the unmodified version of GCC.
  3. The GXL and TA versions of the dump made by the modified version of GCC
  4. The GXL and TA versions of the reduced dump. This dump has the unused builtin types and functions generated by GCC removed from the graph.
  5. A layout of the reduced graph generated by vcg in PNG format.

Important note: The original gcc dump is 1 based (i.e. nodes are numbered starting at 1) while the modified gcc dump is 0 based.

Open source example

This provides a substantial examples of GXL text. Not cppx'ed yet, though: this is still the gcc ASG pure and simple.

rexexp.c [source | gcc ASG in GXL ]

Simple examples

Here are some simple examples with ASGs at various stages of conversion.

Datrix examples

These examples are based on the 7 pages of VCG-style diagrams in the Datrix documentation. GCC does not accept many of these examples as written, so some minimal changes have been made to get the GCC compiler to accept them.

  1. Overview
  2. Declarations
  3. Classes
  4. Expressions and Statements
  5. Control Statements
  6. Templates
  7. Exceptions

Szeged examples

These examples are taken from documentation of the "Proposal for a standard C/C++ Schema" of Ferenc et. al. of the University of Szeged. Some of them don't work yet, so links are missing.

  1. Classes [ source | gcc ASG [TA | GXL] ]
  2. Enumerated Types [ source | gcc ASG [TA | GXL] | cppx ASG [TA | | GXL] ]
  3. Name Spaces [ source | gcc ASG [TA | GXL] ]
  4. Templates [ source ]
  5. Name Spaces And Templates [ source ]
  6. Types [ source | gcc ASG [TA | GXL] | cppx ASG [TA | | GXL] ]

AJM 2001-04-4