1 / 9

Prolog

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

oded
Download Presentation

Prolog

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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’ ‘helother’ • 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

More Related