%============================================================================== % Project: SLP - An Interpreter for Super Logic Programs / Static Semantics % Module: test8.txt % Purpose: Distinction between conditional facts and rules % Last Change:13.10.2001 % Language: SLP % Author: Stefan Brass % Email: Stefan.Brass@informatik.uni-giessen.de, sbrass@sis.pitt.edu % Address: Universitaet Giessen, Arndtstr. 2, 35392 Giessen, Germany % Copyright: (c) 2001 by Stefan Brass % Licence: Distributed under the conditions of the GNU Public Licence. %============================================================================== % This simply tests the distinction between conditional facts and rules. % It was the first test I used when I had implemented the rule data structures. % By the way, it also does one hyperresolution step. p :- q. q :- r, not s. p | q :- r, s, not u, not(w1 & w2). p. r | t :- not a, not (b & c), not d. r :- not s. % The following conditional facts should be listed: % p. % r | t :- not a, not (b & c), not d. % r :- not s. % The following rules should be listed: % p :- q. % q :- r, not s. % p | q :- r, s, not u, not(w1 & w2). % The following facts are derived (Hyperresolution Fixpoint): % p. % r | t :- not a, not (b & c), not d. % r :- not s. % q :- not s. % The residual program is: % p. % q. % r. % Occurrences of the negative literal not s are linked in the inverse order, % therefore q is listed first. $v.