Pages

Thursday 14 March 2013

Chapter 2

An assignment from Mr. Tri Djoko Wahyono (again). As what the title said, it is the answer for some question (17 numbers, quite randomly in Review Qustion and 8 numbers in Problem Set) in Chapter 2 in "Concept of Programming Language" book.


Review Question
1. In what year was Plankalkül designed? In what year was that design published?
The project has begun at 1943 and published at 1972.

3. What does Plankalkül mean?
Plankalkül means program calculus.

5. What is the number of bits in a single word of the UNIVAC I's memory? How are the bits grouped?
The words if the UNIVAC I's memory had 72 bits and grouped as 12 six-bit bytes.

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

8. Who developed Short Code? Why is Short Code called automatic programming?
John Mauchly; The Short Code is called automatic programming because it simplified the programming process and was implemented with a pure interpreter.

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

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

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

14. Why were linguist interested in artificial intelligence in the late of 1950s?
Linguist were interested with natural language processing in Artificial Intelligence.

16. In what way are Scheme and Common LISP opposites of each other?
Scheme is a small language with simple syntax and semantics, while Common LISP is a relatively large and complex language

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

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

20. What were the significant modification to ALGOL 58 to produce ALGOL 60?
There're some modification made for ALGOL 58 to become ALGOL 60.
  • The concept of block structure was introduced.
  • Two different means of passing parameters to subprograms were allowed: pass by value and pass by name.
  • Procedures were allowed to be recursive.
  • Stack-dynamic arrays were allowed.
23. In what year did the COBOL design process begin?
1959.

26. Which data type does the original BASIC language support?
Floating-point.

28. PL/I was designed to replace what two languages?
COBOL and LISP

31. What innovation of data structuring was introduced in ALGOL 68 but is often credited  to Pascal?
User defined data type.


Problem Set
6. Make an educated guess as to the most common syntax error in C programs.
I think, most common syntax error in C is missing close bracket ')' or '}', because it can be stacked like this :

   void ex{
if (x == 0)
{
for (i = 0; i < n; i++)
{
for (k = i+1; k < i; k++)
{
swap (num_1, num_2);
}
}
}

in that example, there's a missing '}', but it might not be seen easily, because of the stacking bracket.

8. Describe in detail the two most important reasons, in your opinion, why Speedcoding did not become a very widely used language.
First, Speedcoding seems to be an exclusive system, made just for IBM 701. Thus, the knowledge about using IBM 701 is required. Then, how about people who don't know about the IBM 701 system?

Secondly, Speedcoding has a novel facility of automatically incrementing address register, but it was out after a long wait in 1962 (around 8 years long from the system was built). Before the facility is available, programmer have to increase the address register manually and it will increase the cost of the program.

9. Why, in your opinion, did Fortran allow names that begins with I, J, K, L, M, and N as  simplicity integer type?
Because it will be more common to people using I, J, K as implicitly of integer type. If Fortran use A, B, C and I, J, K as the substitute, it would be less known and could be forgotten because the usual letters is I, J, and K. So, Fortran use the nearest letters from I, J, and K.

10. Outline the major developments in ALGOL 60.


  • The concept of block structure was introduced.
  • Two different means of passing parameters to subprograms were allowed: pass by value and pass by name.
  • Procedures were allowed to be recursive.
  • Stack-dynamic arrays were allowed.


  • 13. What is the primary reason why C became more widely used than Fortran?
    C's compiler was part of widely used UNIX operating system, which is a free and quite good compiler that was available to programmers on many different kinds of computers. Because of that, Fortran, which is only available in computers manufactured by IBM, was not as used widely as C.

    14. What are the argument both for and against the idea of a typeless language?
    The advantages of the idea of a typeless language is its flexibility. Any variable can be used for any type values. Despite of its advantage, the idea make a poor reliability due to the ease with which type errors can be made and the impossibility to do the type checking because of the advantage.

    15. Are there any nonprocedural programming languages other than Prolog?
    Yes, there are, like SQL and Visual Basic.

    16. What is your opinion of the argument that languages that are too complex are too dangerous to use, and we should therefore keep all languages small and simple?
    I think the statement is right that with the complexity of the language increasing, the more dangerous its language to use, because it will make just a few of people who mastering this kind of language. Furthermore, with just a few of people who know that kind of language, other people will then abandon that language. Other opinion about this is about the programs made by the language. How if the few people who master the language, make a virus program with that language which is not known by the other people? It might be hard to figure out, how to eradicate that virus if thhey don't know the language.

    No comments:

    Post a Comment