Presentation is loading. Please wait.

Presentation is loading. Please wait.

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?

Similar presentations


Presentation on theme: "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?"— Presentation transcript:

1 Prolog Kyle Marcotte

2 Outline What is Prolog? Origins of Prolog (History) Basic Tutorial TEST!!! (sort of…actually not really at all) My example Why Prolog?

3 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

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

5 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)

6 …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.

7 TEST!!!!!!

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

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


Download ppt "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?"

Similar presentations


Ads by Google