Unit 4
Text Study: Programming Languages.
Additional
Text: SIMULA, SMALLTALK, AND EIFFEL.
Grammar: Revision of the Module IV.
Text Study
1. Repeat the words in
chorus:
To compile, to interpret, an acronym, features, consequently, to support, suitable, compiler, efficient, considerable, power, responsibility,
to revise, acceptable, errors, superficial, level,
syntactically, ambiguous.
2. While reading the text you
will come across a number of international words. Try to guess what Ukrainian
words they remind of you:
To transform,
algebraic, formulae, phrases, commercial, algorithmic, portable, peripheral, to manipulate,
specific, registers, a dialect, abstract, technique, natural, grammatical,
information.
3. Pay attention to some
grammatical points:
1) Computers
can deal with different kinds of problems if
they are given the right
instructions for what to do. 2) Instructions are first written in one of the
high-level languages, e.g. FORTRAN,
COBOL, ALCOL, PL/I, PASCAL, BASIC, or C., depending
on the type of problem to be solved.
3) A program written in one of these
languages is often called a source program. 4) This language is used for solving scientific and mathematical
problems. 5) C was designed to be a language
that would be suitable for writing
system's software, like the core parts of an operating system. 6) The code generated by the compiler had to be very efficient if the language was to be used in this
way. 7) Consequently, in some respects the language is simpler than other Algol family languages that have retained the relatively complex nested program structures. 8) Programming
languages have grammatical rules that need
to be learnt, just as natural languages do.
II. Reading
Read the text and be ready to
find in the text the answers to the following questions:
·
What programming
languages do you know?
·
Why cannot we make jokes
in computer languages ?
Programming Languages
Computers can deal
with different kinds of problems if they are given the right instructions for
what to do. Instructions are first written in one of the high-level languages,
e.g. FORTRAN, COBOL, ALCOL, PL/I, PASCAL, BASIC, or C., depending on the type
of problem to be solved. A program written in one of these languages
is often called a source program, and it cannot be directly processed by
the computer until it has been compiled, which means interpreted into machine
code. Usually a single instruction written in a high-level
language, when transformed into machine code, results in several instructions.
Here is a brief description of some of the many high-level languages:
FORTRAN acronym for
FORmula TRANslation. This language is used for solving scientific and
mathematical problems. It consists of algebraic formulae and English
phrases. It was first introduced in the
COBOL acronym for Common
Business-Oriented Language. This language is used for commercial purposes.
COBOL deals with problems that do not involve a lot of mathematical
calculations. It was first introduced in 1959.
ALGOL acronym for
Algorithmic Language. Originally called IAL which means
International Algebraic Language. It is used for mathematical and
scientific purposes. ALGOL was first introduced in
PL/I
BASIC acronym for
Beginner’s All-purpose Symbolic Instruction Code. Developed
in 1965 at
C developed in the
1970s to support the UNIX operating system. C is a highly portable
general-purpose language. C was designed to be a language that would be suitable
for writing system's software, like the core parts of an operating system. The
code generated by the compiler had to be very efficient if the language was to
be used in this way. Anything a compiler would have difficulties with was
dropped. Consequently, in some respects the language is simpler than other
Algol family languages that have retained the relatively complex nested program
structures. If C was to be used for writing things like "device driver
code" (the code that actually interacts with the peripheral controllers),
then it had to allow the programmer get down the hardware level and manipulate
bits in specific registers and in particular memory addresses. This gives the
programmer considerable power, and lots of responsibility.
C++ started as a
dialect of C around about 1980, it has been revised twice since then. But they
are still very similar languages (in fact, a correct C program should be
acceptable to a C++ compiler). The C++ language aimed to achieve three things:
to be a better C; to support "abstract data types"; to permit the use
of a programming technique known as "object oriented programming"
(OOP). C++ was designed to permit more
compile time checking and also to offer alternatives to various features of C
that were known to be common sources of programming errors.
Other such
languages are APL (developed in
1962), PASCAL (named after Blaise
Pascal and developed in 1971), and LISP
and PROLOG, both of which are used
for work in artificial intelligence. LOGO
is a development of LISP which has been used to develop computer based training
packages.
At a superficial
level, programming languages and natural languages are similar. Programming
languages have grammatical rules that need to be learnt, just as natural
languages do. At the same level, computers can ‘’understand’’ and ‘’communicate
with’’ humans through programming languages: superficial interaction is
possible. However, programming languages are data-free and therefore contain no
information in themselves. The information is
contained in the data which is processed, but is independent of the language
which is used to write the commands to proceed it. The
sole purpose of a programming language is to give instructions to a computer,
which - providing they are syntactically correct - will be executed. A
syntactically correct statement in a programming language has only one
interpretation. By definition, it cannot be ambiguous. You cannot make jokes in
computer languages.
Vocabulary Notes
a
source program – вхідна, початкова програма
a purpose – мета, ціль; the
sole purpose – єдина мета
to support [sq'pLt] – підтримувати,
допомагати
a compiler – компілятор, програма-компілятор; compile time – час компіляції, час роботи компілятора; to compile – вибирати інформацію,
збирати матеріал, компілювати програму
to retain – тримати, акумулювати, тримати в пам’яті
а peripheral controller – периферійний контролер
considerable – значний, важливий
to revise – перевіряти, виправляти
acceptable [qk'septqbl]– допустимий
superficial ["sju:pq'fIS(q)l]– зовнішній, поверхневий
interaction – взаємодія,
взаємозв’язок
syntactically [sIn'txktIklI]– синтаксично
ambiguous [xm'bIgjuqs] – двозначний, сумнівний
to make jokes – шуткувати
to deal with – мати справу з
to depend on – залежити від
a source – джерело
to process ['preuses] – обробляти
brief [brJf] – короткий
a description – опис
to introduce – вводити, представляти
consequently ['kOnsIkwqntlI] – отже, отож
nested structure ['strAktSq] – гніздова (вкладена
структура)
Comprehension
1.
Tell what sentences are true and what are false.
1) Computers can deal
with different kinds of problems even if they are not given the right
instructions for what to do. 2) A program written in one of high-level languages
is often called a source program, and it cannot be directly processed by the
computer until it has been compiled. 3) A single instruction written in a
high-level language, when transformed into machine code, results in one
instruction. 4) FORTRAN is used for solving scientific and language problems. 5)
Common Business-Oriented Language is used for commercial purposes and it does
not involve a lot of mathematical calculations. 6) C is a highly portable
general-purpose language and it was designed to be a language that would be suitable
for writing system's software. 7) Programming languages and natural languages are different.
8) You cannot make jokes in computer languages.
2. Choose the right answer:
1) Instructions are first written
in one of the … , depending on the type of problem to
be solved.
a) high-level languages;
b) low-level languages;
c) mid-level languages.
2) FORTRAN was first
introduced in the
a) in the
b) in the
c) in the
3) COBOL deals with problems that … a lot of mathematical calculations.
a) involve;
b) do not involve;
c) does not involve.
4) Programming languages are …
and therefore contain no information in themselves.
a) free;
b) data-free;
c) busy.
5) A syntactically correct
statement in a programming language has only one … .
a) way;
b) meaning;
c) interpretation.
6) You … make jokes in computer
languages.
a) cannot;
b) can;
c) should.
3. Complete the sentences:
1) A source program is … . 2) FORTRAN consists of … . 3) COBOL is used for … .
4) ALGOL was first introduced in … . 5) PL/I Programming language is used for … . 6) BASIC used by students … .
7) C developed in the 1970s to (why?)…
. 8) The
C++ language aimed to (what?) … . 9) Other such languages are APL, PASCAL, LISP and
PROLOG are used (for what? )… . 10) LOGO has been used
to (why?) … . 11)
Programming languages are data-free and therefore contain … .
12) The information is contained in … . 13) The sole purpose of a programming language is … .
4.
Answer the questions:
1) What can computers
deal with? 2) What are instructions first written in? 3) What programming
languages are there? 4) What do they depend on? 5) What is a source program? 6)
What does FORTRAN consist of? 7) What is COBOL used for? 8) What is ALGOL used
for? 9) What is PL/I Programming language used for? 10)
What is BASIC? 11) Why did C develop?
12) What did C++ language aim? 13) Do programming languages have grammatical rules that need to be
learnt, just as natural languages do? Why? 14) What is the sole purpose of a
programming language?
5. Find as quickly
as possible and read out the sentences containing the following important
information:
*6.
Try to tell the gist of the text.
Word Study
1. Give Ukrainian equivalents of the
following.
To deal with
different kinds of problems, the right
instructions, the high-level languages, problem to be solved, a brief
description, scientific and mathematical problems, commercial purposes, to be
first introduced, to combine features, scientific applications, a general-purpose
language, to
be designed, to be suitable for smth, to retain the nested program structures, similar languages, to achieve three things, programming errors, artificial
intelligence, a superficial level, to be data-free, to contain no information, the sole purpose of a programming language, to
be executed, a syntactically correct statement, not to be ambiguous, to make
jokes in computer languages.
2. Give English equivalents of
the following.
Жартувати
в комп’ютерній мові, правильні команди, проблеми, які слід розв’язати, мати
справу з завданнями різного роду, мови високого рівня, єдина мета мови
програмування, не бути двозначним, бути виконаним, синтаксично правильне
речення, короткий опис, комерційні цілі, наукові та математичні завдання,
наукові застосуванні, поєднувати риси, бути представленим уперше, бути
створеним, бути придатним для чогось, універсальна мова програмування,
підтримувати гніздову структуру програми, досягати трьох речей, схожі мови,
програмні помилки, поверхневий рівень, не вміщувати жодної інформації, штучний
інтелект, бути без даних.
3. Match the words in A with
their synonyms in B:
А purpose В to hold
ambiguous aim
superficial worthy
to revise to pile
up
to compile to check
to retain surface
considerable doubtful
4. Fill in the gaps
with the words from Vocabulary Notes in the appropriate form.
general-purpose / high-level / to aim /
compiler / to support / source / to depend
/ to deal with / applications / purpose / data-free / superficial
1) A computers …
different kinds of problems. 2) Instructions … on the type of problem to be
solved. 3) A program written in one of the … languages is often called a …
program. 4) COBOL is used for commercial … . 5) Programming
language I is used for data processing as well as scientific …
. 6) C is a highly portable … language. 7) The code generated by the …
had to be very efficient. 8) The C++ language … to be better than C, … "abstract data types", to permit the use of a
programming technique. 9) At a … level, programming languages and natural
languages are similar. 10) Programming languages are … and therefore contain no
information in themselves.
5. Translate sentences into English using
words and word combinations from the Vocabulary Notes.
1) Якщо комп’ютеру дати
правильну команду, то він справиться з будь-яким завданням. 2) Відомо, що
команди мусять бути написані в одній з мов високого рівня.
3) Мова залежить від завдання, яке потрібно вирішити. 4) Одні мови
використовуються для вирішення наукових чи математичних завдань, а інші – з
комерційними цілями. 5) Програмна мова №
1, наприклад, використовується, як для обробки даних, так і для наукових цілей.
6) Поверхнево мови програмування і звичайні мови є подібними, оскільки всі вони
мають граматичні правила, які слід знати. 7) Але різниця у тому, що мови
програмування не містять у собі жодної інформації, а вся інформація знаходиться
у даних. 8) Єдиною метою мови програмування є подати правильні команди
комп’ютеру.
Grammar in Use
Revision of the Module IV
1. Fill in the gaps in
the following sentences using the appropriate form of the verb in brackets.
1) The part of the
processor which controls data transfers between the various input and output devices ...... (call) the control
unit. 2) The address bus ...... (use)
to send address details between the memory and the address register. 3) An
operating system ...... (store)
on disk. 4) Instructions written in a high-level language
...... (transform) into machine code. 5) When a
document arrives in the mail room, the envelope ......
(open) by a machine. 6) Instructions and data …… (store) in main memory of the computer. 7) Arithmetic
operations like addition and multiplication (carry out) by electronic circuits. 8) The part of the
processor which controls data transfers between the various input and output
devices ...... (call) the control unit. 9) The address bus ...... (use) to send address details
between the memory and the address register. 10) An operating system ......
(store) on disk. 11) Instructions written in a high-level language ...... (transform) into
machine code. 12) When a document arrives in the mail room, the envelope ...... (open) by
a machine.
2. Choose the right form of the
verb from the brackets. Mind the rule of the sequence of tenses.
1) We knew that
many people today … an opportunity to use computers. (to
have) 2) He said that there … no doubt that computers can solve problems very
quickly. (to be) 3) Everybody knows that instructions
… the operation of a computer. (to direct) 4) We
understood that computers already … with them both economic and social changes.
(to bring) 5) The teacher stressed that computing …
not only arithmetics, but also computer literacy. (to
embrace) 6) It is well known that computers … laboratory tests. (to prepare) 7) We knew that those persons … computer
literate and … of buying a new computer. (to be, to be
thinking) 8) they stressed that it … years to produce a high-speed computer
performing a lot of functions. (to take)
3. Make the following
interrogative and negative. Translate the following sentences.
1) As with any computer, errors can occur and
the information may be misused. 2) If you are doing work that cannot be
replaced or requires a high level of security, you should take steps to ensure
that your programs are protected from other using, modifying or even deleting
them. 3) The matrix printer can also be used to do simple drawings. 4) You may
want your own files kept separate from co-workers. 5) In an office, you can
separate files by putting them in a different filing cabinets: in effect
creating different directories of information. 6) Any one directory can contain
any reasonable number of files, and it may also contain other directories
(referred to as subdirectories). 7) You should judge each service according to
whether it is better or worse overall than the service you are currently using.
8) A typical hard disk is able to store much more data than a floppy disk. 9)
The hardware you purchase is able to use (or run) one or more different operating
systems. 10) You can purchase a computer
package, which includes the hardware, the operating system, and possibly one or
more applications.
Additional Text
(for
individual work)
Read
and translate the text.
SIMULA, SMALLTALK, AND EIFFEL
These are the principal specialized "Object Oriented"
languages. Simula was developed in the mid-1960s as a language for simulations (simulations
of anything you wanted: modelling aircraft movements at an airport, modelling
the spread of a disease in a population of individuals, modelling the activities
in an automated car wash. Simula was based on Algol-60 but added a variety of
constructs that were needed for simulation work. Essentially, it allowed the
programmer to create in the computer a set of "objects" (each of which
owned some resources and had specified behaviours) that modelled things in the
real world. Once the objects had been created, the Simula run-time system could
mimic the passage of time and could allow the programmer to track interactions
among the objects.
The Smalltalk language was developed by the very innovative research
group at Xerox's Palo Alto Research Centre (the same group as invented the
prototype for the "Macintosh/Windows" OS and interface). Smalltalk
offers a different way of thinking about programming problems. Usually, each
problem is treated as if it were totally new. The problem gets analyzed, broken
down into subtasks, and then new code is written to handle each of these
subtasks. Smalltalk encourages an alternative view; instead of writing new special
purpose code, try to find a way of building up a solution to a problem by combining
reusable components. The reusable components are Smalltalk objects. A Smalltalk
system provides hundreds of different kinds (classes) of "off the shelf " reusable components. Actually, Smalltalk is an
interpretive system (a bit like Lisp) and the language is not strictly in the
Algol family.
In some respects, Eiffel is the best programming language currently
available. It takes advantage of the experience gained with earlier languages
like Simula, Pascal, Smalltalk,
1. Divide the text into the
logical parts and give a title to each one.
2. Put questions to the text.
3. Discuss it with your groupmates