Discuss these questions with a partner. Then tell your ideas. — КиберПедия 

Папиллярные узоры пальцев рук - маркер спортивных способностей: дерматоглифические признаки формируются на 3-5 месяце беременности, не изменяются в течение жизни...

Историки об Елизавете Петровне: Елизавета попала между двумя встречными культурными течениями, воспитывалась среди новых европейских веяний и преданий...

Discuss these questions with a partner. Then tell your ideas.

2017-12-21 294
Discuss these questions with a partner. Then tell your ideas. 0.00 из 5.00 0 оценок
Заказать работу

 

1. How can you explain this statement «high-level code is more portable»?

2. What does the term «level of the programming language» determine?

3. What are the differences between low-level and high-level languages?

4. What does the term «a programming language» mean?

5. What programming languages have you worked with?

6. What are the differences between them?


Unit 4.

 


Compiling Programs

1. Read the text, translate it and try to
understand what compiling programs are.

 

People communicate instructions to the computer in symbolic languages and the easier this communication can be made the wider the application of computers will be. Scientists are already working on Artificial Intelligence and the next generation of computers may be able to understand human languages. The translation of a high-level language into machine language is performed using one of two methods: compilation or interpretation. During compilation, a computer program called a compiler translates a program written in a high-level language entirely into machine language. The machine language version of the program can then run on the computer without the compiler.

In interpretation, a computer program called an interpreter translates the high-level program into machine language in a line-by-line manner, each line of the high-level program being translated into machine language and then run by the computer.

A compiler is a software program. A compiler analyzes a program developed in a particular computer language and then translates it into a form which is suitable for execution on a particular computer system.

The program that is to be compiled is first typed into a file on the computer system. Computer installations have various conventions that are used for naming files, but in general, the choice of the name is up to you.

The program that is entered into the file is known as the source program. Once the source program has been entered into a file, we can then proceed to have it compiled.

The compilation process is initiated by typing in a special command on the system. When this command is entered, the name of the file that contains the source program must also be specified.

In the first step of the compilation process, the compiler examines each program statement in the source program and checks it to ensure that it conforms to the syntax and semantics of the language. If any mistakes are discovered by the compiler during this phase, then they will be reported to the user and the compilation process will end right there. The errors will then have to be corrected in the source program, and the compilation process restarted. Typical errors reported during this phase of compilation might be due to an expression that has unbalanced parentheses (syntactic error) or due to the use of a variable which is not «defined» (semantic error).

When all of the syntactic and semantic errors have been removed from the program, the compiler will then proceed to take each statement of the program and translate it into a «lower» form. On most machines, this means that each statement will be translated by the compiler into the equivalent statement or statements in assembly language needed to perform the identical task.

After the program has been translated into an equivalent assembly language program, the next step in the compilation process is to translate the assembly language statements into actual machine instructions. This step may or may not involve the execution of a separate program known as an assembler.

The assembler takes each assembly language statement and converts it into a binary format known as object code, which is then written into another file on the system.

After the program has been translated into object code, it is then ready to be linked. The purpose of the linking phase is to get the program into a final form for execution on the computer.

The words to the text:

artificial – искусственный

entirely – полностью, всецело

particular – особый, особенный

suitable – подходящий

execution – выполнение, исполнение

to type – печатать

convention – условность

to contain – содержать

source program – исходная программа

to ensure – гарантировать, заверять

to conform – соответствовать

error – ошибка

due to – из-за

parentheses – круглые скобки

variable – переменная

to proceed – продолжать

to involve – вовлекать, включать

purpose – цель, намерение

 

2. Look through the text and find equivalents to
the following terms.

 

сообщают команды

тем шире будет применение компьютера

искусственный интеллект

способным понимать

переводит строку за строкой

компьютерные настройки

выбор имени

занесена в файл

продолжать компилировать

будут обнаружены ошибки

процесс компиляции перезапускается

были удалены из программы

оператор программы

эквивалентный оператор

3. Match the words on the left with the
correct definition on the right.

 

Source program the program that translates the assembly language statements into machine instructions.

 

A compiler a program error caused by a fault affecting the operating system, usually due to a hardware failure.

 

Assembler a mistake in a program due to a wrong word or punctuation symbol being used.

 

Syntax error the program that is entered into the file.

 

System error a program that converts the whole of a program code before the the program is used.

 

Answer the questions.

 

1. What methods can be used to translate a high-level language into machine language?

2. How can you explain the term «a line-by-line manner»?

3. What are the functions of a compiler?

4. How does the process of compilation start?

5. What are the steps in the compilation process?

6. What is known as object code?

 

 


 


Unit 5.

 



Поделиться с друзьями:

Опора деревянной одностоечной и способы укрепление угловых опор: Опоры ВЛ - конструкции, предназначен­ные для поддерживания проводов на необходимой высоте над землей, водой...

Общие условия выбора системы дренажа: Система дренажа выбирается в зависимости от характера защищаемого...

Особенности сооружения опор в сложных условиях: Сооружение ВЛ в районах с суровыми климатическими и тяжелыми геологическими условиями...

Эмиссия газов от очистных сооружений канализации: В последние годы внимание мирового сообщества сосредоточено на экологических проблемах...



© cyberpedia.su 2017-2024 - Не является автором материалов. Исключительное право сохранено за автором текста.
Если вы не хотите, чтобы данный материал был у нас на сайте, перейдите по ссылке: Нарушение авторских прав. Мы поможем в написании вашей работы!

0.008 с.