Ing Ind - Inf (Mag.)(ord. 270) - CR (263) MUSIC AND ACOUSTIC ENGINEERING
*
A
ZZZZ
095943 - PRINCIPLES OF PROGRAMMING LANGUAGES
Ing Ind - Inf (Mag.)(ord. 270) - MI (481) COMPUTER SCIENCE AND ENGINEERING - INGEGNERIA INFORMATICA
*
A
ZZZZ
095943 - PRINCIPLES OF PROGRAMMING LANGUAGES
Obiettivi dell'insegnamento
Programming languages are one of the most important tool for building a software system: several different languages are used in a modern computer, at different levels of abstraction. Clearly, issues in writing the operating system or low level drivers are much different from those encountered in high-level applications. In a single complex application often various levels (and languages) coexist and collaborate, from core logic written e.g. in C++ or Java, to scripting and gluing, usually performed using a dynamic interpreted language (e.g. Python).
Like natural languages, programming languages are a fundamental means of expression. Algorithms implemented using different programming languages may be extremely different, both aesthetically, as higher-level languages can be very synthetic and are in general very expressive, and from the performance profile, as lower-level languages permit a finer tuning on the memory footprint of the application and on the performance of the generated code.
This course presents the main aspects of the programming languages landscape, by analyzing similarities and differences, approaches and paradigms, both traditional and new. Substantial fragments of some significant programming languages will be introduced, seen as instances of the covered paradigms.
Risultati di apprendimento attesi
Dublin Descriptors
Expected learning outcomes
Knowledge and understanding
Students will learn how to:
Understand the most common programming language paradigms
Understand the semantics of many common programming language constructs
Understand the most suitable linguistic approach, and the right linguistic abstraction for new projects
Applying knowledge and understanding
Given specific project cases, students will be able to:
Design new programming language constructs or idioms
Design new Domain Specific Languages
Adapt an existing language to new paradigms
Making judgements
Communication
Lifelong learning skills
Students will learn how to understand the basic semantics of many programming language approaches, constructs, and variants
Students will learn how to choose the right programming languages, abstractions, and paradigms to be used in a project
Argomenti trattati
1) Motivations and Preliminaries
2) Basic Abstraction Mechanisms
Variables, Binding, and Scoping
Expressions and statements
Procedures and recursion
Macros
Parameter Passing: call by value, by reference, and by name
Types: basic data types; pointers; dynamic and stating type checking; type inference; parametric polymorphism
Exception Handling - issues and variants
3) Main Programming Paradigms
Introduction: the Procedural Paradigm
3.1) Functional Programming
History
Functional programming concepts: referential transparency, functions as a
first-class entity, higher-order functions
Evaluation order and type systems
Purity and Monads
Continuations
3.2) Object-Oriented Programming
History and variants
Main issues and relation with Abstract Data Types
Dynamic Method Binding and "ad hoc" polymorphism
Encapsulation and Inheritance
Class vs Prototype-based inheritance
3.3) Concurrent Programming
History, background, and motivation
The Actor model
General issues on Communication and Synchronization
Variants and usages
3.4) General Considerations and Other Paradigms
Multi-paradigm languages
Meta-programming facilities
Domain Specific Languages
Logic programming
Prerequisiti
Good knowledge of some procedural and object-oriented languages, in particular C and Java.
Modalità di valutazione
The exam is written and “open book”, i.e. students can consult their notes and books. The exam consists in solving small problems using languages presented in class.
Type of assessment
Description
Dublin descriptor
Written test
Solution of small practical or theoretical problems
Implementation using different languages and paradigms, in an idiomatic way
Choice of the right linguistic paradigm for the problem
Design of suitable data structures
1, 2, 5
Bibliografia
Official webpage of the coursehttp://home.deib.polimi.it/pradella/PL.htmlMichael L. Scott, Programming Language Pragmatics, Editore: Elsevier, Anno edizione: 2009, ISBN: 9780123745149
John C. Mitchell, Concepts in Programming Languages, Editore: Cambridge University Press, Anno edizione: 2004, ISBN: 0-511-04091-1 Note: