Minggu, 10 Maret 2013

Chap 2 - Review Question and Problem Set - Concepts of Programming Languages, Sebesta

Review Question


1.In what year was Plankalkül designed? In what year was that design published ? 
Answer:
Plankalkül was design in 1945 and was published in 1972

3. What does Plankalkül mean ?
Answer:
It means Program Calculus

7. Who developed the Speedcoding system for the IBM 701 ?
Answer:
John Backus developed speedcoding

9. Under what environmental consideration was the Fortran developed? What is the first version of Fortran ? 
Answer:
FORTRAN was developed under the environment of: (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. The first version of Fortran is Fortran 0.

10. What was the most significant feature added to Fortran I to get Fortran II ?
Answer:
The significant features that was added to Fortran I to be Fortran II was the independent compilation of subroutines.

14. Why were linguists interested in artificial intelligence in the late 1950s ?
Answer: 
Linguists were interested with AI in the latest of 1950 because they were concern with natural language processing.

19. What was the goal for developing C? 
Answer:
The goal of developing C is to make a suite language for a wide variety of applications.

20. What were the significant modification to ALGOL 58 to produce ALGOL 60 ?
Answer: 
The significant modification to ALGOL 58 to ALGOL 60 was:


  • The concept of block structure was introduced. This allowed the programmer to localize parts of programs by introducing new data environments, or scopes.
  • Two different means of passing parameters to subprograms were allowed: pass by value and pass by        name.
  • Procedures were allowed to be recursive. The ALGOL 58 description was unclear on this issue. Note that although this recursion was new for the imperative languages, LISP had already provided recursive functions in 1959.
  •  Stack-dynamic arrays were allowed. A stack-dynamic array is one for which the subscript range or ranges are specified by variables, so that the size of the array is set at the time storage is allocated to the array, which happens when the declaration is reached during execution.

23. In what year did the COBOL design process begin ?
Answer:
COBOL design process begin in 1959

26.Which data type does the original BASIC language support ?
Answer: 
The original data type that BASIC support is floating point

29. For what new line of computer was PL/I designed ?
Answer: PL/I was designed for IBM System/360 line of computer


30. What features of SIMULA 67 are now important parts of some object oriented languages?
Answer:
SIMULA 67 has some important part like the class construct and the concept of abstract data type that provide the foundation for object-oriented programming

37. What are two kinds of statements that populate a Prolog database ?
Answer:
Prolog has two kind of statement in its database which are facts and rules.

36. Why is prolog called non procedural language?
Answer: 
Prolog was called a nonprocedural language because it doesn’t state exactly how a result is to be computed but rather describe the necessary form and/or characteristics of the result.


39. What are the concurrent program unit of Ada called?
Answer:  The concurrent program units of Ada was called task

40. What C++ construct provides support for abstract data types ?
Answer:
C++ construct Cfront that was implemented to provides support for abstract data types


42. What three concepts are the basis for object-oriented programming? 
Answer:
Three basic concepts of Object-Oriented-Programming are inheritance, encapsulation, and polymorphism.

45. What programming language paradigm that nearly all recently designed languages support is not supported by Go?
Answer: Go doesn’t support Object-Oriented Programming design language


Problem Set

1.  What features of Fortran IV do you think would have had the greatest influence on Java if the Java designer had been familiar with Fortran?
Answer:
The feature in Fortran IV that would have had influence on Java is the logical If construct. This control statement is found in Java and it is very useful to make a selection that depends on some conditions.

2. Determine the capability of Short Code, and compare them with those of a contemporary programmable hand calculator.
Answer:
Short Code consists of coded version of mathematical expression that was to be evaluated. Short code can be used to code many equations such as power, square roots, addition, subtraction, division but there is no multiplication code. Short code was able to be implemented into UNIVAC I computer. In the other hand contemporary programmable calculator was able to do multiplication with its embedded programming language.  So with the contemporary calculator people can solve arithmetic problem easier than using the Short Code but it is more difficult to do further improvement to the programmable hand calculator than to the Sort Code.

5. Which of three original goals of the Fortran design committee, in your opinion, was most difficult to achieve at that time?
Answer:
The goal to provide an efficient of hand coded program was look like be the most difficult to achieve because at that time the computer had very small memory and were slow. It would be ineffective to make an hand coded complex program that kind of computer.

7. LISP began as a pure functional language but gradually acquired more and more imperative features. Why?
Answer:
LISP acquired more and more imperative feature because repetitive processes can be specified with recursive function calls, making iteration (loops) unnecessary. That basic concept of functional programming makes it significantly different from programming in an imperative language.

9. Why in your opinion, did Fortran allow names that began with I, J, K, L, M and N as implicitly integer type?
Answer:  
In my opinion did Fortran allow names that began with I, J, K, L, M and N as implicitly integer type because in linear algebra i j k are used to represent the vector from axis x, y, z and since the Fortran is made for most scientific purpose so they allow it.

10. Outline the major development in ALGOL 60.
Answer:


  • The concept of block structure was introduced. This allowed the programmer to localize parts of programs by introducing new data environments, or scopes.
  • Two different means of passing parameters to subprograms were allowed: pass by value and pass by name.
  •  Procedures were allowed to be recursive. The ALGOL 58 description was unclear on this issue. Note that although this recursion was new for the imperative languages, LISP had already provided recursive functions in 1959.
  •  Stack-dynamic arrays were allowed. A stack-dynamic array is one for which the subscript range or ranges are specified by variables; so that the size of the array is set at the time storage is allocated to the array, which happens when the declaration is reached during execution.

12. Describe in your own words, the incorporation of procedural and non-procedural features in programming language design.
Answer:
In my opinion there are three features from the incorporation of procedural and non-procedural. Firstly it will provide an easier way for a programmer to construct a program. The non-procedural and procedural is able to cover how a person thinks, because every programmer has their own way to solve a problem; it can be procedural or non-procedural.  Secondly, an incorporation of procedural and non-procedural will increase the number of variety problem that can be solved by using this method. Thirdly it will increase the orthogonality because there will be many possibilities of combining the structure form procedural and non-procedural programming language design.

14. What are the arguments both for and against the idea of typeless language?
Answer:
Typeless language is less powerful to solve a specific problem such as for business or for Website but in the other hand typeless language provides a simplicity in the making of a common program and by using typeless language the program that is written can be run in almost all system platform. With typeless language programmer doesn’t need to know many kind of syntax from many kind of different programming language.


15. Are there any non-procedural programming language other than prolog?

Answer: 
Yes there are, for example programming languages for data base like SQL and Visual Basic

By Moses Kurniawan
NIM : 1601235003
Class: 02PCT
Special thanks to:  Mr. Tri Djoko Wahjono, Ir., M.Sc.

Tidak ada komentar:

Posting Komentar