12-06-2012, 04:30 PM
Logic Programming and Predicates
A Presentation on Programming Logic .pptx (Size: 88.87 KB / Downloads: 32)
Predicate Logic
Derives from the efforts to formalize the properties of rational human thoughts.
Entirely user-oriented.
Non-deterministic programming language.
Logic Programming Language
Declarative programming paradigm
Set of attributes that a solution should possess are specified rather than a set of steps to obtain such a solution.
Prolog
An example of logic programming language.
Designed to reason using the rules of predicate logic.
Developed in 1970s by Computer Scientists working in the area of Artificial Intelligence (AI).
Facts
Define predicates by specifying the elements that satisfy these predicates.
Assumed to be true.
Examples
teacher(ram, english)
student(hari, english)
Rules
new predicates using those already defined by facts.
Assertion from which conclusion can be drawn if given conditions are true.
Examples
teaches(ram, hari) :- teacher(ram, english), student(hari, english)