Formal languages: examples. Signs of a formal language

The 21st century is a time when ownership of information is the most important competitive advantage in any field. However, it will not bring any benefit if it is not expressed in a language that is understandable to those to whom the translator is intended or not, who is able to convey its meaning to the addressee.

At present, about 2,000 peoples live on earth. Their distinguishing feature, first of all, is language.

Along with colloquial (natural) humanity has created many artificial languages. Each of them is designed to solve specific problems.

Such sign systems include formal languages, examples of which are presented below.

formal languages ​​examples

Definitions

First of all, we state what a language is. By this word it is customary to understand the sign system that is used to establish communications between people and cognition.

The basis of most both artificial and natural languages ​​is the alphabet.

It is a set of characters used to compose words and phrases.

The language is characterized by:

  • the set of characters used;
  • the rules for the compilation of “words”, “phrases” and “texts” from them;
  • a set of rules (syntactic, pragmatic and semantic) for the use of compiled constructions.

Characteristics of natural languages

As already mentioned, all languages ​​are conditionally divided into artificial and natural. There are many differences between them.

Spoken languages ​​are natural. Among their characteristics, among others are:

  • the ambiguity of most words;
  • the existence of synonyms and homonyms;
  • the presence of several names in the same subject;
  • the existence of exceptions to almost all rules.

All these characteristics are the main differences between natural sign systems and formal languages. Examples of the ambiguities of words and sentences are known to all. So the word “ether”, depending on the context, can mean both a substance and radio or television broadcasting.

In this case, the main functions of spoken languages ​​are:

  • communication
  • cognitive activity;
  • expression of emotions;
  • impact on the interlocutor (correspondent, if we are talking about correspondence).

formal language signs

Characteristics of Artificial Languages

Artificial languages ​​are created by people for special purposes or for specific groups of people.

One of the main characteristics of artificial languages ​​is the unambiguous certainty of their vocabulary, as well as the rules for giving them meaning and the formation of expressions.

Formal languages ​​and grammar

Language, regardless of whether it is natural and artificial, can exist only if there is a set of specific rules. At the same time, a consistent, compact and accurate mapping of the relationships and properties of the subject area under study should be ensured. If they are strictly formulated, they say that it is a formal language. Programming languages ​​are examples of such sign systems, although, strictly speaking, they are more likely to occupy a certain intermediate position (see below).

The scheme for constructing formal iconic systems is as follows:

  • the alphabet is selected (the set of source characters);
  • rules for constructing expressions (syntax) of the language are set.

formal programming languages

Scope of application

Formal languages ​​(examples: languages ​​of logic, programming, etc.) are used in the process of scientific research. They are better than natural ones allow you to represent knowledge and are a means of more objective and accurate exchange of information.

Formal languages ​​include all known systems of mathematical and chemical symbols, Morse code, musical notation, etc.

In addition, formal programming languages ​​are widely used. Their rapid development began in the mid-20th century, in connection with the advent of computer technology.

formal languages ​​and grammars

Formal Logic Language

At the heart of any programming language is mathematical. He, in turn, relies on a sign system of formal logic.

As a science, logic was created by Aristotle. He also developed the rules for transforming statements that preserve their true meaning, regardless of the content of concepts included in these statements.

Formal logic fights the “flaws” of natural languages, associated with the ambiguity of certain statements, etc. For this purpose, operations with thoughts are replaced by actions with signs of a formal language. This eliminates any uncertainty and allows you to accurately establish the truth of the statement.

formal logic language

Features of programming languages

As already mentioned, with some reservations, they can be classified as formal.

With the latter, they are united by many syntactic rules, and with natural some keywords and constructions.

To create a programming language, it is necessary to determine the set of valid characters and the correct language programs and the meaning of each correct program. If the first task can be dealt with by means of formalization, in the case of the latter these approaches do not work.

Many valid characters in programming languages ​​are characters that can be typed from the keyboard. They represent the first part of the ASCII encoding table.

Grammar

Programming languages, like any others, have a grammar. This term is understood as a description of the method of making proposals. Grammars are described in various ways. In the case of programming languages, they are rules that are defined by ordered pairs of chains of characters of two types: defining syntactic constructions and semantic restrictions. When setting grammars, they first formally set out the rules for constructing syntactic constructions, and then set semantic rules in one of the natural languages.

Rules are recorded in graphical form using special diagrams. Initially, this approach was used to create the Pascal language. However, then it became widely used in others.

Classification of programming languages

At the moment, there are several thousand of them, along with “dialects”. They are classified as procedural and declarative. In languages ​​of the first type, data transformation is specified by describing the sequence of actions performed on them, and the second, relations. There are other classifications. For example, programming languages ​​are divided into functional, procedural, object-oriented, and logical. If you approach the issue strictly, then no classification can be objective. Indeed, a significant part of programming languages ​​has the capabilities of formal systems of several types at once. Over time, the edges are likely to be erased even more.

formal languages ​​what

Now you can answer the question: “What formal languages ​​do you know?”. Scientists continue to improve them in order to make possible the solution of various practical and theoretical problems that are currently considered unsolvable.


All Articles