Skip to content

Semantics Encoding

Translate formal-language terms into another language and assess what the translation preserves under a specified semantic comparison.

Core Idea

An encoding between formal languages maps source-language terms to target-language terms. To use such a translation as a meaningful semantic encoding, a researcher specifies how the terms are interpreted and which relationship between source and target meanings or behaviors matters. A mapping by itself does not establish that relationship: a translation sending every source term to the same target term is a mapping, but may lose distinctions essential to the intended comparison.[1][2]

In a framework for comparing system-description languages, Rob van Glabbeek defines validity relative to a chosen semantic equivalence or preorder. An encoding that satisfies an explicitly selected criterion can support a comparison of expressive power under that criterion; the conclusion is conditional on the languages, interpretations and comparison used.[1]

How would you explain it like I'm…

Keep-the-Meaning Code

Imagine turning sentences from one secret code into another. You could turn every word into "blah" — that's still a translation, but you lost everything! A good translation has to keep the things that matter, and you have to say ahead of time what those things are.

Translating Without Losing Meaning

Computer scientists invent formal languages, which are exact languages for describing programs and systems. An encoding is a rule that turns each phrase in one language into a phrase in another. But just having a rule doesn't mean the translation is good: a rule that turned everything into the same phrase would lose all the differences. So researchers have to say what the phrases mean and what has to stay the same, like how a program behaves. Only then can they use encodings to compare which language can say more.

Valid Semantic Encodings

A semantics encoding is a translation that maps terms of one formal language (the source) to terms of another (the target), used to compare what they mean or how they behave. To make it meaningful, a researcher must specify how terms are interpreted and which relationship between source and target meanings or behaviors matters. The mapping alone doesn't establish that: a translation sending every source term to the same target term is still a mapping, but it may erase the very distinctions the comparison needs. In a framework for comparing languages that describe systems, Rob van Glabbeek defines an encoding's validity relative to a chosen semantic equivalence or preorder. An encoding that meets an explicitly chosen criterion can support claims about expressive power — but only under that criterion, for those languages and interpretations.

 

A semantics encoding is a translation between formal languages that is meant to preserve meaning in a specified sense. Formally, an encoding maps source-language terms to target-language terms. To treat it as a meaningful semantic encoding, a researcher must specify how terms are interpreted and which relationship between source and target meanings or behaviors is relevant. A mapping alone does not establish any such relationship: a translation sending every source term to the same target term is a perfectly good mapping, yet it collapses distinctions essential to the comparison. In Rob van Glabbeek's framework for comparing system-description languages, an encoding's validity is defined relative to a chosen semantic equivalence or preorder. An encoding satisfying an explicitly selected criterion can then support a claim about relative expressive power under that criterion. The conclusion remains conditional on the languages, their interpretations and the comparison relation chosen.

Structural Signature

  • Languages and translation: a source language, a target language and a map assigning target terms to the source terms in scope.
  • Interpretation: a way to associate terms with semantic values, observations or behaviors.
  • Comparison: a specified relation or test connecting source meanings and target meanings.
  • Claim and proof obligation: a stated property of the map, evaluated for the relevant terms and assumptions; a purported encoding can fail it.

The exact quality condition depends on the question. In process-calculus research, examples include operational correspondence, divergence reflection and full abstraction; definitions and variants differ, so none is an automatic requirement of every translation.[2]

What It Is Not

An encoding is not necessarily a compiler implementation, and a particular proof about abstract languages does not by itself verify a software compiler. Preservation and reflection are different directions of a claim: preserving a source distinction or relation in the target is not the same as reflecting a target relation back to the source. Their exact definitions depend on the selected observations and semantic relation.[2]

A satisfactory encoding is not an unrestricted assertion that two languages are equivalent in every respect. An expressiveness result is relative to the criteria used; proving that no qualifying encoding exists likewise depends on specifying which encodings and criteria are ruled out.[2]

Example

Consider a small source arithmetic language with integer constants and addition, and a target language with integer constants and a binary add operation. Define a translation that leaves each constant unchanged and maps a source sum to add of its translated operands. If both languages interpret these operations as integer addition, structural induction shows that every translated expression has the same integer value as its source. This hypothetical example illustrates one value-preservation claim; it does not prove correspondence for exceptions, execution steps or other features that the toy languages do not define.

Van Glabbeek studies a different and richer example involving synchronous and asynchronous π-calculus; the result is discussed under the paper's stated semantic framework rather than transferred to the toy arithmetic example.[1]

Scope and Limits

Specify source and target syntax, the class of terms, semantic domains, observation or equivalence and the direction of each condition. Depending on the framework, a target may perform auxiliary steps, so an equality of individual source and target steps should not be assumed. Encoding criteria can be too weak to exclude trivial mappings or too strong for the comparison being made.[2]

Neighborhood in Abstraction Space

Semantics Encoding sits in a sparse region of the domain-specific corpus (97th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Unclustered & Miscellaneous (3155 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14

References

[1] Rob van Glabbeek, “A Theory of Encodings and Expressiveness,” arXiv:1805.10415v1 (2018), https://arxiv.org/pdf/1805.10415. registry ↩a ↩b ↩c

[2] Kirstin Peters and Rob van Glabbeek, “Analysing and Comparing Encodability Criteria,” Electronic Proceedings in Theoretical Computer Science 190 (2015): 46–60, doi:10.4204/EPTCS.190.4, https://arxiv.org/pdf/1508.06711. registry ↩a ↩b ↩c ↩d ↩e