HW 1 Reading Flashcards
Potential Benefits of Studying Programming Language Concepts
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
What type of architecture did most languages use in the past 60 years?
Von Neuman Architecture
What type of languages use von Neuman architecture?
Imperative Languages
What happens in a Von Neuman computer?
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.
Central features of imperative languages.
1.) Variables, which model the memory cells.
2.) Assignment statements, which are based on the piping operation
3.) Iterative form of repetition
Why is iteration fast on von Neuman architecture?
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 does the execution of a machine code program happen in von Neuman architecture?
It happens, in a process called fetch-execute cycle
Fetch-Execute Cycle Algorithm
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
What were the new software development methodologies that emerged as a result of the research in the 1970s?
Top-down designs and stepwise refinement
What were the primary programming language deficiencies discovered in 1970?
Incompleteness of type checking and inadequacy of control statements.
What is the more practical machine design choice to implement in a hardware?
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.
Can a language implementation system be the only software on a computer?
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.
What do primitives provide?
1.) System Resource Management
2.) IO Operations
3.) File Management System
4.) Text and/or program editors and more.
Von Neuman bottleneck
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.
Syntax
The form of programming languages expressions, statements, and program units.
Semantics
The meaning of programming languages expressions, statements and program units.
Three reasons why lexical analysis is separated from syntax analysis.
1.) Simplicity
2.) Efficiency
3.) Portability
Data type
A collection of data values and a set of predefined operations on those values
What did the data structures of COBOL do?
Allowed programmers to specify the accuracy of decimal data values, and providing a structured data type for records of information.
What PL/I add?
It extended the capability of accuracy specification to integer
and floating-point types.
What did ALGOL 68 add?
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.
Uses for type systems of a programming language.
1.) Error detection
2.) Assistance of program modularization
3.) Documentation
Descriptor
The collection of the attributes of a variable.
What design issue is fundamental to all data types?
What operations are provided for variables of the type, and how are they specified?
What are expressions?
Expressions are the fundamental means of specifying computations in a programming language.
Control Statements
Selects among alternative control flow paths (of statement execution) and has some means of causing the repeated execution of statements or sequences of statements.
All algorithms can be expressed by flowcharts can be coded in a programming language with which control statements?
1.) One for choosing between two control flow paths
2.) One for logically controlled iterations
What is primary factor that restricts the number of control statements in a language?
Readability
Control Structure
A control statement and the collection of statements whose execution it control
Two Fundamental Abstraction Facilities
1.) Process Abstraction
2.) Data Abstraction
Subprogram Linkage
Subprograms call and return operations.
What happens if a subprogram has parameters that are out mode or inout mode and are implemented by copy?
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.