encyclopegia.org

Term graph

A term graph is a representation of an expression in a formal language as a generalized graph whose vertices are . Term graphs are a more powerful form of representation than expression trees because they can represent not only common subexpressions (i.e. they can take the structure of a directed acyclic graph) but also cyclic/recursive subexpressions (cyclic digraphs). Abstract syntax trees cannot represent shared subexpressions since each tree node can only have one parent; this simplicity comes at the cost of efficiency due to redundant duplicate computations of identical terms. For this reason term graphs are often used as an intermediate language at a subsequent compilation stage to abstract syntax tree construction via parsing. The phrase "term graph rewriting" is often used when discussing graph rewriting methods for transforming expressions in formal languages. Considered from the point of view of graph grammars, term graphs are not regular graphs, but hypergraphs where an n-ary word will have a particular subgraph in first place, another in second place, and so on, a distinction that does not exist in the usual undirected graphs studied in graph theory. Term graphs are a prominent topic in programming language research since term graph rewriting rules can formally expressing a compiler's operational semantics.…

A term graph is a representation of an expression in a formal language as a generalized graph whose vertices are . Term graphs are a more powerful form of representation than expression trees because they can represent not only common subexpressions (i.e. they can take the structure of a directed acyclic graph) but also cyclic/recursive subexpressions (cyclic digraphs). Abstract syntax trees cannot represent shared subexpressions since each tree node can only have one parent; this simplicity comes at the cost of efficiency due to redundant duplicate computations of identical terms. For this reason term graphs are often used as an intermediate language at a subsequent compilation stage to abstract syntax tree construction via parsing. The phrase "term graph rewriting" is often used when discussing graph rewriting methods for transforming expressions in formal languages. Considered from the point of view of graph grammars, term graphs are not regular graphs, but hypergraphs where an n-ary word will have a particular subgraph in first place, another in second place, and so on, a distinction that does not exist in the usual undirected graphs studied in graph theory. Term graphs are a prominent topic in programming language research since term graph rewriting rules can formally expressing a compiler's operational semantics. Term graphs are also used as abstract machines capable of modelling chemical and biological computations as well as graphical calculi such as concurrency models. Term graphs can perform automated verification and logical programming since they are well-suited to representing quantified statements in first order logic. Symbolic programming software is another application for term graphs, which are capable of representing and performing computation with abstract algebraic structures such as groups, fields and rings. The TERMGRAPH conference focuses entirely on research into term graph rewriting and its applications. Term graphs are also used in type inference, where the graph structure aids in implementing type unification.

References

No reference rows published for this article.

Cite this article

MLA

"Term graph." encyclopegia.org, 2025, https://encyclopegia.org/wiki/term-graph. Accessed 24 November 2026.

Chicago

"Term graph." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/term-graph.

APA

encyclopegia.org. (2025). Term graph. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/term-graph

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

graph of a function

stub · references available

umbrella term

stub · references available

color term

stub · references available

Turán graph

stub · references available

graph property

stub · references available

solar term

stub · references available

Edin (Sumerian term)

stub · references available

Graph Modelling Language

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1268543950 · 0.5 · snapshot enwiki-001268543950

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.