Numiton

NOTE: To use the advanced features of this site you need javascript turned on.

Home Knowledge Base Software Translation Complete vs. Semantic Translation

Complete vs. Semantic Translation

The 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:

  • Using the source language in an environment that allows interactive sentence translation;

  • The built sentences do not have a long life cycle, they have only momentary importance;

  • Each sentence is to be translated a reduced number of times, usually once;

  • The source language has a simple structure, it is described by a relatively simple grammar, and thus sentence translation is done easily and efficiently.

The disadvantages of semantic translation refer to:

  • performance – each time the behavior of a sentence is reproduced, a reprocessing takes place;

  • delayed error signaling – lacking the obligation to semantically translate all sentences in a batch induces the probability to signal errors at unexpected moments during execution.

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:

  • those for Apple Macintosh or Amiga for IBM PC architecture;

  • emulators for IBM PC architectures on IBM PC that allow parallel running of several operating systems on the same computer (usually referred to as virtualization).