Paper II
MCST 102: PRINCIPLES OF PROGRAMMING LANGUAGES
Department of Computer Science
M. Sc-I( Semester I )
Dr Sharmila Sharad More,
Assistant Professor , Dept Of Science and
Computer Science,
MIT, ACSC,Alandi, Pune
• To prepare student to think about programming languages analytically
• Compare programming language designs
• Learn new languages more quickly
• Understand basic language implementation techniques
• Learn small programs in different programming Languages
1
Syllabus: PPL
Learning Objectives:
• What is Language?
-Language is a mode of communication that is used to share ideas, opinions
with each other. For example, if we want to teach someone, we need a
language that is understandable by both communicators.
•What is a Programming Language?
-A programming language is a computer language that is used
by programmers (developers) to communicate with computers. It is a set of
instructions written in any specific language ( C, C++, Java, Python) to
perform a specific task.
History of Programming Languages
Programming Languages
• Reasons for Studying of Programming Languages
Increased capacity to express ideas:
 Improved background for choosing appropriate languages
 Increased ability to learn new languages
 Better understanding the significance of implementation
 Better use of languages that are already known
 Overall advancement of computing
❖Language Evaluation Criteria
●Readability:
➢The ease with which programs can be read and understood.
●Writability:
➢The ease with which a language can be used to create programs.
●Reliability:
➢Conformance to specifications (i.e., performs to its specifications).
●Cost:
➢The ultimate total cost.
• Types of programming language
1. Low-level programming language
i. Machine Language
ii. Assembly Language
2. High-level programming language
i. Procedural Oriented programming language
ii. Object-Oriented Programming language
iii. Natural language
3. Middle-level programming language
• Most commonly used Programming Language
1. Python 5. C# 9. Go
2. Java 6. JavaScript 10. Ruby
3. C 7. R 11. Scala
4. C++ 8. PHP
The Art of Language Design
Today there are thousands of high-level programming languages, and new ones
continue to emerge. Why are there so many? There are several possible answers:
1.Evolution
2. Special Purposes
3.Personal Preference
4.Expressive Power
5. Ease of use for the Novice
Programming Domains :
•Scientific Applications
–Large numbers of floating point computations; use of arrays.
–Example:Fortran.
•Business Applications
–Produce reports, use decimal numbers and characters.
–Example:COBOL.
•Artificial intelligence
–Symbols rather than numbers manipulated; use of linked lists.
–Example:LISP.
●System programming
- Need effieciency because of continous use. - Example:C
●Web Software
-Eclectic collection of languages:
markup(example:XHTML),scripting(example:PHP), general-purpose(example:JAVA).
Compilation
• Translate high-level program (source language) into machine code
(machine language)
• Slow translation, fast execution
• Compilation process has several phases: –
1) lexical analysis: converts characters in the source program into
lexical units
2) syntax analysis: transforms lexical units into parse trees which
represent the syntactic structure of program
3) Semantics analysis: generate intermediate code
4) code generation: machine code is generated
The Compilation Process
Additional Compilation Terminologies •
•Load module (executable image): the user and system code
together
•Linking and loading: the process of collecting system program
units and linking them to a user program

PRINCIPLES OF PROGRAMMING LANGUAGES _Chapter 1.ppt

  • 1.
    Paper II MCST 102:PRINCIPLES OF PROGRAMMING LANGUAGES Department of Computer Science M. Sc-I( Semester I ) Dr Sharmila Sharad More, Assistant Professor , Dept Of Science and Computer Science, MIT, ACSC,Alandi, Pune
  • 2.
    • To preparestudent to think about programming languages analytically • Compare programming language designs • Learn new languages more quickly • Understand basic language implementation techniques • Learn small programs in different programming Languages 1 Syllabus: PPL Learning Objectives:
  • 3.
    • What isLanguage? -Language is a mode of communication that is used to share ideas, opinions with each other. For example, if we want to teach someone, we need a language that is understandable by both communicators. •What is a Programming Language? -A programming language is a computer language that is used by programmers (developers) to communicate with computers. It is a set of instructions written in any specific language ( C, C++, Java, Python) to perform a specific task. History of Programming Languages Programming Languages
  • 5.
    • Reasons forStudying of Programming Languages Increased capacity to express ideas:  Improved background for choosing appropriate languages  Increased ability to learn new languages  Better understanding the significance of implementation  Better use of languages that are already known  Overall advancement of computing
  • 6.
    ❖Language Evaluation Criteria ●Readability: ➢Theease with which programs can be read and understood. ●Writability: ➢The ease with which a language can be used to create programs. ●Reliability: ➢Conformance to specifications (i.e., performs to its specifications). ●Cost: ➢The ultimate total cost.
  • 7.
    • Types ofprogramming language 1. Low-level programming language i. Machine Language ii. Assembly Language 2. High-level programming language i. Procedural Oriented programming language ii. Object-Oriented Programming language iii. Natural language 3. Middle-level programming language • Most commonly used Programming Language 1. Python 5. C# 9. Go 2. Java 6. JavaScript 10. Ruby 3. C 7. R 11. Scala 4. C++ 8. PHP
  • 8.
    The Art ofLanguage Design Today there are thousands of high-level programming languages, and new ones continue to emerge. Why are there so many? There are several possible answers: 1.Evolution 2. Special Purposes 3.Personal Preference 4.Expressive Power 5. Ease of use for the Novice
  • 9.
    Programming Domains : •ScientificApplications –Large numbers of floating point computations; use of arrays. –Example:Fortran. •Business Applications –Produce reports, use decimal numbers and characters. –Example:COBOL. •Artificial intelligence –Symbols rather than numbers manipulated; use of linked lists. –Example:LISP. ●System programming - Need effieciency because of continous use. - Example:C ●Web Software -Eclectic collection of languages: markup(example:XHTML),scripting(example:PHP), general-purpose(example:JAVA).
  • 10.
    Compilation • Translate high-levelprogram (source language) into machine code (machine language) • Slow translation, fast execution • Compilation process has several phases: – 1) lexical analysis: converts characters in the source program into lexical units 2) syntax analysis: transforms lexical units into parse trees which represent the syntactic structure of program 3) Semantics analysis: generate intermediate code 4) code generation: machine code is generated The Compilation Process Additional Compilation Terminologies • •Load module (executable image): the user and system code together •Linking and loading: the process of collecting system program units and linking them to a user program