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
Translating Without Losing Meaning
Valid Semantic Encodings
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
- Semantic translation — 0.75
- Formal Model — 0.75
- Verbal Reasoning — 0.75
- Compiler — 0.74
- LR-Attributed Grammar — 0.74
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