CLIPS>
(deftemplate ino
(multislot str))
CLIPS>
(deftemplate inp
(multislot str))
CLIPS>
(deftemplate equal
(multislot str))
CLIPS>
(deffacts initial
(ino (str one two three))
(ino (str one three four))
(inp (str two one three))
(inp (str one four)))
CLIPS>
(defrule check-equal
(ino (str $?t1))
(inp (str $?t2))
(test (neq $?t1 $?t2))
=>
(assert (equal (str ?t1))))
CLIPS> (reset)
CLIPS> (run)
CLIPS> (facts)
f-0 (initial-fact)
f-1 (ino (str one two three))
f-2 (ino (str one three four))
f-3 (inp (str two one three))
f-4 (inp (str one four))
f-5 (equal (str one two three))
f-6 (equal (str one three four))
For a total of 7 facts.
CLIPS>