CSE 428: Lecture 1 - Introduction and Overview
The aim of the course is to offer a comparative overview
of the main programming paradigms:
For each paradigm, we will examine:
Imperative / Object-Oriented
Concurrent / Distributed (time permitting)
For each paradigm we will consider one or two real programming language
for exercises and practice. We will not study any particular programming
language in detail: The purpose of the course is
not to learn the skills of programming in a particular language, but rather
to understand the general principles of programming languages. This
course should provide the ability to:
learn new programming languages / new features
choose the most appropriate language for a given
Overview of programming paradigms
The languages in blue
indicate the languages which we will probably choose for exercises and
practice during the course
Logic Programming and Constraint Logic Programming
Close to mathematical specification
Declarative: Program = specification of
(as opposed to the imperative style where
Program = specification of the sequence of
steps which the machine should perform in order to solve the problem)
A program is a function/set of functions, usually
Computation is the evaluation (simplification)
of expressions to values
Languages: Lisp, Scheme, FP, Standard ML,
Declarative. Even more declarative than functional
programming thanks to the following additional features:
unification / constraint solving
A program is a logical theory
Computation is proof search
Lambda Prolog, CLP(X)...
State and sharing.
Efficient implementations (space, time).
A program is a sequence of commands (operations which
modify the state)
Computation is state transformation
Fortran, Basic, Algol,
Concurrent and Distributed Programming
Like imperative programming, has notions of state
A program is the specification of a set of objects:
their attributes, and the way they interact with each other
Computation is transformation of the state of objects
Languages: Small Talk, C++,
Several approaches, both from the declarative and
the imperative traditions
A program is the specification of a set of processes
and the way they communicate / interact with each other. Processes are
autonomous activities, in principle executed in parallel by different
Languages: Many languages have concurrent
extensions (Parallel Pascal, ADA, Java, Concurrent ML,...).
If time permits, we will examine the primitives
for process management and synchronization
in various languages, so to give a reasonable overview
of the various aspects of Concurrent Programming.
Levels of programming Languages
We can trace a brief history of programming languages according to their
First Generation: Machine Languages.
Second Generation: Assembly Languages.
- The native language of machines.
- Binary representation.
- Machine dependent
Third Generation: High-level Languages.
- Uses Mnemonics to abstract from binary representation
- Uses symbolic addresses to abstract from absolute adressing
Fourth Generation: Declarative Languages.
- Uses Data and Control structures as high-level abstractions of
programming concepts coded directly in assembly languages
- Machine independence
- Examples: FORTRAN, Algol60, Algol68, Pascal, C, Ada, ...
Fifth Generation Languages.
- Departs from traditional approach to programming languages by
using declarative notions from mathematics to provide the notion
- Not an abstraction of a previous generation: new paradigms.
- Much harder to produce efficient implementations.
- Examples: Standard ML, Lisp, Haskell, Prolog, lambdaProlog
- Term coined by the Japanese in the early 1980's ("Fifth Generation
Project) during their attempt to develop of new style of programming
languages and new hardware on which to implement these languages.
- Examples: Constraint Logic Programming (CLP)?