VCG
VCG is a textual graph-description format created by Georg Sander at the Universitaet des Saarlandes (Saarbruecken, Germany) as the input language of the VCG ("Visualization of Compiler Graphs") tool, released in the mid-1990s under the GNU GPL. It was designed to serialize the graphs that arise inside programs, especially compilers and program analyzers, so that they can be laid out and rendered automatically. The language is closely modeled on GRL (the input of the earlier "edge" tool) but adds many extensions, and it later became the basis of GDL (Graph Description Language), the input format of AbsInt's commercial successor tool aiSee. The two formats are near-identical, and VCG/GDL files commonly carry a .vcg or .gdl extension.
A VCG specification is a nested, brace-delimited list of attribute assignments. A top-level graph: { ... } block contains node: { title: "..." } entries and edge: { sourcename: "..." targetname: "..." } entries, where edges reference nodes by their title strings rather than by separate identifiers. Rich per-element attributes control both semantics and appearance: node shape (box, triangle, rhomb, ellipse), color (from a palette of up to 254 entries), edge classes and priorities, and edge types such as normal, near, back, and bent-near edges that can anchor at specific points on a node to depict pointer structures like C structs. A distinguishing feature is native hierarchy: graphs can contain nested subgraphs and "folding" of statically or dynamically specified regions, so large graphs can be collapsed and expanded interactively.
The format is deliberately generator-oriented rather than an interchange or editing format. The VCG tool "is not a graph editor" but a batch layout engine, offering thirteen layout methods, tree layout, crossing reduction, orthogonal (manhattan) and fisheye views, and export to PostScript, PBM, and PNM. GCC historically could emit control-flow and other internal graphs in VCG form, and family trees, syntax trees, and organization charts are typical examples.
Within the broader graph-format landscape VCG occupies the same niche as Graphviz's DOT and AT&T's GML: a human-readable, attribute-annotated language coupled to an automatic layout engine, with hierarchy support comparable to GraphML subgraphs. It is now largely legacy, superseded by GDL/aiSee (aiSee) and by dot; converters such as Graph::Easy can read VCG/GDL and translate it to DOT, GraphML, or GML.
Alternative Names: VCG
| Feature | VCG (Visualization of Compiler Graphs) |
|---|---|
| Multiple Graphs per Document | |
| Nodes | |
| Undirected Edges | |
| Directed Edges | |
| Hyperedges | |
| Mixed-directionality Edges | |
| Parallel Edges | |
| Self-loops | |
| Edges on Edges | |
| Nested Graphs in Nodes | |
| Nested Graphs in Edges | |
| Nested Graphs in Graphs | |
| Node Labels | |
| Edge Labels | |
| Attributes on Nodes | |
| Attributes on Edges | |
| Attributes on Graphs | |
| Typed Edges | |
Tools(Read & Write)
Read-only Tools
Frequently Asked Questions
What is a VCG (Visualization of Compiler Graphs) file?
A VCG (Visualization of Compiler Graphs) file stores a graph — its nodes, edges and attributes — in the VCG (Visualization of Compiler Graphs) format (also: VCG). See the feature table above for what it supports.
How do I open a VCG (Visualization of Compiler Graphs) file?
Open it in a graph tool that supports VCG (Visualization of Compiler Graphs), or convert it to a format your tool reads. With GraphInOut you can convert VCG (Visualization of Compiler Graphs) to GraphML, DOT, Connected JSON and more, right in your browser.
How do I convert a VCG (Visualization of Compiler Graphs) file to another format?
Use the Convert from VCG (Visualization of Compiler Graphs) link above: upload or paste your VCG (Visualization of Compiler Graphs) file (input preset to VCG (Visualization of Compiler Graphs)), choose a target format and download the result — free, no install.