====== LUP – Logical reasoning and programming ====== This page provides information for the class B4M36LUP - Logické usuzování a programování as well as its English-language counterpart BE4M36LUP - Logical reasoning and programming, which are taught jointly. The lectures are held in English unless all participants speak Czech. The course's aim is to explain selected significant methods of computational logic. These include algorithms for propositional satisfiability checking, first-order theorem proving and model-finding, and logical programming in Prolog,. Time permitting, we will also discuss some complexity and decidability issues pertaining to the said methods. Lecturers: [[mailto:karel.chvalovsky@cvut.cz|Karel Chvalovský]], [[mailto:kuzelon2@fel.cvut.cz|Ondřej Kuželka]] Lab instructors: [[mailto:karel.chvalovsky@cvut.cz|Karel Chvalovský]], [[mailto:tothjan2@fel.cvut.cz|Jan Tóth]] Course supervisor: [[mailto:zelezny@fel.cvut.cz|Filip Železný]] ===== Lectures ===== The materials from the previous iteration of this course are available [[https://cw.fel.cvut.cz/b221/courses/lup/start|here]]. ^ ^ Date ^ Lecturer ^ Topic ^ Resources ^ | 1 | 25.9. | Chvalovský | Introduction and propositional logic (recap) | {{:courses:lup:lup1.pdf|slides}} | | 2 | 2.10. | Chvalovský | SAT solving---resolution and DPLL | {{:courses:lup:lup2.pdf|slides}} | | 3 | 9.10. | Chvalovský | SAT solving (cont'd)---CDCL | {{:courses:lup:lup3.pdf|slides}} | | 4 | 16.10. | Chvalovský | SAT solving (cont'd), FOL, and SMT | {{:courses:lup:lup4.pdf|slides}} | | 5 | 23.10. | Chvalovský | FOL and SMT | {{:courses:lup:lup5c.pdf|slides}} | | 6 | 30.10. | Chvalovský | SMT (cont'd) and quantifiers in FOL | {{:courses:lup:lup6c.pdf|slides}} | | 7 | 6.11. | Chvalovský | FOL---Resolution\\ FOL---Equality and model finding | {{:courses:lup:lup7.pdf|slides}}\\ {{:courses:lup:lup7b.pdf|slides}} | | 8 | 13.11. | Chvalovský | Proof assistants | {{:courses:lup:lup8.pdf|slides}} | | 9 | 20.11. | | Dean's Day | | | 10 | 27.11. | Kuželka | Introduction to Prolog | {{:courses:lup:lup10.pdf|slides}}, videos: [[https://www.dropbox.com/s/f76sm2iu02mznaa/lecture1_part1.mp4?dl=0|part 1]], [[https://www.dropbox.com/s/dfa7w8dorlom7ur/lecture1_part2.mp4?dl=0|part 2]], [[https://www.dropbox.com/s/nj7mdtk222wz8z6/lecture1_part3.mp4?dl=0|part 3]] (Erratum: On the slide "An Example (2)” in part 3, the Herbrand universe should be {maria, peter, ai_techniques}) | | 11 | 4.12. | Kuželka | Recursion, lists | {{:courses:lup:lup2023_2.pdf|slides}}, [[https://www.dropbox.com/s/pr7vg8p9gfw7i8r/lecture2_2022.mp4?dl=0|video]] (Erratum: In the example starting at ~17:30, we there should be predicate connectedS instead of connected.) | | 12| 11.12. | Kuželka | SLD trees, cut, negation | {{:courses:lup:lup12.pdf|slides}}, videos: [[https://www.dropbox.com/s/eaaruoa8xlp8gdq/lecture3_part1.mp4?dl=0|part 1]] (Note: Unification, which is explained in this video, was covered at the end of the previous in person lecture), [[https://www.dropbox.com/s/ozhbebcfio3yf1g/lecture3_part2.mp4?dl=0|part 2]], [[https://www.dropbox.com/s/uul1aklnjttjdkr/lecture3_part3.mp4?dl=0|part 3]] (Note: Slides mostly based on materials by Peter Flach.)| | 13 | 18.12. | Kuželka | Search in Prolog | {{:courses:lup:lup13.pdf|slides}}, [[https://www.dropbox.com/s/c1ieadl91oysgd8/lecture_4.mp4?dl=0|video]] | | 14 | 8.1. | Kuželka | Answer set programming | {{:courses:lup:lup14.pdf|slides}}, [[https://www.dropbox.com/s/lmip7w8z0pi9byo/lecture5_answer_set_programming_part1.mp4?dl=0|video]] | Note that the titles and topics of future lectures are tentative and subject to change. ===== Labs ===== ^ ^ Date ^ Tutor ^ Topic ^ Resources ^ | 1 | 25.9. | Chvalovský | General discussion and exercises on propositional logic | {{:courses:lup:lup1_labs.pdf|exercises}} | | 2 | 2.10. | Chvalovský | SAT Solving I | {{:courses:lup:lup2_labs.pdf|exercises}} | | 3 | 9.10. | Chvalovský | SAT Solving II | {{:courses:lup:lup3_labs.pdf|exercises}},\\ {{:courses:lup:lup3_php.tar.gz|notebooks}} | | 4 | 16.10. | Chvalovský | SAT Solving III and FOL | {{:courses:lup:lup4_labs.pdf|exercises}}\\ {{:courses:lup:lup4_card.tar.gz|notebooks}} | | 5 | 23.10. | Chvalovský | SMT | {{:courses:lup:lup5_labs.pdf|exercises}}\\ {{:courses:lup:lup5_smt.tar.gz|SMT examples}} | | 6 | 30.10. | Chvalovský | SMT (cont'd) and FOL (basic notions) | {{:courses:lup:lup6_labs.pdf|exercises}} | | 7 | 6.11. | Chvalovský | FOL Resolution, ATPs | {{:courses:lup:lup7_labs.pdf|exercises}}\\ {{:courses:lup:lup7_labs.tar.gz|TPTP examples}} | | 8 | 13.11. | Chvalovský | Isabelle | {{:courses:lup:lup8_labs.pdf|exercises}} | | | 20.11. | | Dean's Day | | | 9 | 27.11. | Tóth | Prolog as a Database | {{ :courses:lup:lup9_labs_2023.pdf |exercises}} | | 10 | 4.12. | Tóth | Lists in Prolog | {{ :courses:lup:lup10_labs_2023.pdf |exercises}} | | 11 | 11.12. | Tóth | Cut in Prolog | {{ :courses:lup:lup11_labs_2023.pdf |exercises}} | | 12 | 18.12. | Tóth | Search in Prolog | {{ :courses:lup:lup12_labs_2023.pdf |exercises}} | | 13 | 8.1. | Tóth | Answer Set Programming | {{ :courses:lup:lup13_labs_2023.pdf |exercises}} | ==== Tasks ==== ^ ^ Assigned ^ Deadline ^ Name ^ BRUTE label ^ Description ^ Points ^ | 1 | 16.10. | 13.11. | Light Up | | {{:courses:lup:task1.pdf|task1}} | 20 | | 2 | 28.11. | 9.1. | Proof systems | | {{:courses:lup:task2.pdf|task2}} | 15 | | 3 | 18.12. | 31.1. | Escape from Zurg | | {{:courses:lup:lup_task3.pdf|task3}} | 15 | ===== Grading ===== //Note that although we all hope for the best, it may happen that we will have to adjust the following requirements to the evolving coronavirus situation.// ==== Labs ==== There will be 3 tasks (for 20, 15, and 15 points) assigned during the semester. You submit your solutions through [[http://cw.felk.cvut.cz/brute/|BRUTE]]. Late submissions are penalized. An assessment is awarded if you receive at least 25 points for all your solutions. ==== Examination ==== The exam will be a written test (50 points), see a {{:courses:lup:sample.pdf|sample}} and a {{:courses:lup:prolog_exam_2.pdf|test from two years ago}}, and to pass, you need to get at least 25 points. You are eligible for a grade only after receiving the labs assessment. However, you can still attend the exam. The final grade is based on the sum of points you receive for labs (max. 50 pts.) and the exam (max. 50 pts.) and follows university regulations: ^ Points ^ Grade ^ ^ ^ | 100-90 | A | 1 | excellent | | 89-80 | B | 1.5 | very good | | 79-70 | C | 2 | good | | 69-60 | D | 2.5 | satisfactory | | 59-50 | E | 3 | sufficient | | <50 | F | 4 | failed | ===== Links ===== There are many general introductions covering basic notions from propositional and first-order logic. For example, the [[https://openlogicproject.org/|Open Logic Project]] is freely accessible. [[https://link.springer.com/book/10.1007%2F978-3-662-50497-0|Decision Procedures]] (PDF is available from the CTU network) covers many topics from SAT and SMT. An online book that covers various topics discussed in the course is [[https://avigad.github.io/lamr/|Logic and Mechanized Reasoning]]. Yet another relevant book available from the CTU networks is [[https://link.springer.com/book/10.1007/978-1-4471-4129-7|Mathematical Logic for Computer Science]]. ==== SAT/SMT ==== * [[http://satassociation.org/sat-smt-school.html|SAT/SMT Summer Schools]] * [[https://simons.berkeley.edu/programs/sat2021|Satisfiability: Theory, Practice, and Beyond]]---[[https://simons.berkeley.edu/|Simons Institute]] organized a bootcamp and many workshop on SAT (50th anniversary of Cook's paper) * [[https://simons.berkeley.edu/talks/sat-solving|SAT-solving using SATCH by Armin Biere]] * [[http://fmv.jku.at/picosat/| PicoSAT]] and [[https://pypi.org/project/pycosat/|pycosat]] * [[https://pysathq.github.io/|PySAT]] * [[http://minisat.se/| MiniSat]] * [[http://smtlib.cs.uiowa.edu/|SMT-LIB]] * [[https://rise4fun.com/z3/tutorial| Getting Started with Z3: A Guide]] ==== TPTP ==== * [[http://www.tptp.org|The TPTP Problem Library]] for Automated Theorem Proving (Thousands of Problems for Theorem Provers) * [[http://www.tptp.org/cgi-bin/SystemOnTPTP|System on TPTP]] - online interface for ATPs ==== Automated Theorem Provers ==== * [[http://www.eprover.org/|E prover]] * [[https://vprover.github.io/|Vampire]] * [[http://www.cs.unm.edu/~mccune/prover9/|Prover 9]], the successor of [[http://www.cs.unm.edu/~mccune/otter/|Otter]] ==== Model Finders ==== * Paradox * {{:courses:lup:paradox.gz|compiled version 2.3 for linux}} * [[http://code.haskell.org/folkung/|version 2.3]] * [[http://www.cse.chalmers.se/~koen/code/folkung.tar.gz|experimental version 3]] from [[http://www.cse.chalmers.se/~koen/|author's web page]] * [[http://www.cs.unm.edu/~mccune/prover9/|Mace4]]