Logic Programs as basic representation: Definition
A LP is a set of (premise) rules; semantically, it specifies a set of conclusions.
sendPage(?msg,Joe) ? from(?msg,?s) ? urgent(?msg) ? caresAbout(Joe,?s).
where the “?” prefix indicates a logical variable.
Generally, a rule has the form of Head IF Body :
H ? B_1 ? ... ? B_j ? ~B_j+1 ? ... ? ~B_m .
where m ? 0 ; ? stands for logical “AND”; ? stands for logical “IF”; and H, B_1, ..., B_m are each an atom with form: Predicate(Term_1, ..., Term_k ).
A predicate = a relation. An atom semantically denotes a boolean.
~ stands for negation-as-failure (a.k.a. weak negation, default negation).
- The negation-as-failure construct is logically non-monotonic.
- Intuitively, ~p means p’s truth value is either false OR unknown.