Interpret (data-processing)
See also: Interpreter
In Data-processing, a interprets (sometimes called, wrongly, “interpreter” by bad translation of English) is a tool having for task to analyze, translate and carry out a program written in a data-processing language. Such languages are known as interpreted languages.
The interpreter is able to read the source code of a Langage in the form of Script, usually a file text, and to carry out the Instruction S of them after a syntactic Analyze of the contents. Generally these textual languages are called Computer programming languages. This interpretation leads to an execution of action or a storage of contents ordered by textual syntax.
Interpretation rests on the dynamic execution of the program by another program (the interpreter), rather than on its conversion into another language (for example the machine language); it avoids the separation of the time of conversion and the execution time, which are simultaneous.
One differentiates a program known as Script, of a program known as compiled:
- a program script is carried out starting from the source file via an interpreter of script.
- a compiled program is carried out starting from a block in machine language resulting from the translation of the source file.
The cycle of an interpreter is the following:
- to read and analyze an instruction (or expression);
- if the instruction is syntactically correct, to carry out it (or to evaluate the expression);
- to pass to the following instruction.
Thus, contrary to the Compiler, the interpreter carries out the instructions of the program (or evaluates the expressions of them), progressively of their reading for interpretation. Because of this phase without preliminary translation, the execution of an interpreted program is generally slower than the same compiled program. The majority of the interpreters do not carry out any more the character string representing the program, but an internal format, such as a syntactic tree.
In practice, there exists a continuity between interpreters and compilers. Even in the compiled languages, there often remains an interpreted share (often the formats of impressions “FORMAT” of FORTRAN, “printf” of C…, remain interpreted). Reciprocally, the majority of the interpreters use intermediate internal representations (abstract syntactic trees, or even code byte) and treatments (analyzes lexical and syntactic) resembling those of the compilers. Lastly, certain implementations of certain languages (for example SBCL for Common Lisp) are interactive as an interpreter, but translate as soon as possible the text of an end of program into directly achievable computer code by the processor. The interpretative character or compilatoire is thus specific to a realization of a computer programming language, and not with the language itself.
The interest of the interpreted languages lies mainly in the facility of programming and the portability. The interpreted languages enormously facilitate the development of the programs because they avoid the compilation run, often long, and limit the possibilities of bugs. It is in general possible to carry out incomplete programs, which facilitates the fast development of applications or prototypes of applications. Thus, the language BASIC was the first language interpreted to make it possible the general public to reach the programming, while the first interpreted modern computer programming language is Lisp.
The portability makes it possible to write a single program, being able to be carried out on various platforms without changes, provided that there exists an interpreter specific to each one as of these material platforms.
A certain number of data-processing languages are today implemented by means of a virtual machine applicative. This technique is halfway between the interpreters as described here and the Compilateur S. It offers the portability of the interpreters with a good effectiveness. For example, of the bearings of Java, Lisp, Design, Ocaml, Perl (Parrot), Python, Ruby, Lua, C, etc are made via a virtual machine.
The abstract interpretation (invented by Patrick and Radhia Cousot) is a technique and a static model of analysis of programs which traverses, a little to the manner of an interpreter, the program analyzed by replacing the values by abstractions there. For example, the values of the integer variables are abstract by intervals of entireties, or relations algebraic between variables.
History
With the appearance of the language compiled Pascal and fast commercial compilers like Turbo Pascal , the interpreted languages knew starting from the medium of the Années 1980 a strong decline. Three elements changed gives it in the Années 1990:
-
with the need for automating certain complex tasks quickly, of the computer programming languages interpreted (in fact, semi - interpreted) high level like, inter alia, Tcl, Ruby, Perl or Python appeared profitable;
-
the power of the machines, which doubled every eighteen months on average (according to the Loi of Moore), returned the programs interpreted of the Années 1990 of a speed comparable with that of the compiled programs of the Années 1980;
-
it is much faster to make evolve/move an interpreted program. However the vague Internet required a very fast answer to the new market needs. Amazon.com, in its first version, was developed largely in Perl. Smalltalk allowed a very fast Prototypage of applications.
Uses of the interpreted languages
The interpreted languages find very many uses:
-
in the educational field, the interpreted languages make it possible to concentrate on the Algorithmes and the structures of data, and not on the characteristics of such or such language.
-
the scientific computations not requiring intensive calculation (iterations on very large matrices, for example) can be written with profit in an interpreted language. They make it possible to call precompiled powerful calculation algorithms. The systems of calculation symbolic system use also this possibility;
-
interpreters of Line of order (indicated by the name Shell in the terminology Unix). These interpreters are able to include/understand orders struck a keyboard or coming from an other source. They have a syntax specific to each operating system, and make it possible to manage the material resources of a machine (discs, main memory, inputs/outputs, etc) as well as the communication between the programs. Rexx is the process control language of the centralized computers of IBM, while the Bourne Shell, C-Shell, Korn Shell are the most current shells under Unix; as for the the MS-DOS, most rudimentary of the interpreters of line of order, it is specific to the operating systems of Microsoft. Computer programming languages like Perl or Rexx are often installed to have an environment more powerful and more convivial than the shells of origin. It is conceived that traditional compilation would present little interest for orders:
- of which each one is carried out on average once;
- or whose limitation of performance comes from questions of access to the files, and not of calculation;
-
the language SQL ( Standard Query Language ) is a standardized interpreted language which makes it possible to update or extract from the contained informations in databases;
-
the navigators Web receive symbolic instructions and carry out directly them. The current navigators all can interpret code HTTP (Hypertext Transfer Protocol) for the transfer instructions of one machine to the other, the code HTML (Hypertext Markup Langage) for descriptions of the Web pages, and the Javascript for more elaborate programming, making it possible to handle more or less complex variables, structures of control and to handle the various objects entering the composition of a Web page. These pages can be static (they are written once and for all) or generated dynamically by the waiter which produces code HTML at the time of the request. It can thus adapt the page according to the context of execution. The languages most usually used for the dynamic generation of Web page are Perl, and ASP;
-
of many programs includes a language in order to automate certain actions or to create new functionalities. One of the languages most used for that is Scheme, an alternative of Lisp. The language of description XML is as strongly used for the formatting of the data, as it is on the level of the man-machine Interface, on the level of the transfer of information or of their writing in the form of files. In this field, one also finds Perl, Python or Tcl;
-
the language PostScript, language allowing the description of vectorial graphs (property of the company Adobe), which is often implemented in the graphics printers, the tables traçantes and the Photocomposeuse S;
-
there exist extensions allowing the fast programming of graphical interfaces using interpreted languages. Most widespread is Tcl/Tk, but there exists also Python/Tk, Python/WxWidgets, Perl WxWidgets Python/Qt or Gambas;
-
in the industrial world, more and more of machines is controllable by an interpreted language: industrial robots, the machine tools (APT, ISO language (or blocks)), tracers of plan, often controlled in PostScript.
See too
- , example of interpreter.
- Ocaml, language implemented in a native compiler and an interpreter.
Simple: To interpret (computing)
| Random links: | Blazon To combine it | Jean-Jacques Origas | Tudual Huon | Barbara Ann Cochran | List counts de Bourcier de Villers | Modélisation_de_Web |