Review Quetions 1 - Preliminaries of Programming Language (1)

¡Supera tus tareas y exámenes ahora con Quizwiz!

18. What is the use of the well-definedness criterion?

(the completeness and precision of the language's official defining document)

24. What are the three general methods of implementing a programming language?

Compilation, Pure Interpretation and Hybrid Implementation

25. Which produces faster program execution, a compiler or a pure interpreter?

Compiler

21. What are the three fundamental features of an object-oriented programming language?

Data Abstraction, which encapsulates processing with data objects and controls access to data, and adds Inheritance and Dynamic method binding.

5. In which programming language were most of the AI applications developed prior to 1990?

Due to the necessity of linked list, rather than arrays - the functional language Lisp was the predominate language for AI applications prior to 1990.

12. Why is too much orthogonality a detriment to "writability"?

Errors in programs can go undetected when nearly any combination of primitives isl legal. This can lead to code absurdities that cannot be discovered by the compiler.

13. Give an example of expressivity in a language.

Expressivity in C: the notation count++ is more convenient and shorter than count = count +1.

3. Which programming language for scientific applications was the first to be used successfully?

Fortran was the first language used for scientific purposes, and stands on its own today.

6. Which is the most popular markup language for Web development?

HTML.

15. Give an example of how the failure to type check, at either compile time or run time, can lead to countless program errors.

In the original C language, the use of subprogram parameters, since the type of an actual parameter in a function call was not checked to determine whether its type matched that of the corresponding formal type. An int type variable could be ysed as an actual parameter call to a function that expected a float type as its formal parameter.

20. What two programming language deficiencies were discovered as a result of the research in software development in the 1970s?

Incompleteness of type checking and inadequacy of control statements (requiring expensive use of gotos)

7. Why is a list of programming language evaluation criteria for the development of software controversial?

It is difficult to get even two computer scientists to agree on the value of some given language characteristic relative to others.

28. Why is the von Neumann bottleneck important?

It is the primary limiting factor in the speed of computers

23. What is an example of two language design criteria that are in direct conflict with each other?

Reliability Vs cost of execution

1. Why is it useful for a programmer to have the ability to learn new languages, even though he or she may have a good knowledge of a number of programming languages?

Since the languages in use are constantly changing, being able to move between languages makes you a more effective and versatile computer scientist.

22. What language was the first to support the three fundamental features of object-oriented programming?

SmallTalk (Goldberg and Robson, 1989)

26. What role does the symbol table play in a compiler?

Stores the type and attribute information of each user defined name.

8. How does the overall simplicity of a programming language affect its readability?

Take an overly simple programming language, like assembly language. The lack of more complex control statements results in a less obvious program structure, since the statements are simple far more of them are required than in an equivalent high level language. Thus reducing the readability at the expense of overall simplicity.

9. Why is the VAX instruction design orthogonal?

The VAX instruction design is orthogonal in that a single instruction can use either registers or memory cells as the operands.

17. What is portability of a language?

The ease with which programs can be moved from one implementation to another.

19. How does the execution of a machine code program on a von Neumann architecture computer occur?

The execution of a machine code program on a von Neumann architecture computer occurs in a process called the fetch-execute cycle.

4. Which is the first successful high-level programming language for business?

The first successful highlevel programmiing language for business was COBOL, which appeared in 1960. It is still the most commonly used language for these applications.

16. How is the total cost of a programming language calculated?

The total cost of a programming language is calculated as a function of many of its characteristics.

10. Why does too much orthogonality cause problems?

Too much orthogonality results in a language like ALGOL68, where every construct has a type, and there are no restrictions on those types. The extreme orthogonality leads to extreme complexity of constructs that are allowed. Because languages require a large number of primitives, a high degree of orthogonality results in an explosion of combinations. So even if the combinations are simple, their sheer numbers lead to complexity.

14. What is type checking?

Type Checking is testing for type errors in a given program, either by the compiler or during program execution.

2. Why is it essential to choose an appropriate programming language for a specific software solution?

While it is possible to simulate features of of one language in another, it is always preferable to be able to use a feature whose design has been integrated into a language than to use a simulation of that feature. The simulation is often less elegant, more cumbersome and less safe.

11. Explain how "writability" is used as a measure of how easily a language can be used to create programs.

Writability is a measure of how easily a language can be used to create programs for a chosen problem domain.

27. What does a linker do?

collects system program units and liinks them to a user a program

29. What are the advantages in implementing a language with a pure interpreter?

easier implementation, no translation


Conjuntos de estudio relacionados

All Domains Jean Inman Questions with Explanations of Answers

View Set

Frankenstein Volume Three Quotes

View Set

Ultra Basics & Dry and Moist Heat HTM 150

View Set

Non-Technical Production Personnel

View Set

Vertebral Column and Thoracic Cage

View Set

Med Surg 2 - Test 1 Burns, Med Surg : Chapter 25 Burns, Med Surg burns test #1, Med Surg-Burn Quiz, Lewis: MED-SURG: Chapter 25: Burns, Med Surg - Burns CH 28

View Set