====== Logic and Constraint Programming ====== ---- ===== News ===== * **29/5/2019**: last lecture * **22/5/2019**: the lecture is postponed * **20/5/2019**: partial exam results published (see lecture of 7/5/19) * **12/3/2019**: the lecture is postponed * **4/3/2019**: the course web site is now on-line ---- ===== General Info ===== **Teacher**: * [[https://docenti.unicam.it/pdett.aspx?ids=N&tv=d&UteId=990&ru=PA|Francesco Tiezzi]] **ESSE3 Link** * [[https://didattica.unicam.it/Guide/PaginaADErogata.do?ad_er_id=2018*N0*N0*S2*14632*9986&ANNO_ACCADEMICO=2018&mostra_percorsi=S|Logic and Constraint Programming - AY 2018/2019]] **Lessons schedule**: * Tue 9:00-12:00, AB1 * Wed 14:00-16:00, AB1 **Students Office hours**: * On appointment (via email), second floor of Polo Lodovici, via Madonna delle Carceri 9, Camerino ---- ===== Course Objectives ===== D1 – KNOWLEDGE AND UNDERSTANDING At the end of the course, the student should be able to: 1- Have the knowledge of the issues concerning logic and constraint programming. 2- Have the knowledge of the syntax and the semantics of the Prolog language. 3- Have the knowledge of the syntax and the semantics of the input languages of Drools. 4- Have the knowledge of the syntax and the semantics of the input languages of Minizinc. 5- Have the knowledge of the syntax and the semantics of the input languages of Z3. D2 – APPLYING KNOWLEDGE AND UNDERSTANDING At the end of the course, the student should be able to: 1- Writing logic programs in Prolog. 2- Writing rule-based programs in Drools. 3- Writing constraint-based programs in Minizinc. 4- Writing constraint-based programs in Z3. 5- Understand technical manuals on the languages and tools presented in the course and similar ones. D3 – MAKING JUDGEMENTS At the end of the course, the student should be able to: 1- Identify the best language suitable for describing the logic of an intelligent system. D4 - COMMUNICATION SKILLS At the end of the course, the student should be able to: 1- Describe in a clear way the behaviour of a logic- and constraint-based program. 2- Write a brief survey and state of the art about a given research topic related to constraint and logic programming by searching the scientific literature. D5 – LEARNING SKILLS At the end of the course, the student should be able to: 1- Search the scientific literature for specific advances in languages and tools for logic and constraint programming. 2- Autonomously understand and learn to use new features added to tools for logic and constraint programming. ---- ===== Course Contents ===== * Logic programming: basic concepts and Prolog language * Introduction to Constraint Satisfaction Problems * Rule-based programming: Drools * Constraint programming: Minizinc * Resolution of Constraint Satisfaction Problems: Z3 ---- ===== Study material ===== **Course Slides** * {{ :didattica:magistrale:lcp:ay_1819:lcp_intro1819.pdf |General Info and Introduction}} * {{ :didattica:magistrale:lcp:ay_1819:lpnchapter1.pdf |LPN chapter1}} * {{ :didattica:magistrale:lcp:ay_1819:lpnchapter2.pdf |LPN chapter2}} * {{ :didattica:magistrale:lcp:ay_1819:lpnchapter3.pdf |LPN chapter3}} * {{ :didattica:magistrale:lcp:ay_1819:lpnchapter4.pdf |LPN chapter4}} * {{ :didattica:magistrale:lcp:ay_1819:lpnchapter5.pdf |LPN chapter5}} * {{ :didattica:magistrale:lcp:ay_1819:lpnchapter6.pdf |LPN chapter6}} * {{ :didattica:magistrale:lcp:ay_1819:lpnchapter10.pdf |LPN chapter10}} **Lectures** * 05/03/2019: general info, SWI Prolog, Declarative Programming, History of Prolog, examples ([[https://unicam.webex.com/unicam/ldr.php?RCID=c76ff42a60d6124457bc09564a09458b|registration]]). * 06/03/2019: variables, Prolog syntax, exercises [[https://unicam.webex.com/unicam/ldr.php?RCID=d7f8b3072baf7ed74754b7429c47158c|registration]] * 19/03/2019: prolog unification [[https://unicam.webex.com/unicam/ldr.php?RCID=7ec1a950c87e2b2fa9c9d47fcc85c15a |registration]] * 20/03/2019: proof search; exercises [[https://unicam.webex.com/unicam/ldr.php?RCID=b5b21e8be988a26d02d8d58fcf13e2f5 |registration]] * 26/03/2019: recursion [[https://unicam.webex.com/unicam/ldr.php?RCID=78830c72fcc950bd2704232c039a55bd |registration]] * 27/03/2019: exercises [[https://unicam.webex.com/unicam/ldr.php?RCID=632acece203587752200c65fdfaf33ad|registration]] * 02/04/2019: list, exercises [[https://unicam.webex.com/unicam/ldr.php?RCID=41ab2bf19003cbc8b8133c098d09dd74|registration]] * 03/04/2019: arithmetics [[https://unicam.webex.com/unicam/ldr.php?RCID=2a0c3b9880879f517d27bab2e38f8174|registration]] * 9/04/2019: list, exercises [[https://unicam.webex.com/unicam/ldr.php?RCID=29ec376b45f4288bf32439d2588764c7 |registration]] * 10/04/2019: cut, exercises [[https://unicam.webex.com/unicam/ldr.php?RCID=ecb1c2eaec41b56da636c0fe9860417b |registration]] * 16/04/2019: Cybersecurity seminar * 7/05/2019: partial exam on Prolog {{ :didattica:magistrale:lcp:ay_1819:partial_test_-_may_2019_-_results.pdf |results}} * 14/05/2019: Drools [[https://unicam.webex.com/unicam/ldr.php?RCID=1cf17e54841d4b721b5665c67db2970c |registration]] {{ :didattica:magistrale:lcp:ay_1819:1_-_drools_installation.zip |tutorial}} * 15/05/2019: Drools [[https://unicam.webex.com/unicam/ldr.php?RCID=49c11445f92bfced6a06f7fc0993b9e4|registration]] {{ :didattica:magistrale:lcp:ay_1819:drools2.zip |tutorial}} {{ :didattica:magistrale:lcp:ay_1819:drools.pdf |slides}} * 21/05/2019: Drools, Project discussion {{ :didattica:magistrale:lcp:ay_1819:drools_2.pdf |slide}} {{ :didattica:magistrale:lcp:ay_1819:drools_tutorial_2.zip |tutorial}} [[https://unicam.webex.com/unicam/ldr.php?RCID=2dec36201ad3ded4543d3a1adc8879c8 |registration]] * 22/05/2019: Project discussion, {{ :didattica:magistrale:lcp:ay_1819:minizinc.ppt |A brief overview of Minizinc}} [[https://unicam.webex.com/unicam/ldr.php?RCID=465f4027bb5ff6e2baaaeddf24219b75 |registration]] **Practical sessions** * {{ :didattica:magistrale:lcp:ay_1819:practical_session1.pl.zip |Session1}} {{ :didattica:magistrale:lcp:ay_1819:ex1.pl.zip |Solution}} * {{ :didattica:magistrale:lcp:ay_1819:ex2.4.zip |Example 2.4}} {{ :didattica:magistrale:lcp:ay_1819:ex2.4_solution.pl.zip |Solution}} * {{ :didattica:magistrale:lcp:ay_1819:ex3.zip |Exercises 3.1-3.4}} {{ :didattica:magistrale:lcp:ay_1819:ch3_solutions.zip |Solution}} * {{ :didattica:magistrale:lcp:ay_1819:exercise_ch4.zip |Exercises 4.2-4.5}} {{ :didattica:magistrale:lcp:ay_1819:solutions_ch4.zip |Solutions}} * {{ :didattica:magistrale:lcp:ay_1819:exercises_ch5.zip |Exercises 5.2-5.5}} {{ :didattica:magistrale:lcp:ay_1819:exercises_ch5_solutions.zip |Solutions}} * {{ :didattica:magistrale:lcp:ay_1819:ex6.pl.zip |Exercise 6}} {{ :didattica:magistrale:lcp:ay_1819:ex6_solution.pl.zip |Solution}} * {{ :didattica:magistrale:lcp:ay_1819:ex10.pl.zip |Exercise 10}} {{ :didattica:magistrale:lcp:ay_1819:ex10_solution.pl.zip |Solution}} {{ :didattica:magistrale:lcp:ay_1819:alternative_solution.zip |Alternative solution}} **Reference books** The main material of the course consists of: * Stuart J. Russell and Peter Norvig. Artificial Intelligence A Modern Approach. Third Edition. Pearon, 2016. * Patrick Blackburn, Johan Bos, Kristina Striegnitz. Learn Prolog Now! 2001 * Tutorial of Drools, Minizinc, Z3. * Course's slides. Moreover, lecture notes, papers and slides may be given by the teacher for studying and for exercises. ---- ===== Exams ===== **Exam Dates A.Y. 2015/2016** * Winter session dates here * Summer session dates here * Autumn session dates here * Winter session dates here (2016) **Exam rules**: ** Exam Results ** * N/A