Sunday, March 24, 2013

Answers of Concepts of Programming Languages 10th - Chapter 2


Martin - 1601213690

02 PBT


Review Questions

1. In what year was Plankalkul designed? In what year was that design published?
    * Plankalkul was designed by Konrad Zuse between 1942 & 1945. He first published a paper on it in 1948. More information on the language was published in 1972.

2. What two common data structures were included in Plankalkul?
    * Arrays and records

3. How were the pseudo codes of the early 1950s implemented?
    * The pseudo codes were implemented by a pure interpreter.

4. Speedcoding was invented to overcome two significant shortcomings of the computer hardware of the early 1950s. What were they?
    * Numerical and required floating-point arithmetic operations and indexing of some sort to allow the convenient use of arrays.

5. Why was the slowness of interpretation of programs acceptable in the early 1950s?
    * Because the lack of floating-point hardware in the available computers.

6. What hardware capability that first appeared in the IBM 704 computer strongly affected the evolution of programming languages? Explain why.
    * Doth indexing and floating-point instructions in hardware

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

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

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

10. What was the most significant feature added to Fortran I to get Fortran II?
    * The independent compilation of subroutines.


11. What control flow statements were added to Fortran IV to get Fortran 77?
    * Logical loop control statements.

12. Which version of Fortran was the first to have any sort of dynamic variables?
    * Fortran 99

13. Which version of Fortran was the first to have character string handling?
    * Fortran 77

14. Why were linguists interested in artificial intelligence in the late 1950s?
    * Linguists were concerned with natural language processing.

15. Where was LISP developed? By whom?
    * LISP was developed at MIT by John McCarthy

16. In what way are Scheme and Common LISP opposites of each other?
    * Scheme lacks of portability, but common LISP doesn't.

17. What dialect of LISP is used for introductory programming courses at some universities?
    * Scheme

18. What two professional organizations together designed ALGOL 60?
    * ACM and GAMM

19. In what version of ALGOL did block structure appear?
    * ALGOL 60

20. What missing language element of ALGOL 60 damaged its chances for widespread use?
    * The lack of input and output statements.


21. What language was designed to describe the syntax of ALGOL 60?
    * BNF

22. On what language was COBOL based?
    * FLOW-MATIC

23. In what year did the COBOL design process begin?
    * 1959



Problem Set

1. What features of Plankalkul do you think would have had the greatest influence of Fortran 0 if the Fortran designers had been familiar with Plankalkul?
    * The logical loop control statements and an "if" with an optional "else clause.

2. Determine the capabilities of Backus's 701 Speedcoding system, and compare them with those of a contemporary programmable hand calculator.
    * The capabilities of Backus's 701 Speedcoding system :
       - As few instructions as possible should be required to specify a program. Programming time should be minimized.
       - Programs should be easy to check out.
       - Scaling should be unnecessary.
       - Address modification should be made very convenient.
       - Transfer of arbitrary blocks of information to and from high-speed storage should be easy to specify.
       - Common functions should be readily available.
       - Optional automatic checking of calculations should be provided.

3. Write a short history of the A-0, A-1, and A-2 systems designed by Grace Hopper and her associates.
    * A-0 was the first compiler ever developed for an electronic computer. The A-0 system was followed by the A-1, A-2, A-3, AT-3 and B-0. The A-2 system was developed at the UNIVAC division of Remington Rand in 1953 and released to customers by the end of that year. Grace Hopper is a hero.

4. As a research project, compare the facilities of Fortran 0 with those of the Laning and Zierler system,
    * The effect of the Laning and Zierler system on the development of Fortran is a question which has been muddled by many misstatements on my part. I believed that we had gotten the idea for using algebraic notation in Fortran from seeing a demonstration of Laning and Zierler system at MIT.


5. Which of the three original goals of the ALGOL design committee, in your opinion, was most difficult to achieve at that time?
    * a reference syntax, a publication syntax, and an implementation syntax.

6. Make an educated guess as to the most common syntax error in LISP programs.
    * Undefined escape sequences in literal strings. The backslash character can be used in literal strings and characters :
       - to escape various characters
       - to introduce an escape sequence representing a character


7. LISP began as a pure functional language but gradually acquired more and more imperative features. Why?
    * Because there is always a new idea for the uses and begin to develop the language.

8. Describe in detail the three most important reasons, in your opinion, why ALGOL 60 did not become a very widely used language.
    * First, it is an interpreter type of language and focused on ease of use at the expense of system resources. Second, the running-time of a program that was written with the help of Speedcoding was usually ten to twenty times that of machine code.

No comments:

Post a Comment