;; 17-Apr-97 by EHN

ARGUMENT TYPES
==============

ALL := SYMBOL | SLOT_LIST | NOT | MULT | OR

SYMBOL :=
  A single atomic value, like '+', '-', 'MASS', etc.

SLOT_LIST :=
  A "basic" f-structure, like '((cat n)(root boy))'.
  More formally, a list of slot-value pairs, where each slot 
	is a symbol and each value is a member of ALL

NOT :=
  The negation of any member of ALL, e.g. (*NOT* +)

MULT :=
  Conjunction. Used when a slot must have multiple values, e.g.,
	'((root man)(adj (*multiple* ((root big)) ((root tall)))))'

  More formally, a list of members of ALL, marked as a conjunction.

  Note: Can appear at the top-level, as well.

OR :=
  Disjunction. Used when a slot must have disjunctive values, e.g.,
	'((root man)(adj (*or* ((root big)) ((root tall)))))'

  More formally, a list of members of ALL, marked as a disjunction.

  Note: Can appear at the top-level, as well.


UNIFICATION TABLE
=================

Here we attempt to specify, via an exhaustive table, what happens when
each f-structure type is unified with every other f-structure type.

ALL := SYMBOL | SLOT_LIST | NOT | MULT | OR

Argument A	Argument B	Algorithm
--------------------------------------------------------------------------------
SYMBOL		SYMBOL		= SYMBOL iff the two symbols are equal, else *FAIL*
SYMBOL		SLOT_LIST	= *FAIL*
SYMBOL		NOT		= *FAIL* if the symbol unifies with NOT content, else = SYMBOL
SYMBOL		MULT		= *FAIL*
SYMBOL		OR		= SYMBOL iff SYMBOL matches some disjunct, else *FAIL*
SLOT_LIST	SYMBOL		= *FAIL*
SLOT_LIST	SLOT_LIST	= new = (); 
				  foreach CS in common_slots {
					temp = UNIFY(CS_a,CS_b); 
					if (temp eq *FAIL*) then *FAIL*
					else add temp to new; 
				  }
				  foreach NCS in non_common_slots {
					add NCS to new;
				  }
				  return new;
SLOT_LIST	NOT		= *FAIL* if SLOT_LIST unifies with NOT content, otherwise SLOT_LIST
SLOT_LIST	MULT            = *FAIL*
SLOT_LIST	OR		= *FAIL* unless SLOT_LIST unifies with some disjuncts, else those disjuncts unifications (with an *OR* if necessary)
NOT		SYMBOL		= *FAIL* if the symbol unifies with NOT content, else = SYMBOL
NOT		SLOT_LIST       = *FAIL* if SLOT_LIST unifies with NOT content, else SLOT_LIST
NOT		NOT             = *FAIL* unless NOT_1 content unifies with NOT_2 content, else the unify result
NOT		MULT		= *FAIL* if MULT unifies with NOT content, else MULT
NOT		OR		= *FAIL* iff NOT content unifies with some disjunct, else OR
MULT		SYMBOL          = *FAIL*
MULT		SLOT_LIST	= *FAIL*
MULT		NOT		= *FAIL* if MULT unifies with NOT content, else MULT
MULT		MULT		= *FAIL* unless each member of MULT_1 matches a unique member of MULT_2, else result
MULT		OR		= *FAIL* unless the MULT unifies with some disjuncts, else result
OR		SYMBOL          = SYMBOL iff SYMBOL matches some disjunct, else *FAIL*
OR		SLOT_LIST	= SLOT_LIST iff SLOT_LIST unifies with some disjunct, else *FAIL*
OR		NOT		= *FAIL* iff NOT content unifies with some disjunct, else OR
OR		MULT		= *FAIL* unless the MULT unifies with some disjunct, else result
OR		OR		= Find the subset of OR_1 s.t. each element unifies with a disjunct in OR_2;
				  Return single element if |subset| = 1; OR if |subset| > 1; else *FAIL*
