HW 1 Reading Flashcards

1
Q

Potential Benefits of Studying Programming Language Concepts

A

1.) Increased capacity to express ideas
2.) Improved background for choosing appropriate languages
3.) Increased ability to learn new languages
4.) Better understanding of the significance of implementation
5.) Better use of languages that are already known
6.) Overall advancement of computing

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

What type of architecture did most languages use in the past 60 years?

A

Von Neuman Architecture

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

What type of languages use von Neuman architecture?

A

Imperative Languages

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

What happens in a Von Neuman computer?

A

1.) Both data and programs are stored in the same memory.
2.) The CPU is sperate from the memory
3.) Instructions must be transmitted or piped from memory to CPU, then results of operations must be moved back to memory.

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

Central features of imperative languages.

A

1.) Variables, which model the memory cells.
2.) Assignment statements, which are based on the piping operation
3.) Iterative form of repetition

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

Why is iteration fast on von Neuman architecture?

A

Because instructions are stored in adjacent cells of a memory and repeating the execution of a section of a code requires only a branch instructions.

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

How does the execution of a machine code program happen in von Neuman architecture?

A

It happens, in a process called fetch-execute cycle

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

Fetch-Execute Cycle Algorithm

A

1.) initialize the program counter
2.) repeat forever
3.) fetch the instruction pointed to by the program counter
4.) increment the program counter to point at the next instruction
5.) decode the instruction
6.) execute the instruction
7.) end repeat

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

What were the new software development methodologies that emerged as a result of the research in the 1970s?

A

Top-down designs and stepwise refinement

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

What were the primary programming language deficiencies discovered in 1970?

A

Incompleteness of type checking and inadequacy of control statements.

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

What is the more practical machine design choice to implement in a hardware?

A

Implement in hardware a very low-level language that provides the most commonly needed primitive operations and requires
system software to create an interface to programs in higher-level languages.

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

Can a language implementation system be the only software on a computer?

A

No, because a large collection of programs called the operating system is also required. Which supplies higher-level primitives’ than those of a machine language.

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

What do primitives provide?

A

1.) System Resource Management
2.) IO Operations
3.) File Management System
4.) Text and/or program editors and more.

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

Von Neuman bottleneck

A

The speed of the connection between a computer’s memory and its processor often determines the speed of the computer, because instructions often can be executed faster than they can be moved to the processor for execution.

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

Syntax

A

The form of programming languages expressions, statements, and program units.

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

Semantics

A

The meaning of programming languages expressions, statements and program units.

17
Q

Three reasons why lexical analysis is separated from syntax analysis.

A

1.) Simplicity
2.) Efficiency
3.) Portability

18
Q

Data type

A

A collection of data values and a set of predefined operations on those values

19
Q

What did the data structures of COBOL do?

A

Allowed programmers to specify the accuracy of decimal data values, and providing a structured data type for records of information.

20
Q

What PL/I add?

A

It extended the capability of accuracy specification to integer
and floating-point types.

21
Q

What did ALGOL 68 add?

A

They provided a few basic types and a few flexible structure-defining operators that allow a programmer to design a data
structure for each need.

22
Q

Uses for type systems of a programming language.

A

1.) Error detection
2.) Assistance of program modularization
3.) Documentation

23
Q

Descriptor

A

The collection of the attributes of a variable.

24
Q

What design issue is fundamental to all data types?

A

What operations are provided for variables of the type, and how are they specified?

25
Q

What are expressions?

A

Expressions are the fundamental means of specifying computations in a programming language.

26
Q

Control Statements

A

Selects among alternative control flow paths (of statement execution) and has some means of causing the repeated execution of statements or sequences of statements.

27
Q

All algorithms can be expressed by flowcharts can be coded in a programming language with which control statements?

A

1.) One for choosing between two control flow paths
2.) One for logically controlled iterations

28
Q

What is primary factor that restricts the number of control statements in a language?

A

Readability

29
Q

Control Structure

A

A control statement and the collection of statements whose execution it control

30
Q

Two Fundamental Abstraction Facilities

A

1.) Process Abstraction
2.) Data Abstraction

31
Q

Subprogram Linkage

A

Subprograms call and return operations.

32
Q

What happens if a subprogram has parameters that are out mode or inout mode and are implemented by copy?

A

1.) The first action of the return process is to move the local values of the associated formal parameters to the actual parameters.
2.) It must deallocate the storage used for local variables and restore the execution status of the calling program unit.
3.) Finally, control must be returned to the calling program unit.