Logic Programs: Definition (continued)
Each argument Term_1, ..., Term_k is a term.
A term is either a logical constant (e.g., “Joe”) OR a logical variable (e.g., “?msg”) OR a functional expression of the form:
LogicalFunction(Term_1, ..., Term_k)
A functional expression semantically essentially denotes a logical constant.
A term, atom, or rule is called “ground” when it has no logical variables.
A fact is a ground rule with empty body.
A primitive conclusion has the form of a ground atom (compound conclusions are built up from these via logical operators such as AND etc.).
Semantically, a rule or LP stands for the set of all its ground instances.
(Observe that a rule body can represent an expression in relational algebra cf. relational DB’s (e.g., SQL).)