SlideShare una empresa de Scribd logo
1 de 40
Programming and Paradigms
Course overview
Edward (Ned) Blurock
Lecture: Programming
Paradigm
CIS: Edward Blruock
LANGUAGES
Why so many programming Languages?
Lecture: Programming
Paradigm
CIS: Edward Blruock
Programming Language
Lecture: Programming
Paradigm
CIS: Edward Blruock
The process of developing and implementing
various sets of instructions
to enable a computer to do a certain task.
The language used to program computers is not understood by an
untrained eye. Computer programming continues to be a necessary
process as the Internet continues to expand.
Read more: http://www.businessdictionary.com/definition/computer-
programming.html#ixzz3jLVEiKeK
Top Ten Programming Languages
Lecture: Programming
Paradigm
CIS: Edward Blruock
Top Ten
Lecture: Programming
Paradigm
CIS: Edward Blruock
1. http://spectrum.ieee.org/computing/software/the-2015-top-ten-
programming-languages
2. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.h
tml
3. http://timesofindia.indiatimes.com/tech/slideshow/10-
programming-languages-you-need-to-know-in-
2015/itslideshowviewall/46286489.cms
4. http://www.inc.com/larry-kim/10-most-popular-programming-
languages-today.html
5. http://mashable.com/2015/01/18/programming-languages-
2015/
Wierdest
Lecture: Programming
Paradigm
CIS: Edward Blruock
http://tutorialzine.com/2013/12/the-10-weirdest-programming-languages/
High-level programming language
Lecture: Programming
Paradigm
CIS: Edward Blruock
"High-level language" refers to the higher level of
abstraction from machine language.
Abstraction penalty:
Execution modes
• Interpreted
• Compiled
• Machine code generation: assembly language
• Intermediate code: byte code
• Source to Source: trans-compiled
https://en.wikipedia.org/wiki/High-level_programming_language
AbstractionPenalty
Lecture: Programming
Paradigm
CIS: Edward Blruock
While high-level languages are intended to make complex
programming simpler, low-level languages often produce more
efficient code. Abstraction penalty is the border that prevents
high-level programming techniques from being applied in
situations where computational resources are limited. High-level
programming exhibits features like more generic data structures,
run-time interpretation, and intermediate code files; which often
result in slower execution speed, higher memory consumption,
and larger binary program size
Abstraction
Lecture: Programming
Paradigm
CIS: Edward Blruock
Abstraction can apply to control or to data:
Control abstraction is the abstraction of actions while
Data abstraction is that of data structures.
Control abstraction
involves the use of subprograms and related concepts control flows
Data abstraction
allows handling data bits in meaningful ways.
For example, it is the basic motivation behind datatype.
One can view the notion of an object as a way to combine abstractions of data and code.
The same abstract definition can be used as a common interface for a family of objects
with different implementations and behaviors but which share the same meaning.
The inheritance mechanism in object-oriented programming can be used to define an
abstract class as the common interface.
History
Lecture: Programming
Paradigm
CIS: Edward Blruock
http://www.paulgraham.com/fix.html
What languages fix
A view of the development of languages:
The NEXT language
fixes short-comings
of the PREVIOUS language
Power of a Language
Lecture: Programming
Paradigm
CIS: Edward Blruock
All languages are equally powerful in the sense of being Turing equivalent, but
that's not the sense of the word programmers care about. (No one wants to
program a Turing machine.)
The kind of power programmers care about may not be formally definable,
but one way to explain it would be to say that it refers to features you could only
get in the less powerful language by writing an interpreter for the more powerful
language in it.
If language A has an operator for removing spaces from strings
and language B doesn't, that probably doesn't make A more powerful,
because you can probably write a subroutine to do it in B.
But if A supports, say, recursion, and B doesn't,
that's not likely to be something you can fix by writing library functions.
Paul Graham: http://www.paulgraham.com/avg.html
Blub Paradox
Lecture: Programming
Paradigm
CIS: Edward Blruock
Programmers get very attached to their favorite languages,
and I don't want to hurt anyone's feelings, so to explain this point I'm
going to use a hypothetical language called Blub.
Blub falls right in the middle of the abstractness continuum.
It is not the most powerful language,
but it is more powerful than Cobol or machine language.
Paul Graham: http://www.paulgraham.com/avg.html
The Blub Paradox
Lecture: Programming
Paradigm
CIS: Edward Blruock
As long as our hypothetical Blub programmer is looking down the power continuum,
he knows he's looking down.
Languages less powerful than Blub are obviously less powerful,
because they're missing some feature he's used to.
But when our hypothetical Blub programmer looks in the other direction, up the
power continuum,
he doesn't realize he's looking up.
What he sees are merely weird languages.
He probably considers them about equivalent in power to Blub, but with all this other
hairy stuff thrown in as well.
Blub is good enough for him, because he thinks in Blub.
Paul Graham: http://www.paulgraham.com/avg.html
Blub Paradox
Lecture: Programming
Paradigm
CIS: Edward Blruock
You can't trust the opinions of the others, because of the Blub paradox:
they're satisfied with whatever language they happen to use,
because it dictates the way they think about programs.
I know this from my own experience,
as a high school kid writing programs in Basic.
That language didn't even support recursion.
It's hard to imagine writing programs without using recursion,
but I didn't miss it at the time.
I thought in Basic.
And I was a whiz at it.
Master of all I surveyed.
Paul Graham: http://www.paulgraham.com/avg.html
A reason to take this course
Lecture: Programming
Paradigm
CIS: Edward Blruock
Learn at least one new [programming] language every
year.
Different languages solve the same problems in
different ways.
By learning several different approaches, you can help
broaden your thinking and avoid getting stuck in a rut.
The Pragmatic Programmer: From Journeyman to Master
Andrew Hunt
http://www.amazon.com/The-Pragmatic-Programmer-Journeyman-Master/dp/020161622X
© O. Nierstrasz PS — Denotational Semantics 8.16
Defining Programming Languages
There are three main characteristics of
programming languages:
1. Syntax: What is the appearance and structure of its programs?
2. Semantics: What is the meaning of programs?
The static semantics tells us which (syntactically valid) programs are
semantically valid (i.e., which are type correct) and the dynamic semantics
tells us how to interpret the meaning of valid programs.
3. Pragmatics: What is the usability of the language? How easy is it to
implement? What kinds of applications does it suit?
Programming Languages
© O. Nierstrasz PS — Denotational Semantics 8.17
1. Syntactic Abstraction Mechanism:
to reduce repetitive "boilerplate" code that cannot be abstracted
from using another language's built-in abstraction mechanisms.
2. Thought shaper:
to induce a paradigm shift in how one should structure software
(changing the "path of least resistance").
3. Simplifier:
to boil down an existing paradigm to just its essential parts, often to
increase understanding and insight.
4. Law Enforcer:
to enforce important properties or invariants, possibly to make it
easier to infer more useful properties from programs.
Tom Van Cutsam: http://soft.vub.ac.be/~tvcutsem/whypls.html
syntactic abstraction mechanism
Lecture: Programming
Paradigm
CIS: Edward Blruock
Purpose:
Lightweight syntax that lets programmers do the same
things as before, but with less code
Example: C
provides multiple looping constructs,
multiple conditional constructs,
multiple constructs for incrementing/updating the value of a variable.
loop through the elements of arrays
increment or decrement the values of variables
perform multiway conditionals based on numeric or character values.
Programming language designers provide special purpose syntactic constructs that
handle the most common patterns.
The opposite: no syntactic abstraction
Lecture: Programming
Paradigm
CIS: Edward Blruock
Language: Chicken http://torso.me/chicken
https://isotropic.org/papers/chicken.pdf
https://www.youtube.com/watch?v=yL_-1d9OSdk
Language: Chickens
Lecture: Programming
Paradigm
CIS: Edward Blruock
1. A chicken program consists of the tokens "chicken", " " and "n”.
2. Every line has a number of chickens separated by spaces.
3. The number of chickens corresponds to an opcode.
4. Trailing newlines are significant, as an empty line will produce a "0" opcode.
5. Instructions are loaded onto the stack and executed there directly, which allows for
injecting arbitrary code and executing it through a jump.
6. Self-modifying code is also possible because the program stack is not bounded.
7. The user is able to supply an input value before executing the program. This input is
stored in one of the two registers.
The operations:
http://esolangs.org/wiki/Chicken
thought shaper
Lecture: Programming
Paradigm
CIS: Edward Blruock
The goal of a thought shaper language is to change the way a programmer thinks about
structuring his or her program.
The basic building blocks provided by a programming language,
as well as the ways in which they can (or cannot) be combined,
will tend to lead programmers down a "path of least resistance",
for some unit of resistance.
For example,
an imperative programming style is definitely the path of least resistance in C.
It's possible to write functional C programs, but as C does not make it the path of least
resistance, most C programs will not be functional.
Thought Shaper
Lecture: Programming
Paradigm
CIS: Edward Blruock
Experienced programmers carry quite a number of patterns around in their heads.
They may have learned these patterns from books or by hard won experience.
The patterns enable a fluid style of programming where attention can be maintained on
the unknown parts of the task at hand and work feels productive.
Programmers tend to like programming languages
that have good support for the patterns they use.
Programmers don't like languages
that disallow or inconvenience the patterns they use.
They are also rarely impressed by language features that support patterns they don't
know or use.
http://c2.com/cgi/wiki?BlubParadox
Thought Shaper
Lecture: Programming
Paradigm
CIS: Edward Blruock
(pure) Functional Programming
Functional programming languages, by the way, are a good example of
thought shaper languages.
By taking away assignment from the programmer's basic toolbox,
the language really forces programmers coming from an imperative language
to change their coding habits.
Thought Shaper
Lecture: Programming
Paradigm
CIS: Edward Blruock
linguistic relativity
holds that cognitive processes, such as thought and experience,
may be influenced by the categories and patterns of the language a
person speaks.
From the field of linquistics
https://en.wikipedia.org/wiki/Linguistic_relativity
the structure of a language affects the ways in which its respective
speakers conceptualize their world, i.e. their world view, or
otherwise influences their cognitive processes.
a simplifier
Lecture: Programming
Paradigm
CIS: Edward Blruock
A designer knows he has achieved perfection not when there is nothing
left to add, but when there is nothing left to take away.
In software, the most beautiful code, the most beautiful functions, and the
most beautiful programs are sometimes not there at all.
Bentley, Jon, The most beautiful code I never wrote, Beautiful Code, O'Reilly Media, Inc.,2007
law enforcer
Lecture: Programming
Paradigm
CIS: Edward Blruock
http://www.cs.cornell.edu/courses/cs1130/2012sp/1130selfpaced/module1/module1part4/strongtyping.html
One property that is sometimes looked for in
a programming language is safety
Safety:
Any attempt to misinterpret data is caught at compile time
or generates a well-specified error at runtime.
definition used in the year 2000 by an ad hoc committee that
recommended that the Advanced Placement (AP) test in programming be
based on the programming language Java
Strong Typing
Lecture: Programming
Paradigm
CIS: Edward Blruock
Some errors arise from lack of understanding;
others are logical errors caused by inadequate thinking and design;
and some are simply typos.
In all cases, finding errors early, at compile time, can save
immense amounts of time.
Safety and strong typing make possible
the early detection of many errors.
A strongly typed language has one simple feature: knowledge of a value’s type at runtime.
Strong vs. Weak Typing
Lecture: Programming
Paradigm
CIS: Edward Blruock
String foo = "Hello, world!";
Object obj = foo;
String bar = (String) obj;
Date baz = (Date) obj;
The above example will run perfectly fine
until the last line,
which will raise a ClassCastException.
This is because Java is indeed strongly typed.
Even though the obj variable is of the type Object, its value
is still a String. Casting it to a String works fine, but trying to
cast it to a Date fails.
char* foo = "Hello, world!";
int x = foo * 10;
printf("%in", x);
The above block is valid C code,
but the output is not well-defined.
…. This is because C does not store anything in memory
other than the raw values—it would be impossible at
runtime to know that foo was a char* and x was an int.
Strong
Weak
Program Verification:
Bugs
Lecture: Programming
Paradigm
CIS: Edward Blruock
Here are some famous ones:
ESA Ariane 5 Flight 501 self-destruction
40 seconds after takeoff (June 4, 1996).
A conversion from 64-bit floating point to 16 bit integer
with a value larger than possible with Arian 4.
The overflow caused a hardware trap
The Pentium bug
Incorrect floating-point division.
Cost Intel ~ $400,000,000
The 2003 North America blackout
was triggered by a local outage that went undetetected.
A race condition in General Electric’s monitoring software prevented an alarm
Program Verification:
Testing
Lecture: Programming
Paradigm
CIS: Edward Blruock
When you look at a big commercial software company like Microsoft,
there's actually as much testing that goes in as development. We have
as many testers as we have developers. Testers basically test all the
time, and developers basically are involved in the testing process about
half the time…
Bill Gates:
The test cases are unbelievably expensive; in fact, there's more lines
of code in the test harness than there is in the program itself. Often
that's a ratio of about three to one
Program Verification
Lecture: Programming
Paradigm
CIS: Edward Blruock
Formal = based on rigorous mathematical logic concepts.
Once we formally specify what we expect from the program, we
can try to prove that the program satisfies the specification.
Styles of formal semantics
Lecture: Programming
Paradigm
CIS: Edward Blruock
Operational.
Meanings for program phrases defined in terms of the steps
of computation they can take during program execution.
Axiomatic.
Meanings for program phrases defined indirectly via the axioms
and rules of some logic of program properties.
Denotational.
Concerned with giving mathematical models of programming
languages. Meanings for program phrases defined abstractly
as elements of some suitable mathematical structure.
Denotational Semantics Example
Lecture: Programming
Paradigm
CIS: Edward Blruock
<expr> → number
| ( <expr> )
| <expri>+ <expr>
| <expri>− <expr>
| <expri>∗ <expr>
| <expr>/<expr>
[[n1 + n2]] = rep(n1) + rep(n2)
[[e1+e2]] = [[e1]] + [[e2]]
Denotational Semantics Example
Lecture: Programming
Paradigm
CIS: Edward Blruock
Operational Semantics
Lecture: Programming
Paradigm
CIS: Edward Blruock
A category of formal programming language semantics
in which certain desired properties of a program,
such as correctness, safety or security,
are verified by
constructing proofs from
logical statements about its execution,
rather than by attaching mathematical meanings to its terms
(denotational semantics).
The operational semantics for a programming language describes how a
valid program is interpreted as sequences of computational steps
Operational Semantics
Lecture: Programming
Paradigm
CIS: Edward Blruock
Two categories:
structural operational semantics
(or small-step semantics)
formally describe how the individual steps of a computation
take place in a computer-based system.
natural semantics
(or big-step semantics)
describe how the overall results of the executions are obtained.
Operational Semantics
Lecture: Programming
Paradigm
CIS: Edward Blruock
The process:
1. Identify a virtual machine (an idealized computer)
2. Build a translator (translates source code to the machine code
of an idealized computer)
3. Build a simulator for the idealized computer
Operational semantics is sometimes called translational
semantics, if an existing PL is used in place of the virtual machine
http://courses.cs.vt.edu/~cs3304/Spring00/notes/Chapter-3b/index.htm
Axiomatic Semantics
Lecture: Programming
Paradigm
CIS: Edward Blruock
• An assertion before a statement is called a precondition
• An assertion following a statement is a postcondition
Based on formal logic (first order predicate calculus)
Original purpose: formal program verification
Approach:
Define axioms or inference rules
for each statement type in the language
Inference rule
allows one to transform expressions to other expressions
assertions
state the relationships and constraints among variables
that are true at a specific point in execution
Axiomatic Semantics
Lecture: Programming
Paradigm
CIS: Edward Blruock
Logic Programming (declarative) view of program
Translation to logical statements means you can construct a proof
For example:
Can verify the correctness of the program
automatically through
automatic theorem provers
If the precondition on the first statement is the same as the program spec,
the program is correct
Program proof process:
The postcondition for the whole program is the desired results
Work back through the program to the first statement
Denotational Semantics
Lecture: Programming
Paradigm
CIS: Edward Blruock
denotational semantics (initially known as mathematical semantics or Scott–
Strachey semantics) is an approach of formalizing the meanings of
programming languages by constructing mathematical objects (called
denotations) that describe the meanings of expressions from the languages.
Other approaches to providing formal semantics of programming languages
include axiomatic semantics and operational semantics.
https://en.wikipedia.org/wiki/Denotational_semantics
With formal semantics we give programs meaning by mapping them into
some abstract but precise domain of objects. Using denotational semantics,
we provide meaning in terms of mathematical objects, such as integers,
truth values, tuples of values, and functions. For this reason, denotational
semantics was originally called mathematical semantics.
http://homepage.cs.uiowa.edu/~slonnegr/plf/Book/Chapter9.pdf

Más contenido relacionado

La actualidad más candente

Programming Paradigms Seminar 1
Programming Paradigms Seminar 1Programming Paradigms Seminar 1
Programming Paradigms Seminar 1neoxiuting
 
Programming Paradigms
Programming ParadigmsProgramming Paradigms
Programming ParadigmsLeo Hernandez
 
Programming language
Programming languageProgramming language
Programming languageDhani Ahmad
 
Programming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharProgramming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharVivek Parihar
 
SD & D Types of programming language
SD & D Types of programming languageSD & D Types of programming language
SD & D Types of programming languageForrester High School
 
Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Krishna Sai
 
Programming language design and implemenation
Programming language design and implemenationProgramming language design and implemenation
Programming language design and implemenationAshwini Awatare
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languagesVarun Garg
 
Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Akshay Nagpurkar
 
PROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESPROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESABHINAV SINGH
 
Programming Languages An Intro
Programming Languages An IntroProgramming Languages An Intro
Programming Languages An IntroKimberly De Guzman
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming conceptssalmankhan570
 

La actualidad más candente (20)

Programming Paradigms Seminar 1
Programming Paradigms Seminar 1Programming Paradigms Seminar 1
Programming Paradigms Seminar 1
 
Programming Paradigms
Programming ParadigmsProgramming Paradigms
Programming Paradigms
 
Programming language
Programming languageProgramming language
Programming language
 
Programming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharProgramming languages and concepts by vivek parihar
Programming languages and concepts by vivek parihar
 
SD & D Types of programming language
SD & D Types of programming languageSD & D Types of programming language
SD & D Types of programming language
 
Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-Principles of-programming-languages-lecture-notes-
Principles of-programming-languages-lecture-notes-
 
SD & D Implementation
SD & D ImplementationSD & D Implementation
SD & D Implementation
 
Programming language design and implemenation
Programming language design and implemenationProgramming language design and implemenation
Programming language design and implemenation
 
Programing Language
Programing LanguagePrograming Language
Programing Language
 
Procedural programming
Procedural programmingProcedural programming
Procedural programming
 
Introduction to programming languages part 1
Introduction to programming languages   part 1Introduction to programming languages   part 1
Introduction to programming languages part 1
 
Text Editors and IDEs
Text Editors and IDEsText Editors and IDEs
Text Editors and IDEs
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
 
Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3Ppl for students unit 1,2 and 3
Ppl for students unit 1,2 and 3
 
PROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESPROGRAMMING LANGUAGES
PROGRAMMING LANGUAGES
 
Go programing language
Go programing languageGo programing language
Go programing language
 
Programming landuages
Programming landuagesProgramming landuages
Programming landuages
 
Programming Languages An Intro
Programming Languages An IntroProgramming Languages An Intro
Programming Languages An Intro
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
 
Introduction to programing languages part 1
Introduction to programing languages   part 1Introduction to programing languages   part 1
Introduction to programing languages part 1
 

Destacado

Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigmBhavin Kamani
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
Programming languages
Programming languagesProgramming languages
Programming languagesAkash Varaiya
 
Types: Weak/Duck/Optional vs Strong/Strict. Let the War Begin!
Types: Weak/Duck/Optional vs Strong/Strict. Let the War Begin!Types: Weak/Duck/Optional vs Strong/Strict. Let the War Begin!
Types: Weak/Duck/Optional vs Strong/Strict. Let the War Begin!Victor_Cr
 
Comparison of Type Systems
Comparison of Type SystemsComparison of Type Systems
Comparison of Type SystemsTamer Abdul-Radi
 
Webinar: Strongly Typed Languages and Flexible Schemas
Webinar: Strongly Typed Languages and Flexible SchemasWebinar: Strongly Typed Languages and Flexible Schemas
Webinar: Strongly Typed Languages and Flexible SchemasMongoDB
 
ADA programming language
ADA programming languageADA programming language
ADA programming languageAisha Kalsoom
 
Programming paradigm and web programming
Programming paradigm and web programmingProgramming paradigm and web programming
Programming paradigm and web programmingMohammad Kamrul Hasan
 
Describe professional programing languages and talks
Describe professional programing languages and talks Describe professional programing languages and talks
Describe professional programing languages and talks Ed Bray
 
Intro to functional programming
Intro to functional programmingIntro to functional programming
Intro to functional programmingAssaf Gannon
 
Introduction of Functional Programming
Introduction of Functional ProgrammingIntroduction of Functional Programming
Introduction of Functional Programming☁️ Mikhail Shilkov
 
Generations Of Programming Languages
Generations Of Programming LanguagesGenerations Of Programming Languages
Generations Of Programming Languagespy7rjs
 
Programming Paradigms Which One Is The Best?
Programming Paradigms Which One Is The Best?Programming Paradigms Which One Is The Best?
Programming Paradigms Which One Is The Best?Netguru
 

Destacado (20)

Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigm
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Types: Weak/Duck/Optional vs Strong/Strict. Let the War Begin!
Types: Weak/Duck/Optional vs Strong/Strict. Let the War Begin!Types: Weak/Duck/Optional vs Strong/Strict. Let the War Begin!
Types: Weak/Duck/Optional vs Strong/Strict. Let the War Begin!
 
Comparison of Type Systems
Comparison of Type SystemsComparison of Type Systems
Comparison of Type Systems
 
Webinar: Strongly Typed Languages and Flexible Schemas
Webinar: Strongly Typed Languages and Flexible SchemasWebinar: Strongly Typed Languages and Flexible Schemas
Webinar: Strongly Typed Languages and Flexible Schemas
 
Plc (1)
Plc (1)Plc (1)
Plc (1)
 
Run time
Run timeRun time
Run time
 
ADA programming language
ADA programming languageADA programming language
ADA programming language
 
PHP
 PHP PHP
PHP
 
Thesis power point dream
Thesis power point dreamThesis power point dream
Thesis power point dream
 
Programming paradigm and web programming
Programming paradigm and web programmingProgramming paradigm and web programming
Programming paradigm and web programming
 
Describe professional programing languages and talks
Describe professional programing languages and talks Describe professional programing languages and talks
Describe professional programing languages and talks
 
Parsing
ParsingParsing
Parsing
 
C++ language
C++ languageC++ language
C++ language
 
Intro to functional programming
Intro to functional programmingIntro to functional programming
Intro to functional programming
 
Overview of programming paradigms
Overview of programming paradigmsOverview of programming paradigms
Overview of programming paradigms
 
Introduction of Functional Programming
Introduction of Functional ProgrammingIntroduction of Functional Programming
Introduction of Functional Programming
 
Generations Of Programming Languages
Generations Of Programming LanguagesGenerations Of Programming Languages
Generations Of Programming Languages
 
Programming Paradigms Which One Is The Best?
Programming Paradigms Which One Is The Best?Programming Paradigms Which One Is The Best?
Programming Paradigms Which One Is The Best?
 

Similar a Programming Languages

Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Md. Imran Hossain Showrov
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programmingMukesh Tekwani
 
Introduction To Computer Programming
Introduction To Computer ProgrammingIntroduction To Computer Programming
Introduction To Computer ProgrammingHussain Buksh
 
Trend of Visual Programming Language
Trend of Visual Programming LanguageTrend of Visual Programming Language
Trend of Visual Programming LanguageTeddy Marcus
 
English de lenguaje de programacion
English de lenguaje de programacionEnglish de lenguaje de programacion
English de lenguaje de programacionVillalba Griselda
 
COMP LESSON 2 - COMPUTER PROGRAMING 2023
COMP LESSON 2 - COMPUTER  PROGRAMING 2023COMP LESSON 2 - COMPUTER  PROGRAMING 2023
COMP LESSON 2 - COMPUTER PROGRAMING 2023Charie Pincas
 
Interfacing With High Level Programming Language
Interfacing With High Level Programming Language Interfacing With High Level Programming Language
Interfacing With High Level Programming Language .AIR UNIVERSITY ISLAMABAD
 
Grade 8: Introduction To Java
Grade 8: Introduction To JavaGrade 8: Introduction To Java
Grade 8: Introduction To Javanandanrocker
 
ICT-DBA4 -05-0811-Apply-Object-Oriented-Programming-Language-Skills.doc
ICT-DBA4 -05-0811-Apply-Object-Oriented-Programming-Language-Skills.docICT-DBA4 -05-0811-Apply-Object-Oriented-Programming-Language-Skills.doc
ICT-DBA4 -05-0811-Apply-Object-Oriented-Programming-Language-Skills.docAmanGunner
 
Computer Science Is The Study Of Principals And How The...
Computer Science Is The Study Of Principals And How The...Computer Science Is The Study Of Principals And How The...
Computer Science Is The Study Of Principals And How The...Laura Martin
 
CSCorganization of programming languages
CSCorganization of programming languagesCSCorganization of programming languages
CSCorganization of programming languagesOluwafolakeOjo
 
Procedural Programming Of Programming Languages
Procedural Programming Of Programming LanguagesProcedural Programming Of Programming Languages
Procedural Programming Of Programming LanguagesTammy Moncrief
 

Similar a Programming Languages (20)

Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language
 
Programming
ProgrammingProgramming
Programming
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programming
 
Introduction To Computer Programming
Introduction To Computer ProgrammingIntroduction To Computer Programming
Introduction To Computer Programming
 
Trend of Visual Programming Language
Trend of Visual Programming LanguageTrend of Visual Programming Language
Trend of Visual Programming Language
 
SYSTEM DEVELOPMENT
SYSTEM DEVELOPMENTSYSTEM DEVELOPMENT
SYSTEM DEVELOPMENT
 
English de lenguaje de programacion
English de lenguaje de programacionEnglish de lenguaje de programacion
English de lenguaje de programacion
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
COMP LESSON 2 - COMPUTER PROGRAMING 2023
COMP LESSON 2 - COMPUTER  PROGRAMING 2023COMP LESSON 2 - COMPUTER  PROGRAMING 2023
COMP LESSON 2 - COMPUTER PROGRAMING 2023
 
C tutorial
C tutorialC tutorial
C tutorial
 
Interfacing With High Level Programming Language
Interfacing With High Level Programming Language Interfacing With High Level Programming Language
Interfacing With High Level Programming Language
 
Grade 8: Introduction To Java
Grade 8: Introduction To JavaGrade 8: Introduction To Java
Grade 8: Introduction To Java
 
ICT-DBA4 -05-0811-Apply-Object-Oriented-Programming-Language-Skills.doc
ICT-DBA4 -05-0811-Apply-Object-Oriented-Programming-Language-Skills.docICT-DBA4 -05-0811-Apply-Object-Oriented-Programming-Language-Skills.doc
ICT-DBA4 -05-0811-Apply-Object-Oriented-Programming-Language-Skills.doc
 
Computer Science Is The Study Of Principals And How The...
Computer Science Is The Study Of Principals And How The...Computer Science Is The Study Of Principals And How The...
Computer Science Is The Study Of Principals And How The...
 
CSCorganization of programming languages
CSCorganization of programming languagesCSCorganization of programming languages
CSCorganization of programming languages
 
Procedural Programming Of Programming Languages
Procedural Programming Of Programming LanguagesProcedural Programming Of Programming Languages
Procedural Programming Of Programming Languages
 
Features of c
Features of cFeatures of c
Features of c
 
Introduction to programming c
Introduction to programming cIntroduction to programming c
Introduction to programming c
 
Notacd07
Notacd07Notacd07
Notacd07
 
Nota programming
Nota programmingNota programming
Nota programming
 

Más de Edward Blurock

KEOD23-JThermodynamcsCloud
KEOD23-JThermodynamcsCloudKEOD23-JThermodynamcsCloud
KEOD23-JThermodynamcsCloudEdward Blurock
 
BlurockPresentation-KEOD2023
BlurockPresentation-KEOD2023BlurockPresentation-KEOD2023
BlurockPresentation-KEOD2023Edward Blurock
 
ChemConnect: Poster for European Combustion Meeting 2017
ChemConnect: Poster for European Combustion Meeting 2017ChemConnect: Poster for European Combustion Meeting 2017
ChemConnect: Poster for European Combustion Meeting 2017Edward Blurock
 
ChemConnect: SMARTCATS presentation
ChemConnect: SMARTCATS presentationChemConnect: SMARTCATS presentation
ChemConnect: SMARTCATS presentationEdward Blurock
 
EU COST Action CM1404: WG€ - Efficient Data Exchange
EU COST Action CM1404: WG€ - Efficient Data ExchangeEU COST Action CM1404: WG€ - Efficient Data Exchange
EU COST Action CM1404: WG€ - Efficient Data ExchangeEdward Blurock
 
ChemConnect: Viewing the datasets in the repository
ChemConnect: Viewing the datasets in the repositoryChemConnect: Viewing the datasets in the repository
ChemConnect: Viewing the datasets in the repositoryEdward Blurock
 
ChemConnect: Characterizing CombusAon KineAc Data with ontologies and meta-­‐...
ChemConnect: Characterizing CombusAon KineAc Data with ontologies and meta-­‐...ChemConnect: Characterizing CombusAon KineAc Data with ontologies and meta-­‐...
ChemConnect: Characterizing CombusAon KineAc Data with ontologies and meta-­‐...Edward Blurock
 
Poster: Characterizing Ignition behavior through morphing to generic curves
Poster: Characterizing Ignition behavior through morphing to generic curvesPoster: Characterizing Ignition behavior through morphing to generic curves
Poster: Characterizing Ignition behavior through morphing to generic curvesEdward Blurock
 
Poster: Very Open Data Project
Poster: Very Open Data ProjectPoster: Very Open Data Project
Poster: Very Open Data ProjectEdward Blurock
 
Poster: Adaptive On-­‐the-­‐fly Regression Tabula@on: Beyond ISAT
Poster: Adaptive On-­‐the-­‐fly Regression Tabula@on: Beyond ISATPoster: Adaptive On-­‐the-­‐fly Regression Tabula@on: Beyond ISAT
Poster: Adaptive On-­‐the-­‐fly Regression Tabula@on: Beyond ISATEdward Blurock
 
Characterization Ignition Behavior through Morphing to Generic Ignition Curves
Characterization Ignition Behavior through Morphing to Generic Ignition CurvesCharacterization Ignition Behavior through Morphing to Generic Ignition Curves
Characterization Ignition Behavior through Morphing to Generic Ignition CurvesEdward Blurock
 
Computability, turing machines and lambda calculus
Computability, turing machines and lambda calculusComputability, turing machines and lambda calculus
Computability, turing machines and lambda calculusEdward Blurock
 
Database normalization
Database normalizationDatabase normalization
Database normalizationEdward Blurock
 
Generalization abstraction
Generalization abstractionGeneralization abstraction
Generalization abstractionEdward Blurock
 
Computability and Complexity
Computability and ComplexityComputability and Complexity
Computability and ComplexityEdward Blurock
 

Más de Edward Blurock (20)

KEOD23-JThermodynamcsCloud
KEOD23-JThermodynamcsCloudKEOD23-JThermodynamcsCloud
KEOD23-JThermodynamcsCloud
 
BlurockPresentation-KEOD2023
BlurockPresentation-KEOD2023BlurockPresentation-KEOD2023
BlurockPresentation-KEOD2023
 
KEOD-2023-Poster.pptx
KEOD-2023-Poster.pptxKEOD-2023-Poster.pptx
KEOD-2023-Poster.pptx
 
ChemConnect: Poster for European Combustion Meeting 2017
ChemConnect: Poster for European Combustion Meeting 2017ChemConnect: Poster for European Combustion Meeting 2017
ChemConnect: Poster for European Combustion Meeting 2017
 
ChemConnect: SMARTCATS presentation
ChemConnect: SMARTCATS presentationChemConnect: SMARTCATS presentation
ChemConnect: SMARTCATS presentation
 
EU COST Action CM1404: WG€ - Efficient Data Exchange
EU COST Action CM1404: WG€ - Efficient Data ExchangeEU COST Action CM1404: WG€ - Efficient Data Exchange
EU COST Action CM1404: WG€ - Efficient Data Exchange
 
ChemConnect: Viewing the datasets in the repository
ChemConnect: Viewing the datasets in the repositoryChemConnect: Viewing the datasets in the repository
ChemConnect: Viewing the datasets in the repository
 
ChemConnect: Characterizing CombusAon KineAc Data with ontologies and meta-­‐...
ChemConnect: Characterizing CombusAon KineAc Data with ontologies and meta-­‐...ChemConnect: Characterizing CombusAon KineAc Data with ontologies and meta-­‐...
ChemConnect: Characterizing CombusAon KineAc Data with ontologies and meta-­‐...
 
Poster: Characterizing Ignition behavior through morphing to generic curves
Poster: Characterizing Ignition behavior through morphing to generic curvesPoster: Characterizing Ignition behavior through morphing to generic curves
Poster: Characterizing Ignition behavior through morphing to generic curves
 
Poster: Very Open Data Project
Poster: Very Open Data ProjectPoster: Very Open Data Project
Poster: Very Open Data Project
 
Poster: Adaptive On-­‐the-­‐fly Regression Tabula@on: Beyond ISAT
Poster: Adaptive On-­‐the-­‐fly Regression Tabula@on: Beyond ISATPoster: Adaptive On-­‐the-­‐fly Regression Tabula@on: Beyond ISAT
Poster: Adaptive On-­‐the-­‐fly Regression Tabula@on: Beyond ISAT
 
Characterization Ignition Behavior through Morphing to Generic Ignition Curves
Characterization Ignition Behavior through Morphing to Generic Ignition CurvesCharacterization Ignition Behavior through Morphing to Generic Ignition Curves
Characterization Ignition Behavior through Morphing to Generic Ignition Curves
 
Computability, turing machines and lambda calculus
Computability, turing machines and lambda calculusComputability, turing machines and lambda calculus
Computability, turing machines and lambda calculus
 
Relational algebra
Relational algebraRelational algebra
Relational algebra
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Generalization abstraction
Generalization abstractionGeneralization abstraction
Generalization abstraction
 
Overview
OverviewOverview
Overview
 
Networks
NetworksNetworks
Networks
 
Computability and Complexity
Computability and ComplexityComputability and Complexity
Computability and Complexity
 
Sorting algorithms
Sorting algorithmsSorting algorithms
Sorting algorithms
 

Último

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
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
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
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
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
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
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 

Último (20)

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
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
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
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
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.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...
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 

Programming Languages

  • 1. Programming and Paradigms Course overview Edward (Ned) Blurock Lecture: Programming Paradigm CIS: Edward Blruock
  • 2. LANGUAGES Why so many programming Languages? Lecture: Programming Paradigm CIS: Edward Blruock
  • 3. Programming Language Lecture: Programming Paradigm CIS: Edward Blruock The process of developing and implementing various sets of instructions to enable a computer to do a certain task. The language used to program computers is not understood by an untrained eye. Computer programming continues to be a necessary process as the Internet continues to expand. Read more: http://www.businessdictionary.com/definition/computer- programming.html#ixzz3jLVEiKeK
  • 4. Top Ten Programming Languages Lecture: Programming Paradigm CIS: Edward Blruock
  • 5. Top Ten Lecture: Programming Paradigm CIS: Edward Blruock 1. http://spectrum.ieee.org/computing/software/the-2015-top-ten- programming-languages 2. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.h tml 3. http://timesofindia.indiatimes.com/tech/slideshow/10- programming-languages-you-need-to-know-in- 2015/itslideshowviewall/46286489.cms 4. http://www.inc.com/larry-kim/10-most-popular-programming- languages-today.html 5. http://mashable.com/2015/01/18/programming-languages- 2015/
  • 6. Wierdest Lecture: Programming Paradigm CIS: Edward Blruock http://tutorialzine.com/2013/12/the-10-weirdest-programming-languages/
  • 7. High-level programming language Lecture: Programming Paradigm CIS: Edward Blruock "High-level language" refers to the higher level of abstraction from machine language. Abstraction penalty: Execution modes • Interpreted • Compiled • Machine code generation: assembly language • Intermediate code: byte code • Source to Source: trans-compiled https://en.wikipedia.org/wiki/High-level_programming_language
  • 8. AbstractionPenalty Lecture: Programming Paradigm CIS: Edward Blruock While high-level languages are intended to make complex programming simpler, low-level languages often produce more efficient code. Abstraction penalty is the border that prevents high-level programming techniques from being applied in situations where computational resources are limited. High-level programming exhibits features like more generic data structures, run-time interpretation, and intermediate code files; which often result in slower execution speed, higher memory consumption, and larger binary program size
  • 9. Abstraction Lecture: Programming Paradigm CIS: Edward Blruock Abstraction can apply to control or to data: Control abstraction is the abstraction of actions while Data abstraction is that of data structures. Control abstraction involves the use of subprograms and related concepts control flows Data abstraction allows handling data bits in meaningful ways. For example, it is the basic motivation behind datatype. One can view the notion of an object as a way to combine abstractions of data and code. The same abstract definition can be used as a common interface for a family of objects with different implementations and behaviors but which share the same meaning. The inheritance mechanism in object-oriented programming can be used to define an abstract class as the common interface.
  • 10. History Lecture: Programming Paradigm CIS: Edward Blruock http://www.paulgraham.com/fix.html What languages fix A view of the development of languages: The NEXT language fixes short-comings of the PREVIOUS language
  • 11. Power of a Language Lecture: Programming Paradigm CIS: Edward Blruock All languages are equally powerful in the sense of being Turing equivalent, but that's not the sense of the word programmers care about. (No one wants to program a Turing machine.) The kind of power programmers care about may not be formally definable, but one way to explain it would be to say that it refers to features you could only get in the less powerful language by writing an interpreter for the more powerful language in it. If language A has an operator for removing spaces from strings and language B doesn't, that probably doesn't make A more powerful, because you can probably write a subroutine to do it in B. But if A supports, say, recursion, and B doesn't, that's not likely to be something you can fix by writing library functions. Paul Graham: http://www.paulgraham.com/avg.html
  • 12. Blub Paradox Lecture: Programming Paradigm CIS: Edward Blruock Programmers get very attached to their favorite languages, and I don't want to hurt anyone's feelings, so to explain this point I'm going to use a hypothetical language called Blub. Blub falls right in the middle of the abstractness continuum. It is not the most powerful language, but it is more powerful than Cobol or machine language. Paul Graham: http://www.paulgraham.com/avg.html
  • 13. The Blub Paradox Lecture: Programming Paradigm CIS: Edward Blruock As long as our hypothetical Blub programmer is looking down the power continuum, he knows he's looking down. Languages less powerful than Blub are obviously less powerful, because they're missing some feature he's used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub. Paul Graham: http://www.paulgraham.com/avg.html
  • 14. Blub Paradox Lecture: Programming Paradigm CIS: Edward Blruock You can't trust the opinions of the others, because of the Blub paradox: they're satisfied with whatever language they happen to use, because it dictates the way they think about programs. I know this from my own experience, as a high school kid writing programs in Basic. That language didn't even support recursion. It's hard to imagine writing programs without using recursion, but I didn't miss it at the time. I thought in Basic. And I was a whiz at it. Master of all I surveyed. Paul Graham: http://www.paulgraham.com/avg.html
  • 15. A reason to take this course Lecture: Programming Paradigm CIS: Edward Blruock Learn at least one new [programming] language every year. Different languages solve the same problems in different ways. By learning several different approaches, you can help broaden your thinking and avoid getting stuck in a rut. The Pragmatic Programmer: From Journeyman to Master Andrew Hunt http://www.amazon.com/The-Pragmatic-Programmer-Journeyman-Master/dp/020161622X
  • 16. © O. Nierstrasz PS — Denotational Semantics 8.16 Defining Programming Languages There are three main characteristics of programming languages: 1. Syntax: What is the appearance and structure of its programs? 2. Semantics: What is the meaning of programs? The static semantics tells us which (syntactically valid) programs are semantically valid (i.e., which are type correct) and the dynamic semantics tells us how to interpret the meaning of valid programs. 3. Pragmatics: What is the usability of the language? How easy is it to implement? What kinds of applications does it suit?
  • 17. Programming Languages © O. Nierstrasz PS — Denotational Semantics 8.17 1. Syntactic Abstraction Mechanism: to reduce repetitive "boilerplate" code that cannot be abstracted from using another language's built-in abstraction mechanisms. 2. Thought shaper: to induce a paradigm shift in how one should structure software (changing the "path of least resistance"). 3. Simplifier: to boil down an existing paradigm to just its essential parts, often to increase understanding and insight. 4. Law Enforcer: to enforce important properties or invariants, possibly to make it easier to infer more useful properties from programs. Tom Van Cutsam: http://soft.vub.ac.be/~tvcutsem/whypls.html
  • 18. syntactic abstraction mechanism Lecture: Programming Paradigm CIS: Edward Blruock Purpose: Lightweight syntax that lets programmers do the same things as before, but with less code Example: C provides multiple looping constructs, multiple conditional constructs, multiple constructs for incrementing/updating the value of a variable. loop through the elements of arrays increment or decrement the values of variables perform multiway conditionals based on numeric or character values. Programming language designers provide special purpose syntactic constructs that handle the most common patterns.
  • 19. The opposite: no syntactic abstraction Lecture: Programming Paradigm CIS: Edward Blruock Language: Chicken http://torso.me/chicken https://isotropic.org/papers/chicken.pdf https://www.youtube.com/watch?v=yL_-1d9OSdk
  • 20. Language: Chickens Lecture: Programming Paradigm CIS: Edward Blruock 1. A chicken program consists of the tokens "chicken", " " and "n”. 2. Every line has a number of chickens separated by spaces. 3. The number of chickens corresponds to an opcode. 4. Trailing newlines are significant, as an empty line will produce a "0" opcode. 5. Instructions are loaded onto the stack and executed there directly, which allows for injecting arbitrary code and executing it through a jump. 6. Self-modifying code is also possible because the program stack is not bounded. 7. The user is able to supply an input value before executing the program. This input is stored in one of the two registers. The operations: http://esolangs.org/wiki/Chicken
  • 21. thought shaper Lecture: Programming Paradigm CIS: Edward Blruock The goal of a thought shaper language is to change the way a programmer thinks about structuring his or her program. The basic building blocks provided by a programming language, as well as the ways in which they can (or cannot) be combined, will tend to lead programmers down a "path of least resistance", for some unit of resistance. For example, an imperative programming style is definitely the path of least resistance in C. It's possible to write functional C programs, but as C does not make it the path of least resistance, most C programs will not be functional.
  • 22. Thought Shaper Lecture: Programming Paradigm CIS: Edward Blruock Experienced programmers carry quite a number of patterns around in their heads. They may have learned these patterns from books or by hard won experience. The patterns enable a fluid style of programming where attention can be maintained on the unknown parts of the task at hand and work feels productive. Programmers tend to like programming languages that have good support for the patterns they use. Programmers don't like languages that disallow or inconvenience the patterns they use. They are also rarely impressed by language features that support patterns they don't know or use. http://c2.com/cgi/wiki?BlubParadox
  • 23. Thought Shaper Lecture: Programming Paradigm CIS: Edward Blruock (pure) Functional Programming Functional programming languages, by the way, are a good example of thought shaper languages. By taking away assignment from the programmer's basic toolbox, the language really forces programmers coming from an imperative language to change their coding habits.
  • 24. Thought Shaper Lecture: Programming Paradigm CIS: Edward Blruock linguistic relativity holds that cognitive processes, such as thought and experience, may be influenced by the categories and patterns of the language a person speaks. From the field of linquistics https://en.wikipedia.org/wiki/Linguistic_relativity the structure of a language affects the ways in which its respective speakers conceptualize their world, i.e. their world view, or otherwise influences their cognitive processes.
  • 25. a simplifier Lecture: Programming Paradigm CIS: Edward Blruock A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away. In software, the most beautiful code, the most beautiful functions, and the most beautiful programs are sometimes not there at all. Bentley, Jon, The most beautiful code I never wrote, Beautiful Code, O'Reilly Media, Inc.,2007
  • 26. law enforcer Lecture: Programming Paradigm CIS: Edward Blruock http://www.cs.cornell.edu/courses/cs1130/2012sp/1130selfpaced/module1/module1part4/strongtyping.html One property that is sometimes looked for in a programming language is safety Safety: Any attempt to misinterpret data is caught at compile time or generates a well-specified error at runtime. definition used in the year 2000 by an ad hoc committee that recommended that the Advanced Placement (AP) test in programming be based on the programming language Java
  • 27. Strong Typing Lecture: Programming Paradigm CIS: Edward Blruock Some errors arise from lack of understanding; others are logical errors caused by inadequate thinking and design; and some are simply typos. In all cases, finding errors early, at compile time, can save immense amounts of time. Safety and strong typing make possible the early detection of many errors. A strongly typed language has one simple feature: knowledge of a value’s type at runtime.
  • 28. Strong vs. Weak Typing Lecture: Programming Paradigm CIS: Edward Blruock String foo = "Hello, world!"; Object obj = foo; String bar = (String) obj; Date baz = (Date) obj; The above example will run perfectly fine until the last line, which will raise a ClassCastException. This is because Java is indeed strongly typed. Even though the obj variable is of the type Object, its value is still a String. Casting it to a String works fine, but trying to cast it to a Date fails. char* foo = "Hello, world!"; int x = foo * 10; printf("%in", x); The above block is valid C code, but the output is not well-defined. …. This is because C does not store anything in memory other than the raw values—it would be impossible at runtime to know that foo was a char* and x was an int. Strong Weak
  • 29. Program Verification: Bugs Lecture: Programming Paradigm CIS: Edward Blruock Here are some famous ones: ESA Ariane 5 Flight 501 self-destruction 40 seconds after takeoff (June 4, 1996). A conversion from 64-bit floating point to 16 bit integer with a value larger than possible with Arian 4. The overflow caused a hardware trap The Pentium bug Incorrect floating-point division. Cost Intel ~ $400,000,000 The 2003 North America blackout was triggered by a local outage that went undetetected. A race condition in General Electric’s monitoring software prevented an alarm
  • 30. Program Verification: Testing Lecture: Programming Paradigm CIS: Edward Blruock When you look at a big commercial software company like Microsoft, there's actually as much testing that goes in as development. We have as many testers as we have developers. Testers basically test all the time, and developers basically are involved in the testing process about half the time… Bill Gates: The test cases are unbelievably expensive; in fact, there's more lines of code in the test harness than there is in the program itself. Often that's a ratio of about three to one
  • 31. Program Verification Lecture: Programming Paradigm CIS: Edward Blruock Formal = based on rigorous mathematical logic concepts. Once we formally specify what we expect from the program, we can try to prove that the program satisfies the specification.
  • 32. Styles of formal semantics Lecture: Programming Paradigm CIS: Edward Blruock Operational. Meanings for program phrases defined in terms of the steps of computation they can take during program execution. Axiomatic. Meanings for program phrases defined indirectly via the axioms and rules of some logic of program properties. Denotational. Concerned with giving mathematical models of programming languages. Meanings for program phrases defined abstractly as elements of some suitable mathematical structure.
  • 33. Denotational Semantics Example Lecture: Programming Paradigm CIS: Edward Blruock <expr> → number | ( <expr> ) | <expri>+ <expr> | <expri>− <expr> | <expri>∗ <expr> | <expr>/<expr> [[n1 + n2]] = rep(n1) + rep(n2) [[e1+e2]] = [[e1]] + [[e2]]
  • 34. Denotational Semantics Example Lecture: Programming Paradigm CIS: Edward Blruock
  • 35. Operational Semantics Lecture: Programming Paradigm CIS: Edward Blruock A category of formal programming language semantics in which certain desired properties of a program, such as correctness, safety or security, are verified by constructing proofs from logical statements about its execution, rather than by attaching mathematical meanings to its terms (denotational semantics). The operational semantics for a programming language describes how a valid program is interpreted as sequences of computational steps
  • 36. Operational Semantics Lecture: Programming Paradigm CIS: Edward Blruock Two categories: structural operational semantics (or small-step semantics) formally describe how the individual steps of a computation take place in a computer-based system. natural semantics (or big-step semantics) describe how the overall results of the executions are obtained.
  • 37. Operational Semantics Lecture: Programming Paradigm CIS: Edward Blruock The process: 1. Identify a virtual machine (an idealized computer) 2. Build a translator (translates source code to the machine code of an idealized computer) 3. Build a simulator for the idealized computer Operational semantics is sometimes called translational semantics, if an existing PL is used in place of the virtual machine http://courses.cs.vt.edu/~cs3304/Spring00/notes/Chapter-3b/index.htm
  • 38. Axiomatic Semantics Lecture: Programming Paradigm CIS: Edward Blruock • An assertion before a statement is called a precondition • An assertion following a statement is a postcondition Based on formal logic (first order predicate calculus) Original purpose: formal program verification Approach: Define axioms or inference rules for each statement type in the language Inference rule allows one to transform expressions to other expressions assertions state the relationships and constraints among variables that are true at a specific point in execution
  • 39. Axiomatic Semantics Lecture: Programming Paradigm CIS: Edward Blruock Logic Programming (declarative) view of program Translation to logical statements means you can construct a proof For example: Can verify the correctness of the program automatically through automatic theorem provers If the precondition on the first statement is the same as the program spec, the program is correct Program proof process: The postcondition for the whole program is the desired results Work back through the program to the first statement
  • 40. Denotational Semantics Lecture: Programming Paradigm CIS: Edward Blruock denotational semantics (initially known as mathematical semantics or Scott– Strachey semantics) is an approach of formalizing the meanings of programming languages by constructing mathematical objects (called denotations) that describe the meanings of expressions from the languages. Other approaches to providing formal semantics of programming languages include axiomatic semantics and operational semantics. https://en.wikipedia.org/wiki/Denotational_semantics With formal semantics we give programs meaning by mapping them into some abstract but precise domain of objects. Using denotational semantics, we provide meaning in terms of mathematical objects, such as integers, truth values, tuples of values, and functions. For this reason, denotational semantics was originally called mathematical semantics. http://homepage.cs.uiowa.edu/~slonnegr/plf/Book/Chapter9.pdf