What can be attributed to formal languages? Examples of using

What is a formal language and how does it differ from natural? How was it formed? What can be attributed to formal languages? And what is used to denote it?

Characterization of formal languages

formal languages ​​include
This is the name of a group of artificial languages ​​that are characterized by exact rules regarding the construction of expressions, as well as their understanding. Formal languages ​​include systems used for applied purposes. They are built in compliance with clear rules, provide a consistent, compact and accurate display of the relationships and properties of the studied subject area or simulated objects. The meaning and meaning of the signs used cannot change from some pragmatic features (context of use). This is possible due to the presence of rules of syntactic transformation and semantic interpretation in formal languages. Often they are built using mathematics as a base. Due to the fact that in it, over the entire period of development, various symbolic notations were used, applied to various concepts and objects. That's what formal languages ​​are for. They can significantly reduce data. Previously, natural languages ​​were used along with formal, but with the gradual complication of the subject and the need to make a rigorous logical analysis of mathematical judgments, it was decided to abandon the latter. This process stretched from the 17th to the 20th century. It is the last century that is considered the most fruitful in terms of the development of formal languages. Various special branches have been created. So, for computer science, programming languages ​​and logic algebras are of particular importance, not only from a theoretical, but also from a practical point of view.

Definition

formal languages
What can be attributed to formal languages, we have already briefly explained. But what about themselves? Formal languages ​​are given many different definitions. To list them all, it will take a lot of time, so let's get acquainted with the most popular:

  1. A simple list of words included in a given language is usually spoken about the final type of construction and about those that have a simple structure.
  2. Words generated by a certain formal grammar.
  3. A structure created by regular expressions.
  4. Words generated by the BNF construct.
  5. A structure recognized by a state machine.

Let's look at an example. Suppose we have the whole alphabet given by two numbers: 1 and 0. To display the letter “O” we use the combination 1010001. This is the use of a formal language. It is also possible to use an empty word (when the string has zero length and there is nothing in it) with a special designation in the form familiar to us. But a more detailed understanding of what a formal language is will help 4 examples, which will be given later. What is it for? So that the reader has an understanding of what formal languages ​​can be attributed to. But a little more about how they are created.

Constructing formal languages

what formal languages ​​are for
Each formal language is a construct that was once created by someone. They are usually built according to one scheme:

  1. To begin with, they choose an alphabet or some combination of certain characters, from which the expressions used in the language will be built. Formal languages ​​include any computer programming method.
  2. Describes the syntax, that is, the features and rules by which meaningful sentences will be built.
  3. According to certain rules, words and phrases are compiled. There is a rule: any sequence of letters should be able to be considered a word.

Formal languages ​​include any construction that has clear rules - this should be remembered. When building, there are some features. Thus, the concept of “symbol” is very multifunctional in terms of semantic load, therefore, for the most part, they use a term such as “letter”. But they can mean not only the usual notation for us, but also brackets, special characters and much more. This applies only to formal languages.

Example 1

Let's start with 1 and 0. In such cases, the concepts “term” and “formula” are also used. The first acts as an analogue of the name of the object and is used to denote something specific. First of all, they mean constants and object variables. Of these, in turn, more complex constructions are constructed, for which purpose the function used in some language is used. By a formula is meant a group of terms, the use of which in a particular programming language is possible. This "instruction" will be processed, and the person will receive the necessary result.

Example 2

where formal languages ​​are applied
Consider an example of logic in which there is inversion (¬), disjunction (∧), conjunction (∨) and implication (⇒), and a number of others. The following records can be used as images:

  1. A;
  2. A∧B ⇒ ¬A
  3. ¬ (∨¬)

Substitute the variables as characters A, B, C and you will get logical operations. Where are formal languages ​​of this type used? Such a mechanism has found widespread use in programming languages, mathematics, relations, logical and mathematical functions, or individual parts, which were described by the programmer himself.

Example 3

Let's look at a more complex logical formula:

¬ (∨¬) ⇔ ¬∧ = 1

That's why formal languages ​​are needed. Imagine what would happen if it was described in words? And now, based on the formula, we will draw conclusions. Meaningful expressions can be obtained in a formal language only when the predefined rules for the formation, change and “understanding” of formulas and terms from which they are composed are observed:

  1. Construction of terms and formulas;
  2. Study of the semantic aspect and interpretation;
  3. The sequence of some formulas and terms from others.

In each formal language, the totality of these rules should be well developed.

Example 4

Due to the presence in the syntax of the language, inference rules for terms and formulas, isomorphic model transformations can be performed. In this way, not only reflection (representation) of a certain set of knowledge that already exists, but also, possibly, new information will be carried out. Moreover, the transformation, although it will occur according to clear and strict rules, it is quite possible to automate. Similar technologies are used in expert systems, knowledge bases and decision support software products.

Conclusion

why formal languages ​​are needed
Formal languages ​​are widely used in science, especially in technology. During the conduct of scientific research or in the implementation of practical activities, they can interact with the natural, in view of the significant expressive abilities of the latter. Nevertheless, formal languages ​​make it possible to more accurately convey knowledge and conduct an objective exchange of information accumulated by mankind.


All Articles