Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reverse operators in get-operators-by-effect.

Work-around for Bug #1954.
  • Loading branch information...
commit 4cbfbaaa793f2af8450765f62a1e6daf20b8283d 1 parent 55a1d0e
@bvds authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 Knowledge/Operators.cl
View
12 Knowledge/Operators.cl
@@ -343,17 +343,21 @@
(gethash Opname *Operators-By-Name*))
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; get-operators-by-effect (public)
;; get the specified operators that have effects of the specified predicate type.
;;
;; Arguments: Predicate: The predicate e.g. 'Variable' that we are seaching for.
-;; Returns: A list of operators who have at least one effect of the specified type
-;; ornil if noe exist.
+;; Returns: A list of operators who have at least one effect of the
+;; specified type or nil if none exist.
(defun get-operators-by-effect (Predicate)
"Obtain a list of operators that have an effect of the specified predicate type or nil if none exist."
- (gethash Predicate *Operators-By-Effect*))
+ ;; In principle, the order of the operators on
+ ;; this list should not matter. However,
+ ;; problems LMOM6 KT11B ELEC7 DR20 fail to solve
+ ;; if order is reversed. Bug #1954
+ (reverse (gethash Predicate *Operators-By-Effect*)))
;; Following utility mainly for kb debugging. takes either atom or form
(defun list-ops (Predicate-or-Form)
Please sign in to comment.
Something went wrong with that request. Please try again.