:- multifile(is_a/2).

%
% background knowledge & inference rules added by KH
%
% is_a/2 is a subclass relation
% e.g. is_a(subclass,superclass)
%

%
% as shown in JC-B's diagram
%

is_a(board,device).
is_a(agent,object).
is_a(device,object).
is_a(constraint,inca_constraint).
is_a(dynamic_constraint,constraint).
is_a(static_constraint,constraint).



%
% relates to INCA (added by KH)
%
is_a(issue,inca_issue).
is_a(object,inca_node).

%
% some class/1 missing
%
class(device).
class(inca_node).

%
% missing in JC-B's
%
property(slot,position,integer).
property(slot,length,[long,short]).
property(slot,extra_power_data,[normal,extra]).

%
% corrected from JC-B's
%
is_a(relationship,ix_entity).
is_a(next_to,relationship).
property(next_to,arity,2).		%we need to spec. the arity in some way
att_domain(next_to,arg1,slot).
att_domain(next_to,arg2,slot).
is_a(allocate,relationship).
property(allocate,arity,2).
att_domain(allocate,arg1,board).
att_domain(allocate,arg2,slot).

%
% JC-B's descriptions of relationships
%

%
% allocate/2
%
description(
	(allocate(X,Y) :-
		instance_of(X,board),
		instance_of(Y,slot)
		
	)
	).
description(
	(has(X,Y) :-
		instance_of(X,_),	%X is an instance of a class
		instance_of(Y,_)	%and Y too
		
	)
).



%
% to make P/FDM happy
%
class(ix_entity).
property(ix_entity,id,string).
key_of(ix_entity,id).

is_a(inca_issue,ix_entity).
is_a(inca_node,ix_entity).
is_a(inca_constraint,ix_entity).

