Translators from programming languages ​​examples. The concept and types of translators and compilers. Global computer network internet: basic concepts

Types of translators

  • Dialog. Provides use of a programming language in time-sharing mode ( English).
  • Syntactic-oriented (syntactic-driven). Receives as input a description of the syntax and semantics of the language and text in the described language, which is translated in accordance with the given description.
  • Single pass. Forms an object module in one sequential viewing of the source program.
  • Multipass. Forms an object module over several views of the source program.
  • Optimizing. Performs code optimization in the generated object module.
  • Test. A set of assembly language macros that allow you to set various debugging procedures in programs written in assembly language.
  • Back. For a program in machine code, it produces an equivalent program in any programming language (see: disassembler, decompiler).

Implementations

The purpose of translation is to convert text from one language to another, which is understandable to the recipient of the text. In the case of translator programs, the addressee is technical device(processor) or interpreter program.

The compilation process usually consists of several stages: lexical, syntactic and semantic analysis, intermediate code generation, optimization and generation of the resulting machine code. In addition, the program typically depends on services provided by the operating system and third-party libraries (for example, file I/O or graphical interface), and the machine code of the program must tie with these services. Linking with static libraries is done communications editor or linker(which may be a separate program or be part of a compiler), and with operating system and dynamic libraries, linking is performed at the start of program execution bootloader.

The advantage of the compiler: the program is compiled once and no additional transformations are required each time it is executed. Accordingly, a compiler is not required on the target machine for which the program is compiled. Disadvantage: A separate compilation step slows down writing and debugging and makes it difficult to run small, simple, or one-off programs.

If the source language is an assembly language (a low-level language close to machine language), then the compiler of such a language is called assembler.

Another method of implementation is when the program is executed using interpreter no broadcast at all. The interpreter programmatically models a machine whose fetch-execution cycle works with commands in languages high level, and not with machine commands. This software simulation creates a virtual machine that implements the language. This approach is called pure interpretation. Pure interpretation is usually used for languages ​​with a simple structure (for example, APL or Lisp). Command line interpreters process commands in scripts in UNIX or in batch files (.bat) in MS-DOS, also usually in pure interpretation mode.

The advantage of a pure interpreter: the absence of intermediate actions for translation simplifies the implementation of the interpreter and makes it more convenient to use, including in dialog mode. The disadvantage is that an interpreter must be present on the target machine where the program is to be executed. Also, as a rule, there is a more or less significant loss in speed. And the property of a pure interpreter, that errors in the interpreted program are detected only when an attempt is made to execute a command (or line) with an error, can be considered both a disadvantage and an advantage.

There are compromises between compilation and pure interpretation in the implementation of programming languages, when the interpreter, before executing the program, translates it into an intermediate language (for example, into bytecode or p-code), more convenient for interpretation (that is, we are talking about an interpreter with a built-in translator) . This method is called mixed implementation. An example of a mixed language implementation is Perl. This approach combines both the advantages of a compiler and interpreter (greater execution speed and ease of use) and disadvantages (additional resources are required to translate and store a program in an intermediate language; an interpreter must be provided to execute the program on the target machine). Also, as with the compiler, a mixed implementation requires that before executing source code did not contain errors (lexical, syntactic and semantic).

As computer resources increase and heterogeneous networks (including the Internet) connecting computers expand different types and architectures, stood out new look interpretation, in which the source (or intermediate) code is compiled into machine code directly at runtime, on the fly. Already compiled sections of code are cached so that when they are accessed again, they immediately receive control, without recompilation. This approach is called dynamic compilation.

The advantage of dynamic compilation is that the speed of program interpretation becomes comparable to the speed of program execution in conventional compiled languages, while the program itself is stored and distributed in a single form, independent of target platforms. The disadvantage is greater implementation complexity and greater resource requirements than in the case of simple compilers or pure interpreters.

This method works well for web applications. Accordingly, dynamic compilation has appeared and is supported to one degree or another in implementations of Java, .NET Framework, Perl, Python.

Mixing the concepts of translation and interpretation

Translation and interpretation are different processes: translation deals with the translation of programs from one language to another, and interpretation is responsible for the execution of programs. However, since the purpose of translation is usually to prepare the program for interpretation, these processes are usually considered together. For example, programming languages ​​are often characterized as "compiled" or "interpreted", depending on whether compilation or interpretation dominates the use of the language. Moreover, almost all low-level and third-generation programming languages, such as assembler, C or Modula-2, are compiled, and higher-level languages, such as Python or SQL, are interpreted.

On the other hand, there is an interpenetration of translation and interpretation processes: interpreters can be compiling (including dynamic compilation), and translators may require interpretation for metaprogramming constructs (for example, for macros in assembly language, conditional compilation in C, or templates in C++ ).

Moreover, the same programming language can be both translated and interpreted, and in both cases there must be common stages of analysis and recognition of constructs and directives of the source language. This applies to both software and hardware implementations - for example, x86 family processors, before executing machine language instructions, perform their decoding, highlighting in the opcodes the fields of operands (registers, memory addresses, immediate values), bit depth, etc., and in Pentium processors with the NetBurst architecture, the same machine code is further translated into a sequence of micro-operations before being stored in the internal cache.

Notes

  1. GOST 19781-83 // Computer Science. Terminology: Reference manual. Issue 1 / Reviewer Ph.D. tech. Sciences Yu. P. Selivanov. - M.: Standards Publishing House, 1989. - 168 p. - 55,000 copies. - ISBN 5-7050-0155-X
  2. Pershikov V. I., Savinkov V. M. Explanatory dictionary of computer science / Reviewers: Ph.D. physics and mathematics Sciences A. S. Markov and Dr. Phys.-Math. Sciences I. V. Pottosin. - M.: Finance and Statistics, 1991. - 543 p. - 50,000 copies. - ISBN 5-279-00367-0
  3. ST ISO 2382/7-77 // Computer technology. Terminology. Decree. op.
  4. Explanatory dictionary by computing systems= Dictionary of Computing / Ed. V. Illingworth et al.: Transl. from English A.K. Belotsky and others; Ed. E.K. Maslovsky. - M.: Mechanical Engineering, 1990. - 560 p. - 70,000 (additional) copies. - ISBN 5-217-00617-X (USSR), ISBN 0-19-853913-4 (UK)
  5. Organik E. Organization of the Intel 432 System = A Programmer’s View of the Intel 432 System / Transl. from English - M.: Mir, 1987. - P. 20, 31. - 446 p. - 59,000 copies.

    There are a number of other examples in which the architecture of the developed series of computers was based on or strongly depended on some model of program structure. Thus, the GE/Honeywell Multics series was based on a semantic model for executing programs written in the PL/1 language. In Burroughs ( English) B5500, B6700 ... B7800 was based on a runtime program model written in the extended ALGOL language. ...

    The i432 processor, like these earlier architectures, is also based on a semantic model of program structure. However, unlike its predecessors, the i432 is not based on a specific programming language model. Instead, the developers' main goal was to provide direct runtime support for both abstract data(that is, programming with abstract data types), and for domain-specific operating systems. …

    The Ada language supports object-based programming, which was the reason for choosing it as the main programming language for the i432.

  6. Robert W. Sebesta. 1.7. Implementation methods // Basic concepts of programming languages ​​= Concepts of Programming Languages ​​/ Transl. from English - 5th ed. - M.: Williams, 2001. - P. 45-52. - 672 s. - 5000 copies. - ISBN 5-8459-0192-8 (Russian), ISBN 0-201-75295-6 (English)

Literature

  • Kasyanov V. N., Pottosin I. V. Methods for constructing translators. - Novosibirsk: Science, 1986. - 344 p.

Wikimedia Foundation. 2010.

Synonyms:

See what “Translator” is in other dictionaries:

    Broadly speaking, a program that converts text written in one language into text in another language. A translator in the narrow sense is a program that converts: a program written in one (input) language into a program presented in another... ... Financial Dictionary

    - [English] translators Dictionary of foreign words of the Russian language

    Converter, broadcasting program; TV broadcaster, compiler Dictionary of Russian synonyms. translator noun, number of synonyms: 6 compiler (5) ... Dictionary of synonyms

    translator- Program or technical means broadcasting the program. Note The translator is usually assigned the functions of diagnosing errors, generating dictionaries of identifiers, issuing program texts for printing, etc. [GOST 19781 90]… … Technical Translator's Guide

    Modern encyclopedia

    In computer science (compiler), a computer program designed to automatically translate a description of an algorithm from one programming language to another, in particular to machine language... Big Encyclopedic Dictionary

    translator- translator; industry programming program; compiler A program for translating an algorithm record from one algorithmic language into another (in particular, into the language of a computer) ... Polytechnic terminological explanatory dictionary

    Translator- in computer science (compiler), a computer program designed to automatically translate a description of an algorithm from one programming language to another, in particular to machine language. Is part of the basic software Computer, one of... ... Illustrated Encyclopedic Dictionary

Programs, like people, require a translator or translator to translate from one language to another.

Basic Concepts

The program is a linguistic representation of the calculations: i → P → P(i). An interpreter is a program whose input is a program P and some input data x. It performs P on x: I(P, x) = P(x). The fact that there is a single translator capable of executing all possible programs (that can be represented in a formal system) is a very profound and significant discovery by Turing.

The processor is an interpreter of machine language programs. In general, it is too expensive to write interpreters for high-level languages, so they are translated into a form that is easier to interpret.

Some types of translators have very strange names:

  • An assembler translates assembly language programs into machine language.
  • The compiler translates from a high-level language to a lower-level language.

A translator is a program that takes as input a program in some language S and outputs a program in language T such that both have the same semantics: P → X → Q. That is, ∀x. P(x) = Q(x).

Translating an entire program into something interpreted is called compilation before execution, or AOT compilation. AOT compilers can be used sequentially, the last of which is often an assembler, for example:

Source code → Compiler (translator) → Assembly code → Assembler (translator) → Machine code → CPU (interpreter).

Online or dynamic compilation occurs when part of a program is translated while other previously compiled parts are executed. JIT translators remember what they've already done so they don't have to repeat the source code over and over again. They can even perform adaptive compilation and recompilation based on the behavior of the program's runtime environment.

Many languages ​​allow code to be executed at broadcast time and compiled new code during program execution.

Broadcast stages

The translation consists of the stages of analysis and synthesis:

Source code → Analyzer → Conceptual view → Generator (synthesizer) → Target code.

This is due to the following reasons:

  • Any other method is not suitable. Word-by-word translation simply doesn't work.
  • Good engineering solution: if you need to write translators for M source languages ​​and N target languages, you only need to write M + N simple programs(semi-compilers), rather than M × N complex (full compilers).

However, in practice, a conceptual representation is very rarely expressive and powerful enough to cover all conceivable source and target languages. Although some were able to get closer to this.

Real compilers go through many stages. When you create your own compiler, you don't have to repeat all the hard work that people have already done when creating views and generators. You can translate your language directly into JavaScript or C and use existing JavaScript engines and C compilers to do the rest. You can also use existing intermediate views and

Translator recording

A translator is a program or technical tool that uses three languages: source, target and base. They can be written in T-shape with source on the left, target on the right and base below.

There are three types of compilers:

  • A translator is a self-compiler if its source language matches the base language.
  • A compiler whose target language is equal to the base language is called self-resident.
  • A translator is a cross-compiler if its target and base languages ​​are different.

Why is this important?

Even if you never make a real compiler, it's good to know about the technology behind it, because the concepts used for it are used everywhere, for example in:

  • text formatting;
  • to databases;
  • advanced computer architectures;
  • generalized ;
  • graphical interfaces;
  • scripting languages;
  • controllers;
  • virtual machines;
  • machine translations.

Additionally, if you want to write preprocessors, assemblers, loaders, debuggers, or profilers, you must go through the same steps as when writing a compiler.

You can also learn how to write programs better, since creating a translator for a language means better understanding its intricacies and ambiguities. Studying general principles translation also allows you to become a good language designer. Does it really matter how cool a language is if it can't be implemented efficiently?

Comprehensive technology

Compiler technology covers many different areas of computer science:

  • formal theory of language: grammar, parsing, computability;
  • computer architecture: instruction sets, RISC or CISC, pipelining, cores, clock cycles, etc.;
  • programming language concepts: e.g. sequence control, conditional execution, iterations, recursions, functional decomposition, modularity, synchronization, metaprogramming, scope, constants, subtypes, templates, output type, prototypes, annotations, streams, monads, mailboxes, continuations, wildcards, regular expressions, transactional memory, inheritance, polymorphism, parameter modes, etc.;
  • abstract languages ​​and virtual machines;
  • algorithms and regular expressions, parsing algorithms, graphical algorithms, training;
  • programming languages: syntax, semantics (static and dynamic), support for paradigms (structural, OOP, functional, logical, stack, parallelism, metaprogramming);
  • software creation (compilers are usually large and complex): localization, caching, componentization, APIs, reuse, synchronization.

Compiler design

Some problems that arise when developing a real translator:

  • Problems with the source language. Is it easy to compile? Is there a preprocessor? How are types processed? Are there libraries?
  • Compiler pass grouping: single or multi-pass?
  • The degree of optimization desired. A fast and dirty broadcast of a program with little or no optimization may be normal. Excessive optimization will slow down the compiler, but best code during execution it may be worth it.
  • Required degree of error detection. Can the translator just stop at the first error? When should he stop? Should the compiler be trusted to correct errors?
  • Availability of tools. Unless the source language is very small, a scanner and parser generator are a must. There are also code generators, but they are not as common.
  • Type of target code to generate. You should choose from pure, augmented, or virtual machine code. Or simply write an input part that creates popular intermediate views such as LLVM, RTL, or JVM. Or translate from source to source code in C or JavaScript.
  • Target code format. You can select a portable memory image.
  • Retargeting. With multiple generators, it is good to have a common input part. For the same reason, it is better to have one generator for many input parts.

Compiler architecture: components

These are the main functional components of the translator that generates machine code (if the output program is a C program or a virtual machine, then not many steps will be required):

  • The input program (a stream of characters) enters a scanner (lexical analyzer), which converts it into a stream of tokens.
  • The parser (parser) builds an abstract syntax tree from them.
  • The semantic analyzer decomposes semantic information and checks the tree nodes for errors. As a result, a semantic graph is built - an abstract syntax tree with additional properties and established links.
  • The intermediate code generator builds a flow graph (tuples are grouped into main blocks).
  • The machine-independent code optimizer performs both local (within the base block) and global (across all blocks) optimization, mainly remaining within the framework of subroutines. Reduces redundant code and simplifies calculations. The result is a modified flow graph.
  • The target code generator chains the basic blocks into straightforward control transfer code, creating an assembly language object file with (possibly inefficient) virtual registers.
  • The machine-dependent linker optimizer allocates memory between registers and schedules instructions. Converts an assembler program into real assembler with good use conveyor processing.

In addition, error detection subsystems and a symbol table manager are used.

Lexical analysis (scanning)

The scanner converts a stream of source code characters into a stream of tokens, removing spaces, comments and expanding macros.

Scanners often run into problems with whether or not they respect case, indentation, line breaks, and nested comments.

Errors that may be encountered during scanning are called lexical errors and include:

  • characters missing from the alphabet;
  • exceeding the number of characters in a word or line;
  • not a private character or string literal;
  • end of file in comment.

Parsing (parsing)

The parser converts a sequence of tokens into an abstract syntax tree. Each tree node is stored as an object with named fields, many of which are themselves tree nodes. There are no cycles at this stage. When creating a parser, you need to pay attention to the complexity level of the grammar (LL or LR) and find out if there are any disambiguation rules. Some languages ​​actually require semantic analysis.

Errors encountered at this stage are called syntactic errors. For example:

  • k = 5 * (7 - y;
  • j = /5;
  • 56 = x * 4.

Semantic analysis

During execution, it is necessary to check validity rules and link parts of the syntax tree (resolving name references, inserting operations for implicit type casting, etc.) to form a semantic graph.

Obviously, the set of admissibility rules varies from language to language. If Java-like languages ​​are compiled, translators can find:

  • multiple declarations of a variable within its scope;
  • references to a variable before its declaration;
  • references to undeclared name;
  • violation of accessibility rules;
  • too many or insufficient number of arguments when calling a method;
  • type mismatch.

Generation

Intermediate code generation produces a flow graph composed of tuples grouped into basic blocks.

Code generation produces real machine code. In traditional compilers for RISC machines, the first stage is to create an assembler with infinite number virtual registers. For CISC machines this probably won't happen.

Since the text of a program written in a programming language is not understandable to a computer, it needs to be translated into machine language. Translating a program from a programming language into a machine code language is called broadcast(translation - translation), but it is performed special programsbroadcasters.

There are two types of translators: interpreters and compilers.

Interpreter is called a translator that performs statement-by-statement (instruction-by-command) translation and subsequent execution of the translated statement of the source program. Two disadvantages of the interpretation method:

1. the interpreting program must be in the computer memory during the entire process of executing the original program, that is, occupy a certain amount of memory;

2. the process of translating the same operator is repeated as many times as this command must be executed in the program.

Compiler is a program that converts (translates) a source program into a program (module) in machine language. After this, the program is written into the computer's memory and only then executed.

During compilation, the translation and execution processes are separated in time: first original program is completely translated into machine language (after which the presence of a translator in RAM is not needed), and then the translated program can be executed many times.

Any translator solves the following main tasks:

1. Analyzes the translated program and determines whether it contains syntax errors;

2. Generates an output program in a computer command language;

3. Allocates memory for the output program, i.e. Each variable, constant, arrays and other objects are allocated their own section of memory.

Thus, Compiler(English) compiler- compiler, collector) reads the entire program entirely, translates it and creates a complete version of the program in machine language, which is then executed.

Interpreter(English) interpreter- interpreter, interpreter) translates and executes the program line by line.

Once a program is compiled, neither the source program nor the compiler are needed anymore. At the same time, the program processed by the interpreter must again transfer into machine language each time the program is launched.

Each specific language is oriented either towards compilation or interpretation - depending on the purpose for which it was created. For example, Pascal usually used to solve rather complex problems in which program speed is important. That's why given language usually implemented using compiler. On the other side, BASIC was created as a language for novice programmers, for whom line-by-line execution of a program has undeniable advantages. Sometimes for one language there is and compiler, and interpreter. In this case, you can use an interpreter to develop and test the program, and then compile the debugged program to increase its execution speed.

Types of translators

  • Dialog. Provides use of a programming language in time-sharing mode ( English).
  • Syntactic-oriented (syntactic-driven). Receives as input a description of the syntax and semantics of the language and text in the described language, which is translated in accordance with the given description.
  • Single pass. Forms an object module in one sequential viewing of the source program.
  • Multipass. Forms an object module over several views of the source program.
  • Optimizing. Performs code optimization in the generated object module.
  • Test. A set of assembly language macros that allow you to set various debugging procedures in programs written in assembly language.
  • Back. For a program in machine code, it produces an equivalent program in any programming language (see: disassembler, decompiler).

Implementations

The purpose of translation is to convert text from one language to another, which is understandable to the recipient of the text. In the case of translator programs, the addressee is a technical device (processor) or interpreter program.

The compilation process usually consists of several stages: lexical, syntactic and semantic analysis, intermediate code generation, optimization and generation of the resulting machine code. In addition, the program typically depends on services provided by the operating system and third-party libraries (for example, file I/O or graphical interface), and the machine code of the program must tie with these services. Linking with static libraries is done communications editor or linker(which can be a separate program or be part of a compiler), and linking with the operating system and dynamic libraries is performed at the start of program execution bootloader.

The advantage of the compiler: the program is compiled once and no additional transformations are required each time it is executed. Accordingly, a compiler is not required on the target machine for which the program is compiled. Disadvantage: A separate compilation step slows down writing and debugging and makes it difficult to run small, simple, or one-off programs.

If the source language is an assembly language (a low-level language close to machine language), then the compiler of such a language is called assembler.

Another method of implementation is when the program is executed using interpreter no broadcast at all. The interpreter software models a machine whose fetch-execute cycle operates on instructions in high-level languages, rather than on machine instructions. This software simulation creates a virtual machine that implements the language. This approach is called pure interpretation. Pure interpretation is usually used for languages ​​with a simple structure (for example, APL or Lisp). Command line interpreters process commands in scripts in UNIX or in batch files (.bat) in MS-DOS, also usually in pure interpretation mode.

The advantage of a pure interpreter: the absence of intermediate actions for translation simplifies the implementation of the interpreter and makes it more convenient to use, including in dialog mode. The disadvantage is that an interpreter must be present on the target machine where the program is to be executed. Also, as a rule, there is a more or less significant loss in speed. And the property of a pure interpreter, that errors in the interpreted program are detected only when an attempt is made to execute a command (or line) with an error, can be considered both a disadvantage and an advantage.

There are compromises between compilation and pure interpretation in the implementation of programming languages, when the interpreter, before executing the program, translates it into an intermediate language (for example, into bytecode or p-code), more convenient for interpretation (that is, we are talking about an interpreter with a built-in translator) . This method is called mixed implementation. An example of a mixed language implementation is Perl. This approach combines both the advantages of a compiler and interpreter (greater execution speed and ease of use) and disadvantages (additional resources are required to translate and store a program in an intermediate language; an interpreter must be provided to execute the program on the target machine). Also, as in the case of a compiler, a mixed implementation requires that the source code be free of errors (lexical, syntactic and semantic) before execution.

With the increase in computer resources and the expansion of heterogeneous networks (including the Internet), connecting computers of different types and architectures, a new type of interpretation has emerged, in which the source (or intermediate) code is compiled into machine code directly at runtime, “on the fly.” Already compiled sections of code are cached so that when they are accessed again, they immediately receive control, without recompilation. This approach is called dynamic compilation.

The advantage of dynamic compilation is that the speed of program interpretation becomes comparable to the speed of program execution in conventional compiled languages, while the program itself is stored and distributed in a single form, independent of target platforms. The disadvantage is greater implementation complexity and greater resource requirements than in the case of simple compilers or pure interpreters.

This method works well for web applications. Accordingly, dynamic compilation has appeared and is supported to one degree or another in implementations of Java, .NET Framework, Perl, Python.

Mixing the concepts of translation and interpretation

Translation and interpretation are different processes: translation deals with the translation of programs from one language to another, and interpretation is responsible for the execution of programs. However, since the purpose of translation is usually to prepare the program for interpretation, these processes are usually considered together. For example, programming languages ​​are often characterized as "compiled" or "interpreted", depending on whether compilation or interpretation dominates the use of the language. Moreover, almost all low-level and third-generation programming languages, such as assembler, C or Modula-2, are compiled, and higher-level languages, such as Python or SQL, are interpreted.

On the other hand, there is an interpenetration of translation and interpretation processes: interpreters can be compiling (including dynamic compilation), and translators may require interpretation for metaprogramming constructs (for example, for macros in assembly language, conditional compilation in C, or templates in C++ ).

Moreover, the same programming language can be both translated and interpreted, and in both cases there must be common stages of analysis and recognition of constructs and directives of the source language. This applies to both software and hardware implementations - for example, x86 family processors, before executing machine language instructions, perform their decoding, highlighting operand fields (registers, memory addresses, immediate values), bit depth, etc. in opcodes, and in processors Pentium with NetBurst architecture, the same machine code is additionally translated into a sequence of micro-operations before being stored in the internal cache.

Notes

  1. GOST 19781-83 // Computer technology. Terminology: Reference manual. Issue 1 / Reviewer Ph.D. tech. Sciences Yu. P. Selivanov. - M.: Standards Publishing House, 1989. - 168 p. - 55,000 copies. - ISBN 5-7050-0155-X
  2. Pershikov V. I., Savinkov V. M. Explanatory dictionary of computer science / Reviewers: Ph.D. physics and mathematics Sciences A. S. Markov and Dr. Phys.-Math. Sciences I. V. Pottosin. - M.: Finance and Statistics, 1991. - 543 p. - 50,000 copies. - ISBN 5-279-00367-0
  3. ST ISO 2382/7-77 // Computer technology. Terminology. Decree. op.
  4. Explanatory Dictionary of Computing Systems = Dictionary of Computing / Ed. V. Illingworth et al.: Transl. from English A.K. Belotsky and others; Ed. E.K. Maslovsky. - M.: Mechanical Engineering, 1990. - 560 p. - 70,000 (additional) copies. - ISBN 5-217-00617-X (USSR), ISBN 0-19-853913-4 (UK)
  5. Organik E. Organization of the Intel 432 System = A Programmer’s View of the Intel 432 System / Transl. from English - M.: Mir, 1987. - P. 20, 31. - 446 p. - 59,000 copies.

    There are a number of other examples in which the architecture of the developed series of computers was based on or strongly depended on some model of program structure. Thus, the GE/Honeywell Multics series was based on a semantic model for executing programs written in the PL/1 language. In Burroughs ( English) B5500, B6700 ... B7800 was based on a runtime program model written in the extended ALGOL language. ...

    The i432 processor, like these earlier architectures, is also based on a semantic model of program structure. However, unlike its predecessors, the i432 is not based on a specific programming language model. Instead, the developers' main goal was to provide direct runtime support for both abstract data(that is, programming with abstract data types), and for domain-specific operating systems. …

    The Ada language supports object-based programming, which was the reason for choosing it as the main programming language for the i432.

  6. Robert W. Sebesta. 1.7. Implementation methods // Basic concepts of programming languages ​​= Concepts of Programming Languages ​​/ Transl. from English - 5th ed. - M.: Williams, 2001. - P. 45-52. - 672 s. - 5000 copies. - ISBN 5-8459-0192-8 (Russian), ISBN 0-201-75295-6 (English)

Literature

  • Kasyanov V. N., Pottosin I. V. Methods for constructing translators. - Novosibirsk: Science, 1986. - 344 p.

Wikimedia Foundation. 2010.

Synonyms:
  • Slang
  • Interpreter

See what “Translator” is in other dictionaries:

    Translator- broadly speaking, a program that converts text written in one language into text in another language. A translator in the narrow sense is a program that converts: a program written in one (input) language into a program presented in another... ... Financial Dictionary

    TRANSLATOR- [English] translators Dictionary of foreign words of the Russian language

    translator- converter, broadcasting program; TV broadcaster, compiler Dictionary of Russian synonyms. translator noun, number of synonyms: 6 compiler (5) ... Dictionary of synonyms

    translator- A program or technical means that broadcasts a program. Note The translator is usually assigned the functions of diagnosing errors, generating dictionaries of identifiers, issuing program texts for printing, etc. [GOST 19781 90]… … Technical Translator's Guide

    TRANSLATOR Modern encyclopedia

    TRANSLATOR- in computer science (compiler) a computer program designed to automatically translate a description of an algorithm from one programming language to another, in particular to machine language... Big Encyclopedic Dictionary

    translator- translator; industry programming program; compiler A program for translating an algorithm record from one algorithmic language to another (in particular, to a computer language) ... Polytechnic terminological explanatory dictionary

    Translator- in computer science (compiler), a computer program designed to automatically translate a description of an algorithm from one programming language to another, in particular to machine language. It is part of the basic computer software, one of... ... Illustrated Encyclopedic Dictionary

Translator - a service program that converts a source program provided in an input programming language into a working program provided in an object language.

Three main types of translators: assemblers, compilers and interpreters.

Assembler- a system utility program that converts symbolic structures into machine language commands. A specific feature of assemblers is that they carry out a verbatim translation of one symbolic instruction into one machine instruction.

Compiler is a service program that translates a program written in the source programming language into machine language. Just like an assembler, a compiler converts a program from one language to another (most often, into the language of a specific computer). At the same time, source language commands differ significantly in organization and power from machine language commands.

Interpreter- a program or device that carries out operator-by-operator translation and execution of the original program. Unlike a compiler, an interpreter does not produce a machine language program as output.

26. Data protection. Noise-resistant coding.

Noise-resistant coding is used to detect and correct errors in cellular communication systems. Its essence lies in the fact that some redundancy is introduced into the transmitted digital stream. Typically, error-correcting coding is divided into two parts: error detection and error correction. CRC (Cyclic Redundancy Check) is usually used to detect errors. It is implemented by calculating the checksum of a block of information and transmitting it along with useful information. Moreover, depending on the degree of importance and speed of information transmission, the checksum may contain more or fewer bits. The higher the importance of the information and the data transfer rate, the more control bits need to be transmitted. In addition to CRC, other types of encoding may be used in various standards.

27. Computer viruses. Protection.

Computer virus - a type of malicious software that can create copies of itself and embed itself in the code of other programs, system memory areas, boot sectors, and also distribute its copies through various communication channels in order to disrupt the operation of software and hardware systems, delete files, and disable placement structures data, blocking the work of users or rendering computer hardware systems unusable.

There are quite a lot of antivirus protection software available.. Modern antivirus programs consist of modules:

    Heuristic module – to identify unknown viruses

    Monitor is a program that is constantly located in the PC’s RAM

    Control device that initiates antivirus programs and updating the virus database and components

    Mail program (checks email)

    Scanner program – checks, detects and deletes a fixed set known viruses in memory, files and system areas of disks

    Firewall – protection against hacker attacks

The most effective and popular anti-virus programs include: Kaspersky Anti-Virus 7.0, AVAST, Norton AntiVirus and many others.