Logic programming. Introduction To express program in symbolic logic Also called declarative language Only the specification of desired results are stated.

Slides:



Advertisements
Similar presentations
Page 1 Nov 09, 2004CAS 701, McMaster Logic Programming and Prolog Presenter: John Xu Date: Nov 09, 2004.
Advertisements

1. An Overview of Prolog.
1 Relational Algebra* and Tuple Calculus * The slides in this lecture are adapted from slides used in Standford's CS145 course.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Relational Algebra Chapter 4, Part A.
Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
Predicates and Quantifiers
Chapter 8: The Logical Paradigm Lecturer: Xinming (Simon) Ou CIS 505: Programming Languages Fall 2010 Kansas State University 1.
CSE (c) S. Tanimoto, 2008 Propositional Logic
Logic Programming Languages. Objective To introduce the concepts of logic programming and logic programming languages To introduce a brief description.
First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate.
Symbolic AI Lecture Every Monday 12:30-13:30 Lab Session (two groups) Tuesday 16:30 3P30 Tuesday 17:30 3P30.
Symbolic AI weeks of even numbers Lecture Monday 13:00-14:00 (2Q50) Lab Sessions (five groups, all in 2Q52) Monday.
(9.1) COEN Logic Programming  Logic programming and predicate calculus  Prolog statements  Facts and rules  Matching  Subgoals and backtracking.
Course 2: Inequalities Objectives:
Adapted from Discrete Math
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
DEDUCTIVE DATABASE.
Discrete Mathematics and Its Applications
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Lecture 3 [Self Study] Relational Calculus
Color: A Modern Web Development Language Mark J. Stahl Advised By: Dr. Mark Burge Department of Computer Science Undergraduate Project.
1 Introduction to Logic Programming. 2 Human Logic Humans are information processors, We acquire information about the world and use this information.
The Predicate Calculus
CS3518 Languages and Computability Kees van Deemter Lectures Monday14:00New King’s 14 Tuesday11:00KC T2 Tutorials/Practicals Tuesday13:00-15:00.
1-1 Introduction Logic programming languages, sometimes called declarative programming languages Express programs in a form of symbolic logic Use a logical.
110/19/2015CS360 AI & Robotics AI Application Areas  Neural Networks and Genetic Algorithms  These model the structure of neurons in the brain  Humans.
ITEC 380 Organization of programming languages Lecture 7 – Prolog.
Introduction to Prolog Asst. Prof. Dr. Senem Kumova Metin Revised lecture notes of “Concepts of Programmig Languages, Robert W. Sebesta, Ch. 16”
Control Algorithms 1 Chapter 6 Control Algorithms 1 Chapter 6 Pattern Search.
© Jalal Kawash 2010Peeking into Computer Science George Boole English Mathematician His The Mathematical Analysis of Logic, 1848 is the first.
ARTIFICIAL INTELLIGENCE DR. ABRAHAM AI a field of computer science that is concerned with mechanizing things people do that require intelligent.
First-Order Logic Introduction Syntax and Semantics Using First-Order Logic Summary.
CS4026 Formal Models of Computation Part II The Logic Model Lecture 2 – Prolog: History and Introduction.
Section Predicates & Quantifiers. Open Statement 2 x > 8 p < q -5 x = y + 6 Neither true nor false.
Prolog Kyle Marcotte. Outline What is Prolog? Origins of Prolog (History) Basic Tutorial TEST!!! (sort of…actually not really at all) My example Why Prolog?
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
Computer Science 210 Computer Organization Course Introduction.
Dr. Muhammed Al-Mulhem ICS An Introduction to Logical Programming.
Logic Programming Languages Session 13 Course : T Programming Language Concept Year : February 2011.
Logical and Functional Programming
Discrete Structures Predicate Logic 1 Dr. Muhammad Humayoun Assistant Professor COMSATS Institute of Computer Science, Lahore.
Logic Programming (LP) expresses code using of a restricted form of symbolic logic. LP programs are declarative, rather than algorithmic. An LP program.
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 21 A First Course in Database Systems.
Logic Programming Tarik Booker. What will we cover?  Introduction  Definitions  Predicate Calculus  Prolog  Applications.
ISBN Chapter 16 Logic Programming Languages.
MB: 26 Feb 2001CS Lecture 11 Introduction Reading: Read Chapter 1 of Bratko Programming in Logic: Prolog.
INTRODUCTION JavaScript can make websites more interactive, interesting, and user-friendly.
Invitation to Computer Science, Java Version, Second Edition 1 Logic Programming Logic programming  Various facts are asserted to be true  On the basis.
1-1 An Introduction to Logical Programming Sept
Lecture 4-1CS250: Intro to AI/Lisp Logical Reasoning I Lecture 4-2 January 25 th, 1999 CS250.
In The Name Of Allah Lab 03 1Tahani Aldweesh. objectives Searching for the solution’s. Declaration. Query. Comments. Prolog Concepts. Unification. Disjunction.
Discrete Mathematics Lecture # 1. Course Objectives  Express statements with the precision of formal logic.  Analyze arguments to test their validity.
Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 10 of 42 Wednesday, 13 September.
Done By :- -Nesreen Basem -Sara nabil -Rawan Prolog Program.
CS/APMA 202 Spring 2005 Aaron Bloomfield. Sequences in Nature
CT214 – Logical Foundations of Computing Darren Doherty Rm. 311 Dept. of Information Technology NUI Galway
Artificial Intelligence Knowledge Representation.
CS104 The Foundations: Logic and Proof 1. 2 What is Discrete Structure?  Discrete Objects  Separated from each other (Opposite of continuous)  e.g.,
Artificial Intelligence Lecture No. 14 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
1 Artificial Intelligence CS370D Prolog programming Introduction to Prolog.
By P. S. Suryateja Asst. Professor, CSE Vishnu Institute of Technology
The function of knowledge representation scheme is
Introduction to Prolog
Prolog programming Introduction to Prolog
Logic Programming Languages
Discrete Mathematics Lecture 2: Propositional Logic
MAT 3100 Introduction to Proof
Discrete Mathematics Lecture 2: Propositional Logic
George Boole English Mathematician
Representations & Reasoning Systems (RRS) (2.2)
Presentation transcript:

Logic programming

Introduction To express program in symbolic logic Also called declarative language Only the specification of desired results are stated State the form of the result rather than how a result is to be computed Logic programming is a declarative approach of writing computer programs based on Logic

Brief history 1970s AI group To specifying predicate calculus Prolog

Predicate calculus Proposition: a logical statement that is true or not true Formal logic describes proposition that allows them to be checked or validity

Logic Programming – Example Suppose we have the following sentences 1. CS student of NTHU must take the core course cs A CS student can not obtain a degree without passing the required course I am a CS student of NTHU and want to obtain a degree, should I pass cs2403?

/* Filename: ancestor.pro This program creates a small set of facts and rules on who is the ancestor of whom. The user types the desired goal interactively when the program is run.*/ /* ancestor(A, B) means A is an ancestor of B */ ancestor(bob, susan). ancestor(A, X) :- parent(A, X). ancestor(A, X) :- parent(A, C), ancestor(C, X). /* parent(P, C) means P is a parent of C */ parent(fred, sally). parent(tina, sally). parent(sally, diane). parent(sam, bill).

Logic Programming – Prolog Query Queries: ancestor(fred, sally). Yes ancestor(fred, diane). Yes ancestor(fred, bill). No

Logic Programming – Reference Book: Ralph P. Grimaldi, DISCRETE AND COMBINATORIAL MATHEMATICS, 5TH ED, Pearson Education, 2004 Ulf Nilsson and Jan Ma luszy_nski, LOGIC, PROGRAMMING AND PROLOG, 2ND ED, Ulf Nilsson and Jan Ma luszy_nski, 2000 Web: