(set-sequence-operator-recognition FALSE) (set-dynamic-constraint-checking FALSE) (set-strategy depth) (unwatch all) (watch rules) ; mab.clp test (clear) (open "Results//example.rsl" example "w") (load "compline.clp") (load "mab.clp") (reset) (progn (dribble-on "Actual//mab.out") (run) (dribble-off)) (printout example "mab.clp differences are as follows:" crlf) (compare-files "Expected//mab.out" "Actual//mab.out" example) ; dilemma1.clp test (clear) (load "compline.clp") (load "dilemma1.clp") (reset) (progn (dribble-on "Actual//dilemma1.out") (run) (dribble-off)) (printout example "dilemma1.clp differences are as follows:" crlf) (compare-files "Expected//dilemma1.out" "Actual//dilemma1.out" example) ; dilemma2.clp test (clear) (load "compline.clp") (load "dilemma2.clp") (reset) (watch deffunctions) (progn (dribble-on "Actual//dilemma2.out") (run) (dribble-off)) (unwatch deffunctions) (printout example "dilemma2.clp differences are as follows:" crlf) (compare-files "Expected//dilemma2.out" "Actual//dilemma2.out" example) ; wordgame.clp test (clear) (load "compline.clp") (load "wordgame.clp") (reset) (progn (dribble-on "Actual//wordgame.out") (run) (dribble-off)) (printout example "wordgame.clp differences are as follows:" crlf) (compare-files "Expected//wordgame.out" "Actual//wordgame.out" example) ; zebra.clp test (clear) (load "compline.clp") (load "zebra.clp") (reset) (progn (dribble-on "Actual//zebra.out") (run) (dribble-off)) (printout example "zebra.clp differences are as follows:" crlf) (compare-files "Expected//zebra.out" "Actual//zebra.out" example) ; electronic.clp test (clear) (set-strategy mea) (load "compline.clp") (load "electrnc.clp") (load "circuit3.clp") (reset) (progn (dribble-on "Actual//electrnc.out") (run) (dribble-off)) (printout example "electronic.clp differences are as follows:" crlf) (compare-files "Expected//electrnc.out" "Actual//electrnc.out" example) ; object monkeys & bananas test (set-strategy depth) (watch rules) (clear) (setgen 1) (load "compline.clp") (load "mabobj.clp") (bsave "Temp//mabobj.bin") (reset) (progn (dribble-on "Actual//mabobj.out") (run) (dribble-off)) (printout example "mabobj.clp differences are as follows:" crlf) (compare-files "Expected//mabobj.out" "Actual//mabobj.out" example) (clear) (setgen 1) (bload "Temp//mabobj.bin") (reset) (progn (dribble-on "Actual//mabobjbin.out") (run) (dribble-off)) (printout example "mabobjbin.clp differences are as follows:" crlf) (compare-files "Expected//mabobjbin.out" "Actual//mabobjbin.out" example) ; object farmer's dilemma example (clear) (setgen 1) (load "compline.clp") (load "objfarm.clp") (bsave "Temp//objfarm.bin") (reset) (progn (dribble-on "Actual//objfarm.out") (run) (dribble-off)) (printout example "objfarm.clp differences are as follows:" crlf) (compare-files "Expected//objfarm.out" "Actual//objfarm.out" example) (clear) (setgen 1) (bload "Temp//objfarm.bin") (reset) (progn (dribble-on "Actual//objfarmbin.out") (run) (dribble-off)) (printout example "objfarmbin.clp differences are as follows:" crlf) (compare-files "Expected//objfarmbin.out" "Actual//objfarmbin.out" example) ; object wordgame example (clear) (setgen 1) (load "compline.clp") (load "wrdgmobj.clp") (bsave "Temp//wrdgmobj.bin") (reset) (progn (dribble-on "Actual//wrdgmobj.out") (run) (dribble-off)) (printout example "wrdgmobj.clp differences are as follows:" crlf) (compare-files "Expected//wrdgmobj.out" "Actual//wrdgmobj.out" example) (clear) (setgen 1) (bload "Temp//wrdgmobj.bin") (reset) (progn (dribble-on "Actual//wrdgmobjbin.out") (run) (dribble-off)) (printout example "wrdgmobjbin.clp differences are as follows:" crlf) (compare-files "Expected//wrdgmobjbin.out" "Actual//wrdgmobjbin.out" example) ; manners example (clear) (setgen 1) (load "compline.clp") (load manners.clp) (reset) (load-facts manners8.fct) (progn (dribble-on "Actual//manners.out") (run) (dribble-off)) (printout example "manners.clp differences are as follows:" crlf) (compare-files "Expected//manners.out" "Actual//manners.out" example) ; waltz example (clear) (setgen 1) (load "compline.clp") (load waltz.clp) (reset) (load-facts waltz12.fct) (progn (dribble-on "Actual//waltz.out") (run) (dribble-off)) (printout example "waltz.clp differences are as follows:" crlf) (compare-files "Expected//waltz.out" "Actual//waltz.out" example) ; sudoku.clp test (clear) (load "compline.clp") (load "sudoku.clp") (load "solve.clp") (load "output-frills.clp") (load "grid3x3-p17.clp") (unwatch rules) (reset) (progn (dribble-on "Actual//sudoku.out") (run) (dribble-off)) (printout example "sudoku.clp differences are as follows:" crlf) (compare-files "Expected//sudoku.out" "Actual//sudoku.out" example) ; close result file (unwatch all) (set-strategy depth) (close example)