Slide 1

Slide 1 text

:- should_learn(Prolog, You). presenter(name(‘Josh Smith’),twitter(‘@kognate’)). 1 Thursday, January 12, 12

Slide 2

Slide 2 text

Code goo.gl/K42Ja 2 Thursday, January 12, 12

Slide 3

Slide 3 text

greetings. • Josh Smith • @kognate 3 Thursday, January 12, 12

Slide 4

Slide 4 text

will(We, Today). • Learn something about Prolog • Learn what an expert system is • Write some Prolog code 4 Thursday, January 12, 12

Slide 5

Slide 5 text

will_not(We,Today). • Hold our questions till the end • Leave experts in Logic Programing 5 Thursday, January 12, 12

Slide 6

Slide 6 text

listing(Agenda). • What is Prolog • Overview of Syntax and Semantics • Code Dialog • CodeMash Expert System 6 Thursday, January 12, 12

Slide 7

Slide 7 text

what_is(Prolog). 7 Thursday, January 12, 12

Slide 8

Slide 8 text

basic_ideas. • Describe the situation • Perform a query (Ask a question) • Logically deduce new facts • Deductions returned as answers 8 Thursday, January 12, 12

Slide 9

Slide 9 text

the_year_is(1972). • Prolog was born in Europe • PROgraming LOGic • Highest level language in general use today (probably) 9 Thursday, January 12, 12

Slide 10

Slide 10 text

declarative. • is_not(Haskell), is_not(Lisp). • very, very high level 10 Thursday, January 12, 12

Slide 11

Slide 11 text

why(use(Prolog)). • Semantic Web • Rule Engines and Expert Systems (AI) • text processing • it’s fun! (really) 11 Thursday, January 12, 12

Slide 12

Slide 12 text

overview(Syntax) 12 Thursday, January 12, 12

Slide 13

Slide 13 text

stuff. • atom, number, real • fact • predicate • query • list 13 Thursday, January 12, 12

Slide 14

Slide 14 text

operators. • +, -, =:=, ==, <= , >=, mod, div • recursion, recursion, recursion • Logical Correctness is hard 14 Thursday, January 12, 12

Slide 15

Slide 15 text

two_more_things. • :- is implication • ?- is query 15 Thursday, January 12, 12

Slide 16

Slide 16 text

terms. • simple and complex • simple(term) , complex(term(like_this)). • simple(Term) :- complex(term(Term)). 16 Thursday, January 12, 12

Slide 17

Slide 17 text

variables. • Upper Case Terms • should_learn(Prolog, You) :- Prolog = ‘A Really Cool Language’, You = ‘audience member’. • Unification Unification Unification 17 Thursday, January 12, 12

Slide 18

Slide 18 text

dialog(Code). 18 Thursday, January 12, 12

Slide 19

Slide 19 text

module(Codemash, []). 19 Thursday, January 12, 12

Slide 20

Slide 20 text

?- what(question). • what sessions should I go to? 20 Thursday, January 12, 12

Slide 21

Slide 21 text

resources. - Programming in Prolog: Using the ISO Standard - Prolog Programming for Artificial Intelligence - The Art of Prolog, Second Edition: Advanced Programming Techniques - The Craft of Prolog (Logic Programming) by Richard A. O'Keefe - Programming in Prolog: Using the ISO Standard - Prolog Programming in Depth - Clause and Effect: Prolog Programming for the Working Programmer 21 Thursday, January 12, 12