SlideShare uma empresa Scribd logo
1 de 7
Baixar para ler offline
Chapter 1
1.1Reasons for Studying Concepts of Programming Languages
a) Increased ability to express ideas.
• It is widely believed that the depth at which we think is influenced by the
expressive power of the language in which we communicate our thoughts.
• It is difficult for people to conceptualize structures they can’t describe, verbally or
in writing.
• Language in which they develop S/W places limits on the kinds of control
structures, data structures, and abstractions they can use.
• Awareness of a wider variety of P/L features can reduce such limitations in S/W
development.
b) Improved background for choosing appropriate languages
• Many programmers when they are given a choice of languages for a new project,
they use the language with which they are most familiar, even if it is poorly suited
to new projects.
• If these programmers were familiar with other languages available, they would be
in a better position to make informed language choices.
c) Greater ability to learn new languages
• Programming languages are still in a state of continuous evolution, which means
continuous learning is essential.
• Programmers who understand the concept of Object Oriented programming will
have easier time learning Java.
• Once a thorough understanding of the fundamental concepts of languages is
acquired, it becomes easier to see how concepts are incorporated into the design of
the language being learned.
d) Understand significance of implementation
• Understanding of implementation issues leads to an understanding of why
languages are designed the way they are.
• This in turn leads to the ability to use a language more intelligently, as it was
designed to be used.
e) Ability to design new languages
• The more languages you gain knowledge of, the better understanding of
programming languages concepts you understand.
f) Overall advancement of computing
• In some cases, a language became widely used, at least in part, b/c those in
positions to choose languages were not sufficiently familiar with P/L concepts.
• Many believe that ALGOL 60 was a better language than Fortran; however,
Fortran was most widely used. It is attributed to the fact that the programmers and
managers didn’t understand the conceptual design of ALGOL 60.
1.2Programming Domains
a) Scientific applications
a. In the early 40s computers were invented for scientific applications.
b. The applications require large number of floating point computations.
c. Fortran was the first language developed scientific applications.
d. ALGOL 60 was intended for the same use.
b) Business applications
a. The first successful language for business was COBOL.
b. Produce reports, use decimal arithmetic numbers and characters.
c. The arrival of PCs started new ways for businesses to use computers.
d. Spreadsheets and database systems were developed for business.
c) Artificial intelligence
a. Symbolic rather than numeric computations are manipulated.
b. Symbolic computation is more suitably done with linked lists than arrays.
c. LISP was the first widely used AI programming language.
d) Systems programming
a. The O/S and all of the programming supports tools are collectively known as its
system software.
b. Need efficiency because of continuous use.
e) Scripting languages
a. A list of commands is kept at one place, called a script, in a file to be executed.
b. PHP is a scripting language used on Web server systems. Its code is embedded in
HTML documents. The code is interpreted on the server before the document is
sent to a requesting browser.
f) Special-purpose languages
a. RPG is an example of these languages.
1.3 Language Evaluation Criteria
I) Readability
• Software development was largely thought of in term of writing code “LOC”.
• Language constructs were designed more from the point of view of the computer than the
users.
• Because ease of maintenance is determined in large part by the readability of programs,
readability became an important measure of the quality of programs and programming
languages. The result is a crossover from focus on machine orientation to focus on
human orientation.
• The most important criterion “ease of use”
i)Overall simplicity “Strongly affects readability”
• Too many features make the language difficult to learn. Programmers tend to
learn a subset of the language and ignore its other features. “ALGOL 60”
• Multiplicity of features is also a complicating characteristic “having more than
one way to accomplish a particular operation.”
• Ex “Java”:
1. count = count + 1
2. count += 1
3. count ++
4. ++count
• Although the last two statements have slightly different meaning from each other
and from the others, all four have the same meaning when used as stand-alone
expressions.
• Operator overloading where a single operator symbol has more than one
meaning.
• Although this is a useful feature, it can lead to reduced readability if users are
allowed to create their own overloading and do not do it sensibly.
b)Orthogonality
• Makes the language easy to learn and read.
• Meaning is context independent. Pointers should be able to point to any type of
variable or data structure. The lack of orthogonality leads to exceptions to the
rules of the language.
• 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.
• Every possible combination is legal and meaningful.
• Ex: page 11 in book.
• The more orthogonal the design of a language, the fewer exceptions the language
rules require.
• The most orthogonal programming language is ALGOL 68. Every language
construct has a type, and there are no restrictions on those types.
• This form of orthogonality leads to unnecessary complexity.
c) Control Statements
• It became widely recognized that indiscriminate use of goto statements severely
reduced program readability.
• Ex: Consider the following nested loops written in C
i. while (incr < 20)
ii. {
iii. while (sum <= 100
iv. {
1. sum += incr;
v. }
vi. incr++;
vii. }
viii. if C didn’t have a loop construct, this would be written as follows:
ix. loop1:
x. if (incr >= 20) go to out;
xi. loop2:
xii. if (sum > 100) go to next;
xiii. sum += incr;
xiv. go to loop2;
xv. next:
xvi. incr++;
xvii. go to loop1:
xviii. out:
• Basic and Fortran in the early 70s lacked the control statements that allow strong
restrictions on the use of gotos, so writing highly readable programs in those
languages was difficult.
• Since then, languages have included sufficient control structures.
• The control statement design of a language is now a less important factor in
readability than it was in the past.
d)Data Types and Structures
• The presence of adequate facilities for defining data types and data structures in a
language is another significant aid to reliability.
• Ex: Boolean type.
timeout = 1
or
timeout = true
e) Syntax Considerations
• The syntax of the elements of a language has a significant effect on readability.
• The following are examples of syntactic design choices that affect readability:
i. Identifier forms: Restricting identifiers to very short lengths detracts from
readability. ANSI BASIC (1978) an identifier could consist only of a single
letter of a single letter followed by a single digit.
ii. Special Words: Program appearance and thus program readability are
strongly influenced by the forms of a language’s special words.
Ex: while, class, for. C uses braces for pairing control structures.
It is difficult to determine which group is being ended.
Fortran 95 allows programmers to use special names as legal variable
names.
iii. Form and Meaning: Designing statements so that their appearance at least
partially indicates their purpose is an obvious aid to readability.
iv. Semantic should follow directly from syntax, or form.
Ex: In C the use of static depends on the context of its appearance.
1. If used as a variable inside a function, it means the variable is
created at compile time.
2. If used on the definition of a variable that is outside all functions, it
means the variable is visible only in the file in which its definition
appears.
II)Writability
• It is a measure of how easily a language can be used to create programs for a chosen
problem domain.
• Most of the language characteristics that affect readability also affect writability.
a)Simplicity and orthogonality
• A smaller number of primitive constructs and a consistent set of rules for
combining them is much better than simply having a large number of primitives.
b)Abstraction
• Abstraction means the ability to define and then use complicated structures or
operations in ways that allow many of the details to be ignored.
• A process abstraction is the use of a subprogram to implement a sort algorithm
that is required several times in a program instead of replicating it in all places
where it is needed.
c)Expressivity
• It means that a language has relatively convenient, rather than cumbersome, ways
of specifying computations.
• Ex: ++count ⇔ count = count + 1 // more convenient and shorter
III)Reliability
• A program is said to be reliable if it performs to its specifications under all conditions.
a)Type checking: is simply testing for type errors in a given program, either by the
compiler or during program execution.
b)Exception handling: the ability to intercept run-time errors, take corrective
measures, and then continue is a great aid to reliability.
c) Aliasing: it is having two or more distinct referencing methods, or names, for the
same memory cell.
• It is now widely accepted that aliasing is a dangerous feature in a language.
.
Iv)Cost
• Categories
i. Training programmers to use language
ii. Writing programs “Writability”
iii. Compiling programs
iv. Executing programs
v. Language implementation system “Free compilers is the key, success of Java”
vi. Reliability
Readability and writability: Both readability and writability influence reliability
vii. Maintaining programs: Maintenance costs can be as high as two to four times as
much as development costs.
viii. Portability “standardization of the language”
1.4Influences on Language Design
• Computer architecture: the first architecture is “Von Neumann”
• We use imperative languages, at least in part, because we use von Neumann machines
i. Data and programs stored in same memory
ii. Memory is separate from CPU
iii. Instructions and data are piped from memory to CPU
iv. Results of operations in the CPU must be moved back to memory
v. Basis for imperative languages
• Variables model memory cells
• Assignment statements model piping
• Iteration is efficient
b)Programming methodologies
i. 1950s and early 1960s: Simple applications; worry about machine efficiency
ii. Late 1960s: People efficiency became important; readability, better control
structures
a. Structured programming
b. Top-down design and step-wise refinement
iii. Late 1970s: Process-oriented to data-oriented
a. data abstraction
iv. Middle 1980s: Object-oriented programming
1.5Language Categories
• Design Principles
– Modularity, abstraction, contracts…
• Programming languages features
• a) Imperative
• Central features are variables, assignment statements, and iteration
Ex: C, Pascal
b)Functional Programming
•Main means of making computations is by applying functions to given parameters
Ex. Scheme, ML ,LISP, Scheme
c)Logic Programming
•Rule-based
•Rules are specified in no special order
•“Declarative Programming”
E.g. Prolog
d) Object Oriented Programming
• Encapsulate data objects with processing
• Inheritance and dynamic type binding
• Grew out of imperative languages
Ex C,Java, Pascal
1.8Programming Environments
• The collection of tools used in software development
• UNIX
– An older operating system and tool collection
• Borland JBuilder
– An integrated development environment for Java
• Microsoft Visual Studio.NET
– A large, complex visual environment
– Used to program in C#, Visual BASIC.NET, Jscript, J#, or C++

Mais conteúdo relacionado

Mais procurados

Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computingVajira Thambawita
 
C programming language tutorial
C programming language tutorial C programming language tutorial
C programming language tutorial javaTpoint s
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm designNahid Hasan
 
History of C Programming Language
History of C Programming LanguageHistory of C Programming Language
History of C Programming LanguageNiloy Biswas
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programmingNeeru Mittal
 
Pipeline processing - Computer Architecture
Pipeline processing - Computer Architecture Pipeline processing - Computer Architecture
Pipeline processing - Computer Architecture S. Hasnain Raza
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01Wingston
 
Single pass assembler
Single pass assemblerSingle pass assembler
Single pass assemblerBansari Shah
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxSyed Zaid Irshad
 
Ch1 language design issue
Ch1 language design issueCh1 language design issue
Ch1 language design issueJigisha Pandya
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointJavaTpoint.Com
 
Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentationfazli khaliq
 
Algorithm and pseudocode conventions
Algorithm and pseudocode conventionsAlgorithm and pseudocode conventions
Algorithm and pseudocode conventionssaranyatdr
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigmbusyking03
 
C and its errors
C and its errorsC and its errors
C and its errorsJunaid Raja
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming conceptssalmankhan570
 

Mais procurados (20)

Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computing
 
generation of programming language
generation of programming languagegeneration of programming language
generation of programming language
 
C programming language tutorial
C programming language tutorial C programming language tutorial
C programming language tutorial
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
 
History of C Programming Language
History of C Programming LanguageHistory of C Programming Language
History of C Programming Language
 
Programming Language
Programming LanguageProgramming Language
Programming Language
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
Pipeline processing - Computer Architecture
Pipeline processing - Computer Architecture Pipeline processing - Computer Architecture
Pipeline processing - Computer Architecture
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01
 
Single pass assembler
Single pass assemblerSingle pass assembler
Single pass assembler
 
C++ ppt
C++ pptC++ ppt
C++ ppt
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 
Ch1 language design issue
Ch1 language design issueCh1 language design issue
Ch1 language design issue
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpoint
 
Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentation
 
Algorithm and pseudocode conventions
Algorithm and pseudocode conventionsAlgorithm and pseudocode conventions
Algorithm and pseudocode conventions
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigm
 
C and its errors
C and its errorsC and its errors
C and its errors
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
 

Semelhante a Principles of Programming Languages - Lecture Notes

Unit 1_Evaluation Criteria_session 2.pptx
Unit 1_Evaluation Criteria_session 2.pptxUnit 1_Evaluation Criteria_session 2.pptx
Unit 1_Evaluation Criteria_session 2.pptxAsst.prof M.Gokilavani
 
Introduction To Computer Programming
Introduction To Computer ProgrammingIntroduction To Computer Programming
Introduction To Computer ProgrammingHussain Buksh
 
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptxCobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptxmehrankhan7842312
 
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
 
CSCorganization of programming languages
CSCorganization of programming languagesCSCorganization of programming languages
CSCorganization of programming languagesOluwafolakeOjo
 
English de lenguaje de programacion
English de lenguaje de programacionEnglish de lenguaje de programacion
English de lenguaje de programacionVillalba Griselda
 
Unit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptxUnit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptxAsst.prof M.Gokilavani
 
Desired language characteristics – Data typing .pptx
Desired language characteristics – Data typing .pptxDesired language characteristics – Data typing .pptx
Desired language characteristics – Data typing .pptx4132lenin6497ram
 
Computer programing 111 lecture 1
Computer programing 111 lecture 1 Computer programing 111 lecture 1
Computer programing 111 lecture 1 ITNet
 
C-and-Cpp-Brochure-English. .
C-and-Cpp-Brochure-English.               .C-and-Cpp-Brochure-English.               .
C-and-Cpp-Brochure-English. .spotguys705
 
Programming
ProgrammingProgramming
Programminga7madalr
 
D turner techreport
D turner techreportD turner techreport
D turner techreportdavid114811
 

Semelhante a Principles of Programming Languages - Lecture Notes (20)

Ppl 13 july2019
Ppl 13 july2019Ppl 13 july2019
Ppl 13 july2019
 
Unit 1_Evaluation Criteria_session 2.pptx
Unit 1_Evaluation Criteria_session 2.pptxUnit 1_Evaluation Criteria_session 2.pptx
Unit 1_Evaluation Criteria_session 2.pptx
 
Introduction To Computer Programming
Introduction To Computer ProgrammingIntroduction To Computer Programming
Introduction To Computer Programming
 
8505548.ppt
8505548.ppt8505548.ppt
8505548.ppt
 
1. reason why study spl
1. reason why study spl1. reason why study spl
1. reason why study spl
 
3. criteria
3. criteria3. criteria
3. criteria
 
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptxCobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
 
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
 
Introduction to c
Introduction to cIntroduction to c
Introduction to c
 
CSCorganization of programming languages
CSCorganization of programming languagesCSCorganization of programming languages
CSCorganization of programming languages
 
English de lenguaje de programacion
English de lenguaje de programacionEnglish de lenguaje de programacion
English de lenguaje de programacion
 
Unit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptxUnit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptx
 
Desired language characteristics – Data typing .pptx
Desired language characteristics – Data typing .pptxDesired language characteristics – Data typing .pptx
Desired language characteristics – Data typing .pptx
 
Computer programing 111 lecture 1
Computer programing 111 lecture 1 Computer programing 111 lecture 1
Computer programing 111 lecture 1
 
C-and-Cpp-Brochure-English. .
C-and-Cpp-Brochure-English.               .C-and-Cpp-Brochure-English.               .
C-and-Cpp-Brochure-English. .
 
Advanced C
Advanced C Advanced C
Advanced C
 
Programming
ProgrammingProgramming
Programming
 
D turner techreport
D turner techreportD turner techreport
D turner techreport
 
Unit 1
Unit 1Unit 1
Unit 1
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 

Mais de suthi

Object Oriented Programming -- Dr Robert Harle
Object Oriented Programming -- Dr Robert HarleObject Oriented Programming -- Dr Robert Harle
Object Oriented Programming -- Dr Robert Harlesuthi
 
THE ROLE OF EDGE COMPUTING IN INTERNET OF THINGS
THE ROLE OF EDGE COMPUTING IN INTERNET OF THINGSTHE ROLE OF EDGE COMPUTING IN INTERNET OF THINGS
THE ROLE OF EDGE COMPUTING IN INTERNET OF THINGSsuthi
 
EDGE COMPUTING: VISION AND CHALLENGES
EDGE COMPUTING: VISION AND CHALLENGESEDGE COMPUTING: VISION AND CHALLENGES
EDGE COMPUTING: VISION AND CHALLENGESsuthi
 
Document Classification Using KNN with Fuzzy Bags of Word Representation
Document Classification Using KNN with Fuzzy Bags of Word RepresentationDocument Classification Using KNN with Fuzzy Bags of Word Representation
Document Classification Using KNN with Fuzzy Bags of Word Representationsuthi
 
AUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTESAUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTESsuthi
 
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTESOBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTESsuthi
 
PARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTES
PARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTESPARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTES
PARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTESsuthi
 
SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTES
SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTESSOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTES
SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTESsuthi
 
COMPUTER HARDWARE - SHORT NOTES
COMPUTER HARDWARE - SHORT NOTESCOMPUTER HARDWARE - SHORT NOTES
COMPUTER HARDWARE - SHORT NOTESsuthi
 
DATA BASE MANAGEMENT SYSTEM - SHORT NOTES
DATA BASE MANAGEMENT SYSTEM - SHORT NOTESDATA BASE MANAGEMENT SYSTEM - SHORT NOTES
DATA BASE MANAGEMENT SYSTEM - SHORT NOTESsuthi
 
OPERATING SYSTEM - SHORT NOTES
OPERATING SYSTEM - SHORT NOTESOPERATING SYSTEM - SHORT NOTES
OPERATING SYSTEM - SHORT NOTESsuthi
 
SOFTWARE ENGINEERING & ARCHITECTURE - SHORT NOTES
SOFTWARE ENGINEERING & ARCHITECTURE - SHORT NOTESSOFTWARE ENGINEERING & ARCHITECTURE - SHORT NOTES
SOFTWARE ENGINEERING & ARCHITECTURE - SHORT NOTESsuthi
 
ALGORITHMS - SHORT NOTES
ALGORITHMS - SHORT NOTESALGORITHMS - SHORT NOTES
ALGORITHMS - SHORT NOTESsuthi
 
COMPUTER NETWORKS - SHORT NOTES
COMPUTER NETWORKS - SHORT NOTESCOMPUTER NETWORKS - SHORT NOTES
COMPUTER NETWORKS - SHORT NOTESsuthi
 
DATA STRUCTURES - SHORT NOTES
DATA STRUCTURES - SHORT NOTESDATA STRUCTURES - SHORT NOTES
DATA STRUCTURES - SHORT NOTESsuthi
 
ARTIFICIAL INTELLIGENCE - SHORT NOTES
ARTIFICIAL INTELLIGENCE - SHORT NOTESARTIFICIAL INTELLIGENCE - SHORT NOTES
ARTIFICIAL INTELLIGENCE - SHORT NOTESsuthi
 
LIGHT PEAK
LIGHT PEAKLIGHT PEAK
LIGHT PEAKsuthi
 
Action Recognition using Nonnegative Action
Action Recognition using Nonnegative ActionAction Recognition using Nonnegative Action
Action Recognition using Nonnegative Actionsuthi
 
C Programming Tutorial
C Programming TutorialC Programming Tutorial
C Programming Tutorialsuthi
 
Data structure - mcqs
Data structure - mcqsData structure - mcqs
Data structure - mcqssuthi
 

Mais de suthi (20)

Object Oriented Programming -- Dr Robert Harle
Object Oriented Programming -- Dr Robert HarleObject Oriented Programming -- Dr Robert Harle
Object Oriented Programming -- Dr Robert Harle
 
THE ROLE OF EDGE COMPUTING IN INTERNET OF THINGS
THE ROLE OF EDGE COMPUTING IN INTERNET OF THINGSTHE ROLE OF EDGE COMPUTING IN INTERNET OF THINGS
THE ROLE OF EDGE COMPUTING IN INTERNET OF THINGS
 
EDGE COMPUTING: VISION AND CHALLENGES
EDGE COMPUTING: VISION AND CHALLENGESEDGE COMPUTING: VISION AND CHALLENGES
EDGE COMPUTING: VISION AND CHALLENGES
 
Document Classification Using KNN with Fuzzy Bags of Word Representation
Document Classification Using KNN with Fuzzy Bags of Word RepresentationDocument Classification Using KNN with Fuzzy Bags of Word Representation
Document Classification Using KNN with Fuzzy Bags of Word Representation
 
AUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTESAUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTES
 
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTESOBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
 
PARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTES
PARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTESPARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTES
PARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTES
 
SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTES
SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTESSOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTES
SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTES
 
COMPUTER HARDWARE - SHORT NOTES
COMPUTER HARDWARE - SHORT NOTESCOMPUTER HARDWARE - SHORT NOTES
COMPUTER HARDWARE - SHORT NOTES
 
DATA BASE MANAGEMENT SYSTEM - SHORT NOTES
DATA BASE MANAGEMENT SYSTEM - SHORT NOTESDATA BASE MANAGEMENT SYSTEM - SHORT NOTES
DATA BASE MANAGEMENT SYSTEM - SHORT NOTES
 
OPERATING SYSTEM - SHORT NOTES
OPERATING SYSTEM - SHORT NOTESOPERATING SYSTEM - SHORT NOTES
OPERATING SYSTEM - SHORT NOTES
 
SOFTWARE ENGINEERING & ARCHITECTURE - SHORT NOTES
SOFTWARE ENGINEERING & ARCHITECTURE - SHORT NOTESSOFTWARE ENGINEERING & ARCHITECTURE - SHORT NOTES
SOFTWARE ENGINEERING & ARCHITECTURE - SHORT NOTES
 
ALGORITHMS - SHORT NOTES
ALGORITHMS - SHORT NOTESALGORITHMS - SHORT NOTES
ALGORITHMS - SHORT NOTES
 
COMPUTER NETWORKS - SHORT NOTES
COMPUTER NETWORKS - SHORT NOTESCOMPUTER NETWORKS - SHORT NOTES
COMPUTER NETWORKS - SHORT NOTES
 
DATA STRUCTURES - SHORT NOTES
DATA STRUCTURES - SHORT NOTESDATA STRUCTURES - SHORT NOTES
DATA STRUCTURES - SHORT NOTES
 
ARTIFICIAL INTELLIGENCE - SHORT NOTES
ARTIFICIAL INTELLIGENCE - SHORT NOTESARTIFICIAL INTELLIGENCE - SHORT NOTES
ARTIFICIAL INTELLIGENCE - SHORT NOTES
 
LIGHT PEAK
LIGHT PEAKLIGHT PEAK
LIGHT PEAK
 
Action Recognition using Nonnegative Action
Action Recognition using Nonnegative ActionAction Recognition using Nonnegative Action
Action Recognition using Nonnegative Action
 
C Programming Tutorial
C Programming TutorialC Programming Tutorial
C Programming Tutorial
 
Data structure - mcqs
Data structure - mcqsData structure - mcqs
Data structure - mcqs
 

Último

Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 

Último (20)

Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 

Principles of Programming Languages - Lecture Notes

  • 1. Chapter 1 1.1Reasons for Studying Concepts of Programming Languages a) Increased ability to express ideas. • It is widely believed that the depth at which we think is influenced by the expressive power of the language in which we communicate our thoughts. • It is difficult for people to conceptualize structures they can’t describe, verbally or in writing. • Language in which they develop S/W places limits on the kinds of control structures, data structures, and abstractions they can use. • Awareness of a wider variety of P/L features can reduce such limitations in S/W development. b) Improved background for choosing appropriate languages • Many programmers when they are given a choice of languages for a new project, they use the language with which they are most familiar, even if it is poorly suited to new projects. • If these programmers were familiar with other languages available, they would be in a better position to make informed language choices. c) Greater ability to learn new languages • Programming languages are still in a state of continuous evolution, which means continuous learning is essential. • Programmers who understand the concept of Object Oriented programming will have easier time learning Java. • Once a thorough understanding of the fundamental concepts of languages is acquired, it becomes easier to see how concepts are incorporated into the design of the language being learned. d) Understand significance of implementation • Understanding of implementation issues leads to an understanding of why languages are designed the way they are. • This in turn leads to the ability to use a language more intelligently, as it was designed to be used. e) Ability to design new languages • The more languages you gain knowledge of, the better understanding of programming languages concepts you understand. f) Overall advancement of computing • In some cases, a language became widely used, at least in part, b/c those in positions to choose languages were not sufficiently familiar with P/L concepts. • Many believe that ALGOL 60 was a better language than Fortran; however, Fortran was most widely used. It is attributed to the fact that the programmers and managers didn’t understand the conceptual design of ALGOL 60.
  • 2. 1.2Programming Domains a) Scientific applications a. In the early 40s computers were invented for scientific applications. b. The applications require large number of floating point computations. c. Fortran was the first language developed scientific applications. d. ALGOL 60 was intended for the same use. b) Business applications a. The first successful language for business was COBOL. b. Produce reports, use decimal arithmetic numbers and characters. c. The arrival of PCs started new ways for businesses to use computers. d. Spreadsheets and database systems were developed for business. c) Artificial intelligence a. Symbolic rather than numeric computations are manipulated. b. Symbolic computation is more suitably done with linked lists than arrays. c. LISP was the first widely used AI programming language. d) Systems programming a. The O/S and all of the programming supports tools are collectively known as its system software. b. Need efficiency because of continuous use. e) Scripting languages a. A list of commands is kept at one place, called a script, in a file to be executed. b. PHP is a scripting language used on Web server systems. Its code is embedded in HTML documents. The code is interpreted on the server before the document is sent to a requesting browser. f) Special-purpose languages a. RPG is an example of these languages. 1.3 Language Evaluation Criteria I) Readability • Software development was largely thought of in term of writing code “LOC”. • Language constructs were designed more from the point of view of the computer than the users. • Because ease of maintenance is determined in large part by the readability of programs, readability became an important measure of the quality of programs and programming languages. The result is a crossover from focus on machine orientation to focus on human orientation. • The most important criterion “ease of use” i)Overall simplicity “Strongly affects readability” • Too many features make the language difficult to learn. Programmers tend to learn a subset of the language and ignore its other features. “ALGOL 60”
  • 3. • Multiplicity of features is also a complicating characteristic “having more than one way to accomplish a particular operation.” • Ex “Java”: 1. count = count + 1 2. count += 1 3. count ++ 4. ++count • Although the last two statements have slightly different meaning from each other and from the others, all four have the same meaning when used as stand-alone expressions. • Operator overloading where a single operator symbol has more than one meaning. • Although this is a useful feature, it can lead to reduced readability if users are allowed to create their own overloading and do not do it sensibly. b)Orthogonality • Makes the language easy to learn and read. • Meaning is context independent. Pointers should be able to point to any type of variable or data structure. The lack of orthogonality leads to exceptions to the rules of the language. • 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. • Every possible combination is legal and meaningful. • Ex: page 11 in book. • The more orthogonal the design of a language, the fewer exceptions the language rules require. • The most orthogonal programming language is ALGOL 68. Every language construct has a type, and there are no restrictions on those types. • This form of orthogonality leads to unnecessary complexity. c) Control Statements • It became widely recognized that indiscriminate use of goto statements severely reduced program readability. • Ex: Consider the following nested loops written in C i. while (incr < 20) ii. { iii. while (sum <= 100 iv. { 1. sum += incr; v. } vi. incr++; vii. }
  • 4. viii. if C didn’t have a loop construct, this would be written as follows: ix. loop1: x. if (incr >= 20) go to out; xi. loop2: xii. if (sum > 100) go to next; xiii. sum += incr; xiv. go to loop2; xv. next: xvi. incr++; xvii. go to loop1: xviii. out: • Basic and Fortran in the early 70s lacked the control statements that allow strong restrictions on the use of gotos, so writing highly readable programs in those languages was difficult. • Since then, languages have included sufficient control structures. • The control statement design of a language is now a less important factor in readability than it was in the past. d)Data Types and Structures • The presence of adequate facilities for defining data types and data structures in a language is another significant aid to reliability. • Ex: Boolean type. timeout = 1 or timeout = true e) Syntax Considerations • The syntax of the elements of a language has a significant effect on readability. • The following are examples of syntactic design choices that affect readability: i. Identifier forms: Restricting identifiers to very short lengths detracts from readability. ANSI BASIC (1978) an identifier could consist only of a single letter of a single letter followed by a single digit. ii. Special Words: Program appearance and thus program readability are strongly influenced by the forms of a language’s special words. Ex: while, class, for. C uses braces for pairing control structures. It is difficult to determine which group is being ended. Fortran 95 allows programmers to use special names as legal variable names. iii. Form and Meaning: Designing statements so that their appearance at least partially indicates their purpose is an obvious aid to readability. iv. Semantic should follow directly from syntax, or form. Ex: In C the use of static depends on the context of its appearance. 1. If used as a variable inside a function, it means the variable is created at compile time.
  • 5. 2. If used on the definition of a variable that is outside all functions, it means the variable is visible only in the file in which its definition appears. II)Writability • It is a measure of how easily a language can be used to create programs for a chosen problem domain. • Most of the language characteristics that affect readability also affect writability. a)Simplicity and orthogonality • A smaller number of primitive constructs and a consistent set of rules for combining them is much better than simply having a large number of primitives. b)Abstraction • Abstraction means the ability to define and then use complicated structures or operations in ways that allow many of the details to be ignored. • A process abstraction is the use of a subprogram to implement a sort algorithm that is required several times in a program instead of replicating it in all places where it is needed. c)Expressivity • It means that a language has relatively convenient, rather than cumbersome, ways of specifying computations. • Ex: ++count ⇔ count = count + 1 // more convenient and shorter III)Reliability • A program is said to be reliable if it performs to its specifications under all conditions. a)Type checking: is simply testing for type errors in a given program, either by the compiler or during program execution. b)Exception handling: the ability to intercept run-time errors, take corrective measures, and then continue is a great aid to reliability. c) Aliasing: it is having two or more distinct referencing methods, or names, for the same memory cell. • It is now widely accepted that aliasing is a dangerous feature in a language. . Iv)Cost • Categories i. Training programmers to use language ii. Writing programs “Writability” iii. Compiling programs iv. Executing programs v. Language implementation system “Free compilers is the key, success of Java” vi. Reliability Readability and writability: Both readability and writability influence reliability
  • 6. vii. Maintaining programs: Maintenance costs can be as high as two to four times as much as development costs. viii. Portability “standardization of the language” 1.4Influences on Language Design • Computer architecture: the first architecture is “Von Neumann” • We use imperative languages, at least in part, because we use von Neumann machines i. Data and programs stored in same memory ii. Memory is separate from CPU iii. Instructions and data are piped from memory to CPU iv. Results of operations in the CPU must be moved back to memory v. Basis for imperative languages • Variables model memory cells • Assignment statements model piping • Iteration is efficient b)Programming methodologies i. 1950s and early 1960s: Simple applications; worry about machine efficiency ii. Late 1960s: People efficiency became important; readability, better control structures a. Structured programming b. Top-down design and step-wise refinement iii. Late 1970s: Process-oriented to data-oriented a. data abstraction iv. Middle 1980s: Object-oriented programming
  • 7. 1.5Language Categories • Design Principles – Modularity, abstraction, contracts… • Programming languages features • a) Imperative • Central features are variables, assignment statements, and iteration Ex: C, Pascal b)Functional Programming •Main means of making computations is by applying functions to given parameters Ex. Scheme, ML ,LISP, Scheme c)Logic Programming •Rule-based •Rules are specified in no special order •“Declarative Programming” E.g. Prolog d) Object Oriented Programming • Encapsulate data objects with processing • Inheritance and dynamic type binding • Grew out of imperative languages Ex C,Java, Pascal 1.8Programming Environments • The collection of tools used in software development • UNIX – An older operating system and tool collection • Borland JBuilder – An integrated development environment for Java • Microsoft Visual Studio.NET – A large, complex visual environment – Used to program in C#, Visual BASIC.NET, Jscript, J#, or C++