/* $Id: rdfs.pro,v 1.1 2000/08/08 13:44:41 connolly Exp $ */ /* swi prolog debian package: Package: swi-prolog Status: install ok installed Priority: optional Section: interpreters Installed-Size: 3368 Maintainer: Milan Zamazal Version: 3.3.0beta9-5 Depends: libc6 (>= 2.1), libncurses5, libreadline4 (>= 4.1) Description: Prolog interpreter. http://www.swi.psy.uva.nl/projects/SWI-Prolog/ */ entails([M], P, S, O) :- says(M, P, S, O). /* @@ short-hand junk */ label(Thing, Name) :- entails(_Msgs, 'http://www.w3.org/2000/01/rdf-schema#label', Thing, String), string_to_atom(String, Name). type(I, C) :- entails(_Msgs, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type', I, C). /* @@hmm... how to weaken these premises from says to entails */ /* go meta: says(rdf-spec, _rule_below_) */ entails(list_to_set([M1, M2]), Genl, S, O) :- says(M1, 'http://www.w3.org/2000/01/rdf-schema#subProperty', Specl, Genl), says(M2, Specl, S, O). entails(list_to_set([M1, M2]), 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type', I, Super) :- says(M1, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type', I, Sub), says(M2, 'http://www.w3.org/2000/01/rdf-schema#subClass', Sub, Super). /* algernon backlink */ entails(list_to_set([M1, M2]), Rel, S, O) :- says(M1, 'http://www.w3.org/2000/07/hs78/algernon#backlink', Rev, Rel), says(M2, Rev, O, S). says(replyX, 'http://www.w3.org/2000/07/hs78/algernon#backlink', 'http:proposal43/proposal.rdf#forExample', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'). include('proposal.pro').