Chapter 1 - Introduction Flashcards Preview

Advanced Topics in Programming Languages > Chapter 1 - Introduction > Flashcards

Flashcards in Chapter 1 - Introduction Deck (28):
1

6 Reasons for studying concepts of PLs

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

2

Increased capacity to express programming concepts. Why important?

-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

3

Why is the ability to choose the appropriate language important?

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

4

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

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

5

6 Programming Domains

Scientific applications
Business applications
AI
Systems Programming
Scripting Languages
Special Purpose Langs

6

5 Programming Lang Eval Criteria

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

7

Readability factors

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

8

Writability Factors

Simplicity and orthogonality support for abstraction
Expressivity

9

Reliability Factors

Type checking
Exception handling
aliasing
Readability & Writability

10

Cost Factors

Programmer training needed
Software creation
Compilation
Execution
Compiler cost
Poor reliability maintenance

11

Other Factors

Portability
Generality
Well-definedness

12

2 influences of Lang design

Computer architecture
Programming methodologies

13

Influence of Computer architecture on Lang design

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

14

Influence of programming methodologies on Lang design

50s and 60s ➡️ worried about efficiency

Late 60s ➡️ people efficiency aka readability

Late 70s ➡️ data abstraction

80s ➡️ object oriented programming

15

Lang categories

Imperative
Functional
Logic
Object oriented

16

Imperative Lang examples

C
Fortran
COBOL
PL1
Algol

17

Functional Lang examples

ML
LISP

18

Logic Lang examples

Prolog

19

3 Lang design trade offs

Reliability vs cost of execution
Writability vs readability
Flexibility vs safety

20

3 Implementation Methods

Compilation
Pure interpretation
Hybrid systems

21

What is compilation implementation?

Translates high level code to machine code

22

The steps of compilation

Lexical analysis
Syntax analysis
Intermediate code generation
Code generation

23

Pro and Con of Compilation

Pro ➡️ fast execution

Con ➡️ dedicated to a given hardware

24

What is pure interpretation?

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

25

Pro and Con of pure interpretation

Pro ➡️ error messages are close to source code

Con ➡️ slow execution

26

What is a hybrid system

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

27

Pros of hybrid system

Small translation cost
Medium execution speed

28

What is a preprocessor?

A program that processes a source program immediately before Compilation