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

Sunday, March 3, 2013

Concept Programming Language Chapter 1


Assignment From Mr. Tri Djoko Wahyono

Review Questions

3.Programming language that has dominated as scientific computer over 50 years is Fortran. Fortran or Formula Translation is an early high-level computer language designed specifically for writing programs involving mathematical and scientific computations, it provided the basis for BASIC and other languages.

4.Programming language that has dominated for business application over 50 year is COBOL. COBOL use language for these application and it characterized by facilities for producing elaborate reports, precise ways of describing and storing decimal numbers

5.Programming language that has dominated for Artificial intelligence over 50 years is LISP. 
The name LISP derives from "List Processing".Linked lists are one of Lisp language's major data structures, and lisp source code is itself made up of lists. 

13.A program is said to be reliable if it performs to its specifications under all conditons.

15.Aliasing is a signal processing term. Aliasing occurs when a system is measured at an insufficient sampling rate. The most common example comes from old westerns. If you watch a movie with a stage coach, the wagon wheels appear to moves backwards once a certain speed is reached. The wagon wheel is the same as  a paper plate from example onoe with several dots around the perimeter (wheel spokes) instead of one.

16.Exception handling is the ability of a program to intercept run time errors, take corrective measures, and then continue is an obvious aid to reliability.

17.Readability is important to writability because if a programming language is difficult to read and understand then it can be difficult for a programmer to create new code that might need to interact or use other code. Often times code needs to be modified and if a program is difficult to read then it is difficult to add new code to it.

29. Hybrid implementation systems is a language implementation method that translate high level language programs to an intermediate language designed to allow easy interpretation. This method is faster than pure interpretation because the source language statements are decoded once.

Problem Set

1.Yes , because when we learn about programming language we learn how to read a particular algorithmic and the step of using it.

2.The first programmer in human history is Ada Lovelace.
Ada Lovelace was the daughter of the poet lord Byron. She was taught by Mary Somerville, a well-known researcher and scientific author, who introduced her to Charles Babbage in June 1833. Babbage was an English mathematician, who first had the idea for a programmable computer.In 1842 and 1843, Ada translated the work of an Italian mathematician, Luigi Menabrea, on Babbage's Analytical Engine. Though mechanical, this machine was an important step in the history of computers; it was the design of a mechanical general-purpose computer. Babbage worked on it for many years until his death in 1871. However, because of financial, political, and legal issues, the engine was never built. The design of the machine was very modern; it anticipated the first completed general-purpose computers by about 100 years.
When Ada translated the article, she added a set of notes which specified in complete detail a method for calculating certain numbers with the Analytical Engine, which have since been recognized by historians as the world's first computer program. She also saw possibilities in it that Babbage hadn't: she realised that the machine could compose pieces of music. The computer programming language 'Ada', used in some aviation and military programs, is named after her.
3. The disadvantages of using multiple programming language is a programmer may take a little time to specify the type of a variable, there is a cost for static error detection, but it tend to reduce debugging time.

6. Readability , because readability affects in both the writing and maintenance phases of the life cycle.

7.The advantages Is that separated data bus are not required. the disadvantage is Executes instruction serially and Limited times that takes to process each instruction.

10.If major cost of computing is shift hardware to software then the hardware costs will be decreased and programmer costs is increased.

12. no, because for what i think a programming language may still has a thing that made a lack in it .For example, java may not perform well on old computer, c++ Overly complex and difficult to debug when used for web application.

15. Advantages
      -Take no memory
     Disadvantages
      - Name may not be seen by debugger
      - Do not have specific data type