Course Information
CSE 505 Computing with Logic
Fall 2015
Stony Brook University
Instructor: Dr. Paul Fodor
http:/www.cs.stonybrook.edu/~cse505
1
Course Description
The course explores logic-based computing and logic
programming. It includes an introduct
Stable Models Semantics and
Answer Set Programming
CSE 505 Computing with Logic
Stony Brook University
http:/www.cs.stonybrook.edu/~cse505
1
General Logic Programs
A program is a collection of rules of the form
a a1, ., an, not an+1, not an+k.
Let be a
Introduction to Logic, Logic
Programming Concepts and Languages
CSE 505 Computing with Logic
Stony Brook University
http:/www.cs.stonybrook.edu/~cse505
1
A Puzzle
Knights and Liars: Knights always tell
the truth; Liars always lie.
Zoe: "Mel is a liar"
Mel
Programming in Prolog
CSE 505 Computing with Logic
Stony Brook University
http:/www.cs.stonybrook.edu/~cse505
1
Relations
parent(X,Y): X is a parent of Y.
parent(pam, bob). parent(bob, ann).
parent(tom, bob). parent(bob, pat).
parent(tom, liz). parent(pa
Definite Logic Programs:
Models
CSE 505 Computing with Logic
Stony Brook University
htTp:/www.cs.stonybrook.edu/~cse505
1
Logical Consequences of Formulae
Recall: F is a logical consequence of P (i.e. P |= F)
iff
Every model of P is also a model of F.
S