Basics of Compiler Design
- Добавил: Semka
- Дата: 16-01-2019, 12:43
- Комментариев: 0
Название: Basics of Compiler Design
Автор: Torben AEgidius Mogensen
Издательство: University of Copenhagen
Год: 2010
Формат: pdf
Страниц: 319
Размер: 1.1 mb.
Язык: English
In order to reduce the complexity of designing and building computers, nearly all of these are made to execute relatively simple commands (but do so very quickly). A program for a computer must be built by combining these very simple commands into a program in what is called machine language. Since this is a tedious and errorprone process most programming is, instead, done using a high-level programming language. This language can be very different from the machine language that the computer can execute, so some means of bridging the gap is required. This is where the compiler comes in.
A compiler translates (or compiles) a program written in a high-level programming language that is suitable for human programmers into the low-level machine language that is required by computers. During this process, the compiler will also attempt to spot and report obvious programmer mistakes.
Using a high-level language for programming has a large impact on how fast programs can be developed. The main reasons for this are:
Compared to machine language, the notation used by programming languages is closer to the way humans think about problems.
The compiler can spot some obvious programming mistakes.
Programs written in a high-level language tend to be shorter than equivalent programs written in machine language.
Another advantage of using a high-level level language is that the same program can be compiled to many different machine languages and, hence, be brought to run on many different machines.
On the other hand, programs that are written in a high-level language and automatically translated to machine language may run somewhat slower than programs that are hand-coded in machine language. Hence, some time-critical programs are still written partly in machine language. A good compiler will, however, be able to get very close to the speed of hand-written machine code when translating wellstructured programs
Внимание
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.