;;
;;
;;      Title : Routines for accessing kkrule data types
;;
;;      Function :  Set of general functions for accessing kk spelling
;;                  data type
;;
;;      Author :  Alan W. Black   August 1985
;;                Dept. of A.I.  University of Edinburgh 
;;
;;      Copyright Graeme Ritchie, Alan Black,
;;                Steve Pulman and Graham Russell  1987
;;
;;         ---------------------------------------------
;;         |    Not to be used for military purposes   |
;;         ---------------------------------------------
;;
;;      Description :
;;      Description :
;;
;;      Parameters :
;;      Returns :
;;      Side Effect :
;;
;;      External references :
;;
;;      System functions used :
;;        Name     type      Args #  type                 Comment
;;
;;      Restrictions :
;;
;;

(defmacro D-GetRulePair (rule)
;;
;;  returns the rule pair in the rule structure
;;
   `(cadr ,rule)
)

(defmacro D-GetRuleContexts (rule)
;;
;;  returns the list of rule contexts
;;
   `(car (cdddr ,rule))
)

(defmacro D-GetOperatorType (rule)
;;
;;  returns the operator type 
;;
   `(caddr ,rule)
)

(defmacro D-GetWhereClause (rule)
;;
;;   Return the where clause, will be nil if there is no where clause
;;
   `(car (cdddr (cdr ,rule)))
)

(defmacro D-GetWhereList (rule)
;;
;;  returns the list of values for the where  list
;;
   `(cadr (car (cdddr (cdr ,rule))))
)

(defmacro D-GetWhereSymbol (rule)
;;
;;  gets the variable from the where clause
;;
   `(car (car (cdddr (cdr ,rule))))
)

(defmacro D-GetRuleName (rule)
;;
;;  gets the name of the rule
;;
   `(car ,rule)
)
