Graph Modeling Language

Program-Transformation.Org: The Program Transformation Wiki
The Graph Modeling Language (GML) (which is used by Graphlet) has a simple and orthogonal syntax. A GML file consists of key-value pairs. Values can be integers, floats, strings, and lists. Integers are restricted to 32 bit and floats are double precision. A list consists of key-value pairs. Duplicate keys within the same list are legal and it is guaranteed that the order of these duplicates is preserved during reading and writing. This makes it possible to represent array and list data structures. GML has predefined keys like 'graph', 'node', and 'edge'. A graph is represented with the top-level key 'graph', whose value is a list that contains 'node' and 'edge' keys. Every node must be given a unique integer id. The id is then used to represent edges between two nodes. GML defines default values for every data type. These defaults are then used for missing key-value pairs. Keys unknown to GML are handled differently, depending if the key is considered safe or unsafe. Unknown keys that are safe are considered invariant to graph modification and hence are ignored (i.e., written back unmodified). In contrast, unsafe keys are deleted (i.e., not written back) if the tools cannot update them properly. Safe and unsafe attributes are distinguished with the following convention: Safe (unsafe) attributes start with a lower (an upper) case letter.

The following gives a code example that contains two nodes (called 'one' and 'two') that are connected with an edge. The edge is colored red.

  graph [
   node [ id 1
      label "one" ]
   node [ id 2
      label "two" ]
   edge [ source 1
      target 2
      graphics [ fill "red" ]
    ]
  ]

(Quoted from ExchangeFormatBibliography)

The Graphlet home page is located at:

The following page describes the GML format:

-- HolgerKienle