Sunteți pe pagina 1din 3

Synthesis of the introduction to the compilers

Video 01: Introduction to the compilers.


There are two ways to implement the programming languages, which, although not the only ones,
are the most used methods. These are the compilers and the interpreters. It is worth mentioning
that the class will be about compilers, but we must mention a little about the interpreters to be in
context.

Interpret: This method for the implementation of the programming languages is based on the
simultaneous introduction of the code and the data, giving as a result an output. To this form, we
can also call it as on-line, since the execution of the source code gives direct output to the results
or outputs.

Compiler: Unlike the interpreter, in this type of implementation, first it is necessary to process the
source code, it happens to generate an executable, which, in a second moment, will need the data
to throw the results or outputs. This method is known as off-line, as the execution of the code is
pre-processed to create another program.

Now we will talk a little about the history of the compilers and because it was necessary their
creation and development.

Start talking about the machine with the name 704, which was built by IBM in the year of 1954, the
highlight of this is that it was the first computer that was marketed satisfactorily, but this had certain
drawbacks, being the main, the High cost that it had to produce software for this machine, so high
was its cost that it was even more expensive than the hardware of the computer itself.

To try to solve that problem, the developers began to devise new ways of writing code and that's
when John Backus created the interpreter known as Speedcodign, which had its advantages and
disadvantages. The most important advantage was how quickly new programs could be created, so
that the developers were more productive. However, it had more disadvantages, such as the
slowness of the programs that were running (which to date remains a fact that the interpreters are
slower than the compilers), and the large size that they occupied in the computer.

John Backus realized that the Speedcodign was not enough, so I improved the way in which the
programs were created, understanding that the computers made formulas, and that it was
necessary that these formulas were translated into the machine language of ones and zeroes, so I
believe FORTRAN I (Formula translated). This compiler was so working and used, that for 1958, 50%
of programs were written in this language.

Video 02: Structure of a compiler


Most of the compilers contain five processes or steps, which we will see below.

Lexical analysis: In this phase we will identify each of the elements by which our code is composed,
recognizing what kind of word it is. For compiler purposes, the words or elements of the code are
known as tokens, these can be variable names, arithmetic operators, numbers, whitespace,
semicolons, etc.

Parsing: This phase has the function of grouping the elements by means of the use of syntactical
trees, to give meaning to the sentences.

Semantic Analysis: The purpose of this phase is to find inconsistencies in the meanings or reaches
of the tokens in the sentences, this means that the semantic analysis tries to detect to which tokens
the sentences are directed in the code.

Optimization: The intent of this phase is to make our code save the most time, energy and space in
memory, to work in the most efficient way possible.

Code generation: This last phase will take part when all the code has been verified and is correct,
since it is in charge of the direct translation of the language that the compiler uses, to the language
machine or assembler.

Video 03: The cost and value of programming languages


Why are there so many programming languages?

There are so many because it is virtually impossible for a single language to cover all areas of
science where programming languages can be applied.

Why are new programming languages created?

For the simple reason that the world is evolving and created from different technologies that will
require a specific programming language, to new areas of scientific research that may also require
new languages.

What is defined as a good programming language?

Because there are many different areas of knowledge where programming languages can be
applied, it is impossible to define a single language as good, as it can vary even for the
programmer's own liking.

References
Lagunita Stanford Online. (2014). 01-01: Introduction [Video]. Retrieved from
https://lagunita.stanford.edu/courses/Engineering/Compilers/Fall2014/courseware/ed92b25157d
94fbe9874370673ca0a58/b7e48a8aa0954d6c949dbd1cf4a01770/

Lagunita Stanford Online. (2014). 01-02: Structure of a Compiler [Video]. Retrieved from
https://lagunita.stanford.edu/courses/Engineering/Compilers/Fall2014/courseware/ed92b25157d
94fbe9874370673ca0a58/2e3841013edf40feb9ba173c7c10225e/
Lagunita Sandford Online. (2014). 01-03: The Economy of Programming Languages [Video].
Retrieved from
https://lagunita.stanford.edu/courses/Engineering/Compilers/Fall2014/courseware/ed92b25157d
94fbe9874370673ca0a58/0be17041e32c4838b4663bd0ec7601e7/

S-ar putea să vă placă și