Programming Language Test Chapter 1

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

You can write an entire program in an IDE without havin to call multiple tools with command-line tools

Explain how an integrated development environment (IDE) differs from a collection of command-line tools.

Compiler translates high level source program into a equivalent target program (machine language). An interpreter implements a virtual machine whose "machine language" is the high-level programming language. The interpreter reads statements in that language more or less one at a time, executing them as it goes along.

Explain the distinction between interpretation and compilation. What are the comparative advantages and disadvantages of the two approaches?

High level languages economizes the programmer effort in the construction and maintenance of programs. For performance centered tasks, assembly allows direct control for optimization.

In what way(s) are high-level languages an improvement on a assembly language? Are there circumstances in which it still make sense to program in assembler?

Java could be considered either. It is possible for a compiler (complicated translator) to produce code that is then executed by a complicated virtual machine (interpreter)

Is Java compiled or interpreted (or both)? How do you know?

assemblers, debuggers, preprocessors, linkers, editors, pretty printers

List six kinds of tools that commonly support the work of a compiler within a larger programming environment

Scanner: translates characters into tokens removing white space and comments Parser: organizes tokens into a parse tree following a context-free grammar Semantic Analysis: understands parse tree to generate intermediate code and checks constraints with the help of a symbol table Target Code Generation: translates intermediate form into target language (machine language or assembly language)

List the principal phases of compilation, and describe the work performed by each

For modern microprocessor architectures, particularly those with so-called superscalar implementations (ones in which separate functional units can execute instructions simultaneously), compilers can usually generate better code than can human assembly language programmers.

On modern machines, do assembly language programmers still tend to write better code than a good compiler can? Why or why not?

Look at chart on page 27

Phases that are part of interpretation

Declarative languages hide implementation details. Imperative embraces them.

What distinguishes declarative languages from imperative languages?

The first few phases (up through semantic analysis) serve to figure out the meaning of the source program. They are sometimes called the front end of the compiler. The last few phases serve to construct an equivalent target program. They are sometimes called the back end of the compiler.

What distinguishes the front end of the compiler from the back end?

a stack-based language similar to the byte code of modern Java compilers

What is P-code?

A compiler that translates byte code into machine language immediately before each execution of the program.

What is a just-in-time compiler?

What is bootstrapping? A method in which a simple implementation of an interpreter evolves to build more complex versions until the compiler has been built.

What is bootstrapping?

Fortran

What is generally considered the first high-level programming language?

pass:- it is an logical execution of the compilation process. PHASE:- IT IS AN CHRONOLOGICAL PROCESS OF COMPILATION.

What is the difference between a phase and a pass of compilation? Under what circumstances does to make sense for a compiler to have multiple passes?

machine language is language in the form of 1's and 0's that computers understand assembly language is language that humans can more easily understand and is in the form of words and symbols that gets converted to machine language

What is the difference between machine language and assembly language?

Of course, not all semantic rules can be checked at compile time, these are static semantics Those that must be checked at run time are referred to as the dynamic semantics of the language.

What is the difference between static and dynamic semantics?

The symbol table serves throughout compilation as a repository for information about identifiers.

What is the purpose of the compiler's symbol table?

Lisp

What was the first functional language?

Evolution, Special Purposes, Personal Preference

Why are there so many programming languages?

C++ implementations based on the early AT&T compiler actually generated an intermediate program in C, instead of in assembly language

what was the immediate form employed by the original AT&T C++ compiler


Ensembles d'études connexes

Anatomy Chapters, study for final

View Set

Unit 6 Exam-Planet Earth Forms and Features

View Set

Part II: Chapter 6 - Investment Recommendations and Strategies; Section 10

View Set

Principles of Accounting - Chapter 6 Inventory and Cost of Goods Sold

View Set

Confiscation Act and Emancipation Proclamation

View Set