SlideShare a Scribd company logo
CSC 447: Organization of Programming Languages
Department of Computer Science
College of Physical Sciences
Federal University of Agriculture, Abeokuta.
WEEK 1 & 2 (Language definition structure)
PART-TIME
2022/2023 session
DR. O.E OJO
Course Outline
 Language definition structure
 Data types and structures.
 Review of basic data types, including list and trees,
 Control structure and data flow.
 Runtime consideration
 Interpretative languages,
 Lexical analyses and parsing.
 Evaluation of programming languages.
2
REASONS FOR STUDYING CONCEPTS OF
PROGRAMMING LANGUAGES
1. Increased ability to express ideas/algorithms
 In Natural language, the depth at which people think is influenced
by the expressive power of the language they use.
 In programming language, the complexity of the algorithms that
people implement is influenced by the set of constructs available
in the programming language.
2. Improved background for choosing appropriate Languages
 Many programmers use the language with which they are most
familiar, even though poorly suited for their new project. It is ideal
to use the most appropriate language.
3
REASONS FOR STUDYING CONCEPTS OF
PROGRAMMING LANGUAGES
3. Increased ability to learn new languages
 For instance, knowing the concept s of object oriented
programming OOP makes learning Java significantly easier and
also, knowing the grammar of one’s native language makes it
easier to learn another language.
4. Better Understanding of Significance of implementation
5. Better use of languages that are already known
6. The overall advancement of computing
4
APPLICATION DOMAINS
 SCIENTIFIC APPLICATIONS: can be characterized as those
which predominantly manipulate numbers and arrays of numbers,
using mathematical and statistical principles as a basis for the
algorithms.
 These algorithms encompass such problem as statistical
significance test, linear programming, regression analysis and
numerical approximations for the solution of differential and
integral equations. FORTRAN, Pascal, Math lab are programming
languages that can be used here.
5
APPLICATION DOMAINS
 DATA PROCESSING APPLICATIONS: can be characterized as
those programming problems whose predominant interest is in the
creation, maintenance, extraction and summarization of data in
records and files.
 COBOL is a programming language that can be used for data
processing applications.
6
APPLICATION DOMAINS
 TEXT PROCESSING APPLICATIONS: are characterized as
those whose principal activity involves the manipulation of natural
language text, rather than numbers as their data.
 SNOBOL and C language have strong text processing
capabilities.
7
APPLICATION DOMAINS
 ARTIFICIAL INTELLIGENCE APPLICATIONS: are characterized
as those programs which are designed principally to emulate
intelligent behavior.
 They include game playing algorithms such as chess, natural
language understanding programs, computer vision, robotics and
expert systems.
 LISP has been the predominant AI programming language, and
also PROLOG using the principle of ‘’Logic programming’’
 Lately AI applications are written in Java, C++ and python.
8
APPLICATION DOMAINS
 SYSTEMS PROGRAMMING APPLICATIONS: involve developing
those programs that interface the computer system ( the
hardware) with the programmer and the operator.
 These programs include compilers, assembles, interpreters, input-
output routines, program management facilities and schedules for
utilizing and serving the various resources that comprise the
system.
 Ada, Modula – 2 and C are examples of programming languages
used here.
9
APPLICATION DOMAINS
 SYSTEMS PROGRAMMING APPLICATIONS: involve developing
those programs that interface the computer system ( the
hardware) with the programmer and the operator.
 These programs include compilers, assembles, interpreters, input-
output routines, program management facilities and schedules for
utilizing and serving the various resources that comprise the
system.
 Ada, Modula – 2 and C are examples of programming languages
used here.
10
APPLICATION DOMAINS
 WEB SOFTWARE: Web software is a collection of languages
which include:
 Markup (e.g. XHTML)
 Scripting for dynamic content under which we have the
 Client side, using scripts embedded in the XHTML documents e.g.
JavaScript, PHP
 Server side, using the common Gateway interface e.g. JSP, ASP, PHP
 General- purpose, executed on the web server through cGI e.g.
Java, C++.
11
CRITERIA FOR LANGUAGE EVALUATION AND
COMPARISION
 Expressivity : means the ability of a language to clearly reflect
the meaning intended by the algorithm designer. It encourages the
use of statement forms associated with structured programming
(usually “while “loops and “if – then – else” statements).
 Well-definiteness: that the language’s syntax and semantics are
free of ambiguity, are internally consistent and complete.
 Data types and Structures: the ability of a language to support a
variety of data values (integers, real, strings, pointers etc.) and
non-elementary collections of these.
12
CRITERIA FOR LANGUAGE EVALUATION AND
COMPARISION
 Modularity: It has two aspects: the language’s support for
sub-programming and the language’s extensibility in the
sense of allowing programmer – defined operators and data
types.
 By sub programming, we mean the ability to define
independent procedures and functions (subprograms), and
communicate via parameters or global variables with the
invoking program.
 Input-Output facilities: In evaluating a language’s “Input-
Output facilities” we are looking at its support for sequential,
indexed, and random access files, as well as its support for
database and information retrieval functions.
13
CRITERIA FOR LANGUAGE EVALUATION AND
COMPARISION
 Portability: A language which has “portability” is one which is
implemented on a variety of computers. That is, its design is
relatively “machine – independent”. Languages which are well-
defined tend to be more portable than others.
 Efficiency: An “efficient” language is one which permits fast
compilation and execution on the machines where it is
implemented. Traditionally, FORTRAN and COBOL have been
relatively efficient languages in their respective application areas.
14
CRITERIA FOR LANGUAGE EVALUATION AND
COMPARISION
 Pedagogy: Some languages have better “pedagogy” than others.
That is, they are intrinsically easier to teach and to learn, they
have better textbooks; they are implemented in a better program
development environment, they are widely known and used by the
best programmers in an application area.
 Generality: Means that a language is useful in a wide range of
programming applications. For instance, APL has been used in
mathematical applications involving matrix algebra and in
business applications as well.
15
INFLUENCES ON LANGUAGE DESIGN
 Computer Architecture: Languages are developed around the
prevalent computer architecture, known as the Von Neumann
architecture (the most prevalent computer architecture).
 The connection speed between a computer’s memory and its
processor determines the speed of that computer.
 Program instructions often can be executed much faster than the
speed of the connection; the connection speed thus, results in a
bottleneck (Von Neumann bottleneck).
 It is the primary limiting factor in the speed of computers.
16
INFLUENCES ON LANGUAGE DESIGN
17
Von Neumann Architecture
INFLUENCES ON LANGUAGE DESIGN
 Programming Methodologies: New software development
methodologies
 (e.g. object Oriented Software Development) led to new
paradigms in programming and by extension, to new programming
languages.

18
LANGUAGE PARADIGMS
1. Imperative
 This is designed around the Von Neumann architecture. Computation is
performed through statements that change a program’s state. Central
features are variables, assignment statements and iteration, sequence
of commands, explicit state update via assignment. Examples of such
languages are FORTRAN, Algol, Pascal, e/c++, Java, Perl, JavaScript,
Visual BASIC.NET.
 2. Functional
 Here, the main means of making computations is by applying functions
to parameters. Examples are LISP, Scheme, ML, Haskell. It may also
include OO (Object Oriented) concepts.
19
LANGUAGE PARADIGMS
 3. Logic
 This is Rule-based (rules are specified in no particular order).
Computations here are made through a logical inference process.
Examples are PROLOG and CLIPS. This may also include OO
concepts.
20
TRADE-OFFS IN LANGUAGE DESIGN
 Reliability vs. Cost of Execution: For example, Java demands
that all references to array elements be checked for proper
indexing, which leads to increased execution costs.
 Readability vs. Write ability: - APL provides many powerful
operators land a large number of new symbols), allowing complex
computations to be written in a compact program but at the cost of
poor readability.
 Write ability (Flexibility) vs. reliability: The pointers in C++ for
instance are powerful and very flexible but are unreliable.
21
IMPLEMENTATION METHODS
 Compilation – Programs are translated into machine Language &
System calls.
 Interpretation – Programs are interpreted by another program (an
interpreter).
 Hybrid – Programs translated into an intermediate language for
easy interpretation.
 4. Just –in-time – Hybrid implementation, then compile sub
programs code the first time they are called.
22
COMPILATION
 Translated high level program (source language) into machine
code (machine language)
 Slow translation, fast execution
 Compilation process has several phases:
 Lexical analysis converts characters in the source program into
lexical units (e.g. identifiers, operators, keywords).
 Syntactic analysis: transforms lexical units into parse trees
which represent the syntactic structure of the program.
 Semantics analysis check for errors hard to detect during
syntactic analysis; generate intermediate code.
 Code generation – Machine code is generated.
23
INTERPRETATION
 Easier implementation of programs (run-time errors can easily and
immediately be displayed).
 ‐ Slower execution (10 to 100 times slower than compiled
programs)
 Often requires more memory space and is now rare for traditional
high level languages.
 Significant comeback with some Web scripting languages like
PHP and JavaScript.
 Interpreters act as a virtual machine for the source language
24
HYBRID IMPLEMENTAITON
 This involves a compromise between compilers and pure
interpreters.
 A high level program is translated to an intermediate language
that allows easy interpretation.
 Hybrid implementation is faster than pure interpretation. Examples
of the implementation occur in Perl and Java.
 Perl programs are partially compiled to detect errors before
interpretation.
 Initial implementations of Java were hybrid. The intermediate
form, byte code, provides portability to any machine that has a
byte code interpreter and a run time system (together, these are
called Java Virtual Machine).
25
JUST-IN-TIME IMPLEMENTATION
 This implementation initially translates program to an intermediate
language then compile the intermediate language of the
subprograms into machine code when they are called.
 Machine code version is kept for subsequent calls. Just-in-time
systems are widely used for Java programs. Also .NET languages
are implemented with a JIT system.
26
Ad

More Related Content

Similar to CSCorganization of programming languages (20)

Unit 1
Unit 1Unit 1
Unit 1
ankita1317
 
JAVA
JAVAJAVA
JAVA
sonali_iul
 
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptxCobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
mehrankhan7842312
 
Programming
ProgrammingProgramming
Programming
vanesa4ab
 
Procedural Programming Of Programming Languages
Procedural Programming Of Programming LanguagesProcedural Programming Of Programming Languages
Procedural Programming Of Programming Languages
Tammy Moncrief
 
Define Computer language, Translator, Standard input out C
Define Computer language, Translator, Standard input out CDefine Computer language, Translator, Standard input out C
Define Computer language, Translator, Standard input out C
Dr Shailendra Bhalawe
 
Computer Programming Computer Programming Computer Programming
Computer Programming Computer Programming Computer ProgrammingComputer Programming Computer Programming Computer Programming
Computer Programming Computer Programming Computer Programming
RiaMariaDjumhana
 
Computer programing 111 lecture 1
Computer programing 111 lecture 1 Computer programing 111 lecture 1
Computer programing 111 lecture 1
ITNet
 
The Concept Of Abstract Data Types
The Concept Of Abstract Data TypesThe Concept Of Abstract Data Types
The Concept Of Abstract Data Types
Katy Allen
 
Programming And Programming languages.pptx
Programming And Programming languages.pptxProgramming And Programming languages.pptx
Programming And Programming languages.pptx
Rohan Basnet
 
OBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docxOBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docx
AleKi2
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
meisaina
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Professor Lili Saghafi
 
Introduction to programming languages part 1
Introduction to programming languages   part 1Introduction to programming languages   part 1
Introduction to programming languages part 1
university of education,Lahore
 
Chapter-1-1 object oriented programing pdf.pdf
Chapter-1-1 object oriented programing pdf.pdfChapter-1-1 object oriented programing pdf.pdf
Chapter-1-1 object oriented programing pdf.pdf
megbde32
 
CH 01.pptx
CH 01.pptxCH 01.pptx
CH 01.pptx
Obsa2
 
A Short Communication On Computer Programming Languages In Modern Era
A Short Communication On Computer Programming Languages In Modern EraA Short Communication On Computer Programming Languages In Modern Era
A Short Communication On Computer Programming Languages In Modern Era
Katie Naple
 
Computer Programming
Computer Programming Computer Programming
Computer Programming
Newreborn Incarnation
 
Computer
ComputerComputer
Computer
Newreborn Incarnation
 
SYSTEM DEVELOPMENT
SYSTEM DEVELOPMENTSYSTEM DEVELOPMENT
SYSTEM DEVELOPMENT
shahzadebaujiti
 
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptxCobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
mehrankhan7842312
 
Procedural Programming Of Programming Languages
Procedural Programming Of Programming LanguagesProcedural Programming Of Programming Languages
Procedural Programming Of Programming Languages
Tammy Moncrief
 
Define Computer language, Translator, Standard input out C
Define Computer language, Translator, Standard input out CDefine Computer language, Translator, Standard input out C
Define Computer language, Translator, Standard input out C
Dr Shailendra Bhalawe
 
Computer Programming Computer Programming Computer Programming
Computer Programming Computer Programming Computer ProgrammingComputer Programming Computer Programming Computer Programming
Computer Programming Computer Programming Computer Programming
RiaMariaDjumhana
 
Computer programing 111 lecture 1
Computer programing 111 lecture 1 Computer programing 111 lecture 1
Computer programing 111 lecture 1
ITNet
 
The Concept Of Abstract Data Types
The Concept Of Abstract Data TypesThe Concept Of Abstract Data Types
The Concept Of Abstract Data Types
Katy Allen
 
Programming And Programming languages.pptx
Programming And Programming languages.pptxProgramming And Programming languages.pptx
Programming And Programming languages.pptx
Rohan Basnet
 
OBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docxOBJECT ORIENTED PROGRAMMING.docx
OBJECT ORIENTED PROGRAMMING.docx
AleKi2
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Professor Lili Saghafi
 
Chapter-1-1 object oriented programing pdf.pdf
Chapter-1-1 object oriented programing pdf.pdfChapter-1-1 object oriented programing pdf.pdf
Chapter-1-1 object oriented programing pdf.pdf
megbde32
 
CH 01.pptx
CH 01.pptxCH 01.pptx
CH 01.pptx
Obsa2
 
A Short Communication On Computer Programming Languages In Modern Era
A Short Communication On Computer Programming Languages In Modern EraA Short Communication On Computer Programming Languages In Modern Era
A Short Communication On Computer Programming Languages In Modern Era
Katie Naple
 

Recently uploaded (20)

Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 
Understanding SEO in the Age of AI.pdf
Understanding SEO in the Age of AI.pdfUnderstanding SEO in the Age of AI.pdf
Understanding SEO in the Age of AI.pdf
Fulcrum Concepts, LLC
 
React Native for Business Solutions: Building Scalable Apps for Success
React Native for Business Solutions: Building Scalable Apps for SuccessReact Native for Business Solutions: Building Scalable Apps for Success
React Native for Business Solutions: Building Scalable Apps for Success
Amelia Swank
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
João Esperancinha
 
An Overview of Salesforce Health Cloud & How is it Transforming Patient Care
An Overview of Salesforce Health Cloud & How is it Transforming Patient CareAn Overview of Salesforce Health Cloud & How is it Transforming Patient Care
An Overview of Salesforce Health Cloud & How is it Transforming Patient Care
Cyntexa
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
Why Slack Should Be Your Next Business Tool? (Tips to Make Most out of Slack)
Why Slack Should Be Your Next Business Tool? (Tips to Make Most out of Slack)Why Slack Should Be Your Next Business Tool? (Tips to Make Most out of Slack)
Why Slack Should Be Your Next Business Tool? (Tips to Make Most out of Slack)
Cyntexa
 
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
ICT Frame Magazine Pvt. Ltd.
 
How to Build an AI-Powered App: Tools, Techniques, and Trends
How to Build an AI-Powered App: Tools, Techniques, and TrendsHow to Build an AI-Powered App: Tools, Techniques, and Trends
How to Build an AI-Powered App: Tools, Techniques, and Trends
Nascenture
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
IT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information TechnologyIT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information Technology
SHEHABALYAMANI
 
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Gary Arora
 
Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025
Damco Salesforce Services
 
Developing System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptxDeveloping System Infrastructure Design Plan.pptx
Developing System Infrastructure Design Plan.pptx
wondimagegndesta
 
Understanding SEO in the Age of AI.pdf
Understanding SEO in the Age of AI.pdfUnderstanding SEO in the Age of AI.pdf
Understanding SEO in the Age of AI.pdf
Fulcrum Concepts, LLC
 
React Native for Business Solutions: Building Scalable Apps for Success
React Native for Business Solutions: Building Scalable Apps for SuccessReact Native for Business Solutions: Building Scalable Apps for Success
React Native for Business Solutions: Building Scalable Apps for Success
Amelia Swank
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
João Esperancinha
 
An Overview of Salesforce Health Cloud & How is it Transforming Patient Care
An Overview of Salesforce Health Cloud & How is it Transforming Patient CareAn Overview of Salesforce Health Cloud & How is it Transforming Patient Care
An Overview of Salesforce Health Cloud & How is it Transforming Patient Care
Cyntexa
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
Why Slack Should Be Your Next Business Tool? (Tips to Make Most out of Slack)
Why Slack Should Be Your Next Business Tool? (Tips to Make Most out of Slack)Why Slack Should Be Your Next Business Tool? (Tips to Make Most out of Slack)
Why Slack Should Be Your Next Business Tool? (Tips to Make Most out of Slack)
Cyntexa
 
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
ICT Frame Magazine Pvt. Ltd.
 
How to Build an AI-Powered App: Tools, Techniques, and Trends
How to Build an AI-Powered App: Tools, Techniques, and TrendsHow to Build an AI-Powered App: Tools, Techniques, and Trends
How to Build an AI-Powered App: Tools, Techniques, and Trends
Nascenture
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
IT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information TechnologyIT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information Technology
SHEHABALYAMANI
 
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Gary Arora
 
Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025
Damco Salesforce Services
 
Ad

CSCorganization of programming languages

  • 1. CSC 447: Organization of Programming Languages Department of Computer Science College of Physical Sciences Federal University of Agriculture, Abeokuta. WEEK 1 & 2 (Language definition structure) PART-TIME 2022/2023 session DR. O.E OJO
  • 2. Course Outline  Language definition structure  Data types and structures.  Review of basic data types, including list and trees,  Control structure and data flow.  Runtime consideration  Interpretative languages,  Lexical analyses and parsing.  Evaluation of programming languages. 2
  • 3. REASONS FOR STUDYING CONCEPTS OF PROGRAMMING LANGUAGES 1. Increased ability to express ideas/algorithms  In Natural language, the depth at which people think is influenced by the expressive power of the language they use.  In programming language, the complexity of the algorithms that people implement is influenced by the set of constructs available in the programming language. 2. Improved background for choosing appropriate Languages  Many programmers use the language with which they are most familiar, even though poorly suited for their new project. It is ideal to use the most appropriate language. 3
  • 4. REASONS FOR STUDYING CONCEPTS OF PROGRAMMING LANGUAGES 3. Increased ability to learn new languages  For instance, knowing the concept s of object oriented programming OOP makes learning Java significantly easier and also, knowing the grammar of one’s native language makes it easier to learn another language. 4. Better Understanding of Significance of implementation 5. Better use of languages that are already known 6. The overall advancement of computing 4
  • 5. APPLICATION DOMAINS  SCIENTIFIC APPLICATIONS: can be characterized as those which predominantly manipulate numbers and arrays of numbers, using mathematical and statistical principles as a basis for the algorithms.  These algorithms encompass such problem as statistical significance test, linear programming, regression analysis and numerical approximations for the solution of differential and integral equations. FORTRAN, Pascal, Math lab are programming languages that can be used here. 5
  • 6. APPLICATION DOMAINS  DATA PROCESSING APPLICATIONS: can be characterized as those programming problems whose predominant interest is in the creation, maintenance, extraction and summarization of data in records and files.  COBOL is a programming language that can be used for data processing applications. 6
  • 7. APPLICATION DOMAINS  TEXT PROCESSING APPLICATIONS: are characterized as those whose principal activity involves the manipulation of natural language text, rather than numbers as their data.  SNOBOL and C language have strong text processing capabilities. 7
  • 8. APPLICATION DOMAINS  ARTIFICIAL INTELLIGENCE APPLICATIONS: are characterized as those programs which are designed principally to emulate intelligent behavior.  They include game playing algorithms such as chess, natural language understanding programs, computer vision, robotics and expert systems.  LISP has been the predominant AI programming language, and also PROLOG using the principle of ‘’Logic programming’’  Lately AI applications are written in Java, C++ and python. 8
  • 9. APPLICATION DOMAINS  SYSTEMS PROGRAMMING APPLICATIONS: involve developing those programs that interface the computer system ( the hardware) with the programmer and the operator.  These programs include compilers, assembles, interpreters, input- output routines, program management facilities and schedules for utilizing and serving the various resources that comprise the system.  Ada, Modula – 2 and C are examples of programming languages used here. 9
  • 10. APPLICATION DOMAINS  SYSTEMS PROGRAMMING APPLICATIONS: involve developing those programs that interface the computer system ( the hardware) with the programmer and the operator.  These programs include compilers, assembles, interpreters, input- output routines, program management facilities and schedules for utilizing and serving the various resources that comprise the system.  Ada, Modula – 2 and C are examples of programming languages used here. 10
  • 11. APPLICATION DOMAINS  WEB SOFTWARE: Web software is a collection of languages which include:  Markup (e.g. XHTML)  Scripting for dynamic content under which we have the  Client side, using scripts embedded in the XHTML documents e.g. JavaScript, PHP  Server side, using the common Gateway interface e.g. JSP, ASP, PHP  General- purpose, executed on the web server through cGI e.g. Java, C++. 11
  • 12. CRITERIA FOR LANGUAGE EVALUATION AND COMPARISION  Expressivity : means the ability of a language to clearly reflect the meaning intended by the algorithm designer. It encourages the use of statement forms associated with structured programming (usually “while “loops and “if – then – else” statements).  Well-definiteness: that the language’s syntax and semantics are free of ambiguity, are internally consistent and complete.  Data types and Structures: the ability of a language to support a variety of data values (integers, real, strings, pointers etc.) and non-elementary collections of these. 12
  • 13. CRITERIA FOR LANGUAGE EVALUATION AND COMPARISION  Modularity: It has two aspects: the language’s support for sub-programming and the language’s extensibility in the sense of allowing programmer – defined operators and data types.  By sub programming, we mean the ability to define independent procedures and functions (subprograms), and communicate via parameters or global variables with the invoking program.  Input-Output facilities: In evaluating a language’s “Input- Output facilities” we are looking at its support for sequential, indexed, and random access files, as well as its support for database and information retrieval functions. 13
  • 14. CRITERIA FOR LANGUAGE EVALUATION AND COMPARISION  Portability: A language which has “portability” is one which is implemented on a variety of computers. That is, its design is relatively “machine – independent”. Languages which are well- defined tend to be more portable than others.  Efficiency: An “efficient” language is one which permits fast compilation and execution on the machines where it is implemented. Traditionally, FORTRAN and COBOL have been relatively efficient languages in their respective application areas. 14
  • 15. CRITERIA FOR LANGUAGE EVALUATION AND COMPARISION  Pedagogy: Some languages have better “pedagogy” than others. That is, they are intrinsically easier to teach and to learn, they have better textbooks; they are implemented in a better program development environment, they are widely known and used by the best programmers in an application area.  Generality: Means that a language is useful in a wide range of programming applications. For instance, APL has been used in mathematical applications involving matrix algebra and in business applications as well. 15
  • 16. INFLUENCES ON LANGUAGE DESIGN  Computer Architecture: Languages are developed around the prevalent computer architecture, known as the Von Neumann architecture (the most prevalent computer architecture).  The connection speed between a computer’s memory and its processor determines the speed of that computer.  Program instructions often can be executed much faster than the speed of the connection; the connection speed thus, results in a bottleneck (Von Neumann bottleneck).  It is the primary limiting factor in the speed of computers. 16
  • 17. INFLUENCES ON LANGUAGE DESIGN 17 Von Neumann Architecture
  • 18. INFLUENCES ON LANGUAGE DESIGN  Programming Methodologies: New software development methodologies  (e.g. object Oriented Software Development) led to new paradigms in programming and by extension, to new programming languages.  18
  • 19. LANGUAGE PARADIGMS 1. Imperative  This is designed around the Von Neumann architecture. Computation is performed through statements that change a program’s state. Central features are variables, assignment statements and iteration, sequence of commands, explicit state update via assignment. Examples of such languages are FORTRAN, Algol, Pascal, e/c++, Java, Perl, JavaScript, Visual BASIC.NET.  2. Functional  Here, the main means of making computations is by applying functions to parameters. Examples are LISP, Scheme, ML, Haskell. It may also include OO (Object Oriented) concepts. 19
  • 20. LANGUAGE PARADIGMS  3. Logic  This is Rule-based (rules are specified in no particular order). Computations here are made through a logical inference process. Examples are PROLOG and CLIPS. This may also include OO concepts. 20
  • 21. TRADE-OFFS IN LANGUAGE DESIGN  Reliability vs. Cost of Execution: For example, Java demands that all references to array elements be checked for proper indexing, which leads to increased execution costs.  Readability vs. Write ability: - APL provides many powerful operators land a large number of new symbols), allowing complex computations to be written in a compact program but at the cost of poor readability.  Write ability (Flexibility) vs. reliability: The pointers in C++ for instance are powerful and very flexible but are unreliable. 21
  • 22. IMPLEMENTATION METHODS  Compilation – Programs are translated into machine Language & System calls.  Interpretation – Programs are interpreted by another program (an interpreter).  Hybrid – Programs translated into an intermediate language for easy interpretation.  4. Just –in-time – Hybrid implementation, then compile sub programs code the first time they are called. 22
  • 23. COMPILATION  Translated high level program (source language) into machine code (machine language)  Slow translation, fast execution  Compilation process has several phases:  Lexical analysis converts characters in the source program into lexical units (e.g. identifiers, operators, keywords).  Syntactic analysis: transforms lexical units into parse trees which represent the syntactic structure of the program.  Semantics analysis check for errors hard to detect during syntactic analysis; generate intermediate code.  Code generation – Machine code is generated. 23
  • 24. INTERPRETATION  Easier implementation of programs (run-time errors can easily and immediately be displayed).  ‐ Slower execution (10 to 100 times slower than compiled programs)  Often requires more memory space and is now rare for traditional high level languages.  Significant comeback with some Web scripting languages like PHP and JavaScript.  Interpreters act as a virtual machine for the source language 24
  • 25. HYBRID IMPLEMENTAITON  This involves a compromise between compilers and pure interpreters.  A high level program is translated to an intermediate language that allows easy interpretation.  Hybrid implementation is faster than pure interpretation. Examples of the implementation occur in Perl and Java.  Perl programs are partially compiled to detect errors before interpretation.  Initial implementations of Java were hybrid. The intermediate form, byte code, provides portability to any machine that has a byte code interpreter and a run time system (together, these are called Java Virtual Machine). 25
  • 26. JUST-IN-TIME IMPLEMENTATION  This implementation initially translates program to an intermediate language then compile the intermediate language of the subprograms into machine code when they are called.  Machine code version is kept for subsequent calls. Just-in-time systems are widely used for Java programs. Also .NET languages are implemented with a JIT system. 26

Editor's Notes

  翻译: