This is the multiple defeasible inheritance reasoner with exceptions
described in:

Ballim, A.  (1992) "ViewFinder:  A Framework for Representing, Ascribing
and Maintaining Nested Beliefs of Interacting Agents," Ph.D.  Dissertation,
Dept.  d'Informatique, Universite de Geneve, Geneva, Switzerland.


based on that described in:

Ballim, A., D.  Fass & S.  Candelaria de Ram (1988a) "Resolving a clash of
intuitions:  Utilizing strict and defeasible information in inheritance
systems," Memoranda in Computer and Cognitive Science, MCCS-88-119,
Computing Research Laboratory, New Mexico State University, Las Cruces, NM.

Ballim, A., D.  Fass & S.  Candelaria de Ram (1988b) "HETIS:  a
Heterogeneous Inheritance System," ISSCO Working papers, 55, ISSCO, 54 rte.
des Acacias, 1227 Geneva, Switzerland.

Ballim, A., S.  Candelaria de Ram & D.  Fass (1989) "Reasoning using
Inheritance from a Mixture of Knowledge and Beliefs," in Knowledge Based
Computer Systems (Proceedings of KCBS '89), S.  R.  Ramani & K.  Anjaneylu,
eds., Narosa Publishing House, Delhi, 387--396.


It has been written to work with sicstus prolog, so should also work with
quintus, and should be convertible to any Edinburgh-standard prolog.

			      Installation:
			      =============

Edit the file lib/LibBoot.pl and change /home/afzal/inher/src/vf-hetis
to indicate where you have installed this directory.

If you have "sicstus" then "cd" to the lib/predicates and type "make"
and do the same in lib/collections.

				Execution:
				==========

To load (and test) the program, start your prolog then at the prompt type:

	|? [test].

You then have a network loaded (as defined in nodes.db) and can check
inheritance between any two nodes (inherit(N1,N2)) or find all the ancestors
(ancestors(N,A)) or all the descendants (descendants(N,D)) of a node
(although this latter two are horrible predicates as they just exhaustively
call inherit(N,_)).


			 Algorithmic description
			 =======================
General loop:

	Take a set of paths of the same (highest precdence) from a set of
	paths. 

	The others should be noted as non-precedence paths.

	With each of the highest precedence paths, expand outwards from the
	end (Ns) in a tree-fashion until the connections to all of the leafs
	are of weaker precedence than the connection to Ns, but the
	connections to nonleaf nodes from Ns out are of equal precdence to the
	connection to Ns.

	As you are going along expanding, need to check for BC, NC, CC, and LC
	conditions. Further, need to also check for invalidation (IC) by
	comparing to the paths from the previous iteration. (NB: need to check
	for both negative paths invalidated by positive paths, and positive
	paths invalidated by negative paths.

	Maybe, only need to check for invalidation of positive paths by
	negative ones, and not the other way around. Rationale for this is
	that by their nature (for our current link types) a negative link
	always completes a path. So, if it is invalidated by a positive path,
	then
	* the positive path must have higher precedence than this negative
	one, 
	* and be valid, 
	* and furthermore the positive path will necessarily be a better path
	outwards from this node than any path that is weaker than the negative
	one, because the positive path is guaranteed to be valid and stronger
	(by transitivity) than any weaker positive path.

	However, for positive paths we are not guaranteed complettion of the
	path. In fact, it is far more likely that we DON'T have a completion
	of the path, and we are not guaranteed that there is any stronger
	positive path. So we need to know whether it has been invalidated or
	not. 

	To sum up: it is not necessary that we always know when a path is
	invalidated. It is only ever important (for the purpose of the current
	program) to know when a positive path has (possibly) been invalidated
	by a negative path, because if a negative path is invalidated, then
	the path that invalidates it is necessarily a better path out from it,
	and hence we need not consider weaker positive paths from it.



Program termination: 

	If have no more paths to expand,
	at end of a loop have paths in GC
