%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Knowledge Representation and Reasoning CSC 486/2506, Fall 2008
%
% Sample file for exercise 4, assignment 2 (Prolog implementation)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% difference(C1,C2,D)
%
% D is the difference of C1 and C2, where C1 and C2 are
% represented in the format discussed in the guide
%
% You should implement this predicate
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% this implementation only prints the input

difference(C1,C2,D):- write(C1),nl,write(C2),nl.









%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%           OBS: You should not modify anything below 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% compDiff(File): takes a file name, reads the two concepts in the file
%
% This should work under SWI Prolog
%
% DO NOT CHANGE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
compDiff(File) :-
        open(File,read,R),	  % Opens the file
	read(R,D1),
	read(R,D2),
	close(R),                 % Close the file
        difference(D1,D2,Z),
	write('Difference: '),write(Z),nl.		 % Call solve_ls_sat with list of clauses






