This meta-rule displays the conflict set in a menu to the user and asks for one to be selected by hand on each cycle. Note that we have to check both that there were some instantiations available, and that the user selected one (rather than clicking on the Abort button).
(defrule manual-context :backward
; are there any instantiations?
; did the user pick one?
where the function
could be defined as
(defun select-instantiation (conflict-set)
:title "Select an Instantiation:"
:name-function #'(lambda (inst)
(format nil "~S: ~S"
Now a context could be defined by
(defcontext a-context :strategy ()
KnowledgeWorks and Prolog User Guide (Windows version) - 6 Dec 2011