Summary of Chapter 1

 Language Processors. An integrated software development environment includes many different kinds of language processors such as compiler, interpreters, assemblers, linkers, loaders, debuggers, profilers.

Compiler Phases. A compiler operates as a sequence of phases, each of which transforms the source program from one intermediate representation to another.

Machine and Assembly Languages. Machine languages were the first-generation programming languages, followed by assembly languages. Programming in these languages was time consuming and error prone.

Modeling in Compiler Design. Compiler design is one of the places where theory has had the most impact on practice. Models that have been found useful include automata, grammars, regular expressions, trees, and many  others.

Code Optimization. Although code cannot truly be “optimized,” the science of improving the efficiency of code is both complex and very important. It is a major portion of the study of compilation.

Higher-Level Languages. As time goes on, programming languages take on progressively more of the tasks that formerly were left to the programmer, such as memory management, type-consistency checking, or parallel execution of code.

Compilers and Computer Architecture. Compiler technology influences computer architecture, as well as being influenced by the advances in architecture. Many modern innovations in architecture depend on compilers being able to extract from source programs the opportunities to use the hardware capability effectively.

Software Productivity and Software Security. The same technology that allows compilers to optimize code can be used for a variety of program-analysis tasks, ranging from detecting common program bugs to discovering that a program is vulnerable to one of the many kinds of intrusions that “hackers” have discovered.

Scope Rules. The scope of a declaration is x is the context in which uses of x refer to this declaration. A language uses static scope or lexical scope if it is possible to determine the scope of a declaration by looking only at the program. Otherwise, the language uses dynamic scope.

Environments. The association of names which locations in memory and then with values can be described in terms of environments, which map names to locations in store, the states, which map locations to their values.

Block Structure. Languages that allow blocks to be nested are said to have block structure. A name x in a nested block B, is in the scope of a declaration D of x in an enclosing block if there is no other declaration of x in an intervening block.

Parameter Passing. Parameters are passed from a calling procedure to the callee either by value or by reference. When large objects are passed by value, the values passed are really references to the objects themselves, resulting in an effective call-by-reference.

Aliasing. When parameters are (effectively) passed by reference, two formal parameters can refer to the same object. This possibility allows a change in one variable to change another.

 

Advertisements