Title: Preliminaries
1Preliminaries
- Jianhua Yang
- Department of Math and Computer Science
- Bennett College
2Outline
- Reasons for studying concepts of programming
languages - Programming domains
- Language evaluation criteria
- Influence on Language design
- Language categories
- Implementation methods
- Programming environments
31.1 Reasons for studying concepts of programming
languages
- Improved background for choosing appropriate
languages
- Increased ability to learn new languages
- Better understand of the significance of
implementation
- Increased capacity to express ideas
- Overall advancement of computing
41.2 Programming domains
Algol 60
Cobol
Lisp, Prolog
C, C, C
Perl, JVS, PHP, VBS
- Special-purpose languages
51.3 Language evaluation criteria
- 1. Readability
- Overall simplicity
- Orthogonality
- Control statements
- Data types and structures
- Syntax
means a relatively small set of primitive
constructs can be combined in a relatively small
number of ways to build the control and data
structures of the language.
IBM Reg1? Reg1 Memory_Cell Reg1?
Reg1Reg2 VAX Operand1? Operand1 Operand2
1.Identifier forms 2. Special words 3. Form
and meaning
61.3 Language evaluation criteria
- Writability
- Simplicity and orthogonality
- Support of abstraction
- Expressivity
the ability to define and then use complicated
structures or operations in ways that allow many
of the details to be ignored.
Up to the language used In C, we have count to
replace countcount1
71.3 Language evaluation criteria
- Reliability
- Type checking
- Exception handling
- Aliasing
- Readability and writability
81.3 Language evaluation criteria
- Cost
- Training
- Writing
- Compiling
- Executing
- Poor reliability
- Maintaining
91.4 Influence on language design
- Computer architecture
- Programming methodologies
101. Computer Architecture
- The Von Neumann computer architecture
- Non-VN computer architecture
- The parallel architecture
11The Von Neumann computer architecture
Memory Units
Instructions and data
Results of operations
Input/Output
Arithmetic and logic unit
Control unit
12Parallel architecture
Global Memory Units
Instructions and data
Results of operations
CPU1
CPU2
CPUn
Input/Output
Memory
Memory
Memory
13Parallel architecture
Internet (Local Area Network)
142. Programming methodologies
- Machine-oriented
- Data-oriented
- Object-oriented
- Procedure-oriented
Emphasizing data design, focusing on the use of
abstract data types to solve problems
Beginning with data design, but includes
accessing methods, and adds inheritance, and
dynamic method binding
Opposite of data-oriented. Will be widely used in
parallel programming
151.5 Language categories, and design trade-off
- Categories
- Design trade-off
161. Language categories
- Imperative (C, VB)
- Functional (Lisp)
- Logic (Prolog)
- Object-oriented (Java, C, C)
172. Design trade-offs
Hoare states that There are so many important
but conflicting criteria, that their
reconciliation and satisfaction is a major
engineering task.
- Reliability and cost of execution
2. Expressivity and readability
3. flexibility and safety
181.6 Implementation method
Application
Program Developing
Program
Operating System
Machine Language
Bare machine
191.6 Implementation method
- Using machine languages
- Using high-level languages
20Using high-level languages
- Compilation
- Interpretation
- Hybrid
21Compilation
- Write a source code
- Compile
- Link
- Debug
- Maintain
22Compilation
Source Program
Lexical analyzer
Syntax analyzer
Symbol table
Optimization
Intermediate Code generator
code generator
Computer
23Interpretation
Source Program
Input data
Interpreter
Results
24Hybrid
Source Program
Lexical analyzer
Syntax analyzer
Intermediate Code generator
Input data
interpreter
Results
251.7 Summary
- Why need to learn this course?
- Programming domains
- Language evaluation criteria
- Influences on language design
- Implementing methods