Binus Alam Sutera

Binus Alam Sutera

Tuesday, September 30, 2014

Chapter 2 Answers

Nama : Christian Gunawan
NIM : 1801384174


Post kali ini berisi tentang Assignment #2 dari chapter 2 Programming Language Concepts R Sebesta E- Book :

Review Questions #6 - 10 :
6. What hardware capability that first appeared in the IBM 704 computer strongly affected the evolution of programming languages? Explain why.

One of the greatest single advances in computing came with the introduction of the IBM 704 in 1954, in large measure because its capabilities prompted the development of Fortran.

The announcement of the IBM 704 system, with both indexing and floating-point instructions in hardware, heralded the end of the interpretive era, at least for scientific computation. The inclusion of floating-point hardware removed the hiding place for the cost of interpretation.

7. In what year was the Fortran design project begun?

Before the 704 system was announced in May 1954, plans were begun for Fortran. By November 1954, John Backus and his group at IBM had produced the report titled “The IBM Mathematical FORmula TRANslating System: FORTRAN” (IBM, 1954).

This document described the first version of Fortran, which we refer to as Fortran 0, prior to its implementation.


8. What was the primary application area of computers at the time Fortran was designed?

Computer's application at the time Fortran was designed (in general) was for scientific computations only.

Here was the detailed conditions when Fortran was designed :
(1) Computers had small memories and were slow and relatively unreliable;
(2) The primary use of computers was for scientific computations;
(3) There were no existing efficient and effective ways to program computers; and
(4) Because of the high cost of computers compared to the cost of programmers, speed of the generated object code was the primary goal of the first Fortran compilers.


9. What was the source of all of the control flow statements of Fortran I?

All of Fortran I’s control statements were based on 704 instructions. It is not clear whether the 704 designers dictated the control statement design of Fortran I or whether the designers of Fortran I suggested these instructions to the 704 designers.


10. What was the most significant feature added to Fortran I to get Fortran II?

The Fortran II compiler was distributed in the spring of 1958. It fixed many of the bugs in the Fortran I compilation system and added some significant features to the language, the most important being the independent compilation of subroutines.



Problem set #6 - 10 :
6. Make an educated guess as to the most common syntax error in LISP programs.

The most common syntax error in LISP programs is probably the Incorrect placement or Number of parentheses.


7. LISP began as a pure functional language but gradually acquired more and more imperative features. Why?

Because most programming has been done in the imperative style, we have many good imperative algorithms. For example, the Sieve of Eratosthenes is an efficient way to find the primes up to some maximum number.

If you look at the book on functional algorithms and data structures written by Chris Okasaki (an extension of his Ph.D. thesis), you'll see that coming up with efficient functional algorithms seems to be harder than coming up with imperative algorithms of the same "big Oh" complexity. Dr. Okasaki's work is also pretty recent.

So in order to build efficient code (e.g. all the '70s AI work that used LISP), different LISP implementations provided more and more imperative features. The Common Lisp standard is big - it combines the features of many of those LISP implementations and provides something like 1,500 functions for you in the standard.


8. Describe in detail the three most important reasons, in your opinion, why ALGOL 60 did not become a very widely used language.
The Algol 60 language and report included several mathematical symbols which are available on modern computers and operating systems, but, unfortunately, were not supported on most computing systems at the time,and resulting ALGOL 60 didn't become a very widely used language.


9. Why, in your opinion, did COBOL allow long identifiers when Fortran and ALGOL did not?

COBOL is more of a reporting language than Fortran. Since Fortran handles calculations much better, there is not a real need for long identifiers. As a reporting language, COBOL uses long identifiers in tagging the source to the reports it is writing. Also, COBOL is the closest language to a fully, self documenting language, that it gets, and long identifiers provides one more case for it.

10. Outline the major motivation of IBM in developing PL/I.

In early 1963 when the PL/I story begins, Business applications people began to use regression analysis to build management information systems, which required floating-point data and arrays.

It began to appear that computing installations would soon require two separate computers and technical staffs, supporting two very different programming languages.

No comments:

Post a Comment