Complete vs. Semantic TranslationThe process of translation between programming languages is accomplished using one of the following strategies: complete translation and semantic translation. Complete translation is comprised of syntactic translation of source language sentences into target language sentences while preserving semantics. Most common complete translators for programming languages are compilers, assemblers and language migrators. Compilers translate a high level language into a lower level language. The target language is usually a machine language or an assembly language. Assemblers are a particular case of compilers, with a much simpler structure, used for translating assembly languages into machine language. The operation is almost exclusively limited to binary codification of the microprocessor mnemonic instructions. Language migrators are translators between high level languages. They are very similar to compilers and many of their techniques are borrowed, but they do present some particularities – mainly due to the different nature of the target language. Semantic translation consists of the reproducing of the original application behavior in a target environment, but without performing a syntactic translation. Although it is a smaller-scale translation than in the case of complete translation, semantic translation is recommended in some situations:
The disadvantages of semantic translation refer to:
Typical semantic translators are interpreters and emulators. Interpreters semantically translate high level programming languages such as SQL, BASIC, LOGO and others. Emulators simulate the execution environment of a different architecture than the one they run on, and allow the execution of machine languages that are different from the ones of the current architecture. There are many examples of emulators, such as:
|
|