Programming Language Ch I' Introduction to Programming Languages - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Programming Language Ch I' Introduction to Programming Languages

Description:

The first formal language used in southern Mesopotamia in B.C.4000-B.C.3000. The world oldest written documents, used clay, and for agricultural transactions ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 23
Provided by: suno
Category:

less

Transcript and Presenter's Notes

Title: Programming Language Ch I' Introduction to Programming Languages


1
Programming LanguageCh I.  Introduction to
Programming Languages
  • Internet Management Technology Lab.

2
Contents
  • Language vs. programming language
  • History of programming languages
  • Purpose of learning programming languages
  • Attributes of a Good Language
  • Language Design Issues at Design Time
  • Classification of the Languages
  • Models of Programming Languages

3
Language vs. programming language
  • Language
  • A tool to communicate among human beings.
  • Sumerian
  • The first formal language used in southern
    Mesopotamia in B.C.4000-B.C.3000.
  • The world oldest written documents, used clay,
    and for agricultural transactions and
    astronomical observations.
  • Programming language
  • a tool for communication between literal-minded
    machines.
  • Definition of formal language
  • Is a set of finite strings of atomic symbols from
    alphabet.
  • Alphabet is defined as a set of given symbols,
    say a,b then languages over a,b are
  • L1 a, b, ab
  • L2 aa, aba, abba, abbba,

4
History of programming languages (1/8)
  • An epoch of Programming Languages

Fortran
ALGOL
ALGOL
ALGOL
1955
1957
1980 -
1980
1940
1960 -
1972
1985
Assembly
COBOL
C
ADA
1970
1960
PL/1
Pascal
1960
1970
LISP
Prolog
5
History of programming languages (2/8)
  • FORTRAN (FORmula TRANslator)
  • Design started in 1953 and finished in 1957 led
    by John Backus at IBM
  • Variables of 1 or 2 characters length
  • Numeric-based calculation
  • Thought that FORTRAN world virtually eliminate
    coding and debugging
  • Evolved to FORTRAN66 FORTRAN77 FORTRAN90
  • e.g.
  • " Do statement 3 through 8, then go to 11"
  • " Goto line 2 and initiate the next iteration"

6
History of programming languages (3/8)
  • ALGOL (ALGOrithmic Language)
  • Academic language developed in 1958
  • Useful for the description of algorithms
  • Blocks and procedures are the basic units
  • Procedures may call themselves recursively
  • Not limited to a single computer architecture
  • LISP (LISt Processing language)
  • Designed by John McCarthy and colleagues at MIT
    in late 1950's
  • For AI applications (symbolic processing)
  • Uniform representation of data and program
  • Garbage collection
  • Evolved to Scheme and common LISP

7
History of programming languages (4/8)
  • SNOBOL (StriNg Oriented symBOlic Language)
  • Developed by Farber, Griswold, and Polonsky at
    Bell Lab. in mid 1960s
  • Evolved into SPITBOL, FASBOL, SNOBAT, SNOBOL4,
    and ICON
  • E.g.

8
History of programming languages (5/8)
  • COBOL (COmmon Business Oriented Language)
  • Widely used language in data processing
    applications
  • Designed by Short Range Committee in early 1960s
  • More English-like business oriented programming
    language
  • PL/I 
  • Was developed to replace FORTRAN and COBOL in
    1960's
  • Borrowed block structure and recursive form ALGOL
  • MPPL (Multi-Purpose Programming Language) with
    multitasking
  • Support exception handling

9
History of programming languages (6/8)
  • PASCAL 
  • Education purpose (fast compilation and slow
    execution) structured language
  • THE computer science language developed in 1970s
  • ALGOL-like language
  • C
  • Developed at ATT in 1970s
  • Systems programming language under UNIX
  • Smalltalk
  • Developed in late 1970s
  • Has an integrated program development environment

10
History of programming languages (7/8)
  •  C
  • Successor of the programming language C
  • Object oriented approach
  • Java
  • Developed by Green team (James Gosling) at Sun
    microsystems since 1991
  • Portability and Security (Architectural
    Independence and Access limit)
  • Similar to C and C, in fact, subset of C
  • Strongly typed language

11
History of programming languages (8/8)
  • ADA
  • Commissioned by DoD in late 1970s(Jean Ichbaih of
    Honeywell Bull)
  • High-level construct for concurrent execution
  • Supports real-time programming

12
Purpose of learning programming languages
  • To implement more effective algorithms by
  • learning features, understanding implementations,
    increasing vocabulary such as Recursion, and
    Memory management mechanisms
  • To choose better programming languages (Project
    leader's role)
  • by comparing various languages,
  • To learn new foreign languages more quickly and
    easily
  • Languages in general have the same structure and
    components
  • To develop better programming languages
  • For better user interfaces and functions

13
Attributes of a Good Language (1/3)
  • Conceptual integrity
  • clarity, simplicity, and unified set of concepts
  • readability of programs
  • Orthogonality
  • ability to combine various features of a language
  • If (q lt r) then S1 else S2 has an expression and
    conditional statements
  • Naturalness for the application
  • Support for Abstraction
  • Constructs to factor out reoccurring patterns

14
Attributes of a Good Language (2/3)
  • Easy of program verification
  • formal verification
  • desk checking
  • Programming environment
  • documentation
  • editor and testing package
  • Portability and Translation
  • compile time and space
  • Cost of use
  • program execution time and space
  • program translation
  • program creation, testing, and use
  • program maintenance

15
Attributes of a Good Language (3/3)
  • Clear syntax and semantics
  • Syntax form, format, well-formediness, and
    compositional structure of the language
  • e.g.  painted two desk. (syntactically incorrect)
  • e.g.  Colorless green ideas sleep furiously.
    (syntactically correct)
  • int V10 vs. Varray0..9 of integer pascal
  • Semantics meaning and interpretation of the
    language
  • e.g. Time flies like an arrow.
  • e.g  Fruit flies like a banana.

16
Language Design Issues at Design Time
  • Correctness
  • Syntactically complete and semantically
    consistent
  • Easy to write
  • Programmers have become expensive
  • Efficiency
  • machine speed made the efficiency second issue,
    but still important
  • Reliability and maintenance
  • Advanced language supports
  • e.g. except handling PL/I. Ada

17
Classification of the Languages
  • Classification of the Programming Languages

Programming Languages
Based on execution environment
Based on application domain
Based on dataprocessing methodology
Business processing COBOL, Spreadsheet, Java
Bach processing languages
Procedural languages(imperative languages)C,
FORTRAN, PASCAL, PL/1
Scientific FORTRAN, ADA
Interactive languages LISP, JAVA
Object-oriented languagesC, SMALLTALK
System C, ADA, Pascal
Embedded languagesRT-Flex, VxWorks
Artificial Intelligence LISP, PROLOG
Functional languages(applicative language)
LISP, ML
Parallel Processing HPF, FORTRAN-P
Logical languages PROLOG
Real-Time Systems RT-Euclid, RTC
18
Models of Programming Languages (1/5)
  • Imperative Languages
  • Command driven or statement oriented languages
  • A program consists of a sequence of statement
  • Execution of each statements causes interpreter
    to change the state of the system.
  • Successive machine states needs to be reaches at
    the solution.
  • C, Fortran, Algol, PL/I

19
Models of Programming Languages (2/5)
  • Applicative Languages
  • Also called Functional Language
  • Perform a function with its argument (data) and
    generates a result
  • A result of a function can be used as an argument
    of another function
  • (func (.....(func(func(data)))....))
  • LISP and ML

20
Models of Programming Languages (3/5)
  • Rule-based Languages
  • Also called logic programming languages
  • Execute an action when a certain enabling
    condition (predicate) is satisfied
  • Building a matrix or table of possible conditions
    and appropriate actions
  • Prolog

21
Models of Programming Languages (4/5)
  • Object-oriented Languages
  • Complex objects are designed as extensions of
    simpler objects
  • Inheriting of simpler objects
  • Gain the efficiency of imperative languages
  • Gains the flexibility and reliability of
    applictive languages
  • C, Smalltalk

22
Models of Programming Languages (5/5)
  • Functional Classification of Languages
Write a Comment
User Comments (0)
About PowerShow.com