• Non ci sono risultati.

PRINCIPLES OF PROGRAMMING LANGUAGES Paradigms of Programming Languages

N/A
N/A
Protected

Academic year: 2022

Condividi "PRINCIPLES OF PROGRAMMING LANGUAGES Paradigms of Programming Languages"

Copied!
7
0
0

Testo completo

(1)

PRINCIPLES OF PROGRAMMING LANGUAGES Paradigms of Programming Languages

prof. Marco Bellia, Dip. Informatica, Universit`a di Pisa

February 18, 2013

(2)

Overview

Why and Aims

Prescriptive vs. Descriptive

Programming Languages Paradigms 50 years of Programming Languages Overview of the Module

(3)

Why and Aims

Why Study Programming Paradigms?

To have the right knowledge of the fundamental tools (i.e.

Languages) for developing computer applications.

Aims

Choose the most appropriate language for any given task;

Understand obscure features of current languages;

Have the right competence for learning the novel

Programming Languages (syntax, semantics, implementation, and use) of the next future

(4)

Prescriptive vs. Descriptive

Remember:

Algorithms = Logic + Control

Programs = A Way to Express Algorithms

Two Main Classes of Programming Languages:

Prescriptive = How Computation must behave - Imperative Languages: State + Mutable Value +

Assignment + Sequence Control Descriptive = What Computation must produce

- Declarative Languages: Immutable Value + Application + Composition

(5)

Programming Languages Paradigms

The main ones:

Procedural: Fortran, Cobol, Algol, Pascal, C, ADA, ...

Functional: Lisp, Scheme, ML, Haskell, OCAML, ...

Algebraic: Lucid, OBJ, OPAL, ActOne

Logic, Constraint-based: Prolog, LogLisp, Datalog, Parlog (SQL, spreadsheets languages, )...

Object Oriented: Simula67, SmallTalk, C++, OCAML, Java, C#, F#, ...

Scripting: Perl, Python, PHP, JavaScript...

Concurrency: Lucid, OCCAM, C-Linda, PrologLinda, SPARK, Parlog, Java, C#, ...

Dataflow: Lucid, C-Linda, PrologLinda,...

Multi-paradigms: most of the most recent ones

(6)

50 years of Programming Languages

(7)

Overview of the Module

Specific Aim. The knowledge of the main Programming Paradigms (including, Procedural, Functional, Logic, and Object, for sure) from the following viewpoints:

Syntax and Semantics: Formalization of the costructs Programming Methodologies: Use of the constructs in the Program Development Approaches

Supporting Structures: Implementation of constructs ACRONYM: FUI

Material.

http://www.di.unipi.it/~bellia

http://didawiki.cli.di.unipi.it/doku.php/magistraleinformatica/plp/start Complementary Readings

Mitchell, J.C. Concepts in Programming Languages. Cambridge Univ. Press, 2007, 529p., ISBN 978-0-52178-098-8.

Gabrielli, M. and Martini, S. Programming Languages: Principles and Paradigms. Springer, 2010, 440p., ISBN 978-1-84882-913-8.

Scott, M.L., Programming Language Pragmatics, Elsevier-Morgan Kaufmann Pub., 2009, 944p., ISBN

Riferimenti

Documenti correlati

[r]

•  Every nonterminal has one (recursive) procedure responsible for parsing the nonterminal’s syntactic category of input tokens. •  When a nonterminal has multiple

•  An NFA accepts an input string x (over Σ ) if and only if there is some path with edges labeled with symbols from x in sequence from the start state to some.. accepting state

–  Transla=ng short-circuit Boolean expressions and flow-of- control statements with backpatching lists.. How does the code

special end symbol # to make accepting states important: the new expression is r#. •  Construct a syntax tree

•  A backward analysis propagates informa@on in the opposite direc@on in which the program flows. •  A forward analysis propagates informa@on in the same direc@on in which

/* Returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to

•  LALR parsing (Look-Ahead LR) merges two or more LR(1) state into one state to reduce table size. •  Less powerful