Programming Languages
Cod: 21077
Department: DCET
Scientific area: Computer Engineering
Total working hours: 156
Total contact time: 26

More than the study of a single programming language, the chair of Open University programming languages will focus on the study compared to the various paradigms and characteristics of programming languages. So students will know the various concepts and techniques of programming associated with the main types of programming languages (notably imperative languages, functional languages, object-oriented languages and logical languages).

1. Paradigms
2. O’Caml
3. Prolog
4. Java

Upon completion of this learning unit , the student should be able to:
Recognize the importance of the different programming paradigms, namely, object-oriented, logic and functional programming.
Describe, from the syntax, semantic and functional point of view, the main characteristics of the languages associated with each paradigm;
Apply the programming languages Java, Prolog and O’Caml in solving concrete problems of small and medium complexity.

Programming paradigms. Object-oriented programming. Logic programming. Functional programming.
Study of Java language. Signatures, protocols and objects. Classes. Interfaces. Inheritance. Abstract classes. Exceptions. Input/Output. Streams. Packages and constructors.
Study of Prolog language. Facts and rules. Horn clauses. Programs and questions. Declarative and operational semantics. Backtracking. Predicate programming with simple variables and lists.
Study of O’Caml language. Functions as first-class values. Basic and structured types. Type system and type inference. Monomorphic and polymorphic functions. Curried and non-curried forms of functions with multiple parameters. Partial application. Patterns. Inductive method. Lists. Product and sum types. Binary trees.

- Johan Bos, Kristina Striegnitz and Patrick ,  Prolog Now!, Texts in Computing, 2021
- F. Mário Martins, Java 8 - POO + Construções Funcionais, FCA
Anil Madhavapeddy, Yaron Minsky Real World OCaml: Functional Programming for the Masses (2nd Edition), Cambridge University Press



Continuous assessment is privileged: 2 or 3 digital written documents (e-folios) during the semester (40%) and a presence-based final exam (p-folio) in the end of the semester (60%). In due time, students can alternatively choose to perform one final presence-based exam (100%).