CPSC 322 - Lecture 5 - September 17, 2004

CPSC 322 - Lecture 5

Formal Semantics


I.  CILOG syntax

Today we began with a review of CILOG syntax, but this time we
used a more pleasant pictorial view to illustrate the terminology.
The short text version is that variables begin with upper case 
letters, constants begin with lower case letters, and either
variables or constants can be terms.  Predicate symbols also 
begin with lower case letters, but they're not terms.  You tell
which lower case words are constants and which are predicate
symbols from context.  Predicate symbols and their associated
constants, variables, and parentheses are called atoms.  Atoms 
make up both facts and rules.  A single atom is a fact.  An
atom followed by an implication arrow (<-) followed in turn by
the conjunction of one or more atoms is a rule.  The atom to the 
left of the arrow is called the head, and everything to the right
of the arrow is called the body.


II.  Semantics

In any linguistic enterprise (and what we're doing at this 
point in the course is getting comfortable with the linguistics
of the CILOG-based RRS) you have a syntax and a semantics:  form
and meaning, respecitvely.  A semantics tells you how symbols 
in the language correspond to things in the chosen task domain and
tells you how to use the correspondences to interpret sentces
in the language.  These correspondences between symbols in the
language and objects in the domain define an interpretation
for the language.

Formally, an interpretation I is a triple (D,phi,pi), where

  D, the domain, is a nonempty set whose elements are the
  individuals that you decided were important to include in
  the world you're trying to model in your RRS

  phi is a function that maps each constant to an element of D
  (the constants are chosen by you too)

  pi is a mapping that assigns to each n-ary predicate symbol 
  (you decided which predicates were important, as well as their
                          n
  arity) a function from D  into {True, False}

We took an example from our Royal Family domain and simplified
it down to three individuals, Prince Charles and his sons,
Prince William and Prince Harry.  We won't try to reproduce all
the lovely pictures here as text, so go study the slides for
awhile.  The things to note are that the example showed just
one possible interpretation of many, and that the five things 
that mapped onto True in the interpretation ended up as five
axioms in the knowledge base.  

A lecture or two ago we talked about the five simple steps to
building a reasoning and representation system.  We can recast
those five steps in terms of our formal definition of an 
intepretation as follows:

  1.  Begin with a task domain that you want to characterize.
      You must have an intended interpretation of that domain.
      Decide which individuals from that domain will go into D.

  2.  Associate constants in the language with individuals in D.
      That mapping is called phi (use the Greek symbol if you can).

  3.  For each relation you want to represent, associate a 
      predicate symbol from the language.  Each n-ary predicate
                         n
      is a mapping from D  (that is, tuples of size n whose 
      elements are individuals from D) to True or False.  That
      mapping is called pi.

  4.  Tell the computer the statements that are true in the
      intended interpretation.  This is called axiomatizing
      the domain, where the definite clauses are the axioms.

  5.  Ask the RRS questions about the intended interpretation,
      and interpret answers using the semantics you have supplied.

Why do we spend so much time talking about semantics?  First of
all, formal semantics gives you a defined process for specifying
your intended interpretation which in turn tells you what axioms
to put into your RRS.  Formal semantics also helps you maintain
the integrity of the RRS.  Without giving some careful 
consideration to the semantics of your RRS, you have no basis for 
evaluating what your RRS does.  If you don't have a well-specified 
interpretation, it's hard to know if the conclusions generated by 
your RRS are right or wrong.  It's kind of pointless to build
an intelligent system whose answers you can't be sure are right,
isn't it.

Last revised: October 3, 2004