Download presentation
Presentation is loading. Please wait.
Published byGodfrey Knight Modified over 8 years ago
1
Prolog CSC 481 Team Project Winter 2009 ES-Tools Team
2
Overview ● Overview ● History ● What is Prolog? ● Language Structure ● How to get started ● Conclusion
3
History ● Research began in the late 60s/early 70s ● Created by scholars – Alain Colmerauer – University of Aix-Marseille – Phillipe Roussel – University of Aix-Marseille – Robert Kowalski – University of Edinburgh ● Both interpreted and compiled ● Very popular in Europe and Japan – Used in ICOT Fifth Generation Computer Systems Initiative
4
What is Prolog? ● Short for Programmable Logic ● A kind of theorem proving framework – Allows functions and procedures as well – Performs deductions in a goal-oriented manner ● An alternative to Lisp-based languages – Jess – CLIPS ● Very versatile
5
Language Structure ● Composed of facts, rules, and queries – Facts and rules are specified in an input file – Facts can take a variety of forms ● true. ● male('Brett'). ● parent('Brett','Daniel'). – Rules are similar to Jess/CLIPS rules ● ancestor(Anc, Child) :- parent(Anc, Child). ● father(Anc,Child) :- parent(Anc, Child), male(Anc).
6
Language Structure ● Composed of facts, rules and queries – Queries are run through an interpreter – Given above rule/fact base, we can execute queries ● ?- father('Brett','Daniel'). //Is Brett the father of Daniel? – Yes ● ?- father('Daniel','Brett'). //Is Daniel the father of Brett? – No ● ?- father('Brett',X). //Of who is Brett the father? X = 'Daniel'. ● ?- father(X,Y). //List all the father relationships here X = 'Brett', Y = 'Daniel'.
7
Getting Started ● Many public implementations – SWI-Prolog (interpreted) – gprolog (compiled) ● SWI-Prolog is well supported across multiple platforms – Windows and Linux versions work well ● Write a rule file, load it in, and start querying! – [filename] //loads a rule file – halt. //exits
8
Conclusion ● Prolog is a well-supported alternative to CLIPS/Jess ● Capable of complex problem solving – Queries provide goal-based deduction ● Structure may be more familiar to those not familiar with LISP ● Would be a great alternative for CLIPS or Jess for classroom assignments – Family Tree, etc.
10
References asdf http://ktiml.mff.cuni.cz/~bartak/prolog/intro.html http://www.doc.ic.ac.uk/~rak/papers/the%20early %20years.pdf http://www.mta.ca/~rrosebru/oldcourse/371199/pro log/history.html asdf
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.