Chapter 1 - Introduction Flashcards

1
Q

6 Reasons for studying concepts of PLs

A

1) increased capacity to express programming concepts
2) improved background for choosing appropriate languages
3) increased ability to learn new languages
4) Understanding the significance of implementation
5) increased ability to design new languages
6) overall advancement of computing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Increased capacity to express programming concepts. Why important?

A
  • awareness to a wider variety of PLs features allows programmers to more easily overcome the data/algorithmic limitations of any one language
  • knowing more languages help broaden the scope SW dev thought process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why is the ability to choose the appropriate language important?

A

-allows the programmer to pick the best PL for the task at hand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why is it a important to understand the significance of implementation?

A

Allows for better understanding of how a PL is more or less efficient and suited for a particular task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

6 Programming Domains

A
Scientific applications 
Business applications 
AI
Systems Programming
Scripting Languages 
Special Purpose Langs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

5 Programming Lang Eval Criteria

A

1) Readability
2) Writability
3) Reliability
4) Cost
5) Others

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Readability factors

A

Overall simplicity
Breadth of features (too many or repeated features is bad)
Orthogonality
Construct meaning is context independent
Control Stmts
Data type and structures
Syntax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Writability Factors

A

Simplicity and orthogonality support for abstraction

Expressivity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Reliability Factors

A

Type checking
Exception handling
aliasing
Readability & Writability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Cost Factors

A
Programmer training needed 
Software creation 
Compilation 
Execution
Compiler cost
Poor reliability maintenance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Other Factors

A

Portability
Generality
Well-definedness

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

2 influences of Lang design

A

Computer architecture

Programming methodologies

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Influence of Computer architecture on Lang design

A

The use of von Neumann machines contributes to use of imperative Langs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Influence of programming methodologies on Lang design

A

50s and 60s ➡️ worried about efficiency

Late 60s ➡️ people efficiency aka readability

Late 70s ➡️ data abstraction

80s ➡️ object oriented programming

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Lang categories

A

Imperative
Functional
Logic
Object oriented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Imperative Lang examples

A
C 
Fortran 
COBOL 
PL1
Algol
17
Q

Functional Lang examples

A

ML

LISP

18
Q

Logic Lang examples

A

Prolog

19
Q

3 Lang design trade offs

A

Reliability vs cost of execution
Writability vs readability
Flexibility vs safety

20
Q

3 Implementation Methods

A

Compilation
Pure interpretation
Hybrid systems

21
Q

What is compilation implementation?

A

Translates high level code to machine code

22
Q

The steps of compilation

A

Lexical analysis
Syntax analysis
Intermediate code generation
Code generation

23
Q

Pro and Con of Compilation

A

Pro ➡️ fast execution

Con ➡️ dedicated to a given hardware

24
Q

What is pure interpretation?

A

A program called an interpreter reads each statement of the program and executes it line by line

25
Q

Pro and Con of pure interpretation

A

Pro ➡️ error messages are close to source code

Con ➡️ slow execution

26
Q

What is a hybrid system

A

Translating high level code to an intermediate Lang that allows for easy interpretation

27
Q

Pros of hybrid system

A

Small translation cost

Medium execution speed

28
Q

What is a preprocessor?

A

A program that processes a source program immediately before Compilation