ai-prolog - Logic Programming Languages featuring Prolog,...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Logic Programming  Languages featuring Prolog, your new favorite  language
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    2 Prolog PRO gramming in  LOG ic It is the most widely used logic  programming language Its development started in 1970 What’s it good for? Knowledge representation Natural language processing State-space searching (Rubik’s cube) Expert systems, deductive databases, Agents
Background image of page 2
    3 Overview of Logic Programming Main idea:  Ask the computer to solve  problems using principles of logic: Program states the known facts To ask a question, you make a statement  and ask the computer to search for a proof  that the statement is true Additional mechanisms are provided to  guide the search to find a proof 
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    4 Declarative vs. Imperative Languages used for logic programming are called  declarative  languages because programs written in  them consist of declarations rather than assignment  and flow-of-control statements. These declarations  are statements, or  propositions , in symbolic logic.  Programming in imperative languages (e.g., Pascal,  C) and functional languages (e.g., Lisp) is  procedural which means that the programmer knows what is to  be accomplished by the program and instructs the  computer on exactly how the computation is to be  done. 
Background image of page 4
    5 Logic Programming Programming in logic programming  languages is non-procedural.  Programs in such languages do not state how  a result is to be computed. Instead, we supply  the computer with: relevant information (facts and rules) a method of inference for computing desired  results. Logic programming is based on the  predicate  calculus.  
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    6 Logic background Horn clauses General form: IF (A1 and A2 and A3 …) THEN H Head = H  Body = A1 and A2 and …. E.g. “If X is positive, and Y is negative,  then Y is less than X”
Background image of page 6
    7 The Predicate Calculus: Proposition Proposition: A proposition is a logical statement, made  up of objects and their relationships to  each other, which may or may not be true. Examples: man ( john likes ( pizza baseball functor parameters
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    8 The Predicate Calculus: Logical Connectors A compound proposition consists of 2 or more  propositions connected by logical connectors,  which include  Negation: ¬ a (“not a”) Conjunction:    b (“a and b”) Disjunction:     b (“a or b”) Equivalence:  b (“a is equivalent to b”) Implication:  b (“a implies b”)          b (“b implies a”)
Background image of page 8
    9 The Predicate Calculus: Quantifiers Variables may appear in formulas, but only  when introduced by  quantifiers :
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/20/2011 for the course CS 6810 taught by Professor Hecker during the Spring '10 term at CSU East Bay.

Page1 / 57

ai-prolog - Logic Programming Languages featuring Prolog,...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online