Semantics encoding: Difference between revisions

Content deleted Content added
m Preservation of distribution: Repairing link to disambiguation page - You can help!
no need to bracket "translation"; edit lede; wikify
Line 1:
A '''semantics encoding''' is a translation between [[formal language]]s. For programmers, the most familiar form of encoding is the compilation of a programming language into machine code or byte-code. Conversion between document formats are also forms of encoding. Compilation of [[TeX]] or [[LaTeX]] documents to [[PostScript]] are also commonly encountered encoding processes. Some high-level preprocessors such as [[Objective Caml]]'s [[Camlp4]] or [[Apple Computer]]'s [[WorldScript]] also involve encoding of a programming language into another.
A '''semantics encoding''' is a "translation" between [[formal language]]s.
 
Formally, an encoding of a language A into language B is a mapping of all terms of A into B. If there is a ''satisfactory'' encoding of A into B, B is considered ''at least as powerful'' (or ''at least as expressive'') as A.
For programmers, the most familiar form of encoding is the compilation of a programming language into machine code or byte-code. Conversion between document formats are also forms of encoding. Compilation of [[TeX]] or [[LaTeX]] documents to [[PostScript]] are also commonly encountered encoding processes. Some high-level preprocessors such as [[Objective Caml]]'s [[Camlp4]] or [[Apple Computer]]'s [[WorldScript]] also involve encoding of a programming language into another.
 
== DefinitionProperties ==
 
ThisAn informal notion of translation is not sufficient to help determine expressivity of languages, as it permits trivial encodings such as mapping all elements of A to the same element of B. Therefore, it is necessary to determine the definition of a "good enough" encoding. This notion varies with the application.
Formally, an encoding of a language A into language B is a mapping of all terms of A into B.
 
If there is a 'satisfactory' encoding of A into B, B is considered 'at least as powerful' (or 'at least as expressive') as A.
 
== Properties of encodings ==
 
This informal notion of translation is not sufficient to help determine expressivity of languages, as it permits trivial encodings such as mapping all elements of A to the same element of B. Therefore, it is necessary to determine the definition of a "good enough" encoding. This notion varies with the application.
 
Commonly, an encoding <math>[\cdot]: A \longrightarrow B</math> is expected to preserve a number of properties.