Lecture
Existing programming languages are classified into four main groups: procedural, object-oriented, functional and logical. We give brief definitions of each approach.
Procedural programming is such programming when the program is separated from the data and consists of a sequence of commands processing the data. Data is usually stored as variables. The whole calculation process is reduced to changing their contents.
Declarative programming languages are the languages of declarations and building structures. These include functional and logical programming languages. In these languages, algorithmic actions are not performed explicitly, that is, the algorithm is not defined by the programmer, but is built by the program itself. In declarative languages, some structure or system is defined, that is, some properties of the created object are declared (declared). These languages are widely used in computer-aided design (CAD) systems, in the so-called CAD packages, in modeling, artificial intelligence systems.
Object-oriented programming - in these languages, variables and functions are grouped into so-called classes (templates). Due to this, a higher level of program structuring is achieved. Objects generated by classes call each other’s methods (functions or procedures) and thus change the state of properties (variables). From the formal mathematical side, the object-oriented way of writing programs is based on a procedural programming model, but on the substantive side, OOP is not based on a function, but on an object as an integral system that has a standard automatic inter-object interface.
Network languages are languages designed to organize the interaction of remote computers in an intensive interactive mode, and therefore they are built on the principles of interpretation, that is, line-by-line, interactive processing of lines of program code describing some script (script) of computer network interaction, therefore they are often called scripting languages , although scripting languages are not necessarily network, for example, packet command languages of various operating environments.
Machine-oriented languages are languages, the sets of operators and graphic tools of which essentially depend on the features of the computer (internal language, memory structure, etc.). Computer-oriented languages allow using all features and features of Computer-dependent languages:
Machine-oriented languages are divided into classes according to the degree of automatic programming.
As already mentioned in the introduction, a separate computer has its specific Machine Language (hereinafter referred to as ME ), it is prescribed to perform the indicated operations on the operands defined by them, therefore ME is a command one. However, some families of computers (for example, EC computers, IBM-370, etc.) have a single ME for computers of different power. The command of any of them provides information on the location of the operands and the type of operation being performed.
In the new computer models, there is a tendency to increase the internal languages by machine and hardware to implement more complex commands, approaching in their functional actions to the algorithmic programming language operators.
Let's continue the story about command languages. Symbolic Encoding Languages (hereinafter referred to as JSC ), as well as ME , are command languages. However, operation codes and addresses in machine commands, which are a sequence of binary (in the internal code) or octal (often used when writing programs) numbers, are replaced with symbols (identifiers) in the YASK , the writing form of which helps the programmer to remember the semantic content of the operation more easily. This provides a significant reduction in the number of errors in programming.
Using symbolic addresses is the first step to creating a YASK . Computer commands instead of the true (physical) addresses contain symbolic addresses. According to the results of the compiled program, the required number of cells for storing the initial intermediate and resulting values is determined. Address assignment, which is performed separately from composing a program in symbolic addresses, can be done by a less qualified programmer or a special program, which greatly facilitates the work of the programmer.
There are also languages that include all the capabilities of the YASK through the extended introduction of macros - they are called Autocodes .
In various programs, there are some fairly often used command sequences that correspond to specific procedures for converting information. The effective implementation of such procedures is ensured by their design in the form of special macros and the inclusion of the latter in a programming language accessible to the programmer. Macros are translated into machine commands in two ways - placement and generation . The production system contains "cores" - a series of commands that implement the required function, indicated by a macro command. Macros ensure the transmission of actual parameters, which are inserted into the program “core” in the process of translation, turning it into a real machine program.
In the system with generation there are special programs that analyze the macro, which determine which function must be performed and form the necessary sequence of commands that implement this function.
Both of these systems use translators with YASK and a set of macros, which are also autocode operators.
Developed auto codes were called Assembler s. Service programs, etc., as a rule, are compiled in languages such as Assembler . For more information on Assembly language, see below.
A language that is a means for replacing a sequence of characters describing the execution of the required actions of a computer to a more concise form is called Macros (means of replacement).
Basically, Macro is intended to shorten the recording of the source program. The software component that runs the macro is called a macro processor . The macro-processor and the source text arrive at the macro processor. The reaction of the macro processor to the challenge-issue of the output text.
Macros can work equally well with both programs and data.
Machine-independent languages are a means of describing algorithms for solving problems and information to be processed. They are convenient to use for a wide range of users and do not require them to know the features of the organization of the functioning of a computer and the sun.
Such languages are called high-level programming languages. Programs compiled in such languages are sequences of statements structured according to the rules for considering a language (tasks, segments, blocks, etc.). Operators of the language describe the actions that the system must perform after the program is translated into ME .
Thus, command sequences (procedures, subroutines), often used in machine programs, are represented in high-level languages by individual operators. The programmer had the opportunity not to describe in detail the computational process at the level of machine instructions, but to focus on the main features of the algorithm.
With the expansion of areas of application of computer technology, it became necessary to formalize the presentation of the formulation and solution of new classes of problems. It was necessary to create such programming languages, which, using the notation and terminology in this area, would allow to describe the required solution algorithms for the problems posed, they became problem-oriented languages . These languages, focused on solving certain problems, should provide the programmer with the means to briefly and clearly formulate the task and get the results in the required form.
There are a lot of problem languages, for example:
Fortran, Algol - languages created for solving mathematical problems;
Simula , Slang - for modeling;
Lisp, Snobol - for working with list structures.
These languages are discussed further.
Universal languages were created for a wide range of tasks: commercial, scientific, modeling, etc. The first universal language was developed by IBM, which became in the sequence of languages Pl / 1 . The second most powerful universal language is called Algol-68 . It allows you to work with characters, digits, numbers with fixed and floating point. PL / 1 has an advanced system of operators for managing formats, for working with fields of variable length, with data organized into complex structures, and for efficient use of communication channels. The language takes into account the interrupt capabilities included in many machines and has corresponding operators. The possibility of parallel execution of program sections is provided.
Programs in Pl / 1 are compiled using automatic procedures. The language uses many properties of FORTRAN, Algola, Cobol . However, it allows not only dynamic, but also controlled and statistical memory allocation.
The emergence of new technical capabilities has set the task for system programmers - to create software tools that ensure the operational interaction of a person with a computer they are called interactive languages .
These works were conducted in two directions. Special control languages were created to ensure operational impact on the passing of tasks, which were compiled in any earlier undeveloped (non-interactive) languages. Languages were also developed that, in addition to the control objectives, would provide a description of the algorithms for solving problems.
The need to ensure prompt user interaction required that copies of the original program be stored in the computer’s memory even after receiving the object program in machine codes. When making changes to the program using the dialogue language, the programming system using special tables establishes the relationship between the structures of the source and object programs. This allows you to make the required editorial changes in the object program.
One example of conversational languages is BASIC .
Basic uses notation similar to ordinary mathematical expressions. Many operators are simplified versions of Fortran statements. Therefore, this language allows you to solve a fairly wide range of tasks.
Nonprocedural languages make up a group of languages that describe the organization of data processed using fixed algorithms (table languages and report generators), and languages communicating with operating systems.
By allowing to clearly describe both the task and the actions needed to solve it, the decision tables provide an opportunity to visually determine which conditions must be fulfilled before proceeding to an action. One decision table describing a certain situation contains all possible flowcharts for solving algorithm implementations.
Tabular methods are easily mastered by specialists of any profession.
Programs compiled in a tabular language conveniently describe complex situations arising from system analysis.
продолжение следует...
Часть 1 Classification of programming languages
Comments
To leave a comment
Programming Languages and Methods / Translation Theory
Terms: Programming Languages and Methods / Translation Theory