views:

48

answers:

1

I'm having a hard time coming to grips with relational clausal logic, and I'm not sure if this is the place to ask but it would be help me so much with revision if anyone could provide guidance with the following questions.

Let P be the program:

academic(X); student(X); other_staff(X):-
      works_in(X, university).
:-student(john).
:-other_staff(john).
works_in(john, university)

Question: Which are the Herbrand interpretations of P?

+1  A: 

This isn't regular Prolog syntax: ISO Prolog doesn't allow ";" operators in the head, to the left of the ":-". I'm guessing that this means "For p is each of academic, student, other_staff, p(X) :- works_in(X, university)".

The Herbrand interpretation of P, call it Herb(P) is a set of sentences made up from the predicates and atoms in the program, which is the least such set of sentences closed under inference from the program. This contains the facts asserted in P: in this case there are two one-place predicates, and the sentences derivable from applying the clause: here there are two inferences applicable, both giving the same conclusion, a two-place predicate. This gives a set, Herb(P), with three elements.

Charles Stewart