What is a formal language and how does it differ from the natural one? How was it formed? What can be attributed to formal languages? And what is used to indicate it?
Characteristics of formal languages
This is the name of the group of artificial languages thatare characterized by precise rules regarding the construction of expressions, as well as their understanding. The formal languages include systems used for applied purposes. They are built in accordance with clear rules, provide a consistent, compact and accurate mapping of the relationships and properties of the studied domain or simulated objects. The meaning and meaning of the signs used can not change from some pragmatic features (context of use). This is possible due to the presence in the formal languages of the rules of syntactic transformation and semantic interpretation. Often they are constructed when used as a base of mathematics. Due to the fact that in it, throughout the development period, various symbolic symbols used to various concepts and objects were used. This is what formal languages are for. They allow you to significantly reduce the data. Previously, along with formal, natural languages were used, but with the gradual complication of the subject and the need to perform a rigorous logical analysis of mathematical judgments, it was decided to abandon the latter. This process stretched from the XVII to the XX century. It is the last century that is considered the most fruitful from the point of development of formal languages. Various special branches were created. For example, for computer science, programming languages and algebra of logic are of special importance, not only from a theoretical point of view, but also from a practical point of view.
Definition
As for formal languages, we are alreadybriefly explained. But what about them themselves? Formal languages are given many different definitions. To list them all, it will take a lot of time, so we'll get acquainted with the most popular:
- A simple list of words that are included in a given language - usually so speak of a finite type of construction and about those of them that have a simple structure.
- Words generated by a certain formal grammar.
- A structure created by regular expressions.
- Words generated by BNF-construction.
- The structure recognized by the finite state machine.
Let's look at an example.Suppose we have the entire alphabet given by two digits: 1 and 0. To display the letter "O" we use the combination 1010001. This is the application of the 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 we are familiar with. But more detailed understanding of what a formal language, will help 4 examples, which will be given further. What is it for? That the reader had an understanding that it is possible to attribute to formal languages. But a little more about how they are created.
The construction of formal languages
Every formal language is a construction that was created sometime and by someone. They are usually built according to one scheme:
- First, choose an alphabet or some kind ofa collection of certain symbols, from which the expressions used in the language will be built. To formal languages is any way of programming using a computer.
- Describes the syntax, that is, the features and rules, on which meaningful sentences will be built.
- According to certain rules, words and expressions are composed. There is a rule: any sequence of letters should be able to be considered a word.
To formal languages is any design,which has clear rules - this should be remembered. When constructing, there are some features. So, the concept of "symbol" is very multifunctional from the point of view of the semantic load, therefore in its mass the term "letter" is used. But under them can understand not only the usual notation for us, but also brackets, special signs and much more. This applies only to formal languages.
Example 1
Let's start with 1 and 0.In such cases, the terms "term" and "formula" are still used. The first acts as an analogue of the name of the object and is used to refer to something specific. First of all, they mean constants and objective variables. Of these, in turn, more complex constructions are built, for which the function used in some language is used. A formula is understood to mean 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
Consider the example of logic in which there is an inversion (¬), a disjunction (∧), a conjunction (∨) and an implication (⇒), and a number of others. As images, you can write such records:
- A;
- А∧В ⇒ ¬А
- ¬ (А∨¬С)
As symbols A, B, C substitute the variablesand you get logical operations. Where are formal languages of this type used? Wide use of such a mechanism found in programming languages, mathematics, relationships, logical and mathematical functions or individual parts that were described by the programmer.
Example 3
Let's look at a more complex logical formula:
¬ (А∨¬С) ⇔ ¬А∧С = 1
That's why we need formal languages.Imagine what would have happened if it was described in words? And now, based on the formula, we will deduce inferences. Meaningful expressions can be obtained in the formal language only when the pre-determined rules for the formation, modification and "understanding" of the formulas and terms from which they are made are observed:
- Construction of terms and formulas;
- Working out the semantic aspect and interpretation;
- The order of some formulas and terms from others.
In each formal language, a set of these rules must be well worked out.
Example 4
Due to the presence in the syntax of the language of the ruleO for terms and formulas, it is possible to perform isomorphic transformations of models. This will not only reflect (represent) a certain set of knowledge that already exists, but, perhaps, receive new information. Moreover, the transformation, although it will happen according to clear and strict rules, can be automated. Similar technologies are used in expert systems, knowledge bases and decision support software products.
Conclusion
Formal languages have found wide application inscience, especially in engineering. During the conduct of scientific research or in the implementation of practical activities, they can interact with natural, in view of the significant expressive abilities of the latter. Nevertheless, formal languages allow more accurate transfer of knowledge and conduct an objective exchange of information accumulated by mankind.