Skip to content

Logical and Functional Programming

Public syllabus for 2025-2026

Academic overview

Programme
AIDC
Period
Year 1, Semester 2
Credits
4
Weeks
14

Curriculum placement

Appears in study plans

Teaching team

Course coordinator
Seminar coordinators
Mircea Marin

Learning time distribution

Total
Curriculum Lecture Practice Total Weekly Lecture Practice
56 28 28 4 2 2
Exam hours
2
Individual Study Bibliography study Field study Homework Tutoring Others
42 15 12 12 3 0
Overall
100

Learning outcomes

Knowledge

  • Understand the theoretical foundations of declarative programming in general, and functional and logic programming in particular.
  • Get accustomed with a programming language for each of these paradigms: Racket for Functional Programming, and SWI Prolog for Logic Programming.

Skills

  • Ability to choose and use these programming paradigms (to develop software applications appropriate for the specific domain of the application being developed
  • Ability to model and solve real-life problems using declarative programming techniques

Responsibility

  • Identify the advantages/disadvantages of the alternative approaches to solve a problem.

Online platform

_______________

Course content

Content Methods Obs
C1: Programming paradigms in Software Engineering: Imperative vs. declarative programming. Main features and advantages of Functional Programming. History of Lisp. Description, explanation, examples Lecture materials posted on Google Classroom
C2: Theoretical foundations of Functional Programming: the lambda calculus Description, explanation, examples Lecture materials posted on Google Classroom
C3: Recursion and final recursion. Accumulators Description, explanation, examples Lecture materials posted on Google Classroom
C4: Iteration Description, explanation, examples Lecture materials posted on Google Classroom
C5: Functions as values. Applications of lexical closures Description, explanation, examples Lecture materials posted on Google Classroom
C6: Streams Description, explanation, examples Lecture materials posted on Google Classroom
C7: Logical foundations. Introduction to Prolog programming. Questions, variables, conjunctions, rules, goals. Description, explanation, examples Lecture materials posted on Google Classroom
C8: Prolog syntax. Characters, operators, equality and matching, arithmetic. Description, explanation, examples Lecture materials posted on Google Classroom
C9: Using data structures. Programming techniques on Prolog (Mapping, recursion, accumulators, difference structures) Description, explanation, examples Lecture materials posted on Google Classroom
C10: Backtracking, generating multiple solutions, the cut. Selected examples. Description, explanation, examples Lecture materials posted on Google Classroom
C11: Unification, computational model.. Grammar rules (DCG) Description, explanation, examples Lecture materials posted on Google Classroom
C11: Efficiency issues Description, explanation, examples Lecture materials posted on Google Classroom

Course bibliography

For an introduction to programming and computing from a functional programming perspective: Daniel P. Friedman, Mitchell Wand, Christopher T. Haynes: Essentials of Programming Languages. Third Edition. The MIT Press. 2008. Highly recommended. M. Marin, V. Negru, I. Drămnesc, Principles and Practice of Functional Programming, Editura Universității de Vest, 2016. A very nice book about algorithms, in general: J. Erikkson: Algorithms. Av. online at https://jeffe.cs.illinois.edu/teaching/algorithms/ For logic programming: J. Lloyd. Foundations of Logic Programming, second edition. Springer, 1987. M. A. Covington. Efficient Prolog: A Practical Guide. Research Report AI-1989-08, The University of Georgia, Athens, Georgia, 1989. W. F. Clocksin. Prolog Programming (PowerPoint format). Open lists and difference lists. A section from Paul Brna's online Prolog book.

Seminar content

Content Methods Obs
S1: Introduction to Racket. Programs, expressions, and values. Definitions. Conditional expressions. Recursion. Modules. Testing Dialogue, collaborative learning, problem solving Support material and weekly assignments posted on Classroom
S2: Pure functional programming. Lambda-expressions. Higher-order functions. Local variables. Pattern matching Dialogue, collaborative learning, problem solving Support material and weekly assignments posted on Classroom
S3: Recursion and final recursion. Accumulators Dialogue, collaborative learning, problem solving Support material and weekly assignments posted on Classroom
S4: Iteration Dialogue, collaborative learning, problem solving Support material and weekly assignments posted on Classroom
S5: Functions as values. Applications of lexical closures Dialogue, collaborative learning, problem solving Support material and weekly assignments posted on Classroom
S6: Working with streams Dialogue, collaborative learning, problem solving Support material and weekly assignments posted on Classroom
S7: Introduction to SWI Prolog. Facts and rules. Goals. The control strategy in Prolog. Variables and composed propositions. Anonymous variables. Rules for matching. Dialogue, collaborative learning, problem solving Support material and weekly assignments posted on Classroom
S8: Predefined domains. Internal and external goals. Multiple arity predicates. Arithmetic expressions and comparisons. Input/output operations. Dialogue, collaborative learning, problem solving Support material and weekly assignments posted on Classroom
S9-12: Labworks related to lectures 9-12 Dialogue, collaborative learning, problem solving Support material and weekly assignments posted on Classroom
Bibliography: For Functional Programming, mainly with Racket: M. Felleisen, R.B. Findler, and PLT: The Racket Guide. Av. online at https://docs.racket-lang.org/guide Daniel P. Friedman, Mitchell Wand, Christopher T. Haynes: Essentials of Programming Languages. Second Edition. The MIT Press. 2001. For Logic Programming: M. A. Covington, R. Bagnara, R. A. O'Keefe, J. Wielemaker, S. Price. Coding Guidelines for Prolog. Theory and Practice of Logic Programming. 12(6): 889-927 (2012) [Highly recommended!]
Bibliography: The content is consistent with the structure of similar courses from other universities and covers the fundamental aspects necessary in order to become familiar with the principles of functional and logic programming. The ability to identify, design, implement and analyze algorithms is essential for any activity in the field of computer science. The course develops skills that are useful beyond the functional and logic programming paradigms.

Seminar bibliography

(none)

Corroboration

(none)

AI tools guidance

(none)

Evaluation and delivery

Activity Criteria Methods Percentage
C
  • Theoretical and practical questions.
  • Good understanding of the principles of functional and logic programming
  • Final exam, during session time
  • 50.0%
S
  • Effective use of the principles and idioms of functional programming.
  • Assignments related to Functional Programming: 25%
  • 50.0%

Performance standards

The ability to use correctly functional programming principles The ability to design and implement correctly simple algorithms in Racket The ability to design and implement correctly simple algorithms in Prolog The ability to describe a simple recursive predicate in Prolog (definition + call) The ability of transforming a recursive predicate into a predicate which uses accummulators The final grade is the weighted average of the grades given for the components specified in 9.4 and 9.5. The exam is passed if the average is at least 5. At every exam session the grade is calculated by the same rule. The students may attend office hours (according to the schedule set out at the beginning of the semester) where the teacher of the course and / or laboratory answers to the students questions and provides further explanations related to the course content, and to the applications from laboratories.

Additional info

(none)