(defun conflict-resolution (conflict-resolution-function instantiations) "apply a conflict resolution strategy function to the set of instantiations generated by get-all-instantiationst and the LHS functions it calls" (funcall conflict-resolution-function instantiations)) ; a candidate for depth first (defun CR-first (instantiation-list) (first instantiation-list)) (defun get-time-tags (instantiation) "returns list of time tags for an instantiation" (let ((binding-list (rest instantiation))) (remove-if #'null (mapcar (lambda (b) (if (not (instance-binding-p (binding-val b))) nil (TT-val (binding-val b)))) binding-list)))) (defun insert-sorted-tags (conflict-set) "inserts list of time tags into instantiations of conflict set after this function, and instantion will look like the following: (rule-name )" (mapcar (lambda (instantiation) (append (list (first instantiation)) (list (sort (get-time-tags instantiation) #'>)) (rest instantiation))) conflict-set))