Preliminaries - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Preliminaries

Description:

1.1 Reasons for studying concepts of programming languages ... Expressivity ... 2. Expressivity and readability. 3. flexibility and safety. 1.6 Implementation method ... – PowerPoint PPT presentation

Number of Views:15
Avg rating:3.0/5.0
Slides: 26
Provided by: jhy9
Category:

less

Transcript and Presenter's Notes

Title: Preliminaries


1
Preliminaries
  • Jianhua Yang
  • Department of Math and Computer Science
  • Bennett College

2
Outline
  • Reasons for studying concepts of programming
    languages
  • Programming domains
  • Language evaluation criteria
  • Influence on Language design
  • Language categories
  • Implementation methods
  • Programming environments

3
1.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

4
1.2 Programming domains
  • Scientific applications

Algol 60
  • Business applications

Cobol
  • Artificial intelligence

Lisp, Prolog
  • Systems programming

C, C, C
  • Scripting languages

Perl, JVS, PHP, VBS
  • Special-purpose languages

5
1.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
6
1.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
7
1.3 Language evaluation criteria
  • Reliability
  • Type checking
  • Exception handling
  • Aliasing
  • Readability and writability

8
1.3 Language evaluation criteria
  • Cost
  • Training
  • Writing
  • Compiling
  • Executing
  • Poor reliability
  • Maintaining

9
1.4 Influence on language design
  • Computer architecture
  • Programming methodologies

10
1. Computer Architecture
  • The Von Neumann computer architecture
  • Non-VN computer architecture
  • The parallel architecture

11
The Von Neumann computer architecture
Memory Units
Instructions and data
Results of operations
Input/Output
Arithmetic and logic unit
Control unit
12
Parallel architecture
Global Memory Units
Instructions and data
Results of operations
CPU1
CPU2
CPUn
Input/Output
Memory
Memory
Memory
13
Parallel architecture
Internet (Local Area Network)
14
2. 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
15
1.5 Language categories, and design trade-off
  • Categories
  • Design trade-off

16
1. Language categories
  • Imperative (C, VB)
  • Functional (Lisp)
  • Logic (Prolog)
  • Object-oriented (Java, C, C)

17
2. 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
18
1.6 Implementation method
Application
Program Developing
Program
Operating System
Machine Language
Bare machine
19
1.6 Implementation method
  • Using machine languages
  • Using high-level languages

20
Using high-level languages
  • Compilation
  • Interpretation
  • Hybrid

21
Compilation
  • Write a source code
  • Compile
  • Link
  • Debug
  • Maintain

22
Compilation
Source Program
Lexical analyzer
Syntax analyzer
Symbol table
Optimization
Intermediate Code generator
code generator
Computer
23
Interpretation
Source Program
Input data
Interpreter
Results
24
Hybrid
Source Program
Lexical analyzer
Syntax analyzer
Intermediate Code generator
Input data
interpreter
Results
25
1.7 Summary
  • Why need to learn this course?
  • Programming domains
  • Language evaluation criteria
  • Influences on language design
  • Implementing methods
Write a Comment
User Comments (0)
About PowerShow.com