Download presentation
Presentation is loading. Please wait.
Published byArnold Willis Modified over 9 years ago
1
ITEC 380 Organization of programming languages Lecture 7 – Prolog
2
Prolog Review Questions about the exam Review / in-class coding w/ Lisp Binding
3
Prolog Objectives Introduce Prolog –History –Strengths –Basic principles –Example programs
4
Prolog History Created in 1972 by Alain Colmerauer Deals with facts, rules, not variables and operations Truth and logical deduction Simple –It is 2:00. Complex –10 layers of rules / facts to deal with Major part of Artificial intelligence
5
Prolog Environmen t SWI Prolog –http://www.swi-prolog.org/ Tutorials: http://www.learnprolognow.org/ Don’t forget book on website
6
Prolog Facts A true statement Syntax –Factname(identifier that is mapped to factname) –Factname(ident1, ident2) Means that ident1 is the Factname of ident2 Example male(Bob) female(Jill) parent(Jill, Bill) parent(Bob, Bill)
7
Prolog Rules Use facts to make a particular statement Example Note: :- means if, means and Father(TheDad, TheChild) :- parent(TheDad,TheChild), male(TheDad)
8
Prolog Why? Ability to ask computer questions, i.e. is Bill the son of Bob? One level isn’t that interesting Multiple levels are –Tax law –Graduation
9
Prolog Next week More in-depth with prolog Now: –Email midterm, you have until 9PM to email it back to me.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.