(clear) ; Test error conditions for load/save facts
(save-facts)
(save-facts 7)
(save-facts blah.tmp 7)
(save-facts blah.tmp hello)
(save-facts blah.tmp local bogus)
(remove blah.tmp)
(save-facts blah.tmp)
(load-facts)
(load-facts 7)
(load-facts blah.tmp bogus)
(remove blah.tmp)
(load-facts blah.tmp)
(clear) ; Test Saving and Reloading
(load factsav.clp)
(reset)
(set-current-module MAIN)
(assert (A (x 1)) (B (x 1)) (B (x 2)))
(set-current-module BAR)
(assert (D (x 2)) (C (x 1)) (D (x 1)) (E (x 1)))
(set-current-module WOZ)
(assert (G (x 1)) (F (x 1)) (G (x 2)))
(set-current-module MAIN)
(facts *)
(facts)
(save-facts "Temp//fctsav1.fct" visible)
(save-facts "Temp//fctsav2.fct" local A)
(set-current-module BAR)
(facts)
(save-facts "Temp//fctsav3.fct" local C)
(save-facts "Temp//fctsav4.fct" visible B E)
(set-current-module WOZ)
(facts)
(save-facts "Temp//fctsav5.fct" local)
(save-facts "Temp//fctsav6.fct" visible F G E)
(set-current-module FOO)
(facts)
(save-facts "Temp//fctsav7.fct" local)
(save-facts "Temp//fctsav8.fct" visible)
(reset)
(set-current-module MAIN)
(load-facts "Temp//fctsav1.fct")
(facts *)
(retract *)
(load-facts "Temp//fctsav2.fct")
(facts *)
(retract *)
(load-facts "Temp//fctsav3.fct")
(facts *)
(retract *)
(set-current-module BAR)
(load-facts "Temp//fctsav3.fct")
(facts *)
(retract *)
(load-facts "Temp//fctsav4.fct")
(facts *)
(retract *)
(set-current-module WOZ)
(load-facts "Temp//fctsav5.fct")
(facts *)
(retract *)
(load-facts "Temp//fctsav6.fct")
(facts *)
(retract *)
(set-current-module FOO)
(load-facts "Temp//fctsav7.fct")
(facts *)
(retract *)
(load-facts "Temp//fctsav8.fct")
(facts *)
(retract *)
