Chapter 1 Flashcards

1
Q

Why should Concepts of programming languages be studied?

A

Programming is new.
General language concept knowledge helps.
Increased ability to express ideas.
“ “ to learn new languages.
Helps choose appropriate languages.
Understand tradeoffs.
Overall advancement of computing

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

What are the Language Evaluation Criteria?

A

Readability, Writability, Reliability, Cost

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

What is Readability defined as?

A

The ease with which programs can be read and understood

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

What is Writability defined as?

A

The ease with which a language can be used to create programs

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

What is Reliability defined as?

A

Whether a language performs to its specifications under all conditions

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

What is Cost defined as?

A

cost of using the language

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

What is the Evaluation Criteria for Readability?

A

Overall simplicity: Manageable set of features and constructs(minimal feature multiplicity, minimal operator overloading)

Orthogonality: small set of primitive constructs can be combined in small number of ways

Data types; if types are missing, they must be simulated

Syntax considerations: Lack of naming restrictions increase readability (Identifier forms). More special words = more readable (Special words). meaningful keywords, avoid language constructs with same name and different meaning(Form and meaning)

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

Why is a lack of orthogonality bad?

A

It can lead to exceptions

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

Why is too much orthogonality bad?

A

bad for readability

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

What is the problem with too much simplicity?

A

Can be bad for readability

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

What is the Evaluation Criteria for Writability?

A

Simplicity and orthogonality: few constructs, small number of primitives, small set of rules for combining them

Support for abstraction: define and use complex structures/operations.(Process abstraction and Data abstraction)

Expressivity: convenient ways of specifying operations. Strength + number of operators and predefined functions

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

What is process abstraction?

A

Provision for subprograms

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

What is data abstraction?

A

classes, pointer & dynamic memory

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

What is the Evaluation Criteria for Reliability?

A

Type checking: Test for type errors. Compile time checking > run time checking

Exception handling: intercept run time errors and correct it

Aliasing: Presence of 2+ distinct referencing names for same memory location. (dangerous feature)

Readability and writability: non-natural ways of expressing algorithms = unnatural approaches = reduced reliability

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

What is the Evaluation Criteria for Cost?

A

Training new programmers.
Writing programs
compiling programs
Executing programs
Language implementation system (availability of free compilers)
Reliability(poor = high cost)
Maintaining programs

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

What are some extra Evaluation Criteria?

A

Portability : ease of moving from on implementation to another
Generality: applicability to a wide range of applications
Well-definedness: Completeness + precision of of language’s official definition

17
Q

What are the Language Design trade-offs

A

Reliability vs cost of execution

Readability vs writability

Writability(flexibility) vs reliability

18
Q

What are the programming domains?

A

Scientific Applications
Business Applications
AI
System Programming
Web Software

19
Q

What influences the Design of a Language?

A

Computer Architecture
Programming Methodologies (eg OOP led to new programming paradigms)

20
Q

What influenced Programming Methodologies?

A

1950/60: simple applications (machine efficiency)
1960s: Efficiency + readability + better control structures (structured programming + top-down design + step-wise refinement)
1970: Process- oriented -> data-oriented (data abstraction
1980: OOP (Abstraction + inheritance + polymorphism)

21
Q

What are the Language Categories?

A

Imperative: Variables, assignment statements, iteration. has OOP languages. Includes visual languages. (c++ Java C ..)

Functional : Main means of computation, applying functions to parameters (LIST, Scheme)

Logic: Rule based (Prolog)

Markup/hybrid (XSLT, JSTL)

22
Q

What are the Implementation Methods

A

Compilation: programs translated to ML

Pure Interpretation: Programs are interpreted by another program known as an interpreter

Hybrid: compromise between compilers and pure interpreters

23
Q

What are the phases of Compilation

A

Lexical analysis: converts source characters to lexical units

Syntax Analysis: Transforms lexical units to parse trees

Semantics analysis: Generate intermediate code

Code generation: Machine code is generated

24
Q

Is Compiled or Pure Interpreted programs faster

A

Compiled.
Interpreted programs are 10-100 times slower

25
Q

Does Interpreted or compiled programs use more space

A

Interpreted.

26
Q

What is an example of a Hybrid Implementation System

A

Perl, typical Java programs

27
Q

What is Just-In-Time Implementation Systems

A

Translate programs to intermediate language
Compile the intermediate language into machine code when they are called

28
Q

What uses JIT systems?

A

.NET languages

29
Q

What are the different Programming environments?

A

UNIX, Microsoft Visual Studio.NET,NetBeans

30
Q
A