# COL 765 Introduction to Logic and Functional Programming

## General Information

Semester: I, 2021-2022
Timings: Mon/Thur 09:30-11:00
TA: Abhishek rose (email: abhishek.rose@cse.iitd.ac.in), Tooba Khan (email: Tooba.Khan.jcs21@csia.iitd.ac.in)

## Course Outline

Introduction to declarative programming paradigms. The functional style of programming, paradigms of developments of functional programs, use of higher order functionals and pattern-matching. Introduction to lambda calculus. Interpreters for functional languages and abstract machines for lazy and eager lambda calculi, Types, type- checking and their relationship to logic. Logic as a system for declarative programming. The use of pattern-matching and programming of higher order functions within a logic programming framework. Introduction to symbolic processing. The use of resolution and theorem-proving techniques in logic programming. The relationship between logic programming and functional programming.

## Honour Code

• All students are expected to follow the highest ethical standards.
• Collaborations and discussions are encouraged. However, all students are required to write up all solutions entirely on their own. Any collaboration, or help taken, must be declared.
• Students are encouraged to refer to books, papers and internet resources. They may even consult other individuals. However, the source must be clearly cited if any part of the solution (or even an idea) is taken from such a source.
• Failure to declare any help taken will be interpreted as academic misconduct.
• Copying (in whole or in part) from others is deemed cheating and those who enable this activity either deliberately or through negligence are also deemed to have cheated. Cheating is a serious academic misconduct; it will attract a summary F grade to the involved students and referral to the discplinary committee.

## Important Note to the Students

• All academic matters, doubts etc. should be cleared during the lectures/tutorials or immediately after them, in the presence of the whole class, so that the clarifications does not have to be communicated to others separately.

• Absence in quizzes will result in 0 for that quiz. Make-up quizzes will not be given out. A more elaborate note to the students can be found here

• Attendance: The Institute requires a mandatory 75% attendance for all students, which includes time lost due to illness. However this course will require 100% attendance. Please inform the instructor if for any reason you cannot attend a class. Be warned that it will be difficult to make up if you miss classes.

• Illness: In sickness or ill-health, a Medical Certificate from the Institute Sick Bay, or a doctor from an Institute-recognised hospital is necessary, especially if you request for a make-up test. Only in the case of serious illnesses will I consider giving an extension on assignments.

• Make-up Tests: Make-up tests (minor or major exams only) will be given only when the student furnishes a valid documentation of illness for a period including the day of the exam.

• Quizzes: 12%
• Assignments: 28%
• Minor Exam(s): 30%
• Major Exam(s): 30%

As per the Institute regulations, an A grade will be awarded only over 80% and no student with less than 30% will be given a passing grade.

An I grade will be awarded only in the case of an illness during the major exam. A make-up exam will be scheduled at the earliest, and the I grade will be converted as soon as possible. However, please do your best to ensure that you donot break a leg or otherwise fall ill during examinations. Repeat examinations are harder by tradition.

## Class notes and Programs developed in the class

Lecture notes are available on Moodle course page.

Week Monday Thursday General notes
1 Aug 9
L1:Introduction
Aug 12
Recursion, Induction proofs, Efficiency arguments
2 Aug 16
L3:More on recursion, tail recursion
Aug 19
L4: Scopes, Binding, Evaluation strategies
3 Aug 23
L5:Lists, Sorting, Searching
Aug 26
L6: More on Lists, Higher-order functions
Assignment 1 released
4 Sept 2
L7:Higher order functions
Sept 4
L8: Datatypes and recursive dataypes
5 Sept 7
L9:More on types: type classes, IO types
Sept 9
L10: Structural Induction
6 Sept 13
L11:Introduction to Universal Algebra, terms, term algebra
Sept 16
L12:
Quiz 2; Assignment 2