Debugging

It has been proven that the most valuable debugging CLIPS tool is the printout of the current state of the solution (parameters and constraints) in addition to the stepping feature of the CLIPS. The easiest way to print the state of the all parameters is
(deffunction dp ()
(progn$ (?item (find-all-instances ((?q parameter)) TRUE))
(printout t (send ?item get-param-name) " " (send ?item get-param-value) crlf)
)
)
This function displays the name and the value of all parameters. The modification of this function to obtain values of other slots is straightforward. The function for the print of constraint is very similar.