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?

Slides:



Advertisements
Similar presentations
© Johan Bos Logic Programming About the course –Taught in English –Tuesday: mostly theory –Thursday: practical work [lab] Teaching material –Learn Prolog.
Advertisements

Chapter 11 :: Logic Languages
Computational Models The exam. Models of computation. –The Turing machine. –The Von Neumann machine. –The calculus. –The predicate calculus. Turing.
Prolog The language of logic. History Kowalski: late 60’s Logician who showed logical proof can support computation. Colmerauer: early 70’s Developed.
1 Introduction to Prolog References: – – Bratko, I., Prolog Programming.
1 Logic Programming. 2 A little bit of Prolog Objects and relations between objects Facts and rules. Upper case are variables. parent(pam, bob).parent(tom,bob).
Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
About prolog  History  Symbolic Programming Language  Logic Programming Language  Declarative Programming Language.
Logic Languages Source: Scott, Michael Programming Language Pragmatics 3rd Ed.
Comp 205: Comparative Programming Languages Declarative Programming Languages Logic Programming Horn-Clause Logic Prolog Lecture notes, exercises, etc.,
Introduction to Prolog What is Prolog? Application Areas of Prolog How does Prolog work? (Syntax of Prolog) Program Structure.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Logic Programming Languages. Objective To introduce the concepts of logic programming and logic programming languages To introduce a brief description.
1 COMP 144 Programming Language Concepts Felix Hernandez-Campos Lecture 26: Introduction to Logic Programming with Prolog COMP 144 Programming Language.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 15 Logic Programming Q: How many legs does.
ISBN Chapter 16 Logic Programming Languages.
Logic Programming Languages
DEDUCTIVE DATABASE.
P-Phunck - Prolog1 Introduction to Prolog Brian Paden.
PROLOG KAIST Gunwoo Park 1. What’s Prolog? 2  General purpose logic programming language  Declarative, which means that the program logic is.
Formal Models of Computation Part II The Logic Model
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
1 Lecture 15: Introduction to Logic Programming with Prolog (Section 11.3) A modification of slides developed by Felix Hernandez-Campos at UNC Chapel Hill.
COP4020 Programming Languages Logical programming with Prolog Prof. Xin Yuan.
Introduction to Logic Programming with Prolog (Section 11.3)
Chapter 16 Logic Programming Languages. Copyright © 2012 Addison-Wesley. All rights reserved.1-2 Chapter 16 Topics Introduction A Brief Introduction to.
1-1 Introduction Logic programming languages, sometimes called declarative programming languages Express programs in a form of symbolic logic Use a logical.
Logic Programming Module 2AIT202 Website Lecturer: Dave Sharp Room: AG15
Getting Started with Visual Prolog
Introduction to Prolog Asst. Prof. Dr. Senem Kumova Metin Revised lecture notes of “Concepts of Programmig Languages, Robert W. Sebesta, Ch. 16”
CSC 270 – Survey of Programming Languages Prolog Lecture 2 – Unification and Proof Search.
Prolog Programming in Logic. 2 SWI-Prolog SWI-Prolog is a good, standard Prolog for Windows and Linux Can be installed on Macintosh with a little more.
CHAPTER 15 & 16 Functional & Logic Programming Languages.
1 Prolog and Logic Languages Aaron Bloomfield CS 415 Fall 2005.
Programming Languages. A Logic Programming Language: Prolog This lesson describes the basic structures and functions of the logic programming language:
CS4026 Formal Models of Computation Part II The Logic Model Lecture 2 – Prolog: History and Introduction.
Logic Programming CSC 358/ Outline Pattern matching Unification Logic programming.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
The AI War LISP and Prolog Basic Concepts of Logic Programming
By: Cory Canter CSC 415 Programming Languages. History  Created by Alain Colmerauer, Phillipe Roussel and Robert Kowalski in 1971  Started as a natural.
Dr. Muhammed Al-Mulhem ICS An Introduction to Logical Programming.
Logic Programming Languages Session 13 Course : T Programming Language Concept Year : February 2011.
Ch. 13 Ch. 131 jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (notes?) Dr. Carter Tiernan.
Introduction to Prolog. Outline What is Prolog? Prolog basics Prolog Demo Syntax: –Atoms and Variables –Complex Terms –Facts & Queries –Rules Examples.
Logic Programming Dr. Yasser Ahmed Nada Fall 2010/2011 Lecture 2 1 Logic Programming.
Principles of programming languages 12: Logic programming Isao Sasano Department of Information Science and Engineering.
CSE 3302 Programming Languages Chengkai Li Spring 2008 Logic Programming: Prolog Lecture 21 – Prolog, Spring CSE3302 Programming Languages, UT-Arlington.
Programming Language Concepts Lecture 17 Prepared by Manuel E. Bermúdez, Ph.D. Associate Professor University of Florida Logic Programming.
Logic Programming Tarik Booker. What will we cover?  Introduction  Definitions  Predicate Calculus  Prolog  Applications.
ISBN Chapter 16 Logic Programming Languages.
Invitation to Computer Science, Java Version, Second Edition 1 Logic Programming Logic programming  Various facts are asserted to be true  On the basis.
Knowledge Based Information System
1-1 An Introduction to Logical Programming Sept
In The Name Of Allah Lab 03 1Tahani Aldweesh. objectives Searching for the solution’s. Declaration. Query. Comments. Prolog Concepts. Unification. Disjunction.
Introduction to Prolog Asst. Prof. Dr. Senem Kumova Metin Revised lecture notes of “Concepts of Programmig Languages, Robert W. Sebesta, Ch. 16”
Done By :- -Nesreen Basem -Sara nabil -Rawan Prolog Program.
Prolog Fundamentals. 2 Review Last Lecture A Prolog program consists of a database of facts and rules, and queries (questions). –Fact:.... –Rule:... :-....
PROLOG “Programmation en Logique”
Pengenalan Prolog Disampaikan Oleh : Yusuf Nurrachman, ST, MMSI.
By P. S. Suryateja Asst. Professor, CSE Vishnu Institute of Technology
PROLOG.
Prolog fundamentals Module 14.2 COP4020 – Programming Language Concepts Dr. Manuel E. Bermudez.
Logic Programming Languages
Logic Programming Languages
Chapter 11 :: Logic Languages
Logic Programming Language
Programming Languages 2nd edition Tucker and Noonan
CS2136: Paradigms of Computation
Chapter 2: Prolog (Introduction and Basic Concepts)
PROLOG.
Presentation transcript:

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?

Prolog is… General purpose logic programming language ◦ We’ll talk about what it’s associated with later Prolog is declarative Logic is expressed in terms of relations, execution triggered by running queries over relations Single data type -> TERM Relation is defined by a CLAUSE

A little history Idea conceived in France -> Alain Colmerauer (1970s) First compiler written by David H. D. Warren in Edinburgh, Scotland Initially aimed at ___________

A little bit of Prolog never hurt anyone Terms are either atoms, numbers, variables, or compound terms Atom – general purpose name with no inherent meaning ex. [], x, hello, ‘Ther’ ‘helo ther’ Variable – can be instantiated via unification (first letter is capitalized) Compound term – functor (atom) and a number of arguments ex. truckyear(mazda,1986)

…I promise… Prolog programs describe relations which are defined by clauses 2 types of clauses: facts and rules Rules: “Head <= Body” <- Head is true if Body is true A rule’s body consists of calls to predicates (goals) Clauses with empty bodies are facts ex. skydiver(‘Ian’). same as skydiver(‘Ian’) <= true.

TEST!!!!!!

What is Prolog For? Other than natural language processing….

What is Prolog For? Other than language processing…. Theorem proving Expert systems Games Automated answering machines Sophisticated control systems