2.1.1 Representing Vocabularies

How to represent a vocabulary in Prolog?

Let us first turn to the representation of vocabularies. Recall that a vocabulary specifies which (non-logical) symbols can be used, and how they can be used. We will soon see that having this information available greatly simplifies the way we can specify models. A vocabulary specifies all the constant and predicate symbols that can occur in formulae, and specifies an arity for each predicate symbol. We will simply assert terms to the database that record this information:

This is what the representation of our example vocabulary will look like:

const(mary).

const(john).

const(anna).

const(peter).

pred(therapist,1).

pred(love,2).

pred(hate,2).

signature.pl: View Download

This code can be found in signature.pl (along with some other constants, predicate symbols, and some stuff we will need later).


Aljoscha Burchardt, Stephan Walter, Alexander Koller, Michael Kohlhase, Patrick Blackburn and Johan Bos
Version 1.2.5 (20030212)