Tuesday, March 12, 2013

Concepts of Programming Languages Chapter 2



Concepts of Programming Languages Chapter 2 

Name            : Erland
NIM              : 1601218035
Lecturer       : Tri Djoko Wahjono, Ir., M.Sc. (D0206)
Assignment  : Concept of programming languages Chapter 2

Review Questions
       1.  In what year was Plankalkul designed? In what year was that design
             published?
             Answer : Plankalkul was designed on 1945  and later on 1972 the design was
                               published.
       2. Mention an interesting feature of Zuse’s programs.
            Answer : The inclusion of mathematical expressions that can show the
                               relationships between variables.
       3. What does Plankalkul mean?
             Answer : Plankalkul means high level non-von Neumann programming 
                             language , it was designed by Konrad Zuse.
       5. What is the number of bits in a single word of the UNIVAC I’s memory? How
            are the bits grouped?
             Answer : In UNIVAC I’s memory, the number of the bits is 72,and it's grouped
                              as 12 Six-bit bytes.
       6.What hardware capability that first appeared in the IBM 704 computer that
           strongly Affect the evolution of programming languages ?
           Answer : The hardware capability that first appeared in the IBM 704 IS the
                             inclusion of floating-point, these hardware capability affect the
                             evolution of programming languages because at that time not all
                             computers has the floating-point hardware.

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

        8. Who developed Short Code? Why is Short Code called automatic
             programming? 
             Answer : It was developed by John Mauchly.  It's called automatic 
                              programming because it was not translated to machine code, it was
                              implemented with a pure interpreter. 

        9. Under what environmental consideration was Fortran developed? Which is the
             first version of Fortran?
             Answer : FORTRAN was developed under the environment of :
                              a.Computers had small memories and were slow and relatively
                                 unreliable,
                              b.The primary use of computers was for scientific computations,
                              c.There were no existing efficient and effective ways to program
                                 computers, and
                              d.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.

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

      12.  Which version of Fortran was the first to have any sort of dynamic variables?
             Answer : Fortran 90.


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

       14.  Why were linguists interested in artificial intelligence in the late 1950's?
             Answer : Because they were concern with natural language processing.

       17.  What dialect of LISP is used for introductory programming courses at some   
             universities?
             Answer : The dialect that has been used is Scheme.

       18. What two professional organizations together designed ALGOL 60?
             Answer : acm & gamm

      20. What were modifications to ALGOL 58 to produce ALGOL 60?
             Answer : 1. The concept of block structure was introduced.
                              2. Two different means of passing parameters to subprograms were
                                   allowed:pass by name and pass by value.
                              3.Procedures were allowed to be recursive.
                              4. Stack-dynamic arrays were allowed.

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

      25. What organization was most responsible for the early success of COBOL?
             Answer : Departement of Defense because it sponsored the COBOL
                              development. 

Problem Sets



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 logical If construct. Because its very useful to make a selection depends on conditions.

3. Write a short history of the Fortran 0, Fortran I, Fortran II, and Fortran IV systems.
Answer:
The first FORTRAN compiler was a milestone in the history of computing,
at that time computers had very small memories (on the order of 15KB,
it was common then to count memory capacities in bits), they were slow
and had very primitive operating systems (if they had them at all).
At those days it seemed that the only practical way is to program in
assembly language.
FORTRAN II (1958) was a significant improvement, it added the capability
for separate compilation of program modules, assembly language modules
could also be 'linked loaded' with FORTRAN modules.
FORTRAN III (1958) was never released to the public, it made it possible
to use assembly language code right in the middle of FORTRAN code. Such
"inlined" assembly code can be more efficient, but the advantages of an
HLL are lost (e.g. portability, ease of use).
FORTRAN IV (1961) was a 'clean up' of FORTRAN II, improving things
like the implementation of the COMMON and EQUIVALENCE statements,
and eliminating some machine-dependant language irregularities.
A FORTRAN II to FORTRAN IV translator was used to retain backward
compatibility with earlier FORTRAN programs.
On May 1962 another milestone was traversed, an ASA committee started
developing a standard for the FORTRAN language, a very important step
that made it worthwhile for vendors to produce FORTRAN systems for
every new computer, and made FORTRAN an even more popular HLL.
6. Make an educated guess as to the most common syntax error in C programs 
Answer : For what i think, the most common syntax error in c programs is caused by semicolon missing and  wrong in declaring the variable value.


9. Why, in your opinion, did Fortran allow names that began with I,J,K,L,M, and N as implicitly integer type?
Answer: The choice of the letters for this convention was based on the fact that at that time scientists and engineers used letters as variable subscripts, usually I, J, and K, and then Fortran’s designers threw in the three additional letters.
10. Outline the major development in ALGOL 60.
Answer :
        1. The concept of block structure was introduced.
        2. Two different means of passing parameters to subprograms were allowed:
             pass by name and pass by value.
        3.Procedures were allowed to be recursive.
        4. Stack-dynamic arrays were allowed.

13.What is the prmary reason why C became more widely used than Fortran ?
Answer : Because C is much more flexible and  readable than Fortran.

15. Are there any nonprocedural programming languages other than Prolog?

Answer : There is another nonprocedural programming languages other  than Prolog, 
                 for example Lisp, Scheme, and Miranda.

25. Give a brief general description of the Java Servlet.

Answer : 
Java servlet is a Java programming language class used to extend the capabilities of a server. Although servlets can respond to any types of requests, they are commonly used to extend the applications hosted by web servers, so they can be thought of as Java Apllets that run on servers instead of in web browsers