(in-package racer)

;;;
;;;--------------------------------------
;;;  Automatically Generated nRQL Stubs  
;;;          Version: 1.8.5A  
;;;--------------------------------------
;;;


(DEFUN STORE-SUBSTRATE-FOR-CURRENT-ABOX (FILENAME)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'STORE-SUBSTRATE-FOR-CURRENT-ABOX
            (MAPCAR #'TRANSFORM-S-EXPR (LIST FILENAME))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN RESTORE-ALL-SUBSTRATES (FILENAME)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RESTORE-ALL-SUBSTRATES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST FILENAME))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN RESTORE-SUBSTRATE (FILENAME)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RESTORE-SUBSTRATE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST FILENAME))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN STORE-ALL-SUBSTRATES (FILENAME)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'STORE-ALL-SUBSTRATES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST FILENAME))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN STORE-SUBSTRATE-FOR-ABOX
       (FILENAME &OPTIONAL FOR-ABOX TYPE-OF-SUBSTRATE)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'STORE-SUBSTRATE-FOR-ABOX
            (MAPCAR #'TRANSFORM-S-EXPR
                    (LIST FILENAME FOR-ABOX TYPE-OF-SUBSTRATE))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-NRQL-VERSION ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'GET-NRQL-VERSION))))


(DEFUN DEL-RCC-EDGE1 (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DEL-RCC-EDGE1
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN DEL-RCC-NODE1 (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DEL-RCC-NODE1
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RCC-EDGE-LABEL1 (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RCC-EDGE-LABEL1
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RCC-NODE-LABEL1 (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RCC-NODE-LABEL1
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RCC-EDGE1 (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RCC-EDGE1
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RCC-NODE1 (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RCC-NODE1
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RCC-RELATED1 (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RCC-RELATED1
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RCC-INSTANCE1 (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RCC-INSTANCE1
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RCC-CONSISTENT-P (&OPTIONAL ABOX TYPE-OF-SUBSTRATE)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RCC-CONSISTENT-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST ABOX TYPE-OF-SUBSTRATE))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN CREATE-RCC-EDGE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'CREATE-RCC-EDGE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN CREATE-RCC-NODE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'CREATE-RCC-NODE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN SET-RCC-BOX (NAME &OPTIONAL RCC-TYPE)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'SET-RCC-BOX
            (MAPCAR #'TRANSFORM-S-EXPR (LIST NAME RCC-TYPE))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN SET-MIRROR-DATA-BOX (NAME)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'SET-MIRROR-DATA-BOX
            (MAPCAR #'TRANSFORM-S-EXPR (LIST NAME))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DESCRIPTION-IMPLIES-P (A B)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DESCRIPTION-IMPLIES-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST A B))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN SET-DATA-BOX (NAME)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'SET-DATA-BOX
            (MAPCAR #'TRANSFORM-S-EXPR (LIST NAME))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-DATA-EDGE-LABEL (FROM TO &KEY ABOX TYPE-OF-SUBSTRATE)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-DATA-EDGE-LABEL
            (MAPCAR #'TRANSFORM-S-EXPR
                    (LIST FROM
                          TO
                          :ABOX
                          ABOX
                          :TYPE-OF-SUBSTRATE
                          TYPE-OF-SUBSTRATE))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-DATA-NODE-LABEL (NAME &KEY ABOX TYPE-OF-SUBSTRATE)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-DATA-NODE-LABEL
            (MAPCAR #'TRANSFORM-S-EXPR
                    (LIST NAME
                          :ABOX
                          ABOX
                          :TYPE-OF-SUBSTRATE
                          TYPE-OF-SUBSTRATE))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DELETE-DATA-EDGE
       (FROM TO &KEY ABOX TYPE-OF-SUBSTRATE TOLD-INFO-P)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DELETE-DATA-EDGE
            (MAPCAR #'TRANSFORM-S-EXPR
                    (LIST FROM
                          TO
                          :ABOX
                          ABOX
                          :TYPE-OF-SUBSTRATE
                          TYPE-OF-SUBSTRATE
                          :TOLD-INFO-P
                          TOLD-INFO-P))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DELETE-DATA-NODE (NAME &KEY ABOX TYPE-OF-SUBSTRATE TOLD-INFO-P)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DELETE-DATA-NODE
            (MAPCAR #'TRANSFORM-S-EXPR
                    (LIST NAME
                          :ABOX
                          ABOX
                          :TYPE-OF-SUBSTRATE
                          TYPE-OF-SUBSTRATE
                          :TOLD-INFO-P
                          TOLD-INFO-P))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN CREATE-DATA-EDGE
       (FROM TO DESCR &KEY ABOX TYPE-OF-SUBSTRATE RACER-DESCR
        TOLD-INFO-P)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'CREATE-DATA-EDGE
            (MAPCAR #'TRANSFORM-S-EXPR
                    (LIST FROM
                          TO
                          DESCR
                          :ABOX
                          ABOX
                          :TYPE-OF-SUBSTRATE
                          TYPE-OF-SUBSTRATE
                          :RACER-DESCR
                          RACER-DESCR
                          :TOLD-INFO-P
                          TOLD-INFO-P))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN CREATE-DATA-NODE
       (NAME &KEY ABOX TYPE-OF-SUBSTRATE RACER-DESCR DESCR TOLD-INFO-P)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'CREATE-DATA-NODE
            (MAPCAR #'TRANSFORM-S-EXPR
                    (LIST NAME
                          :ABOX
                          ABOX
                          :TYPE-OF-SUBSTRATE
                          TYPE-OF-SUBSTRATE
                          :RACER-DESCR
                          RACER-DESCR
                          :DESCR
                          DESCR
                          :TOLD-INFO-P
                          TOLD-INFO-P))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-PROCESS-POOL-SIZE ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'GET-PROCESS-POOL-SIZE))))


(DEFUN GET-MAXIMUM-SIZE-OF-PROCESS-POOL ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'GET-MAXIMUM-SIZE-OF-PROCESS-POOL))))


(DEFUN GET-INITIAL-SIZE-OF-PROCESS-POOL ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'GET-INITIAL-SIZE-OF-PROCESS-POOL))))


(DEFUN SET-MAXIMUM-SIZE-OF-PROCESS-POOL (N)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'SET-MAXIMUM-SIZE-OF-PROCESS-POOL
            (MAPCAR #'TRANSFORM-S-EXPR (LIST N))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN SET-INITIAL-SIZE-OF-PROCESS-POOL (N)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'SET-INITIAL-SIZE-OF-PROCESS-POOL
            (MAPCAR #'TRANSFORM-S-EXPR (LIST N))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN SET-NRQL-MODE (MODE)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'SET-NRQL-MODE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST MODE))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN SHOW-CURRENT-QBOX (&OPTIONAL DEFINITIONS-P)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'SHOW-CURRENT-QBOX
            (MAPCAR #'TRANSFORM-S-EXPR (LIST DEFINITIONS-P))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-ABOX-OF-CURRENT-QBOX ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'GET-ABOX-OF-CURRENT-QBOX))))


(DEFUN DISABLE-QUERY-REALIZATION ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'DISABLE-QUERY-REALIZATION))))


(DEFUN ENABLE-QUERY-REALIZATION ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ENABLE-QUERY-REALIZATION))))


(DEFUN DISABLE-QUERY-OPTIMIZATION ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'DISABLE-QUERY-OPTIMIZATION))))


(DEFUN ENABLE-QUERY-OPTIMIZATION ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ENABLE-QUERY-OPTIMIZATION))))


(DEFUN DISABLE-QUERY-REPOSITORY ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'DISABLE-QUERY-REPOSITORY))))


(DEFUN ENABLE-QUERY-REPOSITORY ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ENABLE-QUERY-REPOSITORY))))


(DEFUN DONT-REPORT-TAUTOLOGICAL-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'DONT-REPORT-TAUTOLOGICAL-QUERIES))))


(DEFUN REPORT-TAUTOLOGICAL-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'REPORT-TAUTOLOGICAL-QUERIES))))


(DEFUN DONT-REPORT-INCONSISTENT-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'DONT-REPORT-INCONSISTENT-QUERIES))))


(DEFUN REPORT-INCONSISTENT-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'REPORT-INCONSISTENT-QUERIES))))


(DEFUN DESCRIBE-QUERY-PROCESSING-MODE ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'DESCRIBE-QUERY-PROCESSING-MODE))))


(DEFUN DESCRIBE-CURRENT-SUBSTRATE ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'DESCRIBE-CURRENT-SUBSTRATE))))


(DEFUN INCLUDE-PERMUTATIONS ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'INCLUDE-PERMUTATIONS))))


(DEFUN EXCLUDE-PERMUTATIONS ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'EXCLUDE-PERMUTATIONS))))


(DEFUN DONT-ADD-RULE-CONSEQUENCES-AUTOMATICALLY ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'DONT-ADD-RULE-CONSEQUENCES-AUTOMATICALLY))))


(DEFUN ADD-RULE-CONSEQUENCES-AUTOMATICALLY ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'ADD-RULE-CONSEQUENCES-AUTOMATICALLY))))


(DEFUN PROCESS-SET-AT-A-TIME ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'PROCESS-SET-AT-A-TIME))))


(DEFUN PROCESS-TUPLE-AT-A-TIME ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'PROCESS-TUPLE-AT-A-TIME))))


(DEFUN GET-MAX-NO-OF-TUPLES-BOUND ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'GET-MAX-NO-OF-TUPLES-BOUND))))


(DEFUN SET-MAX-NO-OF-TUPLES-BOUND (&OPTIONAL N)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'SET-MAX-NO-OF-TUPLES-BOUND
            (MAPCAR #'TRANSFORM-S-EXPR (LIST N))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DONT-CHECK-ABOX-CONSISTENCY-BEFORE-QUERYING ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'DONT-CHECK-ABOX-CONSISTENCY-BEFORE-QUERYING))))


(DEFUN CHECK-ABOX-CONSISTENCY-BEFORE-QUERYING ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'CHECK-ABOX-CONSISTENCY-BEFORE-QUERYING))))


(DEFUN ENABLE-LAZY-TUPLE-COMPUTATION ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'ENABLE-LAZY-TUPLE-COMPUTATION))))


(DEFUN ENABLE-EAGER-TUPLE-COMPUTATION ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'ENABLE-EAGER-TUPLE-COMPUTATION))))


(DEFUN RESTORE-STANDARD-SETTINGS ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'RESTORE-STANDARD-SETTINGS))))


(DEFUN DONT-ADD-ROLE-ASSERTIONS-FOR-DATATYPE-PROPERTIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A)"
            'DONT-ADD-ROLE-ASSERTIONS-FOR-DATATYPE-PROPERTIES))))


(DEFUN ADD-ROLE-ASSERTIONS-FOR-DATATYPE-PROPERTIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'ADD-ROLE-ASSERTIONS-FOR-DATATYPE-PROPERTIES))))


(DEFUN DISABLE-TOLD-INFORMATION-QUERYING ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'DISABLE-TOLD-INFORMATION-QUERYING))))


(DEFUN ENABLE-TOLD-INFORMATION-QUERYING ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'ENABLE-TOLD-INFORMATION-QUERYING))))


(DEFUN DISABLE-NRQL-WARNINGS ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'DISABLE-NRQL-WARNINGS))))


(DEFUN ENABLE-NRQL-WARNINGS ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ENABLE-NRQL-WARNINGS))))


(DEFUN DISABLE-KB-HAS-CHANGED-WARNING-TOKENS ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'DISABLE-KB-HAS-CHANGED-WARNING-TOKENS))))


(DEFUN ENABLE-KB-HAS-CHANGED-WARNING-TOKENS ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'ENABLE-KB-HAS-CHANGED-WARNING-TOKENS))))


(DEFUN DISABLE-PHASE-TWO-STARTS-WARNING-TOKENS ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'DISABLE-PHASE-TWO-STARTS-WARNING-TOKENS))))


(DEFUN ENABLE-PHASE-TWO-STARTS-WARNING-TOKENS ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'ENABLE-PHASE-TWO-STARTS-WARNING-TOKENS))))


(DEFUN DISABLE-TWO-PHASE-QUERY-PROCESSING-MODE ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'DISABLE-TWO-PHASE-QUERY-PROCESSING-MODE))))


(DEFUN ENABLE-TWO-PHASE-QUERY-PROCESSING-MODE ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'ENABLE-TWO-PHASE-QUERY-PROCESSING-MODE))))


(DEFUN DISABLE-ABOX-MIRRORING ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'DISABLE-ABOX-MIRRORING))))


(DEFUN ENABLE-VERY-SMART-ABOX-MIRRORING ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'ENABLE-VERY-SMART-ABOX-MIRRORING))))


(DEFUN ENABLE-SMART-ABOX-MIRRORING ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ENABLE-SMART-ABOX-MIRRORING))))


(DEFUN ENABLE-ABOX-MIRRORING ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ENABLE-ABOX-MIRRORING))))


(DEFUN DISABLE-SQL-DATA-SUBSTRATE-MIRRORING ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'DISABLE-SQL-DATA-SUBSTRATE-MIRRORING))))


(DEFUN ENABLE-SQL-DATA-SUBSTRATE-MIRRORING ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'ENABLE-SQL-DATA-SUBSTRATE-MIRRORING))))


(DEFUN DISABLE-DATA-SUBSTRATE-MIRRORING ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'DISABLE-DATA-SUBSTRATE-MIRRORING))))


(DEFUN ENABLE-DATA-SUBSTRATE-MIRRORING ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'ENABLE-DATA-SUBSTRATE-MIRRORING))))


(DEFUN WAIT-FOR-RULES-TO-TERMINATE ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'WAIT-FOR-RULES-TO-TERMINATE))))


(DEFUN WAIT-FOR-QUERIES-TO-TERMINATE ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL "(~A)" 'WAIT-FOR-QUERIES-TO-TERMINATE))))


(DEFUN DESCRIBE-ALL-RULES (&OPTIONAL REWRITTEN-P)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DESCRIBE-ALL-RULES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST REWRITTEN-P))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DESCRIBE-ALL-QUERIES (&OPTIONAL REWRITTEN-P)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DESCRIBE-ALL-QUERIES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST REWRITTEN-P))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-ALL-ANSWERS ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'GET-ALL-ANSWERS))))


(DEFUN GET-ANSWER-SIZE (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-ANSWER-SIZE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN RUN-ALL-RULES (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RUN-ALL-RULES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN REEXECUTE-ALL-RULES (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'REEXECUTE-ALL-RULES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN EXECUTE-ALL-RULES (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'EXECUTE-ALL-RULES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RUN-ALL-QUERIES (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RUN-ALL-QUERIES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN REEXECUTE-ALL-QUERIES (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'REEXECUTE-ALL-QUERIES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN EXECUTE-ALL-QUERIES (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'EXECUTE-ALL-QUERIES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN ABORT-ALL-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ABORT-ALL-RULES))))


(DEFUN ABORT-ALL-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ABORT-ALL-QUERIES))))


(DEFUN TERMINATED-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'TERMINATED-RULES))))


(DEFUN INACTIVE-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'INACTIVE-RULES))))


(DEFUN PROCESSED-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'PROCESSED-RULES))))


(DEFUN TERMINATED-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'TERMINATED-QUERIES))))


(DEFUN INACTIVE-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'INACTIVE-QUERIES))))


(DEFUN PROCESSED-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'PROCESSED-QUERIES))))


(DEFUN WAITING-EXPENSIVE-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'WAITING-EXPENSIVE-RULES))))


(DEFUN WAITING-CHEAP-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'WAITING-CHEAP-RULES))))


(DEFUN WAITING-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'WAITING-RULES))))


(DEFUN WAITING-EXPENSIVE-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'WAITING-EXPENSIVE-QUERIES))))


(DEFUN WAITING-CHEAP-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'WAITING-CHEAP-QUERIES))))


(DEFUN WAITING-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'WAITING-QUERIES))))


(DEFUN RUNNING-EXPENSIVE-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'RUNNING-EXPENSIVE-RULES))))


(DEFUN RUNNING-CHEAP-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'RUNNING-CHEAP-RULES))))


(DEFUN RUNNING-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'RUNNING-RULES))))


(DEFUN RUNNING-EXPENSIVE-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'RUNNING-EXPENSIVE-QUERIES))))


(DEFUN RUNNING-CHEAP-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'RUNNING-CHEAP-QUERIES))))


(DEFUN RUNNING-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'RUNNING-QUERIES))))


(DEFUN ACTIVE-EXPENSIVE-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ACTIVE-EXPENSIVE-RULES))))


(DEFUN ACTIVE-CHEAP-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ACTIVE-CHEAP-RULES))))


(DEFUN ACTIVE-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ACTIVE-RULES))))


(DEFUN ACTIVE-EXPENSIVE-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ACTIVE-EXPENSIVE-QUERIES))))


(DEFUN ACTIVE-CHEAP-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ACTIVE-CHEAP-QUERIES))))


(DEFUN ACTIVE-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ACTIVE-QUERIES))))


(DEFUN PREPARED-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'PREPARED-RULES))))


(DEFUN READY-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'READY-RULES))))


(DEFUN PREPARED-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'PREPARED-QUERIES))))


(DEFUN READY-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'READY-QUERIES))))


(DEFUN EXPENSIVE-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'EXPENSIVE-RULES))))


(DEFUN CHEAP-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'CHEAP-RULES))))


(DEFUN INACCURATE-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'INACCURATE-RULES))))


(DEFUN ACCURATE-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ACCURATE-RULES))))


(DEFUN ALL-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ALL-RULES))))


(DEFUN EXPENSIVE-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'EXPENSIVE-QUERIES))))


(DEFUN CHEAP-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'CHEAP-QUERIES))))


(DEFUN INACCURATE-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'INACCURATE-QUERIES))))


(DEFUN ACCURATE-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ACCURATE-QUERIES))))


(DEFUN ALL-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'ALL-QUERIES))))


(DEFUN DESCRIBE-ALL-DEFINITIONS (&KEY TBOX)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DESCRIBE-ALL-DEFINITIONS
            (MAPCAR #'TRANSFORM-S-EXPR (LIST :TBOX TBOX))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DESCRIBE-DEFINITION (NAME &KEY TBOX)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DESCRIBE-DEFINITION
            (MAPCAR #'TRANSFORM-S-EXPR (LIST NAME :TBOX TBOX))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DELETE-ALL-DEFINITIONS (&KEY TBOX)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DELETE-ALL-DEFINITIONS
            (MAPCAR #'TRANSFORM-S-EXPR (LIST :TBOX TBOX))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN UNDEFINE-QUERY (NAME &KEY TBOX)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'UNDEFINE-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST NAME :TBOX TBOX))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DEFINE-AND-PREPARE-QUERY (NAME HEAD BODY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DEFINE-AND-PREPARE-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST NAME HEAD BODY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN DEFINE-AND-EXECUTE-QUERY (NAME HEAD BODY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DEFINE-AND-EXECUTE-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST NAME HEAD BODY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN DEFINE-QUERY
       (NAME HEAD BODY &REST ARGS &KEY KEEP-P TBOX &ALLOW-OTHER-KEYS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DEFINE-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR
                    (LIST NAME HEAD BODY :KEEP-P KEEP-P :TBOX TBOX))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RACER-PREPARE-TBOX-QUERY (RES-ARGS QUERY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RACER-PREPARE-TBOX-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST RES-ARGS QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RACER-ANSWER-TBOX-QUERY (RES-ARGS QUERY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RACER-ANSWER-TBOX-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST RES-ARGS QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RACER-PREPARE-RULE (QUERY RES-ARGS &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RACER-PREPARE-RULE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY RES-ARGS))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RACER-APPLY-RULE (QUERY RES-ARGS &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RACER-APPLY-RULE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY RES-ARGS))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN PREPARE-NRQL-ENGINE (ABOX &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'PREPARE-NRQL-ENGINE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST ABOX))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RACER-PREPARE-QUERY (RES-ARGS QUERY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RACER-PREPARE-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST RES-ARGS QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RACER-ANSWER-QUERY-UNDER-PREMISE
       (PREMISE RES-ARGS QUERY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RACER-ANSWER-QUERY-UNDER-PREMISE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST PREMISE RES-ARGS QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RACER-ANSWER-QUERY (RES-ARGS QUERY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RACER-ANSWER-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST RES-ARGS QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN FULL-RESET ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'FULL-RESET))))


(DEFUN RESET-NRQL-ENGINE (&KEY FULL-RESET-P)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RESET-NRQL-ENGINE
            (MAPCAR #'TRANSFORM-S-EXPR
                    (LIST :FULL-RESET-P FULL-RESET-P))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN RESET-ALL-SUBSTRATES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'RESET-ALL-SUBSTRATES))))


(DEFUN DELETE-ALL-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'DELETE-ALL-RULES))))


(DEFUN DELETE-ALL-QUERIES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'DELETE-ALL-QUERIES))))


(DEFUN SET-TUPLE-BOUND (&OPTIONAL HOW-MANY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'SET-TUPLE-BOUND
            (MAPCAR #'TRANSFORM-S-EXPR (LIST HOW-MANY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DESCRIBE-RULE (QUERY &OPTIONAL REWRITTEN-P)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DESCRIBE-RULE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY REWRITTEN-P))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DESCRIBE-QUERY (QUERY &OPTIONAL REWRITTEN-P)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DESCRIBE-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY REWRITTEN-P))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-DAG-OF-QBOX-FOR-ABOX (SUBSTRATE &OPTIONAL TYPE-OF-SUBSTRATE)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-DAG-OF-QBOX-FOR-ABOX
            (MAPCAR #'TRANSFORM-S-EXPR
                    (LIST SUBSTRATE TYPE-OF-SUBSTRATE))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN SHOW-QBOX-FOR-ABOX
       (ABOX &OPTIONAL DEFINITIONS-P TYPE-OF-SUBSTRATE)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'SHOW-QBOX-FOR-ABOX
            (MAPCAR #'TRANSFORM-S-EXPR
                    (LIST ABOX DEFINITIONS-P TYPE-OF-SUBSTRATE))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-NODES-IN-QBOX-FOR-ABOX (ABOX &OPTIONAL TYPE-OF-SUBSTRATE)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-NODES-IN-QBOX-FOR-ABOX
            (MAPCAR #'TRANSFORM-S-EXPR (LIST ABOX TYPE-OF-SUBSTRATE))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-NODES-IN-CURRENT-QBOX ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'GET-NODES-IN-CURRENT-QBOX))))


(DEFUN GET-DAG-OF-CURRENT-QBOX ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'GET-DAG-OF-CURRENT-QBOX))))


(DEFUN QUERY-EQUIVALENTS (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-EQUIVALENTS
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-DESCENDANTS (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-DESCENDANTS
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-CHILDREN (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-CHILDREN
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-ANCESTORS (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-ANCESTORS
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-PARENTS (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-PARENTS
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-EQUIVALENT-P (A B &REST ARGS &KEY &ALLOW-OTHER-KEYS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-EQUIVALENT-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST A B))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN QUERY-ENTAILS-P (A B &REST ARGS &KEY &ALLOW-OTHER-KEYS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-ENTAILS-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST A B))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN CLASSIFY-QUERY (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'CLASSIFY-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-TAUTOLOGICAL-P (QUERY &KEY &ALLOW-OTHER-KEYS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-TAUTOLOGICAL-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-INCONSISTENT-P (QUERY &KEY &ALLOW-OTHER-KEYS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-INCONSISTENT-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-CONSISTENT-P (QUERY &KEY &ALLOW-OTHER-KEYS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-CONSISTENT-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN ABORT-RULE (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'ABORT-RULE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN ABORT-QUERY (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'ABORT-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN ORIGINAL-RULE-BODY (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'ORIGINAL-RULE-BODY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN ORIGINAL-QUERY-BODY (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'ORIGINAL-QUERY-BODY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN RULE-BODY (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RULE-BODY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-BODY (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-BODY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN ORIGINAL-RULE-HEAD (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'ORIGINAL-RULE-HEAD
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN ORIGINAL-QUERY-HEAD (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'ORIGINAL-QUERY-HEAD
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN RULE-HEAD (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RULE-HEAD
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-HEAD (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-HEAD
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN RULE-ACCURATE-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RULE-ACCURATE-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-ACCURATE-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-ACCURATE-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-ANSWER (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-ANSWER
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-ALL-REMAINING-SETS-OF-RULE-CONSEQUENCES (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-ALL-REMAINING-SETS-OF-RULE-CONSEQUENCES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-ALL-REMAINING-TUPLES (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-ALL-REMAINING-TUPLES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-NEXT-N-REMAINING-SETS-OF-RULE-CONSEQUENCES
       (QUERY &OPTIONAL N)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-NEXT-N-REMAINING-SETS-OF-RULE-CONSEQUENCES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY N))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-NEXT-N-REMAINING-TUPLES (QUERY &OPTIONAL N)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-NEXT-N-REMAINING-TUPLES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY N))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DESCRIBE-RULE-STATUS (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DESCRIBE-RULE-STATUS
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DESCRIBE-QUERY-STATUS (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DESCRIBE-QUERY-STATUS
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN RULE-INACTIVE-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RULE-INACTIVE-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN RULE-PROCESSED-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RULE-PROCESSED-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-INACTIVE-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-INACTIVE-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-PROCESSED-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-PROCESSED-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN ACTIVE-EXPENSIVE-RULE-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'ACTIVE-EXPENSIVE-RULE-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN ACTIVE-EXPENSIVE-QUERY-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'ACTIVE-EXPENSIVE-QUERY-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN CHEAP-RULE-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'CHEAP-RULE-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN CHEAP-QUERY-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'CHEAP-QUERY-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN RULE-ACTIVE-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RULE-ACTIVE-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-ACTIVE-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-ACTIVE-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN RULE-WAITING-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RULE-WAITING-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-WAITING-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-WAITING-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN EXECUTE-APPLICABLE-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'EXECUTE-APPLICABLE-RULES))))


(DEFUN UNAPPLICABLE-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'UNAPPLICABLE-RULES))))


(DEFUN APPLICABLE-RULES ()
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST (FORMAT NIL "(~A)" 'APPLICABLE-RULES))))


(DEFUN ADD-CHOSEN-SETS-OF-RULE-CONSEQUENCES (QUERY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'ADD-CHOSEN-SETS-OF-RULE-CONSEQUENCES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN CHOOSE-CURRENT-SET-OF-RULE-CONSEQUENCES (QUERY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'CHOOSE-CURRENT-SET-OF-RULE-CONSEQUENCES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RULE-APPLICABLE-P (QUERY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RULE-APPLICABLE-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RULE-PREPARED-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RULE-PREPARED-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-PREPARED-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-PREPARED-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN REEXECUTE-RULE (QUERY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'REEXECUTE-RULE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN REEXECUTE-QUERY (QUERY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'REEXECUTE-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN REPREPARE-RULE (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'REPREPARE-RULE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN REPREPARE-QUERY (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'REPREPARE-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN EXECUTE-RULE (QUERY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'EXECUTE-RULE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN EXECUTE-QUERY (QUERY &REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'EXECUTE-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFUN RULE-READY-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'RULE-READY-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN QUERY-READY-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'QUERY-READY-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN NEXT-SET-OF-RULE-CONSEQUENCES-AVAILABLE-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'NEXT-SET-OF-RULE-CONSEQUENCES-AVAILABLE-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN NEXT-TUPLE-AVAILABLE-P (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'NEXT-TUPLE-AVAILABLE-P
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-CURRENT-SET-OF-RULE-CONSEQUENCES (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-CURRENT-SET-OF-RULE-CONSEQUENCES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-NEXT-SET-OF-RULE-CONSEQUENCES (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-NEXT-SET-OF-RULE-CONSEQUENCES
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-CURRENT-TUPLE (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-CURRENT-TUPLE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN GET-NEXT-TUPLE (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'GET-NEXT-TUPLE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DELETE-RULE (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DELETE-RULE
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFUN DELETE-QUERY (QUERY)
  (WITH-STANDARD-IO-SYNTAX-1
   (SERVICE-REQUEST
    (FORMAT NIL
            "(~A~{ ~S~}~{ ~S~})"
            'DELETE-QUERY
            (MAPCAR #'TRANSFORM-S-EXPR (LIST QUERY))
            (MAPCAR #'TRANSFORM-S-EXPR NIL)))))


(DEFMACRO DEL-RCC-EDGE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'DEL-RCC-EDGE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO DEL-RCC-NODE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'DEL-RCC-NODE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO RCC-EDGE-LABEL (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'RCC-EDGE-LABEL
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO RCC-NODE-LABEL (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'RCC-NODE-LABEL
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO RCC-EDGE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'RCC-EDGE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO RCC-NODE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'RCC-NODE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO RCC-RELATED (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'RCC-RELATED
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO RCC-INSTANCE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'RCC-INSTANCE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO RCC-CONSISTENT? (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'RCC-CONSISTENT?
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO IN-RCC-BOX (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'IN-RCC-BOX
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO IN-MIRROR-DATA-BOX (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'IN-MIRROR-DATA-BOX
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO DESCRIPTION-IMPLIES? (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'DESCRIPTION-IMPLIES?
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO EDGE-LABEL (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'EDGE-LABEL
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO NODE-LABEL (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'NODE-LABEL
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO DEL-DATA-EDGE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'DEL-DATA-EDGE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO DEL-DATA-NODE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'DEL-DATA-NODE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO DATA-EDGE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'DATA-EDGE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO DATA-NODE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'DATA-NODE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO IN-DATA-BOX (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'IN-DATA-BOX
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO UNDEFQUERY (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'UNDEFQUERY
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO DEF-AND-EXEC-QUERY (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'DEF-AND-EXEC-QUERY
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO DEF-AND-PREP-QUERY (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'DEF-AND-PREP-QUERY
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO DEFQUERY (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'DEFQUERY
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO PREPRULE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'PREPRULE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO FIRERULE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'FIRERULE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO PREPARE-ABOX-RULE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'PREPARE-ABOX-RULE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO PREPARE-TBOX-QUERY (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'PREPARE-TBOX-QUERY
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO PREPARE-ABOX-QUERY (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'PREPARE-ABOX-QUERY
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO APPLY-ABOX-RULE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'APPLY-ABOX-RULE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO TBOX-RETRIEVE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'TBOX-RETRIEVE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO RETRIEVE-UNDER-PREMISE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'RETRIEVE-UNDER-PREMISE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO RETRIEVE (&REST ARGS)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A~{ ~S~})"
              'RETRIEVE
              (MAPCAR #'TRANSFORM-S-EXPR ARGS)))))


(DEFMACRO WITH-NRQL-SETTINGS ((&REST ARGS) &BODY BODY)
  (WITH-STANDARD-IO-SYNTAX-1
   `(SERVICE-REQUEST
     ,(FORMAT NIL
              "(~A (~{ ~S~})~{ ~S~})"
              'WITH-NRQL-SETTINGS
              (TRANSFORM-S-EXPR ARGS)
              (TRANSFORM-S-EXPR BODY)))))

