Università degli Studi di Urbino Carlo Bo / Portale Web di Ateneo


PROCEDURAL AND LOGIC PROGRAMMING
PROGRAMMAZIONE PROCEDURALE E LOGICA

Procedural and Logic Programming
Informatica Applicata

A.Y. Credits
2012/2013 12
Lecturer Email Office hours for students
Marco Bernardo mercoledì 16:00-18:00

Assigned to the Degree Course

Date Time Classroom / Location

Learning Objectives

The objective of this course is to illustrate the basic principles, the techniques, and the tools for programming computer applications, through the presentation of the concepts typical of procedural imperative programming and logical declarative programming.

Program

01. Introduction to computer programming
  01.01 Basic definitions in informatics.
  01.02 A bit of history of informatics.
  01.03 Computer architecture.
  01.04 Operating systems.
  01.05 Programming languages and compilers.
  01.06 A methodology for developing software "in the small".

02. Procedural programming: the language ANSI C
  02.01 A bit of history of C.
  02.02 Format of a program with a single function.
  02.03 Library inclusion.
  02.04 Function main.
  02.05 Identifiers.
  02.06 Predefined data types: int, double, char.
  02.07 Library functions for interactive input/output.
  02.08 Library functions for file-based input/output.

03. Expressions
  03.01 Symbolic constant definition.
  03.02 Variable declaration.
  03.03 Arithmetical operators.
  03.04 Relational operators.
  03.05 Logical operators.
  03.06 Conditional operator.
  03.07 Assignment operators.
  03.08 Increment/decrement operators.
  03.09 Comma operator.
  03.10 Arithmetical-logical expressions.
  03.11 Operator precedence and associativity.

04. Statements
  04.01 Assignment statement.
  04.02 Compound statement.
  04.03 Selection statements: if, switch.
  04.04 Repetition statements: while, for, do-while.
  04.05 Goto statement.
  04.06 Fundamental theorem of structured programming.

05. Procedures
  05.01 Format of a program with several functions on a single file.
  05.02 Function declaration.
  05.03 Function definition and formal parameters.
  05.04 Function invocation and actual parameters.
  05.05 Return statement.
  05.06 Parameters and result of function main.
  05.07 Passing parameters by value and by reference.
  05.08 Recursive functions.
  05.09 Stack-based execution model.
  05.10 Format of a program with several functions on several files.
  05.11 Scope of local and nonlocal identifiers.

06. Data types
  06.01 Data type classification and sizeof operator.
  06.02 Type int: representation and variants.
  06.03 Type double: representation and variants.
  06.04 Mathematical library functions.
  06.05 Type char: representation and library functions.
  06.06 Enumerated types.
  06.07 Type conversions and cast operator.
  06.08 Arrays: representation and indexing operator.
  06.09 Strings: representation and library functions.
  06.10 Structures and unions: representation and dot operator.
  06.11 Pointers: operators and library functions.

07. Correctness of procedural programs
  07.01 Hoare triples.
  07.02 Determining the weakest precondition.
  07.03 Verifying the correctness of iterative procedural programs.
  07.04 Verifying the correctness of recursive procedural programs.

08. Introduction to mathematical logic
  08.01 A bit of history of logic.
  08.02 Set theory.
  08.03 Relations and functions.
  08.04 Induction principle.

09. Propositional logic
  09.01 Syntax of propositional logic.
  09.02 Semantics and decidability of propositional logic.
  09.03 Consequence and equivalence in propositional logic.
  09.04 Algebraic properties of the logical connectives.
  09.05 Deduction systems for propositional logic.

10. Predicate logic
  10.01 Syntax of predicate logic.
  10.02 Semantics and undecidability of predicate logic.
  10.03 Consequence and equivalence in predicate logic.
  10.04 Algebraic properties of the quantifiers.
  10.05 Deduction systems for predicate logic.

11. Logic programming: the language Prolog
  11.01 Normal forms for logical formulas.
  11.02 Herbrand theory and refutation algorithm.
  11.03 Resolution method for propositional logic.
  11.04 Unification and resolution for predicate logic.
  11.05 Prolog: Horn clauses and SLD resolution strategy.
  11.06 Prolog: terms, predicates, cut, and negation.

12. Laboratory activities
  12.01 Work session in Linux.
  12.02 File management in Linux.
  12.03 The editor gvim.
  12.04 The compiler gcc.
  12.05 The maintenance utility make.
  12.06 The debugger gdb.
  12.07 Implementation of the C programs introduced in the lectures.
  12.08 The compiler/interpreter gprolog.
  12.09 Implementation of the Prolog programs introduced in the lectures.

Bridging Courses

Discrete Structure and Linear Algebra

Didactics, Attendance, Course Books and Assessment

Didactics

Theory lectures and laboratory exercises, both face-to-face and on-line.

Attendance

Although recommended, course attendance is not mandatory.

Course books

Hanly, Koffman, "Problem Solving and Program Design in C", Addison-Wesley, 2012.

Kernighan, Ritchie, "The C Programming Language", Prentice Hall, 1988
(Kernighan, Ritchie, "Il Linguaggio C", Pearson/Prentice Hall, 2004).

Asperti, Ciabattoni, "Logica a Informatica", McGraw-Hill, 1997
(Schöning, "Logic for Computer Scientists", Birkhäuser, 2008).

Console, Lamma, Mello, Milano, "Programmazione Logica e Prolog", UTET, 1997
(Sterling, Shapiro, "The Art of Prolog", MIT Press, 1997).

Assessment

Individual project, written exam, and oral exam.

Notes

The course is offered both face-to-face and on-line within the Laurea Degree Program in Applied Computer Science.

« back Last update: 17/10/2012

Condividi


Questo contenuto ha risposto alla tua domanda?


Il tuo feedback è importante

Raccontaci la tua esperienza e aiutaci a migliorare questa pagina.

Se sei vittima di violenza o stalking chiama il 1522

Il 1522 è un servizio pubblico promosso dalla Presidenza del Consiglio dei Ministri – Dipartimento per le Pari Opportunità. Il numero, gratuito è attivo 24 h su 24, accoglie con operatrici specializzate le richieste di aiuto e sostegno delle vittime di violenza e stalking.

Posta elettronica certificata

amministrazione@uniurb.legalmail.it

Social

Performance della pagina

Università degli Studi di Urbino Carlo Bo
Via Aurelio Saffi, 2 – 61029 Urbino PU – IT
Partita IVA 00448830414 – Codice Fiscale 82002850418
2021 © Tutti i diritti sono riservati

Top