id
int64
0
45.1k
file_name
stringlengths
4
68
file_path
stringlengths
14
193
content
stringlengths
32
9.62M
size
int64
32
9.62M
language
stringclasses
1 value
extension
stringclasses
6 values
total_lines
int64
1
136k
avg_line_length
float64
3
903k
max_line_length
int64
3
4.51M
alphanum_fraction
float64
0
1
repo_name
stringclasses
779 values
repo_stars
int64
0
882
repo_forks
int64
0
108
repo_open_issues
int64
0
90
repo_license
stringclasses
8 values
repo_extraction_date
stringclasses
146 values
sha
stringlengths
64
64
__index_level_0__
int64
0
45.1k
exdup_ids_cmlisp_stkv2
sequencelengths
1
47
12,505
graph-visualizer3.lisp
lambdamikel_DLMAPS/src/graph-visualizer/graph-visualizer3.lisp
;;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: GRAPH -*- (in-package graph) ;;; ;;; #| (defmethod (setf bound-by) (val (object graph-item)) (if val (mark object val) (unmark object))) (defmethod bound-by ((object graph-item)) (marked-p object)) |# ;;; ;;; Graph Visualizer ;;; #| (defconstant +text-style+ (make-text-style :sans-serif :bold :normal)) |# (defconstant +text-style+ (make-text-style nil :bold :very-large)) (defconstant +button-text-style+ (make-text-style :sans-serif :roman :very-small)) (defvar *node-kinds* nil) (defvar *edge-kinds* nil) (defvar *graph* nil) (defvar *selected-object* nil) ;;; ;;; ;;; (defconstant +node-body-color+ +blue+) (defconstant +node-contur-color+ +blue+) (defconstant +edge-color+ +black+) (defconstant +node-text-color+ +black+) (defconstant +edge-text-color+ +black+) (defconstant +node-colors+ (make-cyclic (mapcar #'(lambda (rgb) (make-rgb-color (first rgb) (second rgb) (third rgb))) '((0 0 0) (0 0 1) (0 1 0) (1 0 0) (0 1 1) (1 1 0) (1 0 1) (0 0 .6) (0 .6 0) (.6 0 0) (0 .6 .6) (.6 .6 0) (.6 0 .6) (.6 .6 .6) (0 0 .5) (0 .5 0) (.5 0 0) (0 .5 .5) (.5 .5 0) (.5 0 .5) (.5 .5 .5) (0 0 .4) (0 .4 0) (.4 0 0) (0 .4 .4) (.4 .4 0) (.4 0 .4) (.4 .4 .4) (0 0 .3) (0 .3 0) (.3 0 0) (0 .3 .3) (.3 .3 0) (.3 0 .3) (.3 .3 .3) (0 0 .2) (0 .2 0) (.2 0 0) (0 .2 .2) (.2 .2 0) (.2 0 .2) (.2 .2 .2) (0 0 .1) (0 .1 0) (.1 0 0) (0 .1 .1) (.1 .1 0) (.1 0 .1) (.1 .1 .1))))) (defconstant +edge-colors+ +node-colors+) (defmethod color :around ((node node)) (let ((kind (kind node))) (if (and (compute-color-from-kind-p node) kind) (if *node-kinds* (let ((pos (position kind *node-kinds* :test #'equal))) (if pos (nth pos +node-colors+) (progn (pushend kind *node-kinds*) (nth (1- (length *node-kinds*)) +node-colors+)))) (progn (setf *node-kinds* (list kind)) (nth 0 +node-colors+))) (call-next-method)))) (defmethod color :around ((edge edge)) (let ((kind (kind edge))) (if (and (compute-color-from-kind-p edge) kind) (if *edge-kinds* (let ((pos (position kind *edge-kinds* :test #'equal))) (if pos (nth pos +edge-colors+) (progn (pushend kind *edge-kinds*) (nth (1- (length *edge-kinds*)) +edge-colors+)))) (progn (setf *edge-kinds* (list kind)) (nth 0 +edge-colors+))) (call-next-method)))) (defun reset-kinds () (setf *node-kinds* nil *edge-kinds* nil)) ;;; ;;; ;;; (defvar *graph-visualizer* nil) (defmacro with-graph-visualizer ((frame) &rest body) `(let ((,frame *graph-visualizer*)) ,@body)) (define-application-frame graph-visualizer () ((bar :accessor bar :initform nil) (resizer :accessor resizer :initform nil) (process :initform nil :accessor process) (scale :initform 1 :reader scale) (graphs :initform nil :reader graphs :initarg :graphs) (graph :initform nil :reader graph :initarg :graph) (kind-of-graph :initform 'polygon :accessor kind-of-graph) ;;; Darstellungsoptionen (show-nodes-p :initform t :accessor show-nodes-p) (show-edges-p :initform t :accessor show-edges-p) (show-node-info-p :initform t :accessor show-node-info-p) (show-edge-info-p :initform t :accessor edge-info-p) (show-color-nodes-p :initform t :accessor show-color-nodes-p) (show-color-edges-p :initform t :accessor show-color-edges-p) (show-backward-edges-p :initform t :accessor show-backward-edges-p) (show-forward-edges-p :initform t :accessor show-forward-edges-p) (show-loops-p :initform t :accessor show-loops-p)) (:panes (refresh-button (make-pane 'push-button :label "Refresh" :text-style +button-text-style+ :activate-callback #'(lambda (x) (declare (ignore x)) (refresh)))) (new-button (make-pane 'push-button :label "New" :text-style +button-text-style+ :activate-callback #'(lambda (x) (declare (ignore x)) (com-new) (refresh)))) (delete-button (make-pane 'push-button :label "Delete" :text-style +button-text-style+ :activate-callback #'(lambda (x) (declare (ignore x)) (com-delete) (refresh)))) (delete-others-button (make-pane 'push-button :label "Delete Others" :text-style +button-text-style+ :activate-callback #'(lambda (x) (declare (ignore x)) (com-delete-others) (refresh)))) (next-button (make-pane 'push-button :label ">>" :text-style +button-text-style+ :activate-callback #'(lambda (x) (declare (ignore x)) (com-next) (refresh)))) (prev-button (make-pane 'push-button :label "<<" :text-style +button-text-style+ :activate-callback #'(lambda (x) (declare (ignore x)) (com-prev) (refresh)))) (quit-button (make-pane 'push-button :label "Quit" :text-style +button-text-style+ :activate-callback #'(lambda (x) (declare (ignore x)) (com-quit) (refresh)))) (display :application :display-function #'draw-graph-visualizer :incremental-redisplay t :text-cursor nil :borders t :scroll-bars t) (infopane :application :text-style +text-style+ :text-cursor nil :end-of-line-action :allow :scroll-bars :both) (info :application :text-style +text-style+ :display-function #'show-infos :height '(2 :line) :min-height '(2 :line) :max-height '(2 :line) :text-cursor nil :end-of-line-action :allow :text-margin 30 :scroll-bars nil) (options :accept-values :text-style +button-text-style+ :scroll-bars nil :height '(2 :line) :min-height '(2 :line) :max-height '(2 :line) :display-function `(accept-values-pane-displayer :displayer ,#'(lambda (frame stream) (accept-options frame stream)))) (bar (setf *bar* (make-pane 'slider :show-value-p t :text-style +button-text-style+ :value-changed-callback #'(lambda (slider value) (declare (ignore slider)) (with-graph-visualizer (frame) (with-slots (graph graphs) frame (setf graph (nth (round (* (/ value 100) (1- (length graphs)))) graphs)) (refresh)))) :min-value 0 :max-value 100 :client 'bar :id 'bar))) (resizer (setf *resizer* (make-pane 'slider :show-value-p t :text-style +button-text-style+ :value-changed-callback #'(lambda (slider value) (declare (ignore slider)) (with-graph-visualizer (frame) (with-slots (scale) frame (setf scale value) (refresh)))) :min-value 1 :max-value 10 :number-of-tick-marks 10 :number-of-quanta 20 :client 'resizer :id 'resizer)))) (:layouts (:default #+(and :lispworks :win32) (vertically () (2/3 (vertically () options info display (horizontally () (1/4 new-button) (1/4 delete-button) (1/4 delete-others-button) (1/4 quit-button) +fill+) (horizontally () (1/3 prev-button) (1/3 refresh-button) (1/3 next-button) +fill+) (horizontally () (1/2 bar) (1/2 resizer) +fill+))) (1/3 infopane)) #-(and :lispworks :win32) (vertically () (2/3 (vertically () options info display (horizontally () (1/4 new-button) (1/4 delete-button) (1/4 delete-others-button) (1/4 quit-button)) (horizontally () (1/9 prev-button) (1/9 next-button) (1/9 refresh-button) (3/9 bar) (3/9 resizer)))) (1/3 infopane))))) ;;; ;;; Drawing Functions ;;; (defmethod show-infos ((frame graph-visualizer) stream) (with-slots (graph graphs) frame (when (and graph graphs) (format stream "Number of Objects: ~A. Current Object: ~A. Info: ~A~%" (length graphs) (position graph graphs) (info (graph frame)))))) (defun get-node-size () (with-graph-visualizer (frame) (with-slots (graph) frame (let* ((size (no-of-nodes graph)) (node-radius (/ 15 (max 1 size)))) node-radius)))) (defmethod draw-graph-visualizer ((frame graph-visualizer) stream &optional window-stream) (when (graph frame) (with-slots (graph scale kind-of-graph show-nodes-p show-edges-p show-node-info-p show-edge-info-p show-color-nodes-p show-color-edges-p show-backward-edges-p show-forward-edges-p show-loops-p) frame (multiple-value-bind (x y) (bounding-rectangle-size (if window-stream (bounding-rectangle (window-viewport window-stream)) (bounding-rectangle (window-viewport stream)))) (let* ((s (* 1.5 (* x (/ (get-node-size) 100)))) (x (- x (* 2 s))) (y (- y (* 2 s)))) (with-translation (stream s s) (with-translation (stream (if (eq kind-of-graph 'chain) 0 0) (if (eq kind-of-graph 'chain) (cond((and show-backward-edges-p show-forward-edges-p) (/ y 2)) (show-forward-edges-p y) (show-backward-edges-p 0) (t y)) y)) (with-scaling (stream scale scale) (with-scaling (stream (/ x 100) (if (and show-backward-edges-p show-forward-edges-p (eq kind-of-graph 'chain)) (/ y 200) (/ y 100))) (setf *graph* graph) (with-text-size (stream (if window-stream :very-large :small)) (draw-graph graph stream kind-of-graph :print-p window-stream :show-nodes-p show-nodes-p :show-edges-p show-edges-p :show-node-info-p show-node-info-p :show-edge-info-p show-edge-info-p :show-color-nodes-p show-color-nodes-p :show-color-edges-p show-color-edges-p :show-backward-edges-p show-backward-edges-p :show-forward-edges-p show-forward-edges-p :show-loops-p show-loops-p))))))))))) ;;; ;;; External Interface ;;; (defmethod (setf graph) (value (frame graph-visualizer)) (with-slots (graphs graph bar) frame (setf graph value) (if (and graphs graph) (let ((l (length graphs))) (setf (gadget-value bar) (* 100 (/ (position graph graphs) (max 1 (1- l))))) (when bar (activate-gadget bar))) (when bar (deactivate-gadget bar))))) (defmethod (setf graphs) (value (frame graph-visualizer)) (with-slots (bar graphs graph) frame (cond ((null value) (setf graphs nil) (setf graph nil) (when bar (deactivate-gadget bar))) ((or (not (consp value)) (not (every #'(lambda (x) (typep x 'graph)) value))) (error "Bad objects in list!")) (t (setf graphs value) (setf graph (first value)) (when bar (activate-gadget bar)))))) (defun set-objects (objects) (with-graph-visualizer (frame) (setf (graphs frame) objects))) (defun prepend-objects (objects) (with-graph-visualizer (frame) (setf (graphs frame) (append (graphs frame) objects)))) (defun append-objects (objects) (with-graph-visualizer (frame) (setf (graphs frame) (append objects (graphs frame))))) ;;; ;;; Commands: Navigation ;;; (define-graph-visualizer-command (com-delete :name "Delete" ) () (with-graph-visualizer (frame) (with-slots (graph graphs) frame (when (and graph graphs) (let ((ograph1 graph)) (com-next) (if (cdr graphs) (setf (graphs frame) (delete ograph1 graphs)) (com-new))))))) (define-graph-visualizer-command (com-next :name "Next" ) () (with-graph-visualizer (frame) (with-slots (graphs graph) frame (let ((rest (member graph graphs))) (setf (graph frame) ;; wichtig! accessor verwenden! (if (cdr rest) (first (cdr rest)) (first graphs))))))) (define-graph-visualizer-command (com-prev :name "Prev" ) () (with-graph-visualizer (frame) (with-slots (graph graphs) frame (let* ((rev (reverse graphs)) (rest (member graph rev))) (setf (graph frame) (if (cdr rest) (first (cdr rest)) (first rev))))))) (define-graph-visualizer-command (com-quit :name "Quit" ) () (with-graph-visualizer (frame) (with-slots (process) frame (when process #+:allegro (mp:process-kill process)))) (with-graph-visualizer (frame) (frame-exit frame))) (define-graph-visualizer-command (com-new :name "New" ) () (with-graph-visualizer (frame) (setf (graphs frame) nil))) (define-graph-visualizer-command (com-delete-others :name "Delete Others" ) () (with-graph-visualizer (frame) (setf (graphs frame) (list (graph frame))))) (define-graph-visualizer-command (com-refresh :name "Refresh" ) () (refresh)) (defun refresh () (with-graph-visualizer (frame) (dolist (pane '(display info)) (redisplay-frame-pane frame pane)))) ;;; ;;; Graphik ;;; (defun draw-marker (stream direction posx posy size) (draw-arrow* stream posx posy (+ posx (* direction 2)) posy :head-length (max 2 (/ 20 size)) :head-width (max 2 (/ 20 size)))) (defmethod item-pos ((node node)) (get-node-position (in-graph node) node)) (defmethod draw-graph ((graph graph) (stream stream) (kind-of-graph (eql 'chain)) &key show-nodes-p show-edges-p show-node-info-p show-edge-info-p show-color-nodes-p show-color-edges-p show-backward-edges-p show-forward-edges-p show-loops-p print-p) (declare (ignore print-p)) (let* ((nodes (get-nodes graph)) (edges (get-edges graph)) (size (length nodes))) (when nodes (let* ((stepx (/ 100 (max 1 (1- size)))) (stepy (/ 100 (max 1 (1- size)))) (node-radius (get-node-size)) (loop-radius (/ node-radius 2)) (looptext-y loop-radius)) (when show-edges-p (let ((edgeclusters nil)) (dolist (edge edges) (with-slots (from to) edge (let* ((from (item-pos from)) (to (item-pos to)) (found (find-if #'(lambda (x) (and (equal (first x) from) (equal (second x) to))) edgeclusters))) (if found (push edge (third found)) (push (list from to (list edge)) edgeclusters))))) (dolist (edgecluster edgeclusters) (let* ((count (length (third edgecluster))) (finestepy (/ stepy count)) (num 0)) (dolist (edge (third edgecluster)) (incf num) (with-slots (from to) edge (let ((from (item-pos from)) (to (item-pos to))) (when (and from to) (with-drawing-options (stream :ink (if show-color-edges-p (color edge) +edge-color+)) (let* ((height (- to from)) (y (+ (* (1- height) stepy) (* num finestepy))) (ym (+ (* (1- (abs height)) stepy) (* num finestepy)))) (with-output-as-presentation (stream edge 'edge) (cond ((and (zerop height) show-loops-p) (draw-circle* stream (+ (* to stepx) (* num (/ node-radius count))) 0 node-radius :filled nil :line-thickness 2) (when show-edge-info-p (draw-text* stream (format nil "~A" (info edge :for-graph-visualizer-p t)) (+ (* to stepx) node-radius (* num (/ node-radius count))) looptext-y :text-style +text-style+ :ink +edge-text-color+))) ((and (plusp height) show-forward-edges-p) (draw-ellipse* stream (* (/ (+ from to) 2) stepx) 0 (* (- to (/ (+ from to) 2)) stepx) 0 0 y :line-thickness 2 :filled nil :start-angle #+(or mcl lispworks) pi #-(or mcl lispworks) 0 :end-angle #+(or mcl lispworks) 0 #-(or mcl lispworks) pi) (draw-marker stream 1 (* (/ (+ from to) 2) stepx) (- y) size) (when show-edge-info-p (draw-text* stream (format nil "~A" (info edge :for-graph-visualizer-p t)) (* (/ (+ from to) 2) stepx) (- y) :text-style +text-style+ :ink +edge-text-color+))) ((and (minusp height) show-backward-edges-p) (draw-ellipse* stream (* (/ (+ from to) 2) stepx) 0 (* (- to (/ (+ from to) 2)) stepx) 0 0 ym :line-thickness 2 :filled nil :start-angle #+(or mcl lispworks) 0 #-(or mcl lispworks) pi :end-angle #+(or mcl lispworks) pi #-(or mcl lispworks) 0) (draw-marker stream -1 (* (/ (+ from to) 2) stepx) ym size) (when show-edge-info-p (draw-text* stream (format nil "~A" (info edge :for-graph-visualizer-p t)) (* (/ (+ from to) 2) stepx) ym :text-style +text-style+ :ink +edge-text-color+))))))))))))))) (when show-nodes-p (dolist (node nodes) (with-output-as-presentation (stream node 'node) (let ((pos (item-pos node))) (draw-circle* stream (* pos stepx) 0 node-radius :filled t :ink (if show-color-nodes-p (color node) +node-body-color+)) (draw-circle* stream (* pos stepx) 0 node-radius :filled nil :line-thickness 2 :ink +node-contur-color+) (when show-node-info-p (with-text-size (stream :large) (draw-text* stream (format nil "~A" (info node :for-graph-visualizer-p t)) (- (* pos stepx) (* 1.6 node-radius)) (* 1.6 node-radius) :text-style +text-style+ :ink +node-text-color+))))))))))) #+:lispworks (defmethod make-postscript-file ((frame graph-visualizer) filename) (with-open-file (stream filename :direction :output :if-exists :supersede) #| (let ((*standard-output* stream)) (when (dag-top dag) (cl-user::psgraph (dag-top dag) #'dag-node-children #'(lambda (x) (list (dag-node-name x)))))) |# (clim:with-output-to-postscript-stream (ps-stream stream :orientation :portrait :scale-to-fit t) (draw-graph-visualizer frame ps-stream (get-frame-pane frame 'display))))) (defmethod draw-graph ((graph graph) (stream stream) (kind-of-graph (eql 'polygon)) &key show-nodes-p show-edges-p show-node-info-p show-edge-info-p show-color-nodes-p show-color-edges-p show-backward-edges-p show-forward-edges-p show-loops-p print-p) (declare (ignore print-p)) (let* ((nodes (get-nodes graph)) (edges (get-edges graph)) (pi2 (/ pi 2)) (2pi (* 2 pi)) (size (max 1 (length nodes))) (step (/ 2pi size)) (node-radius (get-node-size)) (node-radius2 (* 1.5 node-radius)) (loop-radius (* 1.2 node-radius)) (r 45) (text-radius-ratio .3) (node-label-offset (* 2 node-radius))) (labels ((node-pos (index &optional (offset 0)) (values (+ 50 (* (+ offset r) (cos (+ pi (* step index))))) (+ (- 50) (* (+ offset r) (sin (+ pi (* step index)))))))) (when show-edges-p (let ((edgeclusters nil)) (dolist (edge edges) (with-slots (from to) edge (let* ((from (item-pos from)) (to (item-pos to)) (found (find-if #'(lambda (x) (and (equal (first x) from) (equal (second x) to))) edgeclusters))) (if found (push edge (third found)) (push (list from to (list edge)) edgeclusters))))) (dolist (edgecluster edgeclusters) (let* ((count (length (third edgecluster))) (inc (unless (zerop (1- count)) (/ pi (1- count)))) (num 0)) (dolist (edge (third edgecluster)) (incf num) (with-slots (from to) edge (let* ((from (item-pos from)) (to (item-pos to)) (height (when (and from to) (- to from)))) (when height (multiple-value-bind (fromcx fromcy) (node-pos from) (multiple-value-bind (tocx tocy) (node-pos to) (let* ((orientation (if (eq from to) 0 (vector-orientation fromcx fromcy tocx tocy))) (anglefrom (+ orientation (if (zerop (1- count)) 0 (+ (- pi2) (* inc (1- num)))))) (angleto (- orientation (if (zerop (1- count)) 0 (+ pi2 (* inc (1- num)))))) (fromx (+ fromcx (* node-radius (cos anglefrom)))) (fromy (+ fromcy (* node-radius (sin anglefrom)))) (tox (+ tocx (* node-radius (cos angleto)))) (toy (+ tocy (* node-radius (sin angleto)))) (fromx1 (+ fromcx (* node-radius2 (cos anglefrom)))) (fromy1 (+ fromcy (* node-radius2 (sin anglefrom)))) (textx (+ fromx (* text-radius-ratio (- tox fromx)))) (texty (+ fromy (* text-radius-ratio (- toy fromy))))) (with-drawing-options (stream :ink (if show-color-edges-p (color edge) +edge-color+)) (with-output-as-presentation (stream edge 'edge) (cond ((and (zerop height) show-loops-p) (draw-circle* stream fromx fromy loop-radius :line-thickness 2 :filled nil) (when show-edge-info-p (draw-text* stream (format nil "~A" (info edge :for-graph-visualizer-p t)) fromx1 fromy1 :text-style +text-style+ :ink +edge-text-color+))) ((or (and (plusp height) show-forward-edges-p) (and (minusp height) show-backward-edges-p)) (draw-line* stream fromx fromy tox toy) (draw-arrow* stream fromx fromy (/ (+ fromx tox) 2) (/ (+ fromy toy) 2) :head-length (max 2 (/ 20 size)) :head-width (max 2 (/ 20 size))) (when show-edge-info-p (draw-text* stream (format nil "~A" (info edge :for-graph-visualizer-p t)) textx texty :text-style +text-style+ :ink +edge-text-color+))))))))))))))))) (when show-nodes-p (dolist (node nodes) (let ((pos (item-pos node))) (multiple-value-bind (x y) (node-pos pos) (with-output-as-presentation (stream node 'node) (draw-circle* stream x y node-radius :filled t :ink (if show-color-nodes-p (color node) +node-body-color+)) (draw-circle* stream x y node-radius :filled nil :ink +node-contur-color+) (when show-node-info-p (multiple-value-bind (x y) (node-pos pos node-label-offset) (with-text-size (stream :large) (draw-text* stream (format nil "~A" (info node :for-graph-visualizer-p t)) x y :text-style +text-style+ :ink +node-text-color+)))))))))))) ;;; ;;; Start ;;; (defmethod accept-options ((frame graph-visualizer) stream) (with-slots (kind-of-graph show-nodes-p show-edges-p show-node-info-p show-edge-info-p show-color-nodes-p show-color-edges-p show-backward-edges-p show-forward-edges-p show-loops-p) frame (formatting-table (stream :multiple-columns t) (formatting-row (stream) (formatting-cell (stream) (multiple-value-bind (object) (accept 'completion :query-identifier 'kind-of-graph :prompt nil :prompt-mode :raw :stream stream :default kind-of-graph :view `(option-pane-view :items (chain polygon))) (setf kind-of-graph object))) (formatting-cell (stream) (multiple-value-bind (object) (accept 'boolean :stream stream :default show-nodes-p :prompt-mode :raw :query-identifier 'show-nodes-p :prompt "Nodes") (setf show-nodes-p object))) (formatting-cell (stream) (multiple-value-bind (object) (accept 'boolean :stream stream :default show-edges-p :prompt-mode :raw :query-identifier 'show-edges-p :prompt "Edges") (setf show-edges-p object))) (formatting-cell (stream) (multiple-value-bind (object) (accept 'boolean :stream stream :default show-node-info-p :prompt-mode :raw :query-identifier 'show-node-info-p :prompt "Node Info") (setf show-node-info-p object))) (formatting-cell (stream) (multiple-value-bind (object) (accept 'boolean :stream stream :default show-edge-info-p :prompt-mode :raw :query-identifier 'show-edge-info-p :prompt "Edge Info") (setf show-edge-info-p object))) (formatting-cell (stream) (multiple-value-bind (object) (accept 'boolean :stream stream :default show-color-nodes-p :prompt-mode :raw :query-identifier 'show-color-nodes-p :prompt "Coloured Nodes") (setf show-color-nodes-p object))) (formatting-cell (stream) (multiple-value-bind (object) (accept 'boolean :stream stream :default show-color-edges-p :prompt-mode :raw :query-identifier 'show-color-edges-p :prompt "Coloured Edges") (setf show-color-edges-p object))) (formatting-cell (stream) (multiple-value-bind (object) (accept 'boolean :stream stream :default show-backward-edges-p :prompt-mode :raw :query-identifier 'show-backward-edges-p :prompt "Backward Edges") (setf show-backward-edges-p object))) (formatting-cell (stream) (multiple-value-bind (object) (accept 'boolean :stream stream :default show-forward-edges-p :prompt-mode :raw :query-identifier 'show-forward-edges-p :prompt "Forward Edges") (setf show-forward-edges-p object))) (formatting-cell (stream) (multiple-value-bind (object) (accept 'boolean :stream stream :default show-loops-p :prompt-mode :raw :query-identifier 'show-loops-p :prompt "Loops") (setf show-loops-p object))))))) ;;; ;;; Interaktion ;;; #+:lispworks (define-graph-visualizer-command (com-ps-file :menu "Make Postscript File") () (with-graph-visualizer (frame) (make-postscript-file frame "graph.ps"))) (define-graph-visualizer-command (com-show-info :name "Show Info") ((object 'edge)) (with-graph-visualizer (frame) (setf *selected-object* object) (let ((stream (get-frame-pane frame 'infopane))) (describe object stream)))) #+:allegro (define-graph-visualizer-command (com-print :menu t) () (with-graph-visualizer (frame) (with-open-stream (pipe (excl:run-shell-command (format nil "lpr -P~A -h" '|r135_hp|) :input :stream :wait nil)) (with-output-to-postscript-stream (stream pipe :orientation :landscape :scale-to-fit t) (draw-graph-visualizer frame stream (get-frame-pane frame 'display)))))) #+:allegro (define-graph-visualizer-command (com-save :menu t) () (with-graph-visualizer (frame) (with-open-file (file "~/rcc-visualizer-output.ps" :direction :output :if-exists :supersede :if-does-not-exist :create) (with-output-to-postscript-stream (stream file :orientation :portrait :scale-to-fit t) (draw-graph-visualizer frame stream (get-frame-pane frame 'display)))))) ;;; ;;; Translatoren ;;; (define-presentation-to-command-translator object-to-command (graph-item com-show-info graph-visualizer :gesture :select) (object) (list object)) ;;; ;;; ;;; (defmethod visualize ((graphs list) &optional (kill-p t)) #| (unless (every #'(lambda (graph) (<= (length (nodes graph)) 20)) graphs) (error "Doesn't make sense to visualize graphs with more than 20 nodes with this program!")) |# (with-graph-visualizer (frame) (when (and frame kill-p) (frame-exit frame))) (let ((port (find-port)) (graphs (remove-duplicates graphs)) (frame (make-application-frame 'graph-visualizer :width 850 :height 860))) (setf *graph-visualizer* frame) (setf (bar frame) *bar*) (setf (resizer frame) *resizer*) (setf (clim:text-style-mapping port +text-style+) ;;"-*-fixed-medium-r-semicondensed-*-11-*-*-*-*-*-*-*" "fixed") #+:allegro (mp:process-run-function "GRAPH Visualizer" #'(lambda () (run-frame-top-level *graph-visualizer*))) #+:lispworks (mp:process-run-function "GRAPH Visualizer" nil #'(lambda () (run-frame-top-level *graph-visualizer*))) #+mcl (ccl:process-run-function "GRAPH Visualizer" #'(lambda () (run-frame-top-level *graph-visualizer*))) (setf (graphs frame) graphs))) (defmethod visualize ((graph graph) &optional (kill-p t)) (visualize (list graph) kill-p)) ;;; ;;; Demo: Ableitung eines gelabelten "Simple Graphs" ;;; Verwaltung der Knoten und Kanten über einfache Listen ;;; Achtung: *nicht* von Simple Graph erben!!! ;;; #| (defvar *all-graphs* nil) (defpersistentclass simple-graph (graph) ((nodes :accessor nodes :initform nil) (edges :accessor edges :initform nil))) (defpersistentclass simple-node (node) ((label :accessor label :initarg :label :initform nil))) (defpersistentclass simple-edge (edge) ((label :accessor label :initarg :label :initform nil))) ;;; ;;; ;;; (defun make-simple-graph (name) (make-instance 'simple-graph :name name)) (defmethod make-graph ((type (eql 'simple-graph)) &key name &allow-other-keys) (make-simple-graph name)) (defmethod initialize-instance :after ((graph simple-graph) &rest initargs) (push graph *all-graphs*)) (defmethod initialize-instance :after ((node simple-node) &rest initargs) (push node (nodes (in-graph node)))) (defmethod initialize-instance :after ((edge simple-edge) &rest initargs) (push edge (edges (in-graph edge)))) (defmethod find-graph ((graph-spec symbol) &rest args) (find graph-spec *all-graphs* :key #'name)) (defmethod find-graph ((graph-spec integer) &rest args) (find graph-spec *all-graphs* :key #'id :test #'=)) (defmethod find-node ((graph-spec simple-graph) (node-spec symbol) &rest args) (find node-spec (nodes graph-spec) :key #'name)) (defmethod find-node ((graph-spec simple-graph) (node-spec integer) &rest args) (find node-spec (nodes graph-spec) :key #'id :test #'=)) (defmethod find-node ((graph-spec simple-graph) (node-spec simple-node) &rest args) (find node-spec (nodes graph-spec))) (defmethod find-edge ((graph-spec simple-graph) (edge-spec symbol) &rest args) (find edge-spec (edges graph-spec) :key #'name)) (defmethod find-edge ((graph-spec simple-graph) (edge-spec integer) &rest args) (find edge-spec (edges graph-spec) :key #'id :test #'=)) (defmethod find-edge ((graph-spec simple-graph) (edge-spec simple-edge) &rest args) (find edge-spec (edges graph-spec))) (defmethod get-node-position ((graph-spec simple-graph) (node-spec simple-node) &rest args) (let* ((nodes (get-nodes graph-spec))) (position node-spec nodes))) (defmethod no-of-nodes ((graph simple-graph) &rest args) (length (nodes graph))) (defmethod no-of-edges ((graph simple-graph) &rest args) (length (edges graph))) (defmethod delete-graph ((graph simple-graph) &rest args) (setf *all-graphs* (delete graph *all-graphs*))) (defmethod copy-graph ((graph simple-graph) &key &allow-other-keys) (let ((new-graph (make-instance 'simple-graph :name (name graph) :edge-counter (edge-counter graph) :node-counter (node-counter graph) :id (id graph)))) (with-slots (nodes edges) new-graph (setf nodes (mapcar #'(lambda (node) (copy-graph-item new-graph node)) (nodes graph)) edges (mapcar #'(lambda (edge) (copy-graph-item new-graph edge)) (edges graph)))) new-graph)) (defmethod make-node ((graph simple-graph) &key name label &allow-other-keys) (make-instance 'simple-node :in-graph graph :label label :name name)) (defmethod make-edge ((graph simple-graph) (from simple-node) (to simple-node) &key label &allow-other-keys) (make-instance 'simple-edge :in-graph graph :from from :to to :label label :name (intern (format nil "EDGE-~A-~A" (name from) (name to))))) (defmethod delete-node ((graph simple-graph) (node simple-node) &key &allow-other-keys) (unless (eq (in-graph node) graph) (error "Node ~A not in graph ~A!" node graph)) (setf (nodes graph) (delete node (nodes (in-graph node))))) (defmethod delete-edge ((graph simple-graph) (edge simple-edge) &key &allow-other-keys) (unless (eq (in-graph edge) graph) (error "Edge ~A not in graph ~A!" edge graph)) (setf (edges (in-graph edge)) (delete edge (edges (in-graph edge))))) (defmethod copy-node ((new-graph simple-graph) (node simple-node) &key &allow-other-keys) (make-instance 'simple-node :in-graph new-graph :id (id node) :label (label node) :name (name node))) (defmethod copy-edge ((new-graph simple-graph) (edge simple-edge) &key &allow-other-keys) (make-instance 'simple-edge :in-graph new-graph :id (id edge) :label (label edge) :name (name edge) :from (find-node new-graph (id (from edge))) :to (find-node new-graph (id (to edge))))) (defmethod get-nodes ((graph simple-graph) &rest args) (reverse (nodes graph))) (defmethod get-edges ((graph simple-graph) &rest args) (reverse (edges graph))) (defmethod get-edges-between ((graph simple-graph) (from simple-node) (to simple-node) &rest args) (remove-if-not #'(lambda (edge) (and (eq (from edge) from) (eq (to edge) to))) (get-edges graph))) ;;; ;;; ;;; (defmethod info ((graph simple-graph) &key) (format nil "Id: ~A Nodes: ~A, Edges: ~A" (id graph) (no-of-nodes graph) (no-of-edges graph))) (defmethod info ((node simple-node) &key for-graph-visualizer-p) (if for-graph-visualizer-p (print-object node nil) (format nil "Id: ~A Label: ~A" (id node) (label node)))) (defmethod info ((edge simple-edge) &key for-graph-visualizer-p) (if for-graph-visualizer-p (print-object edge nil) (format nil "(~A/~A,~A/~A):~A" (name (from edge)) (id (from edge)) (name (to edge)) (id (to edge)) (label edge)))) ;;; ;;; ;;; (defmethod kind ((graph simple-graph)) 'kind-simple-graph) (defmethod kind ((node simple-node)) (label node)) (defmethod kind ((edge simple-edge)) (label edge)) ;;; ;;; wird nur verwendet, wenn kein "kind", ansonsten ;;; "compute-color-from-kind-p t" als default! ;;; (defmethod color ((node simple-node)) +yellow+) (defmethod color ((edge simple-edge)) +yellow+) (let ((graph (make-graph 'simple-graph :name 'graph :delete-if-exists-p t))) (setf x graph) (setf a (make-node graph :name 'a :label 'label-a)) (setf b (make-node graph :name 'b :label 'label-b)) (setf c (make-node graph :name 'c :label 'label-c)) (setf d (make-node graph :name 'd :label 'label-a)) (delete-node 'graph 'd) (setf ab1 (make-edge 'graph a b :label 'r1)) (setf ab2 (make-edge 'graph a b :label 'r2)) (visualize graph)) (let ((graph (make-graph 'simple-graph :name 'graph)) (graph (make-graph 'simple-graph :name 'graph))) (princ *all-graphs*) (delete-graph 'graphd :all-p nil :error-p nil) (princ *all-graphs*) (delete-graph 'graph :all-p t) (princ *all-graphs*)) |#
50,804
Common Lisp
.lisp
1,106
26.223327
122
0.428804
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
45e70e5bdca98ef906b86e18288d33c0aeb83e16366cc3bc77c7ae1d28f0dc17
12,505
[ -1 ]
12,506
common15.lisp
lambdamikel_DLMAPS/src/thematic-substrate/common15.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) ;;; ;;; ;;; (defconstant +racer-internal-datatype-property-roles+ '(RACER-INTERNAL%HAS-STRING-VALUE RACER-INTERNAL%HAS-INTEGER-VALUE RACER-INTERNAL%HAS-CARDINAL-VALUE RACER-INTERNAL%HAS-REAL-VALUE RACER-INTERNAL%HAS-BOOLEAN-VALUE)) (defconstant +racer-substrate-default-tbox+ 'cl-user::default) ;;; ;;; ;;; (defconstant +cache-is-complete-marker+ :cache-complete-dvfkvf8974) (defconstant +individual-exists-concept+ :individual-exists-7894jkjoif) ;;; ;;; ;;; (defvar *racer-tbox* nil) (defvar *racer-abox* nil) ;;; ;;; ;;; ;;; (defconstant +default-hash-table-size+ 10000) (defconstant +default-rehash-factor+ 1) (defun mht (&key (size +default-hash-table-size+) (test #'eql)) (make-hash-table :size size :rehash-size (* +default-rehash-factor+ size) :test test)) ;;; ;;; ;;; (defconstant +table-size-concept-assertions-cache+ 3000) (defconstant +table-size-constraint-entailed-cache+ 3000) (defconstant +table-size-concept-instances-cache+ 3000) (defconstant +table-size-known-concept-instances-cache+ 3000) (defconstant +table-size-individual-instance-cache+ 10000) (defconstant +table-size-individual-attribute-fillers-cache+ 3000) (defconstant +table-size-role-assertions-in-range-cache+ 10000) (defconstant +table-size-role-assertions-in-domain-cache+ 10000) (defconstant +table-size-role-descendants-cache+ 100) (defconstant +table-size-atomic-role-inverse-cache+ 100) (defconstant +table-size-role-successors-cache+ 100) (defconstant +table-size-new-inds-hash+ 100) (defconstant +table-size-datatype-property-values-cache+ 100) (defconstant +table-size-told-values-cache+ 100) ;;; ;;; ;;; (defpersistentclass racer-descriptions-substrate (substrate) ;;; Knoten und Kanten mit Racer-Descriptions ((tbox :initarg :tbox :reader tbox :initform nil) (racer-package :accessor racer-package :initarg :racer-package :initform :racer-user))) (defpersistentclass dl-prover-substrate (substrate) ;;; Knoten und Kanten mit Descriptions, optionale assoziierte ABox-Objekte! ((qbox :initarg :qbox :reader qbox :initform nil) (dbox :initarg :dbox :reader dbox :initform nil) (prepared-p :accessor prepared-p :initform nil) (saved-state-vector :accessor saved-state-vector :initform nil) (needs-filler-reasoning-p :reader needs-filler-reasoning-p :initform nil) (new-inds-hash :accessor new-inds-hash :initform (mht :size +table-size-new-inds-hash+ :test #'equal)) (abox-individuals-cache :accessor abox-individuals-cache :initform :unknown) (concept-assertions-cache :accessor concept-assertions-cache :initform (mht :size +table-size-concept-assertions-cache+)) ;;; ;;; ;;; (concept-instances-cache :accessor concept-instances-cache :initform (mht :size +table-size-concept-instances-cache+ :test #'equal)) (known-concept-instances-cache :accessor known-concept-instances-cache :initform (mht :size +table-size-known-concept-instances-cache+ :test #'equal)) (individual-instance-cache :accessor individual-instance-cache :initform (mht :test #'equal :size +table-size-individual-instance-cache+)) (role-assertions-in-range-cache :accessor role-assertions-in-range-cache :initform (mht :size +table-size-role-assertions-in-range-cache+)) (role-assertions-in-domain-cache :accessor role-assertions-in-domain-cache :initform (mht :size +table-size-role-assertions-in-domain-cache+)) (role-descendants-cache :accessor role-descendants-cache :initform (mht :size +table-size-role-descendants-cache+ :test #'equal)) (role-successors-cache :accessor role-successors-cache :initform (mht :size +table-size-role-successors-cache+ :test #'equal)) (atomic-role-inverse-cache :accessor atomic-role-inverse-cache :initform (mht :size +table-size-atomic-role-inverse-cache+ :test #'equal)) (all-roles-cache :accessor all-roles-cache :initform :unknown) (transitive-roles-cache :accessor transitive-roles-cache :initform :unknown) ;;; ;;; die folgenden Slots / Hashtabellen dienen dazu, die Kommunikation mit ;;; dem RACER-Server zu beschleunigen (Cache fuer haeuftig gestellte Anfragen!) ;;; (constraints-cache :accessor constraints-cache :initform :unknown) (told-values-cache :accessor told-values-cache :initform (mht :size +table-size-told-values-cache+ :test #'eql)) (datatype-property-values-cache :accessor datatype-property-values-cache :initform (mht :test #'equal :size +table-size-datatype-property-values-cache+)) (constraint-entailed-cache :accessor constraint-entailed-cache :initform (mht :test #'equal :size +table-size-constraint-entailed-cache+)) (individual-attribute-fillers-cache :accessor individual-attribute-fillers-cache :initform (mht :test #'equal :size +table-size-individual-attribute-fillers-cache+)))) (defpersistentclass racer-substrate (dl-prover-substrate racer-descriptions-substrate) ;;; Knoten und Kanten mit Descriptions, optionale assoziierte ABox-Objekte! ((tbox :initarg :tbox :reader tbox :initform nil) (abox :initarg :abox :reader abox :initform nil))) (defpersistentclass racer-dummy-substrate (racer-substrate) nil) ;;; nur fuer Ralf, keine Substrat-Objekte, nur ABox ;;; -> keine Substrate-Objekte-Unterklassen erforderlich, klar #+:midelora (defpersistentclass midelora-substrate (dl-prover-substrate prover::abox) ((abox :accessor abox) (tbox :accessor tbox))) #+:midelora (defpersistentclass midelora-substrate1 (midelora-substrate prover::abox1)) #+:midelora (defmethod update-instance-for-different-class :after ((old prover::abox) (substrate midelora-substrate) &rest initargs) (declare (ignore initargs)) (setf (slot-value substrate 'abox) substrate (slot-value substrate 'tbox) (prover::tbox substrate)) (reset-substrate substrate)) (defpersistentclass tbox-mirror-substrate (dl-prover-substrate)) (defpersistentclass racer-tbox-mirror-substrate (tbox-mirror-substrate racer-dummy-substrate) ((mirror-of-tbox :reader mirror-of-tbox) (needs-filler-reasoning-p :initform nil))) #+:midelora (defpersistentclass midelora-tbox-mirror-substrate (tbox-mirror-substrate midelora-substrate) ((mirror-of-tbox :reader mirror-of-tbox) (needs-filler-reasoning-p :initform nil))) ;;; ;;; ;;; (defmethod establish-context-for ((substrate racer-substrate) continuation) (let ((*racer-tbox* (tbox substrate)) (*racer-abox* (abox substrate))) (if (next-method-p) (call-next-method) (funcall continuation)))) #-:dlmaps (defmethod set-context-for ((substrate racer-substrate)) (setf *racer-tbox* (tbox substrate) *racer-abox* (abox substrate))) #+:dlmaps (defmethod set-context-for progn ((substrate racer-substrate)) (setf *racer-tbox* (tbox substrate) *racer-abox* (abox substrate))) ;;; ;;; ;;; (defmethod reset-substrate :before ((substrate dl-prover-substrate) &key &allow-other-keys) (without-timeout (setf (saved-state-vector substrate) nil) (setf (prepared-p substrate) nil))) (defmethod reset-substrate :after ((substrate dl-prover-substrate) &key &allow-other-keys) (without-timeout (setf (saved-state-vector substrate) (get-state-vector substrate)) (setf (prepared-p substrate) t))) ;;; ;;; ;;; (defmethod reset-substrate ((substrate racer-substrate) &key &allow-other-keys) (clear-repository substrate) (reset-caches substrate) (if (find-tbox (tbox substrate) nil) (if (find-abox (abox substrate) nil) (compute-abox-mirror substrate) (nrql-error "Can't find ABox ~A!" (abox substrate))) (nrql-error "Can't find TBox ~A!" (tbox substrate)))) #+:midelora (defmethod reset-substrate ((substrate midelora-substrate) &key &allow-other-keys) (clear-repository substrate) (reset-caches substrate) (compute-abox-mirror substrate)) (defmethod reset-substrate ((substrate racer-tbox-mirror-substrate) &key tbox) (reset-caches substrate) (setf (slot-value substrate 'tbox) (or tbox (mirror-of-tbox substrate))) (if (find-tbox (tbox substrate) nil) (compute-tbox-mirror substrate) (nrql-error "Can't find TBox ~A!" (tbox substrate)))) #+:midelora (defmethod reset-substrate ((substrate midelora-tbox-mirror-substrate) &key tbox) (declare (ignorable tbox)) (reset-caches substrate) (setf (slot-value substrate 'tbox) (or tbox (mirror-of-tbox substrate))) (if (prover::find-tbox (tbox substrate) :error-p nil) (compute-tbox-mirror substrate) (nrql-error "Can't find TBox ~A!" (tbox substrate)))) ;;; ;;; ;;; (defmethod reset-caches ((substrate dl-prover-substrate)) (setf (constraints-cache substrate) :unknown) (setf (abox-individuals-cache substrate) :unknown) (setf (transitive-roles-cache substrate) :unknown) (setf (all-roles-cache substrate) :unknown) (dolist (slot '(concept-assertions-cache atomic-role-inverse-cache concept-instances-cache known-concept-instances-cache individual-instance-cache role-assertions-in-range-cache role-assertions-in-domain-cache role-descendants-cache role-successors-cache told-values-cache datatype-property-values-cache constraint-entailed-cache individual-attribute-fillers-cache)) (clrhash (slot-value substrate slot)))) ;;; ;;; DL-Prover-Ankopplung per Delegation (plus Caching etc.) ;;; (defmethod dl-all-individuals ((substrate racer-substrate) &rest args) (apply #'all-individuals args)) #+:midelora (defmethod dl-all-individuals ((substrate midelora-substrate) &rest args) (apply #'prover::all-individuals args)) (defmethod dl-all-roles ((substrate racer-substrate) &rest args) (apply #'all-roles args)) #+:midelora (defmethod dl-all-roles ((substrate midelora-substrate) &rest args) (apply #'prover::all-roles args)) (defmethod dl-all-features ((substrate racer-substrate) &rest args) (apply #'all-features args)) #+:midelora (defmethod dl-all-features ((substrate midelora-substrate) &rest args) (apply #'prover::all-features args)) (defmethod dl-all-transitive-roles ((substrate racer-substrate) &rest args) (apply #'all-transitive-roles args)) #+:midelora (defmethod dl-all-transitive-roles ((substrate midelora-substrate) &rest args) (apply #'prover::all-transitive-roles args)) (defmethod dl-all-constraints ((substrate racer-substrate) &rest args) (apply #'all-constraints args)) #+:midelora (defmethod dl-all-constraints ((substrate midelora-substrate) &rest args) (declare (ignorable args)) nil) (defmethod dl-all-concept-assertions-for-individual ((substrate racer-substrate) &rest args) (apply #'all-concept-assertions-for-individual args)) #+:midelora (defmethod dl-all-concept-assertions-for-individual ((substrate midelora-substrate) &rest args) (apply #'prover::all-concept-assertions-for-individual args)) (defmethod dl-retrieve-concept-instances ((substrate racer-substrate) concept abox &key (candidates nil candidates-supplied-p) &allow-other-keys) (if candidates-supplied-p (retrieve-concept-instances concept abox candidates) (retrieve-concept-instances concept abox))) #+:midelora (defmethod dl-retrieve-concept-instances ((substrate midelora-substrate) concept abox &rest args &key &allow-other-keys) (apply #'prover::get-concept-instances concept abox args)) (defmethod dl-individual-p ((substrate racer-substrate) &rest args) (apply #'individual-p args)) #+:midelora (defmethod dl-individual-p ((substrate midelora-substrate) &rest args) (apply #'prover::individual-p args)) (defmethod dl-individual-instance-p ((substrate racer-substrate) &rest args) (apply #'individual-instance-p args)) #+:midelora (defmethod dl-individual-instance-p ((substrate midelora-substrate) &rest args) (apply #'prover::individual-instance-p args)) (defmethod dl-constraint-entailed-p ((substrate racer-substrate) &rest args) (apply #'constraint-entailed-p args)) #+:midelora (defmethod dl-constraint-entailed-p ((substrate midelora-substrate) &rest args) nil) (defmethod dl-retrieve-individual-attribute-fillers ((substrate racer-substrate) &rest args) (apply #'retrieve-individual-attribute-fillers args)) #+:midelora (defmethod dl-retrieve-individual-attribute-fillers ((substrate midelora-substrate) &rest args) nil) (defmethod dl-all-role-assertions-for-individual-in-range ((substrate racer-substrate) &rest args) (apply #'all-role-assertions-for-individual-in-range args)) #+:midelora (defmethod dl-all-role-assertions-for-individual-in-range ((substrate midelora-substrate) &rest args) (apply #'prover::all-role-assertions-for-individual-in-range args)) (defmethod dl-all-role-assertions-for-individual-in-domain ((substrate racer-substrate) &rest args) (apply #'all-role-assertions-for-individual-in-domain args)) #+:midelora (defmethod dl-all-role-assertions-for-individual-in-domain ((substrate midelora-substrate) &rest args) (apply #'prover::all-role-assertions-for-individual-in-domain args)) (defmethod dl-atomic-role-descendants ((substrate racer-substrate) &rest args) (apply #'atomic-role-descendants args)) #+:midelora (defmethod dl-atomic-role-descendants ((substrate midelora-substrate) &rest args) (apply #'prover::atomic-role-descendants args)) (defmethod dl-atomic-role-inverse ((substrate racer-substrate) &rest args) (apply #'atomic-role-inverse args)) #+:midelora (defmethod dl-atomic-role-inverse ((substrate midelora-substrate) &rest args) (apply #'prover::atomic-role-inverse args)) (defmethod dl-all-role-assertions ((substrate racer-substrate) &rest args) (apply #'all-role-assertions args)) #+:midelora (defmethod dl-all-role-assertions ((substrate midelora-substrate) &rest args) (apply #'prover::all-role-assertions args)) (defmethod dl-all-annotation-role-assertions ((substrate racer-substrate) &rest args) (apply #'all-annotation-role-assertions args)) #+:midelora (defmethod dl-all-annotation-role-assertions ((substrate midelora-substrate) &rest args) nil) (defmethod dl-all-attribute-assertions ((substrate racer-substrate) &rest args) (apply #'all-attribute-assertions args)) #+:midelora (defmethod dl-all-attribute-assertions ((substrate midelora-substrate) &rest args) nil) (defmethod dl-tbox-classified-p ((substrate racer-descriptions-substrate) &rest args) (apply #'tbox-classified-p args)) #+:midelora (defmethod dl-tbox-classified-p ((substrate midelora-substrate) &rest args) (apply #'prover::tbox-classified-p args)) (defmethod dl-tbox-coherent-p ((substrate racer-descriptions-substrate) &rest args) (apply #'tbox-coherent-p args)) #+:midelora (defmethod dl-tbox-coheren-p ((substrate midelora-substrate) &rest args) (apply #'prover::tbox-coherent-p args)) (defmethod dl-classify-tbox ((substrate racer-descriptions-substrate) &rest args) (apply #'classify-tbox args)) #+:midelora (defmethod dl-classify-tbox ((substrate midelora-substrate) &rest args) (apply #'prover:classify-tbox args)) (defmethod dl-all-annotation-concept-assertions ((substrate racer-substrate) &rest args) (apply #'all-annotation-concept-assertions args)) #+:midelora (defmethod dl-all-annotation-concept-assertions ((substrate midelora-substrate) &rest args) nil) (defmethod dl-atomic-concept-ancestors ((substrate racer-substrate) &rest args) (apply #'atomic-concept-ancestors args)) #+:midelora (defmethod dl-atomic-concept-ancestors ((substrate midelora-substrate) &rest args) nil) (defmethod dl-atomic-concept-synonyms ((substrate racer-substrate) &rest args) (apply #'atomic-concept-synonyms args)) #+:midelora (defmethod dl-atomic-concept-synonyms ((substrate midelora-substrate) &rest args) (apply #'prover::atomic-concept-synonyms args)) (defmethod dl-all-concept-assertions ((substrate racer-substrate) &rest args) (apply #'all-concept-assertions args)) #+:midelora (defmethod dl-all-concept-assertions ((substrate midelora-substrate) &rest args) (apply #'prover::all-concept-assertions args)) ;;; ;;; ;;; (defmethod retrieve-annotation-values ((substrate racer-substrate) ind property) (loop as concept in (gethash ind (datatype-property-values-cache substrate)) when (eq (first concept) property) collect (second concept))) #+:midelora (defmethod retrieve-annotation-values ((substrate midelora-substrate) ind property) (declare (ignore ind property)) nil) ;;; ;;; Abstraktionen; nur diese Funktionen sollen im Query-Evaluation-Code verwendet werden! ;;; (defmethod dl-prover-internal-individuals-related-p ((substrate racer-substrate) &rest args) (apply #'internal-individuals-related-p args)) #+:midelora (defmethod dl-prover-internal-individuals-related-p ((substrate midelora-substrate) &rest args) (apply #'prover::individuals-related-p args)) (defmethod dl-prover-individual-synonyms ((substrate racer-substrate) ind) (with-critical-section (retrieve-individual-synonyms ind nil (abox substrate)))) #+:midelora (defmethod dl-prover-individual-synonyms ((substrate midelora-substrate) ind) (declare (ignorable ind)) nil) (defmethod dl-prover-abox-consistent-p ((substrate racer-substrate) &rest args) (apply #'abox-consistent-p args)) #+:midelora (defmethod dl-prover-abox-consistent-p ((substrate midelora-substrate) &rest args) (apply #'prover::abox-consistent-p args)) (defmethod dl-prover-transitive-role-p ((substrate dl-prover-substrate) role) (with-critical-section (when (eq (transitive-roles-cache substrate) :unknown) (setf (transitive-roles-cache substrate) (dl-all-transitive-roles substrate (tbox substrate)))) (member role (transitive-roles-cache substrate) :test #'equal))) (defmethod dl-prover-all-roles ((substrate dl-prover-substrate)) (with-critical-section (when (eq (all-roles-cache substrate) :unknown) (setf (all-roles-cache substrate) (dl-all-roles substrate (tbox substrate)))) (all-roles-cache substrate))) (defmethod dl-prover-role-successors-cache-complete-for-role-p ((substrate dl-prover-substrate) from role) (with-critical-section (dl-prover-is-known-role-successor-of-p substrate +cache-is-complete-marker+ from role))) (defmethod dl-prover-register-role-successors-cache-is-complete-for-role ((substrate dl-prover-substrate) from role) (with-critical-section (dl-prover-register-role-successor substrate +cache-is-complete-marker+ from role))) (defmethod dl-prover-all-role-successors ((substrate dl-prover-substrate) from role) (with-critical-section (if (dl-prover-role-successors-cache-complete-for-role-p substrate from role) (let ((hash (gethash role (role-successors-cache substrate)))) (if hash (let ((succs (gethash from hash))) ; +complete-marker+ entfernen! ;; (princ succs) ;; (terpri) (rest succs)) (nrql-error "Runtime error: hashing problem"))) :unknown))) (defmethod dl-prover-is-known-role-successor-of-p ((substrate dl-prover-substrate) to from role) (with-critical-section ;;; auch wenn der Cache unvollstaendig ist! ;;; er wird nur verwendet beim Suchen in der ABox "racer-retrieve-individual-fillers" ;;; fuer (transitive) Rollen, um Such-Endlosschleifen (Zyklen) aufzuloesen! ;;; (let ((hash (gethash role (role-successors-cache substrate)))) (if hash (member to (gethash from hash)) nil)))) (defmethod dl-prover-register-role-successor ((substrate dl-prover-substrate) to from role) (with-critical-section (unless (gethash role (role-successors-cache substrate)) (setf (gethash role (role-successors-cache substrate)) (mht :size 1000 :test #'equal))) (when (dl-prover-role-successors-cache-complete-for-role-p substrate from role) (nrql-error "Runtime error: cache is already complete!")) (multiple-value-bind (succs foundp) (gethash from (gethash role (role-successors-cache substrate))) (declare (ignorable succs)) (if foundp (push to (gethash from (gethash role (role-successors-cache substrate)))) (setf (gethash from (gethash role (role-successors-cache substrate))) (list to)))))) (defmethod dl-prover-all-individuals ((substrate dl-prover-substrate)) (with-critical-section (if (eq (abox-individuals-cache substrate) :unknown) (unless *told-information-reasoning-p* (values (setf (abox-individuals-cache substrate) (dl-all-individuals substrate (abox substrate))) t)) (values (abox-individuals-cache substrate) t)))) (defmethod dl-prover-individual-exists-p ((substrate dl-prover-substrate) ind) (with-critical-section (dl-prover-individual-instance-p substrate ind +individual-exists-concept+))) (defmethod dl-prover-all-constraints ((substrate dl-prover-substrate)) (with-critical-section (if (eq (constraints-cache substrate) :unknown) (unless *told-information-reasoning-p* (values (setf (constraints-cache substrate) (dl-all-constraints substrate (abox substrate))) t)) (values (constraints-cache substrate) t)))) (defmethod dl-prover-all-concept-assertions-for-individual ((substrate dl-prover-substrate) ind) (with-critical-section (multiple-value-bind (val foundp) (gethash ind (concept-assertions-cache substrate)) (if foundp (values val t) (unless *told-information-reasoning-p* (let ((assertions (dl-all-concept-assertions-for-individual substrate ind (abox substrate)))) (setf (gethash ind (concept-assertions-cache substrate)) assertions) (dolist (assertion assertions) (let ((concept (second assertion))) (setf (gethash (list ind concept) (individual-instance-cache substrate)) t) (if (gethash concept (known-concept-instances-cache substrate)) (push ind (gethash concept (known-concept-instances-cache substrate))) (setf (gethash concept (known-concept-instances-cache substrate)) (list ind))))) (values assertions t))))))) (defmethod dl-prover-retrieve-concept-instances ((substrate dl-prover-substrate) concept &key (candidates nil candidates-supplied-p) continuation) (with-critical-section (multiple-value-bind (val foundp) (gethash concept (concept-instances-cache substrate)) (if foundp ;; zweiter Wert wichtig, um bei NIL-Ergebnis ;; zu sehen, dass vollständig bzw. bereits berechnet! (if continuation (progn (dolist (x val) (funcall continuation x)) (values val t)) (values val t)) (unless *told-information-reasoning-p* (let* ((continuation #'(lambda (ind) (setf (gethash (list ind concept) (individual-instance-cache substrate)) t) (when continuation (funcall continuation ind)))) (inds (if candidates-supplied-p (dl-retrieve-concept-instances substrate concept (abox substrate) :candidates candidates :continuation continuation) (dl-retrieve-concept-instances substrate concept (abox substrate) :continuation continuation)))) (setf (gethash concept (concept-instances-cache substrate)) inds) (values inds t))))))) (defmethod dl-prover-retrieve-known-concept-instances ((substrate dl-prover-substrate) concept) (with-critical-section (gethash concept (known-concept-instances-cache substrate)))) (defmethod dl-prover-individual-instance-p ((substrate dl-prover-substrate) ind concept) (with-critical-section (multiple-value-bind (val foundp) (gethash (list ind concept) (individual-instance-cache substrate)) (if foundp (values val t) (unless *told-information-reasoning-p* (let ((res (if (eq concept +individual-exists-concept+) (dl-individual-p substrate ind (abox substrate)) (dl-individual-instance-p substrate ind concept (abox substrate))))) (setf (gethash (list ind concept) (individual-instance-cache substrate)) res) (values res t))))))) (defmethod dl-prover-constraint-entailed-p ((substrate dl-prover-substrate) constraint) (with-critical-section (multiple-value-bind (val foundp) (gethash constraint (constraint-entailed-cache substrate)) (if foundp (values val t) (unless *told-information-reasoning-p* (let ((res (dl-constraint-entailed-p substrate constraint (abox substrate)))) (setf (gethash constraint (constraint-entailed-cache substrate)) res) (values res t))))))) (defmethod dl-prover-retrieve-individual-attribute-fillers ((substrate dl-prover-substrate) ind attribute) (with-critical-section (multiple-value-bind (val foundp) (gethash (list ind attribute) (individual-attribute-fillers-cache substrate)) (if foundp (values val t) (unless *told-information-reasoning-p* (let ((fillers (dl-retrieve-individual-attribute-fillers substrate ind attribute (abox substrate)))) (setf (gethash (list ind attribute) (individual-attribute-fillers-cache substrate)) fillers) (values fillers t))))))) (defmethod dl-prover-all-role-assertions-for-individual-in-range ((substrate dl-prover-substrate) ind) (with-critical-section (multiple-value-bind (val foundp) (gethash ind (role-assertions-in-range-cache substrate)) (if foundp (values val t) (unless *told-information-reasoning-p* (let ((assertions (dl-all-role-assertions-for-individual-in-range substrate ind (abox substrate)))) (setf (gethash ind (role-assertions-in-range-cache substrate)) assertions) (values assertions t))))))) (defmethod dl-prover-all-role-assertions-for-individual-in-domain ((substrate dl-prover-substrate) ind) (with-critical-section (multiple-value-bind (val foundp) (gethash ind (role-assertions-in-domain-cache substrate)) (if foundp (values val t) (unless *told-information-reasoning-p* (let ((assertions (dl-all-role-assertions-for-individual-in-domain substrate ind (abox substrate)))) (setf (gethash ind (role-assertions-in-domain-cache substrate)) assertions) (values assertions t))))))) (defmethod dl-prover-atomic-role-descendants ((substrate dl-prover-substrate) role) (with-critical-section (multiple-value-bind (val foundp) (gethash role (role-descendants-cache substrate)) (if foundp (values val t) (unless *told-information-reasoning-p* (let ((roles (dl-atomic-role-descendants substrate role (tbox substrate)))) (setf (gethash role (role-descendants-cache substrate)) roles) (values roles t))))))) (defmethod dl-prover-atomic-role-inverse ((substrate dl-prover-substrate) role) (with-critical-section (multiple-value-bind (val foundp) (gethash role (atomic-role-inverse-cache substrate)) (if foundp (values val t) (unless *told-information-reasoning-p* (let ((inv-role (dl-atomic-role-inverse substrate role (tbox substrate)))) (setf (gethash role (atomic-role-inverse-cache substrate)) inv-role) (values inv-role t))))))) (defmethod dl-prover-told-value ((substrate racer-substrate) cd-object) (with-critical-section (with-slots (told-values-cache) substrate (gethash cd-object told-values-cache)))) ;;; ;;; ;;; (defmethod dl-concept-p ((substrate racer-substrate) &rest args) (apply #'concept-p args)) #+:midelora (defmethod dl-concept-p ((substrate midelora-substrate) &rest args) t) (defmethod dl-all-atomic-concepts ((substrate racer-substrate) &rest args) (apply #'all-atomic-concepts args)) #+:midelora (defmethod dl-all-atomic-concepts ((substrate midelora-substrate) &rest args) (apply #'prover::all-atomic-concepts args)) (defmethod dl-atomic-concept-children ((substrate racer-substrate) &rest args) (apply #'atomic-concept-children args)) #+:midelora (defmethod dl-atomic-concept-children ((substrate midelora-substrate) &rest args) (apply #'prover::atomic-concept-children args)) ;;; ;;; fuer ABox Augmentation (Rules etc.) ;;; (defmethod dl-add-concept-assertion ((substrate racer-substrate) &rest args) (apply #'add-concept-assertion args)) #+:midelora (defmethod dl-add-concept-assertion ((substrate midelora-substrate) &rest args) (apply #'prover::add-concept-assertion args)) (defmethod dl-add-role-assertion ((substrate racer-substrate) &rest args) (apply #'add-role-assertion args)) #+:midelora (defmethod dl-add-role-assertion ((substrate midelora-substrate) &rest args) (apply #'prover::add-role-assertion args)) (defmethod dl-add-attribute-assertion ((substrate racer-substrate) &rest args) (apply #'add-attribute-assertion args)) (defmethod dl-add-constraint-assertion ((substrate racer-substrate) &rest args) (apply #'add-constraint-assertion args)) ;;; ;;; ;;; (defmethod dl-forget-concept-assertion ((substrate racer-substrate) &rest args) (apply #'forget-concept-assertion args)) #+:midelora (defmethod dl-forget-concept-assertion ((substrate midelora-substrate) &rest args) (apply #'prover::forget-concept-assertion args)) (defmethod dl-forget-role-assertion ((substrate racer-substrate) &rest args) (apply #'forget-role-assertion args)) #+:midelora (defmethod dl-forget-role-assertion ((substrate midelora-substrate) &rest args) (apply #'prover::forget-role-assertion args)) (defmethod dl-forget-constrained-assertion ((substrate racer-substrate) &rest args) (apply #'forget-constrained-assertion args)) (defmethod dl-forget-constraint ((substrate racer-substrate) &rest args) (apply #'forget-constraint args)) ;;; ;;; ;;; (defmethod dl-prover-forget-concept-assertion ((substrate dl-prover-substrate) &rest args) (apply #'dl-forget-concept-assertion substrate args) (substrate-needs-reset substrate)) (defmethod dl-prover-forget-role-assertion ((substrate dl-prover-substrate) &rest args) (apply #'dl-forget-role-assertion substrate args) (substrate-needs-reset substrate)) (defmethod dl-prover-forget-constrained-assertion ((substrate dl-prover-substrate) &rest args) (apply #'dl-forget-constrained-assertion substrate args) (substrate-needs-reset substrate)) (defmethod dl-prover-forget-constraint ((substrate dl-prover-substrate) &rest args) (apply #'dl-forget-constraint substrate args) (substrate-needs-reset substrate)) ;;; ;;; ;;; (defmethod dl-prover-add-concept-assertion ((substrate dl-prover-substrate) ind concept &key (to-abox-p t)) (with-critical-section (let ((assertion (list ind concept))) (when to-abox-p (dl-add-concept-assertion substrate (abox substrate) ind concept) (substrate-needs-reset substrate) ;;; die naechste Query braucht ein reintialisiertes ;;; Substrate, klar... dennoch sinnvoll mit dem ;;; veraenderten Substrate weiterzurechnen, s. ;;; mode 6 ) (with-slots (concept-assertions-cache individual-instance-cache) substrate (setf (gethash (list ind concept) (individual-instance-cache substrate)) t) (setf (gethash ind concept-assertions-cache) (cons assertion (gethash ind concept-assertions-cache))))))) (defmethod dl-prover-add-role-assertion ((substrate dl-prover-substrate) from to role &key (to-abox-p t)) (with-critical-section (let ((assertion (list (list from to) role))) (when to-abox-p (dl-add-role-assertion substrate (abox substrate) from to role) (substrate-needs-reset substrate)) (with-slots (role-assertions-in-domain-cache role-assertions-in-range-cache) substrate (setf (gethash from role-assertions-in-domain-cache) (cons assertion (gethash from role-assertions-in-domain-cache))) (setf (gethash to role-assertions-in-range-cache) (cons assertion (gethash to role-assertions-in-range-cache))))))) #+:midelora (defmethod dl-prover-add-attribute-assertion ((substrate midelora-substrate) ind object attribute &key (to-abox-p t)) (declare (ignorable ind object attribute to-abox-p)) nil) (defmethod dl-prover-add-attribute-assertion ((substrate racer-substrate) ind object attribute &key (to-abox-p t)) (with-critical-section (when to-abox-p (dl-add-attribute-assertion substrate (abox substrate) ind object attribute) (substrate-needs-reset substrate)) (with-slots (individual-attribute-fillers-cache) substrate (setf (gethash (list ind attribute) individual-attribute-fillers-cache) (cons object (gethash (list ind attribute) individual-attribute-fillers-cache)))))) #+:midelora (defmethod dl-prover-add-constraint-assertion ((substrate midelora-substrate) constraint &key (to-abox-p t)) (declare (ignorable constraint to-abox-p)) nil) (defmethod dl-prover-add-constraint-assertion ((substrate racer-substrate) constraint &key (to-abox-p t)) (with-critical-section (when to-abox-p (dl-add-constraint-assertion substrate (abox substrate) constraint) (substrate-needs-reset substrate)) (with-slots (constraints-cache) substrate (push constraint constraints-cache)))) ;;; ;;; ;;; #-:dlmaps (defmethod find-node ((substrate racer-substrate) ind &key &allow-other-keys) ind) #-:dlmaps (defmethod get-associated-substrate-node ((substrate racer-substrate) abox-ind) (find-node substrate abox-ind :error-p nil)) ;;; ;;; ;;; (defun set-tbox (substrate &key load-from-file error-p new-tbox-p tbox abox new-abox-p &allow-other-keys) (let ((tbox-name (or (convert-to-racer-tbox-name tbox (racer-package substrate)) ;;(convert-to-racer-tbox-name tbox :cl-user) (when (and abox new-abox-p) ;;; RACER-TBOXEN sind immer in cl-user! +racer-substrate-default-tbox+)))) (with-slots (tbox) substrate (setf tbox (if load-from-file (current-tbox) (when tbox-name (if new-tbox-p (progn (when (find-tbox tbox-name nil) (forget-tbox tbox-name)) (init-tbox tbox-name) tbox-name) (or (if (find-tbox tbox-name nil) tbox-name nil) (when error-p (nrql-error "Can't find TBox ~A!" tbox-name)) tbox-name)))))))) (defun set-abox (substrate &key load-from-file error-p new-abox-p abox &allow-other-keys) (let ((abox-name (convert-to-racer-abox-name abox (racer-package substrate)) ;;(convert-to-racer-abox-name abox :cl-user) )) (with-slots (abox tbox) substrate (setf abox (if load-from-file (current-abox) (when abox-name (if new-abox-p (progn (when (find-abox abox-name nil) (forget-abox abox-name)) (init-abox abox-name tbox) abox-name) (or (if (find-abox abox-name nil) abox-name nil) (when error-p (nrql-error "Can't find ABox ~A!" abox-name)) abox-name)))))))) ;;; ;;; ;;; (defmethod initialize-instance :after ((substrate racer-substrate) &rest args &key load-from-file mirror-abox-p &allow-other-keys) (declare (ignorable mirror-abox-p)) (with-critical-section (when load-from-file (let ((*package* (racer-package substrate))) (load load-from-file))) (apply #'set-tbox substrate args) (apply #'set-abox substrate args) (setf (slot-value substrate 'dbox) (or (find-dbox (tbox substrate) :error-p nil) (create-dbox (tbox substrate)))))) #+:midelora (defmethod initialize-instance :after ((substrate midelora-substrate) &rest args) (setf (slot-value substrate 'abox) substrate (slot-value substrate 'tbox) (prover::tbox substrate)) (setf (slot-value substrate 'dbox) (or (find-dbox (tbox substrate) :error-p nil) (create-dbox (tbox substrate))))) ;;; ;;; ;;; (defmethod delete-substrate :after ((substrate dl-prover-substrate) &key &allow-other-keys) (when (dbox substrate) (setf *all-dboxes* (delete (dbox substrate) *all-dboxes*)))) ;;; ;;; ;;; (defmethod is-datatype-property-some-value-p ((substrate racer-substrate) concept) (and (consp concept) (eq (first concept) 'some) (let ((qual (third concept))) (and (consp qual) (third qual) ; Wert auch wirklich vorhanden? (member (second qual) +racer-internal-datatype-property-roles+))))) #+:midelora (defmethod is-datatype-property-some-value-p ((substrate midelora-substrate) concept) (declare (ignore concept)) nil) (defmethod is-datatype-property-at-least-value-p ((substrate racer-substrate) concept) (and (consp concept) (eq (first concept) 'at-least) (let ((qual (fourth concept))) (and (consp qual) (third qual) ; Wert auch wirklich vorhanden? (member (second qual) +racer-internal-datatype-property-roles+))))) #+:midelora (defmethod is-datatype-property-at-least-value-p ((substrate midelora-substrate) concept) (declare (ignore concept)) nil) ;;; ;;; ;;; (defmethod compute-abox-mirror ((substrate dl-prover-substrate) &key &allow-other-keys) (with-critical-section (let ((ancestors (mht :test #'equal :size 1000))) (with-slots (abox tbox told-values-cache datatype-property-values-cache individual-attribute-fillers-cache role-assertions-in-domain-cache role-assertions-in-range-cache concept-assertions-cache constraint-entailed-cache individual-instance-cache) substrate (labels ((register-is-instance-of (ind concept) (if (gethash concept (known-concept-instances-cache substrate)) (push ind (gethash concept (known-concept-instances-cache substrate))) (setf (gethash concept (known-concept-instances-cache substrate)) (list ind))) (setf (gethash (list ind concept) (individual-instance-cache substrate)) t)) (rec-lookup (a &optional found) (let ((val (gethash a told-values-cache)) (found (cons a found))) (when val (if (consp val) (dolist (b val) (unless (member b found) (let ((x (rec-lookup b found))) (when x (return-from rec-lookup x))))) val)))) (register-told-value-for (a b) (let ((av (rec-lookup a)) (bv (rec-lookup b))) (if (symbolp a) (if (symbolp b) ;;; a = b (if av (setf (gethash b told-values-cache) av) (if bv (setf (gethash a told-values-cache) bv) (progn (if (gethash a told-values-cache) (push b (gethash a told-values-cache)) (setf (gethash a told-values-cache) (list b))) (if (gethash b told-values-cache) (push a (gethash b told-values-cache)) (setf (gethash b told-values-cache) (list a)))))) ;;; a = 3 (setf (gethash a told-values-cache) b)) (if (symbolp b) ;;; 3 = b (setf (gethash b told-values-cache) a) ;;; 3 = 4 )))) (register-datatype-property-value (property ind property-value concept) (if (gethash ind datatype-property-values-cache) (push property-value (gethash ind datatype-property-values-cache)) (setf (gethash ind datatype-property-values-cache) (list property-value))) ;;; also add to ABox! (when *add-role-assertions-for-datatype-properties-p* (let ((datatype-succs (mapcar #'cadar (remove-if-not #'(lambda (x) (eq (second x) property)) (dl-prover-all-role-assertions-for-individual-in-domain substrate ind))))) ;; is there a datatype successor which has the required concept assertion? ;; -> dont need to add another one! (unless (some #'(lambda (succ) (gethash (list succ concept) (individual-instance-cache substrate))) datatype-succs) (let ((new-ind (intern (format nil "~A-~A" +secret-prefix+ (incf *sym-count*)) (racer-package substrate)))) (dl-prover-add-role-assertion substrate ind new-ind property) (dl-prover-add-concept-assertion substrate new-ind concept)))))) (get-implied-concepts-for-cache (concept) (let ((concepts (or (gethash concept ancestors) (setf (gethash concept ancestors) (remove-duplicates (cons concept (cons 'top (cons '*top* (if (consp concept) (append (when (and *ensure-tbox-classification-p* (dl-tbox-classified-p substrate tbox) *classify-concepts-in-instance-assertions-p*) (append (reduce #'append (dl-atomic-concept-ancestors substrate concept tbox)) (reduce #'append (mapcar #'ensure-list (dl-atomic-concept-synonyms substrate concept tbox))))) (case (first concept) (and (reduce #'append (mapcar #'get-implied-concepts-for-cache (rest concept)))) (some (when (is-datatype-property-some-value-p substrate concept) (let ((role (second concept)) (qual (third concept))) (mapcar #'(lambda (qc) `(some ,role ,qc)) (get-implied-concepts-for-cache qual))))) (at-least (when (is-datatype-property-at-least-value-p substrate concept) (let ((role (third concept)) (qual (fourth concept)) (n (second concept))) (mapcar #'(lambda (qc) `(at-least ,n ,role ,qc)) (get-implied-concepts-for-cache qual))))) ((min max divisible not-divisible string= string<> > >= < <= <> = equal unequal) (let ((attrib (second concept))) `((an ,attrib) (a ,attrib)))) ((a an) (let ((attrib (second concept))) `((an ,attrib) (a ,attrib)))))) (when *ensure-tbox-classification-p* (unless (dl-tbox-classified-p substrate tbox) (dl-classify-tbox substrate tbox)) (append (reduce #'append (dl-atomic-concept-ancestors substrate concept tbox)) (reduce #'append (mapcar #'ensure-list (dl-atomic-concept-synonyms substrate concept tbox))))))))) :test #'equal))))) ;; (write concepts) concepts))) ;;; ;;; Start Mirroring ;;; (let ((*told-information-reasoning-p* nil) (datatype-assertions nil)) ;; (princ 1) (dolist (c (dl-prover-all-constraints substrate)) (setf (gethash c constraint-entailed-cache) t) (when (member (to-keyword (first c)) '(:= :equal :string= :boolean=)) (apply #'register-told-value-for (rest c)))) ;; (princ 2) (dolist (role (dl-prover-all-roles substrate)) (when #+:racer-server (role-p role tbox) #-:racer-server t ;; all-roles liefert mist! (dl-prover-atomic-role-descendants substrate role) (dl-prover-atomic-role-inverse substrate role))) ;; (princ 3) (dolist (ind (dl-prover-all-individuals substrate)) (setf (gethash (list ind +individual-exists-concept+) (individual-instance-cache substrate)) t) (register-is-instance-of ind 'top) (register-is-instance-of ind '*top*)) ;; (princ 4) (dolist (role-assertions (if *initial-abox-mirroring-p* (list (dl-all-annotation-role-assertions substrate abox) (dl-all-role-assertions substrate abox)) (list (dl-all-annotation-role-assertions substrate)))) (dolist (ra role-assertions) (let ((from (first (first ra))) (to (second (first ra)))) (if (gethash to role-assertions-in-range-cache) (push ra (gethash to role-assertions-in-range-cache)) (setf (gethash to role-assertions-in-range-cache) (list ra))) (if (gethash from role-assertions-in-domain-cache) (push ra (gethash from role-assertions-in-domain-cache)) (setf (gethash from role-assertions-in-domain-cache) (list ra)))))) ;; (princ 5) (dolist (aa (dl-all-attribute-assertions substrate abox)) (let* ((aa (rest aa)) (from (first aa)) (to (second aa)) (attribute (third aa)) (entry (list from attribute))) (if (gethash entry individual-attribute-fillers-cache) (push to (gethash entry individual-attribute-fillers-cache)) (setf (gethash entry individual-attribute-fillers-cache) (list to))))) ;; (princ 6) (dolist (concept-assertions (list (dl-all-annotation-concept-assertions substrate abox) (dl-all-concept-assertions substrate abox))) (dolist (ca concept-assertions) (let ((ind (first ca)) (concept (second ca))) (when (gethash (list ind +individual-exists-concept+) (individual-instance-cache substrate)) ;;; hier sollen nur die ABox-Individuen bearbeitet werden; ;;; Racer gibt unter all-annotation-concept-assertions auch ;;; Klassen-Annotation etc. zurueck! (if (gethash ind concept-assertions-cache) (push ca (gethash ind concept-assertions-cache)) (setf (gethash ind concept-assertions-cache) (list ca))) (let ((dtp-p (or (is-datatype-property-some-value-p substrate concept) (is-datatype-property-at-least-value-p substrate concept)))) (if (or *initial-abox-mirroring-p* dtp-p) (progn (when dtp-p (push ca datatype-assertions)) (let ((concepts (get-implied-concepts-for-cache concept))) (dolist (concept concepts) ; orig. concept ist in (get-implied-...) enthalten! (register-is-instance-of ind concept)))) (register-is-instance-of ind concept))))))) ;; (princ 7) (dolist (da datatype-assertions) (let ((ind (first da)) (concept (second da))) ;;; ;;; Datatype-Property Encoding of Racer ;;; (cond ((is-datatype-property-some-value-p substrate concept) (let* ((property (second concept)) (internal-attribute (second (third concept))) (property-value (list property (third (third concept))))) (declare (ignorable internal-attribute)) ;;; e.g. ;;; (SOME |http://www.owl-ontologies.com/unnamed.owl#age| ;;; (EQUAL RACER-INTERNAL%HAS-INTEGER-VALUE 35)) (register-datatype-property-value property ind property-value (third concept)))) ((is-datatype-property-at-least-value-p substrate concept) (let* ((property (third concept)) (internal-attribute (second (fourth concept))) (property-value (list property (third (fourth concept))))) (declare (ignorable internal-attribute)) ;;; e.g. ;;; (AT-LEAST 3 |http://www.owl-ontologies.com/unnamed.owl#id| ;;; (EQUAL RACER-INTERNAL%HAS-INTEGER-VALUE 35)) (register-datatype-property-value property ind property-value (fourth concept))))))))))))) (defmethod initialize-instance :after ((substrate tbox-mirror-substrate) &rest args &key &allow-other-keys) (declare (ignorable args)) (setf (slot-value substrate 'mirror-of-tbox) (tbox substrate)) ;; (setf (saved-state-vector substrate) ;; (get-state-vector substrate)) ) (defmethod compute-tbox-mirror ((substrate tbox-mirror-substrate)) (with-critical-section (with-slots (abox tbox mirror-of-tbox role-descendants-cache atomic-role-inverse-cache concept-instances-cache ;; constraints-cache abox-individuals-cache concept-assertions-cache role-assertions-in-range-cache role-assertions-in-domain-cache individual-instance-cache individual-attribute-fillers-cache) substrate (let* ((package #-:midelora (racer-package substrate) #+:midelora (find-package :prover)) (has-child-role (change-package-of-description 'has-child package)) (has-parent-role (change-package-of-description 'has-parent package)) (has-descendant-role (change-package-of-description 'has-descendant package)) (has-ancestor-role (change-package-of-description 'has-ancestor package))) (let ((concepts (cons #-:midelora '(racer::*top* racer::top) #+:midelora '(prover::top) (cons #-:midelora '(racer::*bottom* racer::bottom) #+:midelora '(prover::bottom) (remove nil (mapcar #'(lambda (x) (let ((x (ensure-list x))) (remove-if #'(lambda (x) (case (to-keyword x) ((:bottom :*bottom* :top :*top*) t) (otherwise (not (dl-concept-p substrate x tbox))))) x))) (dl-all-atomic-concepts substrate tbox))))))) (setf abox-individuals-cache (mapcar #'first concepts)) (dolist (concept concepts) (let ((name (first concept))) (setf (gethash (list name +individual-exists-concept+) individual-instance-cache) t) (setf (gethash (list name name) individual-instance-cache) t) (setf (gethash name concept-assertions-cache) (list name)) (dolist (equi concept) (push equi (gethash name concept-assertions-cache)) (setf (gethash (list name equi) individual-instance-cache) t) (dolist (concept2 concepts) (unless (equal concept concept2) (dolist (equi concept2) (setf (gethash (list name equi) individual-instance-cache) nil)))) (setf (gethash equi concept-instances-cache) (list name))) (let* ((children (remove-if-not #'(lambda (x) (dl-concept-p substrate x tbox)) (mapcar #'first (dl-atomic-concept-children substrate name tbox)))) ;; Annahme: der erste Name in der Liste der Synonyme ist ;; immer der Knotenname (Reihenfolge der Synonyme wie bei ;; all-atomic-concepts angenommen!) (from-assertions (mapcar #'(lambda (child) (list (list name child) has-child-role)) children))) (setf (gethash name role-assertions-in-domain-cache) from-assertions) (dolist (assertion from-assertions) (let ((child (second (first assertion)))) (if (gethash child role-assertions-in-range-cache) (push assertion (gethash child role-assertions-in-range-cache)) (setf (gethash child role-assertions-in-range-cache) (list assertion))))))))) ;(set-tbox substrate :tbox 'default :new-tbox-p nil) ;(set-abox substrate :abox 'default :new-abox-p nil) (setf tbox nil abox nil) (setf (gethash has-parent-role role-descendants-cache) (list has-parent-role)) (setf (gethash has-child-role role-descendants-cache) (list has-child-role)) (setf (gethash has-descendant-role role-descendants-cache) (list has-descendant-role has-child-role)) (setf (gethash has-ancestor-role role-descendants-cache) (list has-ancestor-role has-parent-role)) (setf (transitive-roles-cache substrate) (list has-descendant-role has-ancestor-role)) (dolist (pair (list (list has-parent-role has-child-role) (list has-descendant-role has-ancestor-role))) (setf (gethash (first pair) atomic-role-inverse-cache) (second pair)) (setf (gethash (second pair) atomic-role-inverse-cache) (first pair))))))) ;;; ;;; ;;; (defmethod convert-to-dl-prover-individual-name ((substrate racer-substrate) ind) (convert-to-racer-individual-name ind (racer-package substrate))) #+:midelora (defmethod convert-to-dl-prover-individual-name ((substrate midelora-substrate) ind) (change-package-of-description ind (find-package :prover))) (defmethod convert-to-dl-prover-attribute-expression ((substrate racer-substrate) attrib) (convert-to-racer-attribute-expression attrib (racer-package substrate)))
63,060
Common Lisp
.lisp
1,173
38.821824
142
0.588527
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
145ce23564dd2fdb4a56377800732f5ff7c27b91de52ec7dafec3e884c2daa25
12,506
[ -1 ]
12,507
jepd-substrate4.lisp
lambdamikel_DLMAPS/src/thematic-substrate/jepd-substrate4.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) ;;; ;;; ;;; (defgeneric compute-minimal-edge-label (rolebox-edge &key &allow-other-keys)) (defgeneric label-minimal-p (jepd-substrate &key &allow-other-keys)) (defgeneric compute-minimal-label (jepd-substrate &key &allow-other-keys)) (defgeneric add-missing-edges (jepd-substrate &key nodes &allow-other-keys)) ;;; ;;; ;;; (defpersistentclass jepd-node-description (rolebox-node-description)) (defpersistentclass jepd-edge-description (rolebox-edge-description)) (defpersistentclass jepd-substrate (rolebox-substrate)) (defpersistentclass jepd-substrate-node (rolebox-substrate-node)) (defpersistentclass jepd-substrate-edge (rolebox-substrate-edge)) (defun jepd-substrate-edge-p (edge) (typep edge 'jepd-substrate-edge)) (defun jepd-substrate-node-p (edge) (typep edge 'jepd-substrate-node)) ;;; ;;; ;;; (defmethod get-standard-node-description-class ((substrate jepd-substrate)) 'jepd-node-description) (defmethod get-standard-edge-description-class ((substrate jepd-substrate)) 'jepd-edge-description) (defmethod get-standard-edge-class ((substrate jepd-substrate)) 'jepd-substrate-edge) (defmethod get-standard-node-class ((substrate jepd-substrate)) 'jepd-substrate-node) ;;; ;;; ;;; ;;; ;;; ;;; (defmethod initialize-instance :after ((substrate jepd-substrate) &rest initargs &key (rbox *cur-rbox*)) (unless (typep (find-rbox rbox) 'jepd-rolebox) (error "Give me a JEPD-rolebox!"))) ;;; ;;; ;;; (defmethod create-node ((substrate jepd-substrate) (name symbol) (description jepd-node-description) &rest args) (apply #'make-node substrate :name name :description description args)) (defmethod make-node ((substrate jepd-substrate) &rest args) (apply #'call-next-method substrate args)) (defmethod create-edge ((substrate jepd-substrate) (from jepd-substrate-node) (to jepd-substrate-node) (description jepd-edge-description) &rest args) (apply #'make-edge substrate from to :description description args)) (defmethod make-edge ((substrate jepd-substrate) (from jepd-substrate-node) (to jepd-substrate-node) &rest args &key (error-p t) description (create-inverse-p t) copy-p &allow-other-keys) (let ((edges (get-edges-between substrate from to :error-p nil))) (when (and error-p edges) (error "~A is a JEPD substrate! Edge between ~A and ~A already exists!" substrate from to)) (let ((edge (apply #'call-next-method substrate from to :description description :create-inverse-p nil args))) (when (and (not copy-p) create-inverse-p) (cond ((eq from to) ;;; nur beim JEPD-Substrate kann ich sicher ;;; sein, dass die Inverse die Kante selbst ist! ;;; ansonsten können nämlich die Beschreibungen ;;; an den Kanten differieren, bzw. werden ;;; gebraucht, um eine Inkonsistenz festzustellen ;;; z.B. (1,1) : PP -> (1,1) : PPI (with-slots (inverse-edge) edge (setf inverse-edge edge))) (t (with-slots (rbox) substrate (when rbox (let* ((inv-description (make-inverse-description rbox description))) (when inv-description (let* ((iedge (apply #'make-edge substrate to from :description inv-description :create-inverse-p nil args))) (with-slots (inverse-edge) iedge (setf inverse-edge edge)) (with-slots (inverse-edge) edge (setf inverse-edge iedge)))))))))) edge))) ;;; ;;; ;;; (defmethod delete-edge ((substrate jepd-substrate) (edge jepd-substrate-edge) &rest args &key (delete-inverse-p t) (error-p t) &allow-other-keys) (apply #'call-next-method substrate edge :delete-inverse-p (and delete-inverse-p (not (reflexive-edge-p edge))) :error-p error-p args)) ;;; ;;; ;;; (defmethod get-implied-label ((edge jepd-substrate-edge) &key (edges (get-edges (in-graph edge))) &allow-other-keys) (with-slots (rbox) (in-graph edge) (with-marked-objects (edges) (let ((comps nil) (support (get-support edge))) (dolist (supp support) (let ((r (first supp)) (s (second supp))) (when (and (marked-p r) (marked-p s)) (push (lookup rbox r s) comps)))) ;;; make-and-description liefert nil, wenn equivalent zu *bottom* (let* ((descriptions (cons (description edge) (mapcar #'(lambda (comp) (change-textual-description (copy (description edge)) comp)) comps))) (label (make-and-description (first descriptions) :descriptions (rest descriptions)))) (if (inconsistent-p label) (values nil support) label)))))) (defmethod consistent-p ((substrate jepd-substrate) &key (check-node-labels-p t) (check-edge-labels-p t) (edges (get-edges substrate)) strict-p &allow-other-keys) (and (=> check-node-labels-p (every #'consistent-p (get-nodes substrate))) (=> check-edge-labels-p (every #'consistent-p (get-edges substrate)) ) (=> strict-p ;;; zw. jedem Paar Knoten genau eine Kante? (every #'(lambda (i) (every #'(lambda (j) (let ((e (get-edges-between substrate i j))) (and e (not (cdr e))))) (get-nodes substrate))) (get-nodes substrate))) (every #'get-implied-label edges))) (defmethod compute-minimal-label ((substrate jepd-substrate) &key (edges (get-edges substrate)) &allow-other-keys) (let ((change t)) (loop while change do (setf change nil) (dolist (edge edges) (multiple-value-bind (new-label support) (get-implied-label edge :edges edges) (if (not new-label) (return-from compute-minimal-label (values nil support)) (setf change (not (implies-p (description edge) new-label)) (description edge) new-label))))) substrate)) (defmethod add-missing-edges ((substrate jepd-substrate) &key (edge-constructor #'(lambda (from to) (create-edge substrate from to (make-edge-description (get-standard-edge-description-class substrate) (full-disjunctive-role (substrate-rbox substrate))) :create-inverse-p t))) &allow-other-keys) (dolist (from-to-pair (get-missing-edges substrate :loops-p nil :inverses-p nil)) (apply edge-constructor from-to-pair)) substrate) (defmethod apply-rolebox-axioms ((substrate jepd-substrate) &rest args &key &allow-other-keys) (apply #'add-missing-edges substrate args) (compute-minimal-label substrate)) ;;; ;;; ;;; (defmethod eq-edge-p ((edge jepd-substrate-edge)) (equal '(eq) (textual-description (description edge)))) (defmethod eq-collapse ((substrate jepd-substrate)) (let ((eq-edges (remove-if #'reflexive-edge-p (remove-if-not #'eq-edge-p (get-edges substrate))))) (loop while eq-edges do (let ((edge (first eq-edges))) (setf eq-edges (delete edge eq-edges)) (setf eq-edges (delete (inverse-edge edge) eq-edges)) (join-nodes (from edge) (to edge)))) substrate)) (defmethod join-nodes ((a jepd-substrate-node) (b jepd-substrate-node)) (unless (eq (in-graph a) (in-graph b)) (error "Nodes are not in same graph!")) (let ((description (make-and-description (description a) :descriptions (list (description b)))) (graph (in-graph a))) (delete-node graph b) (change-description a description))) ;;; ;;; Prädikate ;;; (defmethod label-minimal-p ((substrate jepd-substrate) &key &allow-other-keys) (every #'(lambda (edge) (let ((impl (get-implied-label edge))) (and impl (equivalent-p impl (description edge))))) (get-edges substrate))) #| (with-rbox (test-box :type jepd-rolebox :roles (r eq) :delete-if-exists-p t :inverse-roles ((r r)) :delete-if-exists-p t ;:reflexive-roles (eq) :axioms ((r r r) (r eq r) (eq eq eq) (eq r r))) (with-substrate (hello :type 'jepd-substrate :delete-if-exists-p t) (setf *x* *cur-substrate*) (node a (ncon a-descr)) (node b (ncon b-descr)) (node c (ncon c-descr)) (edge a b (econ r)) (edge b c (econ r)) ;(edge a c (econ r)) (princ (label-minimal-p *cur-substrate*)) (terpri) ;(add-missing-edges *cur-substrate*) ;; (princ (label-minimal-p *cur-substrate*)) ;(compute-minimal-label *cur-substrate*) ;(princ (label-minimal-p *cur-substrate*)) (apply-rolebox-axioms *cur-substrate*) (visualize *cur-substrate*))) (with-rbox (rcc5-rolebox) (with-substrate (test :type 'jepd-substrate :delete-if-exists-p t) (setf *x* *cur-substrate*) (node a (ncon a)) (node b (ncon b)) (node c (ncon c)) (edge a b (econ pp)) (edge b c (econ pp)) (apply-rolebox-axioms *cur-substrate*) (add-missing-edges *x*) (compute-minimal-label *x*) (visualize *x*))) (with-rbox (rcc5-rolebox) (with-substrate (hello :type 'jepd-substrate :delete-if-exists-p t) (setf *x* *cur-substrate*) (node n0 (ncon 0)) (node n1 (ncon 1)) (node n2 (ncon 2)) (node n3 (ncon 3)) (edge n0 n1 (econ ppi)) (edge n0 n2 (econ ppi)) (edge n1 n3 (econ ppi)) (edge n1 n2 (econ ppi)) (edge n2 n3 (econ pp)) (apply-rolebox-axioms *cur-substrate*) (break "~A" (consistent-p *cur-substrate*)) (visualize *cur-substrate*))) (with-rbox (rcc5-rolebox) (with-substrate (hello :type 'jepd-substrate :delete-if-exists-p t) (node a (ncon a-descr)) (node b (ncon b-descr)) (node c (ncon c-descr)) (setf *x* *cur-substrate*) (edge a b (econ pp)) (edge b c (econ pp)) (add-missing-edges *cur-substrate*) (compute-minimal-label *cur-substrate*) (visualize *cur-substrate*))) (with-rbox (rcc5-rolebox) (with-substrate (hello :type 'jepd-substrate :delete-if-exists-p t) (node a (ncon a-descr)) (node b (ncon b-descr)) (node c (ncon c-descr)) (setf *x* *cur-substrate*) (edge a b (econ pp)) (edge a c (econ (pp dr))) (edge b c (econ pp)) (compute-minimal-label *x*) (visualize *x*))) (with-rbox (rcc8-rolebox) (with-substrate (hello :type 'jepd-substrate :delete-if-exists-p t) (node u (ncon c-descr)) (node y (ncon b-descr)) (node z (ncon c-descr)) (setf *x* *cur-substrate*) (edge y z (econ ec)) (edge y u (econ po)) (edge z u (econ (tpp ntpp))) (add-missing-edges *x*) ;(scramble *x*) (compute-minimal-label *x*) (princ (consistent-p *x* :strict-p t)) (visualize *x*))) (with-rbox (rcc8-rolebox) (with-substrate (hello :type 'jepd-substrate :delete-if-exists-p t) (node a (ncon a)) (node b (ncon b)) (node c (ncon c)) (node d (ncon d)) (node e (ncon e)) (node f (ncon f)) (node g (ncon g)) (setf *x* *cur-substrate*) (edge a b (econ tpp)) (edge a c (econ tpp)) (edge c d (econ tpp)) (edge b d (econ tpp)) (edge a d (econ ntpp)) (edge d f (econ ntpp)) (edge d e (econ tpp)) (edge d g (econ tpp)) (edge e f (econ tpp)) (edge g f (econ tpp)) (edge c b (econ po)) (edge g e (econ po)) (edge b e (econ ntpp)) (edge c g (econ ntpp)) (edge a g (econ ntpp)) (edge a e (econ ntpp)) (add-missing-edges *x*) ;(scramble *x*) (compute-minimal-label *x*) (let ((completions (get-all-atomic-configurations *x* :final-check-fn #'consistent-p :how-many 1000))) (visualize completions)))) (with-rbox (rcc8-rolebox) (with-substrate (hello :type 'jepd-substrate :delete-if-exists-p t) (node a (ncon a)) (node b (ncon b)) (node c (ncon c)) (edge a b (econ eq)) (edge a c (econ po)) (setf *x* *cur-substrate*) (add-missing-edges *x*) (compute-minimal-label *x*) (visualize (list *x* (eq-collapse (copy *x*)))))) (with-rbox (rcc5-rolebox) (with-substrate (test :type 'jepd-substrate :delete-if-exists-p t) (setf *x* *cur-substrate*) (node a (ncon a)) (node b (ncon b)) (node c (ncon c)) (node d (ncon d)) (edge a b (econ pp)) (edge b c (econ pp)) (edge b d (econ dr)) ;(apply-rolebox-axioms *cur-substrate*) ;(add-missing-edges *x*) ;(compute-minimal-label *x*) (visualize (list *x* (let ((x (copy *x*))) (add-missing-edges x) x) (let ((x (copy *x*))) (apply-rolebox-axioms x) x))))) |#
14,870
Common Lisp
.lisp
371
28.797844
116
0.548307
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
90036de0840dc8a0c7833e14620cd49206c277c76f4bf2a26b58b35162ccfab5
12,507
[ -1 ]
12,508
racer-conversions3.lisp
lambdamikel_DLMAPS/src/thematic-substrate/racer-conversions3.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) #+(and :midelora (not :dlmaps)) (defun nrql-error (&rest args) (apply #'error args)) (defconstant +racer-cd-predicates+ '(:min :max :divisible :not-divisible :string= :string<> :> :>= :< :<= :<> := :equal :unequal :boolean= :boolean<>)) ;;; ;;; Diese Funktionen bestimmen, was letztlich zum RACER-Server gesendet wird!!! ;;; (defun convert-to-racer-individual-name (expr &optional package) (normalize-name (if package (change-package-of-description expr #-:dlmaps package #+:dlmaps (or package :cl-user)) expr))) (defun convert-to-racer-tbox-name (expr &optional package) (normalize-name (if package (change-package-of-description expr #-:dlmaps package #+:dlmaps (or package :cl-user)) expr))) (defun convert-to-racer-abox-name (expr &optional package) (normalize-name (if package (change-package-of-description expr #-:dlmaps package #+:dlmaps (or package :cl-user)) expr))) (defun convert-to-racer-role-expression (expr &optional package) (normalize-racer-role (if package (change-package-of-description expr package) expr))) (defun convert-to-racer-attribute-expression (expr &optional package) (if package (change-package-of-description expr package) expr)) (defun convert-to-racer-concept-expression (expr &optional package) (normalize-racer-concept (if package (change-package-of-description expr package) expr))) (defun convert-to-racer-constraint-expression (expr &optional package) (if package (change-package-of-description expr package) expr)) ;;; ;;; ;;; (defun normalize-racer-concept (concept) (labels ((do-it (concept) (if (consp concept) (let ((op (intern (format nil "~A" (first concept)) :keyword)) (rel-op (first concept))) (case op ((:not) `(,rel-op ,(do-it (second concept)))) ((:or :and) `(,rel-op ,@(mapcar #'do-it (rest concept)))) ((:some :all) `(,rel-op ,(normalize-racer-role (second concept)) ,(do-it (third concept)))) ((:at-least :at-most :exactly) `(,rel-op ,(second concept) ,(normalize-racer-role (third concept)) ,@(when (fourth concept) (list (do-it (fourth concept)))))) ((:a :an :no) `(,rel-op ,(second concept))) ((:min :max :divisible :not-divisible :string= :string<> :boolean= :boolean<> :> :>= :< :<= :<> := :equal :unequal) concept) (otherwise #-:dlmaps (nrql-error "Parser error: what is ~A?" concept) #+:dlmaps (error "Parser error: what is ~A?" concept)))) concept))) (do-it concept))) (defun is-valid-racer-concept-expression-p (concept &key (tbox nil tbox-supplied-p)) (labels ((do-it (concept) (or (and concept (symbolp concept)) (and (consp concept) (let ((op (intern (format nil "~A" (first concept)) :keyword))) (case op ((:or :and :not) (do-it (second concept))) ((:all :some) (and (if tbox-supplied-p (is-valid-racer-role-expression-p (second concept) :tbox tbox) (is-valid-racer-role-expression-p (second concept))) (do-it (third concept)))) ((:at-least :at-most :exactly) (and (if tbox-supplied-p (is-valid-racer-role-expression-p (third concept) :tbox tbox) (is-valid-racer-role-expression-p (third concept))) (=> (fourth concept) (do-it (fourth concept))))) ((:a :an :no) (if tbox-supplied-p (is-valid-racer-attribute-expression-p (second concept) :tbox tbox) (is-valid-racer-attribute-expression-p (second concept)))) ((:min :max :divisible :not-divisible) (and (if tbox-supplied-p (is-valid-racer-attribute-expression-p (second concept) :tbox tbox) (is-valid-racer-attribute-expression-p (second concept))) (integerp (third concept)))) ((:string= :string<>) (and (if tbox-supplied-p (is-valid-racer-attribute-expression-p (second concept) :tbox tbox) (is-valid-racer-attribute-expression-p (second concept))) (or (if tbox-supplied-p (is-valid-racer-attribute-expression-p (third concept) :tbox tbox) (is-valid-racer-attribute-expression-p (third concept))) (stringp (third concept))))) ((:boolean= :boolean<>) (and (if tbox-supplied-p (is-valid-racer-attribute-expression-p (second concept) :tbox tbox) (is-valid-racer-attribute-expression-p (second concept))) (or (if tbox-supplied-p (is-valid-racer-attribute-expression-p (third concept) :tbox tbox) (is-valid-racer-attribute-expression-p (third concept))) (member (third concept) '(#T #F))))) ((:> :>= :< :<= :<> := :equal :unequal) (and (is-valid-racer-aexpr-p (second concept)) (is-valid-racer-aexpr-p (third concept)))) (otherwise nil))))))) (do-it concept))) (defun is-valid-racer-constraint-expression-p (expr) (declare (ignorable expr)) #| (member (intern (format nil "~a" expr) :keyword) '(:> :>= :< :<= :<> := :equal :unequal :string= :string<> :min :max :divisible :not-divisible)) |# t) ;;; ;;; ;;; (defun normalize-racer-role (role) (labels ((do-it (role &key negated-p inverse-p) (if (symbolp role) (if (not negated-p) (if (not inverse-p) role `(inv ,role)) (if (not inverse-p) `(not ,role) `(not (inv ,role)))) (if (not (cdr role)) (do-it (car role) :negated-p negated-p :inverse-p inverse-p) (ecase (first role) (inv (do-it (second role) :negated-p negated-p :inverse-p (not inverse-p))) (not (do-it (second role) :negated-p (not negated-p) :inverse-p inverse-p))))))) (do-it role))) (defun is-valid-racer-datatype-role-expression-p (role &key (tbox nil tbox-supplied-p) check-p) (and (if tbox-supplied-p (is-valid-racer-role-expression-p role :check-p check-p :tbox tbox) (is-valid-racer-role-expression-p role :check-p check-p)) (if tbox-supplied-p (role-used-as-datatype-property-p role tbox) (role-used-as-datatype-property-p role (current-tbox))))) (defun is-valid-racer-role-expression-p (role &key allow-negated-roles-p (tbox nil tbox-supplied-p) check-p) (labels ((do-it (role) (or (and role (symbolp role) ;; (=> check-p ;; (role-p role)) (=> (and check-p (if tbox-supplied-p (role-p role tbox) (role-p role))) (not (if tbox-supplied-p (cd-attribute-p role tbox) (cd-attribute-p role))))) (when (consp role) (let ((first (intern (format nil "~A" (first role)) :keyword))) (case first (:not (and allow-negated-roles-p (do-it (second role)))) (:inv (do-it (second role))) (otherwise nil))))))) (do-it role))) (defun is-valid-racer-attribute-expression-p (role &key check-p (tbox nil tbox-supplied-p)) (and role (symbolp role) (=> check-p (if tbox-supplied-p (cd-attribute-p role tbox) (cd-attribute-p role))))) (defun is-valid-racer-aexpr-p (aexpr) (declare (ignore aexpr)) ; ist mir zu kompliziert das zu checken, ist eh eigentlich unnoetig... t) (defun negated-racer-role-p (role) ;;; Annahme: role ist valid-racer-role-expression-p (and (consp role) (eq (intern (format nil "~A" (first role)) :keyword) :not))) ;;; ;;; ;;; (defun normalize-name (name) (if (symbolp name) name (if (not (cdr name)) (car name) #-:dlmaps (nrql-error "Parser error: bad name ~A" name) #+:dlmaps (error "Parser error: bad name ~A" name)))) ;;; ;;; ;;; (defun racer-nnf (concept &optional negate-p) (if (consp concept) (let ((op (intern (format nil "~A" (first concept)) :keyword))) (case op ((:not) (racer-nnf (second concept) (not negate-p))) (:and `(,(if negate-p 'or 'and) ,@(mapcar #'(lambda (x) (racer-nnf x negate-p)) (rest concept)))) (:or `(,(if negate-p 'and 'or) ,@(mapcar #'(lambda (x) (racer-nnf x negate-p)) (rest concept)))) (:all `(,(if negate-p 'some 'all) ,(second concept) ,(racer-nnf (third concept) negate-p))) (:some `(,(if negate-p 'all 'some) ,(second concept) ,(racer-nnf (third concept) negate-p))) (:at-least (let ((n (second concept))) (if (not negate-p) (if (zerop (1- n)) `(some ,(third concept) ,(or (racer-nnf (fourth concept) nil) 'top)) `(at-least ,(second concept) ,(third concept) ,(or (racer-nnf (fourth concept) nil) 'top))) (if (zerop (1- n)) `(all ,(third concept) ,(or (racer-nnf (fourth concept) t) 'bottom)) `(at-most ,(1- n) ,(third concept) ,(or (fourth concept) 'top)))))) (:at-most (let ((n (second concept))) (if (not negate-p) (if (zerop n) `(all ,(third concept) ,(or (racer-nnf (fourth concept) t) 'bottom)) `(at-most ,(second concept) ,(third concept) ,(or (racer-nnf (fourth concept) nil) 'top))) (if (zerop n) `(some ,(third concept) ,(or (racer-nnf (fourth concept) nil) 'bottom)) `(at-least ,(1+ n) ,(third concept) ,(or (fourth concept) 'top)))))) (:exactly (racer-nnf `(and (at-least ,@(rest concept)) (at-most ,@(rest concept))) negate-p)) ((:a :an) (if negate-p `(no ,@(rest concept)) concept)) (:no (if negate-p `(a ,@(rest concept)) concept)) (:min (if negate-p `(max ,@(rest concept)) concept)) (:max (if negate-p `(min ,@(rest concept)) concept)) (:divisible (if negate-p `(not-divisible ,@(rest concept)) concept)) (:not-divisible (if negate-p `(divisible ,@(rest concept)) concept)) (:string= (if negate-p `(string<> ,@(rest concept)) concept)) (:string<> (if negate-p `(string= ,@(rest concept)) concept)) (:boolean= (if negate-p `(boolean<> ,@(rest concept)) concept)) (:boolean<> (if negate-p `(boolean= ,@(rest concept)) concept)) (:> (if negate-p `(<= ,@(rest concept)) concept)) (:>= (if negate-p `(< ,@(rest concept)) concept)) (:< (if negate-p `(>= ,@(rest concept)) concept)) (:<= (if negate-p `(> ,@(rest concept)) concept)) (:equal (if negate-p `(unequal ,@(rest concept)) concept)) (:unequal (if negate-p `(equal ,@(rest concept)) concept)) (otherwise #-:dlmaps (nrql-error "Trying to compute NNF: what is ~A?" concept) #+:dlmaps (error "Trying to compute NNF: what is ~A?" concept)))) (if negate-p `(not ,concept) concept)))
15,666
Common Lisp
.lisp
364
24.667582
106
0.416029
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
90674e0fc5645765552495aac572de4d92851591e9dd0945a7bcc8f16c32b772
12,508
[ -1 ]
12,509
substrate7.lisp
lambdamikel_DLMAPS/src/thematic-substrate/substrate7.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) (defconstant +secret-marker+ (gensym)) (defparameter *non-determinism-p* nil) (defparameter *debug-p* nil) (defvar *all-substrates* nil) (defvar *cur-substrate* nil) ;;; ;;; Vorgesehenes Interface ;;; (defgeneric create-substrate (name &rest args &key delete-if-exists-p type &allow-other-keys)) (defgeneric delete-substrate (substrate-specifier &key &allow-other-keys)) (defgeneric find-substrate (substrate-specifier &key &allow-other-keys)) (defgeneric consistent-p (substrate &key &allow-other-keys)) (defgeneric inconsistent-p (substrate &key &allow-other-keys)) ;;; ;;; ;;; (defgeneric get-missing-edges (substrate &key nodes loops-p inverses-p &allow-other-keys)) (defgeneric get-underspecified-edges (substrate &key satisfying use-aux-description-p &allow-other-keys)) ;;; ;;; ;;; (defgeneric simplify (substrate &key error-p &allow-other-keys)) (defgeneric scramble (substrate &key nodes)) ;;; ;;; Für Macros "in-substrate" und "with-substrate" ;;; (defgeneric establish-context-for (substrate continuation)) (defgeneric set-context-for (substrate) (:method-combination progn)) ;;; ;;; ;;; (defgeneric get-standard-node-class (substrate)) (defgeneric get-standard-edge-class (substrate)) (defgeneric get-standard-node-description-class (substrate)) (defgeneric get-standard-edge-description-class (substrate)) ;;; ;;; ;;; (defgeneric implies-p (substrate-object-a substrate-object-b &key use-aux-description-p &allow-other-keys)) (defgeneric equivalent-p (substrate-object-a substrate-object-b &key use-aux-description-p &allow-other-keys)) ;;; ;;; Knoten ;;; (defgeneric create-node (substrate name node-description &key aux-description error-p delete-if-exists-p type &allow-other-keys)) (defgeneric add-to-node (substrate node-specifier delta-description &key error-p &allow-other-keys)) ;;; ;;; Kanten ;;; (defgeneric create-edge (substrate node-specifier-from node-specifier-to edge-description &key aux-description error-p type &allow-other-keys)) (defgeneric equivalent-edge-present-p (substrate node-spec-from node-spec-to edge-description &key use-aux-description-p &allow-other-keys)) (defgeneric reflexive-edge-p (edge)) (defgeneric underspecified-p (edge &key use-aux-description-p &allow-other-keys)) (defgeneric get-disjuncts (edge &key use-aux-description-p &allow-other-keys)) (defgeneric inverse-edge (edge)) ;;; ;;; Various Stuff ;;; (defgeneric subgraph-isomorphic-p (substratea substrateb &key nodes-a nodes-b permutations-p edges-equivalent-fn nodes-equivalent-fn)) (defgeneric isomorphic-p (substratea substrateb &key nodes-a nodes-b permutations-p edges-equivalent-fn nodes-equivalent-fn)) (defgeneric has-next-configuration-p (substrate &key restart-from)) (defgeneric enumerate-atomic-configurations (substrate &key restart-from how-many edges sym-gen selector-fn manager-fn final-check-f construction-check-fn fn &allow-other-keys)) (defgeneric get-all-atomic-configurations (substrate &key &allow-other-keys)) ;;; ;;; Handling of the "aux description" ;;; (defgeneric save-current-description (substrate &key edges nodes save-node-labels-p save-edge-labels-p &allow-other-keys)) (defgeneric pop-description-stack (substrate &key edges nodes &allow-other-keys)) ;;; ;;; Das Basis-Substrate verwaltet lediglich Knoten und Kanten; ;;; Knoten müssen eindeutigen Namen tragen; beliebig viele Kanten ;;; zwischen zwei Knoten werden unterstützt. Knoten kennen ihre ;;; Nachfolger- und Vorgängerknoten. ;;; Kanten tragen "edge-descriptions", Knoten "node-descriptions"; ;;; abstrakte Retrieval-Operation und eine "matches-p"-Operation ;;; sind vorgesehen. Das Substrate weiß nichts über inverse und ;;; reflexive Kanten etc. S. Rolebox-Substrate-Unterklasse. ;;; (defpersistentclass substrate (graph) ((node-table :reader node-table :initform (let ((table (make-hash-table :size 1000 :rehash-size 1000))) ;(hcl:set-hash-table-weak table :both) table)) (edge-table :reader edge-table :initform (let ((table (make-hash-table :size 10000 :rehash-size 10000 :test #'equal))) ;(hcl:set-hash-table-weak table :key) table)) (cached-nodes :reader cached-nodes :initform nil :not-persistent) (cached-edges :reader cached-edges :initform nil :not-persistent) (max-counter :initform nil :accessor max-counter) (counter :initform nil :accessor counter) (reset-p :accessor reset-p :initform t) (stack :initform nil :accessor stack) (description-stack :initform nil :accessor description-stack))) (defmethod get-nodes ((substrate substrate) &key (satisfying #'yes) (sort-p t) &allow-other-keys) (if (and (cached-nodes substrate) (equal (list satisfying sort-p) (first (cached-nodes substrate)))) (second (cached-nodes substrate)) (let ((res nil)) (with-new-marking-context (loop as node being the hash-value of (node-table substrate) when (and (not (marked-p node)) (funcall satisfying node)) do (progn (mark node) (push node res))) (unmark res)) (when sort-p (setf res (sort res #'< :key #'id))) (setf (slot-value substrate 'cached-nodes) (list (list satisfying sort-p) res)) res))) #| (defmethod get-edges ((substrate substrate) &rest args) (loop as val being the hash-value of (edge-table substrate) collect val)) |# (defmethod get-edges ((substrate substrate) &key exclude-loops-p exclude-inverses-p (satisfying #'yes) &allow-other-keys) (if (and (cached-edges substrate) (equal (list exclude-loops-p exclude-inverses-p satisfying) (first (cached-edges substrate)))) (second (cached-edges substrate)) (let ((res nil)) (with-new-marking-context (loop as edge being the hash-value of (edge-table substrate) when (and (not (consp edge)) (not (marked-p edge)) (=> (and exclude-inverses-p (inverse-edge edge)) (< (id (from edge)) (id (to edge)))) ;;; notwendige Sonderbehandlung für ;;; reflexive Kanten, die nicht selbst-invers ;;; sind (wegen unterschiedlicher Beschreibungen z.B.) (=> (and exclude-inverses-p (eq (from edge) (to edge)) (inverse-edge edge)) (not (marked-p (inverse-edge edge)))) (=> exclude-loops-p (not (reflexive-edge-p edge))) (funcall satisfying edge)) do (progn (mark edge) (push edge res))) (unmark res)) (setf (slot-value substrate 'cached-edges) (list (list exclude-loops-p exclude-inverses-p satisfying) res)) res))) (defmacro loop-over-nodes ((var substrate) &body body) `(maphash #'(lambda (key ,var) (declare (ignorable ,var)) (when (integerp key) ,@body)) (node-table ,substrate))) (defmacro loop-over-edges ((var substrate) &body body) `(maphash #'(lambda (key ,var) (declare (ignorable ,var)) (when (integerp key) ,@body)) (edge-table ,substrate))) ;;; ;;; ;;; (defmethod consistent-p ((substrate substrate) &key (check-node-labels-p t) (check-edge-labels-p t) &allow-other-keys) (and (=> check-node-labels-p (every #'consistent-p (get-nodes substrate))) (=> check-edge-labels-p (every #'consistent-p (get-edges substrate)) ))) (defmethod inconsistent-p ((obj substrate) &rest args) ;;; wegen Dreiwertigkeit! (eq (apply #'consistent-p obj args) nil)) ;;; ;;; ;;; (defmethod get-standard-node-class ((substrate substrate)) 'substrate-node) (defmethod get-standard-edge-class ((substrate substrate)) 'substrate-edge) (defmethod get-standard-node-description-class ((substrate substrate)) 'simple-node-description) (defmethod get-standard-edge-description-class ((substrate substrate)) 'simple-edge-description) ;;; ;;; ;;; (defun get-substrate-name (symbol-or-string) (intern (string-upcase (format nil "~A" symbol-or-string)))) (defmethod create-substrate ((name symbol) &rest args &key (type 'substrate) &allow-other-keys) (apply #'make-graph type :name name args)) (defmethod create-substrate ((name string) &rest args &key (type 'substrate) &allow-other-keys) (apply #'make-graph type :name (get-substrate-name name) args)) (defmethod make-graph ((type symbol) &rest args &key (error-p t) delete-if-exists-p name copy-p &allow-other-keys) (when delete-if-exists-p (delete-graph name :all-p t :error-p nil)) (if (and (find-graph name :error-p nil) (not copy-p)) (if error-p (error "Substrate named ~A already exists!" name) (return-from make-graph nil)) (apply #'make-instance type :allow-other-keys t args))) (defmethod initialize-instance :after ((substrate substrate) &rest initargs) (push substrate *all-substrates*)) (defun all-substrates () *all-substrates*) ;;; ;;; ;;; (defmethod establish-context-for ((substrate substrate) continuation) (let ((*node-description-class* (get-standard-node-description-class *cur-substrate*)) (*edge-description-class* (get-standard-edge-description-class *cur-substrate*))) (if (next-method-p) (call-next-method) (funcall continuation)))) (defmethod set-context-for progn ((substrate substrate)) (setf *node-description-class* (get-standard-node-description-class *cur-substrate*) *edge-description-class* (get-standard-edge-description-class *cur-substrate*))) ;;; ;;; ;;; (defmacro with-substrate* ((name &rest args &key all-args (delete-if-exists-p t) &allow-other-keys) &rest body) `(let ((*cur-substrate* (or (let ((found (find-substrate ,name))) (if found (if ,delete-if-exists-p nil found) nil)) ,(if all-args `(apply #'create-substrate ,name ,all-args) `(create-substrate ,name ,@args))))) (establish-context-for *cur-substrate* #'(lambda () ,@body)))) (defmacro with-substrate ((name &rest args) &rest body) `(with-substrate* ( (quote ,name) ,@args) ,@body)) ;;; ;;; ;;; (defmacro in-substrate* (name &rest args &key all-args delete-if-exists-p &allow-other-keys) `(progn (setf *cur-substrate* (or (let ((found (find-substrate ,name))) (if found (if ,delete-if-exists-p nil found) nil)) ,(if all-args `(apply #'create-substrate ,name ,all-args) `(create-substrate ,name ,@args)))) (set-context-for *cur-substrate*) *cur-substrate*)) (defmacro in-substrate (name &rest args) `(in-substrate* (quote ,name) ,@args)) (defun in-substrate-fn (name &rest args &key all-args delete-if-exists-p &allow-other-keys) (progn (setf *cur-substrate* (or (let ((found (find-substrate name))) (if found (if delete-if-exists-p nil found) nil)) (if all-args (apply #'create-substrate name all-args) (apply #'create-substrate name args)))) (set-context-for *cur-substrate*) *cur-substrate*)) ;;; ;;; ;;; (defmethod find-substrate ((substrate-spec t) &rest args) (apply #'find-graph substrate-spec args)) (defmethod find-graph ((graph-spec symbol) &rest args) (find graph-spec *all-substrates* :key #'name)) (defmethod find-graph ((graph-spec integer) &rest args) (find graph-spec *all-substrates* :key #'graph::id :test #'=)) ;;; ;;; ;;; (defmethod delete-substrate ((substrate-spec t) &rest args &key &allow-other-keys) (apply #'delete-graph substrate-spec args)) (defmethod delete-graph ((substrate substrate) &rest args &key &allow-other-keys) (with-slots (node-table edge-table cached-nodes cached-edges stack description-stack) substrate ;;; warum muss ich das tun? der GC hat anscheinend Probleme sonst... (when node-table (clrhash node-table)) (when edge-table (clrhash edge-table)) (setf cached-nodes nil cached-edges nil stack nil description-stack nil) ;;;(hcl::mark-and-sweep 3) #+:lispworks (hcl:gc-if-needed) (setf *all-substrates* (delete substrate *all-substrates*)) (when (eq substrate *cur-substrate*) (setf *cur-substrate* nil)))) ;;; ;;; ;;; (defun delete-all-substrates (&key (satisfying #'yes)) (mapc #'delete-substrate (get-all-substrates :satisfying satisfying))) (defun get-all-substrates (&key (satisfying #'yes)) (remove-if-not satisfying *all-substrates*)) ;;; ;;; ;;; (defmethod copy ((substrate substrate) &rest args) (apply #'copy-graph substrate args)) (defmethod copy-graph ((substrate substrate) &rest args &key name &allow-other-keys) (let ((copy (apply #'create-substrate (or name (format nil "Copy of ~A" (name substrate))) :copy-p t :type (type-of substrate) args))) (with-slots (node-counter edge-counter counter max-counter reset-p stack description-stack) substrate (with-slots ((cnode-counter node-counter) (cnode-counter node-counter) (cedge-counter edge-counter) (ccounter counter) (cmax-counter max-counter) (creset-p reset-p) (cstack stack) (cdescription-stack description-stack)) copy (dolist (node (sort (get-nodes substrate) #'< :key #'id)) (copy-graph-item copy node)) (dolist (edge (sort (get-edges substrate) #'< :key #'id)) (copy-graph-item copy edge)) (setf cnode-counter node-counter cedge-counter edge-counter ccounter counter cmax-counter max-counter creset-p reset-p cstack (copy-tree stack) cdescription-stack (copy-tree description-stack)))) copy)) ;;; ;;; ;;; (defpersistentclass substrate-object (graph-item) ; abstrakt ((description :accessor description :initarg :description :initform nil) (aux-description :accessor aux-description :initarg :aux-description :initform nil) (description-stack :accessor description-stack :initform nil))) ;;; ;;; ;;; (defmethod consistent-p ((obj substrate-object) &rest args &key use-aux-description-p &allow-other-keys) (apply #'consistent-p (if use-aux-description-p (aux-description obj) (description obj)) args)) (defmethod inconsistent-p ((obj substrate-object) &rest args) (not (apply #'consistent-p obj args))) (defmethod implies-p ((object-a substrate-object) (object-b substrate-object) &key use-aux-description-p &allow-other-keys) (if use-aux-description-p (implies-p (aux-description object-a) (aux-description object-b)) (implies-p (description object-a) (description object-b)))) (defmethod equivalent-p ((object-a substrate-object) (object-b substrate-object) &rest args) (and (apply #'implies-p object-a object-b args) (apply #'implies-p object-b object-a args))) ;;; ;;; ;;; (defpersistentclass substrate-node (substrate-object node) ((successors :reader successors :initarg :successors :initform nil) (predecessors :reader predecessors :initarg :predecessors :initform nil) (outgoing :reader outgoing :initarg :outgoing :initform nil) (incoming :reader incoming :initarg :incoming :initform nil))) (defmethod initialize-instance :after ((object substrate-node) &rest initargs) (register-node object)) (defmethod register-node ((object substrate-node)) (with-slots (id name in-graph) object (with-slots (node-table cached-nodes) in-graph (setf cached-nodes nil) (setf (gethash id node-table) object) (when name (setf (gethash name node-table) object))))) (defmethod get-node-position ((substrate substrate) (node substrate-node) &rest args) (let ((nodes (sort (get-nodes substrate) #'< :key #'id))) (position node nodes))) ;;; ;;; ;;; (defmethod create-node ((substrate t) (name symbol) (description node-description) &rest args) (apply #'make-node substrate :name name :description description args)) (defmethod make-node ((substrate substrate) &rest args &key name description aux-description delete-if-exists-p id (error-p t) (type (get-standard-node-class substrate)) &allow-other-keys) (if delete-if-exists-p (delete-node substrate name :all-p t :error-p nil) (when (apply #'find-node substrate name :error-p nil args) (if error-p (error "Node ~A already exists in substrate ~A!" name substrate) (return-from make-node nil)))) (apply #'make-instance type :id id :in-graph substrate :description description :aux-description aux-description :name name :allow-other-keys t args)) (defmacro node (name description &rest args) `(create-node *cur-substrate* ',name ,description ,@args)) ;;; ;;; ;;; (defmethod add-to-node ((substrate t) (name t) (delta-description node-description) &rest args &key error-p ) (let* ((substrate (find-substrate substrate :error-p error-p)) (node (find-node substrate name :error-p error-p))) (when (and node substrate) (apply #'add-to-node substrate node delta-description args)))) (defmethod add-to-node ((substrate substrate) (node substrate-node) (delta-description node-description) &key (mode :and) &allow-other-keys) (change-description node (ecase mode (:and (make-and-description (description node) :descriptions (list delta-description))) (:or (make-or-description (description node) :descriptions (list delta-description)))))) (defmacro add (name description &rest args) `(add-to-node *cur-substrate* ',name ,description ,@args)) ;;; ;;; ;;; (defmethod find-node ((substrate substrate) (node substrate-node) &rest args &key &allow-other-keys) (apply #'find-node substrate (id node) args)) (defmethod find-node ((substrate substrate) (id integer) &key &allow-other-keys) (when (node-table substrate) (gethash id (node-table substrate)))) (defmethod find-node ((substrate substrate) (name symbol) &key &allow-other-keys) (when (node-table substrate) (gethash name (node-table substrate)))) ;;; ;;; ;;; (defmethod delete-node ((substrate substrate) (node substrate-node) &key (delete-edges-p t) &allow-other-keys) (with-slots (node-table cached-nodes) substrate (setf cached-nodes nil) (remhash (id node) node-table) (remhash (name node) node-table) (when delete-edges-p (dolist (edge (outgoing node)) (delete-edge substrate edge :error-p t)) (dolist (edge (incoming node)) (delete-edge substrate edge :error-p t))))) (defmacro del-node (node) `(delete-node *cur-substrate* ',node)) ;;; ;;; ;;; (defpersistentclass substrate-edge (substrate-object edge)) (defmethod initialize-instance :after ((object substrate-edge) &rest initargs) (register-edge object)) (defmethod register-edge ((object substrate-edge)) (with-slots (id in-graph from to) object (with-slots (edge-table cached-edges) in-graph (setf cached-edges nil) (let* ((cons (cons (id from) (id to))) (item (gethash cons edge-table))) (if item (setf (gethash cons edge-table) (push object item)) (setf (gethash cons edge-table) (list object)))) (setf (gethash id edge-table) object) (push to (slot-value from 'successors)) (push from (slot-value to 'predecessors)) (push object (slot-value from 'outgoing)) (push object (slot-value to 'incoming))))) ;;; ;;; ;;; (defmethod get-edges-between ((substrate substrate) (from substrate-node) (to substrate-node) &rest args &key &allow-other-keys) (when (edge-table substrate) (gethash (cons (id from) (id to)) (edge-table substrate)))) ;;; ;;; ;;; (defmethod find-edge ((substrate substrate) (edge substrate-edge) &rest args &key &allow-other-keys) (apply #'find-edge substrate (id edge) args)) (defmethod find-edge ((substrate substrate) (id integer) &key &allow-other-keys) (when (edge-table substrate) (gethash id (edge-table substrate)))) #| (defmethod find-edge ((substrate substrate) (name symbol) &key &allow-other-keys) (gethash name (edge-table substrate))) |# ;;; ;;; ;;; (defmethod delete-edge ((substrate substrate) (edge substrate-edge) &key (error-p t) &allow-other-keys) (with-slots (edge-table cached-edges) substrate (setf cached-edges nil) (with-slots (id from to) edge (if (not (gethash id edge-table)) (progn (when error-p (error "Edge ~A not present in ~A!" edge substrate)) nil) (let ((cons (cons (id from) (id to)))) (unless (setf (gethash cons edge-table) (delete edge (gethash cons edge-table))) ;;; keine Kanten mehr zwischen "from" und "to"? (remhash cons edge-table) (setf (slot-value from 'successors) (delete to (slot-value from 'successors))) (setf (slot-value to 'predecessors) (delete from (slot-value to 'predecessors)))) (remhash id edge-table) (setf (slot-value from 'outgoing) (delete edge (slot-value from 'outgoing))) (setf (slot-value to 'incoming) (delete edge (slot-value to 'incoming)))))))) (defmacro del-edge (from to &key (error-p t) (all-p t)) (let ((var (gensym))) `(let ((,var (get-edges-between *cur-substrate* ',from ',to))) (if (and (cdr ,var) ,(not all-p)) (when ,error-p (error "More than one edge between ~A and ~A - not unique, can't delete!" ',from ',to)) (dolist (edge ,var) (delete-edge *cur-substrate* edge)))))) ;;; ;;; ;;; (defmethod create-edge ((substrate t) (from t) (to t) (description edge-description) &rest args) (apply #'make-edge substrate from to :description description args)) (defmethod make-edge ((substrate substrate) (from substrate-node) (to substrate-node) &rest args &key description aux-description id (type (get-standard-edge-class substrate)) &allow-other-keys) (apply #'make-instance type :id id :name 'edge ;(intern (format nil "EDGE-~A-~A" (name from) (name to))) :description description :in-graph substrate :aux-description aux-description :from from :to to :allow-other-keys t args)) (defmacro edge (from to description &rest args) `(create-edge *cur-substrate* ',from ',to ,description ,@args)) ;;; ;;; ;;; (defmethod reflexive-edge-p ((edge substrate-edge)) (eq (from edge) (to edge))) (defmethod underspecified-p ((edge substrate-edge) &key use-aux-description-p &allow-other-keys) (if use-aux-description-p (underspecified-p (aux-description edge)) (underspecified-p (description edge)))) (defmethod get-disjuncts ((edge substrate-edge) &key use-aux-description-p &allow-other-keys) (if use-aux-description-p (get-disjuncts (aux-description edge)) (get-disjuncts (description edge)))) (defmethod inverse-edge ((edge substrate-edge)) (subclass-responsibility 'inverse-edge)) (defmethod equivalent-edge-present-p ((substrate substrate) nodea nodeb (description edge-description) &key aux-description-p &allow-other-keys) (find-if #'(lambda (edge) (equivalent-p (if aux-description-p (aux-description edge) (description edge)) description)) (get-edges-between substrate nodea nodeb))) (defmethod =>-edge-present-p ((substrate substrate) nodea nodeb (description edge-description) &key aux-description-p) (find-if #'(lambda (edge) (implies-p (if aux-description-p (aux-description edge) (description edge)) description)) (get-edges-between substrate nodea nodeb))) (defmethod <=-edge-present-p ((substrate substrate) nodea nodeb (description edge-description) &key aux-description-p) (find-if #'(lambda (edge) (implies-p description (if aux-description-p (aux-description edge) (description edge)))) (get-edges-between substrate nodea nodeb))) ;;; ;;; Various Stuff ;;; (defmethod subgraph-isomorphic-p ((a substrate) (b substrate) &key (nodes-a (get-nodes a)) (nodes-b (get-nodes b)) (permutations-p t) (edges-equivalent-fn #'equivalent-p) (nodes-equivalent-fn #'equivalent-p) iso) ;;; is "a" an isomorphic subgraph of "b"? (let* ((na nodes-a) (nb nodes-b) (na (if iso (intersection (mapcar #'first iso) na) na)) (nb (if iso (intersection (mapcar #'second iso) nb) nb))) (with-marked-objects (na) (when (<= (length na) (length nb)) (let* ((vec (make-array (1+ (apply #'max (mapcar #'id na))))) (perms-to-check (if (or (not permutations-p) iso) (list nb) (perm nb (length na)))) (res (find-if #'(lambda (perm) (mapc #'(lambda (a b) (setf (aref vec (id a)) b)) na perm) (with-marked-objects (perm) (and (every #'(lambda (node) (funcall nodes-equivalent-fn (description node) (description (aref vec (id node))))) na) (every #'(lambda (edge) (with-slots (description current-label) edge (some #'(lambda (edge) (funcall edges-equivalent-fn (description edge) description)) (get-edges-between b (aref vec (id (from edge))) (aref vec (id (to edge))) :satisfying #'(lambda (x) (and (marked-p (from x)) (marked-p (to x)))))))) (get-edges a))))) perms-to-check))) (when res (mapcar #'(lambda (a x) (list a x)) na res))))))) (defmethod isomorphic-p ((a substrate) (b substrate) &key (nodes-a (get-nodes a)) (nodes-b (get-nodes b)) (permutations-p t) (edges-equivalent-fn #'equivalent-p) (nodes-equivalent-fn #'equivalent-p) iso) (let ((iso (subgraph-isomorphic-p a b :nodes-a nodes-a :nodes-b nodes-b :permutations-p permutations-p :nodes-equivalent-fn nodes-equivalent-fn :edges-equivalent-fn edges-equivalent-fn :iso iso))) (when iso (subgraph-isomorphic-p b a :nodes-a nodes-b :nodes-b nodes-a :permutations-p permutations-p :nodes-equivalent-fn nodes-equivalent-fn :edges-equivalent-fn edges-equivalent-fn :iso (mapcar #'(lambda (x) (reverse x)) iso)) iso))) ;;; ;;; ;;; (defmethod copy-node ((substrate substrate) (node substrate-node) &rest args) (apply #'make-node substrate :name (name node) :description (copy (description node)) :copy-p t :id (id node) :type (type-of node) :aux-description (when (aux-description node) (copy (aux-description node))) :description-stack (copy-tree (description-stack node)) args)) (defmethod copy-edge ((substrate substrate) (edge substrate-edge) &rest args) (apply #'make-edge substrate (find-node substrate (id (from edge))) (find-node substrate (id (to edge))) :description (copy (description edge)) :aux-description (when (aux-description edge) (copy (aux-description edge))) :copy-p t :id (id edge) :type (type-of edge) :description-stack (copy-tree (description-stack edge)) args)) ;;; ;;; ;;; (defmethod get-missing-edges ((substrate substrate) &key (nodes (get-nodes substrate)) loops-p inverses-p) (let ((res nil)) (loop as n on nodes do (let ((i (first n))) (when (and loops-p (not (get-edges-between substrate i i))) (push (list i i) res)) (dolist (j (rest n)) (if (get-edges-between substrate i j) (if (not (get-edges-between substrate j i)) (when inverses-p (push (list j i) res))) (if (not (get-edges-between substrate j i)) (progn (push (list i j) res) (when inverses-p (push (list j i) res))) (when inverses-p (push (list i j) res))))))) res)) (defmethod get-underspecified-edges ((substrate substrate) &rest args &key (satisfying #'yes) &allow-other-keys) (apply #'get-edges substrate :satisfying #'(lambda (x) (and (apply #'underspecified-p x args) (funcall satisfying x))) args)) ;;; ;;; ;;; (defmethod save-current-description ((substrate substrate) &key (save-node-labels-p t) (save-edge-labels-p t) (edges (get-edges substrate)) (nodes (get-nodes substrate)) &allow-other-keys) (dolist (node nodes) (push (if save-node-labels-p (aux-description node) +secret-marker+) (description-stack node)) (when save-node-labels-p (setf (aux-description node) (copy (description node))))) (dolist (edge edges) (push (if save-edge-labels-p (aux-description edge) +secret-marker+) (description-stack edge)) (when save-edge-labels-p (setf (aux-description edge) (copy (description edge))))) (push (copy-tree (stack substrate)) (description-stack substrate)) substrate) (defmethod pop-description-stack ((substrate substrate) &key (edges (get-edges substrate)) (nodes (get-nodes substrate)) &allow-other-keys) (dolist (node nodes) (setf (aux-description node) (let ((descr (pop (description-stack node)))) (unless (eq descr +secret-marker+) descr)))) (dolist (edge edges) (setf (aux-description edge) (let ((descr (pop (description-stack edge)))) (unless (eq descr +secret-marker+) descr)))) (setf (stack substrate) (pop (description-stack substrate))) substrate) ;;; ;;; ;;; (defmethod has-next-configuration-p ((substrate substrate) &key restart-from) (with-slots (reset-p stack counter max-counter) substrate (or reset-p (if restart-from (with-slots (stack) substrate (let ((stack-entry (find restart-from stack :key #'first))) (second stack-entry))) ;;; sonst: irgendeine Kante hat noch ausstehende Symbole! (some #'second stack))))) (defmethod enumerate-atomic-configurations ((substrate substrate) &rest args &key reset-p how-many restart-from auto-pop-p (edge-setter #'(lambda (edge sym &rest args) (declare (ignore args)) (change-textual-description (description edge) sym))) (edges (if *non-determinism-p* (reorder (get-underspecified-edges substrate :use-aux-description-p nil)) (get-underspecified-edges substrate :use-aux-description-p nil))) (sym-gen #'(lambda (edge processed-edges &rest args) (declare (ignore processed-edges args)) (if *non-determinism-p* (reorder (get-disjuncts edge :use-aux-description-p t)) (get-disjuncts edge :use-aux-description-p t)))) (selector-fn #'(lambda (rem-edges processed-edges &rest args) (declare (ignore processed-edges args)) (first rem-edges))) (manager-fn #'(lambda (sel-edge edges processed-edges &rest args) (declare (ignore args)) (values (remove sel-edge edges) (cons sel-edge processed-edges)))) (save-node-labels-p t) (save-edge-labels-p t) (fn #'copy) (final-check-fn #'yes) (construction-check-fn #'yes) &allow-other-keys) (when reset-p (apply #'reset-enumeration substrate args)) (labels ((do-it () (with-slots (reset-p stack description-stack counter max-counter) substrate (if reset-p (progn (when *debug-p* (format t "*** RESETING!~%")) (save-current-description substrate :save-node-labels-p save-node-labels-p :save-edge-labels-p save-edge-labels-p) (setf reset-p nil) (setf stack (list (list nil nil edges nil))) ; cur-edge, symbols, rem-edge, processed-edges (setf max-counter how-many) (setf counter 0)) (when (and max-counter (> counter max-counter)) (return-from enumerate-atomic-configurations nil))) (if (not stack) (progn (unless auto-pop-p (break "No stack!")) ;;; continue: (pop-description-stack substrate) (if stack (do-it) (return-from enumerate-atomic-configurations nil))) (let* ((top (first stack)) (edge (first top)) (syms (second top)) (rem (third top)) (pro (fourth top))) (when *debug-p* (format t "STACK: ~A~%" stack) (format t "STACK -> EDGE: ~A SYMS: ~A~% REM: ~A~% PRO: ~A~%" edge syms rem pro)) (cond ((and (not edge) rem) (let ((edge (apply selector-fn rem pro args))) (multiple-value-bind (new-rem new-pro) (apply manager-fn edge rem pro args) (when *debug-p* (format t "Chosing edge ~A~%" edge)) (setf (first top) edge) (setf (second top) (apply sym-gen edge pro args)) (setf (third top) new-rem) (setf (fourth top) new-pro) (do-it)))) (edge (let ((sym (first (second top)))) (setf (second top) (rest (second top))) (cond (sym (when *debug-p* (format t "Assigning edge ~A to ~A~%" edge sym)) (apply edge-setter edge sym :remaining (second top) args) (when (apply construction-check-fn substrate pro args) (when *debug-p* (format t "Construction check passed~%")) (push (list nil nil rem pro) stack))) (t (when *debug-p* (format t "No more alternatives for edge ~A; backtracking~%" edge )) (pop stack))) (do-it))) ((and (not edge) (not rem)) (pop stack) (when *debug-p* (format t "FINAL CHECK: ~A~%" (apply final-check-fn substrate args))) (when (apply final-check-fn substrate args) (when *debug-p* (format t "CONFIGURATION FOUND!~%" )) (incf counter) (return-from enumerate-atomic-configurations (apply fn substrate args))) (do-it)))))))) (when restart-from (with-slots (stack) substrate (let ((pos (position restart-from stack :key #'first))) (when pos (setf stack (subseq stack pos)))))) (do-it))) (defmethod reset-enumeration ((substrate substrate) &key &allow-other-keys) (setf (reset-p substrate) t)) (defmethod get-all-atomic-configurations ((substrate substrate) &rest args &key (fn #'copy)) (apply #'reset-enumeration substrate args) (let ((Res nil)) (loop (let ((subs (apply #'enumerate-atomic-configurations substrate :fn fn :auto-pop-p t args))) (if subs (push subs res) (return t)))) res)) ;;; ;;; ;;; (defmethod simplify ((substrate substrate) &key (error-p t)) (let* ((edges (get-edges substrate)) (new-edges nil) (del-edges nil)) (loop while edges do (let* ((edge (first edges)) (from (from edge)) (to (to edge)) (supp (get-edges-between substrate from to))) (setf edges (set-difference edges supp)) (let ((new-description (apply #'make-and-description (mapcar #'description supp)))) (unless new-description (when error-p (error "Unable to simplify ~A!" substrate)) (return-from simplify substrate)) (push (list (first supp) new-description) new-edges) (setf del-edges (append (rest supp) del-edges))))) (dolist (edge del-edges) (delete-edge substrate edge)) (dolist (entry new-edges) (let ((edge (first entry)) (new-descr (second entry))) (change-description edge new-descr))) substrate)) ;;; ;;; ;;; (defmethod change-description ((node substrate-node) (description node-description)) (setf (description node) description (aux-description node) nil (description-stack node) nil) (setf (reset-p (in-graph node)) t)) (defmethod change-description ((edge substrate-edge) (description edge-description)) (setf (description edge) description (aux-description edge) nil (description-stack edge) nil) (setf (reset-p (in-graph edge)) t)) ;;; ;;; ;;; (defmethod scramble ((substrate substrate) &key (nodes (get-nodes substrate)) new-order) (let* ((reordered-nodes (mapcar #'id (or new-order (reorder nodes)))) (edges (get-edges substrate))) (with-slots (node-table edge-table cached-nodes cached-edges) substrate (dolist (edge edges) (with-slots (from to) edge (remhash (cons (id from) (id to)) edge-table))) (dolist (node nodes) (remhash (id node) node-table)) (dolist (node nodes) (let ((new-id (1+ (position (id node) reordered-nodes)))) (setf (slot-value node 'id) new-id) (setf (gethash new-id node-table) node))) (dolist (edge edges) (with-slots (from to) edge (if (gethash (cons (id from) (id to)) edge-table) (push edge (gethash (cons (id from) (id to)) edge-table)) (setf (gethash (cons (id from) (id to)) edge-table) (list edge))))) (setf cached-nodes nil cached-edges nil) substrate))) ;;; ;;; Interface zum Graph-Visualizer ;;; (defmethod no-of-nodes ((graph substrate) &rest args) (let ((no 0)) (loop-over-nodes (node graph) (incf no)) no)) (defmethod no-of-edges ((graph substrate) &rest args) (let ((no 0)) (loop-over-edges (node graph) (incf no)) no)) ;;; ;;; ;;; (defmethod kind ((substrate substrate)) (type-of substrate)) (defmethod kind ((node substrate-node)) (or (textual-description (description node)) 'null)) (defmethod kind ((edge substrate-edge)) (or (textual-description (description edge)) 'null)) ;;; ;;; ;;; (defmethod info ((substrate substrate) &key &allow-other-keys) (format nil "Name: ~A, Type: ~A, Nodes: ~A, Edges: ~A, Consistent: ~A" (name substrate) (type-of substrate) (no-of-nodes substrate) (no-of-edges substrate) (consistent-p substrate))) (defmethod info ((node substrate-node) &key &allow-other-keys) (format nil "~A:~A/~A" (name node) (get-textual-description (description node)) (if (aux-description node) (get-textual-description (aux-description node)) 'none))) (defmethod info ((edge substrate-edge) &key &allow-other-keys) (format nil "~A:~A/~A" (name edge) (get-textual-description (description edge)) (if (aux-description edge) (get-textual-description (aux-description edge)) 'none))) #| (defmethod info ((node substrate-node) &key &allow-other-keys) (format nil "~A" (name node))) (defmethod info ((edge substrate-edge) &key &allow-other-keys) (format nil "(~A,~A) : ~A" (name (from edge)) (name (to edge)) (get-textual-description (description edge)))) |# ;;; ;;; ;;; #| (progn (setf x (create-substrate "test" :delete-if-exists-p t)) (create-node x 'a (make-node-description (get-standard-node-description-class x) 'a-descr) :delete-if-exists-p t) (create-node x 'b (make-node-description (get-standard-node-description-class x) 'b-descr) :delete-if-exists-p t) (princ (create-edge x 'a 'b (make-edge-description (get-standard-edge-description-class x) 'test) :error-p nil)) (setf xx (list x (scramble (copy x))))) (with-substrate (hello :delete-if-exists-p t) (node a (ncon a-descr)) (visualize (list *cur-substrate*))) (with-substrate (hello :delete-if-exists-p t) (node a (ncon a-descr)) (node a (ncon a-descr) :delete-if-exists-p t) (node b (ncon b-descr)) (del-node b) (node b (ncon b-descr)) (edge a b (econ ab-edge-descr)) (del-edge a b) (edge a b (econ ab-edge-descr)) (edge b a (econ ba-edge-descr)) (edge b b (econ bb-edge-descr)) (del-edge b a) (visualize (list *cur-substrate* (copy *cur-substrate* :delete-if-exists-p t)))) (progn (delete-all-substrates) (in-substrate hello :delete-if-exists-p t) (node a (ncon a-descr)) (node b (ncon b-descr)) (node c (ncon c-descr)) (node d (ncon d-descr)) (edge a b (econ ab-edge-descr)) (edge b a (econ ba-edge-descr)) (edge b b (econ bb-edge-descr)) (edge b c (econ bc-edge-descr)) (edge b d (econ bd-edge-descr)) (edge a d (econ ad-edge-descr)) (setf *x* *cur-substrate* *y* (scramble (copy *cur-substrate*))) (visualize (list *x* *y*)) (princ (isomorphic-p *x* *y*))) (with-substrate (hello :type 'substrate :delete-if-exists-p t) (node a (ncon a-descr)) (node b (ncon b-descr)) (node c (ncon c-descr)) (edge a b (econ (r s t))) (edge b c (econ (1 2 3))) (setf *x* *cur-substrate*) (visualize (remove nil (list (enumerate-atomic-configurations *x*) (enumerate-atomic-configurations *x* :restart-from (first (get-edges-between *x* 'a 'b))) (enumerate-atomic-configurations *x* :restart-from (first (get-edges-between *x* 'b 'c))) (enumerate-atomic-configurations *x* :restart-from (first (get-edges-between *x* 'a 'b))) (enumerate-atomic-configurations *x*) (enumerate-atomic-configurations *x*))))) (with-substrate (test :type 'substrate :delete-if-exists-p t) (node u (ncon a)) (node v (ncon b)) (node w (ncon c)) (edge u v (econ (r s))) (edge v w (econ (x y))) (setf *x* *cur-substrate*) (visualize (cons (copy *x*) (get-all-atomic-configurations *x*)))) ;;; ;;; Demo: geschachtelte Verwendung von "enumerate-atomic-configurations" ;;; Verwendung des Description Stacks ;;; (with-substrate (test :type 'substrate :delete-if-exists-p t) (setf *x* *cur-substrate*) (node a (ncon a)) (node b (ncon b)) (edge a b (econ (r s t))) (visualize (remove nil (append (list (enumerate-atomic-configurations *x* :save-node-labels-p nil)) (progn (node c (ncon c)) (edge b c (econ (t u))) (prog1 (list (enumerate-atomic-configurations *x* :reset-p t :save-node-labels-p nil) (enumerate-atomic-configurations *x*)) (pop-description-stack *x*))) (delete-node *x* 'c) (when (find-node *x* 'c) (error "!")) (list (enumerate-atomic-configurations *x* :save-node-labels-p nil)) (list (enumerate-atomic-configurations *x*)))))) (progn (setf *all-substrates* nil) (with-substrate (test :type 'substrate :delete-if-exists-p t) (setf *x* *cur-substrate*) (node c (ncon c)) (node a (ncon a)) (node b (ncon b)) (edge a b (econ r)) (edge b c (econ s)) (visualize (list *x* (scramble (copy *x*)))) (princ (get-missing-edges *x* :inverses-p nil :loops-p nil)))) (progn (setf *all-substrates* nil) (with-substrate (test :type 'substrate :delete-if-exists-p t) (setf *x* *cur-substrate*) (node a (ncon ax)) (node b (ncon bx)) (node c (ncon cx)) (add c (ncon ccc) :mode :and) (edge a b (econ r)) (scramble *x*) (princ (get-nodes *x*)) (visualize (list *x* (scramble (copy *x*)))))) (progn (delete-all-substrates) (in-substrate hello :delete-if-exists-p t) (setf *x* *cur-substrate*) (node a (ncon a-descr)) (node b (ncon b-descr)) (edge a b (econ ab-edge-descr)) (edge b a (econ ba-edge-descr)) (del-edge a b) (princ (get-edges *x*)) (terpri) (princ (get-edges-between *x* 'a 'b)) (princ (get-edges-between *x* 'b 'a))) |#
54,053
Common Lisp
.lisp
1,214
30.567545
120
0.530141
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
1ea31c564e4e931c9f14c136c2871c859cfb7279ce05851e2a7aae36d085b0f3
12,509
[ -1 ]
12,510
rolebox.lisp
lambdamikel_DLMAPS/src/thematic-substrate/rolebox.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) (defvar *cur-rbox* nil) (defvar *all-rboxes* nil) ;;; ;;; ;;; (defgeneric inv-role (rolebox role)) (defgeneric lookup (rolebox r s)) ;;; ;;; Role Box ;;; (defpersistentclass rolebox () ((name :reader name :initarg :name) (roles :reader roles :initarg :roles) (reflexive-roles :reader reflexive-roles :initarg :reflexive-roles) (n :reader n :initarg :n) (roles-to-inverses :reader roles-to-inverses :initarg :roles-to-inverses) (roles-to-ids :reader roles-to-ids :initarg :roles-to-ids) (ids-to-roles :reader ids-to-roles :initarg :ids-to-roles) (axioms :reader axioms :initform nil :initarg :axioms) (table :reader table :initarg :table))) (defmethod print-object ((rbox rolebox) stream) (format stream "#<~A ~A>" (type-of rbox) (name rbox))) (defun create-rbox (name roles &key (error-p t) (delete-if-exists-p t) inverse-roles reflexive-roles axioms (type 'rolebox)) (labels ((change-package (x) x)) (when delete-if-exists-p (delete-rbox name :all-p t)) (if (find-rbox name :error-p nil) (if error-p (error "Rolebox named ~A already exists!" name) (return-from create-rbox nil)) (if (not roles) (error "No roles!") (let* ((n (length roles)) (inverse-roles (mapcar #'change-package (append inverse-roles (mapcar #'reverse inverse-roles) (mapcar #'(lambda (x) (list x x)) reflexive-roles)))) (roles-to-ids (make-hash-table :size n)) (ids-to-roles (make-array (list n))) (roles-to-inverses (make-hash-table :size n)) (axiom-table (make-array (list n n))) (all-roles (mapcar #'change-package (tree-flatten (list inverse-roles axioms)))) (roles (mapcar #'change-package roles)) (reflexive-roles (mapcar #'change-package reflexive-roles))) (unless (subsetp all-roles roles) (error "Undeclared roles: ~A!" (set-difference all-roles roles))) (loop as role in roles as i from 0 to n do (setf (gethash role roles-to-ids) i) (setf (aref ids-to-roles i) role)) (loop as pair in inverse-roles do (let* ((role (first pair)) (inv (second pair)) (ret-inv (gethash role roles-to-inverses)) (ret-role (gethash inv roles-to-inverses))) (if (or (and ret-inv (not (eq inv ret-inv))) (and ret-role (not (eq role ret-role)))) (error "Bad inverses roles!") (progn (setf (gethash role roles-to-inverses) inv) (setf (gethash inv roles-to-inverses) role))))) (dolist (axiom axioms) (let ((from (change-package (first axiom))) (to (change-package (second axiom))) (res (mapcar #'change-package (ensure-list (third axiom))))) (when (member (list from to) (mapcar #'butlast (remove axiom axioms)) :test #'equal) (error "Double axiom for ~A o ~A!" from to)) (setf (aref axiom-table (gethash from roles-to-ids) (gethash to roles-to-ids)) (list res (mapcar #'(lambda (x) (gethash x roles-to-ids)) res))))) (let ((rbox (make-instance type :axioms axioms :name name :n n :reflexive-roles reflexive-roles :table axiom-table :roles roles :roles-to-inverses roles-to-inverses :roles-to-ids roles-to-ids :ids-to-roles ids-to-roles))) (push rbox *all-rboxes*) rbox)))))) (defmacro with-rbox ((name &key (error-p t) roles inverse-roles reflexive-roles delete-if-exists-p (type 'rolebox) axioms) &rest body) `(let ((*cur-rbox* (or (and ,(not delete-if-exists-p) (find-rbox ',name :error-p nil)) (create-rbox ',name ',roles :axioms ',axioms :type ',type :error-p ,error-p :inverse-roles ',inverse-roles :reflexive-roles ',reflexive-roles :delete-if-exists-p ,delete-if-exists-p)))) ,@body)) (defmacro in-rbox (name &key (error-p t) axioms roles inverse-roles reflexive-roles delete-if-exists-p (type 'rolebox)) `(let ((x ni)) (with-rbox (,name :roles ,roles :axioms ,axioms :type ,type :error-p ,error-p :inverse-roles ',inverse-roles :reflexive-roles ',reflexive-roles :delete-if-exists-p ,delete-if-exists-p) (setf x *cur-rbox*)) (setf *cur-rbox* x))) (defun find-rbox (name &key (error-p t)) (if (typep name 'rolebox) name (or (find name *all-rboxes* :key #'name) (progn (=> error-p (error "Can't find role box ~A!" name)) nil)))) (defun delete-rbox (name &key all-p) (loop (let ((rbox (find-rbox name :error-p nil))) (unless rbox (return)) (setf *all-rboxes* (delete rbox *all-rboxes*)) (unless all-p (return))))) ;;; ;;; ;;; (defmethod inv-role ((rbox rolebox) (role symbol)) (with-slots (roles-to-inverses) rbox (or (gethash role roles-to-inverses) `(inv ,role)))) (defmethod inv-role ((rbox rolebox) (role list)) (if (inv-role-p role) (if (symbolp (second role)) (second role) (inv-role rbox (inv-role rbox (second role)))) (mapcar #'(lambda (x) (inv-role rbox x)) role))) (defun inv-role-p (x) (and (consp x) (eq (first x) 'inv) (second x) (not (cddr x)))) (defmethod full-disjunctive-role ((rbox rolebox)) (roles rbox)) ;;; ;;; ;;; (defmethod get-role ((rbox rolebox) (role symbol)) role) (defmethod get-role ((rbox rolebox) (role list)) (if (inv-role-p role) (inv-role rbox (second role)) (let ((role (mapcar #'(lambda (x) (get-role rbox x)) role))) (if (member nil role) nil role)))) ;;; ;;; ;;; (defmethod encode ((box rolebox) (role symbol)) (gethash (get-role box role) (roles-to-ids box))) (defmethod encode ((box rolebox) (role list)) (if (inv-role-p role) (encode box (get-role box role)) (mapcar #'(lambda (r) (encode box r)) role))) (defmethod decode ((box rolebox) (role integer)) (when (and (not (minusp role)) (< role (n box))) (aref (ids-to-roles box) role))) (defmethod decode ((box rolebox) (role list)) (mapcar #'(lambda (r) (decode box r)) role)) ;;; ;;; ;;; (defmethod lookup ((box rolebox) (from symbol) (to symbol)) (with-slots (table) box (let ((i (encode box (get-role box from))) (j (encode box (get-role box to)))) (when (and i j) (first (aref table i j)))))) (defmethod lookup ((box rolebox) from to) (lookup box (ensure-list from) (ensure-list to))) (defmethod lookup ((box rolebox) (from list) (to list)) ; aus Effizienzgruenden so gemacht (let ((rfrom (if (inv-role-p from) (get-role box from) from)) (rto (if (inv-role-p to) (get-role box to) to))) (if (or (inv-role-p from) (inv-role-p to)) nil (with-slots (table) box (let ((dis nil)) (dolist (from rfrom) (dolist (to rto) (let ((i (get-role box from)) (j (get-role box to))) (if (or (inv-role-p i) (inv-role-p j)) (return-from lookup nil) (let* ((i (encode box i)) (j (encode box j))) (if (and i j) (dolist (c (first (aref table i j))) (push c dis)) (return-from lookup nil))))))) (remove-duplicates dis)))))) ;;; ;;; ;;; (defpersistentclass jepd-rolebox (rolebox) nil) (defmethod initialize-instance :after ((rolebox jepd-rolebox) &rest initargs) (declare (ignorable initargs)) (when (cdr (reflexive-roles rolebox)) (error "More than one reflexive role found: ~A!" (reflexive-roles rolebox))) (dolist (role (roles rolebox)) (unless (inv-role rolebox role) (error "Missing inverse role: ~A!" role))) (dolist (r (roles rolebox)) (dolist (s (roles rolebox)) (unless (lookup rolebox r s) (error "Missing role axiom: ~A o ~A!" r s)))))
10,156
Common Lisp
.lisp
253
26.284585
92
0.482472
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
c369cb4625e398fc78cf6c344bad506880d42c2fcdfe9f38e9650a6aab50467a
12,510
[ -1 ]
12,511
process.lisp
lambdamikel_DLMAPS/src/thematic-substrate/process.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) (defmacro start-process (&body body) #+:multiprocess-queries `(#-:mcl mp:process-run-function #+:mcl ccl:process-run-function "Query Answering Process" ;;'(:size 1400000) #-:mcl nil #'(lambda () ,@body)) #-:multiprocess-queries `(progn (funcall #'(lambda () ,@body)) nil ; wichtig! )) #| #+:lispworks (defmacro with-critical-section (&body body) ;; funktioniert nicht?! `(lispworks:without-interrupts ,@body)) #-:lispworks (defmacro with-critical-section (&body body) `(error "Please implement macro with-critical-section (in macros.lisp)!")) |# (defvar *lock* nil) (defmacro with-critical-section (&body body) #+:multiprocess-queries `(progn (when (not (eq *lock* *process-id*)) (loop while *lock* do (sleep +sleep-time+)) (when *lock* (error "Someone stole the *lock*?!"))) (setf *lock* *process-id*) (unwind-protect ;; (lispworks:without-preemption ;; funktioniert nicht!!! ,@body (setf *lock* nil))) #-:multiprocess-queries `(progn ,@body))
1,363
Common Lisp
.lisp
45
22.688889
87
0.590256
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
59b539eb770ed5e6428377b8202823a501371c4361b15fb5c721d97c7701c80b
12,511
[ -1 ]
12,512
descriptions5.lisp
lambdamikel_DLMAPS/src/thematic-substrate/descriptions5.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) ;;; ;;; ;;; (defvar *node-description-class* nil) (defvar *edge-description-class* nil) ;;; ;;; ;;; (defpersistentclass semantic-entity () ; abstrakt ;;; ;;; die textual-description is sozusagen die Basis-Beschreibung! ;;; Bei einer edge-description z.B. die Liste der Rollen-Symbole, als Disjunktion interpretiert ;;; nur die description selbst weiß wie die "rohe" textual-description zu interpretieren ist ;;; (ob eine textual-descritpion vom Typ Liste z.B. eine Disjunktion oder Konjunktion repräsentiert) ;;; ((textual-description :accessor textual-description :initarg :textual-description) (original-description :accessor original-description :initarg :original-description) (constructor-sym :reader constructor-sym :initarg :constructor-sym :initform nil))) (defmethod initialize-description ((descr semantic-entity)) t) (defmethod initialize-instance :after ((object semantic-entity) &rest initargs &key dont-initialize-p) (when (and (slot-boundp object 'textual-description) (not (slot-boundp object 'original-description))) (setf (original-description object) (textual-description object))) (unless dont-initialize-p ;;; Idee: hier läuft der Parser an, um die ursprüngliche textual-description zu ;;; bearbeiten; original-description memoriert den originalen Wert der Descr. (initialize-description object))) (defmethod change-textual-description ((description semantic-entity) textual-description &key reinitialize-p) (setf (textual-description description) textual-description) (when reinitialize-p (initialize-description description)) description) (defmethod copy ((object semantic-entity) &rest args) (subclass-responsibility 'copy)) (defmethod print-object ((object semantic-entity) stream) (format stream "#<~A: ~A>" (type-of object) (textual-description object))) ;;; ;;; f. Graph-Visualizer ;;; (defmethod get-textual-description ((object semantic-entity)) (format nil "~A" (textual-description object))) ;;; ;;; Mixins - keine Descriptions! ;;; (defpersistentclass racer-concept-mixin () ((racer-concept :reader racer-concept) (racer-tbox :reader racer-tbox :initarg :racer-tbox :initform nil))) (defpersistentclass racer-role-mixin () ((racer-role :reader racer-role) (racer-tbox :reader racer-tbox :initarg :racer-tbox :initform nil) (allow-negated-roles-p :initarg :allow-negated-roles-p :initform nil))) (defmethod dl-concept ((rcm racer-concept-mixin)) (racer-concept rcm)) (defmethod dl-role ((rcm racer-role-mixin)) (racer-role rcm)) ;;; ;;; ;;; (defmethod initialize-description :after ((descr racer-concept-mixin)) (with-slots (racer-package racer-concept racer-tbox textual-description) descr (setf racer-concept (convert-to-racer-concept-expression textual-description racer-package) racer-tbox (convert-to-racer-tbox-name racer-tbox racer-package)))) (defmethod initialize-description :after ((descr racer-role-mixin)) (with-slots (racer-package racer-role racer-tbox textual-description) descr (setf racer-role (convert-to-racer-role-expression textual-description) racer-tbox (convert-to-racer-tbox-name racer-tbox racer-package)))) ;;; ;;; ;;; (defmethod check-same-tbox-and-package ((descr1 racer-concept-mixin) (descr2 racer-concept-mixin)) (if (or (not (eq (racer-tbox descr1) (racer-tbox descr2))) (not (eq (racer-package descr1) (racer-package descr2)))) (error "~A ~A must use the same TBox and/or package!" descr1 descr2))) (defmethod check-same-tbox-and-package ((descr1 racer-role-mixin) (descr2 racer-role-mixin)) (if (or (not (eq (racer-tbox descr1) (racer-tbox descr2))) (not (eq (racer-package descr1) (racer-package descr2)))) (error "~A ~A must use the same TBox and/or package!" descr1 descr2))) ;;; ;;; ;;; (defmethod get-negated-concept ((descr racer-concept-mixin)) (let ((descr (make-description 'racer-node-description `(not ,(textual-description descr))))) (initialize-description descr) descr)) (defmethod concept-is-consistent-p ((descr racer-concept-mixin)) (concept-satisfiable-p (convert-to-racer-concept-expression (racer-concept descr) (racer-package descr)) (racer-tbox descr))) (defmethod concept-is-tautological-p ((descr racer-concept-mixin)) (not (concept-satisfiable-p (convert-to-racer-concept-expression `(not (and ,(racer-concept descr))) (racer-package descr)) (racer-tbox descr)))) (defmethod concept-implies-p ((descr1 racer-concept-mixin) (descr2 racer-concept-mixin)) (check-same-tbox-and-package descr1 descr2) (not (concept-satisfiable-p (convert-to-racer-concept-expression `(and ,(racer-concept descr1) (not ,(racer-concept descr2))) (racer-package descr1)) (racer-tbox descr1)))) ;;; ;;; ;;; (defmethod consistent-p ((descr racer-concept-mixin) &rest args) (apply #'concept-is-consistent-p descr args)) (defmethod tautological-p ((descr racer-concept-mixin) &rest args) (apply #'concept-is-tautological-p descr args)) (defmethod implies-p ((descr1 racer-concept-mixin) (descr2 racer-concept-mixin) &rest args) (apply #'concept-implies-p descr1 descr2 args)) ;;; ;;; ;;; (defmethod role-is-consistent-p ((descr racer-role-mixin)) t) (defmethod role-is-tautological-p ((descr racer-role-mixin)) nil) (defmethod role-implies-p ((descr1 racer-role-mixin) (descr2 racer-role-mixin)) (check-same-tbox-and-package descr1 descr2) (not (concept-satisfiable-p (convert-to-racer-concept-expression `(and (some ,(racer-role descr1) top) (all ,(racer-role descr2) bottom)) (racer-package descr1)) (racer-tbox descr1)))) ;;; ;;; ;;; (defmethod consistent-p ((descr racer-role-mixin) &rest args) (apply #'role-is-consistent-p descr args)) (defmethod tautological-p ((descr racer-role-mixin) &rest args) (apply #'role-is-tautological-p descr args)) (defmethod implies-p ((descr1 racer-role-mixin) (descr2 racer-role-mixin) &rest args) (apply #'role-implies-p descr1 descr2 args)) ;;; ;;; Abstrakte Descriptions ;;; Achtung! Die "racer"-Descriptions sind für die SUBSTRATE-EBENE, ;;; *nicht* für die :racer-description-Ebene bei make-node etc.!!!! ;;; (defpersistentclass description (semantic-entity) ((satisfiable :reader satisfiable :initform :not-tested) (inconsistent :reader inconsistent :initform :not-tested) (tautological :reader tautological :initform :not-tested) (entails :reader entails :initform nil) (not-entails :reader not-entails :initform nil) (entailed-by :reader entailed-by :initform nil) (not-entailed-by :reader not-entailed-by :initform nil))) (defmethod make-description ((class symbol) descr &rest args &key type &allow-other-keys) (apply #'make-instance (or type class) :textual-description descr :constructor-sym class :allow-other-keys t args)) (defmethod copy ((description description) &rest args) (apply #'make-description (constructor-sym description) (copy-tree (textual-description description)) args)) ;;; ;;; ;;; (defpersistentclass node-description (description)) ;;; abstrakt (defpersistentclass edge-description (description)) ;;; abstrakt ;;; ;;; ;;; (defmethod get-inverse-description ((descr description)) (subclass-responsibility 'get-inverse-description)) (defmethod get-negated-description ((descr description)) (subclass-responsibility 'get-negated-description)) ;;; ;;; Simple Descriptions: lediglich syntaktische Beschreibungen ;;; (defpersistentclass simple-description (description)) ;;; abstrakt (defpersistentclass simple-disjunctive-description (simple-description)) ; Liste = Disjunktion (defpersistentclass simple-conjunctive-description (simple-description)) ; Liste = Konjunktion ;;; (defpersistentclass boolean-description (simple-description)) ;;; to be implemented ;;; ;;; ;;; (defmethod underspecified-p ((description simple-disjunctive-description) &rest args) (cdr (ensure-list (textual-description description)))) (defmethod get-disjuncts ((description simple-disjunctive-description) &rest args) (ensure-list (textual-description description))) ;;; ;;; ;;; (defmethod underspecified-p ((description simple-conjunctive-description) &rest args) nil) (defmethod get-conjuncts ((description simple-conjunctive-description) &rest args) (ensure-list (textual-description description))) ;;; ;;; ;;; (defmethod initialize-description :after ((object simple-description)) (with-slots (textual-description) object (when (consp textual-description) (setf (slot-value object 'textual-description) (remove-duplicates textual-description :test #'equal))))) (defmethod print-object ((object simple-description) stream) (format stream "#<~A: ~A>" (type-of object) (textual-description object))) ;;; ;;; Achtung - bewusst redundant!!! Denke an unvollstaendige Algorithmen ;;; (defmethod reset-sat-status ((description description)) 'ok) (defmethod reset-sat-status :before ((description description)) (with-slots (entails entailed-by not-entails not-entailed-by satisfiable tautological inconsistent) description (setf satisfiable :not-tested tautological :not-tested inconsistent :not-tested entails nil entailed-by nil not-entails nil not-entailed-by nil) description)) ;;; ;;; ;;; (defmethod consistent-p :around ((description description) &rest args) (declare (ignorable args)) (with-slots (satisfiable inconsistent tautological) description (when (eq satisfiable :not-tested) (setf satisfiable (call-next-method)) (cond ((eq satisfiable t) ;;; auch :dont-know kann zurueckkommen!!! richtig so! (setf inconsistent nil)) ((not satisfiable) (setf inconsistent t) (setf tautological nil)))) satisfiable)) (defmethod inconsistent-p :around ((description description) &rest args) (declare (ignorable args)) (with-slots (satisfiable inconsistent tautological) description (when (eq inconsistent :not-tested) (setf inconsistent (call-next-method)) (cond ((eq inconsistent t) (setf satisfiable nil) (setf tautological nil)) ((not inconsistent) (setf satisfiable t)))) inconsistent)) (defmethod tautological-p :around ((description description) &rest args) (declare (ignorable args)) (with-slots (satisfiable inconsistent tautological) description (when (eq tautological :not-tested) (setf tautological (call-next-method)) (cond ((eq tautological t) (setf satisfiable t) (setf inconsistent nil)))) tautological)) ;;; ;;; Reasoning; consistent-p sollte NIL, T, :UNKNOWN liefern ;;; (defmethod consistent-p ((description description) &rest args) (subclass-responsibility 'consistent-p)) (defmethod inconsistent-p ((description description) &rest args) ;;; Achtung! kann ja auch :dont-know zurueckkommen! (eq (apply #'consistent-p description args) nil)) (defmethod tautological-p ((description description) &rest args) (subclass-responsibility 'tautological-p)) ;;; ;;; ;;; ;;; (defmethod implies-p :around ((descr1 description) (descr2 description) &rest args) (declare (ignorable args)) (call-next-method)) #| ;;; funktioniert nicht! ;;; denke an die Descriptions, die ihrer Beschreibungen wechseln, ;;; dabei aber Objektidentität behalten! (if (member descr2 (entails descr1)) t (if (member descr2 (not-entails descr1)) nil (let ((res (call-next-method))) (when (eq res t) (push descr2 (slot-value descr1 'entails)) (push descr1 (slot-value descr2 'entailed-by))) (when (eq res nil) (push descr2 (slot-value descr1 'not-entails)) (push descr1 (slot-value descr2 'not-entailed-by))) res)))) |# ;;; ;;; ;;; (defmethod implies-p ((descr1 description) (descr2 description) &rest args) (subclass-responsibility 'implies-p)) ;;; ;;; ;;; (defmethod equivalent-p ((descr1 description) (descr2 description) &rest args) (and (apply #'implies-p descr1 descr2 args) (apply #'implies-p descr2 descr1 args))) ;;; ;;; ;;; (defun is-atom-p (expr) (or (symbolp expr) (and (consp expr) (eq (first expr) :not) (symbolp (second expr)) (not (cddr expr))))) (defun negated-atoms-p (x y) (and (is-atom-p x) (is-atom-p y) (or (and (symbolp x) (consp y) (symbolp (second y)) (eq (first y) :not) (eq x (cadr y))) (and (symbolp y) (consp x) (symbolp (second x)) (eq (first x) :not) (eq y (cadr x)))))) (defun get-negated-atom (x) (if (eq x :bottom) :top (if (eq x :top) :bottom (if (and (consp x) (eq (first x) :not) (symbolp (second x))) (second x) (if (symbolp x) `(:not ,x) (error "Bad atom: ~A!" x)))))) ;;; ;;; ;;; (defmethod get-negated-description ((description simple-disjunctive-description)) (if (consp (textual-description description)) (make-description 'simple-conjunctive-description (mapcar #'get-negated-atom (textual-description description))) (make-description 'simple-conjunctive-description (get-negated-atom (textual-description description))))) (defmethod get-negated-description ((description simple-conjunctive-description)) (if (consp (textual-description description)) (make-description 'simple-disjunctive-description (mapcar #'get-negated-atom (textual-description description))) (make-description 'simple-disjunctive-description (get-negated-atom (textual-description description))))) ;;; ;;; ;;; (defmethod inconsistent-p ((description simple-disjunctive-description) &rest args) ;;; Verfeinerungsbeduerftig (every #'(lambda (x) (eq x :bottom)) (ensure-list (textual-description description)))) (defmethod consistent-p ((description simple-disjunctive-description) &rest args) ;;; Entscheidbar -> nil, T, kein :UNKNOWN mehr (not (apply #'inconsistent-p description args))) (defmethod tautological-p ((description simple-disjunctive-description) &rest args) (apply #'inconsistent-p (get-negated-description description) args)) ;;; ;;; ;;; (defmethod implies-p ((descr1 simple-disjunctive-description) (descr2 simple-disjunctive-description) &rest args) (every #'(lambda (x) (apply #'inconsistent-p x args)) (let ((descr2 (get-negated-description descr2))) (mapcar #'(lambda (disjunct) (make-description 'simple-conjunctive-description (cons disjunct (textual-description descr2)))) (ensure-list (textual-description descr1)))))) (defmethod implies-p ((descr1 simple-disjunctive-description) (descr2 simple-conjunctive-description) &rest args) (every #'(lambda (x) (apply #'inconsistent-p x args)) (mapcar #'(lambda (prod) (make-description 'simple-conjunctive-description prod)) (prod (ensure-list (textual-description descr2)) (mapcar #'get-negated-atom (ensure-list (textual-description descr1))))))) ;;; ;;; ;;; (defmethod inconsistent-p ((description simple-conjunctive-description) &rest args) ;;; Verfeinerungsbeduerftig (or (some #'(lambda (x) (eq x :bottom)) (ensure-list (textual-description description))) (loop as l on (ensure-list (textual-description description)) as x = (first l) thereis (some #'(lambda (y) (negated-atoms-p x y)) (rest l))))) (defmethod consistent-p ((description simple-conjunctive-description) &rest args) (not (apply #'inconsistent-p description args))) (defmethod tautological-p ((description simple-conjunctive-description) &rest args) (apply #'inconsistent-p (get-negated-description description) args)) ;;; ;;; ;;; (defmethod implies-p ((descr1 simple-conjunctive-description) (descr2 simple-conjunctive-description) &rest args) (every #'(lambda (x) (apply #'inconsistent-p x args)) (mapcar #'(lambda (disjunct) (make-description 'simple-conjunctive-description (cons (get-negated-atom disjunct) (ensure-list (textual-description descr1))))) (ensure-list (textual-description descr2))))) (defmethod implies-p ((descr1 simple-conjunctive-description) (descr2 simple-disjunctive-description) &rest args) (apply #'inconsistent-p (make-description 'simple-conjunctive-description (append (ensure-list (textual-description descr1)) (mapcar #'get-negated-atom (ensure-list (textual-description descr2))))) args)) ;;; ;;; Simple Beschreibungen ;;; Nodes: KONJUNKTIV ;;; Edges: DISJUNKTIV!!! ;;; (defpersistentclass simple-node-description (node-description simple-conjunctive-description)) (defpersistentclass simple-edge-description (edge-description simple-disjunctive-description)) ;;; ;;; Racer Descriptions: RACER-Beschreibungen inkl. TBox ;;; RACER ABox-"Reimplementation" ;;; (defpersistentclass racer-description (description) ((racer-package :reader racer-package :initarg :racer-package :initform nil))) (defpersistentclass racer-node-description (node-description racer-description racer-concept-mixin)) (defpersistentclass racer-edge-description (edge-description racer-description racer-role-mixin)) ;;; ;;; Konstrukturen: Knoten ;;; (defmethod make-node-description ((class symbol) descr &rest args) (apply #'make-description class descr args)) (defmacro ncon (descr &rest args) `(make-standard-node-description ',descr ,@args)) (defun make-standard-node-description (descr &rest args) (apply #'make-node-description *node-description-class* descr args)) ;;; ;;; Konstrukturen: Kanten ;;; (defmethod make-edge-description ((class symbol) descr &rest args) (apply #'make-description class descr args)) (defmacro econ (descr &rest args) `(make-standard-edge-description ',descr ,@args)) (defun make-standard-edge-description (descr &rest args) (apply #'make-edge-description *edge-description-class* descr args)) ;;; ;;; AND/OR-Konstruktoren für Descriptions ;;; (defmethod make-and-description :before ((descr description) &rest args &key descriptions &allow-other-keys) (unless (every #'(lambda (x) (eq (constructor-sym descr) (constructor-sym x))) descriptions) (error "Descriptions not all of same type!"))) (defmethod make-or-description :before ((descr description) &rest args &key descriptions &allow-other-keys) (unless (every #'(lambda (x) (eq (constructor-sym descr) (constructor-sym x))) descriptions) (error "Descriptions not all of same type!"))) ;;; ;;; nur intern! ;;; (defmethod make-union-description ((descr simple-description) &rest args &key descriptions &allow-other-keys) (if descriptions (apply #'make-description (constructor-sym descr) (reduce #'union (mapcar #'(lambda (x) (ensure-list (textual-description x))) (cons descr descriptions))) args) descr)) (defmethod make-intersection-description ((descr simple-description) &rest args &key descriptions &allow-other-keys) (if descriptions (apply #'make-description (constructor-sym descr) (reduce #'intersection (mapcar #'(lambda (x) (ensure-list (textual-description x))) (cons descr descriptions))) args) descr)) ;;; ;;; Logisch, extern: ;;; (defmethod make-and-description ((descr simple-conjunctive-description) &rest args) (apply #'make-union-description descr args)) #| ;;; falsch! -> man braucht echte BOOLEAN DESCRIPTIONS HIER! DNF bestimmen etc. (defmethod make-or-description ((descr simple-conjunctive-description) &rest descriptions) (make-union-description descr descriptions)) |# (defmethod make-and-description ((descr simple-disjunctive-description) &rest args) (apply #'make-intersection-description descr args)) (defmethod make-or-description ((descr simple-disjunctive-description) &rest args) (apply #'make-union-description descr args)) ;;; ;;; Rasoning: Racer descriptions ;;; (defmethod consistent-p ((description racer-node-description) &rest args) (concept-is-consistent-p description)) (defmethod consistent-p ((description racer-edge-description) &rest args) (role-is-consistent-p description)) (defmethod tautological-p ((description racer-node-description) &rest args) (concept-is-tautological-p description)) (defmethod tautological-p ((description racer-edge-description) &rest args) (role-is-tautological-p description)) ;;; ;;; ;;; (defmethod get-negated-description ((description racer-node-description)) (get-negated-concept description)) ;;; ;;; ;;; (defmethod implies-p ((descr1 racer-node-description) (descr2 racer-node-description) &rest args) (apply #'concept-implies-p descr1 descr2 args)) (defmethod implies-p ((descr1 racer-edge-description) (descr2 racer-edge-description) &rest args) (apply #'role-implies-p descr1 descr2 args)) ;;; ;;; ;;; (defmethod make-and-description ((descr racer-node-description) &rest args &key descriptions &allow-other-keys) (apply #'make-description (type-of descr) `(and ,@(mapcar #'racer-concept (cons descr descriptions))) args)) (defmethod make-or-description ((descr racer-node-description) &rest args &key descriptions &allow-other-keys) (apply #'make-description (type-of descr) `(or ,@(mapcar #'racer-concept (cons descr descriptions))) args)) ;;; ;;; Added in 2021: ;;; #| (defmethod implies-p ((descr1 #<MIDELORA-MAP-NODE-DESCRIPTION: description) (descr2 description) &rest args) (subclass-responsibility 'implies-p)) |#
23,125
Common Lisp
.lisp
556
35.442446
116
0.68132
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
d8b8edd62f2d23e0ec3fb4a1086fd226282dc5a5df5f1c73aebf44b1cf2de2e9
12,512
[ -1 ]
12,513
racer-substrate5.lisp
lambdamikel_DLMAPS/src/thematic-substrate/racer-substrate5.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) ;;; ;;; die Basis (auch fuer nRQL!) ist in common.lisp! ;;; (defmethod info ((substrate racer-substrate) &key &allow-other-keys) (format nil "Name: ~A, Type: ~A Nodes: ~A, Edges: ~A" (name substrate) (type-of substrate) (no-of-nodes substrate) (no-of-edges substrate))) ;;; ;;; ;;; (defpersistentclass racer-abox-mirror-substrate (racer-substrate)) ;;; ;;; ;;; (defpersistentclass racer-substrate-object (substrate-object) ;;; stellt (optionale!) assoziation mit racer-objekten her ((racer-object :reader racer-object :initarg :racer-object :initform nil) (racer-description :reader racer-description :initarg :racer-description :initform nil))) (defpersistentclass racer-substrate-node (racer-substrate-object substrate-node)) (defpersistentclass racer-substrate-edge (racer-substrate-object substrate-edge)) ;;; ;;; ;;; (defpersistentclass racer-descriptions-substrate-object (substrate-object)) (defpersistentclass racer-descriptions-substrate-node (racer-descriptions-substrate-object substrate-node)) (defpersistentclass racer-descriptions-substrate-edge (racer-descriptions-substrate-object substrate-edge)) ;;; ;;; ;;; (defpersistentclass racer-abox-mirror-substrate-object (racer-substrate-object)) (defpersistentclass racer-abox-mirror-substrate-node (racer-abox-mirror-substrate-object racer-substrate-node)) (defpersistentclass racer-abox-mirror-substrate-edge (racer-abox-mirror-substrate-object racer-substrate-edge)) ;;; ;;; ;;; (defmethod get-standard-node-class ((substrate racer-substrate)) 'racer-substrate-node) (defmethod get-standard-edge-class ((substrate racer-substrate)) 'racer-substrate-edge) (defmethod get-standard-node-description-class ((substrate racer-substrate)) (call-next-method)) (defmethod get-standard-edge-description-class ((substrate racer-substrate)) (call-next-method)) ;;; damit das "hybride racer-substrate" beliebig instantiert werden kann, ;;; ist die description-class für die Substrate-Objekte nicht festgelegt! ;;; in der ABox werden natürlich Racer-Beschreibungen generiert; beim ;;; Anlegen einer Knoten/Kanten-Beschreibung wird gesagt, ob die Beschreibung ;;; automatisch in eine Racer-Beschreibung konvertiert werden soll ("mirroring"), ;;; oder alternativ kann die :racer-description "von Hand" gesetzt werden, und ;;; dann ist die Substrate-Knoten/Kanten-Beschreibung unabhaengig von den Beschreibungen ;;; in der Racer-Abox ;;; ;;; Beim Racer-Descriptions-Substrate wird *keine* assoziierte ABox verwendet; ;;; daher werden, um Racer-Reasoning auszunutzen, einfach Racer-Konzepte/Rollen ;;; verwendet auf der Substrat-Ebene! Bestimmte Inkonsistenzen koennen natürlich ;;; nicht entdeckt werden, solange man nicht den Racer-Abox-Konsistenzcheck auf ;;; Racer-Descriptions-Substrate "reimplementiert". ;;; (defmethod get-standard-node-class ((substrate racer-descriptions-substrate)) 'racer-descriptions-substrate-node) (defmethod get-standard-edge-class ((substrate racer-descriptions-substrate)) 'racer-descriptions-substrate-edge) (defmethod get-standard-node-description-class ((substrate racer-descriptions-substrate)) 'racer-node-description) (defmethod get-standard-edge-description-class ((substrate racer-descriptions-substrate)) 'racer-edge-description) ;;; ;;; ;;; (defmethod get-standard-node-class ((substrate racer-abox-mirror-substrate)) 'racer-abox-mirror-substrate-node) (defmethod get-standard-edge-class ((substrate racer-abox-mirror-substrate)) 'racer-abox-mirror-substrate-edge) (defmethod get-standard-node-description-class ((substrate racer-abox-mirror-substrate)) (call-next-method)) (defmethod get-standard-edge-description-class ((substrate racer-abox-mirror-substrate)) (call-next-method)) ;;; ;;; ;;; (defun thematic-object-p (object) (and (typep object 'racer-substrate-object) (racer-description object))) (defun non-thematic-object-p (object) (and (typep object 'substrate-object) (not (thematic-object-p object)))) ;;; ;;; ;;; (defun non-thematic-node-p (node) (and (typep node 'substrate-node) (not (thematic-node-p node)))) (defun thematic-node-p (node) (and (typep node 'racer-substrate-node) (racer-description node))) ;;; ;;; ;;; (defun non-thematic-edge-p (edge) (and (typep edge 'substrate-edge) (not (thematic-edge-p edge)))) (defun thematic-edge-p (edge) (and (typep edge 'racer-substrate-edge) (racer-description edge))) ;;; ;;; ;;; (defmethod consistent-p ((obj racer-substrate) &key &allow-other-keys) (and ;(abox-consistent-p (abox obj)) (call-next-method))) ;;; ;;; hier definiert, denn diese gibt es in nRQL nicht ;;; (defmethod initialize-instance :after ((substrate racer-descriptions-substrate) &rest args &key load-from-file &allow-other-keys) (when load-from-file (load load-from-file)) (apply #'set-tbox substrate args)) (defmethod initialize-instance :after ((substrate racer-abox-mirror-substrate) &rest args &key &allow-other-keys) (let* ((abox (abox substrate)) (nodes (all-individuals abox)) (node-description-class (get-standard-node-description-class substrate)) (edge-description-class (get-standard-edge-description-class substrate))) (let ((hash (make-hash-table :size 10000))) (dolist (assertion (all-concept-assertions abox)) (let ((node (first assertion)) (concept (second assertion))) (if (gethash node hash) (push concept (gethash node hash)) (setf (gethash node hash) (list concept))))) (dolist (node nodes) (let* ((concepts (gethash node hash)) (concept (make-node-description node-description-class (or concepts :top)))) (create-node substrate node concept)))) (dolist (edge (all-role-assertions abox)) (let ((from (caar edge)) (to (cadar edge)) (role (make-edge-description edge-description-class (second edge)))) (unless (find-node substrate from) (create-node substrate from (make-node-description node-description-class 'top))) (unless (find-node substrate to) (create-node substrate to (make-node-description node-description-class 'top))) (create-edge substrate from to role))))) ;;; ;;; ;;; (defmethod copy ((substrate racer-substrate) &rest args) (declare (ignorable args)) (let ((copy (call-next-method))) (with-slots (tbox abox) copy (setf tbox (tbox substrate) abox (abox substrate))) copy)) (defmethod copy ((substrate racer-descriptions-substrate) &rest args) (declare (ignorable args)) (let ((copy (call-next-method))) (with-slots (tbox) copy (setf tbox (tbox substrate))) copy)) ;;; ;;; ;;; (defmethod delete-graph :after ((substrate racer-substrate) &rest args &key delete-abox-p &allow-other-keys) (with-slots (abox) substrate (when (and delete-abox-p abox) (forget-abox abox)))) ;;; ;;; ;;; (defmethod initialize-instance :after ((node racer-substrate-node) &rest initargs &key copy-p racer-description &allow-other-keys) (unless copy-p (with-slots (name in-graph racer-object) node (with-slots (abox racer-package) in-graph (when abox (setf racer-object (convert-to-racer-individual-name name racer-package)) (if racer-description (add-concept-assertion abox racer-object racer-description) (add-concept-assertion abox racer-object 'racer:top))))))) (defmethod delete-node :after ((substrate racer-substrate) (node racer-substrate-node) &key &allow-other-keys) (when (and (thematic-node-p node) (abox substrate)) (forget-concept-assertion (abox substrate) (racer-object node) (racer-description node)))) ;;; ;;; ;;; (defmethod initialize-instance :after ((object racer-substrate-edge) &rest initargs &key copy-p racer-description &allow-other-keys) (unless copy-p (with-slots (in-graph from to racer-object) object (with-slots (abox) in-graph (setf racer-object (list (racer-object from) (racer-object to) racer-description)) (when racer-description (add-role-assertion abox (racer-object from) (racer-object to) racer-description)))))) (defmethod delete-edge :after ((substrate racer-substrate) (edge racer-substrate-edge) &key &allow-other-keys) (when (thematic-edge-p edge) (forget-role-assertion (abox substrate) (racer-object (from edge)) (racer-object (to edge)) (racer-description edge)))) ;;; ;;; Wird bei der Objekterzeugung ":racer-description t" angeben, werden diese ;;; beiden Methoden verwendet, um die "description" in eine "gültige" (?) ;;; Racer-Beschreibung umzuwandeln. Sollte für Unterklassen entsprechend ;;; angepasst werden - je nach "description"-Unterklasse sollten entsprechende ;;; RACER-Umschreibungen zurückgegeben werden (wenn überhaupt möglich...) ;;; (defmethod convert-to-racer-description ((descr node-description) &optional package) (let ((descr (textual-description descr))) (convert-to-racer-concept-expression (if (consp descr) `(and ,@descr) descr) package))) (defmethod convert-to-racer-description ((descr edge-description) &optional package) (convert-to-racer-role-expression (textual-description descr) package)) ;;; ;;; Per Default werden Knoten gespiegelt, Kanten nicht!!! s. "convert-to-racer-description-p"! ;;; (defmethod create-node ((substrate racer-substrate) name (description node-description) &rest args) (apply #'make-node substrate :name name :description description args)) (defmethod make-node ((substrate racer-substrate) &rest args &key description racer-description (convert-to-racer-description-p t) &allow-other-keys) (apply #'call-next-method substrate :racer-description (if (and (not racer-description) convert-to-racer-description-p) (convert-to-racer-description description (racer-package substrate)) racer-description) args)) (defmethod create-edge ((substrate racer-substrate) (from substrate-node) (to substrate-node) (description edge-description) &rest args) (apply #'make-edge substrate from to :description description args)) (defmethod make-edge ((substrate racer-substrate) (from substrate-node) (to substrate-node) &rest args &key description racer-description (convert-to-racer-description-p nil) &allow-other-keys) (apply #'call-next-method substrate from to :description description :racer-description (if (and (not racer-description) convert-to-racer-description-p) (convert-to-racer-description description (racer-package substrate)) racer-description) args)) ;;; ;;; ;;; (defmethod copy-graph-item ((substrate racer-substrate) (object racer-substrate-object) &rest args) (apply #'call-next-method substrate object :convert-to-racer-description-p nil :racer-object (racer-object object) :racer-description (racer-description object) args)) ;;; ;;; ;;; (defmethod add-to-node ((substrate racer-substrate) (node substrate-node) (delta-description node-description) &key &allow-other-keys) (break "To be implemented!")) (defmethod add-to-node ((substrate racer-descriptions-substrate) (node substrate-node) (delta-description node-description) &key &allow-other-keys) (break "To be implemented!")) ;;; ;;; ;;; (defmethod get-associated-abox-individual ((substrate racer-substrate) (node substrate-node)) nil) (defmethod get-associated-abox-individual ((substrate racer-substrate) (node racer-substrate-node)) (racer-object node)) #+:midelora (defmethod get-associated-abox-individual ((substrate midelora-substrate) (node substrate-node)) node) ;;; ;;; ;;; (defmethod get-associated-substrate-node ((substrate substrate) abox-ind) ;;;(find-node substrate abox-ind :error-p nil)) ;;; wegen des Package-Problemes!!! (loop as key being the hash-key of (node-table substrate) as val being the hash-value of (node-table substrate) when (and (symbolp key) (string-equal (symbol-name key) (symbol-name abox-ind))) return val)) #+:midelora (defmethod get-associated-substrate-node ((substrate midelora-substrate) (abox-ind substrate-node)) abox-ind) ;;; ;;; ;;; (defmethod thematic-nodes ((substrate racer-substrate)) (get-nodes substrate :satisfying #'thematic-node-p)) (defmethod thematic-edges ((substrate racer-substrate)) (get-edges substrate :satisfying #'thematic-edge-p)) ;;; ;;; ;;; #| (with-substrate (test :type 'racer-substrate :delete-if-exists-p t :error-p t :new-tbox-p t :new-abox-p t :abox 'vdvgamma) (setf *x* *cur-substrate*) (node a (ncon (a b (all r (or (not d) (not c)))))) (node b (ncon (c d))) (edge a b (econ r) :convert-to-racer-description-p t) ; wichtig, sonst wird keine ABox-Kante angelegt! (visualize *x*)) (with-substrate (test :type 'racer-descriptions-substrate :delete-if-exists-p t :error-p t :new-tbox-p t :new-abox-p t :abox 'gamma) (setf *x* *cur-substrate*) (node a (ncon (and a (all r (not b))))) (node b (ncon (or b (all (inv r) (not a))))) (edge a b (econ r) :convert-to-racer-description-p t) ; wichtig, sonst wird keine ABox-Kante angelegt! (visualize *x*)) (with-substrate (family-mirror :type 'racer-abox-mirror-substrate :delete-if-exists-p t ;:racer-package 'racer-user :load-from-file "/home/mwessel/lispworks/work/dlmaps/query/family-1-no-signature.racer") (setf *x* *cur-substrate*)) (with-substrate (heflin :type 'racer-abox-mirror-substrate :delete-if-exists-p t :racer-package 'thematic-substrate :load-from-file "/home/mwessel/lispworks/work/dlmaps/query/heflin/heflin/university.lisp") (setf *x* *cur-substrate*)) (with-substrate (heflin :type 'racer-abox-mirror-substrate :delete-if-exists-p t :racer-package 'thematic-substrate :load-from-file "/home/mwessel/lispworks/work/dlmaps/query/heflin/heflin/university0.lisp") (setf *x* *cur-substrate*)) |#
15,418
Common Lisp
.lisp
350
36.862857
123
0.668923
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
49f757011fc5d202b709b249ab23f1d3965920e169d08a96018b108d24502120
12,513
[ -1 ]
12,514
rolebox-substrate6.lisp
lambdamikel_DLMAPS/src/thematic-substrate/rolebox-substrate6.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) ;;; ;;; ;;; (defgeneric get-support (edge &key &allow-other-keys)) (defgeneric apply-rolebox-axioms (rolebox-substrate &key &allow-other-keys)) ;;; ;;; Das Rolebox-Substrate bietet die Möglichkeit, ein Substrate ;;; mit einer Rolebox zu assoziieren. Da in der Rolebox Rollenaxiome, ;;; inverse und reflexive Rollen deklariert werden, verwaltet das ;;; Substrate automatisch die Inversen und Reflexiven. ;;; (defpersistentclass rolebox-edge-description (simple-edge-description)) (defmethod implies-p ((descr1 rolebox-edge-description) (descr2 rolebox-edge-description) &rest args) (subsetp (ensure-list (textual-description descr1)) (ensure-list (textual-description descr2)))) ;;; ;;; ;;; (defmethod eq-description-p ((description rolebox-edge-description)) (equal '(eq) (textual-description description))) ;;; ;;; ;;; (defmethod copy ((description rolebox-edge-description) &rest args) (make-edge-description (constructor-sym description) (textual-description description))) ;;; ;;; ;;; (defpersistentclass rolebox-node-description (simple-node-description) ) (defmethod copy ((description rolebox-node-description) &rest args) (make-edge-description (constructor-sym description) (textual-description description))) ;;; ;;; ;;; (defpersistentclass rolebox-substrate (substrate) ((rbox :initarg :rbox :reader substrate-rbox :initform nil))) (defmethod initialize-instance :after ((substrate rolebox-substrate) &rest initargs &key (rbox *cur-rbox*)) (setf (slot-value substrate 'rbox) (find-rbox rbox))) ;;; ;;; ;;; (defpersistentclass rolebox-substrate-node (substrate-node)) (defun rolebox-substrate-node-p (node) (typep node 'rolebox-substrate-node)) ;;; ;;; (defpersistentclass rolebox-substrate-edge (substrate-edge) ((inverse-edge :reader inverse-edge :initform nil) (triangles :reader triangles :initform nil) (referenced-by :reader referenced-by :initform nil))) (defun rolebox-substrate-edge-p (edge) (typep edge 'rolebox-substrate-edge)) ;;; ;;; ;;: (defmethod establish-context-for ((substrate rolebox-substrate) continuation) (let ((*cur-rbox* (substrate-rbox substrate))) (if (next-method-p) (call-next-method) (funcall continuation)))) (defmethod set-context-for progn ((substrate rolebox-substrate)) (setf *cur-rbox* (substrate-rbox substrate))) ;;; ;;; ;;; (defmethod get-standard-node-description-class ((substrate rolebox-substrate)) 'rolebox-node-description) (defmethod get-standard-edge-description-class ((substrate rolebox-substrate)) 'rolebox-edge-description) (defmethod get-standard-edge-class ((substrate rolebox-substrate)) 'rolebox-substrate-edge) (defmethod get-standard-node-class ((substrate rolebox-substrate)) 'rolebox-substrate-node) ;;; ;;; ;;: (defmethod create-node ((substrate rolebox-substrate) (name symbol) (description node-description) &rest args) (apply #'make-node substrate :name name :description description args)) (defmethod make-node ((substrate rolebox-substrate) &rest initargs &key copy-p (create-reflexive-edges-p t) (edge-constructor #'(lambda (node ref-role) (create-edge substrate node node (make-edge-description (get-standard-edge-description-class substrate) ref-role) :create-inverse-p nil :error-p nil))) &allow-other-keys) (let ((node (apply #'call-next-method substrate initargs))) (when node (unless copy-p (with-slots (rbox) substrate (when (and rbox create-reflexive-edges-p) (dolist (ref-role (reflexive-roles rbox)) (funcall edge-constructor node ref-role)))))) node)) ;;; ;;; ;;; (defmethod create-edge ((substrate rolebox-substrate) (from substrate-node) (to substrate-node) (description rolebox-edge-description) &rest args) (apply #'make-edge substrate from to :description description args)) (defmethod make-edge ((substrate rolebox-substrate) (from rolebox-substrate-node) (to rolebox-substrate-node) &rest args &key description (create-inverse-p t) copy-p &allow-other-keys) (let ((edge (apply #'call-next-method substrate from to args))) (when (and (not copy-p) edge create-inverse-p) (with-slots (rbox) substrate (when rbox (let* ((inv-description (make-inverse-description rbox description))) (when inv-description (let* ((iedge (apply #'make-edge substrate to from :description inv-description :create-inverse-p nil args))) (with-slots (inverse-edge) iedge (setf inverse-edge edge)) (with-slots (inverse-edge) edge (setf inverse-edge iedge)))))))) edge)) ;;; ;;; ;;; (defmethod compute-triangle-index ((object rolebox-substrate-edge)) (with-slots (triangles in-graph from to) object (loop-over-nodes (between in-graph) (let ((from-between (get-edges-between in-graph from between)) (between-to (get-edges-between in-graph between to))) (when (and from-between between-to) (loop as fb in from-between do (loop as bt in between-to do (push (list fb bt) triangles) (push object (slot-value fb 'referenced-by)) (push object (slot-value bt 'referenced-by)))))))) object) (defmethod compute-triangle-index ((substrate rolebox-substrate)) (loop-over-edges (edge substrate) (compute-triangle-index edge)) substrate) (defmethod get-support ((edge rolebox-substrate-edge) &key &allow-other-keys) (or (triangles edge) (progn (compute-triangle-index edge) (triangles edge)))) ;;; ;;; ;;; (defmethod delete-edge ((substrate rolebox-substrate) (edge rolebox-substrate-edge) &key (delete-inverse-p t) (error-p t) &allow-other-keys) (call-next-method) (dolist (referencing-edge (referenced-by edge)) (with-slots (triangles) referencing-edge (setf triangles nil))) (with-slots (from to inverse-edge) edge (when (and inverse-edge delete-inverse-p) (let ((inv-edge inverse-edge)) (setf inverse-edge nil) (with-slots (inverse-edge) inv-edge ; verhindert Endlos-Schleife! (setf inverse-edge nil)) (delete-edge substrate inv-edge :error-p error-p))))) ;;; ;;; ;;; (defmethod copy ((substrate rolebox-substrate) &rest args &key (rbox (substrate-rbox substrate)) &allow-other-keys) (let ((copy (apply #'call-next-method substrate :rbox rbox args))) (when copy (dolist (old-edge (get-edges substrate)) (when (inverse-edge old-edge) (let ((new-edge (find-edge copy (id old-edge))) (new-inv-edge (find-edge copy (id (inverse-edge old-edge))))) (with-slots (inverse-edge) new-edge (setf inverse-edge new-inv-edge)))))) copy)) ;;; ;;; ;;; (defmethod make-inverse-description ((rbox rolebox) (description rolebox-edge-description)) (let ((inv-role (inv-role rbox (textual-description description)))) (when inv-role (make-edge-description (constructor-sym description) inv-role)))) (defmethod lookup ((box rolebox) (r rolebox-edge-description) (s rolebox-edge-description)) (lookup box (textual-description r) (textual-description s))) (defmethod lookup ((box rolebox) (r rolebox-substrate-edge) (s rolebox-substrate-edge)) (lookup box (description r) (description s))) ;;; ;;; ;;; (defmethod apply-rolebox-axioms ((substrate rolebox-substrate) &key (edges (get-edges substrate)) (nodes (get-nodes substrate)) (edge-constructor #'(lambda (from to comp &key support) (declare (ignore support)) (create-edge substrate from to (make-edge-description (get-standard-edge-description-class substrate) comp)))) &allow-other-keys) (let ((iter t) (dummy-description (make-edge-description (get-standard-edge-description-class substrate) 'dummy))) (with-marked-objects (nodes) (loop while iter do (setf iter nil) (dolist (r edges) (let* ((from (from r)) (over (to r)) (s (outgoing over))) (when (and (marked-p from) (marked-p over)) (dolist (s s) (when (rolebox-substrate-edge-p s) (let ((to (to s))) (when (marked-p to) (let* ((comp (lookup (substrate-rbox substrate) r s)) (comp (if (consp comp) (if (cdr comp) comp (first comp)) comp))) (unless (eq (to r) (from s)) (error "Bad triangle found!")) (when comp (change-textual-description dummy-description comp) (let ((edge (=>-edge-present-p substrate from to dummy-description))) (unless edge (funcall edge-constructor from to comp :support (list r s)) (setf iter t)))))))))))))) substrate)) ;;; ;;; ;;; (defmethod consistent-p ((substrate rolebox-substrate) &key (nodes (get-nodes substrate)) (edges (get-edges substrate)) (check-node-labels-p t) (check-edge-labels-p t) aux-description-p check-loops-p check-inverses-p) (let ((dummy-description (make-edge-description (get-standard-edge-description-class substrate) 'dummy))) ;;; T, iff reflexive, inverse, and role composition frame conditions are EXPLICITLY satisfied! (and (=> check-node-labels-p (every #'consistent-p (get-nodes substrate))) (=> check-edge-labels-p (every #'consistent-p (get-edges substrate)) ) (with-marked-objects (nodes) (with-marked-objects (edges nil) (and (=> check-loops-p (every #'(lambda (ref-role) (change-textual-description dummy-description ref-role) (every #'(lambda (node) (=>-edge-present-p substrate node node dummy-description)) nodes)) (reflexive-roles (substrate-rbox substrate)))) (=> check-inverses-p (every #'(lambda (edge) (let ((inv-descr (inv-role (substrate-rbox substrate) (textual-description (description edge))))) (=> inv-descr (progn (change-textual-description dummy-description inv-descr) (=>-edge-present-p substrate (to edge) (from edge) dummy-description))))) edges)) (dolist (r edges t) (let* ((from (from r)) (over (to r)) (s (outgoing over))) (dolist (s s) (when (and (rolebox-substrate-edge-p s) (marked-p s)) (let ((to (to s))) (when (marked-p to) (let ((comp (if aux-description-p (lookup (substrate-rbox substrate) (aux-description r) (aux-description s)) (lookup (substrate-rbox substrate) (description r) (description s))))) (unless (eq (to r) (from s)) (error "Bad triangle found!")) (when comp (change-textual-description dummy-description comp) (unless (=>-edge-present-p substrate from to dummy-description) (return-from consistent-p nil)))))))))))))))) (defmethod aux-description-consistent-p ((substrate rolebox-substrate) processed-edges) (declare (ignore processed-edges)) (consistent-p substrate :aux-description-p t)) ;;; ;;; ;;; (defmethod enumerate-atomic-configurations ((substrate rolebox-substrate) &rest args &key (edge-setter #'(lambda (edge sym &key respect-inverses-p &allow-other-keys) (change-textual-description (description edge) sym) (when (and (inverse-edge edge) respect-inverses-p) (change-textual-description (description (inverse-edge edge)) (inv-role (substrate-rbox substrate) sym))))) (respect-inverses-p t) (edges (if *non-determinism-p* (reorder (get-underspecified-edges substrate :exclude-inverses-p respect-inverses-p)) (get-underspecified-edges substrate :exclude-inverses-p respect-inverses-p))) (manager-fn #'(lambda (sel-edge edges processed-edges &key respect-inverses-p &allow-other-keys) (values (let ((edges (remove sel-edge edges))) (if (and respect-inverses-p (inverse-edge sel-edge)) (remove (inverse-edge sel-edge) edges) edges)) (if (and respect-inverses-p (inverse-edge sel-edge)) (cons sel-edge (cons (inverse-edge sel-edge) processed-edges)) (cons sel-edge processed-edges))))) (final-check-fn #'(lambda (substrate &rest args) (apply #'consistent-p substrate args))) &allow-other-keys) (apply #'call-next-method substrate :edge-setter edge-setter :respect-inverses-p respect-inverses-p :edges edges :manager-fn manager-fn :final-check-fn final-check-fn args)) ;;; ;;; ;;; #| (with-rbox (test-box :delete-if-exists-p t :roles (r s t) :reflexive-roles (t) :inverse-roles ((r s) (s r)) :axioms ((r r s) (r s s))) (with-substrate (hello :type 'rolebox-substrate :delete-if-exists-p t) (node a (ncon a)) (node b (ncon a)) (node c (ncon c)) (node d (ncon d)) (edge a b (econ r)) (edge b c (econ r)) (edge c d (econ r)) (visualize (list *cur-substrate* (apply-rolebox-axioms (copy *cur-substrate*)))))) (with-rbox (test-box :delete-if-exists-p t :roles (r s) ;:reflexive-roles (r) :inverse-roles ((r s) (s r))) (with-substrate (hello :type 'rolebox-substrate :delete-if-exists-p t) (node a (ncon a-descr)) (node b (ncon b-descr)) (edge a b (econ (r s))) (visualize (cons (copy *cur-substrate*) (get-all-atomic-configurations (apply-rolebox-axioms *cur-substrate*)))))) (with-rbox (test-box :delete-if-exists-p t :roles (r s t) :inverse-roles ((s r)) :reflexive-roles (t) :axioms ((r r (s r t)))) (with-substrate (hello :type 'rolebox-substrate :delete-if-exists-p t) (node a (ncon a-descr)) (node b (ncon b-descr)) (node c (ncon c-descr)) (edge a b (econ r)) (edge b c (econ r)) (apply-rolebox-axioms *cur-substrate*) (terpri) (princ (consistent-p *cur-substrate*)) (visualize (let ((copy (copy *cur-substrate*))) (cons copy (get-all-atomic-configurations (apply-rolebox-axioms *cur-substrate*))))))) (with-rbox (rcc5-rolebox) (with-substrate (hello :type 'rolebox-substrate :delete-if-exists-p t) (setf *x* *cur-substrate*) (node a (ncon a-descr)) (node b (ncon b-descr)) (node c (ncon c-descr)) (node d (ncon d-descr)) (edge a b (econ ppi)) (edge b c (econ dr)) (edge c d (econ po)) (princ (consistent-p *cur-substrate*)) (apply-rolebox-axioms *cur-substrate*) (princ (consistent-p *cur-substrate*)) (let ((all (cons (copy *cur-substrate*) (get-all-atomic-configurations *cur-substrate*)))) (princ (mapcar #'consistent-p all)) (visualize (remove-if-not #'consistent-p all))))) (with-rbox (test-box :delete-if-exists-p t :roles (r s t) :inverse-roles ((s r)) :reflexive-roles (t) :axioms ((r r (s r t)))) (with-substrate (hello :type 'rolebox-substrate :delete-if-exists-p t) (node a (ncon a-descr)) (node b (ncon b-descr)) (node c (ncon c-descr)) (node d (ncon c-descr)) (setf ab (edge a b (econ r))) (setf bc (edge b c (econ r))) (princ (consistent-p *cur-substrate*)) (terpri) (princ (consistent-p *cur-substrate* :edges (list ab))) (apply-rolebox-axioms *cur-substrate*) (dolist (edge (get-edges-between *cur-substrate* 'd 'd)) (delete-edge *cur-substrate* edge)) (terpri) (princ "Consistent: ") (princ (consistent-p *cur-substrate* :check-loops-p t)) (visualize *cur-substrate*))) (with-rbox (rcc5-rolebox) (with-substrate (hello :type 'rolebox-substrate :delete-if-exists-p t) (setf a (node a (ncon a-descr))) (setf b (node b (ncon b-descr))) (setf c (node c (ncon c-descr))) (node d (ncon c-descr)) (setf ab (edge a b (econ po))) (setf bc (edge b c (econ po))) (edge c d (econ po)) (apply-rolebox-axioms *cur-substrate* :edges (list ab bc) :nodes (list a b c)) (visualize *cur-substrate*))) (with-rbox (rcc5-rolebox) (with-substrate (hello :type 'rolebox-substrate :delete-if-exists-p t) (setf a (node a (ncon a-descr))) (setf b (node b (ncon b-descr))) (setf c (node c (ncon c-descr))) (edge a b (econ pp)) (edge b c (econ pp)) (edge a c (econ dr)) (visualize *cur-substrate*) (princ (consistent-p *cur-substrate*)))) (with-substrate (hello :type 'rolebox-substrate :delete-if-exists-p t :rbox 'rcc5-rolebox) (setf a (node a (ncon a-descr))) (setf b (node b (ncon b-descr))) (setf c (node c (ncon c-descr))) (edge a b (econ pp)) (edge b c (econ pp)) (edge a c (econ pp)) (visualize *cur-substrate*) (princ (consistent-p *cur-substrate*))) |#
22,748
Common Lisp
.lisp
487
29.667351
118
0.493821
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
5d5cfe02ae80a1066ddafbcf84136efef22a62f45f240ff52b46d1fcc4f2679a
12,514
[ -1 ]
12,515
spatial-substrate.lisp
lambdamikel_DLMAPS/src/thematic-substrate/unfinished/spatial-substrate.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) ;;; ;;; ;;; (defpersistentclass spatial-substrate (rolebox-substrate) ((consistency-relevant-edges :reader consistency-relevant-edges :initform nil))) (defmethod create-substrate ((class (eql 'spatial-substrate)) &key name tbox abox rbox (real-class 'spatial-substrate)) (create-substrate 'rolebox-substrate :name name :abox abox :tbox tbox :rbox rbox :real-class 'spatial-substrate)) ;;; ;;; ;;; (defmethod simplify ((substrate spatial-substrate)) substrate) (defmethod add-eq-loops ((substrate spatial-substrate)) (dolist (node (network-nodes substrate)) (create-edge substrate node node 'eq))) (defmethod complete ((substrate spatial-substrate)) (add-eq-loops substrate) ;;;(add-inverse-edges substrate) (add-missing-edges substrate)) (defmethod enumerate-atomic-configurations ((substrate spatial-substrate) &key how-many (edges (consistency-relevant-edges substrate)) (sym-gen #'(lambda (edge processed-edges) (description edge))) (selector-fn #'(lambda (rem-edges processed-edges) (first rem-edges))) (manager-fn #'(lambda (sel-edge edges processed-edges) (values (remove sel-edge (remove (inverse-edge sel-edge) edges)) (cons sel-edge (cons (inverse-edge sel-edge) processed-edges))))) (fn #'materialize) (final-check-fn #'(lambda (x) (consistent-p x :force-p t))) (construction-check-fn #'(lambda (x) t))) (apply #'call-next-method substrate :edges edges :how-many how-many :sym-gen sym-gen :selector-fn selector-fn :manager-fn manager-fn :fn fn :final-check-fn final-check-fn :construction-check-fn construction-check-fn nil)) ;;; ;;; ;;; (defpersistentclass spatial-object (rolebox-substrate-node) nil) (defmethod create-node ((substrate spatial-substrate) name description &rest args &key (real-class 'spatial-object)) (apply #'call-next-method substrate name description :real-class real-class args)) (defpersistentclass spatial-relation (rolebox-substrate-edge) ((consistency-relevant-a-triangles :reader consistency-relevant-a-triangles :initform nil))) (defmethod create-edge ((substrate spatial-substrate) from to description &rest args &key (error-p t) (real-class 'spatial-relation)) (if (get-edges-between substrate from to) (when error-p (error "Edge (~A,~A) already exists in substrate ~A!" from to substrate)) (apply #'call-next-method substrate from to description :real-class real-class :error-p error-p args))) ;;; ;;; Spatial-Relation-Methoden ;;; (defmethod initialize-instance :after ((object spatial-relation) &rest initargs) (with-slots (consistency-relevant-edges) (in-substrate object) (when (consistency-relevant-p object) (push object consistency-relevant-edges)))) (defmethod consistency-relevant-p ((edge spatial-relation)) (not (eq (from edge) (to edge)))) (defmethod delete-edge :after ((substrate spatial-substrate) (edge spatial-relation) &key &allow-other-keys) (with-slots (inverse-edge) edge (with-slots (consistency-relevant-edges) substrate (setf consistency-relevant-edges (delete edge consistency-relevant-edges)) (dolist (referencing-edge (referenced-by edge)) (when (typep referencing-edge 'spatial-relation) (with-slots (consistency-relevant-a-triangles) referencing-edge (setf consistency-relevant-a-triangles (delete-if #'(lambda (tri) (member edge tri)) consistency-relevant-a-triangles)))))))) (defmethod get-support ((edge spatial-relation)) (with-slots (consistency-relevant-a-triangles in-substrate) edge (with-slots (consistency-relevant-edges) in-substrate (or consistency-relevant-a-triangles (setf consistency-relevant-a-triangles (remove-if-not #'(lambda (tri) (and (consistency-relevant-p (first tri)) (consistency-relevant-p (first tri)))) (a-triangles edge))))))) (defun compute-label-from-given-support (edge support) (let* ((rbox (substrate-rbox (in-substrate edge))) (role (mapcar #'(lambda (supp) (let* ((r (current-label (first supp))) (s (current-label (second supp))) (res (lookup rbox r s))) res)) (loop as tri in (consistency-relevant-a-triangles edge) when (and (member (first tri) support) (member (second tri))) collect tri)))) (if role (reduce #'intersection role) (full-disjunctive-role rbox))))
5,986
Common Lisp
.lisp
108
37.851852
133
0.547615
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
a5be23e65a0274287297f4d133cfd137e3663b5f60a1e35b938594c39c8344c0
12,515
[ -1 ]
12,516
languages.lisp
lambdamikel_DLMAPS/src/prover/languages.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) (defpersistentclass dl () ((name :accessor name :initarg :name))) (defmethod initialize-instance :after ((lang dl) &rest initargs) (push lang *all-dls*)) ;;; ;;; ;;; (defpersistentclass needs-basic-abox-substrate ()) (defpersistentclass needs-rolebox-abox-substrate (needs-basic-abox-substrate)) (defpersistentclass needs-jepd-abox-substrate (needs-rolebox-abox-substrate)) ;;; ;;; Hier werden nur Kombinationen bzw. Spezialisierungen definiert, die ;;; sinnvolle Spezialisierungen bzgl. des Proover-Codes ermoeglichen ;;; Idee: für die hier drei definierten "Top"-Klassen werden Proover implementiert; ;;; falls die Performanz unzureichend ist, koennen die get-code-Methoden des ;;; Provers entsp. spezialisiert werden (= effizienter gemacht fuer speziellere Sprachen) ;;; z.B. Blocking-Check aus fuer ALC, etc. Wichtig ist jedoch, dass der Top-Proover ;;; prinzipiell die mächtigste Sprache (also z.B. SHI-WICODIR) behandeln kann! ;;; Nur so werden die Code-Spezialisierungen optional. Daher ist die Vererbungshierarchie ;;; in "diese Richtung" angelegt ;;; (defpersistentclass dl-with-disjunctive-aboxes (dl)) ;;; ;;; ;;; (defpersistentclass dl-with-role-hierarchies (dl)) ;;; alles meine DLs haben role hierarchies (defpersistentclass dl-with-domain-and-range-restrictions-on-roles (dl)) (defpersistentclass dl-with-disjunctive-roles (dl)) (defpersistentclass dl-with-conjunctive-roles (dl)) (defpersistentclass dl-with-inverse-roles (dl)) ; also symmetric roles (defpersistentclass dl-with-transitive-roles (dl)) (defpersistentclass dl-with-disjoint-roles (dl)) (defpersistentclass dl-with-rolebox (dl)) (defpersistentclass dl-with-jepd-property (dl-with-rolebox dl-with-disjoint-roles dl-with-inverse-roles)) ;;; ;;; ;;; (defpersistentclass boolean-dl (dl)) ;;; ;;; ;;; (defpersistentclass dl-with-somes (dl)) (defpersistentclass dl-with-features (dl)) (defpersistentclass dl-with-alls (dl)) ;;; ;;; ;;; (defpersistentclass alch-basis (boolean-dl dl-with-somes dl-with-alls dl-with-domain-and-range-restrictions-on-roles dl-with-role-hierarchies)) ;;; ;;; ;;; (defpersistentclass dl-with-number-restrictions (dl)) (defpersistentclass dl-with-unqualified-number-restrictions (dl-with-number-restrictions)) (defpersistentclass dl-with-qualified-number-restrictions (dl-with-number-restrictions)) ;;; ;;; ;;; (defpersistentclass dl-with-combined-some-all-rule (dl)) (defpersistentclass dl-with-blocking (dl)) (defpersistentclass dl-with-simple-blocking (dl-with-blocking)) (defpersistentclass dl-with-equal-blocking (dl-with-simple-blocking)) (defpersistentclass dl-with-subset-blocking (dl-with-simple-blocking)) (defpersistentclass dl-with-pairwise-blocking (dl-with-blocking)) (defpersistentclass dl-with-model-merging (dl)) ;;; ;;; hier werden nur die Beweiser spezialisiert, ;;; fuer die Implementationen existieren! ;;; (defpersistentclass super-dl (alch-basis dl-with-unqualified-number-restrictions dl-with-disjunctive-aboxes dl-with-inverse-roles dl-with-transitive-roles dl-with-features dl-with-pairwise-blocking needs-basic-abox-substrate)) ;;; ;;; Basis DLs ;;; (defpersistentclass alch (alch-basis dl-with-model-merging dl-with-combined-some-all-rule needs-basic-abox-substrate)) (defpersistentclass alchi (alch-basis dl-with-inverse-roles needs-basic-abox-substrate)) ;;; ;;; DLs ohne inverse Rollen ;;; (defpersistentclass alchf (alch dl-with-features)) (defpersistentclass alchf-rplus (alchf dl-with-transitive-roles dl-with-subset-blocking)) (defpersistentclass alchn (alch dl-with-unqualified-number-restrictions)) (defpersistentclass alchfn-rplus (alchf-rplus alchn)) ;;; ;;; DLs mit inversen Rollen ;;; (defpersistentclass alchi-rplus (alchi dl-with-transitive-roles dl-with-equal-blocking)) (defpersistentclass alchif (alchi dl-with-features)) (defpersistentclass alchif-rplus (dl-with-pairwise-blocking alchi-rplus alchif )) (defpersistentclass alchifn-rplus (alchif-rplus dl-with-unqualified-number-restrictions)) ;;; ;;; Rolebox/JEPD Substrate DLs ;;; (defpersistentclass alci-ra-minus (alch-basis dl-with-disjunctive-aboxes dl-with-rolebox needs-rolebox-abox-substrate)) (defpersistentclass alci-ra-jepd (alci-ra-minus dl-with-jepd-property needs-jepd-abox-substrate)) (defpersistentclass alci-rcc (alci-ra-jepd)) ;;; ;;; ;;; (eval `(progn ,@(mapcar #'(lambda (dl) `(defconstant ,(intern (format nil "+~A+" dl)) (make-instance (quote ,dl) :name (symbol-name ',dl)))) '(dl super-dl alch alchf alchn alchf-rplus alchfn-rplus alchi alchif alchi-rplus alchif-rplus alchifn-rplus ;alchif-rplus alci-ra-minus alci-ra-jepd alci-rcc)))) ;;; ;;; ;;; (defmethod make-language ((type symbol)) (or (loop as dl in *all-dls* when (eq (type-of dl) type) return dl) (make-instance type))) (defmethod make-language ((type dl)) type)
6,351
Common Lisp
.lisp
152
30.756579
105
0.628903
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
29fa33a137297ae1cf5e9c6928bfe5120c5701283048005e622c6638b699b87f
12,516
[ -1 ]
12,517
core-models.lisp
lambdamikel_DLMAPS/src/prover/core-models.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (timed-defmethod delete-non-det-assertions ((abox abox)) (with-abox* (abox) (let ((*reflexive-checks-p* nil)) ; wegen Error checking in delete-node etc. (labels ((det-p (cp) (and (not (cdr cp)) (or (not (first cp)) (zerop (first cp))))) (deterministic-p (node-or-edge) (every #'(lambda (constraint) (if (consp constraint) (let* ((node (first constraint)) (concept (second constraint)) (cp (get-choice-points concept :node node))) (det-p cp)) (det-p (get-choice-points constraint)))) (created-by node-or-edge))) (relevant-p (node) (=> *store-instance-retrieval-model-p* (or (= (id node) 1) ;;; nachfolger vom root node? (some #'(lambda (in) (= (id (from in)) 1)) (incoming node)))))) (loop-over-abox-nodes (node abox) (if (or (and (not (old-p node)) (not (deterministic-p node))) (not (relevant-p node))) (delete-node abox node) (progn (dolist (slot '(choice-points really-satisfiable-p cache-satisfiable-p ;deterministically-expanded-p realized-p)) (setf (slot-value node slot) nil)) (reset-label (description node))))) (loop-over-abox-edges (edge abox) (reset-label (description edge)) (when (and (not (old-p edge)) (not (deterministic-p edge))) (delete-edge abox edge))) (let ((history (get-history abox))) (dolist (action history) (when (action-det-action-p action) (let* ((post (slot-value action 'post))) (dolist (post post) (let ((concept (second post)) (node (first post))) (when (relevant-p node) (pushnew concept (slot-value node 'told-concepts)) (if (or (is-all-concept-p concept) (is-at-most-concept-p concept)) (add-to-unexpanded node concept) (add-to-expanded node concept))))))))) (with-slots (action-timestamp-counter current-action choice-point-counter) abox (setf action-timestamp-counter 0 current-action nil choice-point-counter 0)) abox)))) (timed-defmethod compute-core-model ((abox abox)) (with-abox (abox) (loop-over-abox-nodes (node abox) (when (or (and (old-p node) ;;; fuers instance retrieval model brauch ich nur den root node! (not *store-instance-retrieval-model-p* )) (= (id node) 1)) (setf (slot-value node 'core-model) (make-model-from-node node)))) abox))
3,629
Common Lisp
.lisp
74
28.513514
87
0.444444
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
fdfe5d3fd26cf25de04856ee3306e43ac880a28484c7a565c4afaff422ff784a
12,517
[ -1 ]
12,518
blocking2.lisp
lambdamikel_DLMAPS/src/prover/blocking2.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defmacro hist-incoming (node) `(let* ((id (id ,node)) (created-before (remove-if-not #'(lambda (in) (< (id (from in)) id)) (incoming ,node)))) (if (some #'old-p created-before) nil (first created-before)))) (defmethod blocking-blocked-p ((language dl-with-subset-blocking) (blocking abox-node) (blocked abox-node)) ;;; Subset Blocking f. ALCHF-RPLUS (loop-over-node-concepts (concept blocked) (unless (on-tableau-p blocking concept) (return-from blocking-blocked-p nil))) t) (defmethod blocking-blocked-p ((language alchi-rplus) (blocking abox-node) (blocked abox-node)) ;;; Equal Blocking f. ALCHI-RPLUS (loop-over-node-concepts (concept blocked) (unless (on-tableau-p blocking concept) (return-from blocking-blocked-p nil))) (loop-over-node-concepts (concept blocking) (unless (on-tableau-p blocked concept) (return-from blocking-blocked-p nil))) t) (defmethod blocking-blocked-p ((language alchif-rplus) (blocking abox-node) (blocked abox-node)) ; wird doppelt aufgerufen, pairwise blocking (call-next-method)) (defmethod blocking-blocked-p ((language dl) (blocking abox-node) (blocked abox-node)) nil) ;;; ;;; ;;; (defmethod blocking-or-blocking-predecessor ((abox abox) (blocking node)) (or (slot-value blocking 'blocking-for) (let ((incoming (hist-incoming blocking))) (and incoming (blocking-or-blocking-predecessor abox (from incoming)))))) (defmacro loop-between-blocked-blocking ((var blocked blocking) &body body) `(let ((,var ,blocked) (in nil)) (loop ,@body (when (eq ,var ,blocking) (return)) (setf in (hist-incoming ,var)) (unless in (error "Node ~A is not a predecessor of ~A!" ,blocking ,blocked)) (setf ,var (from in))))) ;;; ;;; ;;; (defmethod find-blocking-node ((abox abox) (blocked node)) (when (and (active-p blocked) (not (old-p blocked)) (not (blocked-p blocked))) (let ((incoming (hist-incoming blocked)) (path (list blocked)) (blocking-node nil)) (loop while incoming do (let ((blocking (from incoming))) (push blocking path) (setf incoming (hist-incoming blocking)) (when (blocking-blocked-p *language* blocking blocked) (announce "Found blocked node ~A: blocked by: ~A" blocked blocking) (register-blocking-blocked abox blocking blocked) ; deaktiviert den Knoten auch (setf blocking-node blocking incoming nil)))) blocking-node))) (defrule block-nodes (dl-with-simple-blocking abox :args (blocked)) (when *blocking-enabled-p* (if blocked (find-blocking-node abox blocked) (loop-over-leaf-nodes (blocked abox) (find-blocking-node abox blocked)))) +insert-body-code+) (defrule block-nodes (dl-with-pairwise-blocking abox :args (blocked)) (labels ((do-it (blocked) (when (and (active-p blocked) (not (old-p blocked)) (not (blocked-p blocked))) (let* ((x blocked) (incoming (hist-incoming x))) (when (and incoming (not (deleted-p incoming))) (let* ((role (role incoming)) (x1 (from incoming)) (incoming (hist-incoming x1)) (path (list x1 x))) (when (and x x1 incoming (not (deleted-p incoming))) (loop while incoming do (let* ((y (from incoming)) (blocking y)) (setf incoming (hist-incoming y)) (push y path) (when (and incoming (not (deleted-p incoming))) (let ((y1 (from incoming))) (push y1 path) (if (and (eq (role incoming) role) (blocking-blocked-p *language* x y) (blocking-blocked-p *language* x1 y1)) (progn (announce "Found pairwise blocked node ~A: blocked by: ~A" blocked blocking) (register-blocking-blocked abox blocking blocked) (setf incoming nil)) (setf incoming (hist-incoming y1)))))))))))))) (when *blocking-enabled-p* (if blocked (do-it blocked) (loop-over-leaf-nodes (blocked abox) (do-it blocked))))) +insert-body-code+)
5,821
Common Lisp
.lisp
123
28.788618
107
0.506182
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
1f949354f13dd70ed99d56766bc687f41d714b9068a17132e95e6acfaec9f661
12,518
[ -1 ]
12,519
process-test.lisp
lambdamikel_DLMAPS/src/prover/process-test.lisp
(defvar *count* 0) (defun test () (let ((*count* 0)) (mp:process-run-function "TEST" nil #'(lambda () (let ((*count* 'test)) (princ *count*) (terpri) (let ((*count* 'test2)) (test2)) (princ *count*) (princ 'done) (terpri) (princ *count*) (terpri)))) *count*)) (defun test2 () (princ *count*) (terpri) (let ((*count* 'test3)) (test3)) (princ *count*) (terpri)) (defun test3 () (princ *count*) (terpri) (setf *count* 0) (loop as i from 1 to 100 do (incf *count*)) (princ *count*))
929
Common Lisp
.lisp
29
15.517241
62
0.335656
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
220a6a5e7360fba81ed3ea61c806411f8aef461ab5675f63254326f6a845ffe9
12,519
[ -1 ]
12,520
alchif-prover.lisp
lambdamikel_DLMAPS/src/prover/alchif-prover.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (define-prover ((abox-sat alchif abox)) (:main (perform (deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (feature-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (some-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (success))))))))))))
854
Common Lisp
.lisp
30
16.2
60
0.4324
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
6f7b6f2c5715e8046aaa6bd00b9458c183fb8c7e819532c5b854b5d2746dc7a4
12,520
[ -1 ]
12,521
abox9.lisp
lambdamikel_DLMAPS/src/prover/abox9.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defpersistentclass abox (substrate) ((tbox :reader tbox :initarg :tbox :initform *cur-tbox*) (abox-version :accessor abox-version :initform 0) (prepared-p :reader prepared-p :initform nil) (satisfiable :reader satisfiable :initform :not-tested) ;;; ;;; ;;; (language :accessor language :initform nil :initarg :language) (ready-for-retrieval :initform nil) #+:use-membership-tables (unexpanded-table :accessor unexpanded-table :initform (when *create-membership-tables-p* (make-weak-hash-table :size 10000 :rehash-size 10000 :test #'equalp))) #+:use-membership-tables (expanded-table :accessor expanded-table :initform (when *create-membership-tables-p* (make-weak-hash-table :size 10000 :rehash-size 10000 :test #'equalp))) (action-timestamp-counter :accessor action-timestamp-counter :initform 0) (current-action :accessor current-action :initform nil) (choice-point-counter :accessor choice-point-counter :initform 0) (cur-clash-node :accessor cur-clash-node :initform nil))) (defmethod reset-abox ((abox abox)) (with-slots (node-table edge-table tbox abox-version prepared-p satisfiable language ready-for-retrieval unexpanded-table expanded-table action-timestamp-counter current-action choice-point-counter cur-clash-node) abox (setf satisfiable :not-tested ready-for-retrieval nil action-timestamp-counter 0 current-action nil choice-point-counter 0 cur-clash-node nil) (when node-table (clrhash node-table)) (when edge-table (clrhash edge-table)) abox)) (defparameter *use-avl-trees-for-abox1-p* nil) (defpersistentclass abox1 (abox) ((node-table :initform nil) (edge-table :initform nil) (all-nodes :reader all-nodes :initform nil) (all-edges :reader all-edges :initform nil) ;;; ;;; plus optionale (!) spezialisierte Listen / Indexstrukture ;;; ACHTUNG! DIESE MUESSEN VERWALTET WERDEN, INSBESONDERE AUCH ;;; BEIM ROLLBACK!!! AUFWENDIG! ;;; S. SET-STATE-VECTOR! ;;; (old-nodes :initform nil) (cache-sat-nodes :initform nil) (deactivated-nodes :initform nil) (leaf-nodes :initform nil) (blocked-nodes :initform nil) (active-nodes :initform nil) #| ;; ; f. determ. expansion (nodes-with-alls-nodes :initform nil) ; AVL (nodes-not-det-expanded :initform nil) ; |# ;;; ;;; plus optionale Heaps ;;; ;;; diese sind fuer get-oldes-node-.... -> abox-saturation (nodes-not-or-expanded1 :initform nil) (nodes-not-some-expanded1 :initform nil) (nodes-not-feature-expanded1 :initform nil) (nodes-not-at-least-expanded1 :initform nil) ;;; ;;; ;;; ;;; diese sind fuer trace strategy -> left-of-p ! (nodes-not-and-expanded :initform nil) (nodes-not-atom-expanded :initform nil) (nodes-not-or-expanded :initform nil) (nodes-not-some-expanded :initform nil) (nodes-not-feature-expanded :initform nil) (nodes-not-at-least-expanded :initform nil))) (defmethod reset-abox ((abox abox1)) (with-slots (all-nodes all-edges old-nodes cache-sat-nodes deactivated-nodes leaf-nodes blocked-nodes active-nodes nodes-not-and-expanded nodes-not-atom-expanded nodes-not-or-expanded nodes-not-some-expanded nodes-not-feature-expanded nodes-not-at-least-expanded) abox (setf all-nodes nil all-edges nil old-nodes nil cache-sat-nodes nil deactivated-nodes nil leaf-nodes nil blocked-nodes nil) (dolist (slot '(active-nodes nodes-not-and-expanded nodes-not-atom-expanded nodes-not-or-expanded nodes-not-some-expanded nodes-not-feature-expanded nodes-not-at-least-expanded nodes-not-or-expanded1 nodes-not-some-expanded1 nodes-not-feature-expanded1 nodes-not-at-least-expanded1)) (heap-clear (slot-value abox slot)))) (call-next-method)) ;;; ;;; ;;; (defmethod initialize-instance :after ((abox abox) &rest initargs) (push abox *all-aboxes*) (when (tbox abox) (pushnew abox (used-by-aboxes (tbox abox))))) ;;; ;;; ;;; (defpersistentclass abox-item (substrate-object) ((old-p :initarg :old-p :initform nil) (active-p :reader active-p :initarg :active-p :initform nil) (deleted-p :reader deleted-p :initform nil) (choice-points :initform nil :initarg :choice-points) ; initargs für Copy-Funktionen! (precondition-for-actions :initform nil :initarg :precondition-for-actions) (postcondition-for-actions :initform nil :initarg :postcondition-for-actions) (created-by :reader created-by :initform nil :initarg :created-by))) (defmethod old-p ((item abox-item)) (slot-value item 'old-p)) ;;; ;;; ;;; (defun get-standard-abox-class () 'abox1) (defmethod get-standard-node-class ((abox abox)) 'abox-node) (defmethod get-standard-edge-class ((abox abox)) 'abox-edge) ;;; ;;; ;;; (defmethod get-standard-node-description-class ((abox abox)) 'node-label) (defmethod get-standard-edge-description-class ((abox abox)) 'edge-label) ;;; ;;; ;;; (defmethod unparse ((item symbol)) item) ;;; ;;; ;;; (defmacro representative (node) `(first (cluster-nodes ,node))) (defmacro representative-p (node) `(eq ,node (representative ,node))) ;;; ;;; Iteratoren und mengenbasierte Schnittstelle! ;;; (defmacro loop-over-abox-nodes ((var abox &rest args) &body body) `(abox-nodes-iterator ,abox #'(lambda (,var) ,@body) ,@args)) (defmacro loop-over-abox-edges ((var abox &rest args) &body body) `(abox-edges-iterator ,abox #'(lambda (,var) ,@body) ,@args)) (defmacro loop-over-active-nodes ((var abox &rest args) &body body) `(abox-active-nodes-iterator ,abox #'(lambda (,var) ,@body) ,@args)) (defmacro loop-over-leaf-nodes ((var abox &rest args) &body body) `(abox-leaf-nodes-iterator ,abox #'(lambda (,var) ,@body) ,@args)) (defmacro loop-over-old-nodes ((var abox &rest args) &body body) `(abox-old-nodes-iterator ,abox #'(lambda (,var) ,@body) ,@args)) (defmacro loop-over-blocked-nodes ((var abox &rest args) &body body) `(abox-blocked-nodes-iterator ,abox #'(lambda (,var) ,@body) ,@args)) (defmacro loop-over-deactivated-nodes ((var abox &rest args) &body body) `(abox-deactivated-nodes-iterator ,abox #'(lambda (,var) ,@body) ,@args)) (defmacro loop-over-cache-sat-nodes ((var abox &rest args) &body body) `(abox-cache-sat-nodes-iterator ,abox #'(lambda (,var) ,@body) ,@args)) ;;; ;;; ;;; (timed-defmethod abox-nodes-iterator ((abox abox) fn &optional (consider-cluster-p t)) (maphash #'(lambda (key node) (when (and (integerp key) (not (deleted-p node)) (=> consider-cluster-p (representative-p node))) (funcall fn node))) (node-table abox))) (timed-defmethod abox-nodes-iterator ((abox abox1) fn &optional (consider-cluster-p t)) (if (not *use-avl-trees-for-abox1-p*) (dolist (node (all-nodes abox)) (when (and (not (deleted-p node)) (=> consider-cluster-p (representative-p node))) (funcall fn node))) (loop-over-avl-tree (node (all-nodes abox)) (when (and (not (deleted-p node)) (=> consider-cluster-p (representative-p node))) (funcall fn node))))) ;;; ;;; ;;: (timed-defmethod abox-active-nodes-iterator ((abox abox) fn &optional (consider-cluster-p t)) (abox-nodes-iterator abox #'(lambda (node) (when (active-p node) (funcall fn node))) consider-cluster-p)) (timed-defmethod abox-active-nodes-iterator ((abox abox1) fn &optional (consider-cluster-p t)) (if *maintain-active-nodes-p* (loop-over-heap-items (node (slot-value abox 'active-nodes)) (when (=> consider-cluster-p (representative-p node)) (funcall fn node))) (call-next-method))) ;;; ;;; ;;; (timed-defmethod abox-old-nodes-iterator ((abox abox) fn &optional (consider-cluster-p t)) (abox-nodes-iterator abox #'(lambda (node) (when (old-p node) (funcall fn node))) consider-cluster-p)) (timed-defmethod abox-old-nodes-iterator ((abox abox1) fn &optional (consider-cluster-p t)) (if *maintain-old-nodes-p* (dolist (node (slot-value abox 'old-nodes)) (when (=> consider-cluster-p (representative-p node)) (funcall fn node))) (call-next-method))) ;;; ;;; ;;; (timed-defmethod abox-blocked-nodes-iterator ((abox abox) fn &optional (consider-cluster-p t)) (abox-nodes-iterator abox #'(lambda (node) (when (blocked-p node) (funcall fn node))) consider-cluster-p)) (timed-defmethod abox-blocked-nodes-iterator ((abox abox1) fn &optional (consider-cluster-p t)) (if *maintain-blocked-nodes-p* (dolist (node (slot-value abox 'blocked-nodes)) (when (=> consider-cluster-p (representative-p node)) (funcall fn node))) (call-next-method))) ;;; ;;; ;;; (timed-defmethod abox-leaf-nodes-iterator ((abox abox) fn &optional (consider-cluster-p t)) (abox-active-nodes-iterator abox #'(lambda (node) (when (every #'(lambda (out) (not (active-p (to out)))) (outgoing node)) (funcall fn node))) consider-cluster-p)) (timed-defmethod abox-leaf-nodes-iterator ((abox abox1) fn &optional (consider-cluster-p t)) (if *maintain-leaf-nodes-p* (dolist (node (slot-value abox 'leaf-nodes)) (when (=> consider-cluster-p (representative-p node)) (funcall fn node))) (call-next-method))) ;;; ;;; ;;; (timed-defmethod abox-deactivated-nodes-iterator ((abox abox) fn &optional (consider-cluster-p t)) (abox-nodes-iterator abox #'(lambda (node) (unless (active-p node) (funcall fn node))) consider-cluster-p)) (timed-defmethod abox-deactivated-nodes-iterator ((abox abox1) fn &optional (consider-cluster-p t)) (if *maintain-deactivated-nodes-p* (dolist (node (slot-value abox 'deactivated-nodes)) (when (=> consider-cluster-p (representative-p node)) (funcall fn node))) (call-next-method))) ;;; ;;; ;;; (timed-defmethod abox-cache-sat-nodes-iterator ((abox abox) fn &optional (consider-cluster-p t)) (abox-nodes-iterator abox #'(lambda (node) (when (cache-satisfiable-p node) (funcall fn node))) consider-cluster-p)) (timed-defmethod abox-cache-sat-nodes-iterator ((abox abox1) fn &optional (consider-cluster-p t)) (if *maintain-cache-sat-nodes-p* (dolist (node (slot-value abox 'cache-sat-nodes)) (when (=> consider-cluster-p (representative-p node)) (funcall fn node))) (call-next-method))) ;;; ;;; ;;; (timed-defmethod get-nodes ((abox abox) &rest args) (declare (ignorable args)) (let ((nodes nil)) (loop-over-abox-nodes (node abox) (push node nodes)) nodes)) (timed-defmethod get-edges ((abox abox) &rest args &key (satisfying #'yes)) (declare (ignorable args)) (let ((edges nil)) (loop-over-abox-edges (edge abox :satisfying satisfying) (push edge edges)) edges)) (timed-defmethod get-active-nodes ((abox abox) &rest args) (declare (ignorable args)) (let ((nodes nil)) (loop-over-active-nodes (node abox) (push node nodes)) nodes)) (timed-defmethod get-old-nodes ((abox abox) &rest args) (declare (ignorable args)) (let ((nodes nil)) (loop-over-old-nodes (node abox) (push node nodes)) nodes)) (timed-defmethod get-blocked-nodes ((abox abox) &rest args) (let ((nodes nil)) (loop-over-blocked-nodes (node abox) (push node nodes)) nodes)) (timed-defmethod get-leaf-nodes ((abox abox) &rest args) (let ((nodes nil)) (loop-over-leaf-nodes (node abox) (push node nodes)) nodes)) (timed-defmethod get-deactivated-nodes ((abox abox) &rest args) (let ((nodes nil)) (loop-over-deactivated-nodes (node abox) (push node nodes)) nodes)) (timed-defmethod get-cache-sat-nodes ((abox abox) &rest args) (let ((nodes nil)) (loop-over-cache-sat-nodes (node abox) (push node nodes)) nodes)) ;;; ;;; (defmethod no-of-nodes ((abox abox) &rest args) (length (get-nodes abox))) (defmethod no-of-active-nodes ((abox abox) &rest args) (length (get-active-nodes abox))) (defmethod no-of-edges ((abox abox) &rest args) (length (get-edges abox))) ;;; ;;; ;;; (timed-defun get-youngest-node-satisfying (abox fn) (let ((found nil)) (loop-over-active-nodes (node abox) (when (and (or (not found) (> (id node) (id found))) (funcall fn node)) (setf found node))) found)) (timed-defun get-youngest-node-satisfying1 (abox fn) (let ((found nil)) (loop-over-active-nodes (node abox nil) (when (and (or (not found) (> (id node) (id found))) (funcall fn node)) (setf found node))) found)) (timed-defun get-oldest-node-satisfying (abox fn) (let ((found nil)) (loop-over-active-nodes (node abox) (when (and (or (not found) (< (id node) (id found))) (funcall fn node)) (setf found node))) found)) (timed-defun get-oldest-node-satisfying1 (abox fn) (let ((found nil)) (loop-over-active-nodes (node abox nil) (when (and (or (not found) (< (id node) (id found))) (funcall fn node)) (setf found node))) found)) (timed-defun get-oldest-old-then-youngest-satisfying (abox fn) (or (get-oldest-node-satisfying1 abox #'(lambda (x) (and (old-p x) (funcall fn x)))) (get-youngest-node-satisfying1 abox fn))) ;;; ;;; ;;; (timed-defmethod get-oldest-node-with-unexpanded-or-concepts ((abox abox)) (get-oldest-node-satisfying abox #'has-unexpanded-or-concepts-p)) (timed-defmethod get-oldest-node-with-unexpanded-or-concepts ((abox abox1)) (if *maintain-unexpanded-or-concepts1-heap-p* (heap-peek (slot-value abox 'nodes-not-or-expanded1)) (call-next-method))) ;;; ;;; ;;; (timed-defmethod get-oldest-node-with-unexpanded-some-concepts ((abox abox)) (get-oldest-node-satisfying abox #'has-unexpanded-some-concepts-p)) (timed-defmethod get-oldest-node-with-unexpanded-some-concepts ((abox abox1)) (if *maintain-unexpanded-some-concepts1-heap-p* (heap-peek (slot-value abox 'nodes-not-some-expanded1)) (call-next-method))) ;;; ;;; ;;; (timed-defmethod get-oldest-node-with-unexpanded-attribute-exists-concepts ((abox abox)) (get-oldest-node-satisfying abox #'has-unexpanded-attribute-exists-concepts-p)) (timed-defmethod get-oldest-node-with-unexpanded-attribute-exists-concepts ((abox abox1)) (if *maintain-unexpanded-attribute-exists-concepts1-heap-p* (heap-peek (slot-value abox 'nodes-not-feature-expanded1)) (call-next-method))) ;;; ;;; ;;; (timed-defmethod get-oldest-node-with-unexpanded-at-least-concepts ((abox abox)) (get-oldest-node-satisfying abox #'has-unexpanded-at-least-concepts-p)) (timed-defmethod get-oldest-node-with-unexpanded-at-least-concepts ((abox abox1)) (if *maintain-unexpanded-at-least-concepts1-heap-p* (heap-peek (slot-value abox 'nodes-not-at-least-expanded1)) (call-next-method))) ;;; ;;; ;;; (timed-defmethod abox-edges-iterator ((abox abox) fn &key (satisfying #'yes)) (maphash #'(lambda (key edge) (declare (ignorable edge)) (when (and (integerp key) (not (deleted-p edge)) (funcall satisfying edge)) (funcall fn edge))) (edge-table abox))) (timed-defmethod abox-edges-iterator ((abox abox1) fn &key (satisfying #'yes)) (if (not *use-avl-trees-for-abox1-p*) (dolist (edge (all-edges abox)) (when (and (not (deleted-p edge)) (funcall satisfying edge)) (funcall fn edge))) (loop-over-avl-tree (edge (all-edges abox)) (when (and (not (deleted-p edge)) (funcall satisfying edge)) (funcall fn edge))))) ;;; ;;; ;;; (defmethod establish-context-for ((abox abox) continuation) (with-slots (tbox) abox (let ((*cur-abox* abox) #+:use-membership-tables (*unexpanded-table* (unexpanded-table abox)) #+:use-membership-tables (*expanded-table* (expanded-table abox))) (setf tbox (find-tbox (or tbox *cur-tbox*) :error-p t)) (with-tbox* ( (tbox abox) ) (if (next-method-p) (call-next-method) (funcall continuation)))))) (defmethod set-context-for progn ((abox abox)) (with-slots (tbox) abox (setf *cur-abox* abox) #+:use-membership-tables (setf *unexpanded-table* (unexpanded-table abox)) #+:use-membership-tables (setf *expanded-table* (expanded-table abox)) (setf tbox (find-tbox (or tbox *cur-tbox*) :error-p t)) (in-tbox* (tbox abox)))) ;;; ;;; ;;; (defun current-abox () *cur-abox*) (defun delete-abox (name &rest args) (apply #'delete-substrate name args)) (defmethod delete-graph :after ((abox abox) &rest args) ;;; wird von delete-substrate aufgerufen (setf *all-aboxes* (delete abox *all-aboxes*)) (setf *cur-abox* nil) (when (tbox abox) (setf (used-by-aboxes (tbox abox)) (delete abox (used-by-aboxes (tbox abox)))))) (defun find-abox (name &rest args) (apply #'find-substrate name args)) (defun delete-all-aboxes () (delete-all-substrates :satisfying #'is-abox-p) (in-abox default-abox)) (defun all-aboxes () (get-all-substrates :satisfying #'is-abox-p)) (defun associated-tbox (abox) (tbox-name (tbox (find-abox abox :error-p t)))) (defun clone-abox (abox) (copy-graph (find-abox abox :error-p t))) ;;; ;;; ;;; (defmethod reset-sat-status ((abox abox)) (incf (abox-version abox)) (reset-cached-sat-result abox) (setf (slot-value abox 'prepared-p) nil) abox) (defmethod reset-cached-sat-result ((abox abox)) (setf (slot-value abox 'satisfiable) :not-tested)) (defmethod reset-sat-status :after ((item abox-item)) (dolist (slot '(active-p deleted-p choice-points precondition-for-actions postcondition-for-actions)) (setf (slot-value item slot) nil))) ;;; ;;; ;;; (defmethod get-language ((abox abox) &optional recompute-p) (declare (ignorable recompute-p)) ;;; durch das Parsen sind die Node-Assertions ;;; im concept-store gelandet! (prepare abox +dl+) (slot-value abox 'language)) (defmethod note-abox-has-changed ((abox abox)) (reset-sat-status abox)) (defmethod abox-realized-p ((abox abox)) (loop-over-abox-nodes (node abox) (unless (realized-p node) (return-from abox-realized-p nil))) t) ;;; ;;; ;;; #| (defmethod copy ((abox abox) &rest args) (let ((copy (apply #'call-next-method abox :name (name abox) ;;; prevent building "Copy of copy of copy of..." names! args))) (with-slots (satisfiable language ready-for-retrieval tbox) abox (setf (slot-value copy 'satisfiable) satisfiable (slot-value copy 'language) language (slot-value copy 'ready-for-retrieval) ready-for-retrieval (slot-value copy 'tbox) tbox)) (loop-over-abox-nodes (node copy) (setf (slot-value node 'cluster-nodes) (mapcar #'(lambda (x) (find-node copy (id x) :error-p t)) (cluster-nodes node)))) copy)) |#
22,294
Common Lisp
.lisp
591
28.360406
103
0.584034
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
38f2531ca072025fd4072e767181c31db4918f64711b63907337c0b5a1dcfe48
12,521
[ -1 ]
12,522
tester.lisp
lambdamikel_DLMAPS/src/prover/tester.lisp
;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) (defun load-both (&optional (fn "test.kb") &key save-load-p (verify-p t) debug-p log-p) (declare (ignorable debug-p log-p)) (reset-statistics) (racer:delete-all-tboxes) (delete-all-tboxes) ;(enable-racer-validation) ;(disable-racer-validation) (in-tbox foobar :delete-if-exists-p t) (let ((*package* (find-package :prover))) (format t "Loading ~A into DLMAPS...~%" fn) (load (format nil "dlmaps:prover;~A" fn))) ;(setf (language *cur-tbox*) (make-language 'alchf-rplus)) (when save-load-p (format t "Saving ~A!~%" "dlmaps:prover;test.tbox") (save-tbox *cur-tbox* "dlmaps:prover;test.tbox")) (in-tbox foobar) (when verify-p (let ((*package* :racer-user)) (racer:in-tbox racer-user::foobar) (format t "Loading ~A into RACER...~%" fn) (if (not save-load-p) (load (format nil "dlmaps:prover;~A" fn)) (load "dlmaps:prover;test.tbox"))) (racer::set-current-tbox 'racer-user::foobar) (compare-taxonomies) ;(classify-cur-tbox debug-p log-p) )) (defvar *stream*) (defun enable-racer-validation () (setf *racer-validation-p* t *logging-p* nil *racer-tbox* 'racer-user::foobar)) (defun enable-logging () (setf *logging-p* t)) (defun disable-logging () (setf *logging-p* nil)) (defun disable-racer-validation () (setf *racer-validation-p* nil)) (defun classify-cur-tbox (&optional (debug-p *debug-p*) (logfile-p *logging-p*)) (reset-sat-status *cur-tbox*) (let ((*debug-p* debug-p)) (racer:classify-tbox 'racer-user::foobar) (with-open-file (stream "prover.log" :direction :output :if-exists :supersede :if-does-not-exist :create) (let* ((*standard-output* (if logfile-p stream *standard-output*)) (*print-pretty* t) (*debug-io* *standard-output*) (*error-output* *standard-output*) (*trace-output* *standard-output*)) (classify *cur-tbox* ;:language +alchf+ :debug-p *debug-p* :cache-models-p t :use-cached-models-p t :subtableau-caching-p t :semantic-branching-p t :delete-nodes-p nil :use-unsat-cache-p t :reuse-nodes-p nil :non-determinism-p nil))) ;(visualize-dag (taxonomy *cur-tbox*)) )) (defun compare-taxonomies () (racer:classify-tbox) (classify-cur-tbox nil nil) (let* ((key #'(lambda (x) (format nil "~A" x))) (t1 (sort (mapcar #'(lambda (x) (list (sort (ensure-list (first x)) #'string-lessp :key key) (sort (ensure-list (second x)) #'string-lessp :key key) (sort (ensure-list (third x)) #'string-lessp :key key))) (racer:taxonomy)) #'string-lessp :key #'(lambda (x) (format nil "~A" (caar x))))) (t2 (sort (mapcar #'(lambda (x) (list (sort (ensure-list (first x)) #'string-lessp :key key) (sort (ensure-list (second x)) #'string-lessp :key key) (sort (ensure-list (third x)) #'string-lessp :key key))) (taxonomy-list *cur-tbox*)) #'string-lessp :key #'(lambda (x) (format nil "~A" (caar x))))) (okay t)) ;(pprint t1) (terpri) (pprint t2) (terpri) (mapc #'(lambda (a b) (let ((a (read-from-string (format nil "~A" a))) (b (read-from-string (format nil "~A" b)))) ;; (format t "~% Racer: ~A~% DLMAPS: ~A~%" a b) (unless (set-equal (first a) (first b) :test #'(lambda (x y) (set-equal (ensure-list x) (ensure-list y)))) (format t "*** BAD CONCEPT ORDER: ~A ~A~%" (first a) (first b))) (unless (set-equal (second a) (second b) :test #'(lambda (x y) (set-equal (ensure-list x) (ensure-list y)))) (setf okay nil) (format t "*** MISMATCH FOR PARENTS OF CONCEPT ~A TOO MANY: ~A TOO LESS: ~A~%~%" (first a) (set-difference (second b) (second a) :test #'(lambda (x y) (set-equal (ensure-list x) (ensure-list y)))) (set-difference (second a) (second b) :test #'(lambda (x y) (set-equal (ensure-list x) (ensure-list y)))))) (unless (set-equal (third a) (third b) :test #'(lambda (x y) (set-equal (ensure-list x) (ensure-list y)))) (setf okay nil) (format t "*** MISMATCH FOR CHILDREN OF CONCEPT ~A TOO MANY: ~A TOO LESS: ~A~%~%" (first a) (set-difference (third b) (third a) :test #'(lambda (x y) (set-equal (ensure-list x) (ensure-list y)))) (set-difference (third a) (third b) :test #'(lambda (x y) (set-equal (ensure-list x) (ensure-list y)))))))) t1 t2) (if okay 'taxonomies-are-identical 'error-taxonomies-are-different))) ;;; (defun racer-subsumes (f g) (let ((*package* (find-package :racer-user))) (racer:concept-subsumes-p (change-package-of-description f :racer-user) (change-package-of-description g :racer-user) 'racer-user::foobar))) (defun midelora-subsumes (f g &rest args) (let ((*print-pretty* t)) (apply #'concept-subsumes-p f g :debug-p t args)))
6,081
Common Lisp
.lisp
135
31.903704
124
0.508835
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
f6c956d660d5dfc239acdbab81bc30ce3ab10c8b56c7ce2143b46ec58241c114
12,522
[ -1 ]
12,523
simple-kaon-test2.lisp
lambdamikel_DLMAPS/src/prover/simple-kaon-test2.lisp
(in-package cl-user) (defun prepare () (ts::racer-answer-query '(?x) '(?x top) :with-unique-name-assumption-p t)) (defun test1 (concept) (set-nrql-mode 1) (load "user-home:Desktop;KAON;dct_with_relations_3_5_10_10;test.racer") ;(time (classify-tbox)) (time (prepare)) (time (ts::racer-answer-query '(?x) `(?x ,concept) :with-unique-name-assumption-p t))) (defun test2 (concept) (set-nrql-mode 6) (load "user-home:Desktop;KAON;dct_with_relations_3_5_10_10;test.racer") ;(time (classify-tbox)) (time (prepare)) (time (ts::racer-answer-query '(?x) `(?x ,concept) :with-unique-name-assumption-p t))) (defun test3 (concept) (set-nrql-mode 1) (load "user-home:Desktop;KAON;dct_with_relations_5_5_5_5;test.racer") (time (classify-tbox)) (time (prepare)) (time (ts::racer-answer-query '(?x) `(?x ,concept) :with-unique-name-assumption-p t))) (test2 'thing1)
1,014
Common Lisp
.lisp
1
1,014
1,014
0.577909
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
6f919c7cd25ac47fac850df2199147f8e3e35223aeb5d1b3c11a3b551a982f07
12,523
[ -1 ]
12,524
db-abox.lisp
lambdamikel_DLMAPS/src/prover/db-abox.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; CLSQL initilization ;;; (setf clsql:*default-database-type* :mysql) (defconstant +db-user+ "root") (defconstant +db-passwd+ "root") (clsql-sys::initialize-database-type) ;; (locally-enable-sql-reader-syntax) (defparameter +string-marker+ 'string-marker-123) (defparameter +symbol-marker+ 'symbol-marker-123) ;;; ;;; ;;; (defpersistentclass db-abox (abox) ((db-name :initform nil) (db-spec :initform nil) (db-type :initform nil) ;;; verwenden, um wiederholte Datenbankabfragen zu vermeiden! ;;; noch nicht genutzt (db-nodes-complete-p :accessor db-nodes-complete-p :initform nil) (db-edges-complete-p :accessor db-edges-complete-p :initform nil) (successors-complete-for :accessor successors-complete-for :initform (make-hash-table :test #'equal)))) (defpersistentclass db-abox-node (abox-node) ((from-db-p :initform nil :accessor from-db-p :initarg :from-db-p))) (defpersistentclass db-abox-edge (abox-edge) ((from-db-p :initform nil :accessor from-db-p :initarg :from-db-p))) ;;; ;;; Aux Functions ;;; (defun decode-value (val) ;; (setf *x* val) (labels ((do-it (val) (if (stringp val) val (if (consp val) (if (eq (first val) +symbol-marker+) (if (second val) (intern (format nil "~A" (third val)) (find-package (second val))) (gensym (format nil "~A" (third val)))) (mapcar #'do-it val)) val)))) (let ((*package* (find-package :prover))) (do-it (read-from-string val))))) (defun encode-value (val) ;; (setf *y* val) (if (stringp val) (format nil "~S" val) (if (listp val) (format nil "~A" (mapcar #'encode-value val)) (if (symbolp val) (format nil "(~A ~A |~A|)" +symbol-marker+ (if (symbol-package val) (package-name (symbol-package val)) nil) (symbol-name val)) (format nil "~A" val))))) ;;; ;;; ;;; (defun convert-db-tuples (tuples) (if (consp (car tuples)) (mapcar #'(lambda (tuple) (mapcar #'(lambda (x) (decode-value x)) tuple)) tuples) (mapcar #'decode-value tuples))) (defun combine-labels (a b) (encode-value (remove-duplicates (append (ensure-list a) (ensure-list b)) :test #'set-equal))) ;;; ;;; ;;; (defmacro with-db-connection ((db db-abox) &body body) `(when (is-db-abox-p ,db-abox) (with-slots (db-spec db-type) ,db-abox (clsql:with-database (,db db-spec :database-type db-type :pool t :make-default t) (clsql:set-autocommit t :database ,db) ,@body)))) (defun all-dbs () (clsql:list-databases (list "localhost" "" +db-user+ +db-passwd+) :database-type :mysql)) (defun destroy-all-dbs () (dolist (db (clsql:list-databases (list "localhost" "" +db-user+ +db-passwd+) :database-type :mysql)) (when (search "MIDELORA-DB-ABOX" db) (destroy-db db)))) (defun destroy-db (db) (clsql:destroy-database (list "localhost" db +db-user+ +db-passwd+) :database-type :mysql)) (defun all-db-nodes () (with-db-connection (db *cur-abox*) (convert-db-tuples (clsql::query "SELECT * FROM NODES" :database db)))) (defun all-db-edges () (with-db-connection (db *cur-abox*) (convert-db-tuples (clsql::query "SELECT * FROM EDGES" :database db)))) (defun delete-all-nodes () (mapc #'(lambda (x) ;; db-knoten werden nur geloescht, wenn :update-db-p t (delete-node *cur-abox* x)) (get-nodes *cur-abox*))) (defun delete-all-edges () (mapc #'(lambda (x) ;; db-knoten werden nur geloescht, wenn :update-db-p t (delete-edge *cur-abox* x)) (get-edges *cur-abox*))) ;;; ;;; ;;; ;;; (defmethod find-node ((abox db-abox) name &key error-p satisfying (look-into-db-p t) &allow-other-keys) (declare (ignorable satisfying)) (let ((node (call-next-method))) (or node (when look-into-db-p (with-abox* (abox) (let* ((name-label (convert-db-tuples (first (with-db-connection (db abox) (clsql::query (format nil "SELECT name, label FROM NODES WHERE NAME = '~A'" (encode-value name)) :database db))))) (name (first name-label)) (label (second name-label))) (when name (let ((node (create-abox-node abox name :type 'db-abox-node :look-into-db-p nil :update-db-p nil))) (dolist (concept label) (node-instance node concept :update-db-p nil)) node))))) (when error-p (error "Node ~A neither found in materialized ABox nor in DB!" name))))) (defmethod get-edges-between ((abox db-abox) (from db-abox-node) (to db-abox-node) &rest args &key error-p look-into-db-p &allow-other-keys) (declare (ignorable args)) (let ((edge (call-next-method))) (or edge (let ((from1 (encode-value (name from))) (to1 (encode-value (name to)))) (when look-into-db-p (with-db-connection (db abox) (with-abox* (abox) (let ((label (convert-db-tuples (first (clsql::query (format nil "SELECT label FROM EDGES WHERE FROMNODE = '~A' AND TONODE = '~A'" from1 to1) :database db)))) (edges nil)) (dolist (label label) (push (relate from to label :type 'db-abox-edge :from-db-p t) edges)) edges))))) (when error-p (error "Edge ~A ~A neither found in materialized ABox nor in DB!" from to))))) ;;; ;;; ;;; (defmethod initialize-instance :after ((abox db-abox) &rest args) (declare (ignorable args)) (initialize-db abox)) (defmethod initialize-db ((abox db-abox)) (with-slots (db-spec db-type db-name name) abox (setf db-type :mysql) (setf db-spec (list "localhost" (format nil "MIDELORA-DB-ABOX-~A" name ) +db-user+ +db-passwd+)) (setf db-name (clsql:database-name-from-spec db-spec db-type)) (cond ((member (second db-spec) (all-dbs) :test #'string-equal) (format t "~%Database ~A already exists. Using existing DB.~%" name)) (t (clsql:create-database db-spec :database-type db-type) (with-db-connection (db abox) (clsql:execute-command "CREATE TABLE NODES(NAME VARCHAR(255), LABEL BLOB, PRIMARY KEY(NAME))" :database db) (clsql:execute-command "CREATE TABLE EDGES(FROMNODE VARCHAR(255), TONODE VARCHAR(255), LABEL BLOB)" :database db)))))) (defmethod delete-substrate :after ((substrate db-abox) &key &allow-other-keys) (destroy-db (second (slot-value substrate 'db-spec)))) ;;; ;;; Node construction ;;; (defmethod create-node ((abox db-abox) (name-for-node symbol) (description node-label) &rest args &key (update-db-p nil) (old-p t) type &allow-other-keys) (if (and (eq type 'db-abox-node) update-db-p) (progn (unless old-p (error "DB ABox individuals must have OLD-P = T!")) (let* ((node (apply #'call-next-method abox name-for-node description :type 'db-abox-node :look-into-db-p nil args)) (av (list (list 'name (encode-value name-for-node)) (list 'label (encode-value nil))))) (unless node (error "Can't create node ~A!" name-for-node)) (setf (db-nodes-complete-p abox) nil) (with-db-connection (db abox) (clsql:insert-records :into 'nodes :av-pairs av :database db)) node)) (call-next-method))) (defmethod delete-node :after ((abox db-abox) (node db-abox-node) &key update-db-p &allow-other-keys) (when update-db-p (with-db-connection (db abox) (let ((name (encode-value (name node)))) (clsql:delete-records :from 'nodes :database db :where (clsql:sql-operation '= (clsql:sql-expression :attribute 'name) name)))))) (defmethod node-instance :after ((ind db-abox-node) (concept concept) &rest args &key (update-db-p t) &allow-other-keys) (let ((abox (in-graph ind))) (when update-db-p (with-db-connection (db abox) (let* ((label (mapcar #'unparse (told-concepts ind))) (name (encode-value (name ind))) (av (list (list 'label (encode-value label))))) (with-db-connection (db abox) (clsql:update-records 'nodes :av-pairs av :where (clsql:sql-operation '= (clsql:sql-expression :attribute 'name) name) :database db))))))) (defmethod node-forget :after ((ind db-abox-node) (concept concept) &rest args &key update-db-p &allow-other-keys) (declare (ignorable args)) (when update-db-p (let ((abox (in-graph ind))) (with-db-connection (db abox) (let* ((label (mapcar #'unparse (told-concepts ind))) (name (encode-value (name ind))) (av (list (list 'label (encode-value label))))) (with-db-connection (db abox) (clsql:update-records 'nodes :av-pairs av :where (clsql:sql-operation '= (clsql:sql-expression :attribute 'name) name) :database db))))))) ;;; ;;; ;;; (defmethod abox-nodes-iterator :after ((abox db-abox) fn &optional (consider-merged-class-p t)) (declare (ignorable consider-merged-class-p)) (unless (db-nodes-complete-p abox) (dolist (tuple (convert-db-tuples (with-db-connection (db abox) (clsql::query "SELECT * FROM NODES" :database db)))) ;;; hier werden nur die NAMEN der virtuellen Knoten ermittelt! ;;; -> evtl. materialisieren (let ((node (first tuple))) (unless (find-node abox node :look-into-db-p nil) (let ((node (find-node abox node :look-into-db-p t))) (funcall fn node))))) (setf (db-nodes-complete-p abox) t))) (timed-defmethod abox-edges-iterator :after ((abox db-abox) fn &key (satisfying #'yes)) (unless (db-edges-complete-p abox) (dolist (tuple (convert-db-tuples (with-db-connection (db abox) (clsql::query "SELECT * FROM EDGES" :database db)))) (let* ((from (first tuple)) (to (second tuple)) (label (third tuple)) (edge (relate from to label :type 'db-abox-edge :from-db-p t))) (when (funcall satisfying edge) (funcall fn edge)))) (setf (db-edges-complete-p abox) t))) ;;; ;;; Edge construction ;;; (defmethod create-edge ((abox db-abox) (from db-abox-node) (to db-abox-node) (description edge-label) &rest args &key (update-db-p nil) (old-p t) type &allow-other-keys) (if (and (eq type 'db-abox-edge) update-db-p) (progn (unless old-p (error "DB ABox edges must have OLD-P = T!")) (let* ((edge (apply #'call-next-method abox from to description :type 'db-abox-edge args)) (av (list (list 'fromnode (encode-value (name from))) (list 'tonode (encode-value (name to))) (list 'label (encode-value (unparse (textual-description description))))))) (unless edge (error "Can't create edge between ~A and ~A!" from to)) (setf (db-edges-complete-p abox) nil) (with-db-connection (db abox) (clsql:insert-records :into 'edges :av-pairs av :database db)) edge)) (call-next-method))) (defmethod delete-edge :after ((abox db-abox) (edge db-abox-edge) &key update-db-p &allow-other-keys) (when update-db-p (with-db-connection (db abox) (let ((from (encode-value (name (from edge)))) (to (encode-value (name (to edge)))) (label (encode-value (unparse (textual-description (description edge)))))) (princ label) (when update-db-p (with-db-connection (db abox) (clsql-sys:delete-records :from 'edges :database db :where (clsql:sql-operation 'and (clsql:sql-operation '= (clsql:sql-expression :attribute 'fromnode) from) (clsql:sql-operation '= (clsql:sql-expression :attribute 'tonode) to) (clsql:sql-operation '= (clsql:sql-expression :attribute 'label) label))))))))) ;;; ;;; ;;; (defmethod compute-virtual-successors ((abox db-abox) (node db-abox-node) &optional role) (unless (gethash (list node role) (successors-complete-for abox)) (with-db-connection (db abox) (let ((succs (convert-db-tuples (clsql::query (format nil "SELECT TONODE, LABEL FROM EDGES WHERE FROMNODE = '~A'" (encode-value (name node))) :database db))) (pres (convert-db-tuples (clsql::query (format nil "SELECT FROMNODE, LABEL FROM EDGES WHERE TONODE = '~A'" (encode-value (name node))) :database db))) (inv-role (when role (get-inverse-role role)))) (setf (gethash (list node role) (successors-complete-for abox)) t) (nconc (delete nil (mapcar #'(lambda (x) (when (=> role (implies-p (parse-role (second x)) role)) (find-node abox (first x)))) succs)) (delete nil (mapcar #'(lambda (x) (when (=> inv-role (implies-p (parse-role (second x)) inv-role)) (find-node abox (first x)))) pres))))))) (defmethod materialize-virtual-edge ((abox db-abox) (node db-abox-node) (succ db-abox-node) role) (relate node succ role :type 'db-abox-edge :created-by t :comment 'virtual-computed-midelora-rcc-edge :old-p t :materialized-virtual-p t)) (defmethod obvious-non-instance ((abox db-abox) node concept) (cond ((is-bottom-concept-p concept) t) ((is-top-concept-p concept) nil) ((member concept (told-concepts node)) nil) (t (let* ((negated (negated-concept concept))) (or (member negated (told-concepts node)) (obvious-instance abox node negated) ;;; erfordert das Retrieval-Konzeptmodell keine Nachfolger, dann ;;; ist der Test wieder anwenbar! (some #'(lambda (ma) (some #'(lambda (mb) (and (not (or (node-model-successors mb) (node-model-attributes mb) (node-model-alls mb) (node-model-at-mosts mb))) (models-mergeable-p +alch+ ma mb))) (cached-models negated))) (ind-models node))))))) #| (progn (delete-all-aboxes) (in-abox test nil :type 'db-abox) (princ (all-db-nodes)) (princ (all-db-edges)) (db-instance a a) (db-related a b r) (db-instance b b) (del a) (del b) (princ (concept-instances (or (and a (some r b)) (and b (some (inv r) a))))) ) |#
18,317
Common Lisp
.lisp
430
27.97907
120
0.495727
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
65204d30ee29a7a2655a415e64557383ae5071cc5932dbdf95509eaeca80ca18
12,524
[ -1 ]
12,525
meta-constraints.lisp
lambdamikel_DLMAPS/src/prover/meta-constraints.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defmacro add-meta-constraints (node) `(let ((node ,node)) (dolist (constraint *meta-constraints*) (announce "Adding meta constraint ~A" constraint) (unless (on-tableau-p node constraint) (let ((added (register-as-unexpanded constraint :comment 'add-meta-constraint :node node :new-choice-point 0))) (check-for-clash node added))))))
607
Common Lisp
.lisp
16
25.75
62
0.527241
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
de8a80ccb0ff405ec27d826b2ae389923488b78cf4a1d367808dc737a1edb21d
12,525
[ -1 ]
12,526
models.lisp
lambdamikel_DLMAPS/src/prover/models.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defstruct (node-model (:type list :constructor :auto)) all-expanded atoms successors attributes alls at-mosts) (defstruct (role-profile (:type list :constructor :auto)) role counter models) (defmethod make-model-from-node ((node abox-node) &key (all-expanded nil all-expanded-p) (atoms nil atoms-p) (alls nil alls-p) (attributes nil attributes-p) (at-mosts nil at-mosts-p)) ;(describe-object node t) (when (or (blocked-p node) (cache-satisfiable-p node)) (error "make model from node: ~A is blocked or cache satisfiable!" node)) (make-node-model :all-expanded (if all-expanded-p all-expanded (let ((concepts nil)) (loop-over-node-expanded-concepts (concept node) (push concept concepts)) concepts)) :atoms (if atoms-p atoms (let ((concepts nil)) (loop-over-node-expanded-atomic-concepts (concept node) (push concept concepts)) concepts)) :alls (if alls-p alls (let ((concepts nil)) (loop-over-node-all-concepts (concept node) (push concept concepts)) concepts)) :attributes (if attributes-p attributes (let ((concepts nil)) (loop-over-node-unexpanded-attribute-exists-concepts (concept node) (push concept concepts)) concepts)) :at-mosts (if at-mosts-p at-mosts (let* ((at-mosts nil)) (loop-over-node-unexpanded-at-most-concepts (concept node) (push concept at-mosts)) (loop as role in (remove-duplicates (mapcar #'role at-mosts)) collect (let ((min (loop as at-most in at-mosts when (eq (role at-most) role) minimize (n at-most)))) (make-role-profile :role role :counter min :models nil))))) :successors (let ((role-profiles nil)) (loop-over-role-successors (node nil) (succ edge) (let* ((role (role edge)) (rp (assoc role role-profiles)) (others (remove-if-not #'(lambda (rp2) (implies-p role (role-profile-role rp2))) role-profiles)) (m (multiplicity edge))) (unless (zerop m) (unless rp (push (make-role-profile :role role :counter m :models nil) role-profiles)) (mapc #'(lambda (rp2) (incf (role-profile-counter rp2) m)) others)))) (loop-over-role-predecessors (node nil) (succ edge) (let* ((role (get-inverse-role (role edge))) (rp (assoc role role-profiles)) (others (remove-if-not #'(lambda (rp2) (implies-p role (role-profile-role rp2))) role-profiles)) (m (inverse-multiplicity edge))) (unless (zerop m) (unless rp (push (make-role-profile :role role :counter m :models nil) role-profiles)) (mapc #'(lambda (rp2) (incf (role-profile-counter rp2) m)) others)))) role-profiles))) ;;; ;;; (defmethod models-mergeable-p ((language alch) a b) (and (not (some #'(lambda (atom) (let ((neg-atom (negated-concept atom))) (find neg-atom (node-model-atoms b)))) (node-model-atoms a))) ;;; ;;; Some/Feature/At-least - All Interaction ;;; (not (some #'(lambda (all) (find-if #'(lambda (rp) (implies-p (role-profile-role rp) (role all))) (node-model-successors b))) (node-model-alls a))) (not (some #'(lambda (all) (find-if #'(lambda (rp) (implies-p (role-profile-role rp) (role all))) (node-model-successors a))) (node-model-alls b))))) (defmethod models-mergeable-p ((language alchf) a b) (and (models-mergeable-p +alch+ a b) (not (some #'(lambda (rp-a) (let ((r-a (role-profile-role rp-a))) (find-if #'(lambda (rp-b) (let ((r-b (role-profile-role rp-b))) (has-common-parent-feature r-a r-b))) (node-model-successors b)))) (node-model-successors a))))) (defmethod models-mergeable-p ((language alchn) a b) (and (models-mergeable-p +alch+ a b) (not (possible-at-least-at-most-confict-p a b)))) (defun possible-at-least-at-most-confict-p (a b) (let* ((at-most-roles (delete-duplicates (nconc (mapcar #'role-profile-role (node-model-at-mosts a)) (mapcar #'role-profile-role (node-model-at-mosts b))))) (at-least-roles (delete-duplicates (nconc (mapcar #'role-profile-role (node-model-successors a)) (mapcar #'role-profile-role (node-model-successors b))))) (at-most-profiles (mapcar #'(lambda (role) (make-role-profile :role role :counter (let ((a (find role (node-model-at-mosts a) :key #'role-profile-role)) (b (find role (node-model-at-mosts b) :key #'role-profile-role))) (if a (if b (min (role-profile-counter a) (role-profile-counter b)) (role-profile-counter a)) (if b (role-profile-counter b) (error "!")))))) at-most-roles)) (at-least-profiles (mapcar #'(lambda (role) (make-role-profile :role role :counter (let ((a (find role (node-model-successors a) :key #'role-profile-role)) (b (find role (node-model-successors b) :key #'role-profile-role))) (if a (if b (+ (role-profile-counter a) (role-profile-counter b)) (role-profile-counter a)) (if b (role-profile-counter b) (error "!")))))) at-least-roles))) (find-if #'(lambda (at-most) (let* ((at-least (find (role-profile-role at-most) at-least-profiles :key #'role-profile-role))) (and at-least (< (role-profile-counter at-most) (role-profile-counter at-least))))) at-most-profiles))) (defun at-least-at-most-confict-p (a b) (let* ((at-most-roles (delete-duplicates (nconc (mapcar #'role-profile-role (node-model-at-mosts a)) (mapcar #'role-profile-role (node-model-at-mosts b))))) (at-least-roles (delete-duplicates (nconc (mapcar #'role-profile-role (node-model-successors a)) (mapcar #'role-profile-role (node-model-successors b))))) (at-most-profiles (mapcar #'(lambda (role) (make-role-profile :role role :counter (let ((a (find role (node-model-at-mosts a) :key #'role-profile-role)) (b (find role (node-model-at-mosts b) :key #'role-profile-role))) (if a (if b (min (role-profile-counter a) (role-profile-counter b)) (role-profile-counter a)) (if b (role-profile-counter b) (error "!")))))) at-most-roles)) (at-least-profiles (mapcar #'(lambda (role) (make-role-profile :role role :counter (let ((a (find role (node-model-successors a) :key #'role-profile-role)) (b (find role (node-model-successors b) :key #'role-profile-role))) (if a (if b ;;; MIN statt + -> wichtiger unterschied zu possible-at-least-at-most-conflict-p ! (min (role-profile-counter a) (role-profile-counter b)) (role-profile-counter a)) (if b (role-profile-counter b) (error "!")))))) at-least-roles))) (find-if #'(lambda (at-most) (let* ((at-least (find (role-profile-role at-most) at-least-profiles :key #'role-profile-role))) (and at-least (< (role-profile-counter at-most) (role-profile-counter at-least))))) at-most-profiles))) ;;; ;;; ;;; (defmethod models-surely-not-mergeable-p ((language dl) a b) (labels ((check-if-member (concepts) (some #'(lambda (member-concept) (let ((neg-concept (negated-concept member-concept))) (or (find neg-concept (node-model-all-expanded b)) (find neg-concept (node-model-alls b))))) concepts))) (when (or (check-if-member (node-model-all-expanded a)) (check-if-member (node-model-alls a)) (at-least-at-most-confict-p a b)) ;(princ "@") t))) ;;; ;;; Subtableaux Caching und MM ;;; (defun register-initial-concept-sat-cache-query () (incf *initial-concept-sat-cache-queries*)) (defun register-initial-concept-unsat-cache-query () (incf *initial-concept-unsat-cache-queries*)) (defun register-initial-concept-sat-cache-hit () (incf *initial-concept-sat-cache-hits*)) (defun register-initial-concept-unsat-cache-hit () (incf *initial-concept-unsat-cache-hits*)) (defun register-mm-query () (incf *mm-queries*)) (defun register-mm-success () (incf *mm-hits*)) (defun register-sat-cache-query () (incf *sat-cache-queries*)) (defun register-sat-cache-hit () (incf *sat-cache-hits*)) ;;; ;;; aus Interface.lisp ;;; (defun register-concept-mm-query () (incf *concept-mm-queries*)) (defun register-concept-mm-hit () (incf *concept-mm-hits*)) (defun register-concept-query () (incf *concept-queries*)) (defun register-true-concept-query () (incf *true-concept-queries*)) (defun register-subsumption-query () (incf *subsumes-queries*)) (defun register-true-subsumption-query () (incf *true-subsumes-queries*)) (defun register-subsumption-mm-hit () (incf *subsumes-mm-hits*)) (defun register-subsumption-ts-hit () (incf *subsumes-ts-hits*)) (defun register-abox-consistency-test () (incf *true-abox-consistency-tests*)) (defun register-abox-subsumption-test () (incf *true-abox-subsumption-tests*)) ;;; ;;; ;;; (defmethod models-of-concepts-mergeable-p ((language dl) list-of-concepts) (let ((concepts nil)) (dolist (concept list-of-concepts) (etypecase concept (top-concept) (bottom-concept (return-from models-of-concepts-mergeable-p nil)) ((or atomic-concept some-concept all-concept at-least-concept at-most-concept attribute-exists-concept) (if (cached-models concept) (push concept concepts) (return-from models-of-concepts-mergeable-p nil))) (and-concept (if (cached-models concept) (push concept concepts) (if (every #'cached-models (arguments concept)) (dolist (arg (arguments concept)) (push arg concepts)) (return-from models-of-concepts-mergeable-p nil)))) (or-concept (if (cached-models concept) (push concept concepts) (let ((arg (find-if #'cached-models (arguments concept)))) (if arg (push arg concepts) (return-from models-of-concepts-mergeable-p nil))))))) (loop as ca on concepts do (loop as cb in (rest ca) do (let* ((ca (first ca)) (res (some #'(lambda (ma) (some #'(lambda (mb) (models-mergeable-p language ma mb)) (cached-models cb))) (cached-models ca)))) (unless res (return-from models-of-concepts-mergeable-p nil))))) t))
16,004
Common Lisp
.lisp
337
26.31454
133
0.424877
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
1ce656970ee6f4f863bec86728fd0cd28df393fdfc5c3dc0b24f4e9a733cd789
12,526
[ -1 ]
12,527
alchi-rplus-prover.lisp
lambdamikel_DLMAPS/src/prover/alchi-rplus-prover.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (define-prover ((abox-sat alchi-rplus abox)) (:main (perform (deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (block-nodes) (:body (perform (some-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (success)))))))))))) #| (progn (delete-all-tboxes) (transitive rr) (unless (sat? (and (some rr (some rr c)) (some s (all (inv s) (all rr (some rr d))))) :debug-p t :recompute-p t) (error "Prover error!")) (delete-all-tboxes) (transitive p) (def c (and (all (inv r) (all (inv p) (all (inv s) (Not a)))))) (let ((*print-pretty* t)) (when (sat? (and a (some s (and (some r top) (some p top) (all r c) (all p (some r top)) (all p (all r c)) (all p (some p top))))) :debug-p t :recompute-p t) (break "Prover error!")))) |#
1,473
Common Lisp
.lisp
45
20.133333
114
0.429793
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
7499af31788890bb068299416ab5f624f108d04cc8a7ad383d44f7ba688e87a6
12,527
[ -1 ]
12,528
alch-prover.lisp
lambdamikel_DLMAPS/src/prover/alch-prover.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (define-prover ((abox-sat alch abox)) (:init (cond ((zerop (1- (no-of-nodes abox))) (loop-over-abox-nodes (node abox) (register-label-is-stable abox node)) (with-strategy (+strategy+) (start-main))) (t (perform (initial-abox-saturation) (:body (with-strategy (+abox-saturation-strategy+) (loop-over-abox-nodes (node abox) (register-label-is-stable abox node)) (perform (model-merging) (:body (start-main))))))))) (:main (perform (deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (make-models-for-nodes) (:body (perform (some-expansion) (:positive (if clashes (handle-clashes) (perform (model-merging :node new-node) (:body (next-round))))) (:negative (perform (make-models-for-old-nodes) (:body (success))))))))))))) (:success (completion-found))) (define-prover ((abox-sat alch abox1)) ;;; Beweiser mit Tiefensuch-Strategie (Trace Technique)! (:init (cond ((zerop (1- (no-of-nodes abox))) (loop-over-abox-nodes (node abox) (register-label-is-stable abox node)) (with-strategy (+trace-strategy+) (start-main))) (t (perform (initial-abox-saturation) (:body (with-strategy (+trace-strategy+) (loop-over-abox-nodes (node abox) (register-label-is-stable abox node)) (perform (model-merging) (:body (start-main))))))))) (:rollback (let ((*maintain-active-nodes-p* t)) (rollback))) (:main (perform (focused-deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (some-expansion) (:positive (if clashes (handle-clashes) (perform (model-merging :node new-node) (:body (next-round))))) (:negative (perform (pop-active-nodes-heap) (:positive (next-round)) (:negative (perform (make-models-for-old-nodes) (:body (success))))))))))))) (:success (completion-found))) #| (progn (with-abox (test :delete-if-exists-p t :language +alch+) (ins a (and a (or (all r (not c)) (all r (not b))) (all r (or (not b) c)))) (ins b b) (rel a b r) (false! (abox-sat-p *cur-abox* :language +alch+ :debug-p t)) (visualize *cur-abox*)) (progn (delete-all-tboxes) (delete-all-aboxes) (subrole r s) (domain r c) (range r d) (with-abox (test) (rel a b r) (ins a (or (not c) (all s (not d)))) (false! (abox-sat? test :debug-p t)))) (with-kb (test test :delete-if-exists-p t) (defrole r :domain a :range b) (rel i j r) (true! (individual-instance? i a)) (true! (individual-instance? j b)) (true! (individual-instance? i (some r b))) (true! (individual-instance? j (some (inv r) a))) (true! (individual-instance? i (and a (all r b)))) (true! (individual-instance? i (and a (all r (and b (all (inv r) a))))))) (with-kb (test test :delete-if-exists-p t) (defrole r :domain a :range b) (def x (some r top)) (def y (and a (some r b))) (def xx (and (some r top) (all r b))) (true! (equivalent? x y)) (true! (equivalent? xx x)) (true! (equivalent? x xx)) (true! (equivalent? xx y))) (with-kb (test test :delete-if-exists-p t) (instance a (and d (all r c))) (related a b (or r s)) (instance b (not c)) (instance b (all (inv s) (not d))) (false! (abox-consistent-p *cur-abox*)))) |#
4,855
Common Lisp
.lisp
143
21.734266
84
0.4711
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
61cfa0570b48c77ad540def651d717eddda7138818ee4bf94d12d7d61ead64bc
12,528
[ -1 ]
12,529
roles.lisp
lambdamikel_DLMAPS/src/prover/roles.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defmethod get-all-roles ((tbox tbox)) (let ((roles nil)) (maphash #'(lambda (name role) (declare (ignorable name)) (push role roles)) (slot-value (concept-store tbox) 'roles)) (remove-duplicates (sort roles #'< :key #'id)))) (defmethod get-all-transitive-roles ((tbox tbox)) (remove-if-not #'transitive-p (get-all-roles tbox))) (defmethod get-all-features ((tbox tbox)) (remove-if-not #'feature-p (get-all-roles tbox))) ;;; ;;; ;;; (defmethod define-role ((role-name symbol) &key symmetric feature feature-p inverse-feature inverse-feature-p (inverse `(inv ,role-name)) parent parents inverse-parent inverse-parents transitive transitive-p (domain 'top) (range 'top)) (with-concept-store (*cur-store*) (let* ((*create-inverse-role-p* nil) (role (or (find-role role-name) (parse-role role-name))) (inverse-role-name inverse) (symmetric-p (or symmetric (symmetric-role role) (equal role-name inverse-role-name))) (inverse-role (if symmetric-p role (or (find-role `(inv ,role-name)) (parse-role inverse-role-name)))) (symmetric-p (or symmetric-p (symmetric-role inverse-role))) (transitive-p (or transitive transitive-p (transitive-p role) (transitive-p inverse-role))) (domain (make-and-concept (remove nil (list (when (role-domain role) (role-domain role)) (when (role-range inverse-role) (role-range inverse-role)) (parse-concept domain))))) (range (make-and-concept (remove nil (list (when (role-range role) (role-range role)) (when (role-domain inverse-role) (role-domain inverse-role)) (parse-concept range))))) (feature-p (or feature-p feature (feature-p role))) (inverse-feature-p (or inverse-feature-p inverse-feature (feature-p inverse-role))) (parents (append (mapcar #'define-role (append (ensure-list parent) (ensure-list parents))) (superroles role))) (inverse-parents (append (mapcar #'define-role (append (ensure-list inverse-parent) (ensure-list inverse-parents))) (superroles inverse-role)))) (register-inverses role inverse-role) (register-name-for-role inverse-role inverse-role-name) (register-name-for-role inverse-role `(inv ,role-name)) (unless (consp inverse-role-name) (register-name-for-role role `(inv ,inverse-role-name))) (when parents (register-superroles role parents)) (when inverse-parents (register-superroles inverse-role inverse-parents)) (when transitive-p (register-transitive role)) (when symmetric-p (register-symmetric role)) (when feature-p (register-feature role)) (when inverse-feature-p (register-feature inverse-role)) (when domain (register-domain role domain)) (when range (register-range role range)) (unless (parse-name role) (setf (slot-value role 'parse-name) role-name)) (unless (parse-name inverse-role) (setf (slot-value inverse-role 'parse-name) inverse-role)) role))) (defmethod define-role (role-name &key &allow-other-keys) (error "*** BAD ROLE NAME ~A GIVEN!" role-name)) (defmethod register-superroles ((role role) superroles) (dolist (sr superroles) (pushnew sr (slot-value role 'superroles))) role) (defmethod register-domain ((role role) (concept concept)) (setf (role-domain role) concept) role) (defmethod register-range ((role role) (concept concept)) (setf (role-range role) concept) role) (defmethod register-transitive ((role simple-role)) (setf (slot-value role 'transitive-p) t (slot-value (slot-value role 'inverse-role) 'transitive-p) t) role) (defmethod register-symmetric ((role simple-role)) (setf (slot-value role 'symmetric-role) t) role) (defmethod register-feature ((role simple-role)) (setf (slot-value role 'feature-p) t) role) ;;; ;;; ;;; (defmethod prepare-roles ((tbox tbox)) (labels ((cyclic-p (role current) (or (member role (superroles current)) (some #'(lambda (x) (cyclic-p role x)) (superroles current)))) (get-all-superroles (role) (remove-duplicates (append (superroles role) (reduce #'append (mapcar #'get-all-superroles (superroles role))))))) (with-slots (concept-store) tbox (with-slots (roles all-store-roles) concept-store (dolist (role all-store-roles) (let* ((inv-role (get-inverse-role role)) (superroles (remove-duplicates (append (superroles role) (mapcar #'get-inverse-role (superroles inv-role))))) (inv-superroles (mapcar #'get-inverse-role superroles))) (setf (slot-value role 'superroles) superroles (slot-value inv-role 'superroles) inv-superroles) (dolist (sr superroles) (pushnew role (slot-value sr 'subroles))) (dolist (sr inv-superroles) (pushnew inv-role (slot-value sr 'subroles))))) (dolist (role all-store-roles) (when (is-simple-role-p role) (when (cyclic-p role role) (error "*** CYCLE IN ROLE HIERARCHY DETECTED FOR ~A!" role)) (let ((all-srs (get-all-superroles role))) (setf (slot-value role 'all-superroles) all-srs) (dolist (sr all-srs) (pushnew role (slot-value sr 'all-subroles)))))) (dolist (role all-store-roles) (when (is-simple-role-p role) (let ((inv-role (get-inverse-role role))) (register-domain role (make-and-concept (remove nil (remove-duplicates (append (cons (role-domain role) (mapcar #'role-domain (all-superroles role))) (when inv-role (cons (role-range inv-role) (mapcar #'role-range (all-superroles inv-role))))))))) (register-range role (make-and-concept (remove nil (remove-duplicates (append (cons (role-range role) (mapcar #'role-range (all-superroles role))) (when inv-role (cons (role-domain inv-role) (mapcar #'role-domain (all-superroles inv-role)))))))))))) (let ((changed t)) ;;; Fixpunkt, alle Domain/Range-Konzepte f. die komplexen Rollen berechnen (loop while changed do (setf changed nil) (dolist (role all-store-roles) (when (is-and-role-p role) (when (and (not (role-domain role)) (every #'role-domain (arguments role))) (setf changed t) (register-domain role (make-and-concept (mapcar #'role-domain (arguments role))))) (when (and (not (role-range role)) (every #'role-range (arguments role))) (setf changed t) (register-range role (make-and-concept (mapcar #'role-range (arguments role)))))) (when (is-or-role-p role) (when (and (not (role-domain role)) (every #'role-domain (arguments role))) (setf changed t) (register-domain role (make-or-concept (mapcar #'role-domain (arguments role))))) (when (and (not (role-range role)) (every #'role-range (arguments role))) (setf changed t) (register-range role (make-or-concept (mapcar #'role-range (arguments role)))))))))))) tbox) ;;; ;;; ;;; (defun has-common-parent-feature (a b) (and (feature-p a) (feature-p b) (some #'(lambda (a) (and (feature-p a) (some #'(lambda (b) (and (feature-p b) (eq a b))) (cons b (all-superroles b))))) (cons a (all-superroles a))))) ;;; ;;; ;;; (defun create-and-role (roles &key feature-p) (let ((roles (remove-duplicates roles))) (if (cdr roles) (make-instance 'and-role :textual-description `(and ,@(mapcar #'textual-description roles)) :feature-p feature-p :constructor-sym 'reparse-role :feature-p t :arguments roles :superroles roles :all-superroles (reduce #'append (mapcar #'all-superroles roles)) :concept-store *cur-store* :tbox *cur-tbox* :role-domain (make-and-concept (mapcar #'role-domain roles)) :role-range (make-and-concept (mapcar #'role-range roles))) (first roles)))) ;;; ;;; ;;; (defmacro defrole (role &rest args) `(define-role ',role ,@(mapcar #'(lambda (x) `(quote ,x)) args))) (defmacro deffeature (role &rest args) `(define-role ',role :feature-p t ,@(mapcar #'(lambda (x) `(quote ,x)) args))) (defmacro subrole (role &rest superroles) `(let ((role (parse-role ',role)) (superroles (mapcar #'parse-role ',superroles))) (register-superroles role superroles))) (defmacro domain (role concept) `(let ((role (parse-role ',role)) (concept (parse-concept ',concept))) (register-domain role concept))) (defmacro range (role concept) `(let ((role (parse-role ',role)) (concept (parse-concept ',concept))) (register-range role concept))) (defmacro transitive (role) `(register-transitive (parse-role ',role)))
12,663
Common Lisp
.lisp
269
28.249071
124
0.46996
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
834c319433c7f57c04b44b7ed48ee3c6e54bac350d32db3be05caf75f3bd665e
12,529
[ -1 ]
12,530
alchfn-rplus-prover.lisp
lambdamikel_DLMAPS/src/prover/alchfn-rplus-prover.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (define-prover ((abox-sat alchfn-rplus abox)) (:init :call-next-method) (:main (perform (deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (simple-at-most-merging) (:positive (restart-main)) (:negative (perform (identify-stable-nodes) (:body (perform (model-merging) (:body (perform (make-models-for-nodes) (:body (perform (feature-expansion) (:positive (if clashes (handle-clashes) (perform (block-nodes :blocked succ) (:body (perform (model-merging :node succ) (:body (next-round))))))) (:negative (perform (some-expansion) (:positive (if clashes (handle-clashes) (perform (block-nodes :blocked new-node) (:body (perform (model-merging) (:body (next-round))))))) (:negative (perform (simple-at-least-expansion) (:positive (if clashes (handle-clashes) (perform (block-nodes :blocked new-node) (:body (perform (model-merging) (:body (next-round))))))) (:negative (let ((*blocking-enabled-p* nil)) (perform (make-models-for-nodes) (:body (perform (make-models-for-old-nodes) (:body (success))))))))))))))))))))))))))) #| (progn (with-kb (test test :delete-if-exists-p t) ;;; dieses Beispiel demonstriert, wie ;;; wichtig es ist, ERST die "oldest" OLD ;;; nodes zu expandieren; die "youngest" OLD ;;; zu präferieren führt wegen combined-some-all-rule ;;; zu falschem Ergebnis! das problem ist, dass ;;; bei youngest old first zunächst "c" und "b : some f c" ;;; gemerged werden; und dann erst "b" und "a : some f top". ;;; d.h., die transitive (all r (not c)) erreicht den ;;; gemergten Knoten "c" und "b : some f c" gar nicht! ;;; wird dagegen erst "b" und "a : some f top" gemerget, ;;; so hat der merge-Knoten schon (all r (not c)) im ;;; label, und das wird durchpropagiert, wenn dann ;;; das label für "b : (some f c)" erzeugt wird -> clash (defrole f :parents (r g)) (transitive r) (instance a (all r (not c))) (related a b g) (instance a (some f top)) (instance a (at-most 1 g)) (related b c g) (instance b (some f c)) (instance b (at-most 1 g)) (false! (abox-sat? test)))) |#
3,764
Common Lisp
.lisp
91
23.043956
75
0.406087
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
d8a6b3ccc2fd9a003189128a4c78f3433b13f89aae06b9c68b34e23b3d69cbbc
12,530
[ -1 ]
12,531
tbox9.lisp
lambdamikel_DLMAPS/src/prover/tbox9.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; TBoxen ;;; (defun mht () (make-hash-table :size 10000 :rehash-size 10000)) (defpersistentclass tbox () ((name :accessor name :initform nil :initarg :name) (tbox-version :accessor tbox-version :initform 0) (prepared-p :reader prepared-p :initform nil) (needs-blocking-p :reader needs-blocking-p :initform nil) (rbox :accessor rbox :initform nil :initarg :rbox) (used-by-aboxes :accessor used-by-aboxes :initform nil) (orig-axioms-with-left-side :accessor orig-axioms-with-left-side :initform (mht)) (orig-axioms-with-right-side :accessor orig-axioms-with-right-side :initform (mht)) (new-axioms-with-left-side :accessor new-axioms-with-left-side :initform (mht)) (new-axioms-with-right-side :accessor new-axioms-with-right-side :initform (mht)) (equivalent-names :accessor equivalent-names :initform (mht)) (primitive-names :accessor primitive-names :initform nil) (defined-names :accessor defined-names :initform nil) (cyclic-names :accessor cyclic-names :initform nil) (language :initform nil) (in-definition-order-p :accessor in-definition-order-p :initform nil) (told-subsumers-computed-p :accessor told-subsumers-computed-p :initform nil) (satisfiable :reader satisfiable :initform :not-tested) (meta-constraints :reader get-meta-constraints :initform nil) (taxonomy :initform nil) (axiom-counter :accessor axiom-counter :initform 0) (concept-store :reader concept-store :initarg :concept-store) (classification-order :accessor classification-order :initform nil))) ;;; ;;; ;;; (defmethod get-all-atoms ((tbox tbox)) (all-atoms (concept-store tbox))) (defmethod get-all-positive-atoms ((tbox tbox)) (positive-atoms (concept-store tbox))) (defmethod get-all-negative-atoms ((tbox tbox)) (negative-atoms (concept-store tbox))) ;;; ;;; ;;; (defmethod get-abox-type-for-tbox ((tbox tbox)) (let ((rbox (rbox tbox))) (etypecase rbox ; (null 'abox) (null (get-standard-abox-class)) (jepd-rolebox 'jepd-abox) (rolebox 'rolebox-abox)))) (defmethod get-abox-type-for-tbox ((tbox null)) (get-standard-abox-class)) ;;; ;;; ;;; (defmethod tbox-classified-p ((tbox tbox)) (when (slot-value tbox 'taxonomy) t)) ;;; ;;; ;;; (defpersistentclass taxonomy-node (dag-node) ((concept :accessor concept :initarg :concept :initform nil) (definition :accessor definition :initarg :definition :initform nil) (equivalents :accessor equivalents :initform nil))) (defmethod print-object ((node taxonomy-node) stream) (format stream "#<~A ~A>" (type-of node) (concept node))) ;;; ;;; ;;; (defpersistentclass taxonomy (dag) ((tbox :reader tbox :initform nil :initarg :tbox))) (defpersistentclass used-by-dag (dag)) (defmethod print-object ((taxonomy taxonomy) stream) (format stream "#<~A ~A ~A>" (type-of taxonomy) (dag-name taxonomy) (tbox taxonomy))) ;;; ;;; ;;; (defpersistentclass axiom () ((id :reader id :initarg :id) (left :accessor left :initarg :left) (right :accessor right :initarg :right) (or-concept :accessor or-concept :initarg :or-concept) (primitive-p :accessor primitive-p :initform nil :initarg :primitive-p) (name-equivalence-axiom-p :accessor name-equivalence-axiom-p :initform nil :initarg :name-equivalence-axiom-p) (role-domain-axiom-p :accessor role-domain-axiom-p :initform nil :initarg :role-domain-axiom-p) (role-range-axiom-p :accessor role-range-axiom-p :initform nil :initarg :role-range-axiom-p) (marked-p :accessor marked-p :initform nil :initarg :marked-p) (gci-p :accessor gci-p :initform nil :initarg :gci-p))) (defmethod print-object ((axiom axiom) stream) (if *print-pretty* (if (primitive-p axiom) (format stream "(~A ~A ~A)~%" (if (gci-p axiom) 'implies 'def*) (left axiom) (right axiom)) (format stream "(~A ~A ~A)~%" (if (gci-p axiom) 'equivalent 'def) (left axiom) (right axiom))) (if (primitive-p axiom) (format stream "#<~A: ~A => ~A>~%" (if (gci-p axiom) 'GCI 'DEF*) (left axiom) (right axiom)) (format stream "#<~A: ~A = ~A>~%" (if (gci-p axiom) 'GCI 'DEF) (left axiom) (right axiom))))) (defmethod unparse ((axiom axiom)) (let ((*print-pretty* t)) (read-from-string (format nil "|~A|" (print-object axiom nil))))) ;;; ;;; ;;; (defmethod print-object ((tbox tbox) stream) (if (prepared-p tbox) (progn (format stream "#<TBOX ~A, PREPARED, LANGUAGE ~A, " (name tbox) (get-language tbox)) (when (slot-value tbox 'taxonomy) (format stream " CLASSIFIED,")) (unless (eq (slot-value tbox 'satisfiable) :not-tested) (format stream " SATISFIABLE: ~A," (slot-value tbox 'satisfiable))) (format stream " ~A PCDs, ~A CDs, ~A GCIs, ~A MCs>" (length (get-primitive-concept-definitions tbox)) (length (get-defined-concept-definitions tbox)) (length (get-gcis tbox)) (length (get-meta-constraints tbox)))) (progn (format stream "#<TBOX ~A, ~A AXIOMS>" (name tbox) (length (get-original-axioms tbox)))))) ;;; ;;; ;;; (defun get-axioms-from (table) (let ((res nil)) (maphash #'(lambda (key val) (declare (ignore key)) ;(princ key) (princ val) (dolist (val val) (push val res))) table) (sort (remove-duplicates res) #'< :key #'id))) ;;; ;;; ;;; (defmethod get-original-axioms ((tbox tbox)) (get-axioms-from (orig-axioms-with-left-side tbox))) (defmethod get-new-axioms ((tbox tbox)) (get-axioms-from (new-axioms-with-left-side tbox))) (defmethod get-axioms-with-left-side ((left concept) &key orig-p) (gethash left (if orig-p (orig-axioms-with-left-side (tbox left)) (new-axioms-with-left-side (tbox left))))) (defmethod get-axioms-with-right-side ((right concept) &key orig-p) (gethash right (if orig-p (orig-axioms-with-right-side (tbox right)) (new-axioms-with-right-side (tbox right))))) ;;; ;;; ;;; (defmethod get-axioms-containing-right-side ((right concept) &key orig-p) (let* ((tbox (tbox right)) (axioms (if orig-p (orig-axioms-with-left-side tbox) (new-axioms-with-left-side tbox))) (found nil)) (maphash #'(lambda (key axioms) (declare (ignorable key)) (dolist (axiom axioms) (when (or (eq (right axiom) right) (and (is-and-concept-p (right axiom)) (member right (arguments (right axiom))))) (push axiom found)))) axioms) found)) ;;; ;;; ;;; (defmethod get-axioms ((tbox tbox) &key orig-p) (get-axioms-from (if orig-p (orig-axioms-with-left-side tbox) (new-axioms-with-left-side tbox)))) (defmethod get-simple-axioms ((tbox tbox) &key orig-p) (remove-if #'gci-p (get-axioms-from (if orig-p (orig-axioms-with-left-side tbox) (new-axioms-with-left-side tbox))))) (defmethod get-gcis ((tbox tbox) &key orig-p) (remove-if-not #'gci-p (get-axioms-from (if orig-p (orig-axioms-with-left-side tbox) (new-axioms-with-left-side tbox))))) ;;; ;;; ;;; (defun sort-concepts (list) (sort list #'< :key #'id)) ;;; ;;; ;;; (defmethod get-primitive-concept-definitions ((tbox tbox) &key orig-p) (remove-if-not #'primitive-p (get-simple-axioms tbox :orig-p orig-p))) (defmethod get-defined-concept-definitions ((tbox tbox) &key orig-p) (remove-if #'primitive-p (get-simple-axioms tbox :orig-p orig-p))) ;;; ;;; ;;; (defmethod get-simple-axiom-with-left-side ((name top-concept) &key &allow-other-keys) nil) (defmethod get-simple-axiom-with-left-side ((name bottom-concept) &key &allow-other-keys) nil) (defmethod get-simple-axiom-with-left-side ((name atomic-concept) &key orig-p) (let ((defs (remove-if #'gci-p (get-axioms-with-left-side name :orig-p orig-p)))) (when (and defs (not (cdr defs))) (values (right (first defs)) (first defs))))) ;;; ;;; ;;; (defmethod get-simple-axioms-with-left-side ((name top-concept) &key &allow-other-keys) nil) (defmethod get-simple-axioms-with-left-side ((name bottom-concept) &key &allow-other-keys) nil) (defmethod get-simple-axioms-with-left-side ((name atomic-concept) &key orig-p) (remove-if #'gci-p (get-axioms-with-left-side name :orig-p orig-p))) ;;; ;;; ;;; (defmethod get-concept-definition ((name atomic-concept) &key orig-p) (multiple-value-bind (right def) (get-simple-axiom-with-left-side name :orig-p orig-p) (when (and def (not (primitive-p def))) (values right def)))) (defmethod get-primitive-concept-definition ((name atomic-concept) &key orig-p) (multiple-value-bind (right def) (get-simple-axiom-with-left-side name :orig-p orig-p) (when (and def (primitive-p def)) (values right def)))) ;;; ;;; ;;; (defun ts-sort (atoms) (topo-sort atoms #'(lambda (x y) (member x (told-subsumers y))))) (defun def-order-sort (atoms) (topo-sort atoms #'(lambda (x y) (member x (references-atoms y))))) ;;; ;;; ;;; (defmethod compute-told-subsumers ((tbox tbox) &key orig-p) (declare (ignorable orig-p)) (let ((axioms (append (get-axioms tbox :orig-p orig-p ) ;(get-axioms tbox :orig-p t) )) (atoms (get-all-atoms tbox))) (when *debug-p* (terpri) (format t "All positive atoms: ~A~%" atoms)) (labels ((compute-direct-told-subsumers () (dolist (axiom axioms) (dolist (axiom (if (primitive-p axiom) (list (list (left axiom) (right axiom))) (list (list (left axiom) (right axiom)) (list (right axiom) (left axiom))))) (dolist (axiom (list axiom (list (get-negated-concept (second axiom)) (get-negated-concept (first axiom))))) (let* ((left (first axiom)) (right (second axiom)) (left-atoms (cond ((is-atomic-concept-p left) (list left)) ((is-or-concept-p left) (remove-if-not #'is-atomic-concept-p (arguments left))))) (right-atoms (cond ((is-atomic-concept-p right) (list right)) ((is-and-concept-p right) (remove-if-not #'is-atomic-concept-p (arguments right)))))) (dolist (left left-atoms) (dolist (right right-atoms) (dolist (left (cons left (get-equivalent-names left))) (dolist (right (cons right (get-equivalent-names right))) ;;; es macht nur Sinn, told subsumers fuer positive Atome ;;; zu berechnen, denn nur diese werden ja in der ;;; Taxonomie gehalten ;(unless (negated-p left) (pushnew right (told-subsumers left)) (when (negated-p right) (pushnew (get-negated-concept left) (told-subsumers (get-negated-concept right))))))))))))) (compute-all-told-subsumers (name) (if (marked-p name) (told-subsumers name) (progn (dolist (atom (told-subsumers name)) (dolist (ts (compute-all-told-subsumers atom)) (pushnew ts (told-subsumers name)))) (setf (marked-p name) t) (told-subsumers name))))) (unmark-all-atoms tbox) ;;; ;;; direkte fuer alle berechnen ;;; (compute-direct-told-subsumers) (when *debug-p* (dolist (name atoms) (format t "Direct told subsumers of ~A: ~A~%" name (told-subsumers name)))) ;;; ;;; transitive Huelle fuer nicht zu Zyklen fuehrende berechnen ;;; (labels ((leads-to-cycle-p (name path) (or (member name path) (some #'(lambda (x) (leads-to-cycle-p x (cons name path))) (told-subsumers name))))) (let ((leads-to-cycle (remove-if-not #'(lambda (x) (leads-to-cycle-p x nil)) atoms))) (when *debug-p* (format t "Atoms that lead to a cyclic atom: ~A~%" leads-to-cycle)) (dolist (name (reverse (ts-sort (set-difference atoms leads-to-cycle)))) (compute-all-told-subsumers name) (when *debug-p* (format t "All told subsumers of ~A: ~A~%" name (told-subsumers name)))) ;;; ;;; Cluster bestimmen ;;; (let ((clusters (find-cluster (remove-if-not #'cyclic-p atoms) ;; das ist eine Obermenge! ;; hier fuehren ja auch C -> (some R D), D -> etc. zu Zyklen, ;; aber D ist kein Told Subsumer von C! #'(lambda (x y) (member y (told-subsumers x)))))) (dolist (cluster clusters) (let ((all nil)) (dolist (name cluster) (setf (ts-cyclic-p name) t) (dolist (told (told-subsumers name)) (pushnew told all) (dolist (told (told-subsumers told)) (pushnew told all)))) (dolist (name cluster) (setf (told-subsumers name) all)) (when *debug-p* (format t "All told subsumers of cluster ~A: ~A~%" cluster all))))) ;;; ;;; Told Subsumers fuer zu Cluster fuehrende setzen ;;; (dolist (name leads-to-cycle) (when (positive-p name) (unless (ts-cyclic-p name) ; nicht selbst im Cluster, aber fuehr zum Cluster (labels ((find-cluster-node (node) (princ node) (if (ts-cyclic-p node) node (find-if #'find-cluster-node (told-subsumers node))))) (let ((cluster-node (find-cluster-node name))) (unless cluster-node (break "Found no cluster node for ~A" name)) (setf (told-subsumers name) (told-subsumers cluster-node)) (when *debug-p* (format t "All told subsumers of ~A (leading to cluster ~A): ~A~%" name cluster-node (told-subsumers name))))))))) ;;; ;;; ;;; (unmark-all-atoms tbox) (setf (slot-value tbox 'told-subsumers-computed-p) t))))) ;;; ;;; ;;; (defmethod initialize-instance :after ((tbox tbox) &rest initargs &key dont-initialize-p) (unless dont-initialize-p (pushnew tbox *all-tboxes*))) (defun make-tbox (name &rest args &key (rbox *cur-rbox*) (delete-if-exists-p t) &allow-other-keys) (when delete-if-exists-p t (delete-tbox name :error-p nil :all-p t)) (let* ((store (make-concept-store name)) (tbox (apply #'make-instance 'tbox :name name :rbox rbox :concept-store store :allow-other-keys t args))) (setf (slot-value store 'tbox) tbox) (let ((*cur-tbox* tbox)) (with-concept-store (store) (make-top-concept) (make-bottom-concept))) tbox)) (defun find-tbox (name &key error-p) (or (if (typep name 'tbox) name (find name *all-tboxes* :key #'name :test #'(lambda (x y) (or (equal x y) (and (Stringp x) (stringp y) (string-equal x y)))))) (when error-p (error "Can't find TBox named ~A!" name)))) (defun delete-tbox (name &key all-p (error-p t)) (let ((found nil)) (loop (let ((tbox (find-tbox name :error-p error-p))) (when tbox (setf found t)) (setf error-p nil) (unless tbox (when found (in-tbox default-tbox) (in-abox default-abox)) (return)) (setf *all-tboxes* (delete tbox *all-tboxes*)) (dolist (abox (used-by-aboxes tbox)) (delete-abox abox)) (unless all-p (in-tbox default-tbox) (in-abox default-abox) (return)))))) (defun delete-all-tboxes () (setf *all-tboxes* nil) (in-tbox default-tbox) (delete-all-aboxes) *cur-tbox*) (defun all-tboxes () *all-tboxes*) (defun current-tbox () *cur-tbox*) ;;; ;;; ;;; (defmethod make-axiom ((left concept) (right concept) &key (tbox *cur-tbox*) primitive-p gci-p (orig-p t) marked-p role-domain-axiom-p role-range-axiom-p) (unless tbox (error "No TBox!")) (if (eq left right) (format t "~%*** WARNING: Bad axiom ~A -> ~A: equivalent to TOP! Axiom ignored.~%" left right) (let* ((left (if (not primitive-p) (if (is-atomic-concept-p left) left (if (is-atomic-concept-p right) right left)) left)) (right (first (remove left (list left right))))) (note-tbox-modified tbox) (let ((found (find-if #'(lambda (x) (eq (right x) left)) (get-axioms-with-left-side right :orig-p orig-p)))) (when found (setf (primitive-p found) nil)) (let ((axiom (or found (make-instance 'axiom :id (incf (axiom-counter tbox)) :gci-p gci-p :primitive-p primitive-p :marked-p marked-p :left left :right right :role-domain-axiom-p role-domain-axiom-p :role-range-axiom-p role-range-axiom-p)))) (when orig-p (if (gethash left (orig-axioms-with-left-side tbox)) (pushnew axiom (gethash left (orig-axioms-with-left-side tbox))) (setf (gethash left (orig-axioms-with-left-side tbox)) (list axiom))) (if (gethash right (orig-axioms-with-right-side tbox)) (pushnew axiom (gethash right (orig-axioms-with-right-side tbox))) (setf (gethash right (orig-axioms-with-right-side tbox)) (list axiom)))) (unless orig-p (if (gethash left (new-axioms-with-left-side tbox)) (pushnew axiom (gethash left (new-axioms-with-left-side tbox))) (setf (gethash left (new-axioms-with-left-side tbox)) (list axiom))) (if (gethash right (new-axioms-with-right-side tbox)) (pushnew axiom (gethash right (new-axioms-with-right-side tbox))) (setf (gethash right (new-axioms-with-right-side tbox)) (list axiom)))) axiom))))) (defmethod delete-axiom ((tbox tbox) (axiom axiom) &key (orig-p t)) (note-tbox-modified tbox) (when orig-p (setf (gethash (left axiom) (orig-axioms-with-left-side tbox)) (delete axiom (gethash (left axiom) (orig-axioms-with-left-side tbox)))) (setf (gethash (right axiom) (orig-axioms-with-right-side tbox)) (delete axiom (gethash (right axiom) (orig-axioms-with-right-side tbox))))) (unless orig-p (setf (gethash (left axiom) (new-axioms-with-left-side tbox)) (delete axiom (gethash (left axiom) (new-axioms-with-left-side tbox)))) (setf (gethash (right axiom) (new-axioms-with-right-side tbox)) (delete axiom (gethash (right axiom) (new-axioms-with-right-side tbox)))))) ;;; ;;; ;;; (defmethod unmark-all-atoms ((tbox tbox)) (dolist (atom (get-all-atoms tbox)) (setf (marked-p atom) nil))) (defmethod compute-referenced-atoms ((concept atomic-concept) &key orig-p) (labels ((do-it (name) (dolist (name (cons name (get-equivalent-names name))) (let ((axioms (get-axioms-with-left-side name :orig-p orig-p))) (dolist (axiom axioms) (dolist (name (get-all-atoms (right axiom))) (when (and (positive-p name) (not (marked-p name))) (push name (references-atoms concept)) (setf (marked-p name) t) (do-it name)))))))) (unmark-all-atoms (tbox concept)) (do-it concept) (setf (references-atoms concept) (remove-duplicates (references-atoms concept))))) (defmethod compute-cross-references ((tbox tbox) &key orig-p) (dolist (name (get-all-atoms tbox)) (compute-referenced-atoms name :orig-p orig-p) (when (member name (references-atoms name)) (setf (cyclic-p name) t) (setf (slot-value tbox 'needs-blocking-p) t))) (unmark-all-atoms tbox)) ;;; ;;; ;;; (defmethod partition ((tbox tbox) &key (orig-p t) (allow-cyclic-primitive-definitions-p t)) (let* ((axioms (if orig-p (get-original-axioms tbox) (get-new-axioms tbox))) (left-sides (sort-concepts (remove-duplicates (mapcar #'left axioms)))) (new-axioms nil) (name-equivalence-axioms nil)) ;;; ;;; C -> D, C -> E => C -> D /\ E ;;; (dolist (left-side left-sides) (let* ((axioms (get-axioms-with-left-side left-side :orig-p orig-p)) (prim-axioms (remove-if-not #'primitive-p axioms)) (def-axioms (remove-if #'primitive-p axioms))) (when prim-axioms (let* ((axiom (first prim-axioms)) (rem-axioms (rest prim-axioms)) (right-sides (mapcar #'right prim-axioms))) (setf (right axiom) (make-and-concept right-sides)) (push axiom new-axioms) (dolist (axiom rem-axioms) (delete-axiom tbox axiom :orig-p orig-p)))) (dolist (axiom def-axioms) ;;; (def C D) (if (and (is-atomic-concept-p (left axiom)) (is-atomic-concept-p (right axiom)) (not (is-top-concept-p (left axiom))) (not (is-top-concept-p (right axiom))) (not (is-bottom-concept-p (left axiom))) (not (is-bottom-concept-p (right axiom)))) ;;; (def CN DN) ? (push axiom name-equivalence-axioms) (push axiom new-axioms))))) ;;; ;;; ab hier habe ich hoechstens ein Axiom der Form C -> D ;;; aber es koennen noch Axiome der Form C = E zusaetzlich ;;; vorhanden sein! ;;; Außerdem sind equivalente Namesdefinition (DEF CN DN) ;;; in name-equivalence-axioms! ;;; (dolist (axiom new-axioms) (setf (marked-p axiom) nil)) (let* ((new-axioms (reverse new-axioms)) ; wichtig! (simple-axioms (remove-if #'(lambda (axiom) (or (not (is-atomic-concept-p (left axiom))) (is-top-concept-p (left axiom)) (is-bottom-concept-p (right axiom)) (negative-p (left axiom)) (and (not (primitive-p axiom)) ;; (def C TOP) ist GCI, aber ;; (def* C TOP) ist sogar redundant! (is-top-concept-p (right axiom))))) new-axioms)) (simple-axioms ; ordnung (append (remove-if-not #'primitive-p simple-axioms) (remove-if #'primitive-p simple-axioms))) (sure-gci-axioms (set-difference new-axioms simple-axioms)) (partitions nil)) (dolist (axiom sure-gci-axioms) (setf (gci-p axiom) t)) (dolist (axiom simple-axioms) (setf (gci-p axiom) nil)) (unmark-all-atoms tbox) (labels ((cyclic-p (cur axiom &key (orig-p t) (consider-only-non-primitive-axioms-p t)) (cond ((eq (right cur) (left axiom)) t) (t (some #'(lambda (atom) (let ((axioms (get-axioms-with-left-side atom :orig-p orig-p))) (when axioms (cond ((member axiom axioms) t) (t (let ((axioms (remove-if #'(lambda (axiom) (or (not (marked-p axiom)) (gci-p axiom) (and consider-only-non-primitive-axioms-p (primitive-p axiom)))) axioms))) (when (cdr axioms) (error "Error in TBox partioning procedure!")) (when axioms (cyclic-p (first axioms) axiom)))))))) (get-all-atoms (right cur)))))) (causes-cycle-p (axiom &rest args) (apply #'cyclic-p axiom axiom args)) (do-it (u-axioms rem-axioms) ;;; ;;; da rem-axioms sortiert ist ;;; (erst die primitiven, dann ;;; die nicht-primitiven!) ;;; wird dolist immer zunaechst ;;; primitive finden ;;; (let ((good-axiom (loop while rem-axioms do (let ((x (first rem-axioms))) (if (primitive-p x) ;;; primitive-p (if (or (marked-p x) (gci-p x) (and (marked-p (left x)) (not allow-cyclic-primitive-definitions-p)) (and (not allow-cyclic-primitive-definitions-p) (causes-cycle-p x :orig-p orig-p :consider-only-non-primitive-axioms-p nil))) (setf rem-axioms (delete x rem-axioms)) (return x)) ;;; not primitive-p (if (or (marked-p x) (gci-p x) (marked-p (left x)) (and (is-atomic-concept-p (right x)) (marked-p (right x))) (causes-cycle-p x :orig-p orig-p :consider-only-non-primitive-axioms-p t)) (setf rem-axioms (delete x rem-axioms)) (return x)))) finally (return nil)))) (if (not good-axiom) (push (reverse u-axioms) partitions) (let ((name (left good-axiom))) ;(princ name) (terpri) (setf (marked-p name) t) (setf (marked-p good-axiom) t) (do-it (cons good-axiom u-axioms) (remove good-axiom rem-axioms))))))) (do-it nil simple-axioms) (setf partitions (sort partitions #'> :key #'length)) (let* ((u-part (first partitions)) (g-part (append (set-difference simple-axioms u-part) ;;; die nicht in u-part uebernommen ;;; simple-axioms muessen zusaetzlich ;;; als GCIs behandelt werden... sure-gci-axioms))) (loop as axiom in g-part do (setf (gci-p axiom) t)) (loop as axiom in u-part do (setf (gci-p axiom) nil)) (loop as axiom in name-equivalence-axioms do (setf (name-equivalence-axiom-p axiom) t)) #| (setf x u-part) (setf y g-part) (setf z name-equivalence-axioms) |# (when *debug-p* (terpri) (princ "U-Part : ") (princ (length u-part)) (terpri) (princ "G-Part : ") (princ (length g-part)) (terpri) (princ "E-Part : ") (princ (length name-equivalence-axioms)) (terpri) ;(break) ) ;;; ;;; primitive Atome markieren ;;; (dolist (axiom u-part) (when (primitive-p axiom) (setf (primitive-p (left axiom)) t))) (let ((change t)) (loop while change do (setf change nil) (dolist (axiom name-equivalence-axioms) (cond ((and (primitive-p (left axiom)) (not (primitive-p (right axiom)))) (setf (primitive-p (right axiom)) t change t)) ((and (primitive-p (right axiom)) (not (primitive-p (left axiom)))) (setf (primitive-p (left axiom)) t change t)))))) ;;; ;;; ;;; (values u-part g-part)))))) ;;; ;;; ;;; (defmethod positive-p ((atom atomic-concept)) (not (negated-p atom))) (defmethod positive-p ((concept and/or-concept)) (every #'positive-p (arguments concept))) (defmethod positive-p ((concept some/all-concept)) (positive-p (qualification concept))) ;;; ;;; ;;; (defmethod negative-p ((concept concept)) (negated-p concept)) (defmethod negative-p ((concept and/or-concept)) (every #'negative-p (arguments concept))) (defmethod negative-p ((concept some/all-concept)) (negative-p (qualification concept))) ;;; ;;; ;;; (defmethod get-equivalent-names ((name atomic-concept)) (gethash name (equivalent-names (tbox name)))) (defmethod absorb-gcis ((tbox tbox)) (labels ((try-to-absorb (set) (let ((loop t)) (loop while loop do ;(setf set (sort set #'< :key #'id)) (when *debug-p* (format t "~%*** SET: ~A~%" set)) (setf loop nil) ;;; ;;; DL-Handbook s. 327 ;;; ;;; (ii) ;;; (let* ((found nil) (w (find-if #'(lambda (w) (and (is-atomic-concept-p w) (positive-p w) (multiple-value-bind (right def) (get-simple-axiom-with-left-side w) (declare (ignorable right)) (when (and def (primitive-p def)) (setf found def) t)))) set))) (when w (let* ((right (right found)) (c (make-and-concept (list right (make-not-concept (make-and-concept (remove w set))))))) (setf (slot-value found 'right) c) (setf (gethash right (new-axioms-with-right-side tbox)) (delete found (gethash right (new-axioms-with-right-side tbox)))) (if (gethash c (new-axioms-with-right-side tbox)) (push found (gethash c (new-axioms-with-right-side tbox))) (setf (gethash c (new-axioms-with-right-side tbox)) (list found)))) (when *debug-p* (format t "~%*** ABSORBED ~A (~A) INTO ~A!" w set found)) (return-from try-to-absorb nil))) ;;; ;;; (iii) ;;; (let* ((found nil) (w (find-if #'(lambda (w) (and (is-atomic-concept-p w) (positive-p w) (multiple-value-bind (right def) (get-simple-axiom-with-left-side w) (declare (ignore right)) (when (and def (not (primitive-p def))) (setf found def) t)))) set))) (when w (when *debug-p* (format t "*** (III)~%")) (setf loop t) (setf set (remove w set)) (push (right found) set))) ;;; ;;; (iv) ;;; (unless loop (let* ((found nil) (w (find-if #'(lambda (w) (and (is-atomic-concept-p w) (negative-p w) (multiple-value-bind (right def) (get-simple-axiom-with-left-side (get-negated-concept w)) (when (and def (not (primitive-p def)) (is-or-concept-p right)) (setf found def) t)))) set))) (when w (when *debug-p* (format t "*** (IV)~%")) (setf loop t) (setf set (remove w set)) (push (get-negated-concept (right found)) set)))) ;;; ;;; (v) ;;; (unless loop (let ((inner-loop t)) (loop while inner-loop do ; AND's expandieren (setf inner-loop nil) (let ((and (find-if #'is-and-concept-p set))) (when and (when *debug-p* (format t "*** (V)~%")) (setf inner-loop t) (setf loop t) (setf set (remove and set)) (setf set (append set (arguments and)))))))) ;;; ;;; (vi) ;;; (unless loop (let ((or (find-if #'is-or-concept-p set)) (disjuncts-to-keep nil)) (when or ;(setf loop t) (when *debug-p* (format t "*** (VI)~%")) (dolist (arg (arguments or)) (let ((res (try-to-absorb (cons arg (remove or set))))) ;;; wurde ein Disjunkt absorbiert? ;;; -> OR ersetzen gegen übriggebliebene Diskunkte, ;;; die nicht absorbiert werden konnten (when res (push arg disjuncts-to-keep)))) (setf set (if (not disjuncts-to-keep) (remove or set) (cons (make-or-concept disjuncts-to-keep) (remove or set)))))))) (when *debug-p* (format t "*** RETURNING ~A~%!" set)) set))) (with-slots (meta-constraints) tbox (let* ((axioms (get-original-axioms tbox)) (simple-axioms ; GCI-P: s. "partition-tbox" (remove-if #'gci-p axioms)) (name-equivalence-axioms (remove-if-not #'name-equivalence-axiom-p simple-axioms)) (simple-axioms (remove-if #'name-equivalence-axiom-p simple-axioms)) (gcis (remove-if-not #'gci-p axioms)) (simple-gcis (remove-if-not #'(lambda (x) (is-atomic-concept-p (left x))) gcis)) (gcis (sort (append simple-gcis (set-difference gcis simple-gcis)) #'< :key #'(lambda (x) (id (left x))))) (new-gcis nil) (rem-names (remove-if #'(lambda (x) (or (is-top-concept-p x) (is-bottom-concept-p x) (get-simple-axioms-with-left-side x :orig-p t))) (get-all-atoms tbox)))) (dolist (name rem-names) ;;; (def* AN TOP) f. undefiniertes AN (make-axiom name (make-top-concept) :orig-p nil :tbox tbox :gci-p nil :primitive-p t)) (dolist (axiom simple-axioms) (make-axiom (left axiom) (right axiom) :tbox tbox :gci-p nil :marked-p t :primitive-p (primitive-p axiom) :orig-p nil)) ;;; ;;; GCI-Absorption ;;; (dolist (gci gcis) ;; (format t "~% GCI: ~A~%" gci) (let ((sets (if (primitive-p gci) (list (list (get-negated-concept (right gci)) (left gci))) (list (list (get-negated-concept (right gci)) (left gci)) (list (get-negated-concept (left gci)) (right gci)))))) (dolist (set sets) (let ((res (try-to-absorb set))) ;(unless res ; (format t "~% ABSORBED ~A!" set)) (when res (when *debug-p* (format t "~%*** Warning: Unable to absorb: ~A -> ~A~%" gci res) ;(break) ) (push res new-gcis)))))) ;;; ;;; Axiome der Art (def CN DN) CN, DN = Konzeptnamen (Atome) ;;; ;;; (princ name-equivalence-axioms) (break) (dolist (axiom name-equivalence-axioms) (let* ((left (left axiom)) (right (right axiom)) (names (cons left (cons right (append (get-equivalent-names left) (get-equivalent-names right)))))) (dolist (name names) (let ((names (remove name names))) (when names (setf (gethash name (equivalent-names (tbox name))) names) (setf (gethash (get-negated-concept name) (equivalent-names (tbox name))) (mapcar #'get-negated-concept (get-equivalent-names name)))))))) ;;; ;;; Meta-Constraints erzeugen / GCIs ;;; (when new-gcis (setf (slot-value tbox 'needs-blocking-p) t) (let ((meta-args (arguments (make-and-concept ;; wichtig wegen Normalisierung!!! (and (and ...)) ! (mapcar #'(lambda (new-gci) (get-negated-concept (make-and-concept new-gci))) new-gcis)))) (rem-meta-args nil)) (dolist (meta-arg meta-args) (cond ((is-all-concept-p meta-arg) ;;; top -> (all r c) (when *debug-p* (format t "Absorbing meta constraint conjunct ~A into role range of ~A (~A)~%" meta-arg (role meta-arg) (qualification meta-arg))) (register-range (role meta-arg) (qualification meta-arg))) ((and (is-or-concept-p meta-arg) (find-if #'(lambda (x) (and (is-all-concept-p x) (is-bottom-concept-p (qualification x)))) (arguments meta-arg))) ;;; (or (all r bottom) (and c d)) = (some r top) -> (and c d) (let* ((all (find-if #'(lambda (x) (and (is-all-concept-p x) (is-bottom-concept-p (qualification x)))) (arguments meta-arg))) (rem (make-or-concept (remove all (arguments meta-arg))))) (when *debug-p* (format t "Absorbing meta constraint conjuncts ~A into role domain of ~A (~A)~%" meta-arg (role all) rem)) (register-domain (role all) rem))) (t (push meta-arg rem-meta-args)))) (when rem-meta-args (setf (slot-value tbox 'meta-constraints) ;;; immer nur einer! (list (make-and-concept rem-meta-args))) (make-axiom (parse-concept 'top) (first (slot-value tbox 'meta-constraints)) :tbox tbox :gci-p t :primitive-p t :orig-p nil)))) ;;; ;;; Axiome (defprimtconcept A TOP) loeschen ;;; (dolist (axiom (get-axioms-with-right-side (make-top-concept) :orig-p nil)) (when (and (primitive-p axiom) ;;; notwendig, weil in das Axiom hineinabsorbiert ;;; worden sein kann! (is-top-concept-p (right axiom))) (delete-axiom tbox axiom :orig-p nil)))))) tbox) ;;; ;;; ;;; (defmethod compute-classification-order ((tbox tbox)) ;;; ;;; Classification Order / In Definition Order? ;;; (let* ((atoms (get-all-positive-atoms tbox)) (non-cyclic-atoms (remove-if #'cyclic-p atoms)) (cyclic-atoms (remove-if-not #'cyclic-p atoms)) (ts-cyclic-cyclic-atoms (remove-if-not #'ts-cyclic-p cyclic-atoms)) (rem-cyclic-atoms (remove-if #'ts-cyclic-p cyclic-atoms)) (top (parse-concept 'top)) (bottom (parse-concept 'bottom))) (unmark-all-atoms tbox) (dolist (atom atoms) (setf (marked-p atom) t)) ;; (setf *x* (list non-cyclic-atoms cyclic-atoms ts-cyclic-cyclic-atoms)) ;; (breaK) (setf (classification-order tbox) (cons top (cons bottom (delete top (delete bottom (append (def-order-sort non-cyclic-atoms) (ts-sort rem-cyclic-atoms) ts-cyclic-cyclic-atoms)))))) (unless cyclic-atoms (setf (in-definition-order-p tbox) t)) ;;; ;;; ;;; tbox)) ;;; ;;; ;;; (defmethod prepare ((tbox tbox) (language dl)) ;;; an dieser Stelle ist die Sprache der TBox ;;; noch nicht bekannt!!! (unless (prepared-p tbox) (setf (slot-value tbox 'language) nil (slot-value tbox 'taxonomy) nil (slot-value tbox 'satisfiable) :not-tested) (reset-sat-status (concept-store tbox)) (dolist (abox (used-by-aboxes tbox)) (reset-sat-status abox)) (when *debug-p* (terpri) (princ "Preparing TBox...") (terpri)) (clrhash (new-axioms-with-left-side tbox)) (clrhash (new-axioms-with-right-side tbox)) (when *debug-p* (princ " Partitioning TBox -> ")) (partition tbox) (when *debug-p* (format t "Simple Axioms: ~A. GCIs: ~A.~%" (length (get-simple-axioms tbox :orig-p t)) (length (get-gcis tbox :orig-p t))) (princ " Performing GCI-Absorption -> ")) (absorb-gcis tbox) (when *debug-p* (format t "Simple Axioms: ~A. GCIs: ~A.~%" (length (get-simple-axioms tbox)) (length (get-gcis tbox))) (princ " Computing cross references -> ")) (compute-cross-references tbox) (when *debug-p* (princ " Preparing Roles -> ")) (prepare-roles tbox) (when *debug-p* (format t "Roles: ~A. Transitive Roles: ~A. Features: ~A~%" (length (get-all-roles tbox)) (length (get-all-transitive-roles tbox)) (length (get-all-features tbox)))) (dolist (name (get-all-atoms tbox)) (when (cyclic-p name) (push name (cyclic-names tbox))) (let ((axioms (get-axioms-with-left-side name))) (cond ((or (not axioms) (and (not (cdr axioms)) (primitive-p (first axioms)))) (setf (primitive-p name) t) (push name (primitive-names tbox))) (t (push name (defined-names tbox)))))) (when *debug-p* (princ "DONE!") (terpri)) (when *debug-p* (princ " Cyclical Concepts -> ") (princ (cyclic-names tbox)) (terpri) (princ " Blocking Needed? -> ") (princ (needs-blocking-p tbox)) (terpri)) (when *compute-told-subsumers-p* (when *debug-p* (princ " Computing told subsumers -> ")) (unless (told-subsumers-computed-p tbox) (compute-told-subsumers tbox))) (when *debug-p* (terpri) (princ " Computing classification order -> ")) (compute-classification-order tbox) (when *debug-p* (princ "DONE!") (terpri) (if (in-definition-order-p tbox) (format t " TBox is in Definition Order.~%") (format t " TBox is *NOT* in Definition Order.~%"))) ;;; ;;; ;;; (setf (slot-value tbox 'prepared-p) t) ;;; wichtig - muss VOR get-language gesetzt werden, sonst Endlosschleife! (prepare (concept-store tbox) +dl+) (get-language tbox) (when *debug-p* (princ " Computing language -> ") (princ (slot-value tbox 'language)) (terpri) (terpri)) ;;; ;;; ;;; tbox)) ;;; ;;; ;;; (defmethod taxonomy ((tbox tbox) &rest args &key recompute-p &allow-other-keys) (prepare tbox +dl+) (or (and (not recompute-p) (slot-value tbox 'taxonomy)) (let ((taxonomy (make-dag :type 'taxonomy :tbox tbox :name (format nil "Taxonomy of TBox ~A" (name tbox))))) (setf (slot-value tbox 'taxonomy) (apply #'classify taxonomy args)) (unmark-all-dag-nodes taxonomy) (dolist (node (dag-nodes taxonomy)) (when (defined-concept-p (concept node)) (mark-dag-node node))) taxonomy))) (defmethod taxonomy ((tbox null) &rest args ) (error "Can't find TBox!")) (defmethod taxonomy (tbox &rest args ) (apply #'taxonomy (find-tbox tbox) args)) ;;; ;;; ;;; (defmethod classify ((tbox tbox) &rest args ) (apply #'taxonomy tbox args)) (defmethod classify ((tbox symbol) &rest args ) (apply #'taxonomy tbox args)) ;;; ;;; ;;; (defmethod compute-used-by-dag ((tbox tbox) &key (name #'original-description concept) (definition #'(lambda (concept) (get-simple-axiom-with-left-side tbox concept))) (root (make-top-concept)) (children ;; voreingestellt für used-by-Relation! #'(lambda (concept) (apply #'append (mapcar #'(lambda (x) (get-all-atoms (left x))) (remove-if-not #'(lambda (axiom) (member concept (get-all-atoms (right axiom)))) (get-simple-axioms tbox))))))) (let ((nodes nil) (dag (make-dag :type 'used-by-dag :name (format nil "Used-by-relationship of TBox ~A" (name tbox)) :tbox tbox))) (labels ((expand (concept) (or (find concept nodes :key #'concept) (let ((children (funcall children concept)) (node (make-dag-node :type 'taxonomy-node :concept concept :name (funcall name concept) :definition (funcall definition concept) :concept concept))) (push node nodes) (let ((children (mapcar #'expand children))) (setf (dag-node-children node) children) (dolist (child children) (push node (dag-node-parents child))) (insert-dag-node dag node)) node)))) (expand root) dag))) ;;; ;;; ;;; (defmethod classify ((taxonomy taxonomy) &rest args) (let ((tbox (tbox taxonomy))) (let ((time (measure-time (unless (apply #'tbox-sat-p tbox ;:debug-p t args) (format t "~%*** TBox ~A is incoherent!~%" tbox) (return-from classify nil))))) (format t "~%*** TIME NEEDED FOR TBOX COHERENCE CHECK: ~A SECONDS~%" time) (show-statistics)) (format t "~%*** CLASSIFY CALLED WITH ARGUMENTS: ~A ~A~%" tbox args) (let ((time (measure-time (let* ((concepts (classification-order tbox)) (nodes (mapcar #'(lambda (atomic-concept) (make-dag-node :type 'taxonomy-node :name (original-description atomic-concept) :concept atomic-concept :definition (get-simple-axiom-with-left-side atomic-concept))) (if *non-determinism-p* (progn (setf (in-definition-order-p tbox) nil) (reorder concepts)) concepts))) (n (length nodes)) (count 0) (pos 0) (lastpos nil)) (setf *nodes* nodes) (loop as i from 1 to 100 do (princ "-")) (terpri) (unmark-all-atoms tbox) (dolist (node nodes) (setf *node* node) (apply #'classify-node node taxonomy args) ;;(princ "+") (incf count) (setf pos (floor (+ 0.5 (* 100 (/ count n))))) (when (or (not lastpos) (not (= pos lastpos))) (loop as i from (or lastpos 0) to (1- pos) do (princ "*")) (setf lastpos pos))) (terpri))))) (format t "~%*** TIME NEEDED FOR TBOX CLASSIFICATION: ~A SECONDS~%" time) (show-statistics))) taxonomy) (defmethod classify-node ((node taxonomy-node) (taxonomy taxonomy) &rest args) (setf *taxonomy* taxonomy) (when *debug-p* (terpri) (princ ">>>>>>>>> Now classifying ") (princ node) (terpri)) (let* ((tbox (tbox taxonomy)) (args (append (list :tbox tbox) (list :rbox (rbox tbox)) (list :type (get-abox-type-for-tbox tbox)) (list :debug-p (or *debug-p* (and *debug-p* (=> *debug-node* (eq (dag-node-name node) *debug-node*))))) (append args (list :language (get-language tbox))))) (concept (concept node)) (parents (apply #'compute-node-parents node taxonomy args)) (children (progn (setf (dag-node-parents node) parents) #| (pprint (list node parents ;(in-definition-order-p tbox) (not (get-meta-constraints tbox)) ;(not (is-bottom-concept-p concept)) ;(not (is-top-concept-p concept)) (is-atomic-concept-p concept) (multiple-value-bind (def axiom) (get-simple-axiom-with-left-side concept) (declare (ignorable def)) (and axiom (primitive-p axiom) (every #'(lambda (x) (=> (positive-p x) (marked-p x))) (told-subsumers (right axiom))))))) |# ;;; wichtig, die muessen hier schon gesetzt werden! (let ((condition (and (in-definition-order-p tbox) (not (get-meta-constraints tbox)) (not (is-top-concept-p concept)) (not (is-bottom-concept-p concept)) (is-atomic-concept-p concept) (multiple-value-bind (def axiom) (get-simple-axiom-with-left-side concept) (declare (ignorable def)) (or (and (not axiom) (not (get-axioms-with-left-side concept))) (and axiom (primitive-p axiom) (every #'(lambda (x) (=> (positive-p x) (marked-p x))) (typecase (right axiom) (atomic-concept (list (right axiom))) (and-concept (remove-if-not #'is-atomic-concept-p (arguments (right axiom)))))))))))) (if condition (progn (when *debug-p* (format t "**** SKIPPING BOTTOM SEARCH PHASE FOR ~A!~%" node)) (let ((children (or (mapcar #'(lambda (x) (find-node-for-concept1 taxonomy x)) (remove-if-not #'marked-p (get-equivalent-names concept))) (list (find-node-for-concept1 taxonomy (parse-concept 'bottom)))))) children )) (let ((children (apply #'compute-node-children node taxonomy args)) (children2 (or (mapcar #'(lambda (x) (find-node-for-concept1 taxonomy x)) (remove-if-not #'marked-p (get-equivalent-names concept))) (list (find-node-for-concept1 taxonomy (parse-concept 'bottom)))))) (when (and condition (not (set-equal children children2))) (break "Error: Bottom Search Phase skipped?! ~A ~A ~A" node children children2)) children)))))) (if (and (set-equal parents children) parents (not (cdr parents)) (not (cdr children))) (let ((equi-node (car parents))) (unless (eq equi-node node) (when *debug-p* (format t "**** FOUND EQUIVALENT NODE FOR ~A: ~A!~%" node (car parents))) (setf (slot-value equi-node 'equivalents) (cons node (slot-value equi-node 'equivalents))))) (progn (when *debug-p* (format t "**** PARENTS OF ~A: ~A!~%" node parents) (format t "**** CHILDREN OF ~A: ~A!~%" node children)) (setf (dag-node-parents node) parents (dag-node-children node) children) (setf (marked-p (concept node)) t) (insert-dag-node taxonomy node))))) ;;; ;;; ;;; (defmethod subsumes1-p ((a concept) (b concept) &rest args) (let ((res (if (and *logging-p* (=> *debug-node* (eq (dag-node-name *node*) *debug-node*))) (progn (apply #'subsumes-p a b :debug-p t args)) (apply #'subsumes-p a b args)))) (when *racer-validation-p* (let ((*print-pretty* t)) (unless (eq (racer-user::concept-subsumes-p (let ((*package* (find-package :racer-user))) (read-from-string (format nil "~A" a))) (let ((*package* (find-package :racer-user))) (read-from-string (format nil "~A" b))) *racer-tbox*) res) (with-logging (progn (trace subsumes-p) (trace sat-p) (trace abox-sat-p) (trace consistent-p) (trace already-known-to-be-satisfiable-p) (trace already-known-to-be-inconsistent-p) (trace prover-init) (trace prover-main) (format t "~%~%!!!!!!!!!!!!!!!! ERROR !!!!!!!!!!!!!!!!!!!!!!~%~%") (apply #'subsumes-p a b :debug-p t :recompute-p t args) (format t "~%~%!!!!!!!!!!!!!!!! ERROR !!!!!!!!!!!!!!!!!!!!!!~%~%") (force-output *standard-output*))) (error "Found mismatch for (subsumes? ~A ~A): Racer: ~A, Prover: ~A" a b (not res) res)))) (when *debug-p* (if res (format t "~A SUBSUMES ~A~%" a b) (format t "~A DOES NOT SUBSUME ~A~%" a b))) res)) ;;; ;;; ;;; (defmethod get-told-non-subsumers ((concept concept)) (mapcar #'get-negated-concept (remove-if-not #'negated-p (told-subsumers concept)))) ;;; ;;; ;;; (defmethod compute-node-parents ((node taxonomy-node) (taxonomy taxonomy) &rest args) (labels ((mark-all-descendants (node) (unless (eq (dag-node-marked-p node) 'no) (mark-dag-node node 'no) (mapc #'mark-all-descendants (dag-node-children node)))) (mark-all-ancestors (node) (unless (eq (dag-node-marked-p node) 'yes) (mark-dag-node node 'yes) (mapc #'mark-all-ancestors (dag-node-parents node)))) (do-it (nodes) (loop while nodes do ;(princ (length nodes)) ;(terpri) (let ((current (pop nodes))) (unless (eq (dag-node-marked-p current) 'no) (cond ((or (eq (dag-node-marked-p current) 'yes) (apply #'subsumes1-p (concept current) (concept node) args)) (mark-all-ancestors current) (setf nodes (nconc nodes (copy-list (dag-node-children current))))) (t (mark-all-descendants current)))))))) (cond ((is-top-concept-p (concept node)) nil) ((is-bottom-concept-p (concept node)) (list (find-node-for-concept1 taxonomy (parse-concept 'top)))) (t (unmark-all-dag-nodes taxonomy) (mapc #'mark-all-descendants (remove nil (mapcar #'(lambda (x) (find-node-for-concept1 taxonomy x)) (get-told-non-subsumers (concept node))))) (mapc #'mark-all-ancestors (remove nil (mapcar #'(lambda (x) (let ((node1 (find-node-for-concept1 taxonomy x))) (when (and *debug-p* (not node1)) (format t "*** WARNING: CAN'T FIND TOLD SUBSUMER ~A OF ~A!~%" x (concept node))) (when (and (in-definition-order-p (tbox taxonomy)) (not node1)) ;;; nur dann ist das ein Fehler! (error "This TBox is not in definition order!")) node1)) (remove-if-not #'positive-p (told-subsumers (concept node)))))) (do-it (list (find-node-for-concept1 taxonomy (parse-concept 'top)))) (remove-if #'(lambda (q) (or (not (eq (dag-node-marked-p q) 'yes)) (some #'(lambda (child) (eq (dag-node-marked-p child) 'yes)) (dag-node-children q)))) (dag-nodes taxonomy)))))) (defmethod compute-node-children ((node taxonomy-node) (taxonomy taxonomy) &rest args) (labels ((mark-all-ancestors (node) (unless (eq (dag-node-marked-p node) 'no) (mark-dag-node node 'no) (mapc #'mark-all-ancestors (dag-node-parents node)))) (mark-all-descendants (node) (unless (eq (dag-node-marked-p node) 'yes) (mark-dag-node node 'yes) (mapc #'mark-all-descendants (dag-node-children node)))) (mark-descendants-with (node val) (unless (member val (dag-node-marked-p node)) (push val (dag-node-marked-p node)) (mapc #'(lambda (child) (mark-descendants-with child val)) (dag-node-children node)))) (do-it (nodes) (loop while nodes do (let ((current (pop nodes))) (when (eq (dag-node-marked-p current) 'candidate) (cond ((or (eq (dag-node-marked-p current) 'yes) (apply #'subsumes1-p (concept node) (concept current) args)) (mark-all-descendants current) (setf nodes (nconc nodes (copy-list (dag-node-parents current))))) (t (mark-all-ancestors current)))))))) (cond ((is-top-concept-p (concept node)) ;(list (find-node-for-concept1 taxonomy (parse-concept 'top))) ; gibt es noch nicht! nil) ((is-bottom-concept-p (concept node)) nil) (t (dolist (node (dag-nodes taxonomy)) (mark-dag-node node '())) (let* ((parents (dag-node-parents node)) (n (length parents)) (bottom (find-node-for-concept1 taxonomy (parse-concept 'bottom)))) (dolist (parent parents) (mark-descendants-with parent parent)) (dolist (node (dag-nodes taxonomy)) (if (= n (length (dag-node-marked-p node))) (mark-dag-node node 'candidate) (mark-dag-node node 'no))) ;; (format t "Candidates for ~A: ~A" node candidates) ;; (terpri) (do-it (list bottom)) #| (format t "Adter do-it: ~A" (mapcar #'(lambda (x) (list x (dag-node-marked-p x))) (dag-nodes taxonomy))) (terpri) |# (remove-if #'(lambda (q) (or (not (eq (dag-node-marked-p q) 'yes)) (some #'(lambda (parent) (eq (dag-node-marked-p parent) 'yes)) (dag-node-parents q)))) (dag-nodes taxonomy))))))) #| (defmethod compute-node-parents ((node taxonomy-node) (taxonomy taxonomy) &rest args) (labels ((mark-all-descendants (node) (unless (eq (dag-node-marked-p node) 'no) (mark-dag-node node 'no) (mapc #'mark-all-descendants (dag-node-children node)))) (mark-all-ancestors (node) (unless (eq (dag-node-marked-p node) 'yes) (mark-dag-node node 'yes) (mapc #'mark-all-ancestors (dag-node-parents node)))) (do-it (current) (unless (eq (dag-node-marked-p current) 'no) (cond ((or (when (eq (dag-node-marked-p current) 'yes) ;;; t) (apply #'subsumes1-p (concept current) (concept node) args)) (mark-all-ancestors current) (dolist (child (dag-node-children current)) (do-it child))) (t (mark-all-descendants current)))))) (cond ((is-top-concept-p (concept node)) nil) ((is-bottom-concept-p (concept node)) (list (find-node-for-concept1 taxonomy (parse-concept 'top)))) (t (unmark-all-dag-nodes taxonomy) (mapc #'mark-all-ancestors (remove nil (mapcar #'(lambda (x) (let ((node1 (find-node-for-concept1 taxonomy x))) (when (and *debug-p* (not node1)) (format t "*** WARNING: CAN'T FIND TOLD SUBSUMER ~A OF ~A!~%" x (concept node))) (when (and (in-definition-order-p (tbox taxonomy)) (not node1)) ;;; nur dann ist das ein Fehler! (error "This TBox is not in definition order!")) node1)) (remove-if-not #'positive-p (told-subsumers (concept node)))))) (do-it (find-node-for-concept1 taxonomy (parse-concept 'top))) (remove-if #'(lambda (q) (or (not (eq (dag-node-marked-p q) 'yes)) (some #'(lambda (child) (eq (dag-node-marked-p child) 'yes)) (dag-node-children q)))) (dag-nodes taxonomy)))))) (defmethod compute-node-children ((node taxonomy-node) (taxonomy taxonomy) &rest args) (labels ((mark-all-ancestors (node) (unless (eq (dag-node-marked-p node) 'no) (mark-dag-node node 'no) (mapc #'mark-all-ancestors (dag-node-parents node)))) (mark-all-descendants (node) (unless (eq (dag-node-marked-p node) 'yes) (mark-dag-node node 'yes) (mapc #'mark-all-descendants (dag-node-children node)))) (mark-descendants-with (node val) (unless (member val (dag-node-marked-p node)) (push val (dag-node-marked-p node)) (mapc #'(lambda (child) (mark-descendants-with child val)) (dag-node-children node)))) (do-it (current) (unless (eq (dag-node-marked-p current) 'no) (when (eq (dag-node-marked-p current) 'candidate) (cond ((or (eq (dag-node-marked-p current) 'yes) (apply #'subsumes1-p (concept node) (concept current) args)) (mark-all-descendants current) (dolist (parent (dag-node-parents current)) (do-it parent))) (t (mark-all-ancestors current))))))) (cond ((is-top-concept-p (concept node)) ;(list (find-node-for-concept1 taxonomy (parse-concept 'top))) ; gibt es noch nicht! nil) ((is-bottom-concept-p (concept node)) nil) (t (dolist (node (dag-nodes taxonomy)) (mark-dag-node node '())) (let* ((parents (dag-node-parents node)) (n (length parents)) (bottom (find-node-for-concept1 taxonomy (parse-concept 'bottom)))) (dolist (parent parents) (mark-descendants-with parent parent)) (dolist (node (dag-nodes taxonomy)) (if (= n (length (dag-node-marked-p node))) (mark-dag-node node 'candidate) (mark-dag-node node 'no))) (do-it bottom) (remove-if #'(lambda (q) (or (not (eq (dag-node-marked-p q) 'yes)) (some #'(lambda (parent) (eq (dag-node-marked-p parent) 'yes)) (dag-node-parents q)))) (dag-nodes taxonomy))))))) |# ;;; ;;; Interface ;;; (defmethod node-representation ((node taxonomy-node)) (unparse (cons (concept node) (mapcar #'concept (equivalents node))))) ;;; ;;; ;;; (defmethod parents ((concept concept)) (let ((node (find-node-for-concept concept))) (when node (mapcar #'node-representation (dag-node-parents node))))) (defmethod parents ((concept symbol)) (parents (parse-concept concept))) (defmethod children ((concept concept)) (let ((node (find-node-for-concept concept))) (when node (mapcar #'node-representation (dag-node-children node))))) (defmethod children ((concept symbol)) (children (parse-concept concept))) (defmethod ancestors ((concept concept)) (let ((node (find-node-for-concept concept))) (when node (mapcar #'node-representation (dag-node-ancestors node))))) (defmethod ancestors ((concept symbol)) (ancestors (parse-concept concept))) (defmethod descendants ((concept concept)) (let ((node (find-node-for-concept concept))) (when node (mapcar #'node-representation (dag-node-descendants node))))) (defmethod descendants ((concept symbol)) (descendants (parse-concept concept))) (defmethod equivalents ((concept concept)) (let ((node (find-node-for-concept concept))) (when node (node-representation node)))) (defmethod synonyms ((concept concept)) (equivalents concept)) (defmethod equivalents ((concept symbol)) (equivalents (parse-concept concept))) (defmethod synonyms ((concept symbol)) (synonyms (parse-concept concept))) ;;; ;;; ;;; (defmethod find-node-for-concept1 ((taxonomy taxonomy) (concept atomic-concept)) (or (find concept (dag-nodes taxonomy) :key #'concept) (loop as node in (dag-nodes taxonomy) when (member concept (equivalents node) :key #'concept) return node))) (defun find-node-for-concept (concept) (find-node-for-concept1 (taxonomy (tbox concept)) concept)) ;;; ;;; ;;; (defmethod primitive-concept-p ((concept concept)) nil) (defmethod primitive-concept-p ((concept atomic-concept)) (prepare (tbox concept) +dl+) (get-primitive-concept-definition concept)) (defmethod defined-concept-p ((concept concept)) nil) (defmethod defined-concept-p ((concept atomic-concept)) (prepare (tbox concept) +dl+) (get-concept-definition concept)) ;;; ;;; ;;; (defmethod primitive-concept-p (concept) (primitive-concept-p (parse-concept concept))) (defmethod defined-concept-p (concept) (defined-concept-p (parse-concept concept))) (defun get-primitive-concepts (tbox) (prepare tbox +dl+) (primitive-names (find-tbox tbox :error-p t))) (defun get-defined-concepts (tbox) (prepare tbox +dl+) (defined-names (find-tbox tbox :error-p t))) ;;; ;;; ;;; (defmethod note-tbox-modified ((tbox tbox)) (reset-sat-status tbox)) ;;; ;;; ;;; (defmethod reset-sat-status ((tbox tbox)) (incf (tbox-version tbox)) (setf (slot-value tbox 'prepared-p) nil) tbox) (defmethod reset-sat-status ((tbox symbol)) (reset-sat-status (find-tbox tbox :error-p t))) ;;; ;;; ;;; (defun forget-tbox (tbox) (delete-tbox tbox)) (defun tbox-name (tbox) (name (find-tbox tbox :error-p t))) ;;; ;;; ;;; (defmacro def* (left &optional (right 'top)) (let ((cleft (with-disabled-concept-store (parse-concept left)))) (if (not (and (is-atomic-concept-p cleft) (not (negated-p cleft)))) (error "Syntax error! ~A must be a concept name!" left) `(let ((*old-concept-p* t)) (make-axiom (parse-concept ',left) (parse-concept ',right) :primitive-p t))))) (defmacro def (left right) (let ((cleft (with-disabled-concept-store (parse-concept left)))) (if (not (and (is-atomic-concept-p cleft) (not (negated-p cleft)))) (error "Syntax error! ~A must be a concept name!" left) `(let ((*old-concept-p* t)) (make-axiom (parse-concept ',left) (parse-concept ',right)))))) ;;; ;;; ;;; (defmacro impl (left right) `(let ((*old-concept-p* t)) (make-axiom (parse-concept ',left) (parse-concept ',right) :primitive-p t))) (defmacro equi (left right) `(let ((*old-concept-p* t)) (make-axiom (parse-concept ',left) (parse-concept ',right)))) ;;; ;;; ;;; (defmethod taxonomy-list ((tbox tbox)) (let* ((taxonomy (taxonomy tbox)) (nodes (sort (dag-nodes taxonomy) #'< :key (lambda (x) (id (concept x)))))) (tree-map #'(lambda (x) (when x (name (concept x)))) (mapcar #'(lambda (node) (list (if (equivalents node) (cons node (equivalents node)) node) (mapcar #'(lambda (x) (if (equivalents x) (cons x (equivalents x)) x)) (dag-node-parents node)) (mapcar #'(lambda (x) (if (equivalents x) (cons x (equivalents x)) x)) (dag-node-children node)))) nodes)))) ;;; ;;; ;;; (defmethod tbox-sat-p :around ((tbox tbox) &rest args) (declare (ignorable args)) (if (eq (slot-value tbox 'satisfiable) :not-tested) (setf (slot-value tbox 'satisfiable) (call-next-method)) (slot-value tbox 'satisfiable))) (defmethod tbox-sat-p ((tbox tbox) &rest args) (prepare tbox +dl+) (let* ((args (append (list :tbox tbox) (list :rbox (rbox tbox)) (list :type (get-abox-type-for-tbox tbox)) (append args (list :language (get-language tbox))))) (lastpos nil) (count 0) (pos nil) (concepts (classification-order tbox)) (unsat nil) (n (length concepts))) (format t "~%*** TBOX-SAT-P CALLED WITH ARGUMENTS: ~A ~A~%" tbox args) (terpri) (loop as i from 1 to 100 do (princ "-")) (terpri) (dolist (concept concepts) (setf *concept* concept) (incf count) (setf pos (round (+ 0.5 (* 100 (/ count n))))) (let ((char (if (apply #'sat-p concept :debug-p (or *debug-p* (and *logging-p* (=> *debug-concept* (eq concept (parse-concept *debug-concept*))))) args) "+" (progn (push concept unsat) "-")))) (when (or (not lastpos) (not (= pos lastpos))) (loop as i from (or lastpos 0) to (1- pos) do (princ char)) (setf lastpos pos)))) (terpri) (let ((unsat (remove-if #'is-bottom-concept-p unsat))) (if unsat (progn (format t "~%*** WARNING: TBOX ~A IS INCOHERENT, UNSATISFIABLE CONCEPTS: ~A~%" tbox unsat) nil) t)))) (defmethod tbox-sat-p (tbox &rest args) (apply #'tbox-sat-p (find-tbox tbox :error-p t) args)) ;;; ;;; Eigene Macros ;;; (defmacro tbox-sat? (abox &rest args) `(tbox-sat-p (quote ,abox) ,@args)) (defmacro tbox-sat*? (abox &rest args) `(tbox-sat-p ,abox ,@args)) ;;; ;;; ;;; (defmethod get-language ((tbox tbox) &optional recompute-p) (declare (ignorable recompute-p)) (unless (prepared-p tbox) (prepare tbox +dl+)) (setf (slot-value tbox 'language) (if (needs-blocking-p tbox) +alchf-rplus+ (typecase (rbox tbox) (jepd-rolebox (if (member (rbox tbox) (list +rcc1-rolebox+ +rcc2-rolebox+ +rcc3-rolebox+ +rcc5-rolebox+ +rcc8-rolebox+)) +alci-rcc+ +alci-ra-jepd+)) (rolebox +alci-ra-minus+) (otherwise (get-language (concept-store tbox))))))) ;;; ;;; ;;; (in-tbox default-tbox) (in-abox default-abox) #| (defun test () (delete-all-tboxes) (def* a d1) (implies (or a (some r c)) d2) (prepare *cur-tbox* +alch+) (princ (get-simple-axioms *cur-tbox*)) (terpri) (princ (get-meta-constraints *cur-tbox*)) ) (defun test () (delete-all-tboxes) (implies (and geometric-figure (some angles three)) (some sides three)) (implies geometric-figure figure) (prepare *cur-tbox* +alch+) (princ (get-simple-axioms *cur-tbox*)) (terpri) (princ (get-meta-constraints *cur-tbox*)) ) (defun test () (delete-all-tboxes) (def* top d) (def* a d1) (def* a d2) (prepare *cur-tbox* +alch+) (princ (get-simple-axioms *cur-tbox*)) (terpri) (princ (get-meta-constraints *cur-tbox*)) ) (defun test () (delete-all-tboxes) (def* top d) (def* a (and b (some r a))) (def* a x) (prepare *cur-tbox* +alch+) (princ (get-simple-axioms *cur-tbox*)) (terpri) (princ (get-meta-constraints *cur-tbox*)) ) (defun test () (delete-all-tboxes) (def* a b) (def* a c) (def a xx) ;(def* c c) (setf *debug-p* t) (prepare *cur-tbox* +alch+ ) (princ (get-simple-axioms *cur-tbox*)) (terpri) (princ (get-meta-constraints *cur-tbox*)) ) |#
88,544
Common Lisp
.lisp
1,941
27.409067
123
0.454082
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
5e979dc070ae3b233ef69b9cc593e8548f8e137c6696b5c54166af2d323f9fe4
12,531
[ -1 ]
12,532
deterministic-expansion3.lisp
lambdamikel_DLMAPS/src/prover/deterministic-expansion3.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defmacro with-clash-handler (&rest body) `(let ((clashes nil)) ,@body)) (defmacro check-for-clash (node concepts &optional handle-clash) `(dolist (concept (ensure-list ,concepts)) (cond ((already-known-to-be-inconsistent-p concept) (register-clash ,node concept) (when ,handle-clash (handle-clashes))) ((on-tableau-p ,node (get-negated-concept concept)) (register-clash ,node concept) (when ,handle-clash (handle-clashes)))))) (defmacro handle-clash (node concept culprits choice-points) `(progn (setf ,choice-points (sort-choice-points ,choice-points)) ;; (announce1 "CLASH FOR ~A AT ~A DUE TO ~A" concept node culprits) (when *debug-p* (announce "CLASH FOR ~A AT ~A DUE TO ~A" ,concept ,node ,culprits) (describe-object ,node t) (terpri) (announce "Returning Choice Points: ~A" ,choice-points)) ;;; jedes "perform"-Macro setzt einen Prover-Block auf! (setf (cur-clash-node *cur-abox*) ,node) (return-from prover (values nil ,choice-points)))) (defmacro register-clash (node concept) `(progn (when *debug-p* (announce "REGISTER CLASH FOR ~A AT ~A" ,concept ,node) (describe-object ,node t) (terpri)) (let ((culprits (if (already-known-to-be-inconsistent-p ,concept) (list ,concept) (get-clash-culprits ,node ,concept))) (choice-points nil)) (dolist (culprit culprits) (dolist (point (get-choice-points culprit :node ,node)) (push point choice-points))) (push (list (maximum choice-points) ,node ,concept culprits choice-points) clashes)))) (defmacro handle-clashes () `(when clashes (let ((best-clash nil)) (loop as clash in clashes as max-choice-point = (first clash) do (when (or (not best-clash) (> max-choice-point (first best-clash))) (setf best-clash clash))) (announce "Clashes found: ~A. Handling: ~A" clashes best-clash) (handle-clash (second best-clash) (third best-clash) (fourth best-clash) (fifth best-clash))))) ;;; ;;; ;;; (defrule look-for-atoms (dl abox :args (node node-changed-p)) (loop-over-node-unexpanded-atomic-concepts (atomic-concept node) (unless clashes (unless (expanded-p node atomic-concept) (announce "Found UNEXPANDED ATOM ~A : ~A" node atomic-concept) (if (is-bottom-concept-p atomic-concept) (register-clash node atomic-concept) (progn (register-as-expanded atomic-concept :comment 'expand-atom-no-preconditions :node node) (when *cur-tbox* (let* ((equivalent-names (gethash (if (negated-p atomic-concept) (get-negated-concept atomic-concept) atomic-concept) (equivalent-names *cur-tbox*))) (equivalent-names (if (negated-p atomic-concept) (mapcar #'get-negated-concept equivalent-names) equivalent-names))) (dolist (def equivalent-names) (unless (on-tableau-p node def) (announce "Node ~A: Adding equivalent name for ~A : ~A" node atomic-concept def) (setf node-changed-p t) (let ((added (register-as-unexpanded def :comment 'add-equivalent-name :node node :depends-on (list (list node atomic-concept))))) (check-for-clash node added))))) ;;; TBox7 (multiple-value-bind (def axiom) (get-simple-axiom-with-left-side (if (negated-p atomic-concept) (get-negated-concept atomic-concept) atomic-concept)) (let ((def (when def (if (negated-p atomic-concept) (unless (primitive-p axiom) (get-negated-concept def)) def)))) (when def (unless (on-tableau-p node def) (announce "Node ~A: Adding concept definition of ~A : ~A" node atomic-concept def) (setf node-changed-p t) (let ((added (register-as-unexpanded def :comment 'add-concept-definition-of-atom :node node :depends-on (list (list node atomic-concept))))) (check-for-clash node added)))))) ;;; zur Maximierung der abgeleiteten Info: ;;; aus A -> B für "not B" auch "not A" folgern! ;;; wird durch obiges lazy Unfolding nicht abgeleitet! Zusatzregel: (when (and *compute-core-model-p* ;;; fuer das Instance Retrieval Model nur fuer root node? (=> *store-instance-retrieval-model-p* t ; (root-p node) )) (when (tbox-classified-p *cur-tbox*) (let ((parents (ancestors atomic-concept))) (dolist (parent parents) (dolist (parent parent) ; equivalence classes (let ((def (parse-concept parent))) (when def (unless (on-tableau-p node def) (announce "Node ~A: Adding taxonomy implied concept definition of ~A : ~A" node atomic-concept def) (setf node-changed-p t) (let ((added (register-as-unexpanded def :comment 'add-concept-definition-of-atom :node node :depends-on (list (list node atomic-concept))))) (check-for-clash node added))))))))) (dolist (axiom (get-axioms-containing-right-side (get-negated-concept atomic-concept))) (let ((def (get-negated-concept (left axiom)))) (when def (unless (on-tableau-p node def) (announce "Node ~A: Adding concept definition of ~A : ~A" node atomic-concept def) (setf node-changed-p t) (let ((added (register-as-unexpanded def :comment 'add-concept-definition-of-atom :node node :depends-on (list (list node atomic-concept))))) (check-for-clash node added))))))) #| ;;; ab TBox8 (let ((axioms (get-simple-axioms-with-left-side atomic-concept))) (dolist (axiom axioms) (let ((def (right axiom))) (unless (on-tableau-p node def) (announce "Node ~A: Adding concept definition of ~A : ~A" node atomic-concept def) (setf node-changed-p t) (let ((added (register-as-unexpanded def :comment 'add-concept-definition-of-atom :node node :depends-on (list (list node atomic-concept))))) (check-for-clash node added)))))) |# )))))) (incf *time-spend-in-look-for-atoms* (- (get-internal-run-time) *start-time*))) (defrule look-for-ands (dl abox :args (node node-changed-p)) (loop-over-node-unexpanded-and-concepts (and-concept node) (unless clashes (unless (expanded-p node and-concept) (announce "Found UNEXPANDED AND ~A : ~A" node and-concept) (register-as-expanded and-concept :comment 'expand-and-put-to-expanded :node node) (dolist (arg (arguments and-concept)) (unless clashes (unless (on-tableau-p node arg) (setf node-changed-p t) (let ((added (register-as-unexpanded arg :comment 'expand-and-put-arguments-to-unexpanded :node node :depends-on (list (list node and-concept))))) (check-for-clash node added)))))))) (incf *time-spend-in-look-for-ands* (- (get-internal-run-time) *start-time*))) (defrule look-for-ors (dl abox :args (node node-changed-p)) (loop-over-node-unexpanded-or-concepts (or-concept node) (unless clashes (unless (expanded-p node or-concept) (let* ((unknowns 0) (disjunct nil) (val (dolist (arg (arguments or-concept) nil) (cond ((on-tableau-p node arg) (setf disjunct arg) (return 'true)) ((not (on-tableau-p node (get-negated-concept arg))) (setf disjunct arg) (incf unknowns))))) (val (or val (if (zerop unknowns) 'false (if (= 1 unknowns) (values 'deterministic disjunct) 'unknown))))) (case val (true (announce "Found TRUE OR ~A : ~A (FOUND TRUE (SUB)ARGUMENT ON TABLEAU) : ~A, ~A" node or-concept disjunct (get-choice-points disjunct :node node)) (register-as-expanded or-concept :comment 'expand-or-found-true-or-argument :node node :depends-on (list (list node disjunct)))) (false (announce "Found FALSE OR ~A : ~A (ALL NEGATED ARGUMENTS ON TABLEAU)" node or-concept) (register-clash node or-concept)) (deterministic (announce "Found DETERMINISTIC OR ~A : ~A. Disjunct: ~A" node or-concept disjunct) (setf node-changed-p t) (let ((added (register-as-unexpanded disjunct :comment 'put-to-unexpanded-found-deterministic-or :node node :depends-on (cons (list node or-concept) (mapcar #'(lambda (false-disjunct) (list node (get-negated-concept false-disjunct))) (remove disjunct (arguments or-concept))))))) (check-for-clash node added)) (unless clashes (register-as-expanded or-concept :comment 'put-to-expanded-found-deterministic-or :node node :depends-on (list (list node disjunct)))))))))) (incf *time-spend-in-look-for-ors* (- (get-internal-run-time) *start-time*))) (defrule look-for-somes (dl abox :args (node node-changed-p)) (loop-over-node-unexpanded-some-concepts (some-concept node) (unless clashes (unless (expanded-p node some-concept) (let ((qual (qualification some-concept)) (role (role some-concept))) (loop-over-role-successors (node role) (succ edge) (when (on-tableau-p succ qual) (setf node-changed-p t) (announce "Found satisfied SOME ~A : ~A, satisfied by node ~A" node some-concept succ) (register-as-expanded some-concept :comment 'found-satisfied-some :node node :depends-on (list (list succ qual) edge)) (return-from loop))))))) (incf *time-spend-in-look-for-somes* (- (get-internal-run-time) *start-time*))) (defrule look-for-at-leasts (dl abox :args (node node-changed-p)) (loop-over-node-unexpanded-at-least-concepts (at-least-concept node) (unless clashes (unless (expanded-p node at-least-concept) (let ((succs nil) (m 0) (n (n at-least-concept)) (qual (qualification at-least-concept)) (role (role at-least-concept))) (loop-over-role-successors (node role) (succ edge) (when (on-tableau-p succ qual) (push succ succs) (incf m (multiplicity edge)) (when (>= m n) (return-from loop)))) (when (>= m n) (setf node-changed-p t) (announce "Found satisfied AT-LEAST ~A : ~A, satisfied by nodes ~A" node at-least-concept succs) (register-as-expanded at-least-concept :comment 'found-satisfied-at-least :node node :depends-on (reduce #'append (mapcar #'created-by succs)))))))) (incf *time-spend-in-look-for-at-leasts* (- (get-internal-run-time) *start-time*))) (defrule look-for-alls (dl abox :args (node node-changed-p succs)) (loop-over-node-UNEXPANDED-all-concepts (all-concept node) (unless clashes (register-as-expanded all-concept :comment 'expand-all-no-preconditions :node node) ;; (unless (expanded-p node all-concept) (let ((qual (qualification all-concept)) (role (role all-concept)) (added nil)) (loop-over-role-successors (node role) (succ edge) (unless (on-tableau-p succ qual) (unless clashes (announce "Found applicable ALL ~A : ~A -> ~A : ~A OVER ~A" node all-concept succ qual edge) (setf node-changed-p t added t) (let ((added (register-as-unexpanded qual :comment 'found-applicable-all :node succ :depends-on (list (list node all-concept) edge)))) (check-for-clash succ added)))) (unless clashes (when (and *propagation-of-transitive-all-concepts-p* (transitive-p all-concept)) (unless (on-tableau-p succ all-concept) (announce "Found applicable transitive ALL ~A : ~A -> ~A : ~A OVER ~A" node all-concept succ qual edge) (setf node-changed-p t added t) (let ((added (register-as-unexpanded all-concept :comment 'found-applicable-transitive-all :node succ :depends-on (list (list node all-concept) edge)))) (check-for-clash succ added))))) (when added (push succ succs)))))) (incf *time-spend-in-look-for-alls* (- (get-internal-run-time) *start-time*))) ;;; ;;; ;;; #| (defrule deterministic-expansion (dl abox) (with-clash-handler (let ((any-node-has-changed-p t)) (loop while any-node-has-changed-p do (announce "Any node has changed, new round!") (setf any-node-has-changed-p nil) (loop-over-active-nodes (node abox) (announce "Now considering node ~A" node) (unless clashes (when (active-p node) (let ((node-changed-p t) (node-has-changed-p nil)) (unless (deterministically-expanded-p node) (loop while node-changed-p do (setf node-changed-p nil) (unless clashes (perform! (look-for-atoms :node node :node-changed-p node-changed-p))) (unless clashes (perform! (look-for-ands :node node :node-changed-p node-changed-p))) (unless clashes (perform! (look-for-ors :node node :node-changed-p node-changed-p))) (unless clashes (perform! (look-for-somes :node node :node-changed-p node-changed-p))) (unless clashes (perform! (look-for-at-leasts :node node :node-changed-p node-changed-p))) (when node-changed-p (announce "Node ~A has changed!" node) (setf any-node-has-changed-p t) (setf node-has-changed-p t))) (when (and (not node-has-changed-p) (not clashes)) (register-deterministically-expanded abox node))))) (when (and (not *combined-some-all-rule-p*) (not clashes) (or *dynamic-blocking-p* (active-p node))) (perform! (look-for-alls :node node :node-changed-p any-node-has-changed-p))))))) +insert-body-code+)) |# (defrule deterministic-expansion (dl abox) (with-clash-handler (block main-loop (let ((nodes (get-active-nodes abox))) (loop while nodes do (let ((all-nodes nil)) (dolist (node nodes) (unless (deterministically-expanded-p node) (announce "Now considering node ~A" node) (let ((node-changed-p t)) (loop while node-changed-p do (setf node-changed-p nil) (perform! (look-for-atoms :node node :node-changed-p node-changed-p)) (when clashes (return-from main-loop)) (perform! (look-for-ands :node node :node-changed-p node-changed-p)) (when clashes (return-from main-loop)) (perform! (look-for-ors :node node :node-changed-p node-changed-p)) (when clashes (return-from main-loop)) (perform! (look-for-somes :node node :node-changed-p node-changed-p)) (when clashes (return-from main-loop)) (perform! (look-for-at-leasts :node node :node-changed-p node-changed-p)) (when clashes (return-from main-loop))) (when (has-unexpanded-all-concepts-p node) (push node all-nodes)) (register-deterministically-expanded abox node)))) (setf nodes nil) (unless *combined-some-all-rule-p* (let ((node-changed-p nil)) ;;; durch Anwendung von look-for-alls wird der ;;; Knoten, der die Qualifikation aus dem All erhalten hat, ;;; wieder aktiv und determinsitically-expanded wird ;;; aufgehoben. Das All kann nun also expandiert gekennzeichnet ;;; werden! Die SOME-Regel betrachtet dann beim Erzeugen von ;;; NAchfolgern eben auch EXPANDIERTE (und nicht nur unexpandierte) ;;; ALL-Konzepte auf dem Label (declare (ignorable node-changed-p)) (if *dynamic-blocking-p* (loop-over-abox-nodes (node abox) (perform! (look-for-alls :node node :node-changed-p node-changed-p :succs nodes)) (when clashes (return-from main-loop))) (dolist (node all-nodes) (perform! (look-for-alls :node node :node-changed-p node-changed-p :succs nodes)) (when clashes (return-from main-loop)))))))))) +insert-body-code+)) ;;; ;;; ;;; (defrule deterministic-expansion (dl-with-combined-some-all-rule abox) (with-clash-handler (loop-over-active-nodes (node abox) (when (and (active-p node) (not (deterministically-expanded-p node))) (let ((node-changed-p t)) (loop while node-changed-p do (setf node-changed-p nil) (unless clashes (perform! (look-for-atoms :node node :node-changed-p node-changed-p))) (unless clashes (perform! (look-for-ands :node node :node-changed-p node-changed-p))) (unless clashes (perform! (look-for-ors :node node :node-changed-p node-changed-p))) (unless clashes (perform! (look-for-somes :node node :node-changed-p node-changed-p))) (unless clashes (perform! (look-for-at-leasts :node node :node-changed-p node-changed-p)))) (unless clashes (register-deterministically-expanded abox node))))) +insert-body-code+)) (defrule focused-deterministic-expansion (dl-with-combined-some-all-rule abox1) (with-clash-handler (let ((rule-was-applicable-p t)) (let ((node (select-det-node abox *strategy* language))) (when node (loop while rule-was-applicable-p do (setf rule-was-applicable-p nil) (unless clashes (perform! (look-for-atoms :node node :node-changed-p rule-was-applicable-p))) (unless clashes (perform! (look-for-ands :node node :node-changed-p rule-was-applicable-p))) (unless clashes (perform! (look-for-ors :node node :node-changed-p rule-was-applicable-p))) (unless clashes (perform! (look-for-somes :node node :node-changed-p rule-was-applicable-p))) (unless clashes (perform! (look-for-at-leasts :node node :node-changed-p rule-was-applicable-p)))) (unless clashes (register-deterministically-expanded abox node)))) +insert-body-code+)))
28,535
Common Lisp
.lisp
464
32.241379
139
0.441061
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
af8c3023ab2f34be2083353439bf10eaa9a32366d79f0c56e637a24b61c25305
12,532
[ -1 ]
12,533
statistics.lisp
lambdamikel_DLMAPS/src/prover/statistics.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defconstant +specials+ '(* *TIME-SPEND-IN-GET-NODES* *TIME-SPEND-IN-GET-CACHE-SAT-NODES* *TIME-SPEND-IN-GET-OLD-NODES* *TIME-SPEND-IN-GET-LEAF-NODES* *TIME-SPEND-IN-GET-DEACTIVATED-NODES* *TIME-SPEND-IN-GET-BLOCKED-NODES* *TIME-SPEND-IN-GET-ACTIVE-NODES* *TIME-SPEND-IN-ABOX-NODES-ITERATOR* *TIME-SPEND-IN-ABOX-ACTIVE-NODES-ITERATOR* *TIME-SPEND-IN-ABOX-OLD-NODES-ITERATOR* *TIME-SPEND-IN-ABOX-LEAF-NODES-ITERATOR* *TIME-SPEND-IN-ABOX-CACHE-SAT-NODES-ITERATOR* *TIME-SPEND-IN-ABOX-BLOCKED-NODES-ITERATOR* *TIME-SPEND-IN-ABOX-DEACTIVATED-NODES-ITERATOR* *TIME-SPEND-IN-GET-OLDEST-NODE-WITH-UNEXPANDED-ATTRIBUTE-EXISTS-CONCEPTS* *TIME-SPEND-IN-GET-OLDEST-NODE-WITH-UNEXPANDED-SOME-CONCEPTS* *TIME-SPEND-IN-GET-OLDEST-NODE-WITH-UNEXPANDED-OR-CONCEPTS* *TIME-SPEND-IN-GET-OLDEST-NODE-WITH-UNEXPANDED-AT-LEAST-CONCEPTS* *TIME-SPEND-IN-ABOX-EDGES-ITERATOR* *TIME-SPEND-IN-GET-EDGES* * *TIME-SPEND-IN-MAKE-CREATE-ACTION* *TIME-SPEND-IN-MAKE-PUT-TO-UNEXPANDED-ACTION* *TIME-SPEND-IN-MAKE-MOVE-FROM-UNEXPANDED-TO-EXPANDED* *TIME-SPEND-IN-MAKE-REGISTER-ADDITIONAL-DEPENDENCIES* *TIME-SPEND-IN-MAKE-CHANGE-STATE-ACTION* * *TIME-SPEND-IN-UNDO* *TIME-SPEND-IN-UNDO-CREATE-EDGE-ACTION* *TIME-SPEND-IN-UNDO-CREATE-NODE-ACTION* *TIME-SPEND-IN-UNDO-CHANGE-STATE-ACTION* *TIME-SPEND-IN-undo-PUT-TO-UNEXPANDED-ACTION* *TIME-SPEND-IN-undo-MOVE-FROM-UNEXPANDED-TO-EXPANDED-ACTION* *TIME-SPEND-IN-undo-REGISTER-ADDITIONAL-DEPENDENCIES-ACTION* * *TIME-SPEND-IN-REGISTER-CHOICE-POINTS-FOR* *TIME-SPEND-IN-ADD-A-CHOICE-POINT* *TIME-SPEND-IN-SET-CHOICE-POINTS* *TIME-SPEND-IN-GET-CHOICE-POINTS* *TIME-SPEND-IN-DELETE-CHOICE-POINTS* *TIME-SPEND-IN-ADD-CHOICE-POINTS-FOR-EDGES* * *TIME-SPEND-IN-REGISTER-BLOCKING-BLOCKED* *TIME-SPEND-IN-UNREGISTER-BLOCKING-BLOCKED* *TIME-SPEND-IN-ADJUST-BLOCKING-DEPENDENCIES* * *TIME-SPEND-IN-ADD-TO-UNEXPANDED* *TIME-SPEND-IN-ADD-TO-EXPANDED* *TIME-SPEND-IN-DELETE-FROM-UNEXPANDED* *TIME-SPEND-IN-DELETE-FROM-EXPANDED* * *TIME-SPEND-IN-REGISTER-AS-UNEXPANDED* *TIME-SPEND-IN-MOVE-FROM-UNEXPANDED-TO-EXPANDED* *TIME-SPEND-IN-PUT-FROM-EXPANDED-TO-UNEXPANDED* * *TIME-SPEND-IN-DELETE-NODE* *TIME-SPEND-IN-DELETE-EDGE* * *TIME-SPEND-IN-REGISTER-ALREADY-KNOWN-TO-BE-SATISFIABLE* *TIME-SPEND-IN-REGISTER-LABEL-IS-STABLE* *TIME-SPEND-IN-REGISTER-ADDITIONAL-DEPENDENCIES* *TIME-SPEND-IN-REGISTER-DETERMINISTICALLY-EXPANDED* *TIME-SPEND-IN-REGISTER-ALREADY-KNOWN-TO-BE-INCONSISTENT* *TIME-SPEND-IN-REGISTER-CHOICE-POINTS* *TIME-SPEND-IN-REGISTER-CACHE-SATISFIABLE* *TIME-SPEND-IN-UNREGISTER-DETERMINISTICALLY-EXPANDED* * *TIME-SPEND-IN-DELETE-NODE* *TIME-SPEND-IN-MARK-DELETED* *TIME-SPEND-IN-UNMARK-DELETED* *TIME-SPEND-IN-ACTIVATE-NODE* *TIME-SPEND-IN-DEACTIVATE-NODE* *TIME-SPEND-IN-PUT-FROM-UNEXPANDED-TO-EXPANDED* *TIME-SPEND-IN-REGISTER-AS-EXPANDED* *TIME-SPEND-IN-IS-SUCCESSOR-P* *TIME-SPEND-IN-ADJUST-INDEX-STRUCTURES* * *TIME-SPEND-IN-DELETE-FROM-ALL-HEAPS* *TIME-SPEND-IN-DELETE-FROM-HEAPS* *TIME-SPEND-IN-ADD-TO-HEAPS* * *TIME-SPEND-IN-GET-YOUNGEST-NODE-SATISFYING* *TIME-SPEND-IN-GET-YOUNGEST-NODE-SATISFYING1* *TIME-SPEND-IN-GET-OLDEST-NODE-SATISFYING* *TIME-SPEND-IN-GET-OLDEST-NODE-SATISFYING1* *TIME-SPEND-IN-GET-OLDEST-OLD-THEN-YOUNGEST-SATISFYING* * *TIME-SPEND-IN-ABOX-ENUMERATION* *TIME-SPEND-IN-INITIAL-ABOX-SATURATION* *TIME-SPEND-IN-ROLEBOX-APPLICATION* *TIME-SPEND-IN-ABOX-COMPLETION* * *TIME-SPEND-IN-IDENTIFY-STABLE-NODES* *TIME-SPEND-IN-MODEL-MERGING* *TIME-SPEND-IN-MAKE-MODELS-FOR-NODES* *TIME-SPEND-IN-MAKE-MODELS-FOR-OLD-NODES* * *TIME-SPEND-IN-DELETE-NON-DET-ASSERTIONS* *TIME-SPEND-IN-COMPUTE-CORE-MODEL* * *TIME-SPEND-IN-BLOCK-NODES* *TIME-SPEND-IN-POP-ACTIVE-NODES-HEAP* * *TIME-SPEND-IN-DETERMINISTIC-EXPANSION* *TIME-SPEND-IN-SELECT-DET-NODE* *TIME-SPEND-IN-FOCUSED-DETERMINISTIC-EXPANSION* *TIME-SPEND-IN-LOOK-FOR-ATOMS* *TIME-SPEND-IN-LOOK-FOR-ANDS* *TIME-SPEND-IN-LOOK-FOR-ORS* *TIME-SPEND-IN-LOOK-FOR-SOMES* *TIME-SPEND-IN-LOOK-FOR-AT-LEASTS* *TIME-SPEND-IN-LOOK-FOR-ALLS* * *TIME-SPEND-IN-SELECT-OR-CONCEPT* *TIME-SPEND-IN-SELECT-OR-CONCEPT1* *TIME-SPEND-IN-SELECT-OPEN-DISJUNCT* *TIME-SPEND-IN-SELECT-OPEN-DISJUNCT1* *TIME-SPEND-IN-OR-EXPANSION* * *TIME-SPEND-IN-SELECT-SOME-CONCEPT* *TIME-SPEND-IN-SELECT-SOME-CONCEPT1* *TIME-SPEND-IN-SOME-EXPANSION* *TIME-SPEND-IN-COMPUTE-NEW-SOME-SUCCESSOR-LABEL* * *TIME-SPEND-IN-SELECT-ATTRIBUTE-EXISTS-CONCEPTS* *TIME-SPEND-IN-SELECT-ATTRIBUTE-EXISTS-CONCEPTS1* *TIME-SPEND-IN-FEATURE-EXPANSION* *TIME-SPEND-IN-COMPUTE-NEW-FEATURE-SUCCESSOR-LABEL* * *TIME-SPEND-IN-SELECT-AT-LEAST-CONCEPT* *TIME-SPEND-IN-SELECT-AT-LEAST-CONCEPT1* *TIME-SPEND-IN-SIMPLE-AT-LEAST-EXPANSION* * *TIME-SPEND-IN-SELECT-VIOLATED-AT-MOST-CONCEPT* *TIME-SPEND-IN-SIMPLE-AT-MOST-MERGING* * *TIME-SPEND-IN-PROVER-INIT-ABOX-SAT-ALCH* *TIME-SPEND-IN-PROVER-INIT-ABOX-SAT-ALCHF* *TIME-SPEND-IN-PROVER-INIT-ABOX-SAT-ALCHF-RPLUS* *TIME-SPEND-IN-PROVER-INIT-ABOX-SAT-ALCHI* *TIME-SPEND-IN-PROVER-INIT-ABOX-SAT-ALCHN* *TIME-SPEND-IN-PROVER-INIT-BEFORE-MAIN-ABOX-SAT-ALCH* *TIME-SPEND-IN-PROVER-INIT-BEFORE-MAIN-ABOX-SAT-ALCHF* *TIME-SPEND-IN-PROVER-INIT-BEFORE-MAIN-ABOX-SAT-ALCHF-RPLUS* *TIME-SPEND-IN-PROVER-INIT-BEFORE-MAIN-ABOX-SAT-ALCHI* *TIME-SPEND-IN-PROVER-INIT-BEFORE-MAIN-ABOX-SAT-ALCHN* *TIME-SPEND-IN-PROVER-MAIN-ABOX-SAT-ALCH* *TIME-SPEND-IN-PROVER-MAIN-ABOX-SAT-ALCHF* *TIME-SPEND-IN-PROVER-MAIN-ABOX-SAT-ALCHF-RPLUS* *TIME-SPEND-IN-PROVER-MAIN-ABOX-SAT-ALCHI* *TIME-SPEND-IN-PROVER-MAIN-ABOX-SAT-ALCHN* * *TIME-SPEND-IN-PROVER-INIT-ABOX-SAT-ALCI-RA-JEPD* *TIME-SPEND-IN-PROVER-INIT-ABOX-SAT-ALCI-RA-MINUS* *TIME-SPEND-IN-PROVER-INIT-CONCEPT-INSTANCES-DL* *TIME-SPEND-IN-PROVER-INIT-INDIVIDUAL-INSTANCE-P-DL* *TIME-SPEND-IN-PROVER-MAIN-ABOX-SAT-ALCI-RA-JEPD* *TIME-SPEND-IN-PROVER-MAIN-ABOX-SAT-ALCI-RA-MINUS* * *TIME-SPEND-IN-INDIVIDUAL-INSTANCE-REGISTER-TOLD-CONCEPTS* *TIME-SPEND-IN-INDIVIDUAL-INSTANCE-INIT-ABOX* *TIME-SPEND-IN-INDIVIDUAL-INSTANCE-ABOX-SAT* *TIME-SPEND-IN-INDIVIDUAL-INSTANCE-ROLLBACK* *TIME-SPEND-IN-INDIVIDUAL-INSTANCE-ROLLBACK2* *TIME-SPEND-IN-GLOBAL-ROLLBACK* *)) (defun reset-statistics () (setf *initial-concept-sat-cache-hits* 0) (setf *initial-concept-unsat-cache-hits* 0) (setf *initial-concept-sat-cache-queries* 0) (setf *initial-concept-unsat-cache-queries* 0) (setf *individual-instance-proofs* 0 *obvious-instance-hits* 0 *obvious-non-instance-hits* 0 *all-instance-tests* 0) (setf *true-abox-consistency-tests* 0) (setf *true-abox-subsumption-tests* 0) (setf *mm-queries* 0) (setf *mm-hits* 0) (setf *concept-queries* 0) (setf *true-concept-queries* 0) (setf *concept-mm-queries* 0) (setf *concept-mm-hits* 0) (setf *subsumes-queries* 0) (setf *true-subsumes-queries* 0) (setf *subsumes-mm-hits* 0) (setf *subsumes-ts-hits* 0) (setf *blocked-nodes* 0) (setf *created-nodes* 0) (setf *no-of-undos* 0 *time-spend-in-undo* 0 *time-for-node-creation* 0 *time-for-edge-creation* 0 *sat-cache-hits* 0 *sat-cache-queries* 0) (dolist (var +specials+) (unless (eq var '*) (setf (symbol-value var) 0)))) (defun show-statistics () ;(describe-object *abox* t) (format t "~%*** Node: ~A, Concept : ~A ~%" *node* *concept*) (format t "~%*** Nodes: ~A Active: ~A Edges: ~A ~%" (length (get-nodes *abox*)) (length (get-active-nodes *abox*)) (length (get-edges *abox*))) (format t "~%----------------------------------------------") (format t "~%*** ~7,D UNDOS IN ~7,D SECONDS, AVERAGE : ~20,10F" *no-of-undos* (float (/ *time-spend-in-undo* internal-time-units-per-second)) (float (/ (/ *time-spend-in-undo* internal-time-units-per-second) (max *no-of-undos* 1)))) (format t "~%*** Time For Node Creation : ~10,D" (float (/ *time-for-node-creation* internal-time-units-per-second))) (format t "~%*** Time For Edge Creation : ~10,D" (float (/ *time-for-edge-creation* internal-time-units-per-second))) (format t "~%*** Blocked vs. Created Nodes : ~10,D of ~10,D / ~10,4F" *blocked-nodes* *created-nodes* (float (/ *blocked-nodes* (max 1 *created-nodes*)))) ;;; ;;; Interface (Konzept, Subsumption) ;;; (format t "~%----------------------------------------------") (format t "~%*** CONCEPT STATISTICS") (format t "~%*** Concept Sat Cache Performance : ~10,D of ~10,D / ~10,4F" (- *concept-queries* *true-concept-queries*) *concept-queries* (float (/ (- *concept-queries* *true-concept-queries*) (max 1 *concept-queries*)))) (format t "~%*** AND Concept Sat Cache MM Performance : ~10,D of ~10,D / ~10,4F" *concept-mm-hits* *concept-mm-queries* (float (/ *concept-mm-hits* (max 1 *concept-mm-queries*)))) (format t "~%----------------------------------------------") (format t "~%*** SUBSUMPTION STATISTICS") (format t "~%*** True vs. All Subsumption Tests : ~10,D of ~10,D / ~10,4F" *true-subsumes-queries* *subsumes-queries* (float (/ *true-subsumes-queries* (max 1 *subsumes-queries*)))) (format t "~%*** Told Subsumers Subsumptions Hits : ~10,D of ~10,D / ~10,4F" *subsumes-ts-hits* *subsumes-queries* (float (/ *subsumes-ts-hits* (max 1 *subsumes-queries*)))) (format t "~%*** MM Performance of Rem. Subs. Tests : ~10,D of ~10,D / ~10,4F" *subsumes-mm-hits* *true-subsumes-queries* (float (/ *subsumes-mm-hits* (max 1 *true-subsumes-queries*)))) (format t "~%*** True ABox Subsumption Tests : ~10,D" *true-abox-subsumption-tests*) ;;; ;;; ABox (Subtableaux, Model-Merging) ;;; (format t "~%----------------------------------------------") (format t "~%*** ABOX STATISTICS") (format t "~%*** True ABox Consistency Tests : ~10,D" *true-abox-consistency-tests*) (format t "~%*** Total Unsat Cache Performance : ~10,D of ~10,D / ~10,4F" *initial-concept-unsat-cache-hits* *initial-concept-unsat-cache-queries* (float (/ *initial-concept-unsat-cache-hits* (max 1 *initial-concept-unsat-cache-queries*)))) (format t "~%*** Total Sat Cache Performance : ~10,D of ~10,D / ~10,4F" *sat-cache-hits* *sat-cache-queries* (float (/ *sat-cache-hits* (max 1 *sat-cache-queries*)))) (format t "~% Initial Concept Sat Cache Performance : ~10,D of ~10,D / ~10,4F" *initial-concept-sat-cache-hits* *initial-concept-sat-cache-queries* (float (/ *initial-concept-sat-cache-hits* (max 1 *initial-concept-sat-cache-queries*)))) (format t "~% Initial Concept MM Test Performance : ~10,D of ~10,D / ~10,4F" *mm-hits* *mm-queries* (float (/ *mm-hits* (max 1 *mm-queries*)))) (format t "~%----------------------------------------------") (format t "~%*** INSTANCE STATISTICS") (format t "~%*** All Instance Tests : ~10,D" *all-instance-tests*) (format t "~%*** Obvious Instance Hits : ~10,D / ~10,4F" *obvious-instance-hits* (/ *obvious-instance-hits* (max 1 *all-instance-tests*))) (format t "~%*** Obvious Non Instance Hits : ~10,D / ~10,4F" *obvious-non-instance-hits* (/ *obvious-non-instance-hits* (max 1 *all-instance-tests*))) (format t "~%*** True Instance Proofs : ~10,D / ~10,4F" *individual-instance-proofs* (/ *individual-instance-proofs* (max 1 *all-instance-tests*))) (format t "~%*** PROFILER STATISTICS") ;;; ;;; ;;; (dolist (var +specials+) (if (eq var '*) (format t "~%-------------------------------------------------------------------------------") (format t "~%*** ~80,A : ~10,4F " var (float (/ (symbol-value var) internal-time-units-per-second))))) (terpri)) (reset-statistics)
13,198
Common Lisp
.lisp
299
37.130435
103
0.623678
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
ccda0a926654614de94a4e29f1f79c41ebdb2864312c58712c98404f641a21af
12,533
[ -1 ]
12,534
abox-nodes.lisp
lambdamikel_DLMAPS/src/prover/abox-nodes.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defpersistentclass abox-node (substrate-node abox-item) ((avl-key :initform (incf *avl-key-counter*) :reader avl-key) (address :reader address :initform '(0)) (rev-address :reader rev-address :initform '(0)) (succ-counter :reader succ-counter :initform 0) (initial-concept :reader initial-concept :initform nil :initarg :initial-concept) (told-concepts :reader told-concepts :initform nil :initarg :told-concepts) (cluster-nodes :reader cluster-nodes :initform nil :initarg :cluster-nodes) ;; wird momentan nicht benutzt (s. merging2.lisp; auskommentiert) (core-model :reader core-model :initform nil) ; entailed information (true in ALL models!) (ind-models :reader ind-models :initform nil) ; model information (true in THIS model!); evtl. mehrere ;;; ;;; Die (anhand des Knotenlabels) abgeleiteten Attribute (zur Effizienzsteigerung) ;;; werden stets fuer den Stellvertreter gesetzt, da die Iteratoren nur den ;;; Stellvertreter als Knoten zuruckliefern, dessen Label ist aber die Ver- ;;; einigung der Knoten des Clusters! ;;; ;;; Diese Markierungsattribute werden von den Tabregeln gesetzt. ;;; (deterministically-expanded-p :accessor deterministically-expanded-p :initform nil) (checked-p :accessor checked-p :initform nil) (really-satisfiable-p :accessor really-satisfiable-p :initform nil) (cache-satisfiable-p :accessor cache-satisfiable-p :initform nil) (realized-p :accessor realized-p :initform nil) ;; noch nicht verwendet (stable-p :accessor stable-p :initform nil :initarg :stable-p) ;;; determinsitically-expanded-p iff BCP etc. abgeschlossen ;;; ;;; (private) Verwaltungsinfo; nur ueber Kernel bzw. "komplexe" Methoden zugreifbar ;;; (um konsistente Verwaltung sicherzustellen!) ;;; (blocked-by :initform nil :initarg :blocked-by) (blocking-for :initform nil :initarg :blocking-for))) ;;; ;;; ;;; (defmethod root-or-old-p ((node abox-node)) (or (old-p node) (root-p node))) (defmethod root-p ((node abox-node)) (= (id node) 1)) ;;; ;;; ;;; #| (defmethod left-of-p ((a abox-node) (b abox-node)) (if (old-p a) (if (old-p b) (< (id a) (id b)) t) (if (old-p b) nil (let ((aa (rev-address a)) (ba (rev-address b))) (some #'(lambda (a b) (< a b)) aa ba))))) |# (defmethod left-of-p ((a abox-node) (b abox-node)) (if (old-p a) (if (old-p b) (< (id a) (id b)) t) (if (old-p b) nil (> (id a) (id b))))) (defmethod older-p ((a abox-node) (b abox-node)) (< (id a) (id b))) ;;; ;;; ;;; (defmethod copy-node ((abox abox) (node abox-node) &rest args) (declare (ignorable args)) (let ((copy (call-next-method)) (state (get-state-vector node))) (set-state-vector copy state nil) (dolist (slot '(old-p active-p deleted-p address rev-address succ-counter choice-points ;;; mit denen kann man zwar nicht weiterrechnen (da Referenzen auf ;;; alte Objekte enthalten!), aber gut fuer Inspektionszwecke! precondition-for-actions postcondition-for-actions created-by ;;; initial-concept told-concepts cluster-nodes core-model ind-models deterministically-expanded-p checked-p really-satisfiable-p cache-satisfiable-p realized-p stable-p blocked-by blocking-for)) (setf (slot-value copy slot) (copy-tree (slot-value node slot)))) copy)) ;;; ;;; ;;; (defmethod unparse ((item abox-node)) (name item)) (defmethod get-abox ((node abox-node)) (in-graph node)) (defmethod reset-sat-status ((node abox-node)) (dolist (slot '(initial-concept choice-points core-model ind-models really-satisfiable-p cache-satisfiable-p realized-p stable-p blocked-by blocking-for)) (setf (slot-value node slot) nil)) (reset-label (description node)) (reset-sat-status (in-graph node))) ;;; ;;; Macros fuer Label-Verwaltung ;;; (defmacro loop-over-node-slot ((var node slot) &rest body) #+:use-avl-trees-for-labels `(loop-over-avl-tree (,var (slot-value (description ,node) ',slot)) ,@body) #-:use-avl-trees-for-labels `(dolist (,var (slot-value (description ,node) ',slot)) ,@body)) ;;; ;;; ;;; (defmacro loop-over-cluster-nodes ((var node &optional (consider-cluster-p t)) &body body) (if consider-cluster-p `(dolist (,var (cluster-nodes ,node)) ,@body) `(let ((,var ,node)) ,@body))) (defmacro loop-over-node-unexpanded-atomic-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi unexpanded-atomic-concepts) ,@body))) (defmacro loop-over-node-unexpanded-some-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi unexpanded-some-concepts) ,@body))) (defmacro loop-over-node-unexpanded-attribute-exists-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi unexpanded-attribute-exists-concepts) ,@body))) (defmacro loop-over-node-unexpanded-at-least-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi unexpanded-at-least-concepts) ,@body))) (defmacro loop-over-node-unexpanded-at-most-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi unexpanded-at-most-concepts) ,@body))) (defmacro loop-over-node-unexpanded-all-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi unexpanded-all-concepts) ,@body))) (defmacro loop-over-node-unexpanded-and-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi unexpanded-and-concepts) ,@body))) (defmacro loop-over-node-unexpanded-or-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi unexpanded-or-concepts) ,@body))) ;;; ;;; ;;; (defmacro loop-over-node-unexpanded-concepts ((var node &optional (consider-cluster-p t)) &rest body) (let ((label (gensym))) `(labels ((,label (,var ,node) (declare (ignorable ,var ,node)) ,@body)) (loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi unexpanded-atomic-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi unexpanded-and-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi unexpanded-or-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi unexpanded-all-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi unexpanded-some-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi unexpanded-attribute-exists-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi unexpanded-at-least-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi unexpanded-at-most-concepts) (,label ,var ,node)))))) ;;; ;;; ;;; (defmacro loop-over-node-expanded-atomic-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi expanded-atomic-concepts) ,@body))) (defmacro loop-over-node-expanded-some-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi expanded-some-concepts) ,@body))) (defmacro loop-over-node-expanded-attribute-exists-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi expanded-attribute-exists-concepts) ,@body))) (defmacro loop-over-node-expanded-at-least-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi expanded-at-least-concepts) ,@body))) (defmacro loop-over-node-expanded-at-most-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi expanded-at-most-concepts) ,@body))) (defmacro loop-over-node-expanded-all-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi expanded-all-concepts) ,@body))) (defmacro loop-over-node-expanded-and-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi expanded-and-concepts) ,@body))) (defmacro loop-over-node-expanded-or-concepts ((var node &optional (consider-cluster-p t)) &rest body) `(loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi expanded-or-concepts) ,@body))) (defmacro loop-over-node-expanded-concepts ((var node &optional (consider-cluster-p t)) &rest body) (let ((label (gensym))) `(labels ((,label (,var ,node) (declare (ignorable ,var ,node)) ,@body)) (loop-over-cluster-nodes (equi ,node ,consider-cluster-p) (loop-over-node-slot (,var equi expanded-atomic-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi expanded-and-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi expanded-or-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi expanded-all-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi expanded-some-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi expanded-attribute-exists-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi expanded-at-least-concepts) (,label ,var ,node)) (loop-over-node-slot (,var equi expanded-at-most-concepts) (,label ,var ,node)))))) ;;; ;;; ;;; (defmacro loop-over-node-concepts ((var node &optional (consider-cluster-p t)) &rest body) (let ((label (gensym))) `(labels ((,label (,var ,node) (declare (ignorable ,var ,node)) ,@body)) (loop-over-node-unexpanded-concepts (,var ,node ,consider-cluster-p) (,label ,var ,node)) (loop-over-node-expanded-concepts (,var ,node ,consider-cluster-p) (,label ,var ,node))))) (defmacro loop-over-node-all-concepts ((var node &optional (consider-cluster-p t)) &rest body) (let ((label (gensym))) `(labels ((,label (,var ,node) (declare (ignorable ,var ,node)) ,@body)) (loop-over-node-unexpanded-all-concepts (,var ,node ,consider-cluster-p) (,label ,var ,node)) (loop-over-node-expanded-all-concepts (,var ,node ,consider-cluster-p) (,label ,var ,node))))) ;;; ;;; ;;; (defmacro every-unexpanded-concept-satisfies (node predicate &optional (consider-cluster-p t)) (let ((blockname (gensym))) `(block ,blockname (progn (loop-over-node-unexpanded-concepts (x ,node ,consider-cluster-p) (unless (,predicate x) (return-from ,blockname nil))) t)))) (defmacro some-unexpanded-concept-satisfies (node predicate &optional (consider-cluster-p)) (let ((blockname (gensym))) `(block ,blockname (progn (loop-over-node-unexpanded-concepts (x ,node ,consider-cluster-p) (when (,predicate x) (return-from ,blockname t))) nil)))) ;;; ;;; ;;; (defmethod has-unexpanded-concepts-p ((node abox-node) &optional (consider-cluster-p t)) (some #'(lambda (node) (has-unexpanded-concepts-p (description node))) (if consider-cluster-p (cluster-nodes node) (list node)))) (defmethod has-expanded-concepts-p ((node abox-node) &optional (consider-cluster-p t)) (some #'(lambda (node) (has-expanded-concepts-p (description node))) (if consider-cluster-p (cluster-nodes node) (list node)))) (defmethod has-unexpanded-some-concepts-p ((node abox-node) &optional (consider-cluster-p t)) (some #'(lambda (node) (has-unexpanded-some-concepts-p (description node))) (if consider-cluster-p (cluster-nodes node) (list node)))) (defmethod has-unexpanded-all-concepts-p ((node abox-node) &optional (consider-cluster-p t)) (some #'(lambda (node) (has-unexpanded-all-concepts-p (description node))) (if consider-cluster-p (cluster-nodes node) (list node)))) (defmethod has-unexpanded-and-concepts-p ((node abox-node) &optional (consider-cluster-p t)) (some #'(lambda (node) (has-unexpanded-and-concepts-p (description node))) (if consider-cluster-p (cluster-nodes node) (list node)))) (defmethod has-unexpanded-atomic-concepts-p ((node abox-node) &optional (consider-cluster-p t)) (some #'(lambda (node) (has-unexpanded-atomic-concepts-p (description node))) (if consider-cluster-p (cluster-nodes node) (list node)))) (defmethod has-unexpanded-or-concepts-p ((node abox-node) &optional (consider-cluster-p t)) (some #'(lambda (node) (has-unexpanded-or-concepts-p (description node))) (if consider-cluster-p (cluster-nodes node) (list node)))) (defmethod has-unexpanded-attribute-exists-concepts-p ((node abox-node) &optional (consider-cluster-p t)) (some #'(lambda (node) (has-unexpanded-attribute-exists-concepts-p (description node))) (if consider-cluster-p (cluster-nodes node) (list node)))) (defmethod has-unexpanded-at-least-concepts-p ((node abox-node) &optional (consider-cluster-p t)) (some #'(lambda (node) (has-unexpanded-at-least-concepts-p (description node))) (if consider-cluster-p (cluster-nodes node) (list node)))) (defmethod has-unexpanded-at-most-concepts-p ((node abox-node) &optional (consider-cluster-p t)) (some #'(lambda (node) (has-unexpanded-at-most-concepts-p (description node))) (if consider-cluster-p (cluster-nodes node) (list node)))) ;;; ;;; ;;; (defmethod has-unexpanded-generating-concepts-p ((node abox-node) &rest args) (or (apply #'has-unexpanded-some-concepts-p node args) (apply #'has-unexpanded-attribute-exists-concepts-p node args) (apply #'has-unexpanded-at-least-concepts-p node args))) ;;; ;;; ;;; (defmacro on-tableau-p (node concept &optional (consider-cluster-p t)) `(some #'(lambda (equi) (or (concept-member (description equi) ,concept expanded) (concept-member (description equi) ,concept unexpanded))) ,(if consider-cluster-p `(cluster-nodes ,node) `(list ,node)))) (defmacro expanded-p (node concept &optional (consider-cluster-p t)) `(some #'(lambda (equi) (concept-member (description equi) ,concept expanded)) ,(if consider-cluster-p `(cluster-nodes ,node) `(list ,node)))) (defmacro unexpanded-p (node concept &optional (consider-cluster-p t)) `(some #'(lambda (equi) (concept-member (description equi) ,concept unexpanded)) ,(if consider-cluster-p `(cluster-nodes ,node) `(list ,node)))) ;;; ;;; ;;; (defmethod complete-p ((node abox-node) &optional (consider-cluster-p t)) (every #'(lambda (node) (complete-p (description node))) (if consider-cluster-p (cluster-nodes node) (list node)))) ;;; ;;; ;;; (defmethod already-known-to-be-inconsistent-p ((abox-node abox-node)) (when (initial-concept abox-node) (already-known-to-be-inconsistent-p (initial-concept abox-node)))) (defmethod already-known-to-be-tautological-p ((abox-node abox-node)) (when (initial-concept abox-node) (already-known-to-be-tautological-p (initial-concept abox-node)))) (defmethod already-known-to-be-satisfiable-p ((abox-node abox-node)) (when (initial-concept abox-node) (already-known-to-be-satisfiable-p (initial-concept abox-node)))) ;;; ;;; ;;; (defmethod compute-virtual-successors ((abox abox) (node abox-node) &optional role) (declare (ignorable role)) nil) (defmethod materialize-virtual-edge ((abox abox) (node abox-node) (succ abox-node) role) (declare (ignorable role)) nil)
18,644
Common Lisp
.lisp
388
38.574742
122
0.614208
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
97c805d51bbc54d8876e26c638b980b65a68737908ad27fa9a6069bb89222110
12,534
[ -1 ]
12,535
krss.lisp
lambdamikel_DLMAPS/src/prover/krss.lisp
;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; hier sind auch einige Funktionen nach Racer benannt! ;;; (defmacro implies (left right) `(progn ;(impl (not ,right) (not ,left)) (impl ,left ,right))) (defmacro equivalent (left right) `(equi ,left ,right)) (defmacro disjoint (&rest concepts) (unless (cdr concepts) (error "DISJOINT needs at least 2 concepts!")) `(progn ,@(mapcar #'(lambda (concept) `(impl ,concept (and ,@(mapcar #'(lambda (x) `(not ,x)) (remove concept concepts))))) concepts))) ;;; ;;; ;;; (defmacro define-primitive-concept (left &optional (right 'top)) `(def* ,left ,right)) (defmacro defprimconcept (left &optional (right 'top)) `(define-primitive-concept ,left ,right)) (defmacro define-concept (left &optional right) (if right `(def ,left ,right) `(def* ,left))) (defmacro defconcept (left &optional right) `(define-concept ,left ,right)) ;;; ;;; ;;; (defmacro primitive-concept? (concept) `(primitive-concept-p ',concept)) (defmacro defined-concept? (concept) `(defined-concept-p ',concept)) ;;; ;;; ;;; (defmacro define-primitive-role (role &rest args) `(defrole ,role ,@args)) (defmacro define-primitive-attribute (role &rest args) `(deffeature ,role ,@args)) ;;; ;;; ;;; (defmacro instance (name def &optional abox &rest args) `(with-abox* ((or ',abox *cur-abox*)) (ins ,name ,def ,@args))) (defmacro db-instance (name def &optional abox &rest args) `(with-abox* ((or ',abox *cur-abox*)) (ins ,name ,def :update-db-p t :type 'db-abox-node ,@args))) (defmacro forget (name def &optional abox &rest args) `(with-abox* ((or ',abox *cur-abox*)) (for ,name ,def ,@args))) (defmacro db-forget (name def &optional abox &rest args) `(with-abox* ((or ',abox *cur-abox*)) (for ,name ,def :update-db-p t ,@args))) (defmacro related (a b role &optional abox &rest args) `(with-abox* ((or ',abox *cur-abox*)) (rel ,a ,b ,role ,@args))) (defmacro db-related (a b role &optional abox &rest args) `(with-abox* ((or ',abox *cur-abox*)) (rel ,a ,b ,role :type 'db-abox-edge :node-type 'db-abox-node :update-db-p t ,@args))) (defmacro unrelated (a b role &optional abox &rest args) `(with-abox* ((or ',abox *cur-abox*)) (unrel ,a ,b ,role ,@args))) (defmacro db-unrelated (a b role &optional abox &rest args) `(with-abox* ((or ',abox *cur-abox*)) (unrel ,a ,b ,role :look-into-db-p nil :update-db-p t ,@args))) ;;; ;;; ;;; (defmacro db-del (name &rest args) `(delete-node *cur-abox* ',name :look-into-db-p t :update-db-p t ,@args)) ;;; ;;; ;;; (defun add-concept-assertion (abox ind concept) (with-abox* (abox :delete-if-exists-p nil) (node-instance ind concept))) (defun forget-concept-assertion (abox ind concept) (with-abox* (abox :delete-if-exists-p nil) (node-forget ind concept))) (defun add-role-assertion (abox from to role) (with-abox* (abox :delete-if-exists-p nil) (relate from to role))) (defun forget-role-assertion (abox from to role) (with-abox* (abox :delete-if-exists-p nil) (unrelate from to role))) ;;; ;;; ;;; (defun init-abox (&optional (abox (name *cur-abox*))) (in-abox* abox :delete-if-exists-p t)) (defun init-tbox (&optional (tbox (name *cur-tbox*))) (in-tbox* tbox :delete-if-exists-p t)) ;;; ;;; ;;; (defun set-current-abox (&optional (abox (name *cur-abox*))) (in-abox* abox :delete-if-exists-p nil)) (defun set-current-tbox (&optional (tbox (name *cur-tbox*))) (in-tbox* tbox :delete-if-exists-p nil)) ;;; ;;; ;;; (defun tbox-coherent-p (&optional (tbox *cur-tbox*) &rest args) (apply #'tbox-sat-p tbox args)) (defun classify-tbox (&optional (tbox *cur-tbox*) &rest args) (apply #'classify tbox args)) ;;; ;;; ;;; (defun concept-satisfiable-p (concept &rest args) (apply #'sat-p concept args)) (defun concept-subsumes-p (concept1 concept2 &rest args) (apply #'subsumes-p concept1 concept2 args)) (defmethod concept-disjoint-p (concept1 concept2 &rest args &key tbox &allow-other-keys) (let ((*cur-store* (if tbox (concept-store (find-tbox tbox :error-p t)) (concept-store *cur-tbox*)))) (apply #'concept-disjoint-p (parse-concept concept1) (parse-concept concept2) args))) (defmethod concept-disjoint-p ((concept1 concept) (concept2 concept) &rest args) (not (apply #'sat-p (make-and-concept (list concept1 concept2)) args))) (defun concept-equivalent-p (concept1 concept2 &rest args) (apply #'equivalent-p concept1 concept2 args)) ;;; ;;; ;;; (defmacro concept-satisfiable? (expr &rest args) `(concept-satisfiable-p (quote ,expr) ,@args)) (defmacro concept-subsumes? (concept1 concept2 &rest args) `(concept-subsumes-p ',concept1 ',concept2 ,@args)) (defmacro concept-equivalent? (concept1 concept2 &rest args) `(concept-equivalent-p ',concept1 ',concept2 ,@args)) (defmacro concept-disjoint? (concept1 concept2 &rest args) `(concept-disjoint-p ',concept1 ',concept2 ,@args)) ;;; ;;; ;;; (defmacro abox-consistent? (&optional abox &rest args) `(abox-consistent-p (or ',abox *cur-abox*) ,@args)) (defmacro tbox-coherent? (&optional tbox &rest args) `(tbox-coherent-p (or ',tbox *cur-tbox*) ,@args)) ;;; ;;; ;;; (defmacro tbox-classified? (&optional tbox) `(tbox-classified-p (find-tbox (or ',tbox *cur-tbox*) :error-p t))) (defmacro abox-realized? (&optional abox) `(abox-realized-p (find-abox (or ',abox *cur-abox*) :error-p t))) ;;; ;;; ;;; (defun all-atomic-concepts (&optional (tbox *cur-tbox*)) (let ((tax (taxonomy (find-tbox tbox :error-p t)))) (mapcar #'node-representation (dag-nodes tax)))) ;;; ;;; ;;; (defun get-concept-parents (concept &optional (tbox *cur-tbox*)) (with-tbox* (tbox) (parents (parse-concept concept)))) (defun atomic-concept-parents (&rest args) (apply #'get-concept-parents args)) (defun get-concept-children (concept &optional (tbox *cur-tbox*)) (with-tbox* (tbox) (children (parse-concept concept)))) (defun atomic-concept-children (&rest args) (apply #'get-concept-children args)) (defun get-concept-equivalents (concept &optional (tbox *cur-tbox*)) (with-tbox* (tbox) (equivalents (parse-concept concept)))) (defun atomic-concept-synonyms (&rest args) (apply #'get-concept-equivalents args)) (defun get-concept-ancestors (concept &optional (tbox *cur-tbox*)) (with-tbox* (tbox) (ancestors (parse-concept concept)))) (defun atomic-concept-ancestors (&rest args) (apply #'get-concept-ancestors args)) (defun get-concept-descendants (concept &optional (tbox *cur-tbox*)) (with-tbox* (tbox) (descendants (parse-concept concept)))) (defun atomic-concept-descendants (&rest args) (apply #'get-concept-descendants args)) ;;; ;;; ;;; (defmacro concept-parents (concept &optional tbox) `(get-concept-parents ',concept (or ',tbox *cur-tbox*))) (defmacro concept-children (concept &optional tbox) `(get-concept-children ',concept (or ',tbox *cur-tbox*))) (defmacro concept-equivalents (concept &optional tbox) `(get-concept-equivalents ',concept (or ',tbox *cur-tbox*))) (defmacro concept-ancestors (concept &optional tbox) `(get-concept-ancestors ',concept (or ',tbox *cur-tbox*))) (defmacro concept-descendants (concept &optional tbox) `(get-concept-descendants ',concept (or ',tbox *cur-tbox*))) ;;; ;;; ;;; (defun get-roles (&optional (tbox *cur-tbox*)) (unparse (get-all-roles (find-tbox tbox :error-p t)))) (defun all-roles (&rest args) (apply #'get-roles args)) (defun get-transitive-roles (&optional (tbox *cur-tbox*)) (unparse (get-all-transitive-roles (find-tbox tbox :error-p t)))) (defun all-transitive-roles (&rest args) (apply #'get-transitive-roles args)) (defun get-features (&optional (tbox *cur-tbox*)) (unparse (get-all-features (find-tbox tbox :error-p t)))) (defun all-features (&rest args) (apply #'get-features args)) ;;; ;;; ;;; (defmacro roles (&optional tbox) `(get-roles (or ',tbox *cur-tbox*))) (defmacro transitive-roles (&optional tbox) `(get-transitive-roles (or ',tbox *cur-tbox*))) (defmacro features (&optional tbox) `(get-features (or ',tbox *cur-tbox*))) ;;; ;;; ;;; (defun get-role-parents (role &optional (tbox *cur-tbox*)) (with-concept-store ((concept-store (find-tbox tbox :error-p t))) (unparse (superroles (parse-role role))))) (defun atomic-role-parents (&rest args) (apply #'get-role-parents args)) (defun get-role-children (role &optional (tbox *cur-tbox*)) (with-concept-store ((concept-store (find-tbox tbox :error-p t))) (unparse (subroles (parse-role role))))) (defun atomic-role-children (&rest args) (apply #'get-role-children args)) (defun get-role-ancestors (role &optional (tbox *cur-tbox*)) (with-concept-store ((concept-store (find-tbox tbox :error-p t))) (unparse (all-superroles (parse-role role))))) (defun atomic-role-ancestors (&rest args) (apply #'get-role-ancestors args)) (defun get-role-descendants (role &optional (tbox *cur-tbox*)) (with-concept-store ((concept-store (find-tbox tbox :error-p t))) (unparse (all-subroles (parse-role role))))) (defun atomic-role-descendants (&rest args) (apply #'get-role-descendants args)) ;;; ;;; ;;; (defun atomic-role-inverse (role &optional (tbox *cur-tbox*)) (with-concept-store ((concept-store (find-tbox tbox :error-p t))) (unparse (get-inverse-role (parse-role role))))) ;;; ;;; ;;; (defmacro role-parents (role &optional tbox) `(get-role-parents ',role (or ',tbox *cur-tbox*))) (defmacro role-children (role &optional tbox) `(get-role-children ',role (or ',tbox *cur-tbox*))) (defmacro role-ancestors (role &optional tbox) `(get-role-ancestors ',role (or ',tbox *cur-tbox*))) (defmacro role-descendants (role &optional tbox) `(get-role-descendants ',role (or ',tbox *cur-tbox*))) ;;; ;;; ;;; (defun role-subsumes-p (r1 r2 &optional (tbox *cur-tbox*)) (with-concept-store ((concept-store (find-tbox tbox :error-p t))) (when (member (parse-role r2) (all-subroles (parse-role r1))) t))) (defmacro role-subsumes? (r1 r2 &optional tbox) `(role-subsumes-p ',r1 ',r2 (or ',tbox *cur-tbox*))) ;;; ;;; ;;; (defun get-concept-assertions (&optional (abox *cur-abox*)) (let ((assertions nil) (abox (find-abox abox :error-p t))) (loop-over-abox-nodes (node abox) (when (old-p node) (dolist (concept (get-concept-assertions-for-individual node abox)) (push concept assertions)))) assertions)) (defmacro concept-assertions (&optional abox) `(get-concept-assertions (or ',abox *cur-abox*))) (defun all-concept-assertions (&rest args) (apply #'get-concept-assertions args)) ;;; ;;; ;;; (defun get-concept-assertions-for-individual (ind &optional (abox *cur-abox*)) (let ((name (unparse ind))) (mapcar #'(lambda (x) (list name x)) (unparse (told-concepts (find-node (find-abox abox :error-p t) ind :error-p t)))))) (defmacro concept-assertions-for-individual (ind &optional abox) `(get-concept-assertions-for-individual ',ind (or ',abox *cur-abox*))) (defun all-concept-assertions-for-individual (&rest args) (apply #'get-concept-assertions-for-individual args)) ;;; ;;; ;;; (defun individual-p (ind &optional (abox *cur-abox*)) (unparse (find-node (find-abox abox :error-p t) ind :error-p nil))) (defmacro individual? (ind &optional abox) `(individual-p ',ind (or ',abox *cur-abox*))) ;;; ;;; ;;; (defun abox-consistent-p (&optional (abox *cur-abox*) &rest args) (apply #'abox-sat-p abox args)) ;;; ;;; ;;; (defun individual-instance-p (ind concept &optional (abox *cur-abox*) &rest args) (apply #'instance-p abox ind concept args)) (defmacro individual-instance? (ind concept &optional abox &rest args) `(individual-instance-p ',ind ',concept (or ',abox *cur-abox*) ,@args)) ;;; ;;; ;;; (defun get-concept-instances (concept &optional (abox *cur-abox*) &rest args) (unparse (apply #'retrieve-concept-instances abox concept args))) (defmacro concept-instances (concept &optional abox &rest args) `(get-concept-instances ',concept (or ',abox *cur-abox*) ,@args)) ;;; ;;; ;;; (defun get-role-assertions (&optional (abox *cur-abox*)) (let ((assertions nil) (abox (find-abox abox :error-p t))) (loop-over-abox-edges (edge abox) (when (old-p edge) (push (unparse (list (list (from edge) (to edge)) (role edge))) assertions))) assertions)) (defmacro role-assertions (&optional abox) `(get-role-assertions (or ',abox *cur-abox*))) (defun all-role-assertions (&rest args) (apply #'get-role-assertions args)) ;;; ;;; ;;; (defun get-all-role-assertions-for-individual-in-domain (ind &optional (abox *cur-abox*) role) (let* ((abox (find-abox abox :error-p t)) (node (find-node abox ind :error-p t)) (assertions nil)) (with-abox* (abox) (let ((role (and role (parse-role role)))) (dolist (out (outgoing node)) (when (and (old-p out) (old-p (to out)) (=> role (eq (role out) role))) (push (unparse (list (list node (to out)) (role out))) assertions))))) assertions)) (defun all-role-assertions-for-individual-in-domain (&rest args) (apply #'get-all-role-assertions-for-individual-in-domain args)) (defun get-all-role-assertions-for-individual-in-range (ind &optional (abox *cur-abox*) role) (let* ((abox (find-abox abox :error-p t)) (node (find-node abox ind :error-p t)) (assertions nil)) (with-abox* (abox) (let ((role (and role (parse-role role)))) (dolist (out (incoming node)) (when (and (old-p out) (old-p (from out)) (=> role (eq (role out) role))) (push (unparse (list (list (from out) node) (role out))) assertions))))) assertions)) (defun all-role-assertions-for-individual-in-range (&rest args) (apply #'get-all-role-assertions-for-individual-in-range args)) ;;; ;;; ;;; (defun get-individual-fillers (ind role &optional (abox *cur-abox*) &rest args) (unparse (apply #'retrieve-role-fillers abox ind role args))) (defmacro individual-fillers (ind role &optional abox &rest args) `(get-individual-fillers ',ind ',role (or ',abox *cur-abox*) ,@args)) ;;; ;;; ;;; (defun individuals-related-p (a b role &optional (abox *cur-abox*) &rest args) (apply #'related-p abox a b role args)) (defmacro individuals-related? (a b role &optional abox &rest args) `(individuals-related-p ',a ',b ',role (or ',abox *cur-abox*) ,@args)) ;;; ;;; ;;; (defun get-abox-language (&optional (abox *cur-abox*)) (name (get-language (find-abox abox :error-p t)))) ;;; ;;; ;;; (defun all-individuals (&optional (abox *cur-abox*)) (let ((abox (find-abox abox :error-p t))) (unparse (remove-if-not #'old-p (get-nodes abox))))) ;;; ;;; ;;; (defun get-tbox-version (tbox) (tbox-version tbox)) (defun get-abox-version (abox) (abox-version abox)) (defun full-reset () (reset-statistics) (delete-all-aboxes) (delete-all-tboxes)) ;;; ;;; Dummies: ;;; (defmacro DEFINE-DATATYPE-PROPERTY (&rest args) (declare (ignorable args)) t)
16,678
Common Lisp
.lisp
462
29.943723
89
0.612341
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
551fc5e940e9461e54cfb49026b6cbc98d59ab4cb62e44bd55abaab49cb16d31
12,535
[ -1 ]
12,536
kaon-kb.lisp
lambdamikel_DLMAPS/src/prover/kaon-kb.lisp
(in-package :prover) (in-knowledge-base example-t-box example-a-box) (implies (or (some prop7 thing0) thing34) thing3) (implies (or thing140 (some prop6 thing0)) thing14) (implies (or thing142 (some prop8 thing0)) thing14) (implies (or thing320 (some prop6 thing0)) thing32) (implies (or (some prop3 thing0) thing034) thing03) (implies (or thing04 (some prop4 thing0)) thing0) (implies (or (some prop3 thing0) thing412) thing41) (implies (or thing232 (some prop3 thing0)) thing23) (implies (or (some prop0 thing0) thing243) thing24) (implies (or thing100 (some prop2 thing0)) thing10) (implies (or (some prop7 thing0) thing010) thing01) (implies (or (some prop9 thing0) thing440) thing44) (implies (or (some prop9 thing0) thing012) thing01) (implies (or thing043 (some prop8 thing0)) thing04) (implies (or (some prop2 thing0) thing20) thing2) (implies (or (some prop7 thing0) thing11) thing1) (implies (or (some prop6 thing0) thing122) thing12) (implies (or thing43 (some prop2 thing0)) thing4) (implies (or thing324 (some prop0 thing0)) thing32) (implies (or thing414 (some prop5 thing0)) thing41) (implies (or thing442 (some prop1 thing0)) thing44) (implies (or (some prop1 thing0) thing2) *top*) (implies (or (some prop7 thing0) thing222) thing22) (implies (or (some prop5 thing0) thing103) thing10) (implies (or thing333 (some prop5 thing0)) thing33) (implies (or (some prop6 thing0) thing24) thing2) (implies (or (some prop5 thing0) thing14) thing1) (implies (or thing302 (some prop6 thing0)) thing30) (implies (or thing001 (some prop2 thing0)) thing00) (implies (or (some prop1 thing0) thing212) thing21) (implies (or (some prop1 thing0) thing014) thing01) (implies (or thing032 (some prop1 thing0)) thing03) (implies (or (some prop1 thing0) thing410) thing41) (implies (or thing441 (some prop0 thing0)) thing44) (implies (or (some prop9 thing0) thing404) thing40) (implies (or (some prop6 thing0) thing01) thing0) (implies (or thing121 (some prop5 thing0)) thing12) (implies (or thing0) *top*) (implies (or (some prop4 thing0) thing40) thing4) (implies (or (some prop0 thing0) thing013) thing01) (implies (or thing310 (some prop0 thing0)) thing31) (implies (or (some prop0 thing0) thing41) thing4) (implies (or (some prop3 thing0) thing30) thing3) (implies (or thing220 (some prop5 thing0)) thing22) (implies (or (some prop6 thing0) thing433) thing43) (implies (or (some prop6 thing0) thing023) thing02) (implies (or (some prop5 thing0) thing301) thing30) (implies (or (some prop2 thing0) thing330) thing33) (implies (or (some prop8 thing0) thing110) thing11) (implies (or thing000 (some prop1 thing0)) thing00) (implies (or thing002 (some prop3 thing0)) thing00) (implies (or (some prop4 thing0) thing003) thing00) (implies (or thing342 (some prop0 thing0)) thing34) (implies (or (some prop1 thing0) thing343) thing34) (implies (or thing424 (some prop1 thing0)) thing42) (implies (or (some prop1 thing0) thing10) thing1) (implies (or thing02 (some prop2 thing0)) thing0) (implies (or thing141 (some prop7 thing0)) thing14) (implies (or (some prop2 thing0) thing132) thing13) (implies (or (some prop8 thing0) thing241) thing24) (implies (or (some prop0 thing0) thing23) thing2) (implies (or (some prop9 thing0) thing224) thing22) (implies (or (some prop5 thing0) thing32) thing3) (implies (or (some prop1 thing0) thing33) thing3) (implies (or (some prop3 thing0) thing444) thing44) (implies (or thing234 (some prop5 thing0)) thing23) (implies (or (some prop9 thing0) thing111) thing11) (implies (or (some prop5 thing0) thing004) thing00) (implies (or (some prop7 thing0) thing420) thing42) (implies (or thing011 (some prop8 thing0)) thing01) (implies (or thing204 (some prop7 thing0)) thing20) (implies (or (some prop7 thing0) thing321) thing32) (implies (or (some prop8 thing0) thing322) thing32) (implies (or thing021 (some prop4 thing0)) thing02) (implies (or (some prop3 thing0) thing214) thing21) (implies (or thing400 (some prop5 thing0)) thing40) (implies (or (some prop7 thing0) thing402) thing40) (implies (or thing313 (some prop3 thing0)) thing31) (implies (or (some prop9 thing0) thing341) thing34) (implies (or thing244 (some prop1 thing0)) thing24) (implies (or thing120 (some prop4 thing0)) thing12) (implies (or thing240 (some prop7 thing0)) thing24) (implies (or (some prop4 thing0) thing413) thing41) (implies (or (some prop7 thing0) thing042) thing04) (implies (or thing44 (some prop8 thing0)) thing4) (implies (or thing233 (some prop4 thing0)) thing23) (implies (or (some prop0 thing0) thing112) thing11) (implies (or (some prop2 thing0) thing344) thing34) (implies (or (some prop0 thing0) thing144) thing14) (implies (or thing114 (some prop2 thing0)) thing11) (implies (or (some prop4 thing0) thing431) thing43) (implies (or thing4 (some prop3 thing0)) *top*) (implies (or (some prop0 thing0) thing1) *top*) (implies (or (some prop4 thing0) thing134) thing13) (implies (or thing041 (some prop6 thing0)) thing04) (implies (or (some prop3 thing0) thing133) thing13) (implies (or (some prop0 thing0) thing00) thing0) (implies (or (some prop2 thing0) thing411) thing41) (implies (or thing022 (some prop5 thing0)) thing02) (implies (or (some prop6 thing0) thing104) thing10) (implies (or (some prop9 thing0) thing31) thing3) (implies (or thing031 (some prop0 thing0)) thing03) (implies (or thing434 (some prop7 thing0)) thing43) (implies (or thing242 (some prop9 thing0)) thing24) (implies (or thing223 (some prop8 thing0)) thing22) (implies (or (some prop2 thing0) thing033) thing03) (implies (or (some prop0 thing0) thing423) thing42) (implies (or (some prop6 thing0) thing334) thing33) (implies (or (some prop9 thing0) thing13) thing1) (implies (or thing432 (some prop5 thing0)) thing43) (implies (or thing102 (some prop4 thing0)) thing10) (implies (or (some prop8 thing0) thing340) thing34) (implies (or (some prop7 thing0) thing024) thing02) (implies (or (some prop8 thing0) thing124) thing12) (implies (or (some prop9 thing0) thing044) thing04) (implies (or (some prop9 thing0) thing323) thing32) (implies (or thing101 (some prop3 thing0)) thing10) (implies (or (some prop8 thing0) thing03) thing0) (implies (or (some prop3 thing0) thing12) thing1) (implies (or (some prop1 thing0) thing131) thing13) (implies (or thing421 (some prop8 thing0)) thing42) (implies (or thing130 (some prop0 thing0)) thing13) (implies (or thing311 (some prop1 thing0)) thing31) (implies (or (some prop3 thing0) thing331) thing33) (implies (or thing22 (some prop4 thing0)) thing2) (implies (or thing213 (some prop2 thing0)) thing21) (implies (or (some prop6 thing0) thing221) thing22) (implies (or thing020 (some prop3 thing0)) thing02) (implies (or (some prop5 thing0) thing202) thing20) (implies (or thing21 (some prop8 thing0)) thing2) (implies (or (some prop9 thing0) thing143) thing14) (implies (or (some prop0 thing0) thing211) thing21) (implies (or thing123 (some prop7 thing0)) thing12) (implies (or thing42 (some prop6 thing0)) thing4) (implies (or thing303 (some prop7 thing0)) thing30) (implies (or (some prop2 thing0) thing312) thing31) (implies (or thing332 (some prop4 thing0)) thing33) (implies (or thing403 (some prop8 thing0)) thing40) (implies (or thing300 (some prop4 thing0)) thing30) (implies (or thing210 (some prop9 thing0)) thing21) (implies (or thing430 (some prop3 thing0)) thing43) (implies (or (some prop1 thing0) thing230) thing23) (implies (or thing113 (some prop1 thing0)) thing11) (implies (or thing314 (some prop4 thing0)) thing31) (implies (or (some prop9 thing0) thing030) thing03) (implies (or (some prop6 thing0) thing203) thing20) (implies (or thing040 (some prop5 thing0)) thing04) (implies (or thing443 (some prop2 thing0)) thing44) (implies (or thing231 (some prop2 thing0)) thing23) (implies (or (some prop6 thing0) thing401) thing40) (implies (or thing200 (some prop3 thing0)) thing20) (implies (or (some prop4 thing0) thing201) thing20) (implies (or thing3 (some prop2 thing0)) *top*) (implies (or (some prop8 thing0) thing304) thing30) (implies (or (some prop9 thing0) thing422) thing42) (instance thing103_8 thing103) (related thing103_8 thing103_9 prop9) (instance thing121_6 thing121) (related thing121_6 thing121_7 prop7) (instance thing113_3 thing113) (related thing113_3 thing113_4 prop4) (instance thing330_6 thing330) (related thing330_6 thing330_7 prop7) (instance thing241_8 thing241) (related thing241_8 thing241_9 prop9) (instance thing310_7 thing310) (related thing310_7 thing310_8 prop8) (instance thing233_8 thing233) (related thing233_8 thing233_9 prop9) (instance thing342_0 thing342) (related thing342_0 thing342_1 prop1) (instance thing4_6 thing4) (related thing4_6 thing4_7 prop7) (instance thing230_5 thing230) (related thing230_5 thing230_6 prop6) (instance thing412_8 thing412) (related thing412_8 thing412_9 prop9) (instance thing400_9 thing400) (related thing400_9 thing401_0 prop0) (instance thing020_9 thing020) (related thing020_9 thing021_0 prop0) (instance thing004_0 thing004) (related thing004_0 thing004_1 prop1) (instance thing033_5 thing033) (related thing033_5 thing033_6 prop6) (instance thing231_5 thing231) (related thing231_5 thing231_6 prop6) (instance thing233_4 thing233) (related thing233_4 thing233_5 prop5) (instance thing420_1 thing420) (related thing420_1 thing420_2 prop2) (instance thing444_7 thing444) (related thing444_7 thing444_8 prop8) (instance thing324_3 thing324) (related thing324_3 thing324_4 prop4) (instance thing2_5 thing2) (related thing2_5 thing2_6 prop6) (instance thing004_8 thing004) (related thing004_8 thing004_9 prop9) (instance thing342_7 thing342) (related thing342_7 thing342_8 prop8) (instance thing24_6 thing24) (related thing24_6 thing24_7 prop7) (instance thing132_5 thing132) (related thing132_5 thing132_6 prop6) (instance thing310_2 thing310) (related thing310_2 thing310_3 prop3) (instance thing21_6 thing21) (related thing21_6 thing21_7 prop7) (instance thing400_2 thing400) (related thing400_2 thing400_3 prop3) (instance thing002_3 thing002) (related thing002_3 thing002_4 prop4) (instance thing210_7 thing210) (related thing210_7 thing210_8 prop8) (instance thing00_1 thing00) (related thing00_1 thing00_2 prop2) (instance thing43_8 thing43) (related thing43_8 thing43_9 prop9) (instance thing13_1 thing13) (related thing13_1 thing13_2 prop2) (instance thing340_7 thing340) (related thing340_7 thing340_8 prop8) (instance thing4_8 thing4) (related thing4_8 thing4_9 prop9) (instance thing410_9 thing410) (related thing410_9 thing411_0 prop0) (instance thing14_5 thing14) (related thing14_5 thing14_6 prop6) (instance thing000_6 thing000) (related thing000_6 thing000_7 prop7) (instance thing201_8 thing201) (related thing201_8 thing201_9 prop9) (instance thing333_8 thing333) (related thing333_8 thing333_9 prop9) (instance thing012_8 thing012) (related thing012_8 thing012_9 prop9) (instance thing120_7 thing120) (related thing120_7 thing120_8 prop8) (instance thing222_6 thing222) (related thing222_6 thing222_7 prop7) (instance thing412_1 thing412) (related thing412_1 thing412_2 prop2) (instance thing010_6 thing010) (related thing010_6 thing010_7 prop7) (instance thing434_6 thing434) (related thing434_6 thing434_7 prop7) (instance thing104_1 thing104) (related thing104_1 thing104_2 prop2) (instance thing230_9 thing230) (related thing230_9 thing231_0 prop0) (instance thing034_5 thing034) (related thing034_5 thing034_6 prop6) (instance thing414_6 thing414) (related thing414_6 thing414_7 prop7) (instance thing312_6 thing312) (related thing312_6 thing312_7 prop7) (instance thing201_0 thing201) (related thing201_0 thing201_1 prop1) (instance thing304_7 thing304) (related thing304_7 thing304_8 prop8) (instance thing034_2 thing034) (related thing034_2 thing034_3 prop3) (instance thing211_6 thing211) (related thing211_6 thing211_7 prop7) (instance thing113_4 thing113) (related thing113_4 thing113_5 prop5) (instance thing424_3 thing424) (related thing424_3 thing424_4 prop4) (instance thing200_3 thing200) (related thing200_3 thing200_4 prop4) (instance thing121_2 thing121) (related thing121_2 thing121_3 prop3) (instance thing23_1 thing23) (related thing23_1 thing23_2 prop2) (instance thing010_9 thing010) (related thing010_9 thing011_0 prop0) (instance thing142_5 thing142) (related thing142_5 thing142_6 prop6) (instance thing120_3 thing120) (related thing120_3 thing120_4 prop4) (instance thing303_5 thing303) (related thing303_5 thing303_6 prop6) (instance thing233_0 thing233) (related thing233_0 thing233_1 prop1) (instance thing333_0 thing333) (related thing333_0 thing333_1 prop1) (instance thing333_7 thing333) (related thing333_7 thing333_8 prop8) (instance thing401_3 thing401) (related thing401_3 thing401_4 prop4) (instance thing412_2 thing412) (related thing412_2 thing412_3 prop3) (instance thing003_9 thing003) (related thing003_9 thing004_0 prop0) (instance thing012_6 thing012) (related thing012_6 thing012_7 prop7) (instance thing221_6 thing221) (related thing221_6 thing221_7 prop7) (instance thing111_2 thing111) (related thing111_2 thing111_3 prop3) (instance thing403_7 thing403) (related thing403_7 thing403_8 prop8) (instance thing10_2 thing10) (related thing10_2 thing10_3 prop3) (instance thing410_3 thing410) (related thing410_3 thing410_4 prop4) (instance thing132_8 thing132) (related thing132_8 thing132_9 prop9) (instance thing302_5 thing302) (related thing302_5 thing302_6 prop6) (instance thing404_9 thing404) (related thing404_9 thing41_0 prop0) (instance thing443_1 thing443) (related thing443_1 thing443_2 prop2) (instance thing124_7 thing124) (related thing124_7 thing124_8 prop8) (instance thing120_2 thing120) (related thing120_2 thing120_3 prop3) (instance thing321_0 thing321) (related thing321_0 thing321_1 prop1) (instance thing013_9 thing013) (related thing013_9 thing014_0 prop0) (instance thing342_3 thing342) (related thing342_3 thing342_4 prop4) (instance thing002_9 thing002) (related thing002_9 thing003_0 prop0) (instance thing304_5 thing304) (related thing304_5 thing304_6 prop6) (instance thing211_4 thing211) (related thing211_4 thing211_5 prop5) (instance thing101_7 thing101) (related thing101_7 thing101_8 prop8) (instance thing32_3 thing32) (related thing32_3 thing32_4 prop4) (instance thing324_0 thing324) (related thing324_0 thing324_1 prop1) (instance thing302_3 thing302) (related thing302_3 thing302_4 prop4) (instance thing2_7 thing2) (related thing2_7 thing2_8 prop8) (instance thing3_6 thing3) (related thing3_6 thing3_7 prop7) (instance thing004_1 thing004) (related thing004_1 thing004_2 prop2) (instance thing34_4 thing34) (related thing34_4 thing34_5 prop5) (instance thing411_9 thing411) (related thing411_9 thing412_0 prop0) (instance thing03_0 thing03) (related thing03_0 thing03_1 prop1) (instance thing244_9 thing244) (related thing244_9 thing3_0 prop0) (instance thing343_8 thing343) (related thing343_8 thing343_9 prop9) (instance thing300_3 thing300) (related thing300_3 thing300_4 prop4) (instance thing401_1 thing401) (related thing401_1 thing401_2 prop2) (instance thing201_7 thing201) (related thing201_7 thing201_8 prop8) (instance thing430_7 thing430) (related thing430_7 thing430_8 prop8) (instance thing102_1 thing102) (related thing102_1 thing102_2 prop2) (instance thing020_7 thing020) (related thing020_7 thing020_8 prop8) (instance thing324_8 thing324) (related thing324_8 thing324_9 prop9) (instance thing133_6 thing133) (related thing133_6 thing133_7 prop7) (instance thing443_8 thing443) (related thing443_8 thing443_9 prop9) (instance thing44_1 thing44) (related thing44_1 thing44_2 prop2) (instance thing334_4 thing334) (related thing334_4 thing334_5 prop5) (instance thing204_2 thing204) (related thing204_2 thing204_3 prop3) (instance thing002_4 thing002) (related thing002_4 thing002_5 prop5) (instance thing23_2 thing23) (related thing23_2 thing23_3 prop3) (instance thing403_4 thing403) (related thing403_4 thing403_5 prop5) (instance thing242_0 thing242) (related thing242_0 thing242_1 prop1) (instance thing311_6 thing311) (related thing311_6 thing311_7 prop7) (instance thing030_6 thing030) (related thing030_6 thing030_7 prop7) (instance thing100_0 thing100) (related thing100_0 thing100_1 prop1) (instance thing004_9 thing004) (related thing004_9 thing01_0 prop0) (instance thing440_8 thing440) (related thing440_8 thing440_9 prop9) (instance thing13_0 thing13) (related thing13_0 thing13_1 prop1) (instance thing24_8 thing24) (related thing24_8 thing24_9 prop9) (instance thing044_6 thing044) (related thing044_6 thing044_7 prop7) (instance thing213_6 thing213) (related thing213_6 thing213_7 prop7) (instance thing401_7 thing401) (related thing401_7 thing401_8 prop8) (instance thing23_9 thing23) (related thing23_9 thing230_0 prop0) (instance thing43_2 thing43) (related thing43_2 thing43_3 prop3) (instance thing000_9 thing000) (related thing000_9 thing001_0 prop0) (instance thing401_4 thing401) (related thing401_4 thing401_5 prop5) (instance thing314_3 thing314) (related thing314_3 thing314_4 prop4) (instance thing134_3 thing134) (related thing134_3 thing134_4 prop4) (instance thing420_5 thing420) (related thing420_5 thing420_6 prop6) (instance thing431_0 thing431) (related thing431_0 thing431_1 prop1) (instance thing441_3 thing441) (related thing441_3 thing441_4 prop4) (instance thing104_9 thing104) (related thing104_9 thing11_0 prop0) (instance thing222_3 thing222) (related thing222_3 thing222_4 prop4) (instance thing333_1 thing333) (related thing333_1 thing333_2 prop2) (instance thing333_6 thing333) (related thing333_6 thing333_7 prop7) (instance thing003_1 thing003) (related thing003_1 thing003_2 prop2) (instance thing133_2 thing133) (related thing133_2 thing133_3 prop3) (instance thing223_1 thing223) (related thing223_1 thing223_2 prop2) (instance thing233_1 thing233) (related thing233_1 thing233_2 prop2) (instance thing143_4 thing143) (related thing143_4 thing143_5 prop5) (instance thing111_1 thing111) (related thing111_1 thing111_2 prop2) (instance thing120_0 thing120) (related thing120_0 thing120_1 prop1) (instance thing234_8 thing234) (related thing234_8 thing234_9 prop9) (instance thing110_5 thing110) (related thing110_5 thing110_6 prop6) (instance thing140_9 thing140) (related thing140_9 thing141_0 prop0) (instance thing33_8 thing33) (related thing33_8 thing33_9 prop9) (instance thing03_4 thing03) (related thing03_4 thing03_5 prop5) (instance thing12_5 thing12) (related thing12_5 thing12_6 prop6) (instance thing001_2 thing001) (related thing001_2 thing001_3 prop3) (instance thing212_5 thing212) (related thing212_5 thing212_6 prop6) (instance thing214_8 thing214) (related thing214_8 thing214_9 prop9) (instance thing403_6 thing403) (related thing403_6 thing403_7 prop7) (instance thing441_7 thing441) (related thing441_7 thing441_8 prop8) (instance thing300_7 thing300) (related thing300_7 thing300_8 prop8) (instance thing413_4 thing413) (related thing413_4 thing413_5 prop5) (instance thing210_4 thing210) (related thing210_4 thing210_5 prop5) (instance thing241_0 thing241) (related thing241_0 thing241_1 prop1) (instance thing302_7 thing302) (related thing302_7 thing302_8 prop8) (instance thing423_1 thing423) (related thing423_1 thing423_2 prop2) (instance thing001_1 thing001) (related thing001_1 thing001_2 prop2) (instance thing4_0 thing4) (related thing4_0 thing4_1 prop1) (instance thing104_6 thing104) (related thing104_6 thing104_7 prop7) (instance thing430_2 thing430) (related thing430_2 thing430_3 prop3) (instance thing324_5 thing324) (related thing324_5 thing324_6 prop6) (instance thing431_8 thing431) (related thing431_8 thing431_9 prop9) (instance thing043_3 thing043) (related thing043_3 thing043_4 prop4) (instance thing224_2 thing224) (related thing224_2 thing224_3 prop3) (instance thing420_0 thing420) (related thing420_0 thing420_1 prop1) (instance thing221_7 thing221) (related thing221_7 thing221_8 prop8) (instance thing231_8 thing231) (related thing231_8 thing231_9 prop9) (instance thing304_1 thing304) (related thing304_1 thing304_2 prop2) (instance thing034_1 thing034) (related thing034_1 thing034_2 prop2) (instance thing401_6 thing401) (related thing401_6 thing401_7 prop7) (instance thing214_1 thing214) (related thing214_1 thing214_2 prop2) (instance thing241_5 thing241) (related thing241_5 thing241_6 prop6) (instance thing204_8 thing204) (related thing204_8 thing204_9 prop9) (instance thing221_9 thing221) (related thing221_9 thing222_0 prop0) (instance thing334_1 thing334) (related thing334_1 thing334_2 prop2) (instance thing102_0 thing102) (related thing102_0 thing102_1 prop1) (instance thing224_3 thing224) (related thing224_3 thing224_4 prop4) (instance thing242_6 thing242) (related thing242_6 thing242_7 prop7) (instance thing422_0 thing422) (related thing422_0 thing422_1 prop1) (instance thing320_0 thing320) (related thing320_0 thing320_1 prop1) (instance thing224_4 thing224) (related thing224_4 thing224_5 prop5) (instance thing132_3 thing132) (related thing132_3 thing132_4 prop4) (instance thing013_3 thing013) (related thing013_3 thing013_4 prop4) (instance thing1_7 thing1) (related thing1_7 thing1_8 prop8) (instance thing131_7 thing131) (related thing131_7 thing131_8 prop8) (instance thing04_0 thing04) (related thing04_0 thing04_1 prop1) (instance thing433_8 thing433) (related thing433_8 thing433_9 prop9) (instance thing130_2 thing130) (related thing130_2 thing130_3 prop3) (instance thing3_1 thing3) (related thing3_1 thing3_2 prop2) (instance thing43_9 thing43) (related thing43_9 thing430_0 prop0) (instance thing223_6 thing223) (related thing223_6 thing223_7 prop7) (instance thing434_9 thing434) (related thing434_9 thing44_0 prop0) (instance thing331_0 thing331) (related thing331_0 thing331_1 prop1) (instance thing003_3 thing003) (related thing003_3 thing003_4 prop4) (instance thing102_8 thing102) (related thing102_8 thing102_9 prop9) (instance thing202_0 thing202) (related thing202_0 thing202_1 prop1) (instance thing13_8 thing13) (related thing13_8 thing13_9 prop9) (instance thing200_6 thing200) (related thing200_6 thing200_7 prop7) (instance thing221_1 thing221) (related thing221_1 thing221_2 prop2) (instance thing13_5 thing13) (related thing13_5 thing13_6 prop6) (instance thing32_2 thing32) (related thing32_2 thing32_3 prop3) (instance thing412_9 thing412) (related thing412_9 thing413_0 prop0) (instance thing2_1 thing2) (related thing2_1 thing2_2 prop2) (instance thing31_6 thing31) (related thing31_6 thing31_7 prop7) (instance thing032_9 thing032) (related thing032_9 thing033_0 prop0) (instance thing240_2 thing240) (related thing240_2 thing240_3 prop3) (instance thing404_7 thing404) (related thing404_7 thing404_8 prop8) (instance thing410_1 thing410) (related thing410_1 thing410_2 prop2) (instance thing202_1 thing202) (related thing202_1 thing202_2 prop2) (instance thing010_7 thing010) (related thing010_7 thing010_8 prop8) (instance thing020_1 thing020) (related thing020_1 thing020_2 prop2) (instance thing412_3 thing412) (related thing412_3 thing412_4 prop4) (instance thing411_0 thing411) (related thing411_0 thing411_1 prop1) (instance thing113_7 thing113) (related thing113_7 thing113_8 prop8) (instance thing123_2 thing123) (related thing123_2 thing123_3 prop3) (instance thing3_9 thing3) (related thing3_9 thing30_0 prop0) (instance thing32_7 thing32) (related thing32_7 thing32_8 prop8) (instance thing231_6 thing231) (related thing231_6 thing231_7 prop7) (instance thing331_5 thing331) (related thing331_5 thing331_6 prop6) (instance thing142_2 thing142) (related thing142_2 thing142_3 prop3) (instance thing344_1 thing344) (related thing344_1 thing344_2 prop2) (instance thing133_1 thing133) (related thing133_1 thing133_2 prop2) (instance thing041_6 thing041) (related thing041_6 thing041_7 prop7) (instance thing344_4 thing344) (related thing344_4 thing344_5 prop5) (instance thing244_5 thing244) (related thing244_5 thing244_6 prop6) (instance thing341_1 thing341) (related thing341_1 thing341_2 prop2) (instance thing31_3 thing31) (related thing31_3 thing31_4 prop4) (instance thing330_8 thing330) (related thing330_8 thing330_9 prop9) (instance thing333_9 thing333) (related thing333_9 thing334_0 prop0) (instance thing120_5 thing120) (related thing120_5 thing120_6 prop6) (instance thing344_6 thing344) (related thing344_6 thing344_7 prop7) (instance thing100_4 thing100) (related thing100_4 thing100_5 prop5) (instance thing42_7 thing42) (related thing42_7 thing42_8 prop8) (instance thing332_2 thing332) (related thing332_2 thing332_3 prop3) (instance thing230_7 thing230) (related thing230_7 thing230_8 prop8) (instance thing034_0 thing034) (related thing034_0 thing034_1 prop1) (instance thing134_6 thing134) (related thing134_6 thing134_7 prop7) (instance thing332_9 thing332) (related thing332_9 thing333_0 prop0) (instance thing231_9 thing231) (related thing231_9 thing232_0 prop0) (instance thing212_4 thing212) (related thing212_4 thing212_5 prop5) (instance thing320_7 thing320) (related thing320_7 thing320_8 prop8) (instance thing301_8 thing301) (related thing301_8 thing301_9 prop9) (instance thing34_9 thing34) (related thing34_9 thing340_0 prop0) (instance thing214_6 thing214) (related thing214_6 thing214_7 prop7) (instance thing242_8 thing242) (related thing242_8 thing242_9 prop9) (instance thing21_9 thing21) (related thing21_9 thing210_0 prop0) (instance thing441_5 thing441) (related thing441_5 thing441_6 prop6) (instance thing42_2 thing42) (related thing42_2 thing42_3 prop3) (instance thing111_7 thing111) (related thing111_7 thing111_8 prop8) (instance thing330_3 thing330) (related thing330_3 thing330_4 prop4) (instance thing340_8 thing340) (related thing340_8 thing340_9 prop9) (instance thing122_9 thing122) (related thing122_9 thing123_0 prop0) (instance thing331_7 thing331) (related thing331_7 thing331_8 prop8) (instance thing410_8 thing410) (related thing410_8 thing410_9 prop9) (instance thing01_0 thing01) (related thing01_0 thing01_1 prop1) (instance thing143_5 thing143) (related thing143_5 thing143_6 prop6) (instance thing240_3 thing240) (related thing240_3 thing240_4 prop4) (instance thing342_4 thing342) (related thing342_4 thing342_5 prop5) (instance thing002_6 thing002) (related thing002_6 thing002_7 prop7) (instance thing423_2 thing423) (related thing423_2 thing423_3 prop3) (instance thing323_4 thing323) (related thing323_4 thing323_5 prop5) (instance thing342_9 thing342) (related thing342_9 thing343_0 prop0) (instance thing242_5 thing242) (related thing242_5 thing242_6 prop6) (instance thing343_2 thing343) (related thing343_2 thing343_3 prop3) (instance thing440_3 thing440) (related thing440_3 thing440_4 prop4) (instance thing243_1 thing243) (related thing243_1 thing243_2 prop2) (instance thing411_6 thing411) (related thing411_6 thing411_7 prop7) (instance thing142_7 thing142) (related thing142_7 thing142_8 prop8) (instance thing111_9 thing111) (related thing111_9 thing112_0 prop0) (instance thing10_1 thing10) (related thing10_1 thing10_2 prop2) (instance thing042_7 thing042) (related thing042_7 thing042_8 prop8) (instance thing144_4 thing144) (related thing144_4 thing144_5 prop5) (instance thing21_2 thing21) (related thing21_2 thing21_3 prop3) (instance thing330_0 thing330) (related thing330_0 thing330_1 prop1) (instance thing20_5 thing20) (related thing20_5 thing20_6 prop6) (instance thing110_9 thing110) (related thing110_9 thing111_0 prop0) (instance thing413_9 thing413) (related thing413_9 thing414_0 prop0) (instance thing310_4 thing310) (related thing310_4 thing310_5 prop5) (instance thing041_4 thing041) (related thing041_4 thing041_5 prop5) (instance thing122_8 thing122) (related thing122_8 thing122_9 prop9) (instance thing031_3 thing031) (related thing031_3 thing031_4 prop4) (instance thing04_4 thing04) (related thing04_4 thing04_5 prop5) (instance thing101_0 thing101) (related thing101_0 thing101_1 prop1) (instance thing102_5 thing102) (related thing102_5 thing102_6 prop6) (instance thing433_9 thing433) (related thing433_9 thing434_0 prop0) (instance thing124_8 thing124) (related thing124_8 thing124_9 prop9) (instance thing242_2 thing242) (related thing242_2 thing242_3 prop3) (instance thing134_0 thing134) (related thing134_0 thing134_1 prop1) (instance thing3_0 thing3) (related thing3_0 thing3_1 prop1) (instance thing242_9 thing242) (related thing242_9 thing243_0 prop0) (instance thing014_8 thing014) (related thing014_8 thing014_9 prop9) (instance thing42_6 thing42) (related thing42_6 thing42_7 prop7) (instance thing0_1 thing0) (related thing0_1 thing0_2 prop2) (instance thing011_1 thing011) (related thing011_1 thing011_2 prop2) (instance thing223_9 thing223) (related thing223_9 thing224_0 prop0) (instance thing042_3 thing042) (related thing042_3 thing042_4 prop4) (instance thing430_9 thing430) (related thing430_9 thing431_0 prop0) (instance thing13_3 thing13) (related thing13_3 thing13_4 prop4) (instance thing23_7 thing23) (related thing23_7 thing23_8 prop8) (instance thing214_3 thing214) (related thing214_3 thing214_4 prop4) (instance thing142_1 thing142) (related thing142_1 thing142_2 prop2) (instance thing034_7 thing034) (related thing034_7 thing034_8 prop8) (instance thing302_1 thing302) (related thing302_1 thing302_2 prop2) (instance thing00_4 thing00) (related thing00_4 thing00_5 prop5) (instance thing110_3 thing110) (related thing110_3 thing110_4 prop4) (instance thing401_0 thing401) (related thing401_0 thing401_1 prop1) (instance thing320_9 thing320) (related thing320_9 thing321_0 prop0) (instance thing101_1 thing101) (related thing101_1 thing101_2 prop2) (instance thing112_4 thing112) (related thing112_4 thing112_5 prop5) (instance thing100_7 thing100) (related thing100_7 thing100_8 prop8) (instance thing0_4 thing0) (related thing0_4 thing0_5 prop5) (instance thing042_1 thing042) (related thing042_1 thing042_2 prop2) (instance thing02_8 thing02) (related thing02_8 thing02_9 prop9) (instance thing340_9 thing340) (related thing340_9 thing341_0 prop0) (instance thing423_8 thing423) (related thing423_8 thing423_9 prop9) (instance thing044_5 thing044) (related thing044_5 thing044_6 prop6) (instance thing41_5 thing41) (related thing41_5 thing41_6 prop6) (instance thing231_2 thing231) (related thing231_2 thing231_3 prop3) (instance thing443_3 thing443) (related thing443_3 thing443_4 prop4) (instance thing41_7 thing41) (related thing41_7 thing41_8 prop8) (instance thing301_1 thing301) (related thing301_1 thing301_2 prop2) (instance thing303_9 thing303) (related thing303_9 thing304_0 prop0) (instance thing021_2 thing021) (related thing021_2 thing021_3 prop3) (instance thing143_3 thing143) (related thing143_3 thing143_4 prop4) (instance thing302_4 thing302) (related thing302_4 thing302_5 prop5) (instance thing130_4 thing130) (related thing130_4 thing130_5 prop5) (instance thing231_1 thing231) (related thing231_1 thing231_2 prop2) (instance thing313_3 thing313) (related thing313_3 thing313_4 prop4) (instance thing311_2 thing311) (related thing311_2 thing311_3 prop3) (instance thing314_1 thing314) (related thing314_1 thing314_2 prop2) (instance thing323_0 thing323) (related thing323_0 thing323_1 prop1) (instance thing441_4 thing441) (related thing441_4 thing441_5 prop5) (instance thing333_4 thing333) (related thing333_4 thing333_5 prop5) (instance thing243_8 thing243) (related thing243_8 thing243_9 prop9) (instance thing334_9 thing334) (related thing334_9 thing34_0 prop0) (instance thing332_6 thing332) (related thing332_6 thing332_7 prop7) (instance thing443_2 thing443) (related thing443_2 thing443_3 prop3) (instance thing021_1 thing021) (related thing021_1 thing021_2 prop2) (instance thing302_0 thing302) (related thing302_0 thing302_1 prop1) (instance thing410_7 thing410) (related thing410_7 thing410_8 prop8) (instance thing434_0 thing434) (related thing434_0 thing434_1 prop1) (instance thing232_8 thing232) (related thing232_8 thing232_9 prop9) (instance thing402_6 thing402) (related thing402_6 thing402_7 prop7) (instance thing320_3 thing320) (related thing320_3 thing320_4 prop4) (instance thing102_6 thing102) (related thing102_6 thing102_7 prop7) (instance thing02_3 thing02) (related thing02_3 thing02_4 prop4) (instance thing320_4 thing320) (related thing320_4 thing320_5 prop5) (instance thing322_3 thing322) (related thing322_3 thing322_4 prop4) (instance thing241_1 thing241) (related thing241_1 thing241_2 prop2) (instance thing031_7 thing031) (related thing031_7 thing031_8 prop8) (instance thing004_2 thing004) (related thing004_2 thing004_3 prop3) (instance thing411_4 thing411) (related thing411_4 thing411_5 prop5) (instance thing233_9 thing233) (related thing233_9 thing234_0 prop0) (instance thing032_1 thing032) (related thing032_1 thing032_2 prop2) (instance thing034_4 thing034) (related thing034_4 thing034_5 prop5) (instance thing310_0 thing310) (related thing310_0 thing310_1 prop1) (instance thing4_1 thing4) (related thing4_1 thing4_2 prop2) (instance thing40_2 thing40) (related thing40_2 thing40_3 prop3) (instance thing43_7 thing43) (related thing43_7 thing43_8 prop8) (instance thing300_9 thing300) (related thing300_9 thing301_0 prop0) (instance thing322_5 thing322) (related thing322_5 thing322_6 prop6) (instance thing32_8 thing32) (related thing32_8 thing32_9 prop9) (instance thing422_7 thing422) (related thing422_7 thing422_8 prop8) (instance thing231_0 thing231) (related thing231_0 thing231_1 prop1) (instance thing444_1 thing444) (related thing444_1 thing444_2 prop2) (instance thing233_5 thing233) (related thing233_5 thing233_6 prop6) (instance thing312_3 thing312) (related thing312_3 thing312_4 prop4) (instance thing440_9 thing440) (related thing440_9 thing441_0 prop0) (instance thing442_7 thing442) (related thing442_7 thing442_8 prop8) (instance thing123_3 thing123) (related thing123_3 thing123_4 prop4) (instance thing432_9 thing432) (related thing432_9 thing433_0 prop0) (instance thing43_1 thing43) (related thing43_1 thing43_2 prop2) (instance thing12_1 thing12) (related thing12_1 thing12_2 prop2) (instance thing422_3 thing422) (related thing422_3 thing422_4 prop4) (instance thing130_0 thing130) (related thing130_0 thing130_1 prop1) (instance thing444_6 thing444) (related thing444_6 thing444_7 prop7) (instance thing033_8 thing033) (related thing033_8 thing033_9 prop9) (instance thing014_3 thing014) (related thing014_3 thing014_4 prop4) (instance thing210_0 thing210) (related thing210_0 thing210_1 prop1) (instance thing033_3 thing033) (related thing033_3 thing033_4 prop4) (instance thing444_0 thing444) (related thing444_0 thing444_1 prop1) (instance thing02_4 thing02) (related thing02_4 thing02_5 prop5) (instance thing121_9 thing121) (related thing121_9 thing122_0 prop0) (instance thing013_1 thing013) (related thing013_1 thing013_2 prop2) (instance thing04_3 thing04) (related thing04_3 thing04_4 prop4) (instance thing122_4 thing122) (related thing122_4 thing122_5 prop5) (instance thing01_1 thing01) (related thing01_1 thing01_2 prop2) (instance thing303_0 thing303) (related thing303_0 thing303_1 prop1) (instance thing423_9 thing423) (related thing423_9 thing424_0 prop0) (instance thing000_8 thing000) (related thing000_8 thing000_9 prop9) (instance thing434_7 thing434) (related thing434_7 thing434_8 prop8) (instance thing33_6 thing33) (related thing33_6 thing33_7 prop7) (instance thing323_2 thing323) (related thing323_2 thing323_3 prop3) (instance thing012_4 thing012) (related thing012_4 thing012_5 prop5) (instance thing11_0 thing11) (related thing11_0 thing11_1 prop1) (instance thing01_8 thing01) (related thing01_8 thing01_9 prop9) (instance thing21_0 thing21) (related thing21_0 thing21_1 prop1) (instance thing124_3 thing124) (related thing124_3 thing124_4 prop4) (instance thing430_3 thing430) (related thing430_3 thing430_4 prop4) (instance thing20_4 thing20) (related thing20_4 thing20_5 prop5) (instance thing131_5 thing131) (related thing131_5 thing131_6 prop6) (instance thing422_2 thing422) (related thing422_2 thing422_3 prop3) (instance thing24_9 thing24) (related thing24_9 thing240_0 prop0) (instance thing200_9 thing200) (related thing200_9 thing201_0 prop0) (instance thing312_7 thing312) (related thing312_7 thing312_8 prop8) (instance thing112_3 thing112) (related thing112_3 thing112_4 prop4) (instance thing144_1 thing144) (related thing144_1 thing144_2 prop2) (instance thing04_2 thing04) (related thing04_2 thing04_3 prop3) (instance thing402_0 thing402) (related thing402_0 thing402_1 prop1) (instance thing330_5 thing330) (related thing330_5 thing330_6 prop6) (instance thing441_8 thing441) (related thing441_8 thing441_9 prop9) (instance thing200_5 thing200) (related thing200_5 thing200_6 prop6) (instance thing143_7 thing143) (related thing143_7 thing143_8 prop8) (instance thing101_3 thing101) (related thing101_3 thing101_4 prop4) (instance thing240_5 thing240) (related thing240_5 thing240_6 prop6) (instance thing44_9 thing44) (related thing44_9 thing440_0 prop0) (instance thing441_1 thing441) (related thing441_1 thing441_2 prop2) (instance thing030_3 thing030) (related thing030_3 thing030_4 prop4) (instance thing314_6 thing314) (related thing314_6 thing314_7 prop7) (instance thing024_8 thing024) (related thing024_8 thing024_9 prop9) (instance thing44_2 thing44) (related thing44_2 thing44_3 prop3) (instance thing311_3 thing311) (related thing311_3 thing311_4 prop4) (instance thing224_1 thing224) (related thing224_1 thing224_2 prop2) (instance thing22_5 thing22) (related thing22_5 thing22_6 prop6) (instance thing232_9 thing232) (related thing232_9 thing233_0 prop0) (instance thing343_9 thing343) (related thing343_9 thing344_0 prop0) (instance thing223_5 thing223) (related thing223_5 thing223_6 prop6) (instance thing124_1 thing124) (related thing124_1 thing124_2 prop2) (instance thing143_2 thing143) (related thing143_2 thing143_3 prop3) (instance thing10_3 thing10) (related thing10_3 thing10_4 prop4) (instance thing402_7 thing402) (related thing402_7 thing402_8 prop8) (instance thing104_3 thing104) (related thing104_3 thing104_4 prop4) (instance thing202_3 thing202) (related thing202_3 thing202_4 prop4) (instance thing420_6 thing420) (related thing420_6 thing420_7 prop7) (instance thing34_0 thing34) (related thing34_0 thing34_1 prop1) (instance thing413_8 thing413) (related thing413_8 thing413_9 prop9) (instance thing101_4 thing101) (related thing101_4 thing101_5 prop5) (instance thing104_5 thing104) (related thing104_5 thing104_6 prop6) (instance thing212_3 thing212) (related thing212_3 thing212_4 prop4) (instance thing404_8 thing404) (related thing404_8 thing404_9 prop9) (instance thing243_3 thing243) (related thing243_3 thing243_4 prop4) (instance thing140_0 thing140) (related thing140_0 thing140_1 prop1) (instance thing41_4 thing41) (related thing41_4 thing41_5 prop5) (instance thing001_3 thing001) (related thing001_3 thing001_4 prop4) (instance thing144_9 thing144) (related thing144_9 thing2_0 prop0) (instance thing413_6 thing413) (related thing413_6 thing413_7 prop7) (instance thing034_9 thing034) (related thing034_9 thing04_0 prop0) (instance thing031_9 thing031) (related thing031_9 thing032_0 prop0) (instance thing314_7 thing314) (related thing314_7 thing314_8 prop8) (instance thing40_3 thing40) (related thing40_3 thing40_4 prop4) (instance thing020_5 thing020) (related thing020_5 thing020_6 prop6) (instance thing114_6 thing114) (related thing114_6 thing114_7 prop7) (instance thing334_6 thing334) (related thing334_6 thing334_7 prop7) (instance thing201_4 thing201) (related thing201_4 thing201_5 prop5) (instance thing034_6 thing034) (related thing034_6 thing034_7 prop7) (instance thing032_2 thing032) (related thing032_2 thing032_3 prop3) (instance thing301_4 thing301) (related thing301_4 thing301_5 prop5) (instance thing101_6 thing101) (related thing101_6 thing101_7 prop7) (instance thing411_1 thing411) (related thing411_1 thing411_2 prop2) (instance thing11_7 thing11) (related thing11_7 thing11_8 prop8) (instance thing1_6 thing1) (related thing1_6 thing1_7 prop7) (instance thing134_8 thing134) (related thing134_8 thing134_9 prop9) (instance thing310_1 thing310) (related thing310_1 thing310_2 prop2) (instance thing322_6 thing322) (related thing322_6 thing322_7 prop7) (instance thing334_8 thing334) (related thing334_8 thing334_9 prop9) (instance thing123_0 thing123) (related thing123_0 thing123_1 prop1) (instance thing203_3 thing203) (related thing203_3 thing203_4 prop4) (instance thing021_7 thing021) (related thing021_7 thing021_8 prop8) (instance thing244_1 thing244) (related thing244_1 thing244_2 prop2) (instance thing414_5 thing414) (related thing414_5 thing414_6 prop6) (instance thing334_2 thing334) (related thing334_2 thing334_3 prop3) (instance thing233_2 thing233) (related thing233_2 thing233_3 prop3) (instance thing323_3 thing323) (related thing323_3 thing323_4 prop4) (instance thing223_8 thing223) (related thing223_8 thing223_9 prop9) (instance thing110_6 thing110) (related thing110_6 thing110_7 prop7) (instance thing224_7 thing224) (related thing224_7 thing224_8 prop8) (instance thing204_1 thing204) (related thing204_1 thing204_2 prop2) (instance thing132_7 thing132) (related thing132_7 thing132_8 prop8) (instance thing013_8 thing013) (related thing013_8 thing013_9 prop9) (instance thing42_1 thing42) (related thing42_1 thing42_2 prop2) (instance thing002_0 thing002) (related thing002_0 thing002_1 prop1) (instance thing240_6 thing240) (related thing240_6 thing240_7 prop7) (instance thing443_6 thing443) (related thing443_6 thing443_7 prop7) (instance thing224_6 thing224) (related thing224_6 thing224_7 prop7) (instance thing1_4 thing1) (related thing1_4 thing1_5 prop5) (instance thing310_8 thing310) (related thing310_8 thing310_9 prop9) (instance thing000_4 thing000) (related thing000_4 thing000_5 prop5) (instance thing312_0 thing312) (related thing312_0 thing312_1 prop1) (instance thing414_2 thing414) (related thing414_2 thing414_3 prop3) (instance thing244_0 thing244) (related thing244_0 thing244_1 prop1) (instance thing424_0 thing424) (related thing424_0 thing424_1 prop1) (instance thing0_0 thing0) (related thing0_0 thing0_1 prop1) (instance thing431_9 thing431) (related thing431_9 thing432_0 prop0) (instance thing243_0 thing243) (related thing243_0 thing243_1 prop1) (instance thing043_1 thing043) (related thing043_1 thing043_2 prop2) (instance thing302_6 thing302) (related thing302_6 thing302_7 prop7) (instance thing432_3 thing432) (related thing432_3 thing432_4 prop4) (instance thing024_2 thing024) (related thing024_2 thing024_3 prop3) (instance thing343_4 thing343) (related thing343_4 thing343_5 prop5) (instance thing443_9 thing443) (related thing443_9 thing444_0 prop0) (instance thing204_0 thing204) (related thing204_0 thing204_1 prop1) (instance thing240_7 thing240) (related thing240_7 thing240_8 prop8) (instance thing230_3 thing230) (related thing230_3 thing230_4 prop4) (instance thing31_5 thing31) (related thing31_5 thing31_6 prop6) (instance thing303_7 thing303) (related thing303_7 thing303_8 prop8) (instance thing433_4 thing433) (related thing433_4 thing433_5 prop5) (instance thing140_5 thing140) (related thing140_5 thing140_6 prop6) (instance thing421_5 thing421) (related thing421_5 thing421_6 prop6) (instance thing403_0 thing403) (related thing403_0 thing403_1 prop1) (instance thing424_1 thing424) (related thing424_1 thing424_2 prop2) (instance thing244_2 thing244) (related thing244_2 thing244_3 prop3) (instance thing311_8 thing311) (related thing311_8 thing311_9 prop9) (instance thing300_1 thing300) (related thing300_1 thing300_2 prop2) (instance thing40_9 thing40) (related thing40_9 thing400_0 prop0) (instance thing121_8 thing121) (related thing121_8 thing121_9 prop9) (instance thing114_2 thing114) (related thing114_2 thing114_3 prop3) (instance thing342_6 thing342) (related thing342_6 thing342_7 prop7) (instance thing142_3 thing142) (related thing142_3 thing142_4 prop4) (instance thing321_3 thing321) (related thing321_3 thing321_4 prop4) (instance thing023_1 thing023) (related thing023_1 thing023_2 prop2) (instance thing433_1 thing433) (related thing433_1 thing433_2 prop2) (instance thing002_2 thing002) (related thing002_2 thing002_3 prop3) (instance thing424_6 thing424) (related thing424_6 thing424_7 prop7) (instance thing232_3 thing232) (related thing232_3 thing232_4 prop4) (instance thing220_8 thing220) (related thing220_8 thing220_9 prop9) (instance thing341_7 thing341) (related thing341_7 thing341_8 prop8) (instance thing03_8 thing03) (related thing03_8 thing03_9 prop9) (instance thing411_8 thing411) (related thing411_8 thing411_9 prop9) (instance thing24_1 thing24) (related thing24_1 thing24_2 prop2) (instance thing030_1 thing030) (related thing030_1 thing030_2 prop2) (instance thing141_8 thing141) (related thing141_8 thing141_9 prop9) (instance thing332_3 thing332) (related thing332_3 thing332_4 prop4) (instance thing223_7 thing223) (related thing223_7 thing223_8 prop8) (instance thing021_3 thing021) (related thing021_3 thing021_4 prop4) (instance thing304_9 thing304) (related thing304_9 thing31_0 prop0) (instance thing221_8 thing221) (related thing221_8 thing221_9 prop9) (instance thing420_2 thing420) (related thing420_2 thing420_3 prop3) (instance thing434_8 thing434) (related thing434_8 thing434_9 prop9) (instance thing141_4 thing141) (related thing141_4 thing141_5 prop5) (instance thing133_8 thing133) (related thing133_8 thing133_9 prop9) (instance thing033_1 thing033) (related thing033_1 thing033_2 prop2) (instance thing423_3 thing423) (related thing423_3 thing423_4 prop4) (instance thing13_2 thing13) (related thing13_2 thing13_3 prop3) (instance thing3_4 thing3) (related thing3_4 thing3_5 prop5) (instance thing32_6 thing32) (related thing32_6 thing32_7 prop7) (instance thing131_0 thing131) (related thing131_0 thing131_1 prop1) (instance thing010_2 thing010) (related thing010_2 thing010_3 prop3) (instance thing41_9 thing41) (related thing41_9 thing410_0 prop0) (instance thing410_0 thing410) (related thing410_0 thing410_1 prop1) (instance thing0_5 thing0) (related thing0_5 thing0_6 prop6) (instance thing402_3 thing402) (related thing402_3 thing402_4 prop4) (instance thing244_6 thing244) (related thing244_6 thing244_7 prop7) (instance thing20_6 thing20) (related thing20_6 thing20_7 prop7) (instance thing14_1 thing14) (related thing14_1 thing14_2 prop2) (instance thing034_3 thing034) (related thing034_3 thing034_4 prop4) (instance thing134_9 thing134) (related thing134_9 thing14_0 prop0) (instance thing04_7 thing04) (related thing04_7 thing04_8 prop8) (instance thing304_8 thing304) (related thing304_8 thing304_9 prop9) (instance thing022_0 thing022) (related thing022_0 thing022_1 prop1) (instance thing3_8 thing3) (related thing3_8 thing3_9 prop9) (instance thing134_2 thing134) (related thing134_2 thing134_3 prop3) (instance thing222_9 thing222) (related thing222_9 thing223_0 prop0) (instance thing332_4 thing332) (related thing332_4 thing332_5 prop5) (instance thing13_9 thing13) (related thing13_9 thing130_0 prop0) (instance thing103_6 thing103) (related thing103_6 thing103_7 prop7) (instance thing01_9 thing01) (related thing01_9 thing010_0 prop0) (instance thing410_4 thing410) (related thing410_4 thing410_5 prop5) (instance thing424_5 thing424) (related thing424_5 thing424_6 prop6) (instance thing232_2 thing232) (related thing232_2 thing232_3 prop3) (instance thing34_6 thing34) (related thing34_6 thing34_7 prop7) (instance thing231_7 thing231) (related thing231_7 thing231_8 prop8) (instance thing411_7 thing411) (related thing411_7 thing411_8 prop8) (instance thing312_8 thing312) (related thing312_8 thing312_9 prop9) (instance thing300_8 thing300) (related thing300_8 thing300_9 prop9) (instance thing200_8 thing200) (related thing200_8 thing200_9 prop9) (instance thing030_2 thing030) (related thing030_2 thing030_3 prop3) (instance thing14_7 thing14) (related thing14_7 thing14_8 prop8) (instance thing43_0 thing43) (related thing43_0 thing43_1 prop1) (instance thing121_0 thing121) (related thing121_0 thing121_1 prop1) (instance thing442_1 thing442) (related thing442_1 thing442_2 prop2) (instance thing222_1 thing222) (related thing222_1 thing222_2 prop2) (instance thing000_0 thing000) (related thing000_0 thing000_1 prop1) (instance thing014_2 thing014) (related thing014_2 thing014_3 prop3) (instance thing40_7 thing40) (related thing40_7 thing40_8 prop8) (instance thing110_2 thing110) (related thing110_2 thing110_3 prop3) (instance thing41_0 thing41) (related thing41_0 thing41_1 prop1) (instance thing30_7 thing30) (related thing30_7 thing30_8 prop8) (instance thing214_7 thing214) (related thing214_7 thing214_8 prop8) (instance thing144_6 thing144) (related thing144_6 thing144_7 prop7) (instance thing441_6 thing441) (related thing441_6 thing441_7 prop7) (instance thing22_3 thing22) (related thing22_3 thing22_4 prop4) (instance thing243_4 thing243) (related thing243_4 thing243_5 prop5) (instance thing1_8 thing1) (related thing1_8 thing1_9 prop9) (instance thing321_8 thing321) (related thing321_8 thing321_9 prop9) (instance thing40_1 thing40) (related thing40_1 thing40_2 prop2) (instance thing314_8 thing314) (related thing314_8 thing314_9 prop9) (instance thing223_0 thing223) (related thing223_0 thing223_1 prop1) (instance thing303_6 thing303) (related thing303_6 thing303_7 prop7) (instance thing112_7 thing112) (related thing112_7 thing112_8 prop8) (instance thing122_5 thing122) (related thing122_5 thing122_6 prop6) (instance thing224_0 thing224) (related thing224_0 thing224_1 prop1) (instance thing043_9 thing043) (related thing043_9 thing044_0 prop0) (instance thing000_2 thing000) (related thing000_2 thing000_3 prop3) (instance thing23_5 thing23) (related thing23_5 thing23_6 prop6) (instance thing321_7 thing321) (related thing321_7 thing321_8 prop8) (instance thing214_5 thing214) (related thing214_5 thing214_6 prop6) (instance thing031_0 thing031) (related thing031_0 thing031_1 prop1) (instance thing210_8 thing210) (related thing210_8 thing210_9 prop9) (instance thing30_0 thing30) (related thing30_0 thing30_1 prop1) (instance thing122_1 thing122) (related thing122_1 thing122_2 prop2) (instance thing434_1 thing434) (related thing434_1 thing434_2 prop2) (instance thing131_1 thing131) (related thing131_1 thing131_2 prop2) (instance thing102_7 thing102) (related thing102_7 thing102_8 prop8) (instance thing121_7 thing121) (related thing121_7 thing121_8 prop8) (instance thing03_5 thing03) (related thing03_5 thing03_6 prop6) (instance thing130_8 thing130) (related thing130_8 thing130_9 prop9) (instance thing2_3 thing2) (related thing2_3 thing2_4 prop4) (instance thing102_4 thing102) (related thing102_4 thing102_5 prop5) (instance thing221_4 thing221) (related thing221_4 thing221_5 prop5) (instance thing334_7 thing334) (related thing334_7 thing334_8 prop8) (instance thing011_0 thing011) (related thing011_0 thing011_1 prop1) (instance thing24_3 thing24) (related thing24_3 thing24_4 prop4) (instance thing220_3 thing220) (related thing220_3 thing220_4 prop4) (instance thing403_2 thing403) (related thing403_2 thing403_3 prop3) (instance thing000_5 thing000) (related thing000_5 thing000_6 prop6) (instance thing423_0 thing423) (related thing423_0 thing423_1 prop1) (instance thing312_9 thing312) (related thing312_9 thing313_0 prop0) (instance thing144_7 thing144) (related thing144_7 thing144_8 prop8) (instance thing421_4 thing421) (related thing421_4 thing421_5 prop5) (instance thing32_1 thing32) (related thing32_1 thing32_2 prop2) (instance thing243_5 thing243) (related thing243_5 thing243_6 prop6) (instance thing00_2 thing00) (related thing00_2 thing00_3 prop3) (instance thing341_8 thing341) (related thing341_8 thing341_9 prop9) (instance thing110_1 thing110) (related thing110_1 thing110_2 prop2) (instance thing014_1 thing014) (related thing014_1 thing014_2 prop2) (instance thing321_4 thing321) (related thing321_4 thing321_5 prop5) (instance thing431_1 thing431) (related thing431_1 thing431_2 prop2) (instance thing431_3 thing431) (related thing431_3 thing431_4 prop4) (instance thing140_8 thing140) (related thing140_8 thing140_9 prop9) (instance thing204_3 thing204) (related thing204_3 thing204_4 prop4) (instance thing002_7 thing002) (related thing002_7 thing002_8 prop8) (instance thing433_0 thing433) (related thing433_0 thing433_1 prop1) (instance thing22_6 thing22) (related thing22_6 thing22_7 prop7) (instance thing140_2 thing140) (related thing140_2 thing140_3 prop3) (instance thing022_8 thing022) (related thing022_8 thing022_9 prop9) (instance thing23_8 thing23) (related thing23_8 thing23_9 prop9) (instance thing332_0 thing332) (related thing332_0 thing332_1 prop1) (instance thing12_4 thing12) (related thing12_4 thing12_5 prop5) (instance thing003_2 thing003) (related thing003_2 thing003_3 prop3) (instance thing141_3 thing141) (related thing141_3 thing141_4 prop4) (instance thing022_5 thing022) (related thing022_5 thing022_6 prop6) (instance thing030_7 thing030) (related thing030_7 thing030_8 prop8) (instance thing244_7 thing244) (related thing244_7 thing244_8 prop8) (instance thing240_9 thing240) (related thing240_9 thing241_0 prop0) (instance thing203_2 thing203) (related thing203_2 thing203_3 prop3) (instance thing432_7 thing432) (related thing432_7 thing432_8 prop8) (instance thing122_6 thing122) (related thing122_6 thing122_7 prop7) (instance thing000_1 thing000) (related thing000_1 thing000_2 prop2) (instance thing403_5 thing403) (related thing403_5 thing403_6 prop6) (instance thing241_2 thing241) (related thing241_2 thing241_3 prop3) (instance thing33_5 thing33) (related thing33_5 thing33_6 prop6) (instance thing433_2 thing433) (related thing433_2 thing433_3 prop3) (instance thing33_9 thing33) (related thing33_9 thing330_0 prop0) (instance thing304_0 thing304) (related thing304_0 thing304_1 prop1) (instance thing220_2 thing220) (related thing220_2 thing220_3 prop3) (instance thing022_1 thing022) (related thing022_1 thing022_2 prop2) (instance thing420_7 thing420) (related thing420_7 thing420_8 prop8) (instance thing32_5 thing32) (related thing32_5 thing32_6 prop6) (instance thing232_1 thing232) (related thing232_1 thing232_2 prop2) (instance thing320_6 thing320) (related thing320_6 thing320_7 prop7) (instance thing014_5 thing014) (related thing014_5 thing014_6 prop6) (instance thing03_2 thing03) (related thing03_2 thing03_3 prop3) (instance thing134_1 thing134) (related thing134_1 thing134_2 prop2) (instance thing040_6 thing040) (related thing040_6 thing040_7 prop7) (instance thing412_6 thing412) (related thing412_6 thing412_7 prop7) (instance thing321_5 thing321) (related thing321_5 thing321_6 prop6) (instance thing133_9 thing133) (related thing133_9 thing134_0 prop0) (instance thing22_0 thing22) (related thing22_0 thing22_1 prop1) (instance thing443_5 thing443) (related thing443_5 thing443_6 prop6) (instance thing114_1 thing114) (related thing114_1 thing114_2 prop2) (instance thing004_6 thing004) (related thing004_6 thing004_7 prop7) (instance thing044_7 thing044) (related thing044_7 thing044_8 prop8) (instance thing003_6 thing003) (related thing003_6 thing003_7 prop7) (instance thing220_4 thing220) (related thing220_4 thing220_5 prop5) (instance thing343_6 thing343) (related thing343_6 thing343_7 prop7) (instance thing132_1 thing132) (related thing132_1 thing132_2 prop2) (instance thing203_5 thing203) (related thing203_5 thing203_6 prop6) (instance thing013_5 thing013) (related thing013_5 thing013_6 prop6) (instance thing334_5 thing334) (related thing334_5 thing334_6 prop6) (instance thing223_2 thing223) (related thing223_2 thing223_3 prop3) (instance thing120_9 thing120) (related thing120_9 thing121_0 prop0) (instance thing023_2 thing023) (related thing023_2 thing023_3 prop3) (instance thing230_0 thing230) (related thing230_0 thing230_1 prop1) (instance thing12_0 thing12) (related thing12_0 thing12_1 prop1) (instance thing311_1 thing311) (related thing311_1 thing311_2 prop2) (instance thing21_7 thing21) (related thing21_7 thing21_8 prop8) (instance thing214_9 thing214) (related thing214_9 thing22_0 prop0) (instance thing41_3 thing41) (related thing41_3 thing41_4 prop4) (instance thing442_9 thing442) (related thing442_9 thing443_0 prop0) (instance thing233_3 thing233) (related thing233_3 thing233_4 prop4) (instance thing234_1 thing234) (related thing234_1 thing234_2 prop2) (instance thing104_8 thing104) (related thing104_8 thing104_9 prop9) (instance thing33_7 thing33) (related thing33_7 thing33_8 prop8) (instance thing413_7 thing413) (related thing413_7 thing413_8 prop8) (instance thing404_1 thing404) (related thing404_1 thing404_2 prop2) (instance thing42_5 thing42) (related thing42_5 thing42_6 prop6) (instance thing13_6 thing13) (related thing13_6 thing13_7 prop7) (instance thing014_7 thing014) (related thing014_7 thing014_8 prop8) (instance thing431_5 thing431) (related thing431_5 thing431_6 prop6) (instance thing210_1 thing210) (related thing210_1 thing210_2 prop2) (instance thing221_0 thing221) (related thing221_0 thing221_1 prop1) (instance thing124_0 thing124) (related thing124_0 thing124_1 prop1) (instance thing403_1 thing403) (related thing403_1 thing403_2 prop2) (instance thing031_6 thing031) (related thing031_6 thing031_7 prop7) (instance thing234_7 thing234) (related thing234_7 thing234_8 prop8) (instance thing201_3 thing201) (related thing201_3 thing201_4 prop4) (instance thing211_7 thing211) (related thing211_7 thing211_8 prop8) (instance thing434_4 thing434) (related thing434_4 thing434_5 prop5) (instance thing432_6 thing432) (related thing432_6 thing432_7 prop7) (instance thing012_1 thing012) (related thing012_1 thing012_2 prop2) (instance thing023_5 thing023) (related thing023_5 thing023_6 prop6) (instance thing043_6 thing043) (related thing043_6 thing043_7 prop7) (instance thing10_0 thing10) (related thing10_0 thing10_1 prop1) (instance thing111_8 thing111) (related thing111_8 thing111_9 prop9) (instance thing311_7 thing311) (related thing311_7 thing311_8 prop8) (instance thing0_8 thing0) (related thing0_8 thing0_9 prop9) (instance thing402_1 thing402) (related thing402_1 thing402_2 prop2) (instance thing341_0 thing341) (related thing341_0 thing341_1 prop1) (instance thing011_9 thing011) (related thing011_9 thing012_0 prop0) (instance thing031_1 thing031) (related thing031_1 thing031_2 prop2) (instance thing023_6 thing023) (related thing023_6 thing023_7 prop7) (instance thing234_2 thing234) (related thing234_2 thing234_3 prop3) (instance thing442_8 thing442) (related thing442_8 thing442_9 prop9) (instance thing024_3 thing024) (related thing024_3 thing024_4 prop4) (instance thing221_3 thing221) (related thing221_3 thing221_4 prop4) (instance thing243_7 thing243) (related thing243_7 thing243_8 prop8) (instance thing400_4 thing400) (related thing400_4 thing400_5 prop5) (instance thing202_2 thing202) (related thing202_2 thing202_3 prop3) (instance thing140_6 thing140) (related thing140_6 thing140_7 prop7) (instance thing413_5 thing413) (related thing413_5 thing413_6 prop6) (instance thing21_1 thing21) (related thing21_1 thing21_2 prop2) (instance thing211_8 thing211) (related thing211_8 thing211_9 prop9) (instance thing333_5 thing333) (related thing333_5 thing333_6 prop6) (instance thing130_9 thing130) (related thing130_9 thing131_0 prop0) (instance thing424_8 thing424) (related thing424_8 thing424_9 prop9) (instance thing4_4 thing4) (related thing4_4 thing4_5 prop5) (instance thing430_8 thing430) (related thing430_8 thing430_9 prop9) (instance thing34_5 thing34) (related thing34_5 thing34_6 prop6) (instance thing044_1 thing044) (related thing044_1 thing044_2 prop2) (instance thing142_0 thing142) (related thing142_0 thing142_1 prop1) (instance thing330_1 thing330) (related thing330_1 thing330_2 prop2) (instance thing402_2 thing402) (related thing402_2 thing402_3 prop3) (instance thing001_9 thing001) (related thing001_9 thing002_0 prop0) (instance thing020_6 thing020) (related thing020_6 thing020_7 prop7) (instance thing01_3 thing01) (related thing01_3 thing01_4 prop4) (instance thing322_0 thing322) (related thing322_0 thing322_1 prop1) (instance thing040_5 thing040) (related thing040_5 thing040_6 prop6) (instance thing310_9 thing310) (related thing310_9 thing311_0 prop0) (instance thing324_6 thing324) (related thing324_6 thing324_7 prop7) (instance thing100_5 thing100) (related thing100_5 thing100_6 prop6) (instance thing301_0 thing301) (related thing301_0 thing301_1 prop1) (instance thing31_9 thing31) (related thing31_9 thing310_0 prop0) (instance thing322_4 thing322) (related thing322_4 thing322_5 prop5) (instance thing1_3 thing1) (related thing1_3 thing1_4 prop4) (instance thing34_2 thing34) (related thing34_2 thing34_3 prop3) (instance thing44_7 thing44) (related thing44_7 thing44_8 prop8) (instance thing200_1 thing200) (related thing200_1 thing200_2 prop2) (instance thing104_7 thing104) (related thing104_7 thing104_8 prop8) (instance thing131_2 thing131) (related thing131_2 thing131_3 prop3) (instance thing322_9 thing322) (related thing322_9 thing323_0 prop0) (instance thing121_3 thing121) (related thing121_3 thing121_4 prop4) (instance thing33_0 thing33) (related thing33_0 thing33_1 prop1) (instance thing141_0 thing141) (related thing141_0 thing141_1 prop1) (instance thing202_4 thing202) (related thing202_4 thing202_5 prop5) (instance thing344_3 thing344) (related thing344_3 thing344_4 prop4) (instance thing21_5 thing21) (related thing21_5 thing21_6 prop6) (instance thing244_8 thing244) (related thing244_8 thing244_9 prop9) (instance thing31_8 thing31) (related thing31_8 thing31_9 prop9) (instance thing042_5 thing042) (related thing042_5 thing042_6 prop6) (instance thing223_4 thing223) (related thing223_4 thing223_5 prop5) (instance thing203_6 thing203) (related thing203_6 thing203_7 prop7) (instance thing31_1 thing31) (related thing31_1 thing31_2 prop2) (instance thing432_5 thing432) (related thing432_5 thing432_6 prop6) (instance thing41_2 thing41) (related thing41_2 thing41_3 prop3) (instance thing312_4 thing312) (related thing312_4 thing312_5 prop5) (instance thing144_8 thing144) (related thing144_8 thing144_9 prop9) (instance thing013_4 thing013) (related thing013_4 thing013_5 prop5) (instance thing14_8 thing14) (related thing14_8 thing14_9 prop9) (instance thing201_9 thing201) (related thing201_9 thing202_0 prop0) (instance thing420_8 thing420) (related thing420_8 thing420_9 prop9) (instance thing001_8 thing001) (related thing001_8 thing001_9 prop9) (instance thing042_4 thing042) (related thing042_4 thing042_5 prop5) (instance thing341_6 thing341) (related thing341_6 thing341_7 prop7) (instance thing144_3 thing144) (related thing144_3 thing144_4 prop4) (instance thing14_6 thing14) (related thing14_6 thing14_7 prop7) (instance thing011_4 thing011) (related thing011_4 thing011_5 prop5) (instance thing020_4 thing020) (related thing020_4 thing020_5 prop5) (instance thing203_1 thing203) (related thing203_1 thing203_2 prop2) (instance thing103_9 thing103) (related thing103_9 thing104_0 prop0) (instance thing40_4 thing40) (related thing40_4 thing40_5 prop5) (instance thing023_8 thing023) (related thing023_8 thing023_9 prop9) (instance thing444_9 thing444) (instance thing213_9 thing213) (related thing213_9 thing214_0 prop0) (instance thing003_0 thing003) (related thing003_0 thing003_1 prop1) (instance thing033_0 thing033) (related thing033_0 thing033_1 prop1) (instance thing23_0 thing23) (related thing23_0 thing23_1 prop1) (instance thing003_8 thing003) (related thing003_8 thing003_9 prop9) (instance thing213_1 thing213) (related thing213_1 thing213_2 prop2) (instance thing032_0 thing032) (related thing032_0 thing032_1 prop1) (instance thing120_4 thing120) (related thing120_4 thing120_5 prop5) (instance thing224_8 thing224) (related thing224_8 thing224_9 prop9) (instance thing33_4 thing33) (related thing33_4 thing33_5 prop5) (instance thing12_9 thing12) (related thing12_9 thing120_0 prop0) (instance thing140_3 thing140) (related thing140_3 thing140_4 prop4) (instance thing413_3 thing413) (related thing413_3 thing413_4 prop4) (instance thing311_4 thing311) (related thing311_4 thing311_5 prop5) (instance thing011_2 thing011) (related thing011_2 thing011_3 prop3) (instance thing421_6 thing421) (related thing421_6 thing421_7 prop7) (instance thing033_6 thing033) (related thing033_6 thing033_7 prop7) (instance thing304_2 thing304) (related thing304_2 thing304_3 prop3) (instance thing40_8 thing40) (related thing40_8 thing40_9 prop9) (instance thing014_6 thing014) (related thing014_6 thing014_7 prop7) (instance thing20_9 thing20) (related thing20_9 thing200_0 prop0) (instance thing040_1 thing040) (related thing040_1 thing040_2 prop2) (instance thing213_7 thing213) (related thing213_7 thing213_8 prop8) (instance thing411_3 thing411) (related thing411_3 thing411_4 prop4) (instance thing04_9 thing04) (related thing04_9 thing040_0 prop0) (instance thing113_0 thing113) (related thing113_0 thing113_1 prop1) (instance thing41_8 thing41) (related thing41_8 thing41_9 prop9) (instance thing224_9 thing224) (related thing224_9 thing23_0 prop0) (instance thing33_1 thing33) (related thing33_1 thing33_2 prop2) (instance thing110_7 thing110) (related thing110_7 thing110_8 prop8) (instance thing011_3 thing011) (related thing011_3 thing011_4 prop4) (instance thing12_8 thing12) (related thing12_8 thing12_9 prop9) (instance thing042_0 thing042) (related thing042_0 thing042_1 prop1) (instance thing430_0 thing430) (related thing430_0 thing430_1 prop1) (instance thing043_5 thing043) (related thing043_5 thing043_6 prop6) (instance thing422_9 thing422) (related thing422_9 thing423_0 prop0) (instance thing442_6 thing442) (related thing442_6 thing442_7 prop7) (instance thing323_5 thing323) (related thing323_5 thing323_6 prop6) (instance thing241_7 thing241) (related thing241_7 thing241_8 prop8) (instance thing332_8 thing332) (related thing332_8 thing332_9 prop9) (instance thing200_4 thing200) (related thing200_4 thing200_5 prop5) (instance thing002_8 thing002) (related thing002_8 thing002_9 prop9) (instance thing10_5 thing10) (related thing10_5 thing10_6 prop6) (instance thing133_3 thing133) (related thing133_3 thing133_4 prop4) (instance thing4_2 thing4) (related thing4_2 thing4_3 prop3) (instance thing441_9 thing441) (related thing441_9 thing442_0 prop0) (instance thing310_6 thing310) (related thing310_6 thing310_7 prop7) (instance thing041_8 thing041) (related thing041_8 thing041_9 prop9) (instance thing124_2 thing124) (related thing124_2 thing124_3 prop3) (instance thing013_2 thing013) (related thing013_2 thing013_3 prop3) (instance thing410_5 thing410) (related thing410_5 thing410_6 prop6) (instance thing021_4 thing021) (related thing021_4 thing021_5 prop5) (instance thing420_4 thing420) (related thing420_4 thing420_5 prop5) (instance thing131_3 thing131) (related thing131_3 thing131_4 prop4) (instance thing314_9 thing314) (related thing314_9 thing32_0 prop0) (instance thing240_8 thing240) (related thing240_8 thing240_9 prop9) (instance thing00_5 thing00) (related thing00_5 thing00_6 prop6) (instance thing233_7 thing233) (related thing233_7 thing233_8 prop8) (instance thing342_1 thing342) (related thing342_1 thing342_2 prop2) (instance thing012_7 thing012) (related thing012_7 thing012_8 prop8) (instance thing204_6 thing204) (related thing204_6 thing204_7 prop7) (instance thing400_6 thing400) (related thing400_6 thing400_7 prop7) (instance thing204_7 thing204) (related thing204_7 thing204_8 prop8) (instance thing134_7 thing134) (related thing134_7 thing134_8 prop8) (instance thing211_0 thing211) (related thing211_0 thing211_1 prop1) (instance thing22_7 thing22) (related thing22_7 thing22_8 prop8) (instance thing214_2 thing214) (related thing214_2 thing214_3 prop3) (instance thing330_4 thing330) (related thing330_4 thing330_5 prop5) (instance thing023_3 thing023) (related thing023_3 thing023_4 prop4) (instance thing343_1 thing343) (related thing343_1 thing343_2 prop2) (instance thing102_2 thing102) (related thing102_2 thing102_3 prop3) (instance thing203_8 thing203) (related thing203_8 thing203_9 prop9) (instance thing304_4 thing304) (related thing304_4 thing304_5 prop5) (instance thing220_7 thing220) (related thing220_7 thing220_8 prop8) (instance thing113_8 thing113) (related thing113_8 thing113_9 prop9) (instance thing340_3 thing340) (related thing340_3 thing340_4 prop4) (instance thing011_6 thing011) (related thing011_6 thing011_7 prop7) (instance thing421_7 thing421) (related thing421_7 thing421_8 prop8) (instance thing333_2 thing333) (related thing333_2 thing333_3 prop3) (instance thing344_2 thing344) (related thing344_2 thing344_3 prop3) (instance thing303_3 thing303) (related thing303_3 thing303_4 prop4) (instance thing020_3 thing020) (related thing020_3 thing020_4 prop4) (instance thing313_6 thing313) (related thing313_6 thing313_7 prop7) (instance thing100_2 thing100) (related thing100_2 thing100_3 prop3) (instance thing202_9 thing202) (related thing202_9 thing203_0 prop0) (instance thing30_1 thing30) (related thing30_1 thing30_2 prop2) (instance thing31_7 thing31) (related thing31_7 thing31_8 prop8) (instance thing2_2 thing2) (related thing2_2 thing2_3 prop3) (instance thing124_4 thing124) (related thing124_4 thing124_5 prop5) (instance thing134_5 thing134) (related thing134_5 thing134_6 prop6) (instance thing213_2 thing213) (related thing213_2 thing213_3 prop3) (instance thing341_4 thing341) (related thing341_4 thing341_5 prop5) (instance thing002_1 thing002) (related thing002_1 thing002_2 prop2) (instance thing234_3 thing234) (related thing234_3 thing234_4 prop4) (instance thing440_0 thing440) (related thing440_0 thing440_1 prop1) (instance thing2_4 thing2) (related thing2_4 thing2_5 prop5) (instance thing004_5 thing004) (related thing004_5 thing004_6 prop6) (instance thing10_6 thing10) (related thing10_6 thing10_7 prop7) (instance thing031_4 thing031) (related thing031_4 thing031_5 prop5) (instance thing132_0 thing132) (related thing132_0 thing132_1 prop1) (instance thing130_6 thing130) (related thing130_6 thing130_7 prop7) (instance thing003_5 thing003) (related thing003_5 thing003_6 prop6) (instance thing403_9 thing403) (related thing403_9 thing404_0 prop0) (instance thing40_5 thing40) (related thing40_5 thing40_6 prop6) (instance thing203_4 thing203) (related thing203_4 thing203_5 prop5) (instance thing33_2 thing33) (related thing33_2 thing33_3 prop3) (instance thing013_7 thing013) (related thing013_7 thing013_8 prop8) (instance thing011_7 thing011) (related thing011_7 thing011_8 prop8) (instance thing001_6 thing001) (related thing001_6 thing001_7 prop7) (instance thing100_6 thing100) (related thing100_6 thing100_7 prop7) (instance thing413_0 thing413) (related thing413_0 thing413_1 prop1) (instance thing343_0 thing343) (related thing343_0 thing343_1 prop1) (instance thing2_0 thing2) (related thing2_0 thing2_1 prop1) (instance thing422_5 thing422) (related thing422_5 thing422_6 prop6) (instance thing201_5 thing201) (related thing201_5 thing201_6 prop6) (instance thing02_2 thing02) (related thing02_2 thing02_3 prop3) (instance thing321_2 thing321) (related thing321_2 thing321_3 prop3) (instance thing211_3 thing211) (related thing211_3 thing211_4 prop4) (instance thing103_0 thing103) (related thing103_0 thing103_1 prop1) (instance thing434_2 thing434) (related thing434_2 thing434_3 prop3) (instance thing320_5 thing320) (related thing320_5 thing320_6 prop6) (instance thing44_0 thing44) (related thing44_0 thing44_1 prop1) (instance thing30_9 thing30) (related thing30_9 thing300_0 prop0) (instance thing344_9 thing344) (related thing344_9 thing4_0 prop0) (instance thing243_2 thing243) (related thing243_2 thing243_3 prop3) (instance thing324_1 thing324) (related thing324_1 thing324_2 prop2) (instance thing300_0 thing300) (related thing300_0 thing300_1 prop1) (instance thing442_5 thing442) (related thing442_5 thing442_6 prop6) (instance thing022_3 thing022) (related thing022_3 thing022_4 prop4) (instance thing111_0 thing111) (related thing111_0 thing111_1 prop1) (instance thing212_7 thing212) (related thing212_7 thing212_8 prop8) (instance thing430_4 thing430) (related thing430_4 thing430_5 prop5) (instance thing123_8 thing123) (related thing123_8 thing123_9 prop9) (instance thing341_3 thing341) (related thing341_3 thing341_4 prop4) (instance thing044_8 thing044) (related thing044_8 thing044_9 prop9) (instance thing222_7 thing222) (related thing222_7 thing222_8 prop8) (instance thing143_9 thing143) (related thing143_9 thing144_0 prop0) (instance thing403_8 thing403) (related thing403_8 thing403_9 prop9) (instance thing222_0 thing222) (related thing222_0 thing222_1 prop1) (instance thing424_9 thing424) (related thing424_9 thing43_0 prop0) (instance thing411_5 thing411) (related thing411_5 thing411_6 prop6) (instance thing30_8 thing30) (related thing30_8 thing30_9 prop9) (instance thing444_4 thing444) (related thing444_4 thing444_5 prop5) (instance thing242_3 thing242) (related thing242_3 thing242_4 prop4) (instance thing441_0 thing441) (related thing441_0 thing441_1 prop1) (instance thing431_2 thing431) (related thing431_2 thing431_3 prop3) (instance thing033_7 thing033) (related thing033_7 thing033_8 prop8) (instance thing030_9 thing030) (related thing030_9 thing031_0 prop0) (instance thing314_5 thing314) (related thing314_5 thing314_6 prop6) (instance thing00_6 thing00) (related thing00_6 thing00_7 prop7) (instance thing401_8 thing401) (related thing401_8 thing401_9 prop9) (instance thing013_6 thing013) (related thing013_6 thing013_7 prop7) (instance thing042_6 thing042) (related thing042_6 thing042_7 prop7) (instance thing204_9 thing204) (related thing204_9 thing21_0 prop0) (instance thing004_3 thing004) (related thing004_3 thing004_4 prop4) (instance thing024_7 thing024) (related thing024_7 thing024_8 prop8) (instance thing10_4 thing10) (related thing10_4 thing10_5 prop5) (instance thing1_0 thing1) (related thing1_0 thing1_1 prop1) (instance thing44_4 thing44) (related thing44_4 thing44_5 prop5) (instance thing322_2 thing322) (related thing322_2 thing322_3 prop3) (instance thing103_5 thing103) (related thing103_5 thing103_6 prop6) (instance thing141_7 thing141) (related thing141_7 thing141_8 prop8) (instance thing0_2 thing0) (related thing0_2 thing0_3 prop3) (instance thing034_8 thing034) (related thing034_8 thing034_9 prop9) (instance thing42_9 thing42) (related thing42_9 thing420_0 prop0) (instance thing244_3 thing244) (related thing244_3 thing244_4 prop4) (instance thing303_2 thing303) (related thing303_2 thing303_3 prop3) (instance thing321_6 thing321) (related thing321_6 thing321_7 prop7) (instance thing34_3 thing34) (related thing34_3 thing34_4 prop4) (instance thing133_0 thing133) (related thing133_0 thing133_1 prop1) (instance thing323_1 thing323) (related thing323_1 thing323_2 prop2) (instance thing404_5 thing404) (related thing404_5 thing404_6 prop6) (instance thing02_6 thing02) (related thing02_6 thing02_7 prop7) (instance thing442_3 thing442) (related thing442_3 thing442_4 prop4) (instance thing113_9 thing113) (related thing113_9 thing114_0 prop0) (instance thing022_7 thing022) (related thing022_7 thing022_8 prop8) (instance thing024_9 thing024) (related thing024_9 thing03_0 prop0) (instance thing124_9 thing124) (related thing124_9 thing13_0 prop0) (instance thing023_9 thing023) (related thing023_9 thing024_0 prop0) (instance thing141_2 thing141) (related thing141_2 thing141_3 prop3) (instance thing212_6 thing212) (related thing212_6 thing212_7 prop7) (instance thing201_2 thing201) (related thing201_2 thing201_3 prop3) (instance thing0_9 thing0) (related thing0_9 thing00_0 prop0) (instance thing040_2 thing040) (related thing040_2 thing040_3 prop3) (instance thing041_9 thing041) (related thing041_9 thing042_0 prop0) (instance thing244_4 thing244) (related thing244_4 thing244_5 prop5) (instance thing221_2 thing221) (related thing221_2 thing221_3 prop3) (instance thing012_9 thing012) (related thing012_9 thing013_0 prop0) (instance thing234_6 thing234) (related thing234_6 thing234_7 prop7) (instance thing330_9 thing330) (related thing330_9 thing331_0 prop0) (instance thing222_5 thing222) (related thing222_5 thing222_6 prop6) (instance thing400_5 thing400) (related thing400_5 thing400_6 prop6) (instance thing443_7 thing443) (related thing443_7 thing443_8 prop8) (instance thing43_4 thing43) (related thing43_4 thing43_5 prop5) (instance thing042_9 thing042) (related thing042_9 thing043_0 prop0) (instance thing03_6 thing03) (related thing03_6 thing03_7 prop7) (instance thing21_4 thing21) (related thing21_4 thing21_5 prop5) (instance thing322_8 thing322) (related thing322_8 thing322_9 prop9) (instance thing021_5 thing021) (related thing021_5 thing021_6 prop6) (instance thing323_7 thing323) (related thing323_7 thing323_8 prop8) (instance thing414_4 thing414) (related thing414_4 thing414_5 prop5) (instance thing041_3 thing041) (related thing041_3 thing041_4 prop4) (instance thing440_5 thing440) (related thing440_5 thing440_6 prop6) (instance thing341_9 thing341) (related thing341_9 thing342_0 prop0) (instance thing213_3 thing213) (related thing213_3 thing213_4 prop4) (instance thing44_8 thing44) (related thing44_8 thing44_9 prop9) (instance thing304_6 thing304) (related thing304_6 thing304_7 prop7) (instance thing123_5 thing123) (related thing123_5 thing123_6 prop6) (instance thing344_5 thing344) (related thing344_5 thing344_6 prop6) (instance thing30_6 thing30) (related thing30_6 thing30_7 prop7) (instance thing000_3 thing000) (related thing000_3 thing000_4 prop4) (instance thing401_9 thing401) (related thing401_9 thing402_0 prop0) (instance thing331_3 thing331) (related thing331_3 thing331_4 prop4) (instance thing313_4 thing313) (related thing313_4 thing313_5 prop5) (instance thing220_1 thing220) (related thing220_1 thing220_2 prop2) (instance thing03_3 thing03) (related thing03_3 thing03_4 prop4) (instance thing44_3 thing44) (related thing44_3 thing44_4 prop4) (instance thing231_3 thing231) (related thing231_3 thing231_4 prop4) (instance thing123_9 thing123) (related thing123_9 thing124_0 prop0) (instance thing124_5 thing124) (related thing124_5 thing124_6 prop6) (instance thing34_8 thing34) (related thing34_8 thing34_9 prop9) (instance thing204_4 thing204) (related thing204_4 thing204_5 prop5) (instance thing433_6 thing433) (related thing433_6 thing433_7 prop7) (instance thing12_7 thing12) (related thing12_7 thing12_8 prop8) (instance thing110_4 thing110) (related thing110_4 thing110_5 prop5) (instance thing22_4 thing22) (related thing22_4 thing22_5 prop5) (instance thing132_4 thing132) (related thing132_4 thing132_5 prop5) (instance thing430_1 thing430) (related thing430_1 thing430_2 prop2) (instance thing303_4 thing303) (related thing303_4 thing303_5 prop5) (instance thing124_6 thing124) (related thing124_6 thing124_7 prop7) (instance thing43_5 thing43) (related thing43_5 thing43_6 prop6) (instance thing240_1 thing240) (related thing240_1 thing240_2 prop2) (instance thing433_5 thing433) (related thing433_5 thing433_6 prop6) (instance thing11_3 thing11) (related thing11_3 thing11_4 prop4) (instance thing041_0 thing041) (related thing041_0 thing041_1 prop1) (instance thing442_2 thing442) (related thing442_2 thing442_3 prop3) (instance thing310_5 thing310) (related thing310_5 thing310_6 prop6) (instance thing131_9 thing131) (related thing131_9 thing132_0 prop0) (instance thing223_3 thing223) (related thing223_3 thing223_4 prop4) (instance thing242_1 thing242) (related thing242_1 thing242_2 prop2) (instance thing334_3 thing334) (related thing334_3 thing334_4 prop4) (instance thing014_4 thing014) (related thing014_4 thing014_5 prop5) (instance thing04_6 thing04) (related thing04_6 thing04_7 prop7) (instance thing144_5 thing144) (related thing144_5 thing144_6 prop6) (instance thing400_1 thing400) (related thing400_1 thing400_2 prop2) (instance thing043_0 thing043) (related thing043_0 thing043_1 prop1) (instance thing400_3 thing400) (related thing400_3 thing400_4 prop4) (instance thing301_3 thing301) (related thing301_3 thing301_4 prop4) (instance thing220_5 thing220) (related thing220_5 thing220_6 prop6) (instance thing300_4 thing300) (related thing300_4 thing300_5 prop5) (instance thing414_0 thing414) (related thing414_0 thing414_1 prop1) (instance thing331_4 thing331) (related thing331_4 thing331_5 prop5) (instance thing024_6 thing024) (related thing024_6 thing024_7 prop7) (instance thing31_2 thing31) (related thing31_2 thing31_3 prop3) (instance thing24_5 thing24) (related thing24_5 thing24_6 prop6) (instance thing344_0 thing344) (related thing344_0 thing344_1 prop1) (instance thing343_7 thing343) (related thing343_7 thing343_8 prop8) (instance thing444_2 thing444) (related thing444_2 thing444_3 prop3) (instance thing202_7 thing202) (related thing202_7 thing202_8 prop8) (instance thing3_2 thing3) (related thing3_2 thing3_3 prop3) (instance thing410_6 thing410) (related thing410_6 thing410_7 prop7) (instance thing30_5 thing30) (related thing30_5 thing30_6 prop6) (instance thing0_3 thing0) (related thing0_3 thing0_4 prop4) (instance thing421_8 thing421) (related thing421_8 thing421_9 prop9) (instance thing314_4 thing314) (related thing314_4 thing314_5 prop5) (instance thing143_6 thing143) (related thing143_6 thing143_7 prop7) (instance thing231_4 thing231) (related thing231_4 thing231_5 prop5) (instance thing432_1 thing432) (related thing432_1 thing432_2 prop2) (instance thing041_7 thing041) (related thing041_7 thing041_8 prop8) (instance thing044_3 thing044) (related thing044_3 thing044_4 prop4) (instance thing043_4 thing043) (related thing043_4 thing043_5 prop5) (instance thing310_3 thing310) (related thing310_3 thing310_4 prop4) (instance thing200_2 thing200) (related thing200_2 thing200_3 prop3) (instance thing021_9 thing021) (related thing021_9 thing022_0 prop0) (instance thing34_7 thing34) (related thing34_7 thing34_8 prop8) (instance thing111_5 thing111) (related thing111_5 thing111_6 prop6) (instance thing240_4 thing240) (related thing240_4 thing240_5 prop5) (instance thing024_4 thing024) (related thing024_4 thing024_5 prop5) (instance thing01_6 thing01) (related thing01_6 thing01_7 prop7) (instance thing112_0 thing112) (related thing112_0 thing112_1 prop1) (instance thing313_8 thing313) (related thing313_8 thing313_9 prop9) (instance thing032_5 thing032) (related thing032_5 thing032_6 prop6) (instance thing140_4 thing140) (related thing140_4 thing140_5 prop5) (instance thing420_3 thing420) (related thing420_3 thing420_4 prop4) (instance thing101_2 thing101) (related thing101_2 thing101_3 prop3) (instance thing100_9 thing100) (related thing100_9 thing101_0 prop0) (instance thing300_5 thing300) (related thing300_5 thing300_6 prop6) (instance thing141_5 thing141) (related thing141_5 thing141_6 prop6) (instance thing033_9 thing033) (related thing033_9 thing034_0 prop0) (instance thing234_5 thing234) (related thing234_5 thing234_6 prop6) (instance thing010_3 thing010) (related thing010_3 thing010_4 prop4) (instance thing234_9 thing234) (related thing234_9 thing24_0 prop0) (instance thing130_7 thing130) (related thing130_7 thing130_8 prop8) (instance thing120_8 thing120) (related thing120_8 thing120_9 prop9) (instance thing421_0 thing421) (related thing421_0 thing421_1 prop1) (instance thing100_3 thing100) (related thing100_3 thing100_4 prop4) (instance thing114_3 thing114) (related thing114_3 thing114_4 prop4) (instance thing3_5 thing3) (related thing3_5 thing3_6 prop6) (instance thing311_0 thing311) (related thing311_0 thing311_1 prop1) (instance thing3_3 thing3) (related thing3_3 thing3_4 prop4) (instance thing032_3 thing032) (related thing032_3 thing032_4 prop4) (instance thing42_3 thing42) (related thing42_3 thing42_4 prop4) (instance thing103_2 thing103) (related thing103_2 thing103_3 prop3) (instance thing401_2 thing401) (related thing401_2 thing401_3 prop3) (instance thing230_6 thing230) (related thing230_6 thing230_7 prop7) (instance thing332_1 thing332) (related thing332_1 thing332_2 prop2) (instance thing012_5 thing012) (related thing012_5 thing012_6 prop6) (instance thing040_9 thing040) (related thing040_9 thing041_0 prop0) (instance thing212_0 thing212) (related thing212_0 thing212_1 prop1) (instance thing211_2 thing211) (related thing211_2 thing211_3 prop3) (instance thing142_4 thing142) (related thing142_4 thing142_5 prop5) (instance thing342_5 thing342) (related thing342_5 thing342_6 prop6) (instance thing402_8 thing402) (related thing402_8 thing402_9 prop9) (instance thing424_4 thing424) (related thing424_4 thing424_5 prop5) (instance thing011_8 thing011) (related thing011_8 thing011_9 prop9) (instance thing214_0 thing214) (related thing214_0 thing214_1 prop1) (instance thing100_1 thing100) (related thing100_1 thing100_2 prop2) (instance thing14_4 thing14) (related thing14_4 thing14_5 prop5) (instance thing323_8 thing323) (related thing323_8 thing323_9 prop9) (instance thing144_2 thing144) (related thing144_2 thing144_3 prop3) (instance thing324_4 thing324) (related thing324_4 thing324_5 prop5) (instance thing40_6 thing40) (related thing40_6 thing40_7 prop7) (instance thing022_9 thing022) (related thing022_9 thing023_0 prop0) (instance thing114_0 thing114) (related thing114_0 thing114_1 prop1) (instance thing313_7 thing313) (related thing313_7 thing313_8 prop8) (instance thing403_3 thing403) (related thing403_3 thing403_4 prop4) (instance thing324_2 thing324) (related thing324_2 thing324_3 prop3) (instance thing240_0 thing240) (related thing240_0 thing240_1 prop1) (instance thing232_6 thing232) (related thing232_6 thing232_7 prop7) (instance thing021_8 thing021) (related thing021_8 thing021_9 prop9) (instance thing334_0 thing334) (related thing334_0 thing334_1 prop1) (instance thing431_6 thing431) (related thing431_6 thing431_7 prop7) (instance thing143_0 thing143) (related thing143_0 thing143_1 prop1) (instance thing323_9 thing323) (related thing323_9 thing324_0 prop0) (instance thing020_2 thing020) (related thing020_2 thing020_3 prop3) (instance thing131_8 thing131) (related thing131_8 thing131_9 prop9) (instance thing143_1 thing143) (related thing143_1 thing143_2 prop2) (instance thing030_5 thing030) (related thing030_5 thing030_6 prop6) (instance thing01_7 thing01) (related thing01_7 thing01_8 prop8) (instance thing014_0 thing014) (related thing014_0 thing014_1 prop1) (instance thing410_2 thing410) (related thing410_2 thing410_3 prop3) (instance thing333_3 thing333) (related thing333_3 thing333_4 prop4) (instance thing320_8 thing320) (related thing320_8 thing320_9 prop9) (instance thing202_8 thing202) (related thing202_8 thing202_9 prop9) (instance thing412_5 thing412) (related thing412_5 thing412_6 prop6) (instance thing31_4 thing31) (related thing31_4 thing31_5 prop5) (instance thing421_1 thing421) (related thing421_1 thing421_2 prop2) (instance thing121_4 thing121) (related thing121_4 thing121_5 prop5) (instance thing203_0 thing203) (related thing203_0 thing203_1 prop1) (instance thing232_0 thing232) (related thing232_0 thing232_1 prop1) (instance thing421_2 thing421) (related thing421_2 thing421_3 prop3) (instance thing121_1 thing121) (related thing121_1 thing121_2 prop2) (instance thing13_4 thing13) (related thing13_4 thing13_5 prop5) (instance thing413_1 thing413) (related thing413_1 thing413_2 prop2) (instance thing230_4 thing230) (related thing230_4 thing230_5 prop5) (instance thing300_6 thing300) (related thing300_6 thing300_7 prop7) (instance thing130_5 thing130) (related thing130_5 thing130_6 prop6) (instance thing331_6 thing331) (related thing331_6 thing331_7 prop7) (instance thing213_5 thing213) (related thing213_5 thing213_6 prop6) (instance thing111_4 thing111) (related thing111_4 thing111_5 prop5) (instance thing330_7 thing330) (related thing330_7 thing330_8 prop8) (instance thing432_8 thing432) (related thing432_8 thing432_9 prop9) (instance thing442_0 thing442) (related thing442_0 thing442_1 prop1) (instance thing340_5 thing340) (related thing340_5 thing340_6 prop6) (instance thing41_1 thing41) (related thing41_1 thing41_2 prop2) (instance thing432_2 thing432) (related thing432_2 thing432_3 prop3) (instance thing144_0 thing144) (related thing144_0 thing144_1 prop1) (instance thing404_6 thing404) (related thing404_6 thing404_7 prop7) (instance thing440_1 thing440) (related thing440_1 thing440_2 prop2) (instance thing421_9 thing421) (related thing421_9 thing422_0 prop0) (instance thing122_2 thing122) (related thing122_2 thing122_3 prop3) (instance thing413_2 thing413) (related thing413_2 thing413_3 prop3) (instance thing021_6 thing021) (related thing021_6 thing021_7 prop7) (instance thing20_7 thing20) (related thing20_7 thing20_8 prop8) (instance thing104_0 thing104) (related thing104_0 thing104_1 prop1) (instance thing010_8 thing010) (related thing010_8 thing010_9 prop9) (instance thing133_4 thing133) (related thing133_4 thing133_5 prop5) (instance thing042_8 thing042) (related thing042_8 thing042_9 prop9) (instance thing424_2 thing424) (related thing424_2 thing424_3 prop3) (instance thing4_7 thing4) (related thing4_7 thing4_8 prop8) (instance thing42_8 thing42) (related thing42_8 thing42_9 prop9) (instance thing444_3 thing444) (related thing444_3 thing444_4 prop4) (instance thing242_4 thing242) (related thing242_4 thing242_5 prop5) (instance thing132_2 thing132) (related thing132_2 thing132_3 prop3) (instance thing041_5 thing041) (related thing041_5 thing041_6 prop6) (instance thing243_9 thing243) (related thing243_9 thing244_0 prop0) (instance thing33_3 thing33) (related thing33_3 thing33_4 prop4) (instance thing332_7 thing332) (related thing332_7 thing332_8 prop8) (instance thing211_9 thing211) (related thing211_9 thing212_0 prop0) (instance thing010_5 thing010) (related thing010_5 thing010_6 prop6) (instance thing004_7 thing004) (related thing004_7 thing004_8 prop8) (instance thing044_4 thing044) (related thing044_4 thing044_5 prop5) (instance thing000_7 thing000) (related thing000_7 thing000_8 prop8) (instance thing20_3 thing20) (related thing20_3 thing20_4 prop4) (instance thing141_1 thing141) (related thing141_1 thing141_2 prop2) (instance thing414_1 thing414) (related thing414_1 thing414_2 prop2) (instance thing13_7 thing13) (related thing13_7 thing13_8 prop8) (instance thing113_5 thing113) (related thing113_5 thing113_6 prop6) (instance thing430_5 thing430) (related thing430_5 thing430_6 prop6) (instance thing31_0 thing31) (related thing31_0 thing31_1 prop1) (instance thing14_2 thing14) (related thing14_2 thing14_3 prop3) (instance thing200_7 thing200) (related thing200_7 thing200_8 prop8) (instance thing003_4 thing003) (related thing003_4 thing003_5 prop5) (instance thing22_2 thing22) (related thing22_2 thing22_3 prop3) (instance thing412_4 thing412) (related thing412_4 thing412_5 prop5) (instance thing242_7 thing242) (related thing242_7 thing242_8 prop8) (instance thing04_5 thing04) (related thing04_5 thing04_6 prop6) (instance thing142_6 thing142) (related thing142_6 thing142_7 prop7) (instance thing220_9 thing220) (related thing220_9 thing221_0 prop0) (instance thing232_7 thing232) (related thing232_7 thing232_8 prop8) (instance thing303_8 thing303) (related thing303_8 thing303_9 prop9) (instance thing300_2 thing300) (related thing300_2 thing300_3 prop3) (instance thing114_9 thing114) (related thing114_9 thing12_0 prop0) (instance thing020_0 thing020) (related thing020_0 thing020_1 prop1) (instance thing302_9 thing302) (related thing302_9 thing303_0 prop0) (instance thing412_0 thing412) (related thing412_0 thing412_1 prop1) (instance thing013_0 thing013) (related thing013_0 thing013_1 prop1) (instance thing042_2 thing042) (related thing042_2 thing042_3 prop3) (instance thing331_8 thing331) (related thing331_8 thing331_9 prop9) (instance thing001_5 thing001) (related thing001_5 thing001_6 prop6) (instance thing212_9 thing212) (related thing212_9 thing213_0 prop0) (instance thing142_8 thing142) (related thing142_8 thing142_9 prop9) (instance thing104_4 thing104) (related thing104_4 thing104_5 prop5) (instance thing114_7 thing114) (related thing114_7 thing114_8 prop8) (instance thing401_5 thing401) (related thing401_5 thing401_6 prop6) (instance thing003_7 thing003) (related thing003_7 thing003_8 prop8) (instance thing032_8 thing032) (related thing032_8 thing032_9 prop9) (instance thing212_8 thing212) (related thing212_8 thing212_9 prop9) (instance thing114_5 thing114) (related thing114_5 thing114_6 prop6) (instance thing440_4 thing440) (related thing440_4 thing440_5 prop5) (instance thing010_4 thing010) (related thing010_4 thing010_5 prop5) (instance thing34_1 thing34) (related thing34_1 thing34_2 prop2) (instance thing234_4 thing234) (related thing234_4 thing234_5 prop5) (instance thing14_3 thing14) (related thing14_3 thing14_4 prop4) (instance thing24_2 thing24) (related thing24_2 thing24_3 prop3) (instance thing20_1 thing20) (related thing20_1 thing20_2 prop2) (instance thing422_8 thing422) (related thing422_8 thing422_9 prop9) (instance thing030_4 thing030) (related thing030_4 thing030_5 prop5) (instance thing402_9 thing402) (related thing402_9 thing403_0 prop0) (instance thing313_5 thing313) (related thing313_5 thing313_6 prop6) (instance thing00_7 thing00) (related thing00_7 thing00_8 prop8) (instance thing024_0 thing024) (related thing024_0 thing024_1 prop1) (instance thing111_6 thing111) (related thing111_6 thing111_7 prop7) (instance thing2_8 thing2) (related thing2_8 thing2_9 prop9) (instance thing44_5 thing44) (related thing44_5 thing44_6 prop6) (instance thing140_1 thing140) (related thing140_1 thing140_2 prop2) (instance thing210_5 thing210) (related thing210_5 thing210_6 prop6) (instance thing443_4 thing443) (related thing443_4 thing443_5 prop5) (instance thing122_0 thing122) (related thing122_0 thing122_1 prop1) (instance thing130_3 thing130) (related thing130_3 thing130_4 prop4) (instance thing111_3 thing111) (related thing111_3 thing111_4 prop4) (instance thing1_2 thing1) (related thing1_2 thing1_3 prop3) (instance thing022_4 thing022) (related thing022_4 thing022_5 prop5) (instance thing104_2 thing104) (related thing104_2 thing104_3 prop3) (instance thing020_8 thing020) (related thing020_8 thing020_9 prop9) (instance thing400_0 thing400) (related thing400_0 thing400_1 prop1) (instance thing001_7 thing001) (related thing001_7 thing001_8 prop8) (instance thing423_6 thing423) (related thing423_6 thing423_7 prop7) (instance thing230_1 thing230) (related thing230_1 thing230_2 prop2) (instance thing440_7 thing440) (related thing440_7 thing440_8 prop8) (instance thing431_4 thing431) (related thing431_4 thing431_5 prop5) (instance thing103_4 thing103) (related thing103_4 thing103_5 prop5) (instance thing444_5 thing444) (related thing444_5 thing444_6 prop6) (instance thing032_6 thing032) (related thing032_6 thing032_7 prop7) (instance thing10_8 thing10) (related thing10_8 thing10_9 prop9) (instance thing321_1 thing321) (related thing321_1 thing321_2 prop2) (instance thing224_5 thing224) (related thing224_5 thing224_6 prop6) (instance thing113_2 thing113) (related thing113_2 thing113_3 prop3) (instance thing222_2 thing222) (related thing222_2 thing222_3 prop3) (instance thing434_3 thing434) (related thing434_3 thing434_4 prop4) (instance thing20_0 thing20) (related thing20_0 thing20_1 prop1) (instance thing411_2 thing411) (related thing411_2 thing411_3 prop3) (instance thing004_4 thing004) (related thing004_4 thing004_5 prop5) (instance thing001_0 thing001) (related thing001_0 thing001_1 prop1) (instance thing112_2 thing112) (related thing112_2 thing112_3 prop3) (instance thing030_8 thing030) (related thing030_8 thing030_9 prop9) (instance thing114_4 thing114) (related thing114_4 thing114_5 prop5) (instance thing324_7 thing324) (related thing324_7 thing324_8 prop8) (instance thing142_9 thing142) (related thing142_9 thing143_0 prop0) (instance thing404_2 thing404) (related thing404_2 thing404_3 prop3) (instance thing012_3 thing012) (related thing012_3 thing012_4 prop4) (instance thing2_6 thing2) (related thing2_6 thing2_7 prop7) (instance thing044_2 thing044) (related thing044_2 thing044_3 prop3) (instance thing031_8 thing031) (related thing031_8 thing031_9 prop9) (instance thing041_2 thing041) (related thing041_2 thing041_3 prop3) (instance thing043_2 thing043) (related thing043_2 thing043_3 prop3) (instance thing312_5 thing312) (related thing312_5 thing312_6 prop6) (instance thing001_4 thing001) (related thing001_4 thing001_5 prop5) (instance thing42_0 thing42) (related thing42_0 thing42_1 prop1) (instance thing022_6 thing022) (related thing022_6 thing022_7 prop7) (instance thing00_8 thing00) (related thing00_8 thing00_9 prop9) (instance thing040_7 thing040) (related thing040_7 thing040_8 prop8) (instance thing014_9 thing014) (related thing014_9 thing02_0 prop0) (instance thing430_6 thing430) (related thing430_6 thing430_7 prop7) (instance thing213_0 thing213) (related thing213_0 thing213_1 prop1) (instance thing112_5 thing112) (related thing112_5 thing112_6 prop6) (instance thing301_2 thing301) (related thing301_2 thing301_3 prop3) (instance thing123_7 thing123) (related thing123_7 thing123_8 prop8) (instance thing121_5 thing121) (related thing121_5 thing121_6 prop6) (instance thing44_6 thing44) (related thing44_6 thing44_7 prop7) (instance thing22_8 thing22) (related thing22_8 thing22_9 prop9) (instance thing422_4 thing422) (related thing422_4 thing422_5 prop5) (instance thing122_7 thing122) (related thing122_7 thing122_8 prop8) (instance thing414_8 thing414) (related thing414_8 thing414_9 prop9) (instance thing03_1 thing03) (related thing03_1 thing03_2 prop2) (instance thing404_0 thing404) (related thing404_0 thing404_1 prop1) (instance thing210_2 thing210) (related thing210_2 thing210_3 prop3) (instance thing4_9 thing4) (related thing4_9 thing40_0 prop0) (instance thing23_3 thing23) (related thing23_3 thing23_4 prop4) (instance thing32_4 thing32) (related thing32_4 thing32_5 prop5) (instance thing201_1 thing201) (related thing201_1 thing201_2 prop2) (instance thing040_4 thing040) (related thing040_4 thing040_5 prop5) (instance thing024_1 thing024) (related thing024_1 thing024_2 prop2) (instance thing021_0 thing021) (related thing021_0 thing021_1 prop1) (instance thing222_8 thing222) (related thing222_8 thing222_9 prop9) (instance thing21_8 thing21) (related thing21_8 thing21_9 prop9) (instance thing320_2 thing320) (related thing320_2 thing320_3 prop3) (instance thing311_5 thing311) (related thing311_5 thing311_6 prop6) (instance thing313_2 thing313) (related thing313_2 thing313_3 prop3) (instance thing123_6 thing123) (related thing123_6 thing123_7 prop7) (instance thing203_9 thing203) (related thing203_9 thing204_0 prop0) (instance thing212_1 thing212) (related thing212_1 thing212_2 prop2) (instance thing414_3 thing414) (related thing414_3 thing414_4 prop4) (instance thing214_4 thing214) (related thing214_4 thing214_5 prop5) (instance thing044_0 thing044) (related thing044_0 thing044_1 prop1) (instance thing040_3 thing040) (related thing040_3 thing040_4 prop4) (instance thing112_1 thing112) (related thing112_1 thing112_2 prop2) (instance thing433_7 thing433) (related thing433_7 thing433_8 prop8) (instance thing024_5 thing024) (related thing024_5 thing024_6 prop6) (instance thing03_9 thing03) (related thing03_9 thing030_0 prop0) (instance thing330_2 thing330) (related thing330_2 thing330_3 prop3) (instance thing232_4 thing232) (related thing232_4 thing232_5 prop5) (instance thing313_0 thing313) (related thing313_0 thing313_1 prop1) (instance thing443_0 thing443) (related thing443_0 thing443_1 prop1) (instance thing233_6 thing233) (related thing233_6 thing233_7 prop7) (instance thing431_7 thing431) (related thing431_7 thing431_8 prop8) (instance thing1_9 thing1) (related thing1_9 thing10_0 prop0) (instance thing324_9 thing324) (related thing324_9 thing33_0 prop0) (instance thing133_5 thing133) (related thing133_5 thing133_6 prop6) (instance thing022_2 thing022) (related thing022_2 thing022_3 prop3) (instance thing321_9 thing321) (related thing321_9 thing322_0 prop0) (instance thing213_4 thing213) (related thing213_4 thing213_5 prop5) (instance thing101_9 thing101) (related thing101_9 thing102_0 prop0) (instance thing032_7 thing032) (related thing032_7 thing032_8 prop8) (instance thing203_7 thing203) (related thing203_7 thing203_8 prop8) (instance thing123_4 thing123) (related thing123_4 thing123_5 prop5) (instance thing02_0 thing02) (related thing02_0 thing02_1 prop1) (instance thing010_1 thing010) (related thing010_1 thing010_2 prop2) (instance thing0_6 thing0) (related thing0_6 thing0_7 prop7) (instance thing341_2 thing341) (related thing341_2 thing341_3 prop3) (instance thing0_7 thing0) (related thing0_7 thing0_8 prop8) (instance thing12_6 thing12) (related thing12_6 thing12_7 prop7) (instance thing143_8 thing143) (related thing143_8 thing143_9 prop9) (instance thing033_4 thing033) (related thing033_4 thing033_5 prop5) (instance thing211_1 thing211) (related thing211_1 thing211_2 prop2) (instance thing432_4 thing432) (related thing432_4 thing432_5 prop5) (instance thing23_4 thing23) (related thing23_4 thing23_5 prop5) (instance thing11_5 thing11) (related thing11_5 thing11_6 prop6) (instance thing134_4 thing134) (related thing134_4 thing134_5 prop5) (instance thing222_4 thing222) (related thing222_4 thing222_5 prop5) (instance thing011_5 thing011) (related thing011_5 thing011_6 prop6) (instance thing023_7 thing023) (related thing023_7 thing023_8 prop8) (instance thing131_4 thing131) (related thing131_4 thing131_5 prop5) (instance thing232_5 thing232) (related thing232_5 thing232_6 prop6) (instance thing241_4 thing241) (related thing241_4 thing241_5 prop5) (instance thing112_9 thing112) (related thing112_9 thing113_0 prop0) (instance thing012_2 thing012) (related thing012_2 thing012_3 prop3) (instance thing032_4 thing032) (related thing032_4 thing032_5 prop5) (instance thing340_2 thing340) (related thing340_2 thing340_3 prop3) (instance thing230_8 thing230) (related thing230_8 thing230_9 prop9) (instance thing301_6 thing301) (related thing301_6 thing301_7 prop7) (instance thing421_3 thing421) (related thing421_3 thing421_4 prop4) (instance thing23_6 thing23) (related thing23_6 thing23_7 prop7) (instance thing00_3 thing00) (related thing00_3 thing00_4 prop4) (instance thing202_5 thing202) (related thing202_5 thing202_6 prop6) (instance thing302_8 thing302) (related thing302_8 thing302_9 prop9) (instance thing112_8 thing112) (related thing112_8 thing112_9 prop9) (instance thing033_2 thing033) (related thing033_2 thing033_3 prop3) (instance thing320_1 thing320) (related thing320_1 thing320_2 prop2) (instance thing132_9 thing132) (related thing132_9 thing133_0 prop0) (instance thing1_1 thing1) (related thing1_1 thing1_2 prop2) (instance thing340_4 thing340) (related thing340_4 thing340_5 prop5) (instance thing140_7 thing140) (related thing140_7 thing140_8 prop8) (instance thing122_3 thing122) (related thing122_3 thing122_4 prop4) (instance thing441_2 thing441) (related thing441_2 thing441_3 prop3) (instance thing42_4 thing42) (related thing42_4 thing42_5 prop5) (instance thing11_6 thing11) (related thing11_6 thing11_7 prop7) (instance thing43_6 thing43) (related thing43_6 thing43_7 prop7) (instance thing301_7 thing301) (related thing301_7 thing301_8 prop8) (instance thing404_4 thing404) (related thing404_4 thing404_5 prop5) (instance thing141_6 thing141) (related thing141_6 thing141_7 prop7) (instance thing043_8 thing043) (related thing043_8 thing043_9 prop9) (instance thing133_7 thing133) (related thing133_7 thing133_8 prop8) (instance thing404_3 thing404) (related thing404_3 thing404_4 prop4) (instance thing11_8 thing11) (related thing11_8 thing11_9 prop9) (instance thing423_7 thing423) (related thing423_7 thing423_8 prop8) (instance thing423_5 thing423) (related thing423_5 thing423_6 prop6) (instance thing10_9 thing10) (related thing10_9 thing100_0 prop0) (instance thing400_8 thing400) (related thing400_8 thing400_9 prop9) (instance thing2_9 thing2) (related thing2_9 thing20_0 prop0) (instance thing113_1 thing113) (related thing113_1 thing113_2 prop2) (instance thing43_3 thing43) (related thing43_3 thing43_4 prop4) (instance thing234_0 thing234) (related thing234_0 thing234_1 prop1) (instance thing230_2 thing230) (related thing230_2 thing230_3 prop3) (instance thing04_8 thing04) (related thing04_8 thing04_9 prop9) (instance thing24_0 thing24) (related thing24_0 thing24_1 prop1) (instance thing204_5 thing204) (related thing204_5 thing204_6 prop6) (instance thing031_5 thing031) (related thing031_5 thing031_6 prop6) (instance thing00_9 thing00) (related thing00_9 thing000_0 prop0) (instance thing444_8 thing444) (related thing444_8 thing444_9 prop9) (instance thing313_1 thing313) (related thing313_1 thing313_2 prop2) (instance thing103_3 thing103) (related thing103_3 thing103_4 prop4) (instance thing21_3 thing21) (related thing21_3 thing21_4 prop4) (instance thing120_1 thing120) (related thing120_1 thing120_2 prop2) (instance thing10_7 thing10) (related thing10_7 thing10_8 prop8) (instance thing414_7 thing414) (related thing414_7 thing414_8 prop8) (instance thing313_9 thing313) (related thing313_9 thing314_0 prop0) (instance thing414_9 thing414) (related thing414_9 thing42_0 prop0) (instance thing301_5 thing301) (related thing301_5 thing301_6 prop6) (instance thing4_3 thing4) (related thing4_3 thing4_4 prop4) (instance thing01_2 thing01) (related thing01_2 thing01_3 prop3) (instance thing130_1 thing130) (related thing130_1 thing130_2 prop2) (instance thing210_6 thing210) (related thing210_6 thing210_7 prop7) (instance thing423_4 thing423) (related thing423_4 thing423_5 prop5) (instance thing201_6 thing201) (related thing201_6 thing201_7 prop7) (instance thing30_3 thing30) (related thing30_3 thing30_4 prop4) (instance thing220_6 thing220) (related thing220_6 thing220_7 prop7) (instance thing043_7 thing043) (related thing043_7 thing043_8 prop8) (instance thing342_8 thing342) (related thing342_8 thing342_9 prop9) (instance thing20_8 thing20) (related thing20_8 thing20_9 prop9) (instance thing4_5 thing4) (related thing4_5 thing4_6 prop6) (instance thing040_8 thing040) (related thing040_8 thing040_9 prop9) (instance thing12_2 thing12) (related thing12_2 thing12_3 prop3) (instance thing24_7 thing24) (related thing24_7 thing24_8 prop8) (instance thing440_6 thing440) (related thing440_6 thing440_7 prop7) (instance thing433_3 thing433) (related thing433_3 thing433_4 prop4) (instance thing32_0 thing32) (related thing32_0 thing32_1 prop1) (instance thing303_1 thing303) (related thing303_1 thing303_2 prop2) (instance thing141_9 thing141) (related thing141_9 thing142_0 prop0) (instance thing442_4 thing442) (related thing442_4 thing442_5 prop5) (instance thing302_2 thing302) (related thing302_2 thing302_3 prop3) (instance thing312_1 thing312) (related thing312_1 thing312_2 prop2) (instance thing344_8 thing344) (related thing344_8 thing344_9 prop9) (instance thing02_7 thing02) (related thing02_7 thing02_8 prop8) (instance thing123_1 thing123) (related thing123_1 thing123_2 prop2) (instance thing002_5 thing002) (related thing002_5 thing002_6 prop6) (instance thing340_1 thing340) (related thing340_1 thing340_2 prop2) (instance thing11_4 thing11) (related thing11_4 thing11_5 prop5) (instance thing113_6 thing113) (related thing113_6 thing113_7 prop7) (instance thing243_6 thing243) (related thing243_6 thing243_7 prop7) (instance thing332_5 thing332) (related thing332_5 thing332_6 prop6) (instance thing110_0 thing110) (related thing110_0 thing110_1 prop1) (instance thing02_5 thing02) (related thing02_5 thing02_6 prop6) (instance thing440_2 thing440) (related thing440_2 thing440_3 prop3) (instance thing40_0 thing40) (related thing40_0 thing40_1 prop1) (instance thing331_9 thing331) (related thing331_9 thing332_0 prop0) (instance thing322_7 thing322) (related thing322_7 thing322_8 prop8) (instance thing241_3 thing241) (related thing241_3 thing241_4 prop4) (instance thing241_6 thing241) (related thing241_6 thing241_7 prop7) (instance thing314_0 thing314) (related thing314_0 thing314_1 prop1) (instance thing412_7 thing412) (related thing412_7 thing412_8 prop8) (instance thing102_9 thing102) (related thing102_9 thing103_0 prop0) (instance thing311_9 thing311) (related thing311_9 thing312_0 prop0) (instance thing24_4 thing24) (related thing24_4 thing24_5 prop5) (instance thing202_6 thing202) (related thing202_6 thing202_7 prop7) (instance thing340_0 thing340) (related thing340_0 thing340_1 prop1) (instance thing323_6 thing323) (related thing323_6 thing323_7 prop7) (instance thing20_2 thing20) (related thing20_2 thing20_3 prop3) (instance thing343_5 thing343) (related thing343_5 thing343_6 prop6) (instance thing03_7 thing03) (related thing03_7 thing03_8 prop8) (instance thing14_9 thing14) (related thing14_9 thing140_0 prop0) (instance thing432_0 thing432) (related thing432_0 thing432_1 prop1) (instance thing110_8 thing110) (related thing110_8 thing110_9 prop9) (instance thing343_3 thing343) (related thing343_3 thing343_4 prop4) (instance thing14_0 thing14) (related thing14_0 thing14_1 prop1) (instance thing422_1 thing422) (related thing422_1 thing422_2 prop2) (instance thing434_5 thing434) (related thing434_5 thing434_6 prop6) (instance thing1_5 thing1) (related thing1_5 thing1_6 prop6) (instance thing041_1 thing041) (related thing041_1 thing041_2 prop2) (instance thing01_5 thing01) (related thing01_5 thing01_6 prop6) (instance thing210_9 thing210) (related thing210_9 thing211_0 prop0) (instance thing344_7 thing344) (related thing344_7 thing344_8 prop8) (instance thing211_5 thing211) (related thing211_5 thing211_6 prop6) (instance thing221_5 thing221) (related thing221_5 thing221_6 prop6) (instance thing342_2 thing342) (related thing342_2 thing342_3 prop3) (instance thing030_0 thing030) (related thing030_0 thing030_1 prop1) (instance thing22_1 thing22) (related thing22_1 thing22_2 prop2) (instance thing101_8 thing101) (related thing101_8 thing101_9 prop9) (instance thing11_1 thing11) (related thing11_1 thing11_2 prop2) (instance thing031_2 thing031) (related thing031_2 thing031_3 prop3) (instance thing341_5 thing341) (related thing341_5 thing341_6 prop6) (instance thing00_0 thing00) (related thing00_0 thing00_1 prop1) (instance thing220_0 thing220) (related thing220_0 thing220_1 prop1) (instance thing023_4 thing023) (related thing023_4 thing023_5 prop5) (instance thing212_2 thing212) (related thing212_2 thing212_3 prop3) (instance thing30_2 thing30) (related thing30_2 thing30_3 prop3) (instance thing132_6 thing132) (related thing132_6 thing132_7 prop7) (instance thing112_6 thing112) (related thing112_6 thing112_7 prop7) (instance thing41_6 thing41) (related thing41_6 thing41_7 prop7) (instance thing103_7 thing103) (related thing103_7 thing103_8 prop8) (instance thing100_8 thing100) (related thing100_8 thing100_9 prop9) (instance thing02_9 thing02) (related thing02_9 thing020_0 prop0) (instance thing023_0 thing023) (related thing023_0 thing023_1 prop1) (instance thing30_4 thing30) (related thing30_4 thing30_5 prop5) (instance thing424_7 thing424) (related thing424_7 thing424_8 prop8) (instance thing400_7 thing400) (related thing400_7 thing400_8 prop8) (instance thing102_3 thing102) (related thing102_3 thing102_4 prop4) (instance thing04_1 thing04) (related thing04_1 thing04_2 prop2) (instance thing402_5 thing402) (related thing402_5 thing402_6 prop6) (instance thing3_7 thing3) (related thing3_7 thing3_8 prop8) (instance thing12_3 thing12) (related thing12_3 thing12_4 prop4) (instance thing101_5 thing101) (related thing101_5 thing101_6 prop6) (instance thing11_2 thing11) (related thing11_2 thing11_3 prop3) (instance thing32_9 thing32) (related thing32_9 thing320_0 prop0) (instance thing012_0 thing012) (related thing012_0 thing012_1 prop1) (instance thing210_3 thing210) (related thing210_3 thing210_4 prop4) (instance thing213_8 thing213) (related thing213_8 thing213_9 prop9) (instance thing22_9 thing22) (related thing22_9 thing220_0 prop0) (instance thing120_6 thing120) (related thing120_6 thing120_7 prop7) (instance thing304_3 thing304) (related thing304_3 thing304_4 prop4) (instance thing301_9 thing301) (related thing301_9 thing302_0 prop0) (instance thing241_9 thing241) (related thing241_9 thing242_0 prop0) (instance thing114_8 thing114) (related thing114_8 thing114_9 prop9) (instance thing422_6 thing422) (related thing422_6 thing422_7 prop7) (instance thing040_0 thing040) (related thing040_0 thing040_1 prop1) (instance thing322_1 thing322) (related thing322_1 thing322_2 prop2) (instance thing11_9 thing11) (related thing11_9 thing110_0 prop0) (instance thing402_4 thing402) (related thing402_4 thing402_5 prop5) (instance thing200_0 thing200) (related thing200_0 thing200_1 prop1) (instance thing044_9 thing044) (related thing044_9 thing1_0 prop0) (instance thing331_2 thing331) (related thing331_2 thing331_3 prop3) (instance thing103_1 thing103) (related thing103_1 thing103_2 prop2) (instance thing02_1 thing02) (related thing02_1 thing02_2 prop2) (instance thing01_4 thing01) (related thing01_4 thing01_5 prop5) (instance thing314_2 thing314) (related thing314_2 thing314_3 prop3) (instance thing420_9 thing420) (related thing420_9 thing421_0 prop0) (instance thing131_6 thing131) (related thing131_6 thing131_7 prop7) (instance thing340_6 thing340) (related thing340_6 thing340_7 prop7) (instance thing010_0 thing010) (related thing010_0 thing010_1 prop1) (instance thing331_1 thing331) (related thing331_1 thing331_2 prop2) (instance thing312_2 thing312) (related thing312_2 thing312_3 prop3)
113,559
Common Lisp
.lisp
1
113,558
113,559
0.79099
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
90e1c8c1949fcc63a274e43f7052d3b0a82b387cf62e2d87005023e5e0220c88
12,536
[ -1 ]
12,537
abstractions.lisp
lambdamikel_DLMAPS/src/prover/abstractions.lisp
;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defvar *prover-main-start-time* nil) (defvar *prover-init-start-time* nil) (defmacro announce (message &rest args) `(progn (when (or *debug-p* *announce-p*) (terpri) (format t ,message ,@args)) t)) (defmacro announce1 (message &rest args) `(progn (terpri) (format t ,message ,@args) t)) (defmacro defrule (expansion-type (language-type abox-type &key inherit-from args) &body body) `(eval-when (:compile-toplevel :load-toplevel :execute) (progn (defvar1 ,(intern (format nil "*TIME-SPEND-IN-~A*" expansion-type)) 0) (defmethod ,(intern (string-upcase (format nil "get-code-for-~A" expansion-type))) ((language ,language-type) (abox ,abox-type) &rest args &key positive-code negative-code after-successful-clash-repair-code body-code ,@args &allow-other-keys) (declare (ignorable positive-code negative-code after-successful-clash-repair-code body-code ,@args)) ,(if inherit-from `(apply (symbol-function ',(intern (string-upcase (format nil "get-code-for-~A" expansion-type)))) (make-language ',inherit-from) (make-instance ',abox-type :dont-initialize t) args) `(let* ((code (tree-map #'(lambda (item) (case item ;; ,@(mapcar #'(lambda (x) ;; `(,x (or ,x ',x))) ;; args) (+insert-positive-code+ `(progn (incf ,(intern (format nil "*TIME-SPEND-IN-~A*" ',expansion-type)) (- (get-internal-run-time) *start-time*)) ,@(or positive-code (list t)))) (+insert-negative-code+ `(progn (incf ,(intern (format nil "*TIME-SPEND-IN-~A*" ',expansion-type)) (- (get-internal-run-time) *start-time*)) ,@(or negative-code (list t)))) (+insert-after-successful-clash-repair-code+ `(progn ,@after-successful-clash-repair-code)) (+insert-body-code+ `(progn (incf ,(intern (format nil "*TIME-SPEND-IN-~A*" ',expansion-type)) (- (get-internal-run-time) *start-time*)) ,@(or body-code (list t)))) (otherwise item))) ',`(let ((*start-time* (get-internal-run-time))) (declare (ignorable *start-time*)) ,@body) ; ',(cons 'progn body) )) (let-list (list ,@(mapcar #'(lambda (x) `(list ',x ,x)) args)))) `(progn (announce "~%>>> Now performing ~A (Level ~A)~%" ',',expansion-type level) (let ,let-list (declare (ignorable ,@(mapcar #'first let-list))) ,code))))) ;;; 2. Method f. (perform! ...) (defmethod ,(intern (string-upcase (format nil "get-code-for-~A!" expansion-type))) ((language ,language-type) (abox ,abox-type) &rest args &key positive-code negative-code after-successful-clash-repair-code body-code ,@args &allow-other-keys) (declare (ignorable positive-code negative-code after-successful-clash-repair-code body-code ,@args)) ,(if inherit-from `(apply (symbol-function ',(intern (string-upcase (format nil "get-code-for-~A!" expansion-type)))) (make-language ',inherit-from) (make-instance ',abox-type :dont-initialize t) args) `(let* ((code (tree-map #'(lambda (item) (case item ,@(mapcar #'(lambda (x) `(,x (or ,x ',x))) args) (+insert-positive-code+ `(progn (incf ,(intern (format nil "*TIME-SPEND-IN-~A*" ',expansion-type)) (- (get-internal-run-time) *start-time*)) ,@(or positive-code (list t)))) (+insert-negative-code+ `(progn (incf ,(intern (format nil "*TIME-SPEND-IN-~A*" ',expansion-type)) (- (get-internal-run-time) *start-time*)) ,@(or negative-code (list t)))) (+insert-after-successful-clash-repair-code+ `(progn ,@after-successful-clash-repair-code)) (+insert-body-code+ `(progn (incf ,(intern (format nil "*TIME-SPEND-IN-~A*" ',expansion-type)) (- (get-internal-run-time) *start-time*)) ,@(or body-code (list t)))) (otherwise item))) ',`(let ((*start-time* (get-internal-run-time))) (declare (ignorable *start-time*)) ,@body)))) `(progn (announce "~%>>> Now performing ~A (Level ~A)~%" ',',expansion-type level) ,code))))))) #| (defun show-incarnation-info (type) (format t "~%~%***** ~A OF ~A : ~A, TBOX ~A LANGUAGE: ~A NODES: ~A EDGES: ~A ---------------------- BLOCKING ENABLED: ~A DYNAMIC BLOCKING: ~A ---------------------- COMBINED-SOME-ALL: ~A DELETE NODES: ~A REUSE NODES: ~A ALL COMPLETIONS: ~A MAINTAIN STATE: ~A KEEP DET. ASSERT.: ~A ---------------------- MODEL CACHING: ~A SUBTABLEAU CACHING: ~A USE CACHED MODELS: ~A USE UNSAT CACHE: ~A ---------------------- COMPUTE CORE MODEL: ~A STORE IND MODELS: ~A STORE RETR.MODEL: ~A ---------------------- SEMANTIC BRANCHING: ~A NON DETERMINISM: ~A ---------------------- TBOX: ~A STORE: ~A META CONSTRAINTS: ~A~%~%" type *cur-abox* (type-of *cur-abox*) (tbox *cur-abox*) (type-of *language*) (no-of-nodes *cur-abox*) (no-of-edges *cur-abox*) *blocking-enabled-p* *dynamic-blocking-p* *combined-some-all-rule-p* *delete-nodes-p* *reuse-nodes-p* *compute-all-completions-p* *maintain-prover-state-p* *keep-det-assertions-p* *cache-models-p* *subtableau-caching-p* *use-cached-models-p* *use-unsat-cache-p* *compute-core-model-p* *store-ind-models-p* *store-instance-retrieval-model-p* *semantic-branching-p* *non-determinism-p* *cur-tbox* *cur-store* *meta-constraints*)) |# (defun show-incarnation-info (type) (format t "~%~%***** ~A OF ~A : ~A, TBOX ~A LANGUAGE: ~A NODES: ~A EDGES: ~A -------------------------------------------------------------" type *cur-abox* (type-of *cur-abox*) (tbox *cur-abox*) (type-of *language*) (no-of-nodes *cur-abox*) (no-of-edges *cur-abox*)) (dolist (slot *prover-specials*) (when (and (boundp slot) (or (member (symbol-value slot) '(t nil)) (member slot '(*strategy*)) (numberp (symbol-value slot)))) (format t "~%~57,A : ~A" slot (symbol-value slot))))) (defmacro define-prover ( ( (prover-name language-type abox-type) &body keylist) &body body) (when (and keylist (not (eq (first keylist) '&key))) (error "Bad syntax! ~A" keylist)) (let* ((init-code (rest (assoc :init body))) (rollback-code (rest (assoc :rollback body))) (main-code (rest (assoc :main body))) (success-code (rest (assoc :success body))) (keys (remove :init (remove :main (remove :rollback (remove :success (mapcar #'first (mapcar #'ensure-list (rest keylist))))))))) (setf *language-dispatcher* (make-language language-type) *abox-dispatcher* (make-instance abox-type :dont-initialize t)) `(progn ,@(when init-code `(,@(unless (member (first init-code) '(:copy :inherit-from :call-next-method)) `((defmethod get-init-code ((name (eql (quote ,prover-name))) (language ,language-type) (abox ,abox-type)) (quote ,init-code)))) ,@(when (eq (first init-code) :call-next-method) `((defmethod get-init-code ((name (eql (quote ,prover-name))) (language ,language-type) (abox ,abox-type)) (call-next-method)))) (defvar1 ,(intern (format nil "*TIME-SPEND-IN-PROVER-INIT-~A-~A*" prover-name language-type)) 0) (defvar1 ,(intern (format nil "*TIME-SPEND-IN-PROVER-INIT-BEFORE-MAIN-~A-~A*" prover-name language-type)) 0) (defvar1 ,(intern (format nil "*TIME-SPEND-IN-PROVER-MAIN-~A-~A*" prover-name language-type)) 0) ;;; ;;; INIT ;;; (defmethod prover-init ((name (eql (quote ,prover-name))) (language ,language-type) (abox ,abox-type) &key (meta-constraints nil meta-constraints-specified-p) (tbox nil tbox-specified-p) (how-many nil how-many-specified-p) (debug-p nil debug-specified-p) (break-p nil break-specified-p) (visualize-p nil visualize-specified-p) (completion-found-hook nil completion-found-hook-specified-p) (reuse-nodes-p nil reuse-nodes-specified-p) (compute-all-completions-p nil compute-all-completions-specified-p) (maintain-prover-state-p nil maintain-prover-state-specified-p) (blocking-enabled-p nil blocking-enabled-specified-p) (delete-nodes-p nil delete-nodes-specified-p) (semantic-branching-p nil semantic-branching-specified-p) (non-determinism-p nil non-determinism-specified-p) (use-cached-models-p nil use-cached-models-specified-p) (use-unsat-cache-p nil use-unsat-cache-specified-p) (cache-models-p nil cache-models-specified-p) (store-ind-models-p nil store-ind-models-specified-p) (compute-core-model-p nil compute-core-model-specified-p) (keep-det-assertions-p nil keep-det-assertions-specified-p) (store-instance-retrieval-model-p nil store-instance-retrieval-model-specified-p) (subtableau-caching-p nil subtableau-caching-specified-p) ,@(rest keylist) &allow-other-keys) (declare (ignorable ,@keys)) (with-prover-standard-settings (let* ((level 'prover-init) (start-time (get-internal-run-time)) (rollback-to-action nil) ;;; ;;; ;;; (*dont-invalidate-store-p* t) (*maintain-history-p* t) ;;; ;;; ;;; (*cur-abox* abox) (*cur-tbox* (or tbox (tbox *cur-abox*))) (*cur-store* (concept-store *cur-tbox*)) (*cur-rbox* (rbox *cur-tbox*)) #+:use-membership-tables (*unexpanded-table* (unexpanded-table *cur-abox*)) #+:use-membership-tables (*expanded-table* (expanded-table *cur-abox*)) (*language* language)) (declare (ignorable level rollback-to-action)) (setf *prover-main-start-time* nil *prover-init-start-time* (get-internal-run-time)) (with-concept-store (*cur-store*) (let* ((*meta-constraints* (if meta-constraints-specified-p (append meta-constraints (get-meta-constraints *cur-tbox*)) (get-meta-constraints *cur-tbox*))) (*blocking-enabled-p* (when (if blocking-enabled-specified-p blocking-enabled-p (or *blocking-enabled-p* *meta-constraints* (needs-blocking-p *cur-tbox*) (get-all-transitive-roles *cur-tbox*))) t)) (*dynamic-blocking-p* (and *blocking-enabled-p* (is-dl-with-inverse-roles-p *language*))) (*combined-some-all-rule-p* (is-dl-with-combined-some-all-rule-p *language*)) (*propagation-of-transitive-all-concepts-p* (and (is-dl-with-transitive-roles-p *language*) (not *combined-some-all-rule-p*) (get-all-transitive-roles *cur-tbox*))) ;;; ;;; ;;; (*maintain-prover-state-p* (if maintain-prover-state-specified-p maintain-prover-state-p *maintain-prover-state-p*)) (*delete-nodes-p* (if delete-nodes-specified-p delete-nodes-p *delete-nodes-p*)) (*reuse-nodes-p* (or (if reuse-nodes-specified-p reuse-nodes-p *reuse-nodes-p*) (is-dl-with-rolebox-p language))) ;;; ;;; ;;; (*semantic-branching-p* (if semantic-branching-specified-p semantic-branching-p *semantic-branching-p*)) (*non-determinism-p* (if non-determinism-specified-p non-determinism-p *non-determinism-p*)) ;;; ;;; ;;; (*use-cached-models-p* (if use-cached-models-specified-p use-cached-models-p *use-cached-models-p*)) (*use-unsat-cache-p* (if use-unsat-cache-specified-p use-unsat-cache-p *use-unsat-cache-p*)) (*cache-models-p* (if cache-models-specified-p cache-models-p *cache-models-p*)) (*subtableau-caching-p* (if subtableau-caching-specified-p subtableau-caching-p *subtableau-caching-p*)) (*store-ind-models-p* (if store-ind-models-specified-p store-ind-models-p *store-ind-models-p*)) (*store-instance-retrieval-model-p* (if store-instance-retrieval-model-specified-p store-instance-retrieval-model-p *store-instance-retrieval-model-p*)) (*compute-core-model-p* (or (if compute-core-model-specified-p compute-core-model-p *compute-core-model-p*) *store-instance-retrieval-model-p*)) (*keep-det-assertions-p* (or *compute-core-model-p* (if keep-det-assertions-specified-p keep-det-assertions-p *keep-det-assertions-p*))) ;;; ;;; ;;; (*how-many* (if how-many-specified-p how-many *how-many*)) (*debug-p* (if debug-specified-p debug-p *debug-p*)) (*break-p* (if break-specified-p break-p *break-p*)) (*visualize-p* (if visualize-specified-p visualize-p *visualize-p*)) (*compute-all-completions-p* (if compute-all-completions-specified-p compute-all-completions-p *compute-all-completions-p*)) (*completion-found-hook* (if completion-found-hook-specified-p completion-found-hook *completion-found-hook*)) ;;; ;;; ;;; (next-round-p nil) ,@(when keys (mapcar #'(lambda (key) (list (intern (format nil "*~A*" key)) key)) keys))) (declare (special ,@(mapcar #'(lambda (key) (intern (format nil "*~A*" key))) keys))) (declare (ignorable ,@(mapcar #'(lambda (key) (intern (format nil "*~A*" key))) keys))) (declare (ignorable next-round-p level)) (when (and *keep-det-assertions-p* *maintain-prover-state-p*) (error "Both *keep-det-assertions-p* and *maintain-prover-state-p* specified.")) (when (and *compute-core-model-p* *delete-nodes-p*) (error "Both *compute-core-model-p* and *delete-noeds-p* specified.")) (when (not (or *maintain-prover-state-p* *keep-det-assertions-p*)) (setf (action-timestamp-counter *cur-abox*) 0 (current-action *cur-abox*) nil (choice-point-counter *cur-abox*) 0 rollback-to-action (get-current-action))) (mapc #'delete-abox *completions*) (setf *completions* nil) (when (or *debug-p* *show-prover-incarnations-p*) (show-incarnation-info 'sat-testing) (describe-object abox t) (loop-over-abox-nodes (node abox) (describe-object node t) (terpri) (terpri))) (unless (prepared-p *cur-store*) (error "Store ~A is not prepared!" *cur-store*)) (unless (prepared-p *cur-tbox*) (error "TBox ~A is not prepared!" *cur-tbox*)) (unless (prepared-p *cur-abox*) (error "ABox ~A is not prepared!" *cur-abox*)) (catch 'exit (let ((res (multiple-value-list (progn ,@(cond ((member (first init-code) '(:copy :call-next-method)) (get-init-code prover-name *language-dispatcher* *abox-dispatcher*)) ((eq (first init-code) :inherit-from) (get-init-code prover-name (make-language (second init-code)) (make-instance (third init-code) :dont-initialize t))) (t init-code)))))) (when *prover-main-start-time* (incf ,(intern (format nil "*TIME-SPEND-IN-PROVER-MAIN-~A-~A*" prover-name language-type)) (- (get-internal-run-time) *prover-main-start-time*))) (when (first res) ; erfuellbar? (let ((*maintain-history-p* nil)) (cond (*keep-det-assertions-p* (announce "Now computing deterministic assertions") (delete-non-det-assertions *cur-abox*) (when *compute-core-model-p* (announce "Now computing core model") (compute-core-model *cur-abox*)) (when *store-instance-retrieval-model-p* (let ((root-node (find-node *cur-abox* 1))) (unless root-node (error "root node?!")) (announce "Now making instance retrieval models for ~A" (first (last (told-concepts root-node)))) (unless (core-model root-node) (error "no core model for root node?")) (announce "Adding ~A (core model of root node) as instance retrieval model of concept ~A" (core-model root-node) (first (last (told-concepts root-node)))) (setf (instance-retrieval-model (first (last (told-concepts root-node)))) (core-model root-node)))) ;;; ist richtig, denn die beibehaltenen Assertionen ;;; erscheinen nun auf TOLD CONCEPTS! (loop-over-abox-nodes (node abox) (setf (slot-value node 'choice-points) nil) (setf (slot-value node 'initial-concept) nil) (reset-label (description node)))) ((not *maintain-prover-state-p*) ,(if rollback-code `(progn ,@rollback-code) `(rollback)))))) (incf ,(intern (format nil "*TIME-SPEND-IN-PROVER-INIT-~A-~A*" prover-name language-type)) (- (get-internal-run-time) start-time)) (values-list res)))))))))) ;;; ;;; MAIN ;;; ,@(when main-code `(,@(unless (member (first main-code) '(:copy :inherit-from :call-next-method)) `((defmethod get-main-code ((name (eql (quote ,prover-name))) (language ,language-type) (abox ,abox-type)) (quote ,main-code)))) ,@(when (eq (first main-code) :call-next-method) `((defmethod get-main-code ((name (eql (quote ,prover-name))) (language ,language-type) (abox ,abox-type)) (call-next-method)))) (defmethod prover-main ((name (eql (quote ,prover-name))) (language ,language-type) (abox ,abox-type) &key (level 0) ,@(rest keylist) &allow-other-keys) (declare (ignorable ,@keys)) (setf *abox* abox) (unless *prover-main-start-time* ; bei der ersten Inkarnation setzen (setf *prover-main-start-time* (get-internal-run-time)) (unless *prover-init-start-time* (error "No prover init start time?!")) (unless ,(intern (format nil "*TIME-SPEND-IN-PROVER-INIT-BEFORE-MAIN-~A-~A*" prover-name language-type)) (error "!")) (incf ,(intern (format nil "*TIME-SPEND-IN-PROVER-INIT-BEFORE-MAIN-~A-~A*" prover-name language-type)) (- (get-internal-run-time) *prover-init-start-time*))) (let ((level (1+ level)) (next-round-p t) (round 0) (return-value nil)) (declare (ignorable next-round-p level)) (loop while next-round-p do (incf round) (setf next-round-p nil) (when (or *debug-p* (and *show-prover-incarnations-p* (= 1 level))) (show-incarnation-info 'prover-main)) (when *debug-p* (format t "~%~%-----------------------------------------------------------------------------------") (format t "~%**** INCARNATION LEVEL ~A, ROUND ~A OF PROVER ~A *****~%~%" level round ',language-type) (describe-object abox t) (loop-over-abox-nodes (node abox) (describe-object node t) (terpri) (terpri))) (setf return-value (multiple-value-list (progn ,@(cond ((member (first main-code) '(:copy :call-next-method)) (get-main-code prover-name *language-dispatcher* *abox-dispatcher*)) ((eq (first main-code) :inherit-from) (get-main-code prover-name (make-language (second main-code)) (make-instance (third main-code) :dont-initialize t))) (t main-code))))) finally return (values-list return-value) ))))) ;;; ;;; SUCCESS ;;; ,@(when success-code `(,@(unless (member (first success-code) '(:copy :inherit-from :call-next-method)) `((defmethod get-success-code ((name (eql (quote ,prover-name))) (language ,language-type) (abox ,abox-type)) (quote ,success-code)))) ,@(when (eq (first success-code) :call-next-method) `((defmethod get-success-code ((name (eql (quote ,prover-name))) (language ,language-type) (abox ,abox-type)) (call-next-method)))) (defmethod prover-success ((name (eql (quote ,prover-name))) (language ,language-type) (abox ,abox-type) &key ,@(rest keylist) &allow-other-keys) (declare (ignorable ,@keys)) (setf (slot-value abox 'satisfiable) t) ,@(cond ((member (first success-code) '(:copy :call-next-method)) (get-success-code prover-name *language-dispatcher* *abox-dispatcher*)) ((eq (first success-code) :inherit-from) (get-success-code prover-name (make-language (second success-code)) (make-instance (third success-code) :dont-initialize t))) (t success-code)))))))) ;;; ;;; ;;; (defmacro perform ( ( expansion-type &rest args &key abox-type language-type &allow-other-keys) &body body ) (let ((positive-code (rest (assoc :positive body))) (negative-code (rest (assoc :negative body))) (body (rest (assoc :body body))) (after-successful-clash-repair (rest (assoc :after-successful-clash-repair body))) (abox (if abox-type (make-instance abox-type :dont-initialize t) *abox-dispatcher*)) (language (if language-type (make-instance language-type :dont-initialize t) *language-dispatcher*))) `(unless next-round-p (block prover ,(apply (symbol-function (intern (string-upcase (format nil "get-code-for-~A" expansion-type)))) language abox :positive-code positive-code :negative-code negative-code :after-successful-clash-repair-code after-successful-clash-repair :body-code body args))))) (defmacro perform! ( ( expansion-type &rest args &key abox-type language-type &allow-other-keys) &body body ) (let ((positive-code (rest (assoc :positive body))) (negative-code (rest (assoc :negative body))) (body (rest (assoc :body body))) (after-successful-clash-repair (rest (assoc :after-successful-clash-repair body))) (abox (if abox-type (make-instance abox-type :dont-initialize t) *abox-dispatcher*)) (language (if language-type (make-instance language-type :dont-initialize t) *language-dispatcher*))) `(unless next-round-p (block prover ,(apply (symbol-function (intern (string-upcase (format nil "get-code-for-~A!" expansion-type)))) language abox :positive-code positive-code :negative-code negative-code :after-successful-clash-repair-code after-successful-clash-repair :body-code body args))))) ;;; ;;; ;;; (defmacro rollback () `(rollback-to abox rollback-to-action)) (defmacro success () `(prover-success name language abox)) (defmacro start-main () `(prover-main name language abox)) (defmacro restart-main () `(prover-main name language abox :level level)) (defmacro next-round () `(setf next-round-p t)) ;;; ;;; ;;; (defmacro completion-found () `(progn (announce "COMPLETION FOUND!~%~%") (let ((bad-nodes (remove-if #'(lambda (x) (or (not (active-p x)) (complete-p x) (blocked-p x) (cache-satisfiable-p x))) (get-nodes abox)))) (when (some #'(lambda (x) (and (active-p x) (blocked-p x))) (get-nodes abox)) (error "Strategy error!")) (when bad-nodes (dolist (node bad-nodes) (describe-object node t)) (error "Strategy error: Nodes ~A are not complete" bad-nodes))) (cond (*visualize-p* (visualize abox) (break)) (*completion-found-hook* (funcall *completion-found-hook* abox))) (when (and *break-p* (not *visualize-p*)) (break)) (when *compute-all-completions-p* (push (copy abox) *completions*) (when (and *how-many* (>= (length *completions*) *how-many*)) (throw 'exit t))) t))
41,428
Common Lisp
.lisp
668
29.769461
149
0.364159
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
52bb2a94fa7083213812d89a61745f6d499ab1d4eddda1ebb8cb9d08ee34eeab
12,537
[ -1 ]
12,538
bug.lisp
lambdamikel_DLMAPS/src/prover/bug.lisp
(define-primitive-role r1) (define-primitive-role r2) (define-primitive-role r3) (define-primitive-role r4) (define-primitive-role r5) (define-primitive-role r6) (define-primitive-role r7) (define-primitive-role r8) (define-primitive-role r9) (define-primitive-role r10) (define-primitive-concept c0 TOP) (define-primitive-concept c1 (and (all r3 c0) (at-least 1 r8) (at-most 8 r2))) (define-primitive-concept c2 TOP) (define-primitive-concept c3 (and (at-least 5 r9))) (define-concept c4 (and c2 (at-least 2 r8))) (define-primitive-concept c5 (and c3 (at-least 4 r10) (at-most 6 r2))) (define-primitive-concept c6 (and c2 (at-most 5 r6))) (define-concept c7 (and c3 (at-least 2 r7) (at-most 9 r10))) (define-primitive-concept c8 (and c3 (all r8 c0) (at-most 6 r8))) (define-concept c9 (and c2 c1 (all r8 c2) (at-most 5 r2))) (define-primitive-concept c10 (and c3 (all r1 c0) (at-most 5 r7))) (define-primitive-concept c11 (and c3 (all r3 c1) (at-least 4 r5) (at-most 6 r9))) (define-primitive-concept c12 (and c1 (all r8 c0) (at-least 2 r3))) (define-primitive-concept c13 (and c10 (all r8 c5) (at-most 5 r4))) (define-primitive-concept c14 (and c6 c5 (all r1 c3))) (define-primitive-concept c15 (and c11 c12 (all r1 c0) (at-least 4 r2))) (define-primitive-concept c16 (and c12 c8 (all r7 c10) (all r9 c1) (at-least 4 r3) (at-most 5 r2))) (define-primitive-concept c17 (and c4 c8 (all r6 c9) (all r4 c4) (at-least 4 r6))) (define-primitive-concept c18 (and c10 (all r2 c6) (at-least 3 r2))) (define-primitive-concept c19 (and c6 (all r4 c8) (at-least 2 r9))) (define-primitive-concept c20 (and c3 c10 (at-least 1 r8) (at-most 7 r10))) (define-primitive-concept c21 (and c5 c10 (all r8 c2) (at-least 1 r10))) (define-primitive-concept c22 (and c7 c4 (all r4 c5))) (define-concept c23 (and c12 (all r5 c8))) (define-concept c24 (and c8 (all r6 c0))) (define-primitive-concept c25 (and c5 c12 (all r5 c7) (all r4 c4) (at-least 5 r8))) (define-primitive-concept c26 (and c8 (all r3 c8) (at-most 5 r3))) (define-primitive-concept c27 (and c11 (all r8 c4) (at-least 5 r6))) (define-primitive-concept c28 (and c11 (all r6 c1))) (define-concept c29 (and c7 c11 (all r8 c8) (all r1 c5) (at-least 4 r5) (at-most 8 r10))) (define-primitive-concept c30 (and c12 (at-least 5 r5) (at-most 5 r2))) (define-primitive-concept c31 (and c5 c11 (all r1 c5) (all r7 c5) (at-least 4 r3) (at-most 7 r10))) (define-primitive-concept c32 (and c2 c10 (all r1 c0) (all r10 c12) (at-least 4 r8) (at-most 8 r9))) (define-primitive-concept c33 (and c7 (all r8 c6) (all r3 c3) (at-least 2 r2) (at-most 7 r1))) (define-concept c34 (and c6 (at-least 4 r6) (at-most 9 r10))) (define-primitive-concept c35 (and c8 (at-least 1 r8))) (define-primitive-concept c36 (and c9 (all r6 c2) (at-least 3 r3))) (define-concept c37 (and c12 (all r6 c0) (at-most 6 r3))) (define-primitive-concept c38 (and c11 (all r7 c8) (all r3 c7))) (define-concept c39 (and c11 (all r9 c12) (at-least 3 r7))) (define-primitive-concept c40 (and c38 (all r6 c14))) (define-primitive-concept c41 (and c13 (all r6 c2) (at-most 9 r8))) (define-primitive-concept c42 (and c14 (all r6 c19) (all r9 c15) (at-most 7 r1))) (define-primitive-concept c43 (and c28 (all r1 c17) (at-least 2 r8) (at-most 9 r5))) (define-primitive-concept c44 (and c35 (all r5 c35) (at-least 1 r5))) (define-primitive-concept c45 (and c15 (all r6 c3) (at-most 8 r5))) (define-primitive-concept c46 (and c3 c28 (at-most 7 r3))) (define-primitive-concept c47 (and c29 c23)) (define-primitive-concept c48 (and c27 (at-least 5 r9))) (define-primitive-concept c49 (and c18 (all r9 c38) (at-most 8 r4))) (define-primitive-concept c50 (and c19 (at-least 1 r2))) (define-primitive-concept c51 (and c22 (at-least 5 r10))) (define-primitive-concept c52 (and c33 c32 (at-most 5 r5))) (define-primitive-concept c53 (and c6 c23 (at-least 2 r2) (at-most 5 r6))) (define-primitive-concept c54 (and c39 c23 (all r8 c8))) (define-concept c55 (and c7 c24 (at-least 1 r2) (at-most 9 r1))) (define-primitive-concept c56 (and c39 (all r5 c17) (at-most 8 r8))) (define-primitive-concept c57 (and c25 c36 (all r1 c28) (at-least 2 r2) (at-most 8 r10))) (define-primitive-concept c58 (and c29 c34 (at-most 8 r4))) (define-concept c59 (and c35 (all r2 c34))) (define-primitive-concept c60 (and c32 c34 (all r6 c3) (all r10 c32) (at-most 9 r8))) (define-concept c61 (and c32 (all r9 c5))) (define-primitive-concept c62 (and c23 c35 (at-least 1 r10))) (define-concept c63 (and c22 (all r1 c38) (at-least 5 r2) (at-most 8 r8))) (define-primitive-concept c64 (and c33 c39 (all r1 c28) (at-least 5 r1) (at-most 5 r6))) (define-primitive-concept c65 (and c38 (all r3 c25) (at-least 5 r7) (at-most 8 r5))) (define-primitive-concept c66 (and c26 (all r8 c22) (at-most 6 r1))) (define-primitive-concept c67 (and c23 (at-most 6 r4))) (define-primitive-concept c68 (and c16 c15 (all r7 c14) (all r1 c39))) (define-primitive-concept c69 (and c34 (all r8 c2) (all r4 c27) (at-least 3 r4))) (define-concept c70 (and c23 (at-most 6 r3))) (define-primitive-concept c71 (and c15 c29 (at-most 8 r8))) (define-primitive-concept c72 (and c7 c17 (all r4 c34) (at-most 5 r7))) (define-primitive-concept c73 (and c17 (all r9 c12) (all r4 c0) (at-most 9 r9))) (define-primitive-concept c74 (and c5 c34 (all r7 c7) (at-least 1 r1))) (define-primitive-concept c75 (and c35 (at-least 1 r4))) (define-primitive-concept c76 (and c32 (all r7 c29) (all r9 c26) (at-least 2 r5))) (define-primitive-concept c77 (and c30 c17 (at-least 3 r5))) (define-primitive-concept c78 (and c21 (at-least 5 r1))) (define-primitive-concept c79 (and c18 c22 (all r7 c13) (all r2 c28) (at-least 1 r8))) (define-primitive-concept c80 (and c27 c22 (all r3 c27) (at-most 7 r6))) (define-concept c81 (and c23 c29 (all r3 c1) (at-least 2 r10))) (define-concept c82 (and c22 c39 (all r7 c6) (at-least 2 r1))) (define-primitive-concept c83 (and c18)) (define-concept c84 (and c3 c27 (at-least 2 r6))) (define-primitive-concept c85 (and c21)) (define-concept c86 (and c39 (at-least 3 r5) (at-most 7 r2))) (define-primitive-concept c87 (and c11 c32 (all r3 c23) (all r8 c19))) (define-primitive-concept c88 (and c27 (all r8 c9) (at-least 3 r9))) (define-primitive-concept c89 (and c37 c36 (at-least 5 r9) (at-most 5 r6))) (define-concept c90 (and c18 (at-most 9 r2))) (define-concept c91 (and c38 c16 (all r3 c14) (all r2 c12))) (define-primitive-concept c92 (and c31 (at-least 4 r2))) (define-primitive-concept c93 (and c26 (all r4 c20) (at-least 3 r8))) (define-primitive-concept c94 (and c14 (at-least 4 r9))) (define-primitive-concept c95 (and c15 c33 (at-least 5 r6) (at-most 5 r4))) (define-primitive-concept c96 (and c3 c36 (all r8 c21) (at-most 5 r4))) (define-primitive-concept c97 (and c20 c23 (all r6 c2) (at-least 5 r10))) (define-primitive-concept c98 (and c30 c15 (at-most 5 r2))) (define-primitive-concept c99 (and c19 (all r3 c19))) (define-concept c100 (and c26 (all r6 c10) (at-most 6 r5))) (define-concept c101 (and c13 (all r5 c14) (all r7 c20) (at-least 1 r3) (at-most 9 r10))) (define-concept c102 (and c24 c13 (at-most 7 r8))) (define-concept c103 (and c35 (at-least 5 r9) (at-most 8 r5))) (define-primitive-concept c104 (and c12 c27 (all r4 c30) (all r9 c17) (at-least 1 r1) (at-most 8 r7))) (define-primitive-concept c105 (and c31 (all r1 c17) (at-least 1 r7)))
9,321
Common Lisp
.lisp
397
17.413098
36
0.569155
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
fed3ee82765b449e6cf6ba92dbdfce5cb644ac25762639d9ee7df3c5e76430ab
12,538
[ -1 ]
12,539
wine-food.lisp
lambdamikel_DLMAPS/src/prover/wine-food.lisp
(IN-TBOX |/home/mi.wessel/Racer/examples/examples/wine-food/wine.owl| :SIZE 200 :ROLE-SIZE 30) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2000/01/rdf-schema#comment| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2002/07/owl#comment| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2000/01/rdf-schema#seeAlso| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2002/07/owl#seeAlso| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2000/01/rdf-schema#isDefinedBy| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2002/07/owl#isDefinedBy| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2000/01/rdf-schema#label| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2002/07/owl#label| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2002/07/owl#versionInfo| :RANGE STRING) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#madeFromFruit| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PotableLiquid|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#course| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meal| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|) (DEFINE-PRIMITIVE-ATTRIBUTE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| :PARENTS |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasWineDescriptor| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor|) (DEFINE-PRIMITIVE-ATTRIBUTE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| :PARENTS |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasWineDescriptor| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineBody|) (DEFINE-PRIMITIVE-ATTRIBUTE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| :PARENTS |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasWineDescriptor| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineFlavor|) (DEFINE-PRIMITIVE-ATTRIBUTE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| :PARENTS |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasWineDescriptor| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineSugar|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| :PARENTS |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#madeFromFruit| :INVERSE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeIntoWine| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineGrape|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| :TRANSITIVE T :DOMAIN TOP :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#adjacentRegion| :INVERSE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#adjacentRegion| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region|) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#yearValue| :RANGE CARDINAL) (DEFINE-PRIMITIVE-ATTRIBUTE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasVintageYear| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Vintage| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#VintageYear|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeIntoWine| :PARENTS #:|http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#madeFromFruit-INV-50310| :INVERSE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineGrape| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasWineDescriptor| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineDescriptor|) (DEFINE-PRIMITIVE-ATTRIBUTE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasMaker| :INVERSE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#producesWine|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#producesWine| :INVERSE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasMaker|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Winery| *TOP*) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing| *TOP*) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#VintageYear| *TOP*) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region| *TOP*) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LoireRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BourgogneRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BordeauxRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ZinfandelGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ToursRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RieslingGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#StEmilionRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SancerreRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotNoirGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlancGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteSyrahGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PauillacRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MedocRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MuscadetRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MeursaultRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFrancGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MalbecGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteVerdotGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MargauxRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ItalianRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#GermanyRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#GamayGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#FrenchRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CotesDOrRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlancGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ChardonnayGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CaliforniaRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TexasRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BeaujolaisRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AnjouRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#USRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AlsaceRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Full|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Strong|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Light|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Delicate|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Sweet|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OffDry|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Juice| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#madeFromFruit| *TOP*) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PotableLiquid|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#EarlyHarvest| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry|)) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LateHarvest|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EatingGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Grape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauterneRegion|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sauternes| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauterneRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LateHarvest| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux|)) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PortugalRegion|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Port| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PortugalRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine|)) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ChiantiRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SangioveseGrape|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Chianti| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SangioveseGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ChiantiRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ItalianWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor| (AND (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Rose| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineDescriptor|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Rose| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor|) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineDescriptor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineTaste| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineTaste| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineDescriptor|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineBody|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineBody| (AND (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineTaste|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineBody|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineBody|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineFlavor|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineFlavor| (AND (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineTaste|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineFlavor|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineFlavor|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineSugar|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineSugar| (AND (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineTaste|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineSugar|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineSugar|) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonConsumableThing| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Vintage| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasVintageYear| *TOP*)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruitCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OffDry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Delicate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse| (AND (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SpicyRedMeat|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SpicyRedMeatCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeat|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeatCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Seafood|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SeafoodCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Shellfish|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ShellfishCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#BlandFish|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#BlandFishCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#CheeseNutsDessert|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#CheeseNutsDessertCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DarkMeatFowl|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DarkMeatFowlCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetDessert|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetDessertCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dessert|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DessertCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fish|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#FishCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#FruitCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#LightMeatFowl|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#LightMeatFowlCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonBlandFish|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonBlandFishCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonOysterShellfish|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonOysterShellfishCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonRedMeat|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonRedMeatCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSpicyRedMeat|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSpicyRedMeatCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruit|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruitCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruit|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruitCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFoodCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OysterShellfish|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OysterShellfishCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithHeavyCreamSauce|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithHeavyCreamCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithLightCreamSauce|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithLightCreamCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithNonSpicyRedSauce|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithNonSpicyRedSauceCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithSpicyRedSauce|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithSpicyRedSauceCourse|) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Wine|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| *TOP*) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| *TOP*) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meal| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#course| *TOP*) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PotableLiquid| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meal|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruit| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruit| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruit| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruit|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithWhiteSauce| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithLightCreamSauce| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithWhiteSauce|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithHeavyCreamSauce| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithLightCreamSauce|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithWhiteSauce|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithRedSauce| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithWhiteSauce|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithSpicyRedSauce| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithRedSauce|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithNonSpicyRedSauce| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithRedSauce| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithSpicyRedSauce|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meat| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonRedMeat| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meat|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeat| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meat| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonRedMeat|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSpicyRedMeat| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeat|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SpicyRedMeat| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeat| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSpicyRedMeat|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Grape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruit|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Grape|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Beaujolais| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BeaujolaisRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#GamayGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Wine| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BordeauxRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LoireRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BeaujolaisRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Beaujolais|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BourgogneRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Burgundy|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFrancGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFranc|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignon|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ChardonnayGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Chardonnay|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlancGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlanc|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteVerdotGrape|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MalbecGrape|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFrancGrape|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|))) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Meritage|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Merlot|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteSyrahGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteSyrah|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlancGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlanc|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotNoirGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotNoir|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RieslingGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Riesling|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonGrape|))) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonOrSauvignonBlanc|) (OR (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ZinfandelGrape|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Zinfandel|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| *TOP*) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| *TOP*) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| *TOP*) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| *TOP*) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| *TOP*) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasMaker| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Winery|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasMaker| *TOP*) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PotableLiquid|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Wine|) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AlsatianWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AlsaceRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AmericanWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#USRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFranc| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFrancGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignon| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TexasWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TexasRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CaliforniaWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CaliforniaRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Chardonnay| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ChardonnayGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlanc| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlancGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TableWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TableWine|) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#FrenchWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#FrenchRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#FullBodiedWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Gamay| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#GamayGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#GermanWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#GermanyRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ItalianWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ItalianRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LateHarvest| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DessertWine| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#IceWine| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LateHarvest|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#IceWine| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DessertWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LateHarvest|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Meritage| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteVerdotGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MalbecGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFrancGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Merlot| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteSyrah| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteSyrahGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlanc| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlancGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotNoir| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotNoirGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RoseWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Rose|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonOrSauvignonBlanc| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonGrape|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Semillon| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonOrSauvignonBlanc|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlanc| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonOrSauvignonBlanc|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SweetRiesling| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DessertWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Riesling|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Riesling| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryRiesling|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SweetRiesling|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RieslingGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryRiesling| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Riesling|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SweetWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Zinfandel| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ZinfandelGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TableWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryRedWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TableWine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedTableWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryRedWine|) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryWhiteWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TableWine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteTableWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryWhiteWine|) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteNonSweetWine| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AnjouRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Anjou|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MuscadetRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Muscadet|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SancerreRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sancerre|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ToursRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Tours|) (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteLoire| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LoireRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteLoire| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlancGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlancGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Tours| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlancGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ToursRegion|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sancerre| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SancerreRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Muscadet| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MuscadetRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlancGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Anjou| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AnjouRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Rose|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MedocRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medoc|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#StEmilionRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#StEmilion|) (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteBordeaux| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BordeauxRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteBordeaux| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonGrape|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#StEmilion| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#StEmilionRegion|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedBordeaux| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine| (AND (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedBordeaux| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedBurgundy| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CotesDOrRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CotesDOr|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotNoirGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Burgundy|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Burgundy| (AND (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedBurgundy| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine|)) (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteBurgundy| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BourgogneRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteBurgundy| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MeursaultRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Meursault|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ChardonnayGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Burgundy| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Meursault| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MeursaultRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteBurgundy|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CotesDOr| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CotesDOrRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedBurgundy|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryRedWine| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medoc| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MargauxRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Margaux|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PauillacRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Pauillac|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MedocRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Pauillac| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PauillacRegion|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medoc|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Margaux| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MargauxRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medoc|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryWhiteWine| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Wine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fowl| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meat|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#LightMeatFowl| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fowl|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DarkMeatFowl| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fowl| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#LightMeatFowl|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dessert| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fowl|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meat|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetDessert| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dessert|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#CheeseNutsDessert| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetDessert|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dessert|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Seafood| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dessert|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fowl|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meat|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fish| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Seafood|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonBlandFish| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fish|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#BlandFish| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fish| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonBlandFish|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Shellfish| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Seafood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fish|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OysterShellfish| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Shellfish|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonOysterShellfish| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Shellfish| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OysterShellfish|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithSpicyRedSauceCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Strong|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Full|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithSpicyRedSauce|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithNonSpicyRedSauceCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithNonSpicyRedSauce|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithLightCreamCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Delicate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Light|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithLightCreamSauce|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithHeavyCreamCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithHeavyCreamSauce|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OysterShellfishCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Sweet|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OysterShellfish|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFoodCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruitCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Sweet|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSpicyRedMeatCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Strong|))) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSpicyRedMeat|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonRedMeatCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Strong|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonRedMeat|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonOysterShellfishCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonOysterShellfish|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonBlandFishCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonBlandFish|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#LightMeatFowlCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#LightMeatFowl|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#FruitCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#FishCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fish|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DessertCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Sweet|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Strong|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Full|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dessert|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetDessertCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetDessert|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DarkMeatFowlCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Delicate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Light|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DarkMeatFowl|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#CheeseNutsDessertCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#CheeseNutsDessert|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#BlandFishCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Delicate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#BlandFish|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ShellfishCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Strong|))) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Full|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Shellfish|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SeafoodCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Seafood|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeatCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeat|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SpicyRedMeatCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Full|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SpicyRedMeat|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|))
91,205
Common Lisp
.lisp
231
392.82684
5,946
0.744454
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
2a6717efee9603794f36fac1d1fab2ffe16c133c5aaae75d218ec3288dabb433
12,539
[ -1 ]
12,540
abox-enumeration.lisp
lambdamikel_DLMAPS/src/prover/abox-enumeration.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defrule abox-enumeration (dl abox) (let* ((sat nil) (collected-dependencies nil) (count 0) (underspecified-edges (edge-gen abox)) (underspecified-edges-and-inverses (remove nil (append underspecified-edges (mapcar #'inverse-edge underspecified-edges )))) (clash-p nil) (successfully-repaired-p nil) (end-loop-p nil) (choice-points nil) (memorized-action (get-current-action))) (if (not underspecified-edges) +insert-body-code+ (let ((abox (first-completion abox))) (unless abox (error "No completion! How do I handle this?")) (loop (incf count) (announce "Performing ABOX ENUMERATION OF ~A ON LEVEL ~A, ALTERNATIVE NO. ~A.~%DISJUNCTIVE EDGES: ~A~%CHOICE-POINTS OF DISJUNCTIVE EDGES: ~A~%" abox level count underspecified-edges choice-points) (when *debug-p* (format t "~%~%Underspecified Edges:~%") (dolist (edge underspecified-edges) (describe-object edge t) (terpri)) (format t "~%~%Edges and Inverses:~%") (dolist (edge underspecified-edges) (describe-object edge t) (terpri) (when (inverse-edge edge) (describe-object (inverse-edge edge) t) (terpri) (Terpri))) (terpri)) (if (or end-loop-p (and sat (not *compute-all-completions-p*))) (progn ;;; Vorherigen Enumeration Context herstellen! (announce "*** EXITING LEVEL ~A" level) (pop-description-stack abox) (return-from prover (if sat t (values sat (set-difference collected-dependencies choice-points))))) (progn (when (zerop (1- count)) (setf choice-points ;; der neue Choicepoint wird automatisch auch f.d. Inverse registriert! (add-choice-points-for-edges abox underspecified-edges))) (announce "*** CHOICE POINTS OF DISJUNCTIVE EDGES: ~A~%ACTUAL CHOICE POINTS OF DISJ.EDGES: ~A" choice-points (mapcar #'get-choice-points underspecified-edges-and-inverses)) (multiple-value-bind (sub-sat deps) (if clash-p (if successfully-repaired-p (progn (announce "*** SUCCESSFULLY REPARIED CONSTRAINT SYSTEM ON LEVEL ~A!" level) (setf clash-p nil) +insert-after-successful-clash-repair-code+ ) (progn ;;; hier habe ich keine andere Wahl! ;;; da "local" nicht reparier werden kann, ;;; müssen alle Constraints die von den ;;; Kanten abhängen zurückgenommen werden (announce "*** LOCAL REPAIR OF CONSTRAINT SYSTEM ON LEVEL ~A FAILED!" level) (pop-description-stack abox) #+:use-dependency-directed-backtracking (progn (break "DEPENDENCY DIRECTED BACKTRACKING NOT FULLY UNDERSTOOD YET!") (dolist (edge underspecified-edges-and-inverses) (rollback-all-depending-on abox edge))) #-:use-dependency-directed-backtracking (let ((*use-unsat-cache-p* nil)) ; wichtig! ;;; simple backjumping (rollback-to abox memorized-action)) (return-from prover (if sat t (values nil (set-difference collected-dependencies choice-points)))))) +insert-body-code+ ) (when *debug-p* (announce "*** RETURNED TO ABOX ENUMERATION ON LEVEL ~A -> SUB-SAT: ~A, RETURNED CHOICE POINTS: ~A~%CHOICE POINTS OF DISJUNCTIVE EDGES: ~A~%ACTUAL CHOICE POINTS OF DISJ.EDGES: ~A" level sub-sat deps choice-points (mapcar #'get-choice-points underspecified-edges-and-inverses)) (when *debug-p* (format t "~%~%Underspecified Edges:~%") (dolist (edge underspecified-edges) (describe-object edge t) (terpri)) (format t "~%~%Edges and Inverses:~%") (dolist (edge underspecified-edges) (describe-object edge t) (terpri) (when (inverse-edge edge) (describe-object (inverse-edge edge) t) (terpri) (Terpri))) (terpri))) (setf sat (or sub-sat sat) clash-p nil) (if *compute-all-completions-p* (progn #+:use-dependency-directed-backtracking (progn (break "DEPENDENCY DIRECTED BACKTRACKING NOT FULLY UNDERSTOOD YET!") (dolist (edge underspecified-edges-and-inverses) (rollback-all-depending-on abox edge))) #-:use-dependency-directed-backtracking (let ((*use-unsat-cache-p* nil)) ;;; simple backjumping (rollback-to abox memorized-action)) (let ((next-abox (when (has-next-configuration-p abox) (next-completion abox)))) (setf abox (or next-abox abox)) (unless next-abox (announce "*** NO NEXT COMPLETION ON LEVEL ~A" level)) (unless next-abox (setf end-loop-p t)))) (unless sub-sat (setf clash-p t) (when (and deps choice-points (> (maximum deps) (maximum choice-points))) (error "*** Error in dependency management!")) (setf collected-dependencies (append deps collected-dependencies)) ;;; kanten identifizieren, die für den clash verantwortlich sind! (let ((deps (intersection deps choice-points))) (setf deps (mapcar #'(lambda (choice-point) (remove-if-not #'(lambda (edge) (member choice-point (get-choice-points edge))) underspecified-edges-and-inverses)) (sort-choice-points deps))) ;; (setf *x* abox) (announce "++++ POSSIBLE RESTART EDGES: ~A" deps) (let ((restart-points (block here (loop as dep in deps do (loop as restart-from in dep when (has-next-configuration-p abox :restart-from restart-from) do (return-from here (list dep restart-from))))))) (announce "++++ REMAINING RESTART EDGES: ~A" restart-points) ;;; (break "~A" restart-points) (cond (restart-points (announce "*** REPAIRING CONSTRAINT SYSTEM ON LEVEL ~A FROM ~A!" level restart-points) #+:use-dependency-directed-backtracking (progn (break "DEPENDENCY DIRECTED BACKTRACKING NOT FULLY UNDERSTOOD YET!") (dolist (dep (first restart-points)) (rollback-all-depending-on abox dep))) #-:use-dependency-directed-backtracking (progn (rollback-to abox memorized-action)) (announce "*** Stack: ~A~%*** Description Stack: ~A" (slot-value abox 'thematic-substrate::stack) (slot-value abox 'thematic-substrate::description-stack)) (let ((next-abox (next-completion abox :restart-from (second restart-points)))) (setf abox (or next-abox abox)) (setf successfully-repaired-p (when next-abox t)))) (t (setf successfully-repaired-p nil) (announce "*** UNABLED TO RESTART FROM ~A~%*** Stack: ~A~%*** Description Stack: ~A!" restart-points (slot-value abox 'thematic-substrate::stack) (slot-value abox 'thematic-substrate::description-stack)))))))))))))))) ;;; ;;; Der folgende Code wird benötigt, um Rollen-Disjunktionen ;;; in der ABOX aufzulösen ;;; (defmethod edge-setter ((edge abox-edge) (role simple-role) &key remaining &allow-other-keys) (declare (ignore remaining)) (change-textual-description (description edge) role) edge) (defmethod edge-gen ((abox abox) &key &allow-other-keys) (get-underspecified-edges abox :exclude-inverses-p t)) (defmethod sym-gen ((edge abox-edge) processed-edges &key &allow-other-keys) (declare (ignorable processed-edges)) (let ((role (textual-description (aux-description edge)))) (copy-list (arguments role)))) ;;; WICHTIG !! COPY-LIST !!! (defun selector-fn (rem-edges processed-edges &key &allow-other-keys) (declare (ignore processed-edges)) (first rem-edges)) (defmethod manager-fn ((sel-edge abox-edge) edges processed-edges &key &allow-other-keys) (values (remove sel-edge edges) (cons sel-edge processed-edges))) ;;; ;;; ;;; (defmethod role-consistent-p ((abox abox) &rest args) (declare (ignore args)) t) (defmethod enumerate-atomic-configurations ((abox abox) &rest args &key (edge-setter #'edge-setter) (respect-inverses-p t) (sym-gen #'sym-gen) (selector-fn #'selector-fn) (edge-gen #'edge-gen) (manager-fn #'manager-fn) (final-check-fn #'role-consistent-p) (fn #'(lambda (abox &rest args) (declare (ignore args)) abox)) &allow-other-keys) (apply #'call-next-method abox :save-node-labels-p nil :save-edge-labels-p t :edge-setter edge-setter :respect-inverses-p respect-inverses-p :edges (funcall edge-gen abox) :manager-fn manager-fn :final-check-fn final-check-fn :selector-fn selector-fn :sym-gen sym-gen :fn fn args)) ;;; ;;; ;;; (defmethod first-completion ((abox abox) &key &allow-other-keys) (enumerate-atomic-configurations abox :reset-p t)) (defmethod next-completion ((abox abox) &key restart-from) (enumerate-atomic-configurations abox :restart-from restart-from))
13,699
Common Lisp
.lisp
235
32.097872
211
0.467825
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
65fa9095631cf56ef880bd68dd816febcbd1ddeeac9f7bc2bd9cd42269c2a5a4
12,540
[ -1 ]
12,541
node-label2.lisp
lambdamikel_DLMAPS/src/prover/node-label2.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defpersistentclass node-label (node-description) ((textual-description :initform "Node-Label") (of-node :reader of-node :initarg :of-node) (unexpanded-atomic-concepts :initform nil :initarg :unexpanded-atomic-concepts) (unexpanded-all-concepts :initform nil :initarg :unexpanded-all-concepts) (unexpanded-and-concepts :initform nil :initarg :unexpanded-and-concepts) (unexpanded-or-concepts :initform nil :initarg :unexpanded-or-concepts) (unexpanded-some-concepts :initform nil :initarg :unexpanded-some-concepts) (unexpanded-attribute-exists-concepts :initform nil :initarg :unexpanded-attribute-exists-concepts) (unexpanded-at-least-concepts :initform nil :initarg :unexpanded-at-least-concepts) (unexpanded-at-most-concepts :initform nil :initarg :unexpanded-at-most-concepts) (expanded-atomic-concepts :initform nil :initarg :expanded-atomic-concepts) (expanded-all-concepts :initform nil :initarg :expanded-all-concepts) (expanded-and-concepts :initform nil :initarg :expanded-and-concepts) (expanded-or-concepts :initform nil :initarg :expanded-or-concepts) (expanded-some-concepts :initform nil :initarg :expanded-some-concepts) (expanded-attribute-exists-concepts :initform nil :initarg :expanded-attribute-exists-concepts) (expanded-at-least-concepts :initform nil :initarg :expanded-at-least-concepts) (expanded-at-most-concepts :initform nil :initarg :expanded-at-most-concepts))) (defmethod copy ((label node-label) &rest args) (declare (ignorable args)) (let ((copy (make-node-description 'node-label (textual-description label) :type (type-of label)))) (with-slots (of-node) copy (setf of-node (find-node copy (of-node label) :error-p t))) (dolist (slot '(unexpanded-atomic-concepts unexpanded-all-concepts unexpanded-and-concepts unexpanded-or-concepts unexpanded-some-concepts unexpanded-attribute-exists-concepts unexpanded-at-least-concepts unexpanded-at-most-concepts expanded-atomic-concepts expanded-all-concepts expanded-and-concepts expanded-or-concepts expanded-some-concepts expanded-attribute-exists-concepts expanded-at-least-concepts expanded-at-most-concepts)) (setf (slot-value copy slot) #+:use-avl-trees-for-labels (copy-tree (slot-value label slot)) #-:use-avl-trees-for-labels (copy-list (slot-value label slot)))) label)) ;;; ;;; ;;; (defmethod reset-label ((node-label node-label)) (with-slots (expanded-atomic-concepts expanded-some-concepts expanded-attribute-exists-concepts expanded-at-least-concepts expanded-at-most-concepts expanded-all-concepts expanded-and-concepts expanded-or-concepts unexpanded-atomic-concepts unexpanded-some-concepts unexpanded-attribute-exists-concepts unexpanded-at-least-concepts unexpanded-at-most-concepts unexpanded-all-concepts unexpanded-and-concepts unexpanded-or-concepts) node-label #+:use-membership-tables (dolist (slot '(expanded-atomic-concepts expanded-some-concepts expanded-attribute-exists-concepts expanded-at-least-concepts expanded-at-most-concepts expanded-all-concepts expanded-and-concepts expanded-or-concepts)) (dolist (concept (slot-value node-label slot)) (remhash (list concept node-label) *expanded-table*))) #+:use-membership-tables (dolist (slot '(unexpanded-atomic-concepts unexpanded-some-concepts unexpanded-attribute-exists-concepts unexpanded-at-least-concepts unexpanded-at-most-concepts unexpanded-all-concepts unexpanded-and-concepts unexpanded-or-concepts)) (dolist (concept (slot-value node-label slot)) (remhash (list concept node-label) *unexpanded-table*))) (setf expanded-atomic-concepts nil expanded-some-concepts nil expanded-attribute-exists-concepts nil expanded-at-least-concepts nil expanded-at-most-concepts nil expanded-all-concepts nil expanded-and-concepts nil expanded-or-concepts nil unexpanded-atomic-concepts nil unexpanded-some-concepts nil unexpanded-attribute-exists-concepts nil unexpanded-at-least-concepts nil unexpanded-at-most-concepts nil unexpanded-all-concepts nil unexpanded-and-concepts nil unexpanded-or-concepts nil))) ;;; ;;; ;;; (defmacro get-slot-for (concept slot-type) (ecase slot-type (expanded `(etypecase ,concept (atomic-concept 'expanded-atomic-concepts) (and-concept 'expanded-and-concepts) (or-concept 'expanded-or-concepts) (attribute-exists-concept 'expanded-attribute-exists-concepts) (some-concept 'expanded-some-concepts) (all-concept 'expanded-all-concepts) (at-least-concept 'expanded-at-least-concepts) (at-most-concept 'expanded-at-most-concepts))) (unexpanded `(etypecase ,concept (atomic-concept 'unexpanded-atomic-concepts) (and-concept 'unexpanded-and-concepts) (or-concept 'unexpanded-or-concepts) (attribute-exists-concept 'unexpanded-attribute-exists-concepts) (some-concept 'unexpanded-some-concepts) (all-concept 'unexpanded-all-concepts) (at-least-concept 'unexpanded-at-least-concepts) (at-most-concept 'unexpanded-at-most-concepts))))) ;;; ;;; ;;; #-:use-membership-tables (defmacro concept-member (label concept slot) `(let ((slot (get-slot-for ,concept ,slot))) #+:use-avl-trees-for-labels (find-in-avl-tree ,concept (slot-value ,label slot) :key #'id) #-:use-avl-trees-for-labels (member ,concept (slot-value ,label slot)))) #+:use-membership-tables (defmacro concept-member (label concept slot) `(ecase ',slot (expanded (gethash (list ,concept ,label) *expanded-table*)) (unexpanded (gethash (list ,concept ,label) *unexpanded-table*)))) ;;; ;;; ;;; (defmethod make-node-description ((class (eql 'node-label)) descr &rest args &key type &allow-other-keys) (apply #'make-instance (or type class) :textual-description descr :constructor-sym 'node-label :allow-other-keys t args)) ;;; ;;; ;;; (defmethod has-unexpanded-concepts-p ((label node-label) &optional (consider-cluster-p t)) (declare (ignorable consider-cluster-p)) (some #'(lambda (slot) (slot-value label slot)) '(unexpanded-atomic-concepts unexpanded-some-concepts unexpanded-all-concepts unexpanded-and-concepts unexpanded-or-concepts unexpanded-attribute-exists-concepts unexpanded-at-least-concepts unexpanded-at-most-concepts))) (defmethod has-expanded-concepts-p ((label node-label) &optional (consider-cluster-p t)) (declare (ignorable consider-cluster-p)) (some #'(lambda (slot) (slot-value label slot)) '(expanded-atomic-concepts expanded-some-concepts expanded-all-concepts expanded-and-concepts expanded-or-concepts expanded-attribute-exists-concepts expanded-at-least-concepts expanded-at-most-concepts))) ;;; ;;; ;;; (defmethod has-unexpanded-and-concepts-p ((label node-label) &optional (consider-cluster-p t)) (declare (ignorable consider-cluster-p)) (slot-value label 'unexpanded-and-concepts)) (defmethod has-unexpanded-atomic-concepts-p ((label node-label) &optional (consider-cluster-p t)) (declare (ignorable consider-cluster-p)) (slot-value label 'unexpanded-atomic-concepts)) (defmethod has-unexpanded-some-concepts-p ((label node-label) &optional (consider-cluster-p t)) (declare (ignorable consider-cluster-p)) (slot-value label 'unexpanded-some-concepts)) (defmethod has-unexpanded-all-concepts-p ((label node-label) &optional (consider-cluster-p t)) (declare (ignorable consider-cluster-p)) (slot-value label 'unexpanded-all-concepts)) (defmethod has-unexpanded-or-concepts-p ((label node-label) &optional (consider-cluster-p t)) (declare (ignorable consider-cluster-p)) (slot-value label 'unexpanded-or-concepts)) (defmethod has-unexpanded-attribute-exists-concepts-p ((label node-label) &optional (consider-cluster-p t)) (declare (ignorable consider-cluster-p)) (slot-value label 'unexpanded-attribute-exists-concepts)) (defmethod has-unexpanded-at-least-concepts-p ((label node-label) &optional (consider-cluster-p t)) (declare (ignorable consider-cluster-p)) (slot-value label 'unexpanded-at-least-concepts)) (defmethod has-unexpanded-at-most-concepts-p ((label node-label) &optional (consider-cluster-p t)) (declare (ignorable consider-cluster-p)) (slot-value label 'unexpanded-at-most-concepts)) ;;; ;;; ;;; (defmethod complete-p ((label node-label) &optional (consider-cluster-p t)) (declare (ignorable consider-cluster-p)) ;;; all und at-most bewusst ausgespart!! (with-slots (unexpanded-atomic-concepts unexpanded-some-concepts unexpanded-and-concepts unexpanded-or-concepts unexpanded-attribute-exists-concepts unexpanded-at-least-concepts) label (not (or unexpanded-atomic-concepts unexpanded-some-concepts unexpanded-and-concepts unexpanded-or-concepts unexpanded-attribute-exists-concepts unexpanded-at-least-concepts)))) ;;; ;;; Label Verwaltung ;;; (timed-defmethod add-to-unexpanded ((label node-label) (concept concept)) ;;; Position wichtig! (let* ((node (of-node label)) (abox (in-graph node))) (add-to-heaps abox node concept) #+:use-membership-tables (setf (gethash (list concept label) *unexpanded-table*) t) (let ((slot (get-slot-for concept unexpanded))) #+:use-avl-trees-for-labels (insert-into-avl-tree concept (slot-value label slot) :key #'id) #-:use-avl-trees-for-labels (push concept (slot-value label slot))) (unless (active-p node) (activate-node abox node)) (unregister-deterministically-expanded abox node) (adjust-blocking-dependencies abox node))) (timed-defmethod add-to-unexpanded ((label node-label) (list list)) (dolist (concept list) (add-to-unexpanded label concept))) ;;; ;;; ;;; (timed-defmethod add-to-expanded ((label node-label) (concept concept)) #+:use-membership-tables (setf (gethash (list concept label) *expanded-table*) t) (let ((slot (get-slot-for concept expanded))) #+:use-avl-trees-for-labels (insert-into-avl-tree concept (slot-value label slot) :key #'id) #-:use-avl-trees-for-labels (push concept (slot-value label slot)))) (timed-defmethod add-to-expanded ((label node-label) (list list)) (dolist (concept list) (add-to-expanded label concept))) ;;; ;;; ;;; (timed-defmethod delete-from-unexpanded ((label node-label) (concept concept)) #+:use-membership-tables (remhash (list concept label) *unexpanded-table*) (let ((slot (get-slot-for concept unexpanded))) #+:use-avl-trees-for-labels (delete-from-avl-tree concept (slot-value label slot) :key #'id) #-:use-avl-trees-for-labels (setf (slot-value label slot) (delete concept (slot-value label slot))) ;;; Position wichtig! (let* ((node (of-node label)) (abox (in-graph node))) (delete-from-heaps abox node concept)))) (timed-defmethod delete-from-unexpanded ((label node-label) (list list)) (dolist (concept list) (delete-from-unexpanded label concept))) ;;; ;;; ;;; (timed-defmethod delete-from-expanded ((label node-label) (concept concept)) #+:use-membership-tables (remhash (list concept label) *expanded-table*) (let ((slot (get-slot-for concept expanded))) #+:use-avl-trees-for-labels (delete-from-avl-tree concept (slot-value label slot) :key #'id) #-:use-avl-trees-for-labels (setf (slot-value label slot) (delete concept (slot-value label slot))))) (timed-defmethod delete-from-expanded ((label node-label) (list list)) (dolist (concept list) (delete-from-expanded label concept))) ;;; ;;; ;;; (timed-defmethod put-from-expanded-to-unexpanded ((concept concept) (label node-label)) (delete-from-expanded label concept) (add-to-unexpanded label concept)) (timed-defmethod put-from-unexpanded-to-expanded ((concept concept) (label node-label)) (delete-from-unexpanded label concept) (add-to-expanded label concept))
13,678
Common Lisp
.lisp
316
34.759494
107
0.662913
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
4db9fc6f82ef61365ab1b10dd6139c9dd2a559cea7770136937a622616fb448a
12,541
[ -1 ]
12,542
specials.lisp
lambdamikel_DLMAPS/src/prover/specials.lisp
;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; Verwaltungslisten/Heaps fuehren? nur fuer ABOX1-Klasse! ;;; STANDARDMAESSIG IST ALLES AUS!!! ;;; nur durch Strategie-Objekte werden Kontexte / Specials gesetzt! ;;; also dort aendern, s. strategy.lisp ;;; (defparameter *maintain-unexpanded-atomic-concepts-heap-p* nil) (defparameter *maintain-unexpanded-atomic-concepts1-heap-p* nil) (defparameter *maintain-unexpanded-and-concepts-heap-p* nil) (defparameter *maintain-unexpanded-and-concepts-heap1-p* nil) (defparameter *maintain-unexpanded-or-concepts-heap-p* nil) (defparameter *maintain-unexpanded-or-concepts1-heap-p* nil) (defparameter *maintain-unexpanded-some-concepts-heap-p* nil) (defparameter *maintain-unexpanded-some-concepts1-heap-p* nil) (defparameter *maintain-unexpanded-at-least-concepts-heap-p* nil) (defparameter *maintain-unexpanded-at-least-concepts1-heap-p* nil) (defparameter *maintain-unexpanded-attribute-exists-concepts-heap-p* nil) (defparameter *maintain-unexpanded-attribute-exists-concepts1-heap-p* nil) ;;; ;;; ;;; (defparameter *maintain-old-nodes-p* nil) (defparameter *maintain-leaf-nodes-p* nil) (defparameter *maintain-deactivated-nodes-p* nil) (defparameter *maintain-active-nodes-p* nil) (defparameter *maintain-cache-sat-nodes-p* nil) (defparameter *maintain-blocked-nodes-p* nil) ;;; ;;; Syntax ;;; (defparameter *cross-referencing-p* t) (defparameter *syntactic-consistency-checking-p* nil) (defparameter *syntactic-consistency-checking-of-some/all-conjuncts-p* nil) (defparameter *create-negated-concept-p* t) (defparameter *use-store-p* t) (defparameter *insert-into-store-p* t) (defvar *old-concept-p* nil) (defvar *create-inverse-role-p* t) ;;; ;;; f. Debugging-Zwecke: checken mit Racer ;;; beim Klassifizieren der TBOx ;;; (defparameter *racer-validation-p* nil) (defparameter *logging-p* nil) (defparameter *racer-tbox* 'racer-user::default) ;;; ;;; ;;; (defparameter *reflexive-checks-p* t) ;;; ;;; ;;; (defvar *start-time* 0) (defvar *abox-init-required-p* t) (defvar *time-for-node-creation* 0) (defvar *time-for-edge-creation* 0) (defvar *time-spend-in-undo* 0) (defvar *no-of-undos* 0) ;;; ;;; ;;; (defvar *rollback-active-p* nil) (defvar *maintain-history-p* nil) ;;; ;;; ;;; (defvar *how-many* nil) (defvar *debug-p* nil) (defvar *debug-node* nil) (defvar *debug-concept* nil) (defvar *announce-p* nil) (defvar *show-prover-incarnations-p* nil) (defvar *semantic-branching-p* t) (defvar *maintain-prover-state-p* nil) (defvar *check-if-still-blocked-p* t) (defvar *reuse-nodes-p* nil) (defvar *break-p* nil) (defvar *visualize-p* nil) (defvar *completion-found-hook* nil) (defvar *compute-all-completions-p* nil) (defvar *dont-invalidate-store-p* nil) ;;; ;;; ;;; (defvar *blocking-enabled-p* nil) (defvar *adjust-blocking-dependencies-p* t) (defvar *delete-nodes-p* nil) (defvar *combined-some-all-rule-p* nil) (defvar *propagation-of-transitive-all-concepts-p* nil) (defvar *dynamic-blocking-p* nil) ;;; ;;; Abox (Knoten)-Modelle ;;; (defparameter *store-ind-models-p* nil) (defparameter *max-no-of-ind-models-per-node* 3) ;;; ;;; Konzept-(Tableuax)-Modelle ;;; (defparameter *max-no-of-concept-models* 3) (defvar *use-told-subsumers-p* t) (defvar *compute-told-subsumers-p* t) (defvar *use-cached-models-p* t) (defvar *cache-models-p* t) (defvar *subtableau-caching-p* t) (defvar *use-unsat-cache-p* t) ;;; ;;; ;;; (defparameter *keep-det-assertions-p* nil) (defparameter *compute-core-model-p* nil) (defparameter *store-instance-retrieval-model-p* nil) ;;; ;;; ;;; (defvar *abox* nil) (defvar *clashes* nil) (defvar *strategy* nil) (defvar *temp-abox-name* 0) (defvar *completions* nil) (defvar *meta-constraints* nil) ;;; ;;; ;;; (defvar *abox-dispatcher* nil) (defvar *language-dispatcher* nil) ;;; ;;; ;;; (defvar *all-tboxes* nil) (defvar *node* nil) (defvar *nodes* nil) (defvar *concept* nil) (defvar *taxonomy* nil) ;;; ;;; ;;; (defvar *cur-store*) (defvar *atoms-store*) (defvar *and-store*) (defvar *or-store*) (defvar *some-store*) (defvar *all-store*) (defvar *at-least-store*) (defvar *at-most-store*) (defvar *roles-store*) #+:use-membership-tables (defvar *expanded-table*) #+:use-membership-tables (defvar *unexpanded-table*) ;;; ;;; ;;; (defvar *all-instance-tests* 0) (defvar *obvious-non-instance-hits* 0) (defvar *obvious-instance-hits* 0) (defvar *individual-instance-proofs* 0) ;;; ;;; ;;; (defvar *initial-concept-sat-cache-hits* 0) (defvar *initial-concept-unsat-cache-hits* 0) (defvar *initial-concept-sat-cache-queries* 0) (defvar *initial-concept-unsat-cache-queries* 0) (defvar *mm-queries* 0) (defvar *mm-hits* 0) (defvar *concept-queries* 0) (defvar *true-concept-queries* 0) (defvar *sat-cache-queries* 0) (defvar *sat-cache-hits* 0) (defvar *concept-mm-queries* 0) (defvar *concept-mm-hits* 0) (defvar *true-abox-consistency-tests* 0) (defvar *true-abox-subsumption-tests* 0) (defvar *blocked-nodes* 0) (defvar *created-nodes* 0) (defvar *subsumes-queries* 0) (defvar *true-subsumes-queries* 0) (defvar *subsumes-mm-hits* 0) (defvar *subsumes-ts-hits* 0) ;;; ;;; ;;; (defvar *language* nil) (defvar *cur-abox* nil) (defvar *cur-tbox* nil) ;;; ;;; ;;; (defvar *all-dls* nil) ;;; ;;; ;;; #+:use-membership-tables (defvar *create-membership-tables-p* t) #-:use-membership-tables (defvar *create-membership-tables-p* nil) (defvar *all-aboxes* nil) (defvar *avl-key-counter* 0) ;;; ;;; ;;; (defmacro with-prover-standard-settings (&body body) `(let ((*cross-referencing-p* t) (*syntactic-consistency-checking-p* t) (*syntactic-consistency-checking-of-some/all-conjuncts-p* nil) (*create-negated-concept-p* t) (*use-store-p* t) (*insert-into-store-p* t) (*create-inverse-role-p* t) (*old-concept-p* nil) (*semantic-branching-p* t) (*maintain-prover-state-p* nil) (*reuse-nodes-p* nil) (*compute-all-completions-p* nil) (*blocking-enabled-p* nil) (*delete-nodes-p* nil) (*combined-some-all-rule-p* nil) (*propagation-of-transitive-all-concepts-p* nil) (*dynamic-blocking-p* nil) (*store-ind-models-p* nil) (*max-no-of-ind-models-per-node* 3) (*max-no-of-concept-models* 3) (*use-told-subsumers-p* t) (*compute-told-subsumers-p* t) (*use-cached-models-p* t) (*cache-models-p* t) (*subtableau-caching-p* t) (*use-unsat-cache-p* t) (*keep-det-assertions-p* nil) (*compute-core-model-p* nil) (*store-instance-retrieval-model-p* nil)) ,@body)) (defparameter *prover-specials* (sort '(*strategy* *MAINTAIN-DEACTIVATED-NODES-P* *MAINTAIN-LEAF-NODES-P* *MAINTAIN-CACHE-SAT-NODES-P* *MAINTAIN-OLD-NODES-P* *MAINTAIN-ACTIVE-NODES-P* *MAINTAIN-BLOCKED-NODES-P* *MAINTAIN-UNEXPANDED-SOME-CONCEPTS-HEAP-P* *MAINTAIN-UNEXPANDED-SOME-CONCEPTS1-HEAP-P* *MAINTAIN-UNEXPANDED-AT-LEAST-CONCEPTS-HEAP-P* *MAINTAIN-UNEXPANDED-AT-LEAST-CONCEPTS1-HEAP-P* *MAINTAIN-UNEXPANDED-ATTRIBUTE-EXISTS-CONCEPTS-HEAP-P* *MAINTAIN-UNEXPANDED-ATTRIBUTE-EXISTS-CONCEPTS1-HEAP-P* *MAINTAIN-UNEXPANDED-ATOMIC-CONCEPTS-HEAP-P* *MAINTAIN-UNEXPANDED-ATOMIC-CONCEPTS1-HEAP-P* *MAINTAIN-UNEXPANDED-OR-CONCEPTS-HEAP-P* *MAINTAIN-UNEXPANDED-OR-CONCEPTS1-HEAP-P* *MAINTAIN-UNEXPANDED-AND-CONCEPTS-HEAP-P* *MAINTAIN-UNEXPANDED-AND-CONCEPTS-HEAP1-P* *MAINTAIN-PROVER-STATE-P* *cross-referencing-p* *syntactic-consistency-checking-p* *syntactic-consistency-checking-of-some/all-conjuncts-p* *create-negated-concept-p* *use-store-p* *insert-into-store-p* *old-concept-p* *create-inverse-role-p* *racer-validation-p* *logging-p* *racer-tbox* *start-time* *continuation-active-p* *time-for-node-creation* *time-for-edge-creation* *time-spend-in-undo* *no-of-undos* *how-many* *debug-p* *announce-p* *show-prover-incarnations-p* *semantic-branching-p* *maintain-prover-state-p* *reuse-nodes-p* *break-p* *visualize-p* *completion-found-hook* *compute-all-completions-p* *dont-invalidate-store-p* *blocking-enabled-p* *delete-nodes-p* *combined-some-all-rule-p* *propagation-of-transitive-all-concepts-p* *dynamic-blocking-p* *store-ind-models-p* *max-no-of-ind-models-per-node* *max-no-of-concept-models* *use-told-subsumers-p* *compute-told-subsumers-p* *use-cached-models-p* *cache-models-p* *subtableau-caching-p* *use-unsat-cache-p* *keep-det-assertions-p* *compute-core-model-p* *store-instance-retrieval-model-p* *abox* *temp-abox-name* *completions* *meta-constraints* *abox-dispatcher* *language-dispatcher* *all-tboxes* *node* *nodes* *concept* *taxonomy* *cur-store* *atoms-store* *and-store* *or-store* *some-store* *all-store* *at-least-store* *at-most-store* *roles-store* #+:use-membership-tables *expanded-table* #+:use-membership-tables *unexpanded-table* *initial-concept-sat-cache-hits* *initial-concept-unsat-cache-hits* *initial-concept-sat-cache-queries* *initial-concept-unsat-cache-queries* *mm-queries* *mm-hits* *concept-queries* *true-concept-queries* *sat-cache-queries* *sat-cache-hits* *concept-mm-queries* *concept-mm-hits* *true-abox-consistency-tests* *true-abox-subsumption-tests* *blocked-nodes* *created-nodes* *subsumes-queries* *true-subsumes-queries* *subsumes-mm-hits* *subsumes-ts-hits* *language* *cur-abox* *cur-tbox* *all-dls* #+:use-membership-tables *create-membership-tables-p* #-:use-membership-tables *create-membership-tables-p* *all-aboxes* *avl-key-counter*) #'string-lessp))
10,896
Common Lisp
.lisp
352
25.127841
75
0.646716
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
fcad23d68a7b9101ff4552a47295924fd3b65fcf45d4b4668ad8bb7d14f609ed
12,542
[ -1 ]
12,543
alci-ra-minus-prover.lisp
lambdamikel_DLMAPS/src/prover/alci-ra-minus-prover.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (eval-when (:compile-toplevel :load-toplevel :execute) (defpersistentclass rolebox-abox (abox rolebox-substrate))) ;;; ;;; ;;; (eval-when (:compile-toplevel :load-toplevel :execute) (defpersistentclass rolebox-abox-edge (rolebox-substrate-edge abox-edge))) (defmethod inverse-edge ((edge rolebox-abox-edge)) (slot-value edge 'inverse-edge)) ;;; ;;; ;;; (defun make-role-from-lookup-result (rbox res) (let ((*cur-rbox* rbox)) (when res (if (cdr res) (parse-role `(or ,@res)) (parse-role (first res)))))) (defmethod lookup ((substrate rolebox-abox) (r rolebox-abox-edge) (s rolebox-abox-edge)) (lookup (substrate-rbox substrate) (description r) (description s))) ; edge -> label (defmethod lookup ((rbox rolebox) (r edge-label) (s edge-label)) (lookup rbox (textual-description r) ; label -> role (textual-description s))) (defmethod lookup ((rbox rolebox) (r simple-role) (s simple-role)) (make-role-from-lookup-result rbox (lookup rbox (textual-description r) (textual-description s)))) (defmethod lookup ((rbox rolebox) (r or-role) (s or-role)) (make-role-from-lookup-result rbox (lookup rbox (rest (textual-description r)) ;; OR entfernen (rest (textual-description s))))) (defmethod lookup ((rbox rolebox) (r or-role) (s simple-role)) (make-role-from-lookup-result rbox (lookup rbox (rest (textual-description r)) (textual-description s)))) (defmethod lookup ((rbox rolebox) (r simple-role) (s or-role)) (make-role-from-lookup-result rbox (lookup rbox (textual-description r) (rest (textual-description s))))) ;;; ;;; ;;; (defmethod make-inverse-description ((rbox rolebox) (description edge-label)) (make-edge-description (type-of description) (or (get-inverse-role (textual-description description)) (break "No inverse role for ~A?" (textual-description description)) (get-inverse-role (textual-description description))))) ;;; ;;; ;;; (defmethod get-standard-node-class ((rolebox-abox rolebox-abox)) 'rolebox-abox-node) (defmethod get-standard-edge-class ((rolebox-abox rolebox-abox)) 'rolebox-abox-edge) ;;; ;;; ;;; (eval-when (:compile-toplevel :load-toplevel :execute) (defpersistentclass rolebox-abox-node (abox-node rolebox-substrate-node))) ;;; ;;; Überladen! Denn nun sind, dank der Role Box, alle inversen Kanten ;;; explizit verzeichnet ;;; (defmethod add-a-choice-point ((edge rolebox-abox-edge) choice-point &key &allow-other-keys) (push choice-point (slot-value edge 'choice-points)) (push choice-point (slot-value (description (inverse-edge edge)) 'choice-points))) (defmethod set-choice-points ((edge rolebox-abox-edge) choice-points &key &allow-other-keys) (let ((points (ensure-list choice-points))) (setf (slot-value edge 'choice-points) points) (setf (slot-value (description (inverse-edge edge)) 'choice-points) points))) (defmethod manager-fn ((sel-edge rolebox-abox-edge) edges processed-edges &rest args) (declare (ignorable edges processed-edges args)) (call-next-method)) (defmethod edge-setter ((edge rolebox-abox-edge) (role simple-role) &key remaining &allow-other-keys) (declare (ignore remaining)) (change-textual-description (description edge) role) (change-textual-description (description (inverse-edge edge)) (get-inverse-role role)) edge) ;;; ;;; ;;; (defmethod apply-rolebox-axioms ((substrate rolebox-abox) &rest args &key depends-on from-node &allow-other-keys) (apply #'call-next-method substrate :edge-constructor #'(lambda (from to comp &key support) (let ((edge (create-edge substrate from to (make-edge-description (get-standard-edge-description-class substrate) comp) :from-node from-node :depends-on (append depends-on support)))) edge)) args)) (defrule rolebox-application (alci-ra-minus rolebox-abox) (apply-rolebox-axioms abox) (when *debug-p* (announce "Edges after Rolebox Application: ") (dolist (edge (get-edges abox)) (describe-object edge t) (terpri)) (terpri)) +insert-body-code+) ;;; ;;; ;;; (define-prover ((abox-sat alci-ra-minus rolebox-abox)) (:init (start-main)) (:main (perform (rolebox-application) (:body (perform (abox-enumeration) (:body (perform (deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (some-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (success))))))))) (:after-successful-clash-repair (restart-main)))))) (:success (completion-found))) (defmethod reorder-ppi ((abox rolebox-abox)) (let* ((copy (copy abox)) (nodes (get-nodes copy)) (order nil) (*cur-rbox* +rcc5-rolebox+)) (with-abox* (abox) (loop while nodes do (let ((smallest (remove-if #'(lambda (n) (get-role-successors n (parse-role 'pp))) nodes))) (when (or (not smallest) (cdr smallest)) (break "~A No linear structure present! Tree structure? DAG?" smallest)) (let ((smallest (first smallest))) (delete-node copy smallest) (push smallest order) (setf nodes (remove smallest nodes))))) (scramble abox :new-order (mapcar #'(lambda (node) (find (id node) (get-nodes abox) :key #'id :test #'=)) (reverse order)))))) (defmethod has-eq-edges-p ((abox rolebox-abox)) (let ((*cur-rbox* +rcc5-rolebox+)) (some #'(lambda (node) (cdr (get-role-successors node (parse-role 'eq)))) (get-nodes abox)))) ;;; ;;; ;;; #| (progn (delete-all-tboxes) (with-rbox (test :delete-if-exists-p t :roles (r s t) :inverse-roles ((s r)) :reflexive-roles (t) :axioms ((r r (s r t)))) (with-tbox (test :delete-if-exists-p t) (with-abox (test :delete-if-exists-p t) (instance a (some r (some r c))) (instance a d) (instance a (all r (not c))) (instance a (all s (all (inv r) (all (inv r) (not d))))) (true! (abox-consistent?)) (instance a (all t (not c))) (false! (abox-consistent-p *cur-abox*)))))) (progn (delete-all-tboxes) (with-rbox (test :delete-if-exists-p t :roles (r) :inverse-roles ((r r)) :reflexive-roles (r) :axioms ((r r (r)))) (with-tbox (test :delete-if-exists-p t :type 'rolebox-abox) (implies A B) (equivalent A (some r E)) (equivalent C (all r B)) (setf *print-pretty* t) ;;; MIDELORA-BUG wenn reuse-nodes-p verwendet wird!!! (princ (subsumes? c a :debug-p t :reuse-nodes-p nil :semantic-branching-p t)) ;(visualize-taxonomy) ))) (with-rbox (rcc5-rolebox) (with-tbox (test :delete-if-exists-p t) (with-abox (test :delete-if-exists-p t :type 'rolebox-abox) (ins a (and a (all dr (not c)) (all po (not c)))) (ins b b) (ins c c) (rel a b dr) (rel b c pp) (true! (abox-consistent?)) (ins c (or (all (inv pp) (not a)) (all ppi (not a)))) (false! (abox-consistent?))))) (progn (delete-all-tboxes) (with-rbox (rcc5-rolebox) (with-abox (test :delete-if-exist-p t :type 'rolebox-abox) (instance a a) (instance a (all eq b)) (true! (abox-consistent-p *cur-abox*)) (instance a (not b)) (false! (abox-consistent-p *cur-abox* ))))) ;;; ;;; Härtetest! Funktioniert jetzt!!! ;;; (progn (delete-all-tboxes) (with-rbox (rcc5-rolebox) (setf *print-pretty* t) (with-tbox (meta :delete-if-exists-p t :type 'rolebox-abox) (def* linear-time (and (all dr bottom) (all ec bottom) (all po bottom) (all ppi linear-time) (all pp linear-time))) (def* dense (=> (some ppi top) (some ppi (some ppi top)))) (def* right-bounded (some ppi (and last-node (all ppi bottom)))) (def* left-bounded (some pp (and first-node (all pp bottom)))) (def* left-unbounded (all pp (some pp top))) (def* right-unbounded (all ppi (some ppi top))) (with-abox (test :type 'rolebox-abox :delete-if-exists-p t) (ins a (and linear-time (some ppi (some ppi (some ppi (some ppi (some ppi (some ppi dead)))))) left-bounded right-bounded)) (time (true! (abox-sat? test :language +alci-ra-minus+ #+:clim :completion-found-hook #+:clim #'(lambda (x) (visualize (reorder-ppi x))) :debug-p nil))))))) (progn (delete-all-tboxes) (with-rbox (rcc5-rolebox) (with-tbox (test) (with-abox (test) (ins a (or (and (some pp (and c (all eq (not c))))) (and (some dr (and c (all eq (not d))))))) (true! (abox-sat? test)))))) (progn (delete-all-tboxes) (with-rbox (rcc5-rolebox) (with-tbox (test) (with-abox (test) (ins a (and (some pp (some pp d)) (or (all pp (not d)) (some dr x)))) (true! (abox-sat? test)))))) (progn (delete-all-tboxes) (with-rbox (test :delete-if-exists-p t :roles (r s tt u w x) :inverse-roles ((tt w)) :reflexive-roles (x) :axioms ((r s (tt u)))) (with-tbox (test :delete-if-exists-p t) (with-abox (test :delete-if-exists-p t) (instance c (all w (not a))) (instance a (all u (not c))) (instance c c) (instance a a) (related a b r) (related b c s) (false! (abox-consistent-p *cur-abox* :visualize-p t)))))) |#
12,112
Common Lisp
.lisp
323
25.405573
113
0.514555
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
8c86d54b656fcad90975412b2abd4b559a2b7a584fa748ee56caf4f459feaeb7
12,543
[ -1 ]
12,544
simple-number-restrictions-expansion.lisp
lambdamikel_DLMAPS/src/prover/simple-number-restrictions-expansion.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defrule simple-at-least-expansion (dl-with-number-restrictions abox) (multiple-value-bind (at-least-concept node) (select-at-least-concept abox *strategy* language) (cond ((not node) +insert-negative-code+ ) (t (let ((role (role at-least-concept)) (n (n at-least-concept))) (when *reuse-nodes-p* (break "To be implemented")) (announce "EXPANDING ~A : CREATING NEW NODE" node) (register-as-expanded at-least-concept :comment 'expand-at-least-concept-no-preconditions :node node) (loop-over-node-unexpanded-at-least-concepts (implied-at-least node) (when (and (implies-p (role at-least-concept) (role implied-at-least)) (<= (n implied-at-least) n) (not (eq implied-at-least at-least-concept))) (register-as-expanded implied-at-least :comment 'register-implied-at-least-concept :node node :depends-on (list (list node at-least-concept))))) (let ((new-node (create-anonymous-node abox :depends-on (list (list node at-least-concept))))) (relate node new-node role :old-p nil :multiplicity n :depends-on (list (list node at-least-concept))) (perform (compute-new-some-successor-label :new-node new-node :node node :role role :concept at-least-concept)) +insert-positive-code+)))))) (defrule simple-at-most-merging (dl-with-number-restrictions abox) (multiple-value-bind (bad-at-most-concept node edges m) (select-violated-at-most-concept abox *strategy* language) (declare (ignorable m)) (cond ((not node) +insert-negative-code+) (t (let* ((new-choice-point (get-new-choice-point)) (collected-dependencies nil) (memorized-action (get-current-action)) (sat nil) (no (* 2 (n-over-k (length edges) 2))) ; (1 3) -> ((1 3) (3 1)) probieren! (count 0) (depends-on (cons (list node bad-at-most-concept) edges))) (loop-over-subsets-of-cardinality (partition edges 2) (dolist (partition (list partition (reverse partition))) (incf count) (let* ((last-p (= count no))) (announce "Trying partition ~A" partition) (when last-p (announce "This is the last partition!")) (multiple-value-bind (merged-p not-mergeable-deps) (try-to-merge node partition :new-choice-point new-choice-point :depends-on depends-on ) (if merged-p (progn (announce "Found mergable partition ~A" partition) (multiple-value-bind (sub-sat deps) +insert-positive-code+ (announce "Back on level ~A!" level) (when *compute-all-completions-p* (let ((*use-unsat-cache-p* nil)) (rollback-to abox memorized-action))) (setf sat (or sat sub-sat)) (when (and (not sat) (not *compute-all-completions-p*)) (push-all-to deps collected-dependencies)) ;;; letzte Parition? -> in jedem Fall zurückkehren! (when last-p (return-from prover (if sat t (if *compute-all-completions-p* nil (values nil (sort-choice-points (remove new-choice-point collected-dependencies))))))) ;;; nicht-letzte Partition (when (not last-p) (when (and sat (not *compute-all-completions-p*)) (return-from prover t)) (when (not sat) (when (not (member new-choice-point deps)) ;;; ;;; Clash Reason liegt nicht an der vorgenommen Partitionierung! ;;; (return-from prover (values nil (sort-choice-points (remove new-choice-point collected-dependencies))))) (when (member new-choice-point deps) ;;; ;;; Clash Reason liegt an der Partition! ;;; Aufräumen und Weitermachen, ;;; nächste Partition aus der Schleife probieren ;;; (when *debug-p* (format t "~%*** BEFORE ROLLBACK:~%") (describe-object abox t) (loop-over-abox-nodes (node abox) (describe-object node t))) #+:use-dependency-directed-backtracking (break "DEPENDENCY DIRECTED BACKTRACKING NOT FULLY UNDERSTOOD YET!") #-:use-dependency-directed-backtracking (progn ;;; ;;; einfaches BACKJUMPING ;;; chronologisches Abräumen ;;; (rollback-to abox memorized-action node)) (when *debug-p* (format t "~%*** AFTER ROLLBACK:~%") (describe-object abox t) (loop-over-abox-nodes (node abox) (describe-object node t)))))))) ;;; nodes waren nicht mergable! (progn (when (and (not sat) (not *compute-all-completions-p*)) (push-all-to not-mergeable-deps collected-dependencies)) (when last-p (return-from prover (if sat t (if *compute-all-completions-p* nil (progn (unless collected-dependencies (break)) (values nil (sort-choice-points collected-dependencies))))))))))))) ;;; ;;; diese Return wird ausgeführt, wenn cardinality = 0 war! ;;; (return-from prover (values nil (sort-choice-points (reduce #'append (cons (get-choice-points bad-at-most-concept :node node) (mapcar #'get-choice-points edges)))))))))))
9,801
Common Lisp
.lisp
154
27.948052
103
0.378271
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
1b875655cac61230fa6c66a995e1555849ce086313e98b949e646f6d165ad939
12,544
[ -1 ]
12,545
alchn-prover.lisp
lambdamikel_DLMAPS/src/prover/alchn-prover.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (define-prover ((abox-sat alchn abox)) (:init (cond ((zerop (1- (no-of-nodes abox))) (loop-over-abox-nodes (node abox) (register-label-is-stable abox node)) (with-strategy (+strategy+) (start-main))) (t (perform (initial-abox-saturation) (:body (with-strategy (+abox-saturation-strategy+) (loop-over-abox-nodes (node abox) (register-label-is-stable abox node)) (perform (model-merging) (:body (start-main))))))))) (:main (perform (deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (simple-at-most-merging) (:positive (restart-main)) (:negative (perform (identify-stable-nodes) (:body (perform (model-merging) (:body (perform (make-models-for-nodes) (:body (perform (some-expansion) (:positive (if clashes (handle-clashes) (next-round))) (:negative (perform (simple-at-least-expansion) (:positive (next-round)) (:negative (perform (make-models-for-old-nodes) (:body (success)))))))))))))))))))))) (define-prover ((abox-sat alchn abox1)) (:init (cond ((zerop (1- (no-of-nodes abox))) (loop-over-abox-nodes (node abox) (register-label-is-stable abox node)) (with-strategy (+trace-strategy+) (start-main))) (t (perform (initial-abox-saturation) (:body (with-strategy (+trace-strategy+) (loop-over-abox-nodes (node abox) (register-label-is-stable abox node)) (perform (model-merging) (:body (start-main))))))))) (:rollback (let ((*maintain-active-nodes-p* t)) (rollback))) (:main (perform (focused-deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (simple-at-most-merging) (:positive (restart-main)) (:negative (perform (identify-stable-nodes) (:body (perform (model-merging) (:body (perform (some-expansion) (:positive (if clashes (handle-clashes) (next-round))) (:negative (perform (simple-at-least-expansion) (:positive (next-round)) (:negative (perform (pop-active-nodes-heap) (:positive (next-round)) (:negative (perform (make-models-for-old-nodes) (:body (success)))))))))))))))))))))) #| (progn (progn (delete-all-tboxes) (delete-all-aboxes) (with-abox (test :delete-if-exists-p t) (related a a r) (instance a (some r p)) (instance a (at-most 1 r)) (instance a (all r (some r p))) (true! (abox-sat? test :debug-p t)))) (progn (delete-all-tboxes) (delete-all-aboxes) (with-abox (test :delete-if-exists-p t) (related a b r) (related a c r) (instance a (at-most 1 r)) (false! (abox-sat? test :debug-p t)))) (progn (full-reset) (define-primitive-role r) (define-primitive-role s :parent r) (related a b r) (instance b b) (instance a (some s (not b))) (instance a (and a (at-most 1 r))) (false! (abox-sat-p *cur-abox* :debug-p t))) (progn (delete-all-tboxes) (delete-all-aboxes) (with-abox (test :delete-if-exists-p t) (related a f1 f) (related a f2 f) (instance a (at-most 1 f)) (false! (abox-sat? test :debug-p t)))) (progn (full-reset) (define-primitive-role r) (define-primitive-role s :parent r) (related a b r) (instance a (some s top)) (instance a (at-most 1 r)) (true! (abox-sat-p *cur-abox* :debug-p t))) (progn (full-reset) (define-primitive-role r) (define-primitive-role s :parent r) (related a b r) (instance b (not c)) (instance a (some s c)) (instance a (at-most 1 r)) (false! (abox-sat-p *cur-abox* :debug-p t)))) |#
5,456
Common Lisp
.lisp
164
20.02439
65
0.457292
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
853e0fa3dddc402f0eca111a8681eb3a40d882ceac94cede246350de812b2576
12,545
[ -1 ]
12,546
midelora-lubm.lisp
lambdamikel_DLMAPS/src/prover/midelora-lubm.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) (setf (logical-pathname-translations "diss") '(("lubm;**;*.*.*" "~/diss/kap7/LUBM/**/*.*") ("benchmark-results;**;*.*.*" "~/diss/kap7/benchmark-results/**/*.*"))) (defconstant +no-of-runs-per-query+ 1) (defvar *file-stream* t) (defvar *output-stream* t) (defvar *global-prep* 0) (defvar *global-exec* 0) (defparameter *time* nil) (defvar *load-time* nil) (defvar *prep-time* nil) (defvar *consistency-time* nil) (defvar *inds* nil) (defvar *results* nil) (defvar *last-global* nil) (eval-when (:compile-toplevel :load-toplevel :execute) (defun ts::string-transform (string) string)) (defun reset () (prover::delete-all-tboxes) (ts::delete-all-queries)) (defmacro mtime (&body body) `(if *time* (time ,@body) ,@body)) (defmacro benchmark1 (universities departments no query vars) `(let ((id ',(intern (format nil "LUBM-QUERY-~A" no))) (number-of-answers nil) (prep-time 0) (exec-time 0)) (dotimes (i +no-of-runs-per-query+) (let ((t1 (get-internal-run-time))) (ts::midelora-prepare-query ,vars ,query :id id) ;; (format *output-stream* "~A" (thematic-substrate::describe-query id)) (let ((t2 (get-internal-run-time))) (setf number-of-answers (length (ts::execute-query id))) (incf exec-time (/ (- (get-internal-run-time) t2) internal-time-units-per-second)) (incf prep-time (/ (- t2 t1) internal-time-units-per-second))))) (let ((mean-prep (/ prep-time +no-of-runs-per-query+)) (mean-exec (/ exec-time +no-of-runs-per-query+))) (incf *global-prep* mean-prep) (incf *global-exec* mean-exec) (format *output-stream* "~%*** Universities: ~2,D Max. Deps: ~2,D Query: ~2,A Answers: ~12,D Prep-Time: ~12,D Exec-Time: ~12,D Total: ~12,D~%" (1+ ,universities) (if (null ,departments) :all (1+ ,departments)) ,no (if (null number-of-answers) 0 number-of-answers) (float mean-prep) (float mean-exec) (+ (float mean-prep) (float mean-exec))) (format *file-stream* "~2,D ~2,D ~2,A ~12,D ~12,D ~12,D ~12,D~%" (1+ ,universities) (if (null ,departments) :all (1+ ,departments)) ,no (if (null number-of-answers) 0 number-of-answers) (float mean-prep) (float mean-exec) (+ (float mean-prep) (float mean-exec))) (force-output *file-stream*)))) (defmacro benchmark (universities departments no query vars) `(benchmark1 ,universities ,departments ,no ',query ',vars)) ;;; ====================================================================== (defun load-kbs (&optional (univs 1) (departments 1)) (declare (ignorable univs departments)) (reset) ;(let ((*package* (find-package :racer-user))) ; (load "~/diss/kap7/LUBM/lubm2.tbox")) (princ univs) (princ departments) (let ((name (if (= univs 0) (if departments (format nil "lubm-0-~A" departments) (format nil "lubm-1")) (format nil "lubm-~A" univs)))) (princ name) (terpri) (let ((*package* (find-package :prover))) (load (format nil "/home/mi.wessel/diss/kap7/LUBM/~A.tbox" name)) ;(load (format nil "/home/mi.wessel/diss/kap7/lubm.tbox.backup" name)) ;(load (format nil "/home/mi.wessel/diss/kap7/LUBM/db-~A.abox" name)) (load (format nil "/home/mi.wessel/diss/kap7/LUBM/~A.abox" name))) ;;; (delete-all-nodes) ;;; fuer DB! alle Knoten/Kanten "virtuell" (visualize-taxonomy) ;(in-abox lubm) ; (instance i top) )) (defun prepare-lubm-data-n-universities (check-abox-consistency n-universities max-n-departments) (let ((t1a (get-internal-run-time))) #+:allegro (princ "Stack Cushion: ") #+:allegro (princ (system:stack-cushion)) #+:allegro (terpri) (mtime (load-kbs n-universities max-n-departments)) (terpri) (princ (current-abox)) (princ (current-abox)) (terpri) (let ((t1b (get-internal-run-time))) (setf *load-time* (/ (- t1b t1a) internal-time-units-per-second)) (let ((t2a (get-internal-run-time))) (format *output-stream* "~%~%ABox preparation ") (format *output-stream* "done.~%") (let ((t2b (get-internal-run-time))) (when check-abox-consistency (format *output-stream* "~%~%ABox consistency checking... ") (terpri) (princ (current-abox)) (princ (current-abox)) (terpri) (mtime (prepare-abox-for-querying-and-sat-p (current-abox))) (format *output-stream* "done.~%")) (show-statistics) (let ((t2c (get-internal-run-time))) (setf *consistency-time* (/ (- t2c t2b) internal-time-units-per-second)) (format *output-stream* "~%Compute index structures... ") (ts::midelora-retrieve (?x) (?x top)) (format *output-stream* "done.~%") (let ((t2d (get-internal-run-time))) (setf *prep-time* (/ (- t2d t2c) internal-time-units-per-second)) (setf *inds* (length (all-individuals))) #+:Allegro (excl:gc t) (format *output-stream* #+:no-server "~%Load: ~,20T~,4F ~%Preparation: ~,20T~,4F ~%Consistency: ~,20T~,4F ~%Index: ~,20T~,4F ~%Individuals: ~,20T~D ~%Concept Assertions: ~,20T~D ~%Role Assertions: ~,20T~D~%" #-:no-server "~%Load: ~,20T~,4F ~%Preparation: ~,20T~,4F ~%Consistency: ~,20T~,4F ~%Index: ~,20T~,4F~%" (/ (- t1b t1a) internal-time-units-per-second) (/ (- t2b t2a) internal-time-units-per-second) (if check-abox-consistency (/ (- t2c t2b) internal-time-units-per-second) 0) (/ (- t2d t2c) internal-time-units-per-second) #+:no-server (length (concept-instances top)) #+:no-server (length (all-concept-assertions)) #+:no-server (length (all-role-assertions)))))))))) ;;; ====================================================================== (defun run-lubm-benchmark (benchmark-function check-abox-consistency &optional (univs 0) (min-deps 0) (max-deps min-deps)) (loop for deps1 from (if (null min-deps) 0 min-deps) to (if (or (null max-deps) (not (zerop univs))) 0 max-deps) do (format *output-stream* "~%Initializing...~%") (prepare-lubm-data-n-universities check-abox-consistency univs (if (or (null max-deps) (not (zerop univs))) nil deps1)) (format *output-stream* "~%Querying...~%") (funcall benchmark-function univs (if (or (null max-deps) (not (zerop univs))) nil deps1))) (values)) (defun original-lubm (universities departments) ;;; Query 1 (with-abox-retrieval ( (current-abox) ) (benchmark universities departments 1 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#GraduateStudent|) (?x |http://www.Department0.University0.edu/GraduateCourse0| |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#takesCourse|)) (?x)) ;;; Query 2 (benchmark universities departments 2 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#GraduateStudent|) (?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#University|) (?z |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Department|) (?x ?z |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#memberOf|) (?z ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#subOrganizationOf|) (?x ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#undergraduateDegreeFrom|)) (?x ?y ?z)) ;;; Query 3 (benchmark universities departments 3 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Publication|) (?x |http://www.Department0.University0.edu/AssistantProfessor0| |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#publicationAuthor|)) (?x |http://www.Department0.University0.edu/AssistantProfessor0|)) ;;; Query 4 (benchmark universities departments 4 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Professor|) (?x |http://www.Department0.University0.edu| |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#worksFor|) (?x (a |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#name|)) (?x (a |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#emailAddress|)) (?x (a |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#telephone|)) ) (?x )) ;;; Query 5 (benchmark universities departments 5 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Person|) (?x |http://www.Department0.University0.edu| |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#memberOf|)) (?x)) ;;; Query 6 (benchmark universities departments 6 (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Student|) (?x)) ;;; Query 7 (benchmark universities departments 7 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Student|) (?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Course|) (|http://www.Department0.University0.edu/AssociateProfessor0| ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#teacherOf|) (?x ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#takesCourse|)) (?x ?y)) ;;; Query 8 (benchmark universities departments 8 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Student|) (?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Department|) (?x ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#memberOf|) (?y |http://www.University0.edu| |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#subOrganizationOf|) (?x (a |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#emailAddress|))) (?x ?y)) ;;; Query 9 (benchmark universities departments 9 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Student|) (?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Faculty|) (?z |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Course|) (?x ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#advisor|) (?x ?z |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#takesCourse|) (?y ?z |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#teacherOf|)) (?x ?y ?z)) ;;; Query 10 (benchmark universities departments 10 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Student|) (?x |http://www.Department0.University0.edu/GraduateCourse0| |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#takesCourse|)) (?x)) ;;; Query 11 (benchmark universities departments 11 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#ResearchGroup|) (?x |http://www.University0.edu| |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#subOrganizationOf|)) (?x)) ;;; Query 12 (benchmark universities departments 12 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Chair|) (?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Department|) (?x ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#memberOf|) (?y |http://www.University0.edu| |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#subOrganizationOf|)) (?x ?y)) ;;; Query 13 (benchmark universities departments 13 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Person|) (|http://www.University0.edu| ?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#hasAlumnus|)) (?x)) ;;; Query 14 (benchmark universities departments 14 (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#UndergraduateStudent|) (?x)) )) (defun simple-lubm (universities departments) (benchmark universities departments 2 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#GraduateStudent|) (?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#University|) (?z |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Department|) (?x ?z |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#memberOf|) (?z ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#subOrganizationOf|) (?x ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#undergraduateDegreeFrom|)) (?x ?y ?z))) (defun subsumption-lubm (universities departments) (benchmark universities departments 1 (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Person|) (?x)) (benchmark universities departments 2 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Person|) (?x ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#worksFor|) (?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Organization|)) (?x ?y)) (benchmark universities departments 3 (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Professor|) (?x)) (benchmark universities departments 4 (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Chair|) (?x)) (benchmark universities departments 5 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Chair|) (?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Department|) (?x ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#memberOf|)) (?x ?y)) (benchmark universities departments 6 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Professor|) (?x ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#headOf|) (?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Department|)) (?x ?y))) (defun subsumption-lubm (universities departments) (benchmark universities departments 1 (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Person|) (?x)) (benchmark universities departments 2 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Person|) (?x ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#worksFor|) (?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Organization|)) (?x ?y)) (benchmark universities departments 3 (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Professor|) (?x)) (benchmark universities departments 4 (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Student|) (?x)) (benchmark universities departments 5 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Student|) (?x ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#takesCourse|) (?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#Course|)) (?x ?y)) (benchmark universities departments 6 (and (?x |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#GraduateStudent|) (?x ?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#takesCourse|) (?y |http://www.lehigh.edu/%7Ezhp2/2004/0401/univ-bench.owl#GraduateCourse|)) (?x ?y))) ;;; ;;; ;;; (defun run-lubm-tests (benchmark-function univs &key (max-deps-univ-1 nil) (check-abox-consistency t)) (let ((*global-prep* 0) (*global-exec* 0)) (when (and (> univs 1) max-deps-univ-1) (error "Maximum number of departments may only be specified ~ if only one university is processed.")) (pprint (ts::describe-query-processing-mode)) (run-lubm-benchmark benchmark-function check-abox-consistency (1- univs) (and max-deps-univ-1 (1- max-deps-univ-1))) (format *output-stream* "Total preparation time: ~12,D Total execution time: ~12,D Rollback time: ~12,D~%" (float *global-prep*) (float *global-exec*) (float (/ *time-spend-in-global-rollback* internal-time-units-per-second))) (format *file-stream* "Prep ~12,D Exec ~12,D Global Rollback ~12,D~%" (float *global-prep*) (float *global-exec*) (float (/ *time-spend-in-global-rollback* internal-time-units-per-second))))) ;;; ;;; ;;; (defun test (univs &optional deps) (setf *results* nil) (loop as deps from 1 to 1 do (full-reset) (let ((ts::*multiprocess-queries* nil) (settings 0)) (dolist (setting (list ;; ( :query-optimization :optimizer-use-cardinality-heuristics ;; :two-phase-query-processing-mode :query-repository :compiler) (list t t nil nil nil nil))) (if (sixth setting) (setf ts::*compile-queries-p* t ts::*compile-inline-p* t ;nil ts::*runtime-evaluation-p* nil) (setf ts::*compile-queries-p* nil ts::*compile-inline-p* nil ts::*runtime-evaluation-p* t)) (incf settings) (with-open-file (*file-stream* (format nil "diss:benchmark-results;result-univs-~A-deps-~A-setting-~A.res" univs deps settings) :direction :output :if-exists :supersede :if-does-not-exist :create) (reset) (ts::eval-nrql-settings #'(lambda () (run-lubm-tests ;'original-lubm 'simple-lubm univs :check-abox-consistency t :max-deps-univ-1 deps )) :mode 3 :query-optimization (first setting) :optimizer-use-cardinality-heuristics (second setting) :two-phase-query-processing-mode (third setting) :tuple-computation-mode :set-at-a-time :query-repository (fourth setting) :query-realization nil) (push (list univs deps *inds* (float *load-time*) (float *consistency-time*) (float *prep-time*) (float (/ *time-spend-in-global-rollback* internal-time-units-per-second)) *last-global*) *results*))))) (with-open-file (*file-stream* (format nil "diss:benchmark-results;all-results.res") :direction :output :if-exists :supersede :if-does-not-exist :create) (pprint *results* *file-stream*))) (defun subsumption-test () (full-reset) (let ((ts::*multiprocess-queries* nil)) #+:allegro (system:set-stack-cushion nil) (thematic-substrate::start-process #+:allegro (system:set-stack-cushion nil) (let ((ts::*multiprocess-queries* nil)) (setf ts::*compile-queries-p* nil ts::*compile-inline-p* nil ts::*runtime-evaluation-p* t) (with-open-file (*file-stream* "diss:benchmark-results;subsumption-test-midelora-result-1.res" :direction :output :if-exists :supersede :if-does-not-exist :create) (full-reset) (ts::with-nrql-settings (:mode 3 :query-optimization t :query-repository nil) (run-lubm-tests 'subsumption-lubm 0 :check-abox-consistency t ))) (with-open-file (*file-stream* "diss:benchmark-results;subsumption-test-midelora-result-2.res" :direction :output :if-exists :supersede :if-does-not-exist :create) (full-reset) (ts::with-nrql-settings (:mode 3 :query-optimization t :query-repository t) (run-lubm-tests 'subsumption-lubm 0 :check-abox-consistency t ) (ts::show-current-qbox)))))))
23,040
Common Lisp
.lisp
471
35.152866
193
0.548387
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
d514724d697888ca2b0fe5f4afb3a1f3bd6919be42e24d001d9309c9b4c98daa
12,546
[ -1 ]
12,547
kernel16.lisp
lambdamikel_DLMAPS/src/prover/kernel16.lisp
;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defvar *TIME-SPEND-IN-MAKE-CREATE-ACTION* 0) (defvar *TIME-SPEND-IN-MAKE-PUT-TO-UNEXPANDED-ACTION* 0) (defvar *TIME-SPEND-IN-MAKE-MOVE-FROM-UNEXPANDED-TO-EXPANDED* 0) (defvar *TIME-SPEND-IN-MAKE-REGISTER-ADDITIONAL-DEPENDENCIES* 0) (defvar *TIME-SPEND-IN-MAKE-CHANGE-STATE-ACTION* 0) ;;; ;;; ;;; (defun get-current-choice-point () (choice-point-counter *cur-abox*)) (defun get-new-choice-point () (incf (choice-point-counter *cur-abox*))) ;;; ;;; Choice Point (Dependenz) Verwaltung ;;; (timed-defmethod register-choice-points ((concept concept) (choice-points list) &key node (error-p t) &allow-other-keys) (unless node (error "Need a node!")) (when *reflexive-checks-p* (when (and error-p (get-choice-points concept :node node :error-p nil)) (error " ~A : ~A already has choice points!~%" node concept))) (unless choice-points (error "~A : ~A no choice points given!~%" node concept)) #+:use-avl-trees-for-choice-points (avl-tree-insert (list concept (copy-list choice-points)) (slot-value node 'choice-points)) #-:use-avl-trees-for-choice-points (push (list concept (copy-list choice-points)) (slot-value node 'choice-points))) (timed-defmethod register-choice-points ((edge abox-edge) (choice-points list) &key (error-p t) &allow-other-keys) (when *reflexive-checks-p* (when (and error-p (get-choice-points edge :error-p nil)) (error "~A already has choice points!" edge))) ;;; die Kanten haben immer einfach Listen (setf (slot-value edge 'choice-points) (copy-list choice-points))) (defmethod register-choice-points ((objects list) (choice-points list) &rest args) (dolist (object objects) (apply #'register-choice-points object choice-points args))) ;;; ;;; ;;; (timed-defmethod get-choice-points ((concept concept) &key node error-p) (unless node (error "Need a node!")) (or #+:use-avl-trees-for-choice-points (second (avl-tree-find concept (slot-value node 'choice-points))) #-:use-avl-trees-for-choice-points (second (find concept (slot-value node 'choice-points) :key #'first)) (when error-p (describe-object node t) (error "No choice points for ~A : ~A!" node concept)))) (timed-defmethod get-choice-points ((edge abox-edge) &key error-p &allow-other-keys) (or (slot-value edge 'choice-points) (when error-p (error "No choice points for ~A!" edge)))) (defmethod get-choice-points ((objects list) &rest args &key error-p &allow-other-keys) (reduce #'append (mapcar #'(lambda (object) (if (and (consp object) (is-abox-node-p (first object))) (apply #'get-choice-points (second object) :node (first object) :error-p error-p args) (apply #'get-choice-points object :error-p error-p args))) objects))) ;;; ;;; ;;; (timed-defmethod delete-choice-points ((concept concept) &key node) (unless node (error "Need a node!")) (setf (slot-value node 'choice-points) #+:use-avl-trees-for-choice-points (avl-tree-delete concept (slot-value node 'choice-points)) #-:use-avl-trees-for-choice-points (delete concept (slot-value node 'choice-points) :key #'first))) (defmethod delete-choice-points ((edge edge) &key &allow-other-keys) (setf (slot-value edge 'choice-points) nil)) (defmethod delete-choice-points ((objects list) &rest args) (dolist (object objects) (apply #'delete-choice-points object args))) ;;; ;;; ;;; (defmethod get-clash-culprits ((node abox-node) (concept bottom-concept)) (list concept)) (defmethod get-clash-culprits ((node abox-node) (concept atomic-concept)) (list concept (get-negated-concept concept))) (defmethod get-clash-culprits ((node abox-node) (concept and-concept)) (list concept (get-negated-concept concept))) (defmethod get-clash-culprits ((node abox-node) (concept or-concept)) (append (list concept (get-negated-concept concept)) (mapcar #'get-negated-concept (arguments concept)))) (defmethod get-clash-culprits ((node abox-node) (concept some/all-concept)) (list concept (get-negated-concept concept))) (defmethod get-clash-culprits ((node abox-node) (concept at-least-concept)) (list concept (get-negated-concept concept))) (defmethod get-clash-culprits ((node abox-node) (concept at-most-concept)) (list concept (get-negated-concept concept))) ;;; ;;; ;;; #+:use-dependency-directed-backtracking (defmethod get-preconditioned-actions ((concept-assertion list)) (let ((node (first concept-assertion)) (concept (second concept-assertion))) #+:use-avl-trees-for-actions (second (avl-tree-find concept (slot-value node 'precondition-for-actions))) #-:use-avl-trees-for-actions (second (find concept (slot-value node 'precondition-for-actions) :key #'first)))) #+:use-dependency-directed-backtracking (defmethod get-preconditioned-actions ((edge abox-edge)) (slot-value edge 'precondition-for-actions)) ;;; ;;; ;;; #+:use-dependency-directed-backtracking (defmethod get-postconditioned-actions ((concept-assertion list)) (let ((node (first concept-assertion)) (concept (second concept-assertion))) #+:use-avl-trees-for-actions (second (avl-tree-find concept (slot-value node 'postcondition-for-actions))) #-:use-avl-trees-for-actions (second (find concept (slot-value node 'postcondition-for-actions) :key #'first)))) #+:use-dependency-directed-backtracking (defmethod get-postconditioned-actions ((edge abox-edge)) (slot-value edge 'postcondition-for-actions)) ;;; ;;; ;;; (defstruct action type det-action-p next-action previous-action triggered-by triggers comment timestamp) (defun get-current-action () ;;; wird *nur* für den Aufbau der zeitlichen Ordnung verwendet!!! (current-action *cur-abox*)) (defun set-to-current-action (action) (setf (current-action *cur-abox*) action)) ;;; ;;; ;;; (defmacro undo-action1 (abox action) `(let ((abox ,abox) (action ,action)) (declare (ignorable abox)) (with-slots (next-action previous-action) action (when next-action (setf (slot-value next-action 'triggered-by) (delete action (slot-value next-action 'triggered-by)))) (when previous-action (setf (slot-value previous-action 'triggers) (delete action (slot-value previous-action 'triggers)))) (when next-action (setf (slot-value next-action 'previous-action) previous-action)) (when previous-action (setf (slot-value previous-action 'next-action) next-action)) (when (eq action (current-action *cur-abox*)) ;;; wurde die letzte Aktion gelöscht = zeitlich spaeteste? ;;; => *current-action* auf zeitlichen Vorgaenger setzen ;;; wenn es keine previous-action gibt, wird *current-action* NIL! okay! (setf (current-action *cur-abox*) previous-action))))) ;;; ;;; ;;; (defmacro init-action (action) `(let ((action ,action)) (when (current-action *cur-abox*) (setf (slot-value action 'previous-action) (current-action *cur-abox*) (slot-value (current-action *cur-abox*) 'next-action) action)) (setf (slot-value action 'timestamp) (incf (action-timestamp-counter *cur-abox*))) (setf (current-action *cur-abox*) action))) ;;; ;;; ;;; (defstruct (object-action (:include action)) object pre) (defmethod print-object ((action object-action) stream) (with-slots (timestamp comment object pre) action (format stream "#<~A @ ~A ~A:~% OBJECT ~A~% PRE ~A>" (type-of action) timestamp comment object pre))) (defstruct (create-edge-action (:include object-action))) (defstruct (create-node-action (:include object-action))) (defstruct (change-state-action (:include object-action)) state) #| (defstruct (delete-edge-action (:include object-action))) (defstruct (delete-node-action (:include object-action))) |# ;;; ;;; ;;; (defmacro register-action-in-slot-of-constraint (action slot-name constraint) `(let ((action ,action) (constraint ,constraint)) (etypecase constraint (edge (push action (slot-value (description constraint) ,slot-name))) (cons (let ((node (first constraint)) (concept (second constraint))) #+:use-avl-trees-for-actions (let ((item (avl-tree-find concept (slot-value (description node) ,slot-name)))) (if item (setf (second item) (push action (second item))) (avl-tree-insert (list concept (list action)) (slot-value (description node) ,slot-name)))) #-:use-avl-trees-for-actions (let ((item (find concept (slot-value (description node) ,slot-name) :key #'first))) (if item ; (concept (action1 ... actionn)) (setf (second item) (push action (second item))) (push (list concept (list action)) (slot-value (description node) ,slot-name))))))))) (defmacro unregister-action-in-slot-of-constraint (action slot-name constraint) `(let ((action ,action) (constraint ,constraint)) (etypecase constraint (edge (setf (slot-value (description constraint) ,slot-name) (delete action (slot-value (description constraint) ,slot-name)))) (cons (let ((node (first constraint)) (concept (second constraint))) #+:use-avl-trees-for-actions (let ((item (avl-tree-find concept (slot-value (description node) ,slot-name)))) (when item (setf (second item) (delete action (second item))) (unless (second item) (avl-tree-delete concept (slot-value (description node) ,slot-name))))) #-:use-avl-trees-for-actions (let ((item (find concept (slot-value (description node) ,slot-name) :key #'first))) (when item (setf (second item) (delete action (second item))) (unless (second item) (setf (slot-value (description node) ,slot-name) (delete concept (slot-value (description node) ,slot-name) :key #'first)))))))))) ;;; ;;; ;;; (defmacro init-object-action (action) `(let ((action ,action)) (init-action action) #+:use-dependency-directed-backtracking (with-slots (pre object triggered-by) action (dolist (constraint pre) (register-action-in-slot-of-constraint action 'precondition-for-actions constraint) (dolist (postconditioned-by-action (get-postconditioned-actions constraint)) (push postconditioned-by-action triggered-by) (push action (slot-value postconditioned-by-action 'triggers))))) )) ;;; ;;; ;;; (defstruct (constraint-action (:include action)) pre post state) (defmethod print-object ((action constraint-action) stream) (with-slots (timestamp comment pre post det-action-p) action (format stream "~%#<~A @ ~A, DET: ~A, COM: ~A:~% PRE: ~A~% POST: ~A>" (type-of action) timestamp det-action-p comment pre post))) (defstruct (move-from-unexpanded-to-expanded-action (:include constraint-action))) (defstruct (put-to-unexpanded-action (:include constraint-action))) (defstruct (register-additional-dependencies-action (:include constraint-action))) ;;; ;;; ;;; (defmacro init-constraint-action (action) `(let ((action ,action)) (init-action action) #+:use-dependency-directed-backtracking (with-slots (pre post triggered-by) action (dolist (constraint pre) (register-action-in-slot-of-constraint action 'precondition-for-actions constraint) (dolist (postconditioned-by-action (get-postconditioned-actions constraint)) (push postconditioned-by-action triggered-by) (push action (slot-value postconditioned-by-action 'triggers)))) (dolist (constraint post) (register-action-in-slot-of-constraint action 'postcondition-for-actions constraint))) )) ;;; ;;; ;;; (defmacro get-state-vector-1 (object) `(list ,object (get-state-vector ,object))) (defmacro register-action (action precondition-constraints postcondition-constraints &key state-object comment det-action-p) `(when *maintain-history-p* (announce "Register action ~A" ',action) (let ((precondition-constraints ,precondition-constraints) (postcondition-constraints ,postcondition-constraints) (state-object ,state-object) (comment ,comment) (det-action-p ,det-action-p)) (declare (ignorable precondition-constraints postcondition-constraints state-object det-action-p comment)) ,(ecase action ;;; object actions: POST ist i.d.R. das erzeugte/geloeschte/modifizierte Objekt! (change-state `(with-timing (*time-spend-in-make-change-state-action*) (let ((action (make-change-state-action :comment comment :object postcondition-constraints :pre precondition-constraints :state (get-state-vector-1 (or state-object postcondition-constraints))))) (init-object-action action) action))) (create `(with-timing (*time-spend-in-make-create-action*) (let ((action (etypecase postcondition-constraints (abox-edge (make-create-edge-action :comment comment :object postcondition-constraints :pre precondition-constraints)) (abox-node (make-create-node-action :comment comment :object postcondition-constraints :pre precondition-constraints))))) (init-object-action action) action))) #| (delete `(let ((action (etypecase precondition-constraints (abox-edge (make-delete-edge-action :comment comment :object precondition-constraints :pre precondition-constraints)) (abox-node (make-delete-node-action :comment comment :object precondition-constraints :pre precondition-constraints))))) (init-object-action action) action)) |# ;;; constraint actions: PRE und POST (put-to-unexpanded `(with-timing (*time-spend-in-make-put-to-unexpanded-action*) (let ((action (make-put-to-unexpanded-action :comment comment :pre precondition-constraints :post postcondition-constraints :state (get-state-vector-1 state-object) :det-action-p det-action-p))) (init-constraint-action action) action))) (move-from-unexpanded-to-expanded `(with-timing (*time-spend-in-make-move-from-unexpanded-to-expanded*) (let ((action (if (null precondition-constraints) ;;; keine Vorbedingungen! (make-move-from-unexpanded-to-expanded-action :comment comment :pre postcondition-constraints ;;; KEIN Fehler!!! :post postcondition-constraints :state (get-state-vector-1 state-object) :det-action-p det-action-p ) (make-move-from-unexpanded-to-expanded-action :comment comment :pre precondition-constraints :post postcondition-constraints :state (get-state-vector-1 state-object))))) (init-constraint-action action) action))) (register-additional-dependencies `(with-timing (*time-spend-in-make-register-additional-dependencies*) (let ((action (if (null precondition-constraints) ;;; keine Vorbedingungen! (make-register-additional-dependencies-action :comment comment :pre postcondition-constraints ;;; KEIN Fehler!!! :post postcondition-constraints :state (when state-object (get-state-vector-1 state-object))) (make-register-additional-dependencies-action :comment comment :pre precondition-constraints :post postcondition-constraints :state (when state-object (get-state-vector-1 state-object)))))) ;;; (break "~A" action) (init-constraint-action action) action))))))) ;;; ;;; ;;; (defmacro undo-object-action (abox action) `(progn (undo-action1 ,abox ,action) #+:use-dependency-directed-backtracking (with-slots (pre object) ,action (dolist (constraint pre) (unregister-action-in-slot-of-constraint ,action 'precondition-for-actions constraint))))) (defmacro undo-constraint-action (abox action) `(progn (undo-action1 ,abox ,action) #+:use-dependency-directed-backtracking (with-slots (pre post) ,action (dolist (constraint pre) (unregister-action-in-slot-of-constraint action 'precondition-for-actions constraint)) (dolist (constraint post) (unregister-action-in-slot-of-constraint action 'postcondition-for-actions constraint))))) ;;; ;;; ;;; (defvar *time-spend-in-undo-create-edge-action* 0) (defvar *time-spend-in-undo-create-node-action* 0) (defvar *time-spend-in-undo-change-state-action* 0) (defvar *time-spend-in-undo-put-to-unexpanded-action* 0) (defvar *time-spend-in-undo-move-from-unexpanded-to-expanded-action* 0) (defvar *time-spend-in-undo-register-additional-dependencies-action* 0) ;;; ;;; ;;; (defmacro undo-action (abox action &optional to-node) `(let ((*start-time* (get-internal-run-time)) (*rollback-active-p* t) (*maintain-history-p* nil)) (incf *no-of-undos*) (prog1 (etypecase ,action ;; create (create-edge-action (with-timing (*time-spend-in-undo-create-edge-action*) (delete-edge ,abox (slot-value ,action 'object) ;; wichtig :delete-inverse-p nil) (undo-object-action ,abox ,action))) (create-node-action (with-timing (*time-spend-in-undo-create-node-action*) (let ((node (slot-value ,action 'object))) (delete-node ,abox node ;; wichtig; "create-edge" ;; erzeugt ja auch eine ;; protokollierende Aktion; ;; beim Undo gibt es sonst ;; einen Error, wenn das Loeschen ;; des Knotens eine automatisch ;; erzeugte reflexive Kante schon ;; mitloescht! :delete-edges-p nil) (when *use-unsat-cache-p* (when (and (initial-concept node) (if ,to-node (or (is-successor-p node ,to-node) (eq node (cur-clash-node abox))) (eq node (cur-clash-node abox)))) (announce "Found unsatisfiable concept ~A" (initial-concept node)) (register-already-known-to-be-inconsistent abox node)))) (undo-object-action ,abox ,action))) #| ;;; delete (delete-edge-action (let ((edge (slot-value ,action 'object))) (register-edge edge)) (undo-object-action ,abox ,action)) (delete-node-action (let ((node (slot-value ,action 'object))) (register-node node)) (undo-object-action ,abox ,action)) |# ;; change state (change-state-action (with-timing (*time-spend-in-undo-change-state-action*) (with-slots (object state) action (let* ((state-object (first state)) (state (second state))) (set-state-vector state-object state))))) ;; labels (put-to-unexpanded-action (with-timing (*time-spend-in-undo-put-to-unexpanded-action*) (with-slots (post state) ,action (dolist (post post) (let ((concept (second post)) (node (first post))) (delete-from-unexpanded node concept) (delete-choice-points concept :node node))) (undo-constraint-action ,abox ,action) (let* ((state-object (first state)) (state (second state))) (set-state-vector state-object state))))) (move-from-unexpanded-to-expanded-action (with-timing (*time-spend-in-undo-move-from-unexpanded-to-expanded-action*) (with-slots (post state) ,action (dolist (post post) (let ((concept (second post)) (node (first post))) (put-from-expanded-to-unexpanded concept node))) (undo-constraint-action ,abox ,action) (let* ((state-object (first state)) (state (second state))) (set-state-vector state-object state))))) ;; deps (kaum verwendet) (register-additional-dependencies-action (with-timing (*time-spend-in-undo-register-additional-dependencies-action*) (with-slots (pre post) ,action (let ((pre-choice-points (get-choice-points pre))) (dolist (post post) (let* ((concept (second post)) (node (first post)) (points (get-choice-points concept :node node))) (delete-choice-points concept :node node) (register-choice-points concept (remove-duplicates (cons 0 (set-difference points pre-choice-points))) :node node))))) (undo-constraint-action ,abox ,action)))) (incf *time-spend-in-undo* (- (get-internal-run-time) *start-time*))))) ;;; ;;; Chronologisches Backtracking ;;; (defmethod get-reverse-history ((abox abox)) (let* ((current (current-action abox))) (when current (loop while current collect current do (setf current (slot-value current 'previous-action)))))) (defmethod get-history ((abox abox)) (let* ((current (current-action abox))) (when current (loop while (slot-value current 'previous-action) do (setf current (slot-value current 'previous-action))) (loop while current collect current do (setf current (slot-value current 'next-action)))))) (defmethod rollback-to ((abox abox) (action null) &optional to-node) (declare (ignore to-node)) (announce "Rolling back from ~A to ~A" (current-action abox) action) (undo-history abox (get-reverse-history abox))) (defmethod rollback-to ((abox abox) (action action) &optional to-node) (announce "Rolling back from ~A to ~A" (current-action abox) action) (unless (current-action abox) (error "No current action!")) (let* ((current (current-action abox)) (history (loop until (eq action current) collect current do (setf current (slot-value current 'previous-action))))) (undo-history abox history to-node))) (defmethod undo-history ((abox abox) (history list) &optional to-node) (announce "Undoing history of length ~A" (length history)) (dolist (action history) (announce "Undoing ~A" action) (undo-action abox action to-node)) (setf (cur-clash-node abox) nil) (announce "Done.")) ;;; ;;; ;;; #+:use-dependency-directed-backtracking (defun get-all-actions-triggered-by (constraint) (let ((actions nil)) (labels ((do-it (action) (unless (member action actions) (push action actions) (dolist (triggered-action (slot-value action 'triggers)) (do-it triggered-action))))) (dolist (action (get-preconditioned-actions constraint)) (do-it action)) (sort actions #'> :key #'timestamp)))) #+:use-dependency-directed-backtracking (defmethod rollback-all-depending-on ((abox abox) constraint) (announce "Rollback all actions triggered by ~A" constraint) (let ((actions (get-all-actions-triggered-by constraint))) (undo-history abox actions))) ;;; ;;; ;;; (timed-defmethod set-choice-points ((edge abox-edge) choice-points &key &allow-other-keys) (setf (slot-value edge 'choice-points) (ensure-list choice-points))) (timed-defmethod add-a-choice-point ((edge abox-edge) choice-point &key &allow-other-keys) (push choice-point (slot-value edge 'choice-points))) (timed-defmethod add-choice-points-for-edges ((abox abox) edges) (let ((choice-points nil)) (dolist (edge edges) (let ((point (get-new-choice-point))) (push point choice-points) (add-a-choice-point edge point))) choice-points)) ;;; ;;; ;;; (timed-defmethod register-as-expanded ((concept concept) &key node depends-on comment) (unless node (error "Need a node!")) (when *reflexive-checks-p* (unless (unexpanded-p node concept) (describe-object node t) (error "Before putting ~A : ~A to EXPANDED, put it to UNEXPANDED!" node concept)) (unless (get-choice-points concept :node node) (describe-object node t) (error "Register as expanded - no choice points for ~A : ~A!" node concept))) (announce "I have expanded ~A : ~A" node concept) (when depends-on (announce "Depends on: ~A" depends-on) (register-additional-dependencies concept :node node :depends-on depends-on :error-p nil :comment comment)) (register-action move-from-unexpanded-to-expanded depends-on (list (list node concept)) :state-object node :comment comment) (put-from-unexpanded-to-expanded concept node)) ;;; ;;; ;;; (timed-defmethod register-as-unexpanded ((concept concept) &key node new-choice-point depends-on comment) (unless node (error "Need a node!")) (when *reflexive-checks-p* (when (on-tableau-p node concept) (error "~A : ~A already on tableau!" node concept))) (announce "Register as unexpanded ~A : ~A" node concept) (when depends-on (announce "Depends on: ~A" depends-on)) (register-action put-to-unexpanded depends-on (list (list node concept)) :det-action-p (when (and (=> new-choice-point (zerop new-choice-point)) (every #'(lambda (x) (zerop x)) (get-choice-points depends-on))) t) :state-object node :comment comment) (add-to-unexpanded node concept) (register-choice-points-for concept :node node :new-choice-point new-choice-point :depends-on depends-on) (list concept) ; liefert die Lister der Konzept zurueck, die addiert wurden ) (timed-defmethod register-as-unexpanded :around ((some-concept some-concept) &key node) (let ((res (call-next-method))) (when (role-domain (role some-concept)) (let* ((role (role some-concept)) (concept (role-domain role))) (unless (on-tableau-p node concept) (announce "Register role domain ~A of role ~A as unexpanded: ~A : ~A" concept role node some-concept) (setf res (nconc res (register-as-unexpanded concept :node node :depends-on (list (list node some-concept)))))))) res)) (timed-defmethod register-as-unexpanded :around ((at-least-concept at-least-concept) &key node) (let ((res (call-next-method))) (when (role-domain (role at-least-concept)) (let* ((role (role at-least-concept)) (concept (role-domain role))) (unless (on-tableau-p node concept) (announce "Register role domain ~A of role ~A as unexpanded: ~A : ~A" concept role node at-least-concept) (setf res (nconc res (register-as-unexpanded concept :node node :depends-on (list (list node at-least-concept)))))))) res)) ;;; ;;; ;;; (timed-defmethod register-as-unexpanded ((edge abox-edge) &rest args &key (register-choice-points-p t) new-choice-point depends-on &allow-other-keys) (when register-choice-points-p (apply #'register-choice-points-for edge :new-choice-point new-choice-point :depends-on depends-on args))) ;;; ;;; ;;; #| (timed-defmethod register-as-unexpanded ((constraints list) &rest args) (dolist (constraint constraints) (apply #'register-as-unexpanded constraint args))) |# ;;; ;;; ;;; (timed-defmethod register-additional-dependencies ((concept concept) &key (error-p t) node new-choice-point depends-on comment) (when *reflexive-checks-p* (unless (on-tableau-p node concept) (error "~A : ~A is not on tableau!" node concept))) (let ((depends-on ;(cons (list node concept) ;;; NEU, gloescht! depends-on)) (announce "Register additional dependencies for ~A : ~A~%" node concept) (when depends-on (announce "Depends on: ~A" depends-on)) (register-action register-additional-dependencies depends-on (list (list node concept)) :state-object node :comment comment) (register-choice-points-for concept :error-p error-p :add-p t :node node :new-choice-point new-choice-point :depends-on depends-on))) (timed-defmethod register-additional-dependencies ((edge abox-edge) &key (error-p t) new-choice-point depends-on comment) (let ((depends-on (cons edge depends-on))) (announce "Register additional dependencies for ~A" edge) (when depends-on (announce "Depends on: ~A" depends-on)) (register-action register-additional-dependencies depends-on (list edge) :state-object edge :comment comment) (register-choice-points-for edge :error-p error-p :add-p t :new-choice-point new-choice-point :depends-on depends-on))) (defmethod register-additional-dependencies ((constraints list) &rest args) (dolist (constraint constraints) (apply #'register-additional-dependencies constraint args))) ;;; ;;; ;;; ;;; (timed-defun register-choice-points-for (constraints &key node (error-p t) add-p new-choice-point depends-on ;; Liste vom Typ ((knoten konzept) edge ...) &allow-other-keys ) (let ((constraints (ensure-list constraints))) (if depends-on (let ((choice-points nil)) (loop as constraint in depends-on do (etypecase constraint (cons (let ((node (first constraint)) (concept (second constraint))) (dolist (point (get-choice-points concept :node node :error-p t)) (push point choice-points)))) (abox-edge (dolist (point (get-choice-points constraint :error-p t)) (push point choice-points))))) (let ((all-choice-points (delete-duplicates (if new-choice-point (cons new-choice-point choice-points) choice-points)))) (register-choice-points constraints all-choice-points :node node :error-p (and error-p (not add-p))))) ;; ;; ELSE: ;; keine Constraint-Abhängigkeiten angegeben ;; (if new-choice-point (register-choice-points constraints (list new-choice-point) :error-p (and error-p (not add-p)) :node node) (when error-p (error "No new-choice-point given for ~A!" constraints))))))
36,422
Common Lisp
.lisp
811
31.734895
137
0.564474
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
e4eb955b82741057dc71256cff34e7f0f0c0fcfcb8f1c21e70f5ffb5641b3441
12,547
[ -1 ]
12,548
creators.lisp
lambdamikel_DLMAPS/src/prover/creators.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; ;;; (defmethod create-abox-node ((abox abox) name-for-node &rest args) (apply #'create-node abox name-for-node (make-node-description (get-standard-node-description-class abox) nil) args)) (defmethod create-node ((abox abox) (name-for-node symbol) (description node-label) &rest args &key depends-on created-by (old-p t) &allow-other-keys) (let ((*start-time* (get-internal-run-time))) (let* ((created-by (or created-by depends-on)) (node (apply #'call-next-method abox name-for-node description :delete-if-exists-p nil :old-p old-p :created-by created-by :edge-constructor #'(lambda (node ref-role) (create-edge abox node node (make-edge-description (get-standard-edge-description-class abox) ref-role) :created-by created-by :create-inverse-p nil :error-p nil)) args))) (setf (slot-value (description node) 'of-node) node (slot-value node 'cluster-nodes) (list node)) (when created-by (register-action create created-by node)) (incf *time-for-node-creation* (- (get-internal-run-time) *start-time*)) node))) (defmethod register-node ((node abox-node)) (let ((abox (in-graph node))) (with-slots (all-nodes old-nodes node-table) abox (when (is-abox1-p abox) (if (not *use-avl-trees-for-abox1-p*) (push node all-nodes) (insert-into-avl-tree node all-nodes :key #'id)) (when (and *maintain-old-nodes-p* (old-p node)) (push node old-nodes))) (activate-node abox node) (when (or (old-p node) (root-p node) (not (is-abox1-p abox))) (unless node-table (setf node-table (make-weak-hash-table :size 10 :rehash-size 100))) (call-next-method))))) ;;; ;;; ;;; (defmethod create-edge ((abox abox) (from abox-node) (to abox-node) (description edge-label) &rest args &key (old-p t) depends-on created-by (new-choice-point 0) &allow-other-keys) (let ((*start-time* (get-internal-run-time))) (let ((created-by (or created-by depends-on)) (edge (apply #'call-next-method abox from to description :created-by created-by :old-p old-p args))) (unless *dont-invalidate-store-p* (note-abox-has-changed abox) (reset-sat-status from) (reset-sat-status to) ;(reset-sat-status (concept-store (tbox abox))) ) ;;; ;;; Adresse verwalten ;;; (incf (slot-value from 'succ-counter)) (setf (slot-value to 'address) (cons (slot-value from 'succ-counter) (slot-value from 'address))) (setf (slot-value to 'rev-address) (reverse (slot-value to 'address))) ;;; ;;; Blaetter ;;; (apply #'register-as-unexpanded edge :new-choice-point new-choice-point args) (when (inverse-edge edge) (apply #'register-as-unexpanded (inverse-edge edge) :new-choice-point new-choice-point args)) (when created-by (let ((created-by (if (eq created-by t) nil created-by))) (register-action create created-by edge) (when (and (inverse-edge edge) (not (eq (inverse-edge edge) edge))) (register-action create created-by (inverse-edge edge))))) (incf *time-for-edge-creation* (- (get-internal-run-time) *start-time*)) edge))) (defmethod register-edge ((edge abox-edge)) (let ((abox (in-graph edge)) (from (from edge)) (to (to edge))) (with-slots (all-edges edge-table) abox (when (is-abox1-p abox) (unless (cdr (outgoing from)) (setf (slot-value abox 'leaf-nodes) (delete from (slot-value abox 'leaf-nodes)))) (if (not *use-avl-trees-for-abox1-p*) (push edge all-edges) (insert-into-avl-tree edge all-edges :key #'id))) (if (or (old-p edge) (not (is-abox1-p abox))) (progn (unless edge-table (setf edge-table (make-weak-hash-table :size 10 :rehash-size 100 :test #'equal))) (call-next-method)) (progn (push to (slot-value from 'successors)) (push from (slot-value to 'predecessors)) (push edge (slot-value from 'outgoing)) (push edge (slot-value to 'incoming))))))) ;;; ;;; ;;; (defmethod relate ((from abox-node) (to abox-node) (description edge-label) &rest args) (apply #'create-edge *cur-abox* from to description args)) (defmethod relate ((from abox-node) (to abox-node) role &rest args &key description-type &allow-other-keys) (let* ((descr (make-edge-description (or description-type (get-standard-edge-description-class *cur-abox*)) role)) (role (textual-description descr))) (declare (ignorable role)) (apply #'create-edge *cur-abox* from to descr args))) (defmethod relate ((from symbol) (to symbol) role &rest args &key (create-nodes-p t) (node-type (get-standard-node-class *cur-abox*)) &allow-other-keys) (apply #'relate (or (apply #'find-node *cur-abox* from :error-p nil args) (when create-nodes-p (apply #'create-abox-node *cur-abox* from :type node-type args))) (or (apply #'find-node *cur-abox* to :error-p nil args) (when create-nodes-p (apply #'create-abox-node *cur-abox* to :type node-type args))) role args)) ;;; ;;; ;;; (defmethod unrelate ((from abox-node) (to abox-node) role &rest args) (unless (eq (in-graph from) (in-graph to)) (error "Individuals must be in same ABox!")) (let* ((abox (in-graph from)) (role (parse-role role)) (edges (remove-if-not #'(lambda (edge) (eq (role edge) role)) (apply #'get-edges-between abox from to args)))) (dolist (edge edges) (apply #'delete-edge abox edge :update-db-p t args)))) (defmethod unrelate ((from symbol) (to symbol) role &rest args) (apply #'unrelate (apply #'find-node *cur-abox* from :error-p t args) (apply #'find-node *cur-abox* to :error-p t args) (parse-role role) args)) ;;; ;;; ;;; (defun create-anonymous-node (abox &rest args) (incf *created-nodes*) (apply #'create-abox-node abox nil :old-p nil args))
8,069
Common Lisp
.lisp
200
26.1
102
0.494981
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
d9e5e2534b31cd46d740d5157665ee27e4550ebb92aed03ee8ef442e3aebe67e
12,548
[ -1 ]
12,549
alchifn-rplus-prover.lisp
lambdamikel_DLMAPS/src/prover/alchifn-rplus-prover.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (define-prover ((abox-sat alchifn-rplus abox)) (:main (perform (deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (simple-at-most-merging) (:positive (restart-main)) (:negative (perform (block-nodes) (:body (perform (feature-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (some-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (simple-at-least-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (success)))))))))))))))))) #| (progn (delete-all-tboxes) (transitive r) (deffeature f :parents r) (unless (sat? (and (not c) (some (inv f) c) (at-most 1 f) (all (inv r) (some (inv f) (and c (at-most 1 f))))) :debug-p t) (error "prover error"))) (progn (delete-all-tboxes) (transitive r) (deffeature f :parents r) (def d (and c (at-most 1 f) (some f (not c)))) (when (sat? (and (not c) (at-most 1 f) (some (inv f) d) (all (inv r) (some (inv f) d))) :debug-p t) (error "prover-error")) (delete-all-tboxes) (when (sat? (and (some r (and c (some s (all (inv s) (all (inv r) (at-most 1 r)))))) (some r (and (not c) (some s (some r d))))) :debug-p t) (error "prover-error"))) (progn (delete-all-tboxes) (let ((*print-pretty* t)) (unless (sat? (and (some r (and c (some s (all (inv s) (all (inv r) (at-most 1 r)))))) (some r (and (not d) (some s (some r d))))) :debug-p t) (error "prover-error")))) (progn (delete-all-tboxes) (transitive r) (defrole f :parents r) (def d (and c (at-most 1 f) (some f (not c)))) (when (sat? (and (not c) (at-most 1 f) (some (inv f) d) (all (inv r) (some (inv f) d))) :debug-p t) (error "prover-error"))) |#
2,942
Common Lisp
.lisp
88
19.920455
86
0.417798
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
c7b6a15088d056e06d48d433d93d6e4644c62005d38f0d5b7210eb32921525c5
12,549
[ -1 ]
12,550
merging2.lisp
lambdamikel_DLMAPS/src/prover/merging2.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; Merging etc. ;;; (defun try-to-merge (node partition &key depends-on new-choice-point) (let ((failed-choice-points (get-choice-points depends-on))) (labels ((mergable-p (nodes) (cond ((every #'old-p nodes) ;;; da alle Knoten "old" sind, gibt es keine Alternativen -> ;;; das at-most muss verhindert werden! (values nil failed-choice-points)) ((some #'(lambda (a) (some #'(lambda (b) (and (not (eq a b)) (intersection (created-by a) (created-by b)))) nodes)) nodes) (values nil failed-choice-points)) (t (let ((clash-p nil)) (mapl #'(lambda (a) (let ((a (first a)) (b (rest a))) (dolist (b b) (loop-over-node-concepts (ca a) (when (on-tableau-p b (get-negated-concept ca)) ;; (break) ;;; ordinärer Clash, müsste nicht hier abgehandelt werden, ;;; aber warum nicht... (setf clash-p t) (push-all-to (get-choice-points ca :node a) failed-choice-points) (push-all-to (get-choice-points (get-negated-concept ca) :node b) failed-choice-points)))))) nodes) (if clash-p (values nil failed-choice-points) t)))))) (let* ((edge-to-a (first partition)) (edge-to-b (second partition)) (a (if (eq node (from edge-to-a)) (to edge-to-a) (from edge-to-a))) (b (if (eq node (from edge-to-b)) (to edge-to-b) (from edge-to-b))) (nodes (list a b)) (abox (in-graph a)) (type (if (eq node (from edge-to-a)) (if (eq node (from edge-to-b)) 'out-out 'out-in) (if (eq node (from edge-to-b)) 'in-out 'in-in)))) (labels ((create-merge-node () (register-action change-state nil edge-to-a) (register-action change-state nil edge-to-b) (ecase type (out-out (decf (slot-value edge-to-a 'multiplicity)) (decf (slot-value edge-to-b 'multiplicity))) (in-out (decf (slot-value edge-to-a 'inverse-multiplicity)) (decf (slot-value edge-to-b 'multiplicity))) (out-in (decf (slot-value edge-to-a 'multiplicity)) (decf (slot-value edge-to-b 'inverse-multiplicity)))) (let ((new-node (create-anonymous-node abox ;;; wichtig! sonst werden fuer einen ;;; at-least-Constraint generierte Successors ;;; miteinander gemerged! s. (intersection ... ) in ;;; try-to-merge :created-by (append (created-by a) (created-by b)) :new-choice-point new-choice-point :depends-on depends-on))) (dolist (node nodes) (register-action change-state nil node) (when (and (=> (eq node a) (ecase type (out-out (zerop (slot-value edge-to-a 'multiplicity))) (in-out (zerop (slot-value edge-to-a 'inverse-multiplicity))) (out-in (zerop (slot-value edge-to-a 'multiplicity))))) (=> (eq node b) (ecase type (out-out (zerop (slot-value edge-to-b 'multiplicity))) (in-out (zerop (slot-value edge-to-b 'multiplicity))) (out-in (zerop (slot-value edge-to-b 'inverse-multiplicity)))))) (setf (slot-value node 'deleted-p) t) ;(delete-node abox node) ) (loop-over-node-concepts (concept node) (unless (on-tableau-p new-node concept) (register-as-unexpanded concept :node new-node :new-choice-point new-choice-point :depends-on (cons (list node concept) depends-on)))) (loop-over-node-expanded-concepts (concept node) (unless (expanded-p new-node concept) (register-as-expanded concept :node new-node)))) new-node))) (multiple-value-bind (mergable-p deps) (mergable-p nodes) (if (or (not mergable-p) (ecase type (out-out (or (zerop (slot-value edge-to-a 'multiplicity)) (zerop (slot-value edge-to-b 'multiplicity)))) (in-out (or (zerop (slot-value edge-to-a 'inverse-multiplicity)) (zerop (slot-value edge-to-b 'multiplicity)))) (out-in (or (zerop (slot-value edge-to-a 'multiplicity)) (zerop (slot-value edge-to-b 'inverse-multiplicity)))))) (values nil deps) (let ((new-node (create-merge-node)) (role nil)) (ecase type (out-out (setf role (create-and-role (mapcar #'role partition)))) (in-out (setf role (create-and-role (list (slot-value (role edge-to-a) 'inverse-role) (role edge-to-b))))) (out-in (setf role (create-and-role (list (role edge-to-a) (slot-value (role edge-to-b) 'inverse-role))))) (in-in (setf role (create-and-role (list (slot-value (role edge-to-a) 'inverse-role) (slot-value (role edge-to-b) 'inverse-role)))))) (relate node new-node role :old-p nil :new-choice-point new-choice-point :depends-on depends-on) ;;; ;;; Tableau umbauen: ;;; (dolist (node nodes) (loop-over-role-successors (node nil) (succ edge) (when (and (not (member edge partition))) ;;; multiplicity muss nicht betrachtet werden! ;;; die neuen Kanten sollen exakte Kopien sein! (relate new-node succ (role edge) :old-p nil :new-choice-point new-choice-point :depends-on (cons edge depends-on) :multiplicity (multiplicity edge) :inverse-multiplicity (inverse-multiplicity edge)))) (loop-over-role-predecessors (node nil) (succ edge) (when (and (not (member edge partition))) (relate succ new-node (role edge) :old-p nil :new-choice-point new-choice-point :depends-on (cons edge depends-on) :multiplicity (multiplicity edge) :inverse-multiplicity (inverse-multiplicity edge))))) ;; (princ "****") ;; (visualize-abox (in-graph node)) (break) new-node))))))))
10,647
Common Lisp
.lisp
180
26.533333
108
0.359676
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
031c201738b003544b527010af1eb232c714c993c096faf999c2d7eccf3305bf
12,550
[ -1 ]
12,551
node-management.lisp
lambdamikel_DLMAPS/src/prover/node-management.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (timed-defmethod mark-deleted :after ((abox abox) (node abox-node)) ;;: vorher wird deleted-p = T gesetzt, ;;; und deactivate aufgerufen! ;;; hier ist der Knoten noch nicht "physisch" ;;; geloescht (announce "Deleting node ~A" node)) (timed-defmethod mark-deleted :after ((abox abox1) (node abox-node)) (with-slots (all-nodes old-nodes cache-sat-nodes) abox (if (not *use-avl-trees-for-abox1-p*) (setf all-nodes (delete node all-nodes)) (delete-from-avl-tree node all-nodes :key #'id)) (when (and *maintain-old-nodes-p* (old-p node)) ;;; werden momentan nicht benutzt (-> vernachlaessigt ) (setf old-nodes (delete node old-nodes))) (when *maintain-cache-sat-nodes-p* (setf cache-sat-nodes (delete node cache-sat-nodes))))) ;;; ;;; ;;; (timed-defmethod delete-node ((abox abox) (node abox-node) &rest args) (declare (ignorable args)) (call-next-method)) (timed-defmethod delete-node ((abox abox1) (node abox-node) &key (delete-edges-p t) &allow-other-keys) (if (old-p node) (call-next-method) (progn ;;; wird sonst von substrate7.lisp erledigt! (when delete-edges-p (dolist (edge (outgoing node)) (delete-edge abox edge :error-p t)) (dolist (edge (incoming node)) (delete-edge abox edge :error-p t)))))) ;;; ;;; ;;; (timed-defmethod delete-node :before ((abox abox) (node abox-node) &rest args) (declare (ignorable args)) ;;; wichtig! :before! ;;; mark-deleted muss die Kontextinformation haben (mark-deleted abox node)) ;;; ;;; ;;; (timed-defmethod activate-node :around ((abox abox) (node abox-node)) (announce "Activating node ~A" node) (if (and *reflexive-checks-p* (active-p node)) (error "Can't activate ~A, is already active!" node) (call-next-method))) (defmethod activate-node :after ((abox abox) (node abox-node)) (unregister-deterministically-expanded abox node)) (defmethod activate-node :after ((abox abox1) (node abox-node)) (when *maintain-leaf-nodes-p* (unless (outgoing node) (pushnew node (slot-value abox 'leaf-nodes)))) (when *maintain-deactivated-nodes-p* (setf (slot-value abox 'deactivated-nodes) (delete node (slot-value abox 'deactivated-nodes)))) (when *maintain-active-nodes-p* (when (and nil *reflexive-checks-p* (heap-find-item (slot-value abox 'active-nodes) node)) (error "already on heap!")) (heap-insert (slot-value abox 'active-nodes) node))) ;;; ;;; ;;; (timed-defmethod deactivate-node :around ((abox abox) (node abox-node)) (if (and *reflexive-checks-p* (not (active-p node))) (error "Can't deactivate ~A, is already deactivated!" node) (call-next-method))) (defmethod deactivate-node :after ((abox abox) (node abox-node)) (announce "Deactivating node ~A" node)) (defmethod deactivate-node :after ((abox abox1) (node abox-node)) (when *maintain-deactivated-nodes-p* (push node (slot-value abox 'deactivated-nodes))) (when *maintain-leaf-nodes-p* (unless (outgoing node) (setf (slot-value abox 'leaf-nodes) (delete node (slot-value abox 'leaf-nodes))) (dolist (in (incoming node)) (let ((pre (from in))) (unless (cdr (outgoing pre)) (pushnew pre (slot-value abox 'leaf-nodes))))))) (delete-from-all-heaps abox node) (when *maintain-active-nodes-p* (heap-remove-item (slot-value abox 'active-nodes) node) (when (and nil *reflexive-checks-p* ) (when (heap-find-item (slot-value abox 'active-nodes) node) (error "I've deactivated ~A, but ~A is still on active-nodes!" node))))) ;;; ;;; ;;; (timed-defmethod unregister-deterministically-expanded ((abox abox) (node abox-node)) (setf (slot-value node 'deterministically-expanded-p) nil)) (timed-defmethod register-deterministically-expanded ((abox abox) (node abox-node)) (setf (slot-value node 'deterministically-expanded-p) t)) ;;; ;;; ;;; (defmethod get-state-vector ((node abox-node)) (with-slots (initial-concept address rev-address succ-counter old-p active-p checked-p deleted-p really-satisfiable-p cache-satisfiable-p deterministically-expanded-p realized-p stable-p blocked-by blocking-for cluster-nodes) node (list ;old-p initial-concept address rev-address succ-counter active-p checked-p deleted-p really-satisfiable-p cache-satisfiable-p deterministically-expanded-p realized-p stable-p (copy-list blocked-by) (copy-list blocking-for) (copy-list cluster-nodes)))) (defmethod set-state-vector ((node abox-node) state &optional (maintain-index-structures-p t)) (declare (ignorable maintain-index-structures-p)) (let ((abox (in-graph node))) (with-slots (initial-concept address rev-address succ-counter old-p active-p checked-p deleted-p really-satisfiable-p cache-satisfiable-p deterministically-expanded-p realized-p stable-p blocked-by blocking-for cluster-nodes) node (let ((old-state (list active-p blocking-for blocked-by cache-satisfiable-p))) ;; fuer diese werden in ABox1 extra Indexstrukturen gepflegt! (setf ;old-p (pop state) initial-concept (pop state) address (pop state) rev-address (pop state) succ-counter (pop state) active-p (pop state) checked-p (pop state) deleted-p (pop state) really-satisfiable-p (pop state) cache-satisfiable-p (pop state) deterministically-expanded-p (pop state) realized-p (pop state) stable-p (pop state) blocked-by (pop state) blocking-for (pop state) cluster-nodes (pop state)) (let ((new-state (list active-p blocking-for blocked-by cache-satisfiable-p))) (when maintain-index-structures-p (adjust-index-structures abox node old-state new-state) (when *debug-p* (describe-object abox t)))))) abox)) ;;; ;;; ;;; (timed-defmethod adjust-index-structures ((abox abox) (node abox-node) old-state new-state) (let ((old-active-p (pop old-state)) (old-blocking-for (pop old-state)) (old-blocked-by (pop old-state)) (old-cache-satisfiable-p (pop old-state)) (new-active-p (pop new-state)) (new-blocking-for (pop new-state)) (new-blocked-by (pop new-state)) (new-cache-satisfiable-p (pop new-state)) (*reflexive-checks-p* nil) (*check-if-still-blocked-p* nil)) (unless *rollback-active-p* (error "adjust index structures!")) (when (and old-active-p (not new-active-p)) (deactivate-node abox node)) (when (and (not old-active-p) new-active-p) (activate-node abox node)) (let ((+blocking-for (set-difference new-blocking-for old-blocking-for)) (-blocking-for (set-difference old-blocking-for new-blocking-for)) (+blocked-by (set-difference new-blocked-by old-blocked-by)) (-blocked-by (set-difference old-blocked-by new-blocked-by))) (dolist (blocked +blocking-for) (register-blocking-blocked abox node blocked)) (dolist (blocked -blocking-for) (unregister-blocking-blocked abox node blocked)) (dolist (blocking +blocked-by) (register-blocking-blocked abox blocking node)) (dolist (blocking -blocked-by) (unregister-blocking-blocked abox blocking node))) #| (when (and old-blocked-by (not new-blocked-by)) (princ "adjust index structures") (terpri) (unregister-blocking-blocked abox (first old-blocked-by) node)) (when (and new-blocked-by (not old-blocked-by)) (princ "adjust index structures") (terpri) (register-blocking-blocked abox (first new-blocked-by) node)) |# )) ;;; ;;; ;;; (defmethod blocked-p ((node abox-node)) (when (slot-value node 'blocked-by) t)) (defmethod blocking-p ((node abox-node)) (when (slot-value node 'blocking-for) t)) ;;; ;;; ;;; (timed-defmethod register-blocking-blocked ((abox abox) (blocking abox-node) (blocked abox-node)) (when (and *reflexive-checks-p* (blocked-p blocked)) (error "Node ~A is already blocked!" blocked)) (announce "Blocking ~A, blocked by ~A!" blocked blocking) (incf *blocked-nodes*) (deactivate-node abox blocked) (push blocked (slot-value blocking 'blocking-for)) (push blocking (slot-value blocked 'blocked-by))) (timed-defmethod register-blocking-blocked :after ((abox abox1) (blocking abox-node) (blocked abox-node)) (when *maintain-blocked-nodes-p* (push blocked (slot-value (in-graph blocked) 'blocked-nodes)))) ;;; ;;; ;;; (timed-defmethod unregister-blocking-blocked ((abox abox) (blocking abox-node) (blocked abox-node)) (with-slots (blocked-by) blocked (when (and *reflexive-checks-p* (not (blocked-p blocked))) (error "Node ~A is not blocked!" blocked)) (if (and nil ;;; hier kann man nicht einfach wieder die Blockierung herstellen, ;;; dann kommt die Dependenzverwaltung durcheinander!!!! *check-if-still-blocked-p* (blocking-blocked-p (slot-value abox 'language) blocking blocked)) (progn ;;; immer noch blockiert? ;;; Blockierung beibehalten t) (progn ;;; Blockierung aufheben (announce "Unblocking ~A, blocked by ~A!" blocked blocking) (with-slots (blocking-for) blocking (setf blocked-by (delete blocking blocked-by)) (setf blocking-for (delete blocked blocking-for))) (unless (active-p blocked) (activate-node abox blocked)))))) (timed-defmethod unregister-blocking-blocked :after ((abox abox1) (blocking abox-node) (blocked abox-node)) (when *maintain-blocked-nodes-p* (unless (blocked-p blocked) (setf (slot-value (in-graph blocked) 'blocked-nodes) (delete blocked (slot-value (in-graph blocked) 'blocked-nodes)))))) ;;; ;;; ;;; (timed-defmethod adjust-blocking-dependencies ((abox abox) (node abox-node)) (when *adjust-blocking-dependencies-p* (with-slots (blocked-by blocking-for) node (let ((*reflexive-checks-p* nil)) ;;; Unregister-blocking-blocked meckert sonst, da ;;; ja blocking-blocked-Beziehungen inkrementell ;;; (und nicht sofort) aufgeloest werden (let ((blocked node)) (dolist (blocking blocked-by) (unregister-blocking-blocked abox blocking blocked))) (let ((blocking node)) (dolist (blocked blocking-for) (unregister-blocking-blocked abox blocking blocked))))))) ;;; ;;; ;;; (timed-defmethod add-to-unexpanded ((node abox-node) items) (add-to-unexpanded (description node) items)) (timed-defmethod add-to-expanded ((node abox-node) items) (add-to-expanded (description node) items)) ;;; ;;; ;;; (timed-defmethod delete-from-unexpanded ((node abox-node) items) (delete-from-unexpanded (description node) items)) (timed-defmethod delete-from-expanded ((node abox-node) items) (delete-from-expanded (description node) items)) ;;; ;;; ;;; (timed-defmethod put-from-expanded-to-unexpanded ((concept concept) (node abox-node)) (put-from-expanded-to-unexpanded concept (description node))) (timed-defmethod put-from-unexpanded-to-expanded ((concept concept) (node abox-node)) (put-from-unexpanded-to-expanded concept (description node))) ;;; ;;; ;;; (timed-defmethod add-to-heaps ((abox abox) (node abox-node) (concept concept)) t) (timed-defmethod add-to-heaps ((abox abox1) (node abox-node) (concept concept)) (with-slots (nodes-not-and-expanded nodes-not-atom-expanded nodes-not-or-expanded nodes-not-or-expanded1 nodes-not-some-expanded nodes-not-some-expanded1 nodes-not-feature-expanded nodes-not-feature-expanded1 nodes-not-at-least-expanded nodes-not-at-least-expanded1) abox (typecase concept (atomic-concept (when *maintain-unexpanded-atomic-concepts-heap-p* (unless (has-unexpanded-atomic-concepts-p node) (heap-insert nodes-not-atom-expanded node)))) (and-concept (when *maintain-unexpanded-and-concepts-heap-p* (unless (has-unexpanded-and-concepts-p node) (heap-insert nodes-not-and-expanded node)))) (or-concept (when *maintain-unexpanded-or-concepts1-heap-p* (unless (has-unexpanded-or-concepts-p node) ;; dann ist er schon im Heap! (heap-insert nodes-not-or-expanded1 node))) (when *maintain-unexpanded-or-concepts-heap-p* (unless (has-unexpanded-or-concepts-p node) ;; dann ist er schon im Heap! (heap-insert nodes-not-or-expanded node)))) (at-least-concept (when *maintain-unexpanded-at-least-concepts1-heap-p* (unless (has-unexpanded-at-least-concepts-p node) ;; dann ist er schon im Heap! (heap-insert nodes-not-at-least-expanded1 node))) (when *maintain-unexpanded-at-least-concepts-heap-p* (unless (has-unexpanded-at-least-concepts-p node) (heap-insert nodes-not-at-least-expanded node)))) (attribute-exists-concept (when *maintain-unexpanded-attribute-exists-concepts1-heap-p* (unless (has-unexpanded-attribute-exists-concepts-p node) (heap-insert nodes-not-feature-expanded1 node))) (when *maintain-unexpanded-attribute-exists-concepts-heap-p* (unless (has-unexpanded-attribute-exists-concepts-p node) (heap-insert nodes-not-feature-expanded node)))) (some-concept (when *maintain-unexpanded-some-concepts1-heap-p* (unless (has-unexpanded-some-concepts-p node) (heap-insert nodes-not-some-expanded1 node))) (when *maintain-unexpanded-some-concepts-heap-p* (unless (has-unexpanded-some-concepts-p node) (heap-insert nodes-not-some-expanded node))))))) (timed-defmethod delete-from-heaps ((abox abox) (node abox-node) (concept concept) &optional force-p) (declare (ignorable force-p)) t) (timed-defmethod delete-from-heaps ((abox abox1) (node abox-node) (concept concept) &optional force-p) (with-slots (nodes-not-and-expanded nodes-not-atom-expanded nodes-not-det-expanded nodes-not-or-expanded nodes-not-or-expanded1 nodes-not-some-expanded nodes-not-some-expanded1 nodes-not-feature-expanded nodes-not-feature-expanded1 nodes-not-at-least-expanded nodes-not-at-least-expanded1) abox (typecase concept (atomic-concept (when *maintain-unexpanded-atomic-concepts-heap-p* (when (or force-p (not (has-unexpanded-atomic-concepts-p node))) (heap-remove-item nodes-not-atom-expanded node)))) (and-concept (when *maintain-unexpanded-and-concepts-heap-p* (when (or force-p (not (has-unexpanded-and-concepts-p node))) (heap-remove-item nodes-not-and-expanded node)))) (or-concept (when *maintain-unexpanded-or-concepts1-heap-p* (when (or force-p (not (has-unexpanded-or-concepts-p node))) (heap-remove-item nodes-not-or-expanded1 node))) (when *maintain-unexpanded-or-concepts-heap-p* (when (or force-p (not (has-unexpanded-or-concepts-p node))) (heap-remove-item nodes-not-or-expanded node)))) (at-least-concept (when *maintain-unexpanded-at-least-concepts1-heap-p* (when (or force-p (not (has-unexpanded-at-least-concepts-p node))) (heap-remove-item nodes-not-at-least-expanded1 node))) (when *maintain-unexpanded-at-least-concepts-heap-p* (when (or force-p (not (has-unexpanded-at-least-concepts-p node))) (heap-remove-item nodes-not-at-least-expanded node)))) (attribute-exists-concept (when *maintain-unexpanded-attribute-exists-concepts1-heap-p* (when (or force-p (not (has-unexpanded-attribute-exists-concepts-p node))) (heap-remove-item nodes-not-feature-expanded1 node))) (when *maintain-unexpanded-attribute-exists-concepts-heap-p* (when (or force-p (not (has-unexpanded-attribute-exists-concepts-p node))) (heap-remove-item nodes-not-feature-expanded node)))) (some-concept (when *maintain-unexpanded-some-concepts1-heap-p* (when (or force-p (not (has-unexpanded-some-concepts-p node))) (heap-remove-item nodes-not-some-expanded1 node))) (when *maintain-unexpanded-some-concepts-heap-p* (when (or force-p (not (has-unexpanded-some-concepts-p node))) (heap-remove-item nodes-not-some-expanded node))))))) ;;; ;;; ;;; (timed-defmethod delete-from-all-heaps ((abox abox1) (node abox-node)) (with-slots (nodes-not-and-expanded nodes-not-atom-expanded nodes-not-det-expanded nodes-not-or-expanded nodes-not-or-expanded1 nodes-not-some-expanded nodes-not-some-expanded1 nodes-not-feature-expanded nodes-not-feature-expanded1 nodes-not-at-least-expanded nodes-not-at-least-expanded1) abox (when *maintain-unexpanded-atomic-concepts-heap-p* (heap-remove-item nodes-not-atom-expanded node)) (when *maintain-unexpanded-and-concepts-heap-p* (heap-remove-item nodes-not-and-expanded node)) (when *maintain-unexpanded-or-concepts-heap-p* (heap-remove-item nodes-not-or-expanded node)) (when *maintain-unexpanded-at-least-concepts-heap-p* (heap-remove-item nodes-not-at-least-expanded node)) (when *maintain-unexpanded-attribute-exists-concepts-heap-p* (heap-remove-item nodes-not-feature-expanded node)) (when *maintain-unexpanded-some-concepts-heap-p* (heap-remove-item nodes-not-some-expanded node)) (when (old-p node) (when *maintain-unexpanded-or-concepts1-heap-p* (heap-remove-item nodes-not-or-expanded1 node)) (when *maintain-unexpanded-at-least-concepts1-heap-p* (heap-remove-item nodes-not-at-least-expanded1 node)) (when *maintain-unexpanded-attribute-exists-concepts1-heap-p* (heap-remove-item nodes-not-feature-expanded1 node)) (when *maintain-unexpanded-some-concepts1-heap-p* (heap-remove-item nodes-not-some-expanded1 node))))) ;;; ;;; ;;; (timed-defmethod register-already-known-to-be-satisfiable ((abox abox) (abox-node abox-node)) (when (initial-concept abox-node) (register-concept-is-satisfiable (initial-concept abox-node)))) (timed-defmethod register-already-known-to-be-inconsistent ((abox abox) (abox-node abox-node)) (when (and *reflexive-checks-p* (not (initial-concept abox-node))) (error "no initial concept!")) (register-concept-is-inconsistent (initial-concept abox-node))) ;;; ;;; ;;; (timed-defmethod register-cache-satisfiable ((abox abox) (abox-node abox-node)) (when (and *reflexive-checks-p* (cache-satisfiable-p abox-node)) (error "Node ~A is already registered as cache satisfiable!" abox-node)) (setf (slot-value abox-node 'cache-satisfiable-p) t)) (timed-defmethod register-cache-satisfiable :after ((abox abox1) (abox-node abox-node)) (delete-from-all-heaps abox abox-node) (when *maintain-cache-sat-nodes-p* (push abox-node (slot-value (in-graph abox-node) 'cache-sat-nodes)))) ;;; ;;; ;;; (timed-defmethod register-label-is-stable ((abox abox) (node abox-node)) (register-action change-state nil node) (setf (stable-p node) t) (when *reflexive-checks-p* (when (initial-concept node) (error "Node ~A alread has an initial concept!" node))) (when (or (and *cache-models-p* (root-or-old-p node)) *subtableau-caching-p* ;; beim Subtableau-caching werden ALLE ;; Knoten gecached ) ;; nur wenn das initial-concept gesetzt wird, ;; wird fuer diese Konzept in (defrule cache-models ) ;; das Modell gespeichert! die Existenz von initial-concept ;; bestimmt also, was gecached wird! (setf (slot-value node 'initial-concept) (get-node-concept abox node)))) ;;; ;;; ;;; (defmethod get-node-concept ((abox abox) (node abox-node)) (let ((concepts nil)) (loop-over-node-concepts (concept node) (push concept concepts)) (with-enabled-concept-store (with-protected-concept-store (make-and-concept concepts))))) ;;; ;;; ;;; (timed-defmethod is-successor-p ((succ abox-node) (of abox-node)) (let ((nodes nil)) (labels ((do-it (node) (unless (marked-p node) (mark node) (push node nodes) (or (eq node of) (some #'(lambda (in) (do-it (from in))) (incoming node)))))) (with-new-marking-context (prog1 (do-it succ) (unmark nodes)))))) ;;; ;;; ;;; (timed-defmethod activate-node ((abox abox) (item abox-item)) (register-action change-state nil item) (setf (slot-value item 'active-p) t) (register-action change-state nil item)) (timed-defmethod deactivate-node ((abox abox) (item abox-item)) (register-action change-state nil item) (setf (slot-value item 'active-p) nil) (register-action change-state nil item)) ;;; ;;; (timed-defmethod mark-deleted ((abox abox) (item abox-item)) (register-action change-state nil item) (setf (slot-value item 'deleted-p) t) (register-action change-state nil item) (when (active-p item) (deactivate-node abox item))) (timed-defmethod unmark-deleted ((abox abox) (item abox-item)) (register-action change-state nil item) (setf (slot-value item 'deleted-p) nil) (register-action change-state nil item) (unless (active-p item) (activate-node abox item)))
23,408
Common Lisp
.lisp
557
33.524237
110
0.639487
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
ba1634eb7693d46d67c1917a87c8035898f7faeac3a6739e6eed43eaa64473fd
12,551
[ -1 ]
12,552
tools.lisp
lambdamikel_DLMAPS/src/prover/tools.lisp
;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defun sort-choice-points (cps) (sort (copy-list cps) #'>)) ;;; ;;; ;;; (defmacro avl-tree-insert (entry avl-tree) ;;; entry = (concept info) `(insert-into-avl-tree ,entry ,avl-tree :key #'first :match-fn #'(lambda (x y) (= (id x) (id y))) :compare-fn #'(lambda (x y) (< (id x) (id y))))) (defmacro avl-tree-find (concept avl-tree) `(find-in-avl-tree ,concept ,avl-tree :apply-key-to-item-argument-p nil :key #'first :match-fn #'(lambda (x y) (= (id x) (id y))) :compare-fn #'(lambda (x y) (< (id x) (id y))))) (defmacro avl-tree-delete (concept avl-tree) `(delete-from-avl-tree ,concept ,avl-tree :apply-key-to-item-argument-p nil :key #'first :match-fn #'(lambda (x y) (= (id x) (id y))) :compare-fn #'(lambda (x y) (< (id x) (id y))))) ;;; ;;; Modell Checking: ;;; #| (defmethod satisfied-p ((concept top-concept) (node abox-node)) t) (defmethod satisfied-p ((concept bottom-concept) (node abox-node)) nil) (defmethod satisfied-p ((concept atomic-concept) (node abox-node)) (eq (truth-value concept node) 'true)) (defmethod satisfied-p ((concept and-concept) (node abox-node)) (eq (truth-value concept node) 'true)) (defmethod satisfied-p ((concept or-concept) (node abox-node)) (eq (truth-value concept node) 'true)) (defmethod satisfied-p ((concept some-concept) (node abox-node)) (some #'(lambda (succ) (satisfied-p (qualification concept) succ)) (get-role-successors node (role concept)))) (defmethod satisfied-p ((concept all-concept) (node abox-node)) (every #'(lambda (succ) (satisfied-p (qualification concept) succ)) (get-role-successors node (role concept)))) (defmethod model-p ((abox abox) (concept concept)) (some #'(lambda (node) (satisfied-p concept node)) (get-nodes abox))) (defmethod globally-satisfied-p ((abox abox) (concept concept)) (every #'(lambda (node) (satisfied-p concept node)) (get-nodes abox))) |# ;;; ;;; ;;; (defmethod get-expanded-concept-lists (node) (let ((atoms nil) (somes nil) (alls nil) (ands nil) (ors nil) (features nil) (at-leasts nil) (at-mosts nil)) (loop-over-node-slot (concept node expanded-atomic-concepts) (push concept atoms)) (loop-over-node-slot (concept node expanded-and-concepts) (push concept ands)) (loop-over-node-slot (concept node expanded-or-concepts) (push concept ors)) (loop-over-node-slot (concept node expanded-some-concepts) (push concept somes)) (loop-over-node-slot (concept node expanded-all-concepts) (push concept alls)) (loop-over-node-slot (concept node expanded-attribute-exists-concepts) (push concept features)) (loop-over-node-slot (concept node expanded-at-least-concepts) (push concept at-leasts)) (loop-over-node-slot (concept node expanded-at-most-concepts) (push concept at-mosts)) (values atoms ands ors somes alls features at-leasts at-mosts))) (defmethod get-unexpanded-concept-lists (node) (let ((atoms nil) (somes nil) (alls nil) (ands nil) (ors nil) (features nil) (at-leasts nil) (at-mosts nil)) (loop-over-node-slot (concept node unexpanded-atomic-concepts) (push concept atoms)) (loop-over-node-slot (concept node unexpanded-and-concepts) (push concept ands)) (loop-over-node-slot (concept node unexpanded-or-concepts) (push concept ors)) (loop-over-node-slot (concept node unexpanded-some-concepts) (push concept somes)) (loop-over-node-slot (concept node unexpanded-all-concepts) (push concept alls)) (loop-over-node-slot (concept node unexpanded-attribute-exists-concepts) (push concept features)) (loop-over-node-slot (concept node unexpanded-at-least-concepts) (push concept at-leasts)) (loop-over-node-slot (concept node unexpanded-at-most-concepts) (push concept at-mosts)) (values atoms ands ors somes alls features at-leasts at-mosts))) ;;; ;;; ;;; (defmethod describe-object ((node abox-node) stream) (labels ((concepts (concepts) (mapcar #'(lambda (c) (list c (get-choice-points c :node node))) concepts))) (multiple-value-bind (u-atoms u-ands u-ors u-somes u-alls u-features u-at-leasts u-at-mosts) (get-unexpanded-concept-lists node) (multiple-value-bind (e-atoms e-ands e-ors e-somes e-alls e-features e-at-leasts e-at-mosts) (get-expanded-concept-lists node) (let ((u-atoms (sort u-atoms #'string-lessp :key #'(lambda (x) (symbol-name (name x))))) (e-atoms (sort e-atoms #'string-lessp :key #'(lambda (x) (symbol-name (name x)))))) (format stream "~%~%#<ABOX Node ID ~W NAME ~W REPRESENTATIVE ~W CLUSTER NODES ~W OLD ~W INITIAL CONCEPT ~W CREATOR ~W BLOCKED BY ~W BLOCKING FOR ~W ACTIVE ~W STABLE ~W DETERM.EXPANDED ~W REALLY SAT ~W CACHE SAT ~W DELETED ~W TOLD ~W ------------------------------- UNEXPANDED POSITIVE ATOMS ~W UNEXPANDED NEGATIVE ATOMS ~W UNEXPANDED ANDS ~W UNEXPANDED ORS ~W UNEXPANDED SOMES ~W UNEXPANDED ALLS ~W UNEXPANDED FEATURES ~W UNEXPANDED AT-LEAST ~W UNEXPANDED AT-MOST ~W ------------------------------- EXPANDED POSITIVE ATOMS ~W EXPANDED NEGATIVE ATOMS ~W EXPANDED ANDS ~W EXPANDED ORS ~W EXPANDED SOMES ~W EXPANDED ALLS ~W EXPANDED FEATURES ~W EXPANDED AT-LEAST ~W EXPANDED AT-MOST ~W~%>" (slot-value node 'id) (name node) (representative-p node) (mapcar #'id (cluster-nodes node)) (old-p node) (initial-concept node) (created-by node) (slot-value node 'blocked-by) (slot-value node 'blocking-for) (slot-value node 'active-p) (slot-value node 'stable-p) (slot-value node 'deterministically-expanded-p) (slot-value node 'really-satisfiable-p) (slot-value node 'cache-satisfiable-p) (slot-value node 'deleted-p) (slot-value node 'told-concepts) (concepts (remove-if #'negated-p u-atoms)) (concepts (remove-if-not #'negated-p u-atoms)) (concepts u-ands) (concepts u-ors) (concepts u-somes) (concepts u-alls) (concepts u-features) (concepts u-at-leasts) (concepts u-at-mosts) (concepts (remove-if #'negated-p e-atoms)) (concepts (remove-if-not #'negated-p e-atoms)) (concepts e-ands) (concepts e-ors) (concepts e-somes) (concepts e-alls) (concepts e-features) (concepts e-at-leasts) (concepts e-at-mosts))))))) (defmethod describe-object ((abox abox) stream) (format stream "#<~A ~A, Nodes : ~A, Old : ~A, Active : ~A, Inactive : ~A, Blocked : ~A, Leafs : ~A, Cache Sat: ~A, Edges: ~A>~%" (type-of abox) (name abox) (mapcar #'id (get-nodes abox)) (mapcar #'id (get-old-nodes abox)) (mapcar #'id (get-active-nodes abox)) (mapcar #'id (get-deactivated-nodes abox)) (mapcar #'id (get-blocked-nodes abox)) (mapcar #'id (get-leaf-nodes abox)) (mapcar #'id (get-cache-sat-nodes abox)) (let ((*print-pretty* t)) (mapcar #'(lambda (x) (format nil "(~A,~A):~A[~A] x ~A" (id (from x)) (id (to x)) (multiplicity x) (inverse-multiplicity x) (textual-description (description x)))) (get-edges abox))))) (defmethod describe-object :after ((abox abox1) stream) (with-slots (active-nodes cache-sat-nodes deactivated-nodes old-nodes leaf-nodes blocked-nodes nodes-not-and-expanded nodes-not-atom-expanded nodes-not-det-expanded nodes-not-or-expanded nodes-not-or-expanded1 nodes-not-some-expanded nodes-not-some-expanded1 nodes-not-feature-expanded nodes-not-feature-expanded1 nodes-not-at-least-expanded nodes-not-at-least-expanded1) abox (format stream "#<~A ~A, (M=Maintained) Index Structures: Old : M=~A ~A, Active : M=~A ~A, Inactive : M=~A ~A, Blocked : M=~A ~A, Leafs : M=~A ~A, Cache Sat: M=~A ~A, nodes-not-or-expanded : M=~A, ~A, nodes-not-or-expanded1 : M=~A, ~A, nodes-not-some-expanded : M=~A, ~A, nodes-not-some-expanded1 : M=~A, ~A, nodes-not-feature-expanded : M=~A, ~A, nodes-not-feature-expanded1 : M=~A, ~A, nodes-not-at-least-expanded : M=~A, ~A, nodes-not-at-least-expanded1 : M=~A, ~A>~%" (type-of abox) (name abox) *maintain-old-nodes-p* (mapcar #'id old-nodes) *maintain-active-nodes-p* (if active-nodes (mapcar #'id (heap-items active-nodes)) :no-heap) *maintain-deactivated-nodes-p* (mapcar #'id deactivated-nodes) *maintain-blocked-nodes-p* (mapcar #'id blocked-nodes) *maintain-leaf-nodes-p* (mapcar #'id leaf-nodes) *maintain-cache-sat-nodes-p* (mapcar #'id cache-sat-nodes) *maintain-unexpanded-or-concepts-heap-p* (mapcar #'id (heap-items nodes-not-or-expanded)) *maintain-unexpanded-or-concepts1-heap-p* (mapcar #'id (heap-items nodes-not-or-expanded1)) *maintain-unexpanded-some-concepts-heap-p* (mapcar #'id (heap-items nodes-not-some-expanded)) *maintain-unexpanded-some-concepts1-heap-p* (mapcar #'id (heap-items nodes-not-some-expanded1)) *maintain-unexpanded-attribute-exists-concepts-heap-p* (mapcar #'id (heap-items nodes-not-feature-expanded)) *maintain-unexpanded-attribute-exists-concepts1-heap-p* (mapcar #'id (heap-items nodes-not-feature-expanded1)) *maintain-unexpanded-at-least-concepts-heap-p* (mapcar #'id (heap-items nodes-not-at-least-expanded)) *maintain-unexpanded-at-least-concepts1-heap-p* (mapcar #'id (heap-items nodes-not-at-least-expanded1))))) (defmethod describe-object ((edge abox-edge) stream) (let ((*print-pretty* t)) (format stream "#<~A/~A = (~A/~A,~A/~A): ~A x ~A [~A] / ~A [~A], ~A x ~A>" (name edge) (id edge) (name (from edge)) (id (from edge)) (name (to edge)) (id (to edge)) (multiplicity edge) (role edge) (slot-value edge 'choice-points) (if (aux-description edge) (textual-description (aux-description edge)) 'none) (if (aux-description edge) (slot-value (aux-description edge) 'choice-points) '()) (inverse-multiplicity edge) `(inv ,(role edge))))) ;;; ;;; ;;; (defmethod kind ((node abox-node)) (mapcar #'(lambda (x) (sort x #'< :key #'id)) (cons (slot-value node 'told-concepts) (multiple-value-call #'list (get-expanded-concept-lists node))))) (defmethod kind ((edge abox-edge)) (role edge)) ;;; ;;; ;;; (defmethod info ((item abox-node) &key &allow-other-keys) (format nil "ID:~A NAME:~A" (id item) (name item))) (defmethod info ((item abox-edge) &key for-graph-visualizer-p) (let ((*print-pretty* t)) (if for-graph-visualizer-p (format nil "<~A,~A>: ~A-~A / ~A-(INV ~A)" (id (from item)) (id (to item)) (multiplicity item) (role item) (inverse-multiplicity item) (role item)) (format nil "~A/~A <~A,~A>: ~A-~A / ~A-(INV ~A)," (name item) (id item) (id (from item)) (id (to item)) (multiplicity item) (role item) (inverse-multiplicity item) (role item))))) (defmethod info ((abox abox) &key &allow-other-keys) (describe abox nil)) ;;; ;;; ;;; (defmethod print-object ((abox abox) stream) (format stream "#<~A ~A/~A/~A>" (type-of abox) (name abox) (id abox) (satisfiable abox))) (defmethod print-object ((item abox-node) stream) (format stream "#<~A ~A>" (type-of item) (info item))) (defmethod print-object ((item abox-edge) stream) (format stream "#<~A ~A ~A>" (type-of item) (info item) (get-choice-points item))) ;;; ;;; ;;; (defun latex-translate-concept (concept) (if (symbolp concept) (format nil "\\mi{~(~A~)}" (stringsubst-char-with-string (symbol-name concept) #\- "\\_")) (let ((op (first concept))) (case op (not (format nil "\\neg ~A" (latex-translate-concept (second concept)))) ((and or) (let ((args (splice-in (if (eq op 'or) "\\sqcup" "\\sqcap") (mapcar #'latex-translate-concept (rest concept))))) (format nil "~A" args))) (=> (format nil "~A \\Rightarrow ~A" (latex-translate-concept (second concept)) (latex-translate-concept (third concept)))) (<= (format nil "~A \\Leftarrow ~A" (latex-translate-concept (second concept)) (latex-translate-concept (third concept)))) (<=> (format nil "~A \\Leftrightarrow ~A" (latex-translate-concept (second concept)) (latex-translate-concept (third concept)))) (some (format nil "( \\dex{\\rn{~A}}{~A} )" (second concept) (latex-translate-concept (third concept)))) (all (format nil "( \\dax{\\rn{~A}}{~A} )" (second concept) (latex-translate-concept (third concept)))))))) #| (defmethod latex-export ((obj tbox) fn) (with-open-file (stream fn :direction :output :if-exists :supersede) (format stream "\\begin{equalities}~%") (dolist (def (reverse (definitions obj))) (when (org-concept def) (if (primitive-p def) (format stream "\\tsubs{~A}{~A}~%" (translate-concept (name def)) (translate-concept (org-concept def))) (format stream "\\tequi{~A}{~A}~%" (translate-concept (name def)) (translate-concept (org-concept def)))))) (format stream "\\end{equalities}~%"))) |# ;;; ;;; ;;; (defun visualize-taxonomy (&optional (tbox *cur-tbox*)) (visualize-dag (taxonomy (find-tbox tbox :error-p t)) :view #+:clim :graphically #-:clim :textually)) #+:clim (defun visualize-abox (&optional (abox *cur-abox*)) (visualize (find-abox abox :error-p t))) (defun compute-all-subsets (set &optional (akku '(nil))) (let ((newakku akku)) (mapl #'(lambda (lset) (let ((item (first lset))) (unless (some #'(lambda (set) (member item set)) newakku) (dolist (expand akku) (let ((new (cons item expand))) (push new newakku))) (setf newakku (compute-all-subsets (rest lset) newakku))))) set) newakku)) (defun compute-all-subsets-of-cardinality (set m) (let ((all nil)) (labels ((do-it (set n) (cond ((zerop n) (list nil)) (t (let ((local nil)) (mapl #'(lambda (res) (let* ((item (first res)) (res (do-it (rest res) (1- n)))) (dolist (res res) (push (cons item res) local) (when (= m n) (push (cons item res) all))))) set) local))))) (do-it set m) all))) (defmacro loop-over-subsets-of-cardinality ((subset set card) &body body) (let ((n (gensym)) (akku (gensym)) (remset (gensym)) (i (gensym))) `(labels ((do-it (,remset ,n ,akku) (if (zerop ,n) (let ((,subset ,akku)) ,@body) (loop as ,remset on ,remset as ,i = (first ,remset) do (do-it (rest ,remset) (1- ,n) (cons ,i ,akku)))))) (do-it ,set ,card nil)))) ;;; ;;; ;;; (defun topo-sort (nodes smaller-p) (labels ((do-it (root-nodes) (let ((next-layer (delete-duplicates (remove-if-not #'(lambda (y) (some #'(lambda (x) (funcall smaller-p x y)) root-nodes)) nodes)))) (nconc root-nodes (when next-layer (do-it next-layer)))))) (let ((root-nodes (remove-if #'(lambda (x) (some #'(lambda (y) (funcall smaller-p y x)) nodes)) nodes))) (delete-duplicates (do-it root-nodes))))) (defun find-cluster (nodes smaller-p) (setf nodes (remove-duplicates nodes)) (labels ((do-it (start-node node cycle rem-nodes) (if (member node cycle) cycle (let ((next-layer (remove-if-not #'(lambda (y) (funcall smaller-p node y)) rem-nodes))) (let ((res nil)) (dolist (next next-layer) (dolist (found (do-it start-node next (cons node cycle) (remove next rem-nodes))) (push found res))) res))))) (let ((clusters nil)) (loop while nodes do (let* ((node (first nodes)) (cluster (do-it node node nil nodes))) (setf nodes (set-difference nodes (cons node cluster))) (when cluster (push cluster clusters)))) clusters))) ;;; ;;; ;;; (defun concepts-left () (- (length *nodes*) (position *node* *nodes*))) (defun monitor () (loop (sleep 1) (princ *concept*) (princ " ") (princ *node*) (princ " ") (princ (concepts-left)) (terpri))) (defun statistics-monitor () (reset-statistics) (loop (sleep 3) (show-statistics)))
21,173
Common Lisp
.lisp
545
26.568807
98
0.502396
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
1b280031783ee29b03ac4f858bdb943dc436c7766bb1de65e1576a2a30cccea1
12,552
[ -1 ]
12,553
interface4.lisp
lambdamikel_DLMAPS/src/prover/interface4.lisp
;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; Interface: Reduktion aller Inferenzen auf ABox-Sat! ;;; Achtung: Consistent-p ist von descriptions.lisp geerbt ;;; (defmethod consistent-p ((concept and-concept) &rest args &key subsumption-test-p (use-cached-models-p *use-cached-models-p*) &allow-other-keys) (if (and use-cached-models-p (register-concept-mm-query) (models-of-concepts-mergeable-p (get-language concept) (arguments concept))) (progn (register-concept-mm-hit) (=> subsumption-test-p (register-subsumption-mm-hit)) (register-concept-is-satisfiable concept) t) (progn (apply #'call-next-method concept args)))) ;;; ;;; ;;; #+:use-membership-tables (defconstant +uex-table+ (make-weak-hash-table :size 10000 :rehash-size 10000 :test #'equalp)) #+:use-membership-tables (defconstant +ex-table+ (make-weak-hash-table :size 10000 :rehash-size 10000 :test #'equalp)) (defmethod consistent-p :before ((concept concept) &rest args) (declare (ignorable args)) (register-true-concept-query)) (defmethod consistent-p ((concept concept) &rest args &key (maintain-prover-state-p *maintain-prover-state-p* mps-specified-p) subsumption-test-p type tbox &allow-other-keys) (let* ((tbox (or tbox *cur-tbox*)) (type (or type (get-abox-type-for-tbox (tbox concept)))) (name 'temp-abox) (*dont-invalidate-store-p* t) (*create-membership-tables-p* nil) (*store-ind-models-p* nil)) (register-abox-consistency-test) (when subsumption-test-p (register-abox-subsumption-test)) (with-abox* (name :tbox tbox :type type :language (get-language concept) :delete-if-exists-p t) #+:use-membership-tables (progn (clrhash +uex-table+) (clrhash +ex-table+) (setf (unexpanded-table *cur-abox*) +uex-table+) (setf (expanded-table *cur-abox*) +ex-table+)) (let ((concept-sat-node (create-abox-node *cur-abox* 'temp :old-p nil))) ;; :old-p nil ist wichtig! sonst bringt das die Strategie durcheinander!!! (node-instance concept-sat-node concept) (let ((res (apply #'abox-sat-p *cur-abox* :maintain-prover-state-p (if mps-specified-p maintain-prover-state-p t) ;;; ist doch eine Einmal-ABox! ;;; warum soll ich ein Rollback machen? ;;; ist teuer! ;;; ;;; doch es gibt doch einen Grund: ;;; die Unsat-Caches werden dann gefuellt!!! args))) (delete-abox *cur-abox*) (return-from consistent-p res)))))) ;;; ;;; ;;; (defmacro with-new-temp-abox-name (&body body) `(let ((*temp-abox-name* (1+ *temp-abox-name*))) ,@body)) ;;; ;;; ;;; (defmethod inconsistent-p ((concept concept) &rest args) (not (apply #'consistent-p concept args))) (defmethod tautological-p ((concept concept) &rest args) (apply #'inconsistent-p (get-negated-concept concept) args)) ;;; ;;; ;;; (defmethod sat-p ((concept concept) &rest args &key recompute-p &allow-other-keys) (when recompute-p (reset-sat-status concept)) (register-concept-query) (apply #'consistent-p concept args)) (defmethod sat-p (concept &rest args &key tbox &allow-other-keys) (let ((*cur-store* (if tbox (concept-store tbox) (concept-store *cur-tbox*)))) (apply #'sat-p (with-protected-concept-store (parse-concept concept)) args))) (defmethod sat-p ((abox abox) &rest args &key &allow-other-keys) (apply #'abox-sat-p abox args)) ;;; ;;; Implies-p ist von descriptions2.lisp geerbt! ;;; (defmethod implies-p ((concept1 concept) (concept2 concept) &rest args &key (use-cached-models-p *use-cached-models-p*) (cache-models-p *cache-models-p*) (use-told-subsumers-p *use-told-subsumers-p*) &allow-other-keys) (register-subsumption-query) (cond ;;; die Klauseln sind beim Klassifizieren nicht wirksam, ;;; da compute-node-children / parents schon optimiert sind ((and use-told-subsumers-p (member concept2 (told-subsumers concept1))) (register-subsumption-ts-hit) t) ((and use-told-subsumers-p (member (get-negated-concept concept1) (told-subsumers (get-negated-concept concept2)))) (register-subsumption-ts-hit) t) ((and use-told-subsumers-p (member concept2 (told-subsumers (get-negated-concept concept1)))) (register-subsumption-ts-hit) nil) ((and use-told-subsumers-p (member concept1 (told-subsumers (get-negated-concept concept2)))) (register-subsumption-ts-hit) nil) (t (let* ((concept2 (with-disabled-concept-store (with-protected-concept-store (make-not-concept concept2)))) (and-concept (with-disabled-concept-store (with-protected-concept-store (make-and-concept (list concept2 concept1)))))) (when use-cached-models-p (when (already-known-to-be-satisfiable-p and-concept) (return-from implies-p nil)) (when (already-known-to-be-inconsistent-p and-concept) (return-from implies-p t)) (when (and (or (not (cached-models concept2)) ;(not (instance-retrieval-model concept2)) ) cache-models-p) (unless (apply #'sat-p concept2 ;:store-instance-retrieval-model-p t :cache-models-p t :recompute-p t args) (return-from implies-p t))) (when (and (or (not (cached-models concept1)) ;(not (instance-retrieval-model concept1)) ) cache-models-p) (unless (apply #'sat-p concept1 ;:store-instance-retrieval-model-p t :cache-models-p t :recompute-p t args) (return-from implies-p t))) (unless (cached-models concept1) (error "No cached models for ~A?!" concept1)) ;; (unless (instance-retrieval-model concept1) ;; (error "No instance retrieval model for ~A?!" concept1)) (unless (cached-models concept2) (error "No cached models for ~A?!" concept2)) ;; (unless (instance-retrieval-model concept2) ;; (error "No instance retrieval model for ~A?!" concept2))) #| (when (models-surely-not-mergeable-p +dl+ (instance-retrieval-model concept2) (instance-retrieval-model concept1)) (return-from implies-p t) |# ) (register-true-subsumption-query) (not (apply #'sat-p and-concept :subsumption-test-p t args)))))) (defmethod implies-p ((b concept) (a top-concept) &rest args) t) (defmethod implies-p ((b top-concept) (a concept) &rest args) nil) (defmethod implies-p ((b concept) (a bottom-concept) &rest args) nil) (defmethod implies-p ((b bottom-concept) (a concept) &rest args) t) ;;; ;;; ;;; (defmethod subsumes-p ((concept1 concept) (concept2 concept) &rest args) (apply #'implies-p concept2 concept1 args)) (defmethod subsumes-p (concept1 concept2 &rest args &key tbox &allow-other-keys) (let ((*cur-store* (if tbox (concept-store tbox) (concept-store *cur-tbox*)))) (apply #'subsumes-p (with-protected-concept-store (parse-concept concept1)) (with-protected-concept-store (parse-concept concept2)) args))) ;;; ;;; ;;; (defmethod equivalent-p ((concept1 concept) (concept2 concept) &rest args) (and (apply #'implies-p concept2 concept1 args) (apply #'implies-p concept1 concept2 args))) (defmethod equivalent-p (concept1 concept2 &rest args &key tbox &allow-other-keys) (let ((*cur-store* (if tbox (concept-store tbox) (concept-store *cur-tbox*)))) (apply #'equivalent-p (with-protected-concept-store (parse-concept concept1)) (with-protected-concept-store (parse-concept concept2)) args))) ;;; ;;; Eigene Syntax: ;;; (defmacro sat? (expr &rest args) `(sat-p (quote ,expr) ,@args)) (defmacro subsumes? (concept1 concept2 &rest args) `(subsumes-p ',concept1 ',concept2 ,@args)) (defmacro equivalent? (concept1 concept2 &rest args) `(equivalent-p ',concept1 ',concept2 ,@args))
9,511
Common Lisp
.lisp
233
29.579399
97
0.57146
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
13161c443f66acf9441b4399aad5a57b2cd637ab4f1e90bed51e790847426c9d
12,553
[ -1 ]
12,554
abox-interface.lisp
lambdamikel_DLMAPS/src/prover/abox-interface.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; ;;; (defmethod node-instance ((ind abox-node) (concept concept) &rest args) (declare (ignorable args)) (unless *dont-invalidate-store-p* (note-abox-has-changed (in-graph ind)) (reset-sat-status ind)) (push concept (slot-value ind 'told-concepts))) (defmethod node-forget ((ind abox-node) (concept concept) &rest args) (declare (ignorable args)) (unless *dont-invalidate-store-p* (note-abox-has-changed (in-graph ind)) (reset-sat-status ind)) (setf (slot-value ind 'told-concepts) (delete concept (slot-value ind 'told-concepts)))) ;;; ;;; ;;; (defmethod node-instance ((ind abox-node) concept &rest args) (apply #'node-instance ind (with-protected-concept-store (parse-concept (or concept 'top))) args)) (defmethod node-forget ((ind abox-node) concept &rest args) (apply #'node-forget ind (with-protected-concept-store (parse-concept (or concept 'top))) args)) ;;; ;;; ;;; (defmethod node-instance ((ind symbol) concept &rest args) (apply #'node-instance (or (apply #'find-node *cur-abox* ind :error-p nil args) (apply #'create-abox-node *cur-abox* ind args)) concept args)) (defmethod node-forget ((ind symbol) concept &rest args) (apply #'node-forget (apply #'find-node *cur-abox* ind :error-p t args) concept args)) ;;; ;;; ;;; (defmethod prepare :around ((abox abox) (language dl)) (unless (prepared-p abox) (call-next-method))) (defmethod prepare ((abox abox) (language dl)) (with-slots (prepared-p satisfiable ready-for-retrieval action-timestamp-counter current-action choice-point-counter cur-clash-node language ) abox (setf satisfiable :not-tested language nil ready-for-retrieval nil action-timestamp-counter 0 current-action nil choice-point-counter 0 cur-clash-node nil) #+:use-membership-tables (progn (clrhash (unexpanded-table abox)) (clrhash (expanded-table abox))) (loop-over-abox-nodes (node abox) (dolist (slot '(initial-concept choice-points really-satisfiable-p cache-satisfiable-p stable-p)) (setf (slot-value node slot) nil)) (reset-label (description node)) (reset-sat-status (in-graph node))) (loop-over-abox-edges (edge abox) (reset-label (description edge)) (with-protected-concept-store (parse-concept `(some ,(role edge) top)))) ;;; Sprache muss hier schon berechnet werden, ;;; wegen register-as-unexpadned -> adjust-blocking-dependencies -> language! (setf language (get-language (tbox abox))) (register-told-concepts abox +dl+) (prepare-index-structures abox) (setf prepared-p t) abox)) ;;; ;;; ;;; (defmethod prepare-index-structures ((abox abox)) t) (defmethod prepare-index-structures ((abox abox1)) ;;; initial werden nun alle Indexstrukturen vorbereitet, ;;; sie muessen ja spaeter nicht genutzt werden (beim Beweis!) (let ((*maintain-old-nodes-p* nil) (*maintain-leaf-nodes-p* nil) (*maintain-deactivated-nodes-p* nil) (*maintain-active-nodes-p* nil) (*maintain-cache-sat-nodes-p* nil) (*maintain-blocked-nodes-p* nil)) (with-slots (old-nodes cache-sat-nodes deactivated-nodes leaf-nodes blocked-nodes active-nodes nodes-not-and-expanded nodes-not-atom-expanded nodes-not-or-expanded nodes-not-some-expanded nodes-not-feature-expanded nodes-not-at-least-expanded nodes-not-or-expanded1 nodes-not-some-expanded1 nodes-not-feature-expanded1 nodes-not-at-least-expanded1) abox (setf nodes-not-or-expanded1 (create-heap #'older-p) nodes-not-some-expanded1 (create-heap #'older-p) nodes-not-feature-expanded1 (create-heap #'older-p) nodes-not-at-least-expanded1 (create-heap #'older-p)) (setf nodes-not-and-expanded (create-heap #'left-of-p) nodes-not-atom-expanded (create-heap #'left-of-p) nodes-not-or-expanded (create-heap #'left-of-p) nodes-not-some-expanded (create-heap #'left-of-p) nodes-not-feature-expanded (create-heap #'left-of-p) nodes-not-at-least-expanded (create-heap #'left-of-p)) (loop-over-blocked-nodes (node abox) (deactivate-node abox node)) (setf active-nodes (create-heap #'left-of-p)) (dolist (node (get-active-nodes abox)) (heap-insert active-nodes node)) (setf old-nodes (get-old-nodes abox) cache-sat-nodes (get-cache-sat-nodes abox) deactivated-nodes (get-deactivated-nodes abox) leaf-nodes (get-leaf-nodes abox) blocked-nodes (get-blocked-nodes abox)) (loop-over-abox-nodes (node abox) (when (has-unexpanded-or-concepts-p node) (heap-insert nodes-not-or-expanded node) (heap-insert nodes-not-or-expanded1 node)) (when (has-unexpanded-attribute-exists-concepts-p node) (heap-insert nodes-not-feature-expanded node) (heap-insert nodes-not-feature-expanded1 node)) (when (has-unexpanded-some-concepts-p node) (heap-insert nodes-not-some-expanded node) (heap-insert nodes-not-some-expanded1 node)) (when (has-unexpanded-at-least-concepts-p node) (heap-insert nodes-not-at-least-expanded node) (heap-insert nodes-not-at-least-expanded1 node)))))) ;;; ;;; ;;; (defmethod register-told-concepts :around ((abox abox1) (language dl)) (let ((*maintain-unexpanded-atomic-concepts-heap-p* nil) (*maintain-unexpanded-atomic-concepts1-heap-p* nil) (*maintain-unexpanded-and-concepts-heap-p* nil) (*maintain-unexpanded-and-concepts-heap1-p* nil) (*maintain-unexpanded-or-concepts-heap-p* nil) (*maintain-unexpanded-or-concepts1-heap-p* nil) (*maintain-unexpanded-some-concepts-heap-p* nil) (*maintain-unexpanded-some-concepts1-heap-p* nil) (*maintain-unexpanded-at-least-concepts-heap-p* nil) (*maintain-unexpanded-at-least-concepts1-heap-p* nil) (*maintain-unexpanded-attribute-exists-concepts-heap-p* nil) (*maintain-unexpanded-attribute-exists-concepts1-heap-p* nil)) (call-next-method))) (defmethod register-told-concepts ((abox abox) (language dl)) (loop-over-abox-nodes (node abox) (dolist (constraint *meta-constraints*) (pushnew constraint (slot-value node 'told-concepts)))) (loop-over-abox-edges (edge abox) (let* ((role (role edge)) (domain (role-domain role)) (range (role-range role)) (from (from edge)) (to (to edge))) (when domain (pushnew domain (slot-value from 'told-concepts))) (when range (pushnew range (slot-value to 'told-concepts)))) (register-as-unexpanded edge :comment 'initialize-present-edge-for-new-abox ;; choice points nur für ;; nicht-disjunktive vergeben; :error-p nil :new-choice-point (unless (underspecified-p edge) 0))) (let ((*adjust-blocking-dependencies-p* nil)) ;;; Blockierungen beibehalten! (loop-over-abox-nodes (node abox) (dolist (concept (told-concepts node)) (if (on-tableau-p node (get-negated-concept concept)) (return-from register-told-concepts nil) (unless (on-tableau-p node concept) (register-as-unexpanded concept :node node :new-choice-point 0))))))) (defmethod register-told-concepts-as-expanded ((abox abox) (language dl)) (let ((*reflexive-checks-p* nil)) ;;; keine History-Objekte (loop-over-abox-edges (edge abox) (register-as-unexpanded edge :comment 'initialize-present-edge-for-new-abox ;; choice points nur für ;; nicht-disjunktive vergeben; :error-p nil :new-choice-point (unless (underspecified-p edge) 0))) (let ((*adjust-blocking-dependencies-p* nil)) ;;; Blockierungen beibehalten! (loop-over-abox-nodes (node abox) (dolist (concept (told-concepts node)) (register-as-expanded concept :node node)))))) ;;; ;;; ;;; (defmethod abox-sat-p :around ((abox abox) &rest args &key recompute-p &allow-other-keys) (if (or (eq (slot-value abox 'satisfiable) :not-tested) recompute-p) (setf (slot-value abox 'satisfiable) (progn (prepare abox +dl+) (call-next-method))) (slot-value abox 'satisfiable))) (defmethod abox-sat-p :before ((abox abox) &rest args) (prepare (tbox abox) +dl+)) (defmethod abox-sat-p ((abox abox) &rest args &key (language (get-language abox)) &allow-other-keys) (apply #'prover-init 'abox-sat (make-language language) abox args)) (defmethod abox-sat-p (abox &rest args) (apply #'abox-sat-p (find-abox abox :error-p t) args)) ;;; ;;; Eigene Macros ;;; (defmacro abox-sat? (abox &rest args) `(abox-sat-p (quote ,abox) ,@args)) (defmacro abox-sat*? (abox &rest args) `(abox-sat-p ,abox ,@args)) ;;; ;;; ;;; (defmacro abox-realized*? (abox &rest args) `(abox-realized-p ,abox ,@args)) ;;; ;;; ;;; (defmacro ins (name def &rest args) `(node-instance ',name ',def ,@args)) (defmacro for (name def &rest args) `(node-forget ',name ',def ,@args)) (defmacro rel (a b role &rest args) `(relate ',a ',b ',role ,@args :error-p nil)) (defmacro unrel (a b role &rest args) `(unrelate ',a ',b ',role ,@args)) (defmacro del (name &rest args) `(delete-node *cur-abox* ',name ,@args))
10,678
Common Lisp
.lisp
269
30.219331
106
0.598849
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
a529082af5cc155a77f97c2eafc030c9abfc25a6fa00a5180aa0ff9ba958420b
12,554
[ -1 ]
12,555
feature-expansion.lisp
lambdamikel_DLMAPS/src/prover/feature-expansion.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defrule feature-expansion (dl-with-features abox) (multiple-value-bind (ae-concept relevant-ae-concepts node) (select-attribute-exists-concepts abox *strategy* language) (cond ((not node) +insert-negative-code+) (t (let* ((feature (role ae-concept)) (succs (apply #'append (mapcar #'(lambda (f) (get-role-successors node f)) (cons feature (remove-if-not #'feature-p (all-superroles feature)))))) ;;; s. Beispiel im ALCHF-RPLUS-Prover f. Begruendung! ;;; eigentlich sollte das unnoetig sein -> look-for-somes in ;;; in deterministic-expansion.lisp? look-for-features? (succ nil)) ;;; (format t "SUccs: ~A" succs) (when (cdr succs) (error "Found more than one successor of ~A for feature ~A!" node feature)) (if succs (let ((succ (first succs))) (dolist (ae-concept relevant-ae-concepts) (register-as-expanded ae-concept :comment 'expand-unexpanded-attribute-exists-concept-due-to-present-successor :node node :depends-on (created-by succ))) (perform (compute-new-feature-successor-label :succ succ :node node :ae-concept ae-concept :relevant-ae-concepts relevant-ae-concepts))) (progn (dolist (ae-concept relevant-ae-concepts) (register-as-expanded ae-concept :comment 'expand-unexpanded-attribute-exists-concept-no-preconditions :node node)) (unless succs (announce "Expanding ~A : ~A, others: ~A - creating new node" node ae-concept relevant-ae-concepts)) (setf succ (create-anonymous-node abox :depends-on (list (list node ae-concept)))) (let ((and-feature (create-and-role (mapcar #'role relevant-ae-concepts) :feature-p t))) (relate node succ and-feature :old-p nil :depends-on (list (list node ae-concept))) (perform (compute-new-feature-successor-label :succ succ :node node :ae-concept ae-concept :relevant-ae-concepts relevant-ae-concepts))))) +insert-positive-code+))))) ;;; ;;; ;;; (defrule compute-new-feature-successor-label (dl abox :args (succ node ae-concept relevant-ae-concepts)) (dolist (ae-concept2 relevant-ae-concepts) (let ((qualification (qualification ae-concept2)) (deps (list ;(list node ae-concept) (list node ae-concept2)))) (unless (on-tableau-p succ qualification) (let ((added (register-as-unexpanded qualification :node succ :depends-on deps))) (check-for-clash succ added))) (let ((role-range (role-range (role ae-concept2)))) (when role-range (unless (on-tableau-p succ role-range) (let ((added (register-as-unexpanded role-range :node succ :depends-on deps))) (check-for-clash succ added))))))) (add-meta-constraints succ)) (defrule compute-new-feature-successor-label (dl-with-combined-some-all-rule abox :args (succ node ae-concept relevant-ae-concepts)) (dolist (ae-concept2 relevant-ae-concepts) (let ((qualification (qualification ae-concept2)) (deps (list ;(list node ae-concept) (list node ae-concept2)))) (loop-over-node-all-concepts (all-concept node) (when (implies-p (role ae-concept2) (role all-concept)) (let ((qualification (qualification all-concept)) (deps (cons (list node all-concept) deps))) (unless (on-tableau-p succ qualification) (let ((added (register-as-unexpanded qualification :node succ :depends-on deps))) (check-for-clash succ added))) (when (transitive-p all-concept) (unless (on-tableau-p succ all-concept) (let ((added (register-as-unexpanded all-concept :node succ :comment 'found-applicable-transitive-all :depends-on deps))) (check-for-clash succ added))))))) (unless (on-tableau-p succ qualification) (let ((added (register-as-unexpanded qualification :node succ :depends-on deps))) (check-for-clash succ added))) (let ((role-range (role-range (role ae-concept2)))) (when role-range (unless (on-tableau-p succ role-range) (let ((added (register-as-unexpanded role-range :node succ :depends-on deps))) (check-for-clash succ added))))))) (add-meta-constraints succ) (register-label-is-stable abox succ))
6,686
Common Lisp
.lisp
125
29.952
127
0.459212
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
9923d3c3bd1530710af838e0612b16da7137fcc4dbb9c4ba96d9c31e4ef0826c
12,555
[ -1 ]
12,556
edge-management.lisp
lambdamikel_DLMAPS/src/prover/edge-management.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (timed-defmethod mark-deleted :after ((abox abox) (edge abox-edge)) t) (timed-defmethod mark-deleted :after ((abox abox1) (edge abox-edge)) (with-slots (all-edges) abox (if (not *use-avl-trees-for-abox1-p*) (setf all-edges (delete edge all-edges)) (delete-from-avl-tree edge all-edges :key #'id)))) ;;; ;;; ;;; (timed-defmethod delete-edge ((abox abox) (edge abox-edge) &rest args) (declare (ignorable args)) (call-next-method)) (timed-defmethod delete-edge ((abox abox1) (edge abox-edge) &rest args) (declare (ignorable args)) (if (old-p edge) (call-next-method) (let ((from (from edge)) (to (to edge))) ;;; wird sonst von substrate7.lisp erledigt! (setf (slot-value from 'successors) (delete to (slot-value from 'successors))) (setf (slot-value to 'predecessors) (delete from (slot-value to 'predecessors))) (setf (slot-value from 'outgoing) (delete edge (slot-value from 'outgoing))) (setf (slot-value to 'incoming) (delete edge (slot-value to 'incoming)))))) (timed-defmethod delete-edge :after ((abox abox) (edge abox-edge) &rest args) (declare (ignorable args)) (mark-deleted abox edge)) ;;; ;;; ;;; (defmethod get-state-vector ((edge abox-edge)) (with-slots (old-p active-p deleted-p multiplicity inverse-multiplicity) edge (list ;old-p active-p deleted-p multiplicity inverse-multiplicity))) (defmethod set-state-vector ((edge abox-edge) state &optional maintain-index-structures-p) (declare (ignorable maintain-index-structures-p)) (with-slots (old-p active-p deleted-p multiplicity inverse-multiplicity) edge (setf ;old-p (pop state) active-p (pop state) deleted-p (pop state) multiplicity (pop state) inverse-multiplicity (pop state))))
2,038
Common Lisp
.lisp
58
29.086207
90
0.639159
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
7da34e8f73c619a1edb89a24063b09de1ebf660402302a594957fb7c6db1ab9b
12,556
[ -1 ]
12,557
strategy.lisp
lambdamikel_DLMAPS/src/prover/strategy.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (eval-when (:compile-toplevel :load-toplevel :execute) (defmacro with-strategy ((strat) &body body) `(let ((*strategy* ,strat)) (establish-context-for *strategy* #'(lambda () ,@body)))) (defpersistentclass strategy ()) (defpersistentclass trace-strategy (strategy)) (defpersistentclass abox-saturation-strategy (strategy)) ;;; ;;; ;;; (defmethod establish-context-for ((strategy strategy) fn) (funcall fn)) (defmethod establish-context-for ((strategy abox-saturation-strategy) fn) (let ((*maintain-unexpanded-or-concepts1-heap-p* t) (*combined-some-all-rule-p* nil) (*maintain-active-nodes-p* t) ) (funcall fn))) (defmethod establish-context-for ((strategy trace-strategy) fn) (let ((*maintain-active-nodes-p* t)) (funcall fn))) ;;; ;;; ;;; (defconstant +strategy+ (make-instance 'strategy)) (defconstant +trace-strategy+ (make-instance 'trace-strategy)) (defconstant +abox-saturation-strategy+ (make-instance 'abox-saturation-strategy)) )
1,216
Common Lisp
.lisp
35
28.542857
84
0.635112
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
c0a8567b9383084bba67561ec53e016761f7592fbd771f81d31bde0043a27b4f
12,557
[ -1 ]
12,558
precompletion.lisp
lambdamikel_DLMAPS/src/prover/precompletion.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; #| (defrule compute-precompletion (dl alch) (labels ((do-it () (perform (deterministic-expansion) (:body (if clashes (return-from compute-precompletion nil) (perform (some-expansion) (:positive (if clashes (return-from compute-precompletion nil) (:negative +insert-body-code+))))))))) (let ((*combined-some-all-rule-p* nil)) (do-it) t))) (defrule compute-precompletion (dl alch) (labels ((do-it () (perform (deterministic-expansion) (:body (if clashes (handle-clashes) (perform (some-expansion) (:positive (if clashes (handle-clashes) (:negative +insert-body-code+))))))))) (let ((*combined-some-all-rule-p* nil)) (do-it)))) |#
1,177
Common Lisp
.lisp
36
19.055556
64
0.437833
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
24a75dd7fea227544bb335e163b8ab8d7340ce20ce316bebd8951e2c0f70a31f
12,558
[ -1 ]
12,559
or-expansion.lisp
lambdamikel_DLMAPS/src/prover/or-expansion.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defrule or-expansion (dl abox) (multiple-value-bind (disjuncts or-concept node) (cond ((not *semantic-branching-p*) ;; branch syntactically (multiple-value-bind (or-concept node) (select-or-concept abox *strategy* language) (when node (values (remove-if #'(lambda (x) (or (on-tableau-p node x) (on-tableau-p node (get-negated-concept x)))) (arguments or-concept)) or-concept node)))) (t ;; semantic branching! (multiple-value-bind (disjunct or-concept node) (select-open-disjunct abox *strategy* language) (when node (values (list disjunct (get-negated-concept disjunct)) ;;; statische Auswahl! ;;; zunächst wird das Disjunct wahr gemacht -> "or-concept" wird wahr (-> expanded) ;;; dann wird das Disjunct falsch gemacht -> "or-concept" muss geht *nicht* auf expanded!!! ;;; beim Backtracking (vom 1. Disjunkt) muss also sichergestellt werden, dass "or-concept" ;;; wieder auf unexpanded gelegt wird! das macht die Dependenz-Verwaltung (remove-all-...) ;;; Sonst werden nämlich Alternativen übersehen... or-concept node))))) (if (not (and node disjuncts)) ;;; Nachfolgender Code für SOME-Expansion +insert-negative-code+ (let ((sat nil) (new-choice-point (get-new-choice-point)) (collected-dependencies nil) (memorized-action (get-current-action)) ;(put-disjunct-to-unexpanded-action nil) (disjuncts (copy-list disjuncts))) (loop while disjuncts do (let* ((disjunct (first disjuncts)) (last-p (not (cdr disjuncts)))) (announce "CHOICE POINT ~A. OR CONCEPT ~A : ~A, DISJUNCT ~A, ALL DISJUNCTS: ~A" new-choice-point node or-concept disjunct disjuncts) (if *semantic-branching-p* (announce "Semantic selection of ~A : ~A" node disjunct) (announce "Syntactic selection of ~A : ~A" node disjunct)) (setf disjuncts (cdr disjuncts)) (let ((added (register-as-unexpanded disjunct :comment (if *semantic-branching-p* 'add-semantically-chosen-or-disjunct-to-unexpanded 'add-syntactically-chosen-or-disjunct-to-unexpanded) :node node :new-choice-point new-choice-point :depends-on (list (list node or-concept))))) ;(setf put-disjunct-to-unexpanded-action (get-current-action)) (check-for-clash node added)) (multiple-value-bind (sub-sat deps) +insert-positive-code+ ;;; ;;; vollständiges chronologisches backtracking ;;; bei *compute-all-completions-p* erforderlich! ;;; (when *compute-all-completions-p* (let ((*use-unsat-cache-p* nil)) (rollback-to abox memorized-action))) (setf sat (or sat sub-sat)) ;;; ;;; dependencies machen keinen sinn ;;; bei *compute-all-completions-p* ;;; (when (and (not sat) (not *compute-all-completions-p*)) (dolist (dep deps) (push dep collected-dependencies))) ;;; letztes Disjunkt? -> in jedem Fall zurückkehren! (when last-p (return-from prover (if sat t (if *compute-all-completions-p* nil (values nil (remove new-choice-point collected-dependencies)))))) ;;; nicht-letztes Disjunkt (when (not last-p) (when (and sat (not *compute-all-completions-p*)) (return-from prover t)) (when (not sat) (when (not (member new-choice-point deps)) ;;; ;;; Clash Reason liegt nicht am Disjunkt! -> Backtracking ;;; Achtung: hier ist *kein* Rollback notwendig! ;;; das Rollback wird immer von dem Veranlasst, der den ;;; den Choice Point aufgesetzt hat! ;;; Logischerweise werden dann auch die hier noch auf dem ;;; Tableaux vorhandenen Constraints zurückgenommen, da ;;; diese von dem "weiter unten liegenden Constraint "abhängen ;;; (return-from prover (values nil (remove new-choice-point collected-dependencies)))) (when (member new-choice-point deps) ;;; ;;; Clash Reason liegt am Disjunkt! ;;; Aufräumen und Weitermachen, ;;; nächstes Disjunkt aus der Schleife probieren ;;; (when *debug-p* (announce "BEFORE ROLLBACK:") (describe-object abox t) (loop-over-abox-nodes (node abox) (describe-object node t))) #+:use-dependency-directed-backtracking (progn (break "DEPENDENCY DIRECTED BACKTRACKING NOT FULLY UNDERSTOOD YET!") ;;(rollback-all-depending-on abox (list node disjunct)) ;;(undo-action abox put-disjunct-to-unexpanded-action)) ;;; ;;; das ist noch nicht die ganze Geschichte... ;;; vorerst auf Eis gelegt! ) #-:use-dependency-directed-backtracking (progn ;;; ;;; einfaches BACKJUMPING ;;; chronologisches Abräumen ;;; (rollback-to abox memorized-action node)) (when *debug-p* (announce "AFTER ROLLBACK:") (describe-object abox t) (loop-over-abox-nodes (node abox) (describe-object node t)))) ))))) (error "Why am I here? ~A" disjuncts)))))
8,170
Common Lisp
.lisp
140
30.864286
112
0.445905
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
9150d6a92c72b23c301dbc9c59db2e98bff6221c2a25cc2f31348cc4f73b3763
12,559
[ -1 ]
12,560
abox-edges.lisp
lambdamikel_DLMAPS/src/prover/abox-edges.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defpersistentclass abox-edge (substrate-edge abox-item) ((multiplicity :reader multiplicity :initarg :multiplicity :initform 1) (inverse-multiplicity :reader inverse-multiplicity :initarg :inverse-multiplicity :initform 1))) (defmethod copy-edge ((abox abox) (edge abox-edge) &rest args) (declare (ignorable args)) (let ((copy (call-next-method)) (state (get-state-vector edge))) (set-state-vector copy state) (dolist (slot '(old-p active-p deleted-p choice-points ;;; mit denen kann man zwar nicht weiterrechnen (da Referenzen auf ;;; alte Objekte enthalten!), aber gut fuer Inspektionszwecke! precondition-for-actions postcondition-for-actions created-by)) (setf (slot-value copy slot) (copy-tree (slot-value edge slot)))) copy)) ;;; ;;; ;;; (defmethod inverse-edge ((edge abox-edge)) nil) (defmethod role ((edge abox-edge)) (textual-description (description edge))) ;;; ;;; Unter der Annahme, dass in einer einfach ABox niemals ;;; inverse Kanten explizit verzeichnet werden! ;;; Dafür ist die "rolebox-abox" zuständig ;;; (defmethod implies-p ((edge abox-edge) (role role) &rest args) (implies-p (description edge) role)) ;;; ;;; ;;; (defmacro loop-over-role-successors ((node role) (succ edge-var) &body body) (let ((var (gensym))) (if (not role) `(let ((,var nil)) ;;; Keine Rolle -> ;;; enummeriert dann einfach die *ausgehenden* Kanten! ;;; incomming werden nicht betrachtet! ;;; unproblemeatisch; wird sowieso nur fuer den Aufbau ;;; von Modellen im Model Caching verwendet, und das ;;; funktioniert sowieso nicht fuer inverse Rollen (loop-over-cluster-nodes (equi ,node) (unless (deleted-p equi) (dolist (,edge-var (outgoing equi)) (when (and (not (deleted-p ,edge-var)) ;;; diese Funktionen werden (role = NIL!) ;; NUR zu "low level" Inspektion des Tableaus ;; verwendet! daher: Kanten muessen selbst ;; interpretiert werden ! ;;;(not (zerop (multiplicity ,edge-var)))) (let ((,succ (representative (to ,edge-var)))) (when (and (not (deleted-p ,succ))) (push ,succ ,var) ,@body)))))))) `(block loop (with-new-marking-context (let ((role ,role) (node ,node) (,var nil)) (declare (ignorable node role ,var)) (unwind-protect (typecase role (simple-role (loop-over-cluster-nodes (equi ,node) (unless (deleted-p equi) (dolist (,edge-var (outgoing equi)) (when (and (not (deleted-p ,edge-var)) (not (zerop (multiplicity ,edge-var)))) (when (implies-p ,edge-var role) (let ((,succ (representative (to ,edge-var)))) (when (and (and (not (marked-p ,succ)) (not (deleted-p ,succ)))) (mark ,succ) (push ,succ ,var) ,@body))))))) (let ((inv-role (get-inverse-role role))) (loop-over-cluster-nodes (equi ,node) (unless (deleted-p equi) (dolist (,edge-var (incoming equi)) (when (and (not (deleted-p ,edge-var)) (not (zerop (inverse-multiplicity ,edge-var)))) (when (implies-p ,edge-var inv-role) (let ((,succ (representative (from ,edge-var)))) (when (and (and (not (marked-p ,succ)) (not (deleted-p ,succ)))) (mark ,succ) (push ,succ ,var) ,@body)))))))) (loop-over-cluster-nodes (equi ,node) (dolist (,succ (compute-virtual-successors (in-graph ,node) equi role)) (when (and (and (not (marked-p ,succ)) (not (deleted-p ,succ)))) (mark ,succ) (push ,succ ,var) (let ((,edge-var (materialize-virtual-edge (in-graph ,node) ,node ,succ ,role))) (declare (ignorable ,edge-var)) ,@body))))) ((or and-role or-role) (break "support for complex roles: to be implemented!"))) (unmark ,var)))))))) (defmacro loop-over-role-predecessors ((node role) (pre edge-var) &body body) (if (not role) (let ((var (gensym))) `(let ((,var nil)) ;;; Keine Rolle -> ;;; enummeriert dann einfach die *eingehenden* Kanten! ;;; s. auch "loop-over-role-successors", role = NIL-Kommentar! (loop-over-cluster-nodes (equi ,node) (unless (deleted-p equi) (dolist (,edge-var (incoming equi)) (when (and (not (deleted-p ,edge-var)) ;; s. Kommentar loop-over-role-successors ;; (not (zerop (inverse-multiplicity ,edge-var))) ) (let ((,pre (representative (from ,edge-var)))) (unless (deleted-p ,pre) (push ,pre ,var) ,@body)))))))) `(loop-over-role-successors (,node (get-inverse-role ,role)) (,pre ,edge-var) ,@body))) ;;; ;;; ;;; ;;; (defmacro get-role-successors (node role) `(let ((res nil)) (loop-over-role-successors (,node ,role) (succ edge-var) (push succ res)) res)) (defmacro get-role-predecessors (node role) `(let ((res nil)) (loop-over-role-predecessors (,node ,role) (pre edge-var) (push pre res)) res))
8,709
Common Lisp
.lisp
153
28.254902
108
0.369136
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
5596cf6fd01ab0d7300dc791aef21e5c504e063022384e262892820c5b7a47a7
12,560
[ -1 ]
12,561
some-expansion2.lisp
lambdamikel_DLMAPS/src/prover/some-expansion2.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defrule some-expansion (dl-with-somes abox) (multiple-value-bind (some-concept node) (select-some-concept abox *strategy* language) (cond ((not node) +insert-negative-code+ ) (t (let* ((role (role some-concept)) (new-node nil)) (register-as-expanded some-concept :comment 'expand-unexpanded-some-concept-no-preconditions :node node) (when *reuse-nodes-p* (let* ((succs (get-role-successors node role))) (announce "Performing Non-deterministic SOME expansion of ~A : ~A" node some-concept) (announce "Found candidate successors: ~A" succs) (let ((new-choice-point (get-new-choice-point)) (collected-dependencies nil) (count 0) (n (length succs)) (sat nil) (memorized-action (get-current-action))) (dolist (succ succs) (incf count) (announce "Performing Non-deterministic SOME expansion of ~A : ~A" node some-concept) (announce "Trying ~Ath (of ~A) successor ~A. " count n succ) (perform (compute-new-some-successor-label :new-node succ :new-choice-point new-choice-point :node node :role role :concept some-concept)) (multiple-value-bind (sub-sat deps) +insert-positive-code+ ;;; ;;; vollständiges chronologisches backtracking ;;; bei *compute-all-completions-p* erforderlich! ;;; (when *compute-all-completions-p* (let ((*use-unsat-cache-p* nil)) (rollback-to abox memorized-action))) (setf sat (or sat sub-sat)) ;;; ;;; dependencies machen keinen sinn ;;; bei *compute-all-completions-p* ;;; (when (and (not sat) (not *compute-all-completions-p*)) (setf collected-dependencies (append deps collected-dependencies))) (when (and sat (not *compute-all-completions-p*)) (return-from prover t)) (when (not sat) (when (not (member new-choice-point deps)) ;;; ;;; Clash hat anderen Grund als qual! ;;; Aufraeumen nicht notwendig, da der Clash-Beseitiger ;;; das durchfuehrt! ;;; (return-from prover (values nil (remove new-choice-point collected-dependencies)))) (when (member new-choice-point deps) #+:use-dependency-directed-backtracking (progn (break "DEPENDENCY DIRECTED BACKTRACKING NOT FULLY UNDERSTOOD YET!")) #-:use-dependency-directed-backtracking (progn ;;; ;;; einfaches BACKJUMPING ;;; chronologisches Abräumen ;;; (rollback-to abox memorized-action node))))))))) ;;; ;;; deterministischer Teil der Expansion ;;; (announce "~%Performing deterministic SOME expansion of ~A : ~A" node some-concept) (setf new-node (create-anonymous-node abox :depends-on (list (list node some-concept)))) (relate node new-node role :old-p nil :depends-on (list (list node some-concept))) (perform (compute-new-some-successor-label :new-node new-node :node node :role role :concept some-concept)) +insert-positive-code+ ))))) ;;; ;;; ;;; (defrule compute-new-some-successor-label (dl abox :args (new-choice-point new-node node role concept)) (let ((Added (register-as-unexpanded (qualification concept) :new-choice-point new-choice-point :node new-node :depends-on (list (list node concept))))) (check-for-clash new-node added)) (when (role-range role) (unless (on-tableau-p new-node (role-range role)) (let ((added (register-as-unexpanded (role-range role) :new-choice-point new-choice-point :node new-node :depends-on (list (list node concept))))) (check-for-clash new-node added)))) (add-meta-constraints new-node)) (defrule compute-new-some-successor-label (dl-with-combined-some-all-rule abox :args (new-choice-point new-node node role concept)) (let ((added (register-as-unexpanded (qualification concept) :new-choice-point new-choice-point :node new-node :depends-on (list (list node concept))))) (check-for-clash new-node added)) (when (role-range role) (unless (on-tableau-p new-node (role-range role)) (let ((added (register-as-unexpanded (role-range role) :new-choice-point new-choice-point :node new-node :depends-on (list (list node concept))))) (check-for-clash new-node added)))) (loop-over-node-all-concepts (all node) (when (implies-p role (role all)) (unless (on-tableau-p new-node (qualification all)) (let ((added (register-as-unexpanded (qualification all) :new-choice-point new-choice-point :node new-node :depends-on (list (list node concept) (list node all))))) (check-for-clash new-node added))))) (add-meta-constraints new-node) (unless (has-unexpanded-at-most-concepts-p node) (register-label-is-stable abox new-node))) (defrule compute-new-some-successor-label (alchf-rplus abox :args (new-choice-point new-node node role concept)) (let ((added (register-as-unexpanded (qualification concept) :new-choice-point new-choice-point :node new-node :depends-on (list (list node concept))))) (check-for-clash new-node added) (when (role-range role) (unless (on-tableau-p new-node (role-range role)) (let ((added (register-as-unexpanded (role-range role) :new-choice-point new-choice-point :node new-node :depends-on (list (list node concept))))) (check-for-clash new-node added)))) (loop-over-node-all-concepts (all node) (when (implies-p role (role all)) (unless (on-tableau-p new-node (qualification all)) (let ((added (register-as-unexpanded (qualification all) :new-choice-point new-choice-point :node new-node :depends-on (list (list node concept) (list node all))))) (check-for-clash new-node added))) (when (transitive-p all) (unless (on-tableau-p new-node all) (announce "Propagating transitive ALL ~A to ~A" all new-node) (let ((added (register-as-unexpanded all :new-choice-point new-choice-point :node new-node :comment 'found-applicable-transitive-all :depends-on (list (list node concept) (list node all))))) (check-for-clash new-node added))))))) (add-meta-constraints new-node) (unless (has-unexpanded-at-most-concepts-p node) (register-label-is-stable abox new-node)))
10,180
Common Lisp
.lisp
177
31.135593
131
0.449903
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
6d677c0db1955457bafcfd12c5542fab0b6eafdf38504f71340c69792d303eec
12,561
[ -1 ]
12,562
examples.lisp
lambdamikel_DLMAPS/src/prover/examples.lisp
;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) (reset-store *cur-store*) ;;; ;;; Dependency Directed Backtracking Example ;;; (with-knowledge-base (test test :delete-if-exists-p t) (def* c a) (ins a c) (ins a (not a)) (princ (abox-sat-p *cur-abox*))) (progn (in-kb test test :delete-if-exists-p t) (def* c a) (ins a c) (ins a (not a)) (princ (abox-sat-p *cur-abox*))) (with-abox (test :delete-if-exists-p t) (ins a (and (or c1 d1) (or c2 d2) (or c3 d3) (or c4 d4) (or c5 d5) (or c6 d6) (or c7 d7) (or c8 d8) (or c9 d9) (some r (and c d)) (all r (or (and d (not c)) (and c (not d)))))) (setf *x* (list *cur-abox* *cur-substrate*)) (princ (abox-sat-p *cur-abox* :semantic-branching-p t :debug-p t))) (with-abox (test :delete-if-exists-p t) (ins a (and (all r bottom) (or (some r c) (some s d)) (all s (and e (not d))))) (princ (abox-sat-p *cur-abox* :semantic-branching-p nil :debug-p t :compute-all-completions-p t)) (visualize *completions*)) (with-abox (test :delete-if-exists-p t) (ins a (and (some r (and c d)) (all r (or (and d (not c)) (and c (not d)))))) (setf *x* (list *cur-abox* *cur-substrate*)) (princ (abox-sat-p *cur-abox* :semantic-branching-p t :debug-p t))) (with-abox (test :delete-if-exists-p t) (ins a (and (some r (and c d)) (all r (or (and d (not c)) (and c (not d)))))) (setf *x* (list *cur-abox* *cur-substrate*)) (princ (abox-sat-p *cur-abox* :semantic-branching-p t :debug-p t))) ;;; ;;; LTL (Linear Temporal Logic) Example ;;; (with-rbox (rcc5-rolebox) (with-tbox (meta :delete-if-exists-p t) (def* linear-time (and (all dr bottom) (all ec bottom) (all po bottom) (all ppi linear-time) (all pp linear-time))) (def* dense (=> (some ppi top) (some ppi (some ppi top)))) (def* right-bounded (some ppi (and last-node (all ppi bottom)))) (def* left-bounded (some pp (and first-node (all pp bottom)))) (def* left-unbounded (all pp (some pp top))) (def* right-unbounded (all ppi (some ppi top))) (with-abox (test :delete-if-exists-p t) (ins a (and (some ppi (some ppi (some ppi (some ppi dead)))) linear-time left-bounded right-bounded)) (princ (abox-sat-p *cur-abox* :reuse-nodes-p t :compute-all-completions-p nil :debug-p t :break-p nil)) (visualize *cur-abox*)))) ;;; ;;; Basic ALCI ABox Consistency Checking ;;; Auf Substrat-Ebene! ;;; (with-substrate (test :type 'abox :delete-if-exists-p t) (node a (ncon (and a (some r c)))) (abox-sat-p *cur-substrate* :compute-all-completions-p t) (visualize *completions*)) ;;; ;;; "PO"-Free ALCI_RCC5 hat die Tree Model Property! ;;; "Church Rosser"-Rauten ("Joins") müssen dann linear angeordnet werden, ;;; weil nur noch (b,c) : PP oder (b,c) : PPI oder (b,c) : EQ möglich bleibt ;;; (with-rbox (rcc5-rolebox) (in-tbox meta :delete-if-exists-p t) (setf *completions* nil) (impl top (all po bottom)) (with-abox (test :delete-if-exists-p t) (ins a a) (ins b c) (ins c c) (rel a b pp) (rel a c pp) (princ (abox-sat-p *cur-abox* :compute-all-completions-p t :debug-p t :use-cached-models-p nil :cache-models-p nil :break-p nil)) (visualize *completions*)))) ;;; ;;; Ladner-Baum-Konstruktion für ALCI_RCC5 ;;; (with-rbox (rcc5-rolebox) ; tree models! LADNER-REDUCTION !!! PSPACE!!! (kill) (with-tbox (meta :delete-if-exists-p t) (setf *completions* nil) (impl top (all po bottom)) (impl q0 (and (not q1) (not q2) (not q3) (all ppi (not q0*)))) (impl q1 (and (not q0) (not q2) (not q3) (all ppi (not q1*)))) (impl q2 (and (not q0) (not q1) (not q3) (all ppi (not q2*)))) ;(impl q3 (and (not q0) (not q1) (not q2) ; (all ppi (not q3)))) (impl p1 (all eq p1)) (impl p2 (all eq p2)) (impl p3 (all eq p3)) ;;;; (impl qo (all eq q0)) ;;;; (impl q1 (all eq q1)) ;;;; (impl q2 (all eq q2)) ;;;; (impl (not p1) (all eq (not p1)) ) ;;;; (impl (not p2) (all eq (not p2)) ) ;;;; (impl (not p3) (all eq (not p3)) ) ;;;; (impl (not qo) (all eq (not q0)) ) ;;;; (impl (not q1) (all eq (not q1)) ) ;;;; (impl (not q2) (all eq (not q2)) ) (def sp1 (and (=> p1 (all ppi p1)) (=> (not p1) (all ppi (not p1))))) (def sp2 (and (=> p2 (all ppi p2)) (=> (not p2) (all ppi (not p2))))) (def sp3 (and (=> p3 (all ppi p3)) (=> (not p3) (all ppi (not p3))))) (def b0 (=> q0 (and (some ppi (and q1 p1)) (some ppi (and q1 (not p1)))))) (def b1 (=> q1 (and (some ppi (and q2 p2)) (some ppi (and q2 (not p2)))))) (def b2 (=> q2 (and (some ppi (and q3 p3)) (some ppi (and q3 (not p3)))))) (with-abox (test :delete-if-exists-p t) (ins a (and q0 b0 (all ppi b1) ;(all ppi (all ppi b2)) (all ppi sp1) (all ppi (all ppi sp1)) ;(all ppi (all ppi sp2)) )) (setf *abox* *cur-abox*) (princ (abox-sat-p *abox* :compute-all-completions-p nil :break-p t :debug-p nil))))) (with-rbox (rcc8-rolebox) ; tree models! LADNER-REDUCTION !!! PSPACE!!! (kill) (with-tbox (meta :delete-if-exists-p t) (setf *completions* nil) (impl odd (all tppi even)) (impl even (all tppi odd)) (impl odd (not even)) (impl even (not odd)) (impl top (and (all po bottom) (all ec bottom))) (impl q0 (and (not q1) (not q2) (not q3) (all tppi (not q0)))) (impl q1 (and (not q0) (not q2) (not q3) (all tppi (not q1)))) (impl q2 (and (not q0) (not q1) (not q3) (all tppi (not q2)))) (impl q3 (and (not q0) (not q1) (not q2) (all tppi (not q3)))) (impl p1 (all eq p1)) ; "make weak EQ semantics strong" (works only for trees!) (impl p2 (all eq p2)) (impl p3 (all eq p3)) (def* sp1 (and (=> p1 (all tppi p1)) (=> (not p1) (all tppi (not p1))))) (def* sp2 (and (=> p2 (all tppi p2)) (=> (not p2) (all tppi (not p2))))) (def* sp3 (and (=> p3 (all tppi p3)) (=> (not p3) (all tppi (not p3))))) (def* b0 (=> q0 (and (some tppi (and q1 p1)) (some tppi (and q1 (not p1)))))) (def* b1 (=> q1 (and (some tppi (and q2 p2)) (some tppi (and q2 (not p2)))))) (def* b2 (=> q2 (and (some tppi (and q3 p3)) (some tppi (and q3 (not p3)))))) (with-abox (test :delete-if-exists-p t) (ins a (and q0 even b0 (all tppi b1) ;(all tppi (all tppi b2)) (all tppi sp1) (all tppi (all tppi sp1)) ;(all tppi (all tppi sp2)) )) (setf *abox* *cur-abox*) (run #'(lambda () (princ (abox-sat-p *abox* :compute-all-completions-p nil :debug-p nil)) (visualize ;(mapcar #'reorder-ppi ;(remove-if #'has-eq-edges-p *completions*)))))) ;;; ;;; ALCI_RCC5 "Geo Example" (Stadt / Land / Fluss) ;;; (with-rbox (rcc5-rolebox) (with-tbox (geo-example :delete-if-exists-p t) (def* area) ;;; Die Konzepte "City", "River", "Lake" und "Mountain" sind spezielle "Flaechen" (def* country area) (def* city area) (def* river area) (def* lake area) (def* mountain area) ;;; "Deutschland" und die "Tschechische Republik" sind "Laender " (def* germany country) (def* czech-republic country) ;;; Ein "lokaler Fluss" ueberlappt sich nicht mit "Laendern" (def local-river (and river (not (some po country)))) ;;; Ein "nicht-lokaler Fluss" ueberlappt sich mit "Laendern" (def non-local-river (and river (some po country))) ;;; Ein "Fluss der in einen See fliesst" in ein Fluss der einen See ueberlappt (def river-flowing-into-a-lake (and river (some po lake))) ;;; Ein deutscher Fluss ist ein Fluss der in Deutschland enthalten ist ;;; und keine anderen Fluesse ueberlappt (def german-river (and river (some pp germany) (all po (not country)))) ;;; Eine deutsche Stadt ist eine Stadt die in Deutschland enthalten ist (def german-city (and city (all pp (=> country germany)))) ;;; Ein Stadt an einem Fluss ist eine Stadt die einen Fluss ueberlappt (def city-at-river (and city (some po river))) ;;; Die Elbe ist ein Fluss der die Tschechische Republik und Deutschland kreuzt (def* elbe (and river (some po czech-republic) (some po germany))) ;;; Die "Binnen-Alster" ist ein Teich (def* alster-lake lake) ;;; Die Alster ist ein Fluss der in Deutschland enthalten ist ;;; und die Binnen-Alster ueberlappt (def* alster (and river (some pp germany) (some po alster-lake) (all po (not country)) (all pp (=> country germany)))) ;;; Hamburg ist eine Stadt die an der Alster liegt (def* hamburg (and city (some po alster))) ;(princ (subsumes? german-city hamburg :type 'jepd-abox :debug-p t)) (setf *dag* (taxonomy *cur-tbox* :debug-p nil :recompute-p t :resuse-nodes-p nil :semantic-branching-p nil :non-determinism-p t)) (princ *dag*) (when (member 'hamburg (mapcar #'dag-node-name (dag-node-children (find 'german-river (dag-nodes *dag*) :key #'dag-node-name)))) (break)) (loop (princ "*") (unless (dag-isomorphic-p *dag* (setf *ldag* (taxonomy *cur-tbox* ;:reuse-nodes-p (one-of '(t nil)) :semantic-branching-p (one-of '(t nil)) :non-determinism-p (one-of '(t nil)) :use-cached-models-p nil :cache-models-p nil :recompute-p t))) (princ *ldag*) (break))))) ;;; ;;; Einfacher ALCI_RAMINUS-Test ;;; Interessant!!! ;;; Muss unerfuellbar sein! ;;; (with-rbox (test :roles (id r s) :inverse-roles ((r r)) :delete-if-exists-p t :reflexive-roles (id) :axioms ((r r r) (id r s))) (with-tbox (test :delete-if-exists-p t) (with-abox (test :delete-if-exists-p t ) (ins a (and a (all s (not a)) (some r c))) (princ (abox-sat-p *cur-abox* :debug-p t))))) ;;; ;;; einige einfache ALCI_RCC5 Tests ;;; (with-rbox (rcc5-rolebox) (with-abox (test :delete-if-exists-p t :language +alci-rcc+) (ins a (and (some pp (some pp c)) (all pp e))) (princ (abox-sat-p *cur-abox*)) (visualize *cur-abox*))) (with-rbox (rcc5-rolebox) (with-abox (test :delete-if-exists-p t :language +alci-rcc+) (ins a (and a (all pp (not c)) (all eq (not c)) (all po (not c)) (all dr (not c)) (all ppi (not c)))) (ins b b) (ins c c) (rel a b po) (rel b c po) (setf z *cur-abox*) (princ (abox-sat-p *cur-abox* :debug-p t :compute-all-completions-p t)) (terpri))) (loop (princ "+") (reset-store *cur-store*) (when (sat? (and (some po (some po (some po (some po c)))) (all po (not c)) (all dr (not c)) (all pp (not c)) (all ppi (not c)) (all eq (not c))) :language +alci-rcc+ :rbox 'rcc5-rolebox :use-rbox-p t :break-p nil :semantic-branching-p (one-of '(t nil)) :non-determinism-p (one-of '(t nil)) :reuse-nodes-p nil ; (one-of '(t nil)) :debug-p nil) (error "!")) (princ "-") (unless (sat? (and (some po (some po (some po (some po c)))) (all po (not c)) (all dr (not c)) (all pp (not c)) (all ppi (not c)) (all eq d)) :language +alci-rcc+ :rbox 'rcc5-rolebox :semantic-branching-p (one-of '(t nil)) :use-rbox-p t :non-determinism-p (one-of '(t nil)) :reuse-nodes-p (one-of '(t nil)) :debug-p nil) (error "!"))) (with-rbox (rcc5-rolebox) (with-abox (test :delete-if-exists-p t :language +alci-rcc+) (ins a a) (ins b b) (ins c c) (rel a b dr) (rel b c ppi) (rel a c (or dr po pp eq ppi)) (setf *x* *cur-abox*) (prepare *cur-abox* +alci-rcc+) (compute-minimal-label *cur-abox*) (visualize *cur-abox*))) (with-rbox (rcc5-rolebox) (loop (princ "*") (unless (sat? (and (or (some dr (some pp c)) (some dr d)) (all po (not c)) (all dr (not d)) (all pp (not c))) :semantic-branching-p t :non-determinism-p t :type 'jepd-abox :compute-all-completions-p t :debug-p nil) (break))) (visualize *completions*)) (princ (sat? (and c d (some r a) (all r (=> a b)) (or (and (all r (and c (some s d))) (all r (=> c (all s (and (not d) (not e)))))) (all r (not b)) ;;;xxx )) :debug-p t :semantic-branching-p t)) (princ (sat? (and c (some s (and d (all (inv s) (not c))))) :debug-p t)) (princ (sat? (and c x (or (some r (and d y (all (inv r) (not c)))) (some r (and d z (or (all (inv r) (not c)) (some s (and e u (or (all (inv s) (not d)) (some t (and f p (or (all (inv t) (not e)) (all (inv t) (=> e (all (inv s) (=> d (all (inv r) (or (not x) ;;;xxx ))))))))))))))))) :debug-p t :semantic-branching-p (one-of '(t nil)) :non-determinism-p t)) ;;; ;;; Konjunktive Aboxen! ;;; (with-abox (test :delete-if-exists-p t) (ins a (and a (or (all r (not b)) (all s (not b)) (all (and r s) (not b))))) (ins b (and b)) (rel a b r) (rel a b s) (princ (abox-sat-p *cur-abox* :debug-p t))) ;;; ;;; Disjunktive Aboxen! ;;; (with-abox (test :delete-if-exists-p t) (ins a (and a (all r (not b)) (all s (or (not b) (all (inv (or r s)) (not a)))))) (ins b (and b)) (rel a b (or r s )) (setf *x* *cur-abox*) (princ (abox-sat-p *cur-abox* :debug-p t))) (with-abox (test :delete-if-exists-p t) (ins a (and a (some (or r s) b) (all r (not b)) (all s (not cb)))) (setf *x* *cur-abox*) (princ (abox-sat-p *cur-abox* :debug-p t))) (with-abox (test :delete-if-exists-p t) (ins a (and a (all r (not b)) (all s (not b)))) (ins b (and b)) (rel a b (or r s)) (setf *x* *cur-abox*) (princ (abox-sat-p *cur-abox* :debug-p t))) (progn (with-abox (test :delete-if-exists-p t) (ins a (and a (and (all ab1 (and (all bc1 (not c)) (all bc2 (not c)))) (all ab2 (and (all bc1 (not c)) (all bc2 (not c))))))) (ins b b) (ins c c) (rel a b (or ab1 ab2)) (rel b c (or bc1 bc2)) (princ (abox-sat-p *cur-abox* :debug-p t)))) (progn (with-abox (test :delete-if-exists-p t) (ins a a) (ins a1 a) (ins a2 a) (ins a3 a) (ins b (and b (all s (not c)) (all t (not c)))) (ins c c) (rel a b (or r s)) (rel a1 b (or r s u v w x y a b c)) (rel a2 b (or r s u v w x y a b c)) (rel a3 b (or r s u v w x y a b c)) (rel b c (or s t)) (princ (abox-sat-p *cur-abox* :debug-p t)))) ;;; ;;; ;;; (subrole r s) (subrole s t) (with-abox (test :delete-if-exists-p t) (ins a (and a (or (all s (not b)) (all r (not b)) (all t (not b)) (some s (and (all (inv t) (not a)) (all (inv t) (not a))))) (some r b))) (princ (abox-sat-p *cur-abox* :debug-p t))) ;;; ;;; ALCHI_R+ ! ;;; (subrole r s) (subrole s t) (transitive s) (with-abox (test :delete-if-exists-p t) (ins a (and (some r (some s (some s (some r (some r (and c (all (inv s) (not b)))))))) (or (all s (not c)) b))) (princ (abox-sat-p *cur-abox* :debug-p t))) ;;; ;;; Demo: Rollen-Konjunktion / Disjunktion ;;: (princ (sat? (and (some (or r s) c) (all r (not c)) (all s d) (all (or r s) (=> d (not c)))))) (princ (sat? (and (some (or r s) c) (all r (not c)) (all s d) (all (and r s) (=> d (not c)))))) (princ (sat? (and (some (and r s) c) (all r (not c))))) (princ (sat? (and (some (and r s) c) (all (and r s) (not c))))) (princ (sat? (and (some (and r s) c) (all (or r s) (not c))))) (princ (sat? (and (some (and r s) c) (all (and r s t) (not c))))) (subrole r s) (subrole t r) (subrole t s) (princ (sat? (and (some (and r s) c) (all (and r s t) (not c))))) (princ (sat? (and (some (and r s) c) (all s (not c))))) (subrole r t) (princ (sat? (and (some (and s r) c) (all (and s r t) (not c))) :debug-p t)) (subrole s t) (princ (sat? (and (some (and s r) c) (all (and s r t) (not c))))) (subrole s t r) ;;; !! (princ (sat? (and (some s c) (all (and r t) (not c))))) (with-rbox (rcc5-rolebox) (with-abox (test :type 'rolebox-abox :delete-if-exists-p t) (ins a (and a)) (ins b (and b)) (ins c (and c)) (ins d (and d)) (rel a b (or r s)) (rel b c (or r s)) (rel c d (or r s)) (rel b d (or r s)) (visualize (get-all-atomic-configurations *cur-abox*)))) (princ (sat? (some pp (some pp c)) :debug-p t :type 'jepd-abox :visualize-p t :rbox 'thematic-substrate::rcc5-rolebox )) (with-abox (test :type 'abox :delete-if-exists-p t) (ins a (and auto (some has-part (and (or motor (some foobar huhu)) (all foobar (some has-part (or a b c (some xz cdscdsc)))))))) (princ (abox-sat-p *cur-abox* :compute-all-completions-p t)) (visualize *completions*))
22,108
Common Lisp
.lisp
558
25.989247
125
0.448652
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
09811978bd2d2233f3214e28d22065f0f70899855cc3f185990132e54e3334a6
12,562
[ -1 ]
12,563
settings.lisp
lambdamikel_DLMAPS/src/prover/settings.lisp
;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; ;(push :use-membership-tables *features*) ;(push :use-dependency-directed-backtracking *features*) ;(push :use-avl-trees-for-labels *features*) ;(push :use-avl-trees-for-choice-points *features*) ;(push :use-avl-trees-for-actions *features*) ;(push :use-avl-trees-for-models *features*)
389
Common Lisp
.lisp
11
33.545455
59
0.712737
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
0d301d00677a1ccff5b15bd0920ce307c78ba7a1ecf597d5a5719178baf77dcd
12,563
[ -1 ]
12,564
concept-selection-test.lisp
lambdamikel_DLMAPS/src/prover/concept-selection-test.lisp
;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defmethod count-no-of-open-disjuncts ((node abox-node) (or-concept or-concept)) (loop as arg in (arguments or-concept) when (and (not (on-tableau-p node arg)) (not (on-tableau-p node (get-negated-concept arg)))) sum 1)) ;;; ;;; Code for syntactic branching ;;; (defun get-or-score (node or-concept) (declare (ignorable node or-concept)) 1) (defmethod select-or-concept ((abox abox) (language dl)) (let ((or nil) (node nil) (score nil)) (loop-over-abox-nodes (or-node abox nil) (when (and (active-p or-node) (has-unexpanded-or-concepts-p or-node nil)) (when *reflexive-checks-p* (unless (deterministically-expanded-p or-node) (error "SELECT-OR-CONCEPT: Strategy Error!"))) (loop-over-node-unexpanded-or-concepts (or-concept or-node nil) (let ((new-score (get-or-score or-node or-concept))) (when (or (not or) (> new-score score)) (setf score new-score) (setf or or-concept node or-node))))) (when or (announce "~%+++ Selected OR CONCEPT ~A : ~A" node or) (return-from select-or-concept (values or node)))))) ;;; ;;; Code for semantic branching ;;; (defmethod select-open-disjunct ((abox abox) (language dl)) (let ((best-score nil) (best nil) (concept nil) (best-node nil) (score nil) (ors-found-p nil)) (loop-over-abox-nodes (node abox) (when (and (active-p node) (has-unexpanded-or-concepts-p node nil)) (when *reflexive-checks-p* (unless (deterministically-expanded-p node) (error "SELECT-OPEN-DISJUNCT: Strategy Error!"))) (let ((score (get-node-score node))) (when (or (not best-score) (> score best-score)) (setf best-score score) (setf best-node node))))) (when best-node (let ((open-disjuncts nil) (ors nil) (node best-node)) (loop-over-node-unexpanded-or-concepts (or-concept node nil) (push or-concept ors) (setf ors-found-p t) (dolist (disjunct (arguments or-concept)) (when (and ;(not (on-tableau-p node disjunct)) ;; kann nicht auftreten! (not (on-tableau-p node (get-negated-concept disjunct)))) ;;(return-from select-open-disjunct ;; (values disjunct or-concept node)) (push (list disjunct or-concept) open-disjuncts)))) (dolist (disjunct-and-or open-disjuncts) (let ((disjunct (first disjunct-and-or)) (or-concept2 (second disjunct-and-or))) (dolist (disjunct (list disjunct (get-negated-concept disjunct))) (let ((score 0)) #| (dolist (or-concept ors) (when (member disjunct (arguments or-concept)) (incf score))) |# (setf score (get-node-score node)) (unless (zerop score) ;;; ein solches Disjunkt bewirkt nichts, ;;; ist in keiner Disjunktion ein Argument! (when (or (not best) (> score best-score)) (setf best-node node concept or-concept2 best disjunct best-score score))))))) (when (and ors-found-p (not best)) (error "Could not select disjunct!")) (when best (announce "~%+++ Selected OPEN DISJUNCT ~A OF ~A : ~A" best concept best-node) (return-from select-open-disjunct (values best concept best-node))))))) ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; ;;; (defun get-at-least-score (node at-least-concept) (- 1000000000 (tools:maximum (get-choice-points at-least-concept :node node)))) (defmethod select-at-least-concept ((abox abox) (language dl)) (let ((node (or (get-oldest-node-satisfying1 abox ; wichtig! sonst falsch! #'(lambda (x) (and (active-p x) (old-p x) (has-unexpanded-at-least-concepts-p x nil)))) (get-youngest-node-satisfying1 abox ; Tiefensuche! #'(lambda (x) (and (active-p x) (has-unexpanded-at-least-concepts-p x nil))))))) (when node (let ((at-least nil) (score nil)) (loop-over-node-unexpanded-at-least-concepts (at-least-concept node nil) (let ((new-score (get-at-least-score node at-least-concept))) (when (or (not at-least) (> new-score score)) (setf score new-score) (setf at-least at-least-concept)))) (when at-least (announce "~%+++ Selected AT-LEAST CONCEPT ~A : ~A" node at-least) (return-from select-at-least-concept (values at-least node))))))) ;;; ;;; ;;; (defmethod select-violated-at-most-concept ((abox abox) (language dl)) (loop-over-abox-nodes (node abox) (let ((role-n-entries nil)) (when (and (active-p node) (has-unexpanded-at-most-concepts-p node)) (when *reflexive-checks-p* (unless (deterministically-expanded-p node) (error "Strategy Error!"))) ;;; kleinstes (at-most n R) pro Rolle R raussuchen (loop-over-node-unexpanded-at-most-concepts (at-most-concept node) (unless (is-top-concept-p (qualification at-most-concept)) (error "To be implemented!")) (let ((role-n (assoc (role at-most-concept) role-n-entries))) (if role-n (setf (second role-n) (if (< (n at-most-concept) (n (second role-n))) at-most-concept (second role-n))) (push (list (role at-most-concept) at-most-concept) role-n-entries)))) ;;; (dolist (role-n role-n-entries) (let* ((role (first role-n)) (at-most-concept (second role-n)) (n (n at-most-concept)) (m 0) (edges nil)) (loop-over-role-successors (node role) (succ edge) ;;; (format t "~% ~A ~A ~A ~A" node role succ edge) (if (eq node (from edge)) (unless (zerop (multiplicity edge)) (push edge edges) (incf m (multiplicity edge))) (unless (zerop (inverse-multiplicity edge)) (push edge edges) (incf m (inverse-multiplicity edge))))) (when (> m n) (announce "~%+++ Selected violated AT-MOST CONCEPT ~A : ~A" node at-most-concept) (announce "~%+++ Edges found: ~A" edges) (return-from select-violated-at-most-concept (values at-most-concept node edges m))))))))) ;;; ;;; ;;; (defmethod select-attribute-exists-concepts ((abox abox) (language dl)) (let ((node (or (get-oldest-node-satisfying1 abox ; wichig! sonst falsch! ;;; s. Gegenbeispiel in alchfnrplus-prover.lisp! #'(lambda (x) (and (active-p x) (old-p x) (has-unexpanded-attribute-exists-concepts-p x)))) (get-youngest-node-satisfying1 abox #'(lambda (x) (and (active-p x) (has-unexpanded-attribute-exists-concepts-p x)))))) (ae-concept nil) (ae-concepts nil) (relevant-ae-concepts nil) (score nil)) (when node (loop-over-node-unexpanded-attribute-exists-concepts (concept node nil) (let ((new-score (get-some-score node ae-concept))) (when (or (not ae-concept) (> new-score score)) (setf score new-score) (setf ae-concept concept)) (push concept ae-concepts))) (push ae-concept relevant-ae-concepts) (when ae-concept (announce "~%+++ Selected ATTRIBUTE-EXISTS CONCEPT ~A : ~A" node ae-concept) (let* ((found t)) (loop while found do (setf found nil) (let ((x (find-if #'(lambda (x) (some #'(lambda (y) (has-common-parent-feature (role x) (role y))) relevant-ae-concepts)) ae-concepts))) (when x (setf found t) (setf ae-concepts (delete x ae-concepts)) (push x relevant-ae-concepts))))) (setf relevant-ae-concepts (delete-duplicates relevant-ae-concepts)) (announce "~%+++ Selected group of ATTRIBUTE-EXISTS CONCEPTS ~A : ~A" node relevant-ae-concepts) (values ae-concept relevant-ae-concepts node)))))
10,040
Common Lisp
.lisp
229
28.419214
105
0.494219
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
4e26bf2f38f32f85394f1290f56f6814536e5b3b5751b7995aca211d935ed00c
12,564
[ -1 ]
12,565
model-merging4.lisp
lambdamikel_DLMAPS/src/prover/model-merging4.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defrule make-models-for-nodes (dl-with-model-merging abox) (when *cache-models-p* ;;; ;;; Blätter identifizieren ;;; (let ((leaf-nodes nil) ; Tableau-Blaetter (keine alten) (satisfiable-nodes nil)) ; Knoten, die sicher erfuellbar sind (labels ((do-it (node) (when (not (or (old-p node) (root-p node))) ;;; vollstaendig expandierte Blätter identifizieren (when (and (active-p node) (stable-p node) ; fuer ALCHN erforderlich! (complete-p node)) ;; (describe-object node t) (deactivate-node abox node)) ;;; inaktive Sammeln ;;; ein Knoten ist inaktiv, wenn ;;; 1. soeben deaktiviert, oder ;;; 2. blockiert, oder ;;; 3. als erfuellbar bekannt (dann cache-satisfiable-p = T) (when (and (not (active-p node)) (stable-p node) (=> *blocking-enabled-p* (not (blocked-p node)))) (push node leaf-nodes))))) (announce "All leaf nodes : ~A" (get-leaf-nodes abox)) (announce "All blocked nodes: ~A" (get-blocked-nodes abox)) (loop-over-leaf-nodes (node abox) ;;; haben niemals aktive Nachfolger! (do-it node)) (loop-over-blocked-nodes (node abox) ;;; haben niemals aktive Nachfolger! (do-it node))) (announce "Identified leaf nodes: ~A" leaf-nodes) ;;; ;;; Knoten identifizieren, die nun *sicher* als erfuellbar bekannt sind. ;;; Von den Blaettern beginnen! ;;; (labels ((mark-sat-nodes (node) (when (=> *blocking-enabled-p* ;;; kann ausgeschaltet werden ;;; wenn das Tableaux am Ende ;;; als Erfuellbar bekannt ist, ;;; koennen auch von geblockten Knoten ;;; Modelle erzeugt werden! ;;; s. cache-and-delete-Anwendung ;;; vor (success) im ALCH-Prover (not (blocked-p node))) ;;; geblockte Knoten oder Vorgaenger von ;;; geblockten Knoten koennen dann niemals ;;; als really-satisfiable-p markiert werden (announce "Node ~A = ~A ~A" node (outgoing node) (mapcar #'(lambda (out) (really-satisfiable-p (to out))) ;; natuerlich auch wahr fuer Blaetter! (outgoing node))) (when (every #'(lambda (out) (really-satisfiable-p (to out))) ;; natuerlich auch wahr fuer Blaetter! (outgoing node)) (when (and (stable-p node) (or (cache-satisfiable-p node) (blocked-p node) (complete-p node))) (unless (really-satisfiable-p node) (when (active-p node) (deactivate-node abox node)) (setf (really-satisfiable-p node) t) (push node satisfiable-nodes)) (dolist (in (incoming node)) (mark-sat-nodes (from in)))))))) (dolist (leaf leaf-nodes) (mark-sat-nodes leaf)) (loop-over-cache-sat-nodes (leaf abox) (mark-sat-nodes leaf))) (announce "Identified satisfiable nodes: ~A" satisfiable-nodes) ;;; ;;; ;;; (when *cache-models-p* (dolist (node satisfiable-nodes) ; hier sind niemals alte Knoten enthalten (announce "Cache building, now considering node ~A" node) ;;; hierdurch werden evtl. weitere Caches gefuellt!!! ;;; (durch Konzept-Xreferencing): (when (initial-concept node) (register-already-known-to-be-satisfiable abox node)) (when (and (not (cache-satisfiable-p node)) (not (blocked-p node))) (announce "~A is not cache satisfiable and not blocked -> concept model can be created" node) ;;; nur wenn die Nachfolger expandiert wurden, kann ;;; ein Modell erzeugt werden! (when (every #'(lambda (outgoing) (not (active-p (to outgoing)))) (outgoing node)) (announce "Successors of ~A are inactive" node) ;;; die ausgehenden eines nicht-alten Knotens sind ;;; ebenfalls nicht alt ;;; Konzept-Modelle (let ((model (make-model-from-node node))) (when (initial-concept node) (announce "~A has initial concept ~A" node (initial-concept node)) (if (< (length (cached-models (initial-concept node))) *max-no-of-concept-models*) (progn (announce "Making concept model for initial concept ~A of node ~A" (initial-concept node) node) ;(register-concept-model (get-node-concept abox node) model) (register-concept-model (initial-concept node) model)) (announce "Already ~A models for initial concept ~A of node ~A" *max-no-of-concept-models* (initial-concept node) node)))))))))) +insert-body-code+) (defrule delete-nodes (dl abox) (when *delete-nodes-p* (let ((change t)) (loop while change do (setf change nil) (loop-over-leaf-nodes (node abox) (unless (active-p node) (delete-node abox node) (setf change t)))))) +insert-body-code+) (defrule make-models-for-old-nodes (dl-with-model-merging abox) ;;; darf nur vor (success) gerufen werden! (when (or *store-ind-models-p* *cache-models-p*) (loop-over-nodes (node abox) (when (and (not (already-known-to-be-inconsistent-p node)) (or (old-p node) (root-p node))) ;;; geblockte sind niemals alt (oder root)! (announce "Cache building (old nodes), now considering node ~A" node) (when (initial-concept node) (register-already-known-to-be-satisfiable abox node)) (unless (cache-satisfiable-p node) (when (and *store-ind-models-p* (< (length (ind-models node)) *max-no-of-ind-models-per-node*)) (announce "Making ind model for node ~A" node) (push (make-model-from-node node) (slot-value node 'ind-models))) ;;; Achtung! Ind und Concept Models fuer alte Knoten sind nicht ;;; das selbe! Denn in einer ABox mit mehr als einem Knoten haben ;;; die Knoten kein initial-concept! (da ja das Label erst durch ;;; die erforderliche Precompletion stabil wird, die ist jedoch ;;; nichtdeterministisch) (when (initial-concept node) ;;; hierdurch werden Caches gefuellt! (register-already-known-to-be-satisfiable abox node)) (when (and *cache-models-p* (initial-concept node) (< (length (cached-models (initial-concept node))) *max-no-of-concept-models*)) (announce "Making concept model for initial concept ~A of node ~A" (initial-concept node) node) (let ((model (make-model-from-node node))) (register-concept-model (initial-concept node) model) ;(register-concept-model (get-node-concept abox node) model) )))))) +insert-body-code+) ;;; ;;; ;;; (defrule pop-active-nodes-heap (dl abox1) ;;; nur fuer Tiefensuche-Strategie mit ABOX1 !!! (with-slots (active-nodes) abox (let ((node (heap-peek active-nodes))) ;;; keine Regel war anwendbar auf den aktuell aktiven Knoten -> ;;; Knoten ist complete, deaktivieren, naechster Knoten vom Heap ;;; wird aktueller Knoten ;;; (Tiefensuche) (if node (progn (unless (active-p node) (error "Found a deactivated node on active-nodes heap: ~A!" node)) (when (or (not (complete-p node)) (blocked-p node) (cache-satisfiable-p node)) (describe-object node t) (error "deactivate nodes: ~A!" node)) (deactivate-node abox node) ;;; hier tritt nun Backtracking fuer den BLOCKIERENDEN Knoten ;;; auf, also ist der fertig expandiert -> nun steht auch der ;;; Erfuellbarkeitsstatus aller evtl. blockierten Nachfolger positiv fest, ;;; vorher nicht! (when *blocking-enabled-p* (dolist (blocked (slot-value node 'blocking-for)) (setf *bb* (list node blocked )) (unless (deleted-p blocked) (loop-between-blocked-blocking (var blocked node) (setf (really-satisfiable-p var) t))))) ;;; ;;; weiter ;;; (when (every #'(lambda (out) ;;; also: entweder Complete oder Cache-Sat Hit! (or (really-satisfiable-p (to out)) ;; (blocked-p (to out)) falsch (already-known-to-be-satisfiable-p (to out)))) (outgoing node)) (setf (really-satisfiable-p node) t) (when *cache-models-p* (announce "Cache building, now considering node ~A" node) (when (initial-concept node) (register-already-known-to-be-satisfiable abox node)) (let ((model (make-model-from-node node))) (when (and (initial-concept node) (< (length (cached-models (initial-concept node))) *max-no-of-concept-models*)) (announce "Making concept model for initial concept ~A of node ~A" (initial-concept node) node) ;(register-concept-model (get-node-concept abox node) model) (register-concept-model (initial-concept node) model))))) +insert-positive-code+) (progn +insert-negative-code+))))) ;;; ;;; ;;; (defrule model-merging (dl-with-model-merging abox :args (node)) (when *use-cached-models-p* (labels ((do-it (node) (when (and (active-p node) (stable-p node) (not (complete-p node)) ;; kann fuer ALCHN vorkommen! (not (checked-p node))) ;;; ;;; Unsat Cache ;;; (announce "Checking Unsat Cache for stable node ~A" node) (when (and *use-unsat-cache-p* (initial-concept node) (register-initial-concept-unsat-cache-query) (already-known-to-be-inconsistent-p node)) (setf (cur-clash-node abox) nil) (register-initial-concept-unsat-cache-hit) ;;; ;;; Backtracking ausloesen! ;;; (let ((cps #| Aua! das war wohl nix... (sort (copy-list (if (is-and-concept-p (initial-concept node)) (get-choice-points (arguments (initial-concept node)) :node node) (get-choice-points (initial-concept node) :node node))) #'>) |# (sort (copy-list (get-choice-points (multiple-value-call #'list (get-unexpanded-concept-lists node)) :node node)) #'>))) (when *debug-p* (describe-object node t) (announce "Returning choice points: ~A" cps) (announce "Choice points: ~A : ~A" (multiple-value-call #'list (get-unexpanded-concept-lists node)) (get-choice-points (multiple-value-call #'list (get-unexpanded-concept-lists node)) :node node))) (return-from prover (values nil cps)))) ;;; ;;; Sat Cache und Model Merging ;;; (announce "Checking Sat Cache for stable node ~A" node) (register-sat-cache-query) (cond ((and (initial-concept node) (=> *store-ind-models-p* ;; die muessen expandiert werden, sonst hab ich kein Modell! (not (root-or-old-p node))) (progn (register-initial-concept-sat-cache-query) (or (cached-models (initial-concept node)) (already-known-to-be-satisfiable-p node)))) (register-initial-concept-sat-cache-hit) (register-sat-cache-hit) (announce "Found cached model for initial concept ~A of stable node ~A" (initial-concept node) node) (register-already-known-to-be-satisfiable abox node) (register-cache-satisfiable abox node) (deactivate-node abox node)) ;; ;; das initial-concept wird beim Aufruf von "register-label-is-stable" ;; gesetzt; dort wird ein AND-Konzept geparsed, und wenn bereits eines ;; im Concept-Store mit cached-model ist, bin ich fein raus! ;; ;; ansonsten: versuche, ob mergeable ;; wenn mergeable, könnte man auch die gemergten Modelle (to be implemented!) ;; als Modell fuer initial-concept nehmen! ;; ;; wenn das alles fehlschlaegt, wird der Knoten expandiert, und am Ende, ;; wenn er compelte-p ist, wird sein Modell gecached fuer initial-concept! ;; s. mode-caching-rule ;; ( (let ((concepts nil)) (when (=> *store-ind-models-p* ;; die muessen expandiert werden, sonst hab ich kein Modell! (not (root-or-old-p node))) (loop-over-node-unexpanded-concepts (concept node) (push concept concepts)) (register-mm-query) (models-of-concepts-mergeable-p language concepts))) (announce "Unexpanded concepts ~A of stable node ~A are mergeable" (get-unexpanded-concept-lists node) node) (register-mm-success) (register-sat-cache-hit) (register-already-known-to-be-satisfiable abox node) (register-cache-satisfiable abox node) (deactivate-node abox node) (announce "Found MM cache hit of stable node ~A" node)))) ;;; ;;; ;;; (setf (checked-p node) t))) (if node (do-it node) (loop-over-active-nodes (node abox) (do-it node))) +insert-body-code+))) (defrule identify-stable-nodes (alchn abox) (let ((changed t)) (loop while changed do (setf changed nil) (loop-over-active-nodes (node abox) (when (and (not (stable-p node)) (every #'(lambda (in) (let ((pre (from in))) (and (not (has-unexpanded-generating-concepts-p pre)) (stable-p pre)))) (incoming node))) (announce "Identified node ~A as stable!" node) (setf changed t) (register-label-is-stable abox node))))) +insert-body-code+)
19,144
Common Lisp
.lisp
357
30.815126
105
0.461547
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
34b8f90895c4df30da94fdcdea2c03984c34a9ad5288f826e77cec6defbdf287
12,565
[ -1 ]
12,566
alchf-rplus-prover.lisp
lambdamikel_DLMAPS/src/prover/alchf-rplus-prover.lisp
;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (define-prover ((abox-sat alchf-rplus abox)) (:init :call-next-method) (:main (perform (deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (make-models-for-nodes) (:body (perform (feature-expansion) (:positive (if clashes (handle-clashes) (perform (block-nodes :blocked succ) (:body (perform (model-merging :node succ) (:body (next-round))))))) (:negative (perform (some-expansion) (:positive (if clashes (handle-clashes) (perform (block-nodes :blocked new-node) (:body (perform (model-merging :node new-node) (:body (next-round))))))) (:negative (let ((*blocking-enabled-p* nil)) (perform (make-models-for-nodes) (:body (perform (make-models-for-old-nodes) (:body (success))))))))))))))))))) (define-prover ((abox-sat alchf-rplus abox1)) (:init :call-next-method) (:main (perform (focused-deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (feature-expansion) (:positive (if clashes (handle-clashes) (perform (block-nodes :blocked succ) (:body (perform (model-merging :node succ) (:body (next-round))))))) (:negative (perform (some-expansion) (:positive (if clashes (handle-clashes) (perform (block-nodes :blocked new-node) (:body (perform (model-merging :node new-node) (:body (next-round))))))) (:negative (perform (pop-active-nodes-heap) (:positive (next-round)) (:negative (let ((*blocking-enabled-p* nil)) (perform (make-models-for-nodes) (:body (perform (make-models-for-old-nodes) (:body (success))))))))))))))))))) #| (progn (with-kb (test test :delete-if-exists-p t) (defrole r :transitive t) (deffeature f :parents (r)) (unless (sat? (and (some r c) (all r (some r c))) :recompute-p t :debug-p t) (error "prover error"))) (with-kb (test test :delete-if-exists-p t) (defrole r :transitive t) (deffeature f :parents (r)) (unless (sat? (and (some f (and c (some f c))) (all r (some f d))) :recompute-p t :debug-p t) (error "prover error"))) (with-kb (test test :delete-if-exists-p t) (defrole r :transitive t) (deffeature f :parents (r)) (when (sat? (and (some f (some f c)) (all r (not d)) (all r (or (not c) (some f d)))) :recompute-p t :debug-p t) (error "prover error"))) (with-kb (test test :delete-if-exists-p t) (defrole r :transitive t) (deffeature f :parents (r)) (unless (sat? (and (some f (some f c)) (all r (not d)) (all r (or (not c) (some f d) (and (some f (some r c)) (all r (some r c)))))) :recompute-p t :debug-p t) (error "prover error"))) (with-kb (test test :delete-if-exists-p t) (defrole r :transitive t) (deffeature f :parents (r)) (when (sat? (and (all r (and (not c) (not e) (not d))) (some f (some f top)) (all r (or (some f d) (some f c) (some f e)))) :recompute-p t :debug-p t) (error "prover error"))) (with-kb (test test :delete-if-exists-p t) ;;; interessanter Fall - ;;; hier existiert bereits ein "g"-Nachfolger fuer "a" ;;; wird (a (some f top)) expandiert, dann entsteht ein ;;; neuer "g"-Nachfolger (weil Oberfeature von "f"). ;;; da beim ALCHF-Prover aber kein Merging stattfindet, ;;; muss also gleich bei der erzeugenden Feature-Expansion-Rule ;;; darauf geachtet werden, ob bereits Feature-Nachfolger von ;;; Oberfeatures von dem zu erzeugenden Feature-Nachfolger ;;; existieren; in dem Fall muss dieser Knoten genommen werden, ;;; und es darf kein neuer Erzeugt werden! s. Code und Kommentar in ;;; feature-expansion.lisp ;;; Nachtrag: verstehe ich nicht mehr - eigentlich sollte dann dieser ;;; Constraint bereits durch "look-for-somes" bzw. "look-for-featueres" ;;; in deterministic-expansion.lisp as expandiert gekennzeichnet worden sein? ;;; Pruefen! (deffeature g) (deffeature f :parents (r g)) (transitive r) (instance a (all r (not c))) (related a b g) (instance a (some f top)) (related b c g) (instance b (some f c)) (false! (abox-sat? test :debug-p t)))) |#
6,620
Common Lisp
.lisp
160
24.2
89
0.432815
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
388d5660e885b47cde5a070ec03832b446b34141490f01b0654b903d2af76179
12,566
[ -1 ]
12,567
game2.lisp
lambdamikel_DLMAPS/src/prover/game2.lisp
(define-primitive-role has-location :feature t :inverse contains :range generic-container) (define-primitive-role has-exit :domain room :range exit) (define-primitive-role has-counterpart :range exit) (define-primitive-role leads-to :feature t :range room) (define-primitive-role shows) (define-primitive-role has-colour) (define-primitive-role wears) (define-primitive-role has-detail) (define-primitive-role fits-in) ;;; domain & range restrictions for roles (implies (and generic-container (exactly 0 contains)) (and empty (not full))) (implies (and generic-container (at-least 1 contains)) (and full (not empty))) (disjoint empty full) ;;; define "here-object" and "inventory-object" (equivalent here (and *top* (some contains player))) (equivalent here-object (and object (all has-location here))) (equivalent inventory-object (and object (all has-location player))) ;;; define "visible" and "accessible" (equivalent visible (or here (all has-location here) (all has-location (and visible open)) (some contains (and open (some contains player))) (all has-location (some contains (and open (some contains player)))))) (equivalent accessible (or here (all has-location here) (all has-location (and accessible open)))) ;;; concepts (equivalent generic-container (or player room container-object)) (disjoint room object) (disjoint room player) (disjoint object player) (disjoint exit player) (implies takeable object) (implies edible object) (implies drinkable object) (implies container-object object) (implies open-close-container (and container-object open-closed locked-unlocked)) (implies fore-exit exit) (implies aft-exit exit) (implies port-exit exit) (implies starboard-exit exit) (implies transport-tube exit) ;(implies exit (and open-closed locked-unlocked)) (implies open open-closed) (implies closed open-closed) (implies locked locked-unlocked) (implies unlocked locked-unlocked) (implies locked closed) (disjoint open closed) (disjoint locked unlocked) (disjoint has-power has-no-power) (implies light object) (implies light-on light) (implies light-off light) (disjoint light-on light-off) (implies full (not crushed)) (implies crushed empty) (disjoint crushed uncrushed) (equivalent green-object (and object (some has-colour green-colour))) (equivalent silver-object (and object (some has-colour silver-colour))) (equivalent golden-object (and object (some has-colour golden-colour))) (equivalent white-object (and object (some has-colour white-colour))) (equivalent yellow-object (and object (some has-colour yellow-colour))) (equivalent brown-object (and object (some has-colour brown-colour))) (equivalent red-object (and object (some has-colour red-colour))) (equivalent black-object (and object (some has-colour black-colour))) (equivalent blue-object (and object (some has-colour blue-colour))) ;;; Player (implies player (and open big-sized)) (implies head object) (implies mouth object) (implies hand object) (implies uniform takeable) (implies shirt object) (implies trousers object) (implies shoe object) (implies badge (and object small-sized)) (implies watch (and takeable small-sized)) (implies translator (and takeable tiny-sized)) (implies id-card (and takeable small-sized)) (implies credit-card (and takeable small-sized)) (implies coin (and takeable tiny-sized)) (implies galakmidcoin coin) (implies box open-close-container) (implies isotopes (and takeable edible medium-sized)) ;;; Scooter (implies seating (and container-object open)) (implies couch (and seating big-sized)) (implies couch-leg (and object small-sized)) (implies seat (and object big-sized)) (implies hatch (and exit big-sized)) (implies window (and transparent medium-sized)) (implies space (and room huge-sized)) (implies space-station (and object huge-sized)) (implies slot (and object small-sized)) (implies spaceform (and takeable small-sized)) (implies button (and object small-sized)) (implies scooter (and object huge-sized)) ;;; Toolbox (implies toolbox (and takeable medium-sized open-close-container)) (implies bracelet (and takeable small-sized)) (implies glue (and takeable small-sized)) (implies tube (and takeable small-sized)) (implies cap (and takeable small-sized)) (implies bottle (and takeable transparent)) (implies nutrientpaste (and takeable edible small-sized)) (implies saw takeable) (implies hacksaw (and saw medium-sized)) (implies syringe (and takeable small-sized)) (implies needle (and takeable tiny-sized)) (implies plunger (and takeable small-sized)) (implies hydraulicram (and takeable medium-sized)) ;;; Hall-j (implies bulkhead (and exit open-closed locked-unlocked)) ;;; Hall-l (implies barrier (and object transparent big-sized)) ;;; Hall-p (implies sign (and object readable medium-sized)) ;;; SanFac (implies stall (and room big-sized)) (implies sink (and container-object medium-sized)) (implies trashcan (and container-object takeable small-sized)) (implies rubbish (and object small-sized)) (implies toiletroll (and object takeable small-sized)) ;;; Waiting Room (implies door (and open-closed exit)) (implies magazine (and takeable readable small-sized)) (implies book (and takeable readable small-sized)) (implies drill (and takeable small-sized)) (implies implement (and takeable small-sized)) (implies hosing (and takeable small-sized)) ;;; Laboratory (implies device (and object big-sized)) (implies devicemonitor (and object medium-sized)) (implies maze (and takeable small-sized)) (implies headset (and takeable small-sized)) ;;; Sick Bay (implies cage (and container-object big-sized)) (implies bar (and takeable medium-sized)) (implies fussbudget (and not-so-easy-to-kill big-sized)) ;;; Directors Office (implies cabinet (and open-close-container big-sized)) (implies key (and takeable small-sized)) (implies desk (and container-object open big-sized)) (implies outlet (and object small-sized)) (implies manual (and takeable medium-sized)) (implies computer (and takeable medium-sized)) (implies screen (and readable object)) ; AND INSERTED ---RM (implies cord object) (implies plug object) (implies keyboard object) (implies paper (and takeable readable small-sized)) ;;; Lounge (implies planet (and object huge-sized)) (implies table (and container-object big-sized)) (implies chair (and seating medium-sized)) (implies centimidcoin coin) (implies dispenser (and container-object locked big-sized)) (implies carpet (and object big-sized)) (implies display (and object small-sized)) (implies tray (and container-object open)) (implies colamonitor (and object small-sized)) (implies cable object) (implies coinstore (and container-object open)) (implies zorkmidcoin coin) (implies refundbutton button) (implies can (and takeable drinkable small-sized (or crushed uncrushed))) (implies standardcolacan can) (implies dietcolacan can) ;;; Teleport Room (implies teleporter (and object huge-sized)) (implies transporterpad (and object big-sized)) (implies controlpanel (and object medium-sized)) ;;; Map Room (implies map (and object medium-sized)) ;;; Control Station (implies monitor (and object medium-sized)) ;;; Briefing Room (implies photo object) (implies robot (and object big-sized)) (implies tag (and object small-sized)) ;;; Store (implies adapter (and takeable small-sized)) (implies fruit (and edible takeable small-sized)) (implies crate (and wooden takeable medium-sized)) (implies board (and wooden takeable medium-sized)) ;;; Computer Room (implies kid (and not-so-easy-to-kill big-sized)) (implies terminal (and object medium-sized)) (in-abox game-initial) ;;; define colour objects (instance green green-colour) (instance silver silver-colour) (instance golden golden-colour) (instance white white-colour) (instance yellow yellow-colour) (instance brown brown-colour) (instance red red-colour) (instance black black-colour) (instance blue blue-colour) (instance myself (and player alive not-so-easy-to-kill)) (related myself couch1 has-location) (instance mouth1 mouth) (instance head1 head) (instance hand1 hand) (instance hand2 hand) (related head1 mouth1 has-detail) (related myself head1 has-detail) (related myself hand1 has-detail) (related myself hand2 has-detail) (instance uniform1 uniform) (instance badge1 badge) (instance badge2 badge) (instance shirt1 shirt) (instance trousers1 trousers) (instance shoe1 shoe) (instance shoe2 shoe) (related uniform1 badge1 has-detail) (related uniform1 badge2 has-detail) (related uniform1 shirt1 has-detail) (related uniform1 trousers1 has-detail) (related uniform1 shoe1 has-detail) (related uniform1 shoe2 has-detail) (instance watch1 watch) (instance translator1 translator) (related myself uniform1 wears) (related myself watch1 wears) (related myself translator1 wears) (instance id-card1 id-card) (related id-card1 white has-colour) (related id-card1 myself has-location) (instance credit-card1 credit-card) (related credit-card1 blue has-colour) (related credit-card1 myself has-location) (instance coin1 galakmidcoin) (related coin1 golden has-colour) (related coin1 myself has-location) (instance isotopes-box1 (and box closed)) (related isotopes-box1 silver has-colour) (related isotopes-box1 yellow has-colour) (related isotopes-box1 black has-colour) (related isotopes-box1 myself has-location) (instance isotopes1 isotopes) (related isotopes1 isotopes-box1 has-location) ;;; Scooter (instance scooter-bridge room) (instance space1 space) (instance station1 space-station) (related station1 space1 has-location) (related station1 silver has-colour) (related window1 space1 shows) (related window1 station1 shows) (instance port1 docking-port) (related station1 port1 has-detail) (instance couch1 couch) (related couch1 brown has-colour) (related couch1 black has-colour) (related couch1 scooter-bridge has-location) (instance couchleg1 couch-leg) (related couch1 couchleg1 has-detail) (instance couchleg2 couch-leg) (related couch1 couchleg2 has-detail) (instance couchleg3 couch-leg) (related couch1 couchleg3 has-detail) (instance couchleg4 couch-leg) (related couch1 couchleg4 has-detail) (instance slot1 slot) (related slot1 couch1 has-location) (instance spaceform1 spaceform) (instance button0 button) (related button0 couch1 has-location) (related button0 red has-colour) (instance hatch1 hatch) (instance window1 window) (related hatch1 window1 has-detail) (related hatch1 silver has-colour) (related hatch1 scooter-bridge has-location) (instance hatch1 (and locked fore-exit)) (related scooter-bridge hatch1 has-exit) (related hatch1 space1 leads-to) (instance scooter1 scooter) (related scooter1 space1 has-location) (related scooter1 silver has-colour) ;;; Toolbox (instance toolbox1 toolbox) (related toolbox1 scooter-bridge has-location) (related toolbox1 silver has-colour) (instance bracelet1 bracelet) (related bracelet1 toolbox1 has-location) (related bracelet1 golden has-colour) (instance glue1 glue) (related glue1 toolbox1 has-location) (related glue1 yellow has-colour) (related glue1 glue1-cap has-detail) (related glue1 glue1-bottle has-detail) (instance glue1-cap cap) (related glue1-cap black has-colour) (instance glue1-bottle bottle) (instance nutrientpaste1 (and nutrientpaste full)) (related nutrientpaste1 toolbox1 has-location) (related nutrientpaste1 green has-colour) (related nutrientpaste1 nutrientpaste1-cap has-detail) (related nutrientpaste1 nutrientpaste1-tube has-detail) (instance nutrientpaste1-cap cap) (related nutrientpaste1-cap black has-colour) (instance nutrientpaste1-tube tube) (related nutrientpaste1-tube green has-colour) (instance hacksaw1 hacksaw) (related hacksaw1 toolbox1 has-location) (related hacksaw1 red has-colour) (related hacksaw1 silver has-colour) (related hacksaw1 hacksaw1-grip has-detail) (related hacksaw1 hacksaw1-blade has-detail) (instance hacksaw1-grip grip) (related hacksaw1-grip red has-colour) (instance hacksaw1-blade blade) (related hacksaw1-blade silver has-colour) (instance hydraulicram1 hydraulicram) (related hydraulicram1 habitation-bulkhead fits-in) (related hydraulicram1 computerroom-bulkhead fits-in) ;;; Docking-Port (instance docking-port room) (related docking-port docking-port-tube1 has-exit) (instance docking-port-tube1 transport-tube) (related docking-port-tube1 hall-m leads-to) (related docking-port-tube1 docking-port has-location) ;;; Hall-j (instance hall-j room) (related hall-j hall-j-maproom-exit has-exit) (instance hall-j-maproom-exit fore-exit) (related hall-j-maproom-exit maproom leads-to) (related hall-j-maproom-exit hall-j has-location) (related hall-j hall-j-teleportroom-exit has-exit) (instance hall-j-teleportroom-exit aft-exit) (related hall-j-teleportroom-exit teleportroom leads-to) (related hall-j-teleportroom-exit hall-j has-location) (related hall-j habitation-bulkhead has-exit) (instance habitation-bulkhead (and port-exit locked)) (related habitation-bulkhead computerroom leads-to) (related habitation-bulkhead hall-j has-location) (related habitation-bulkhead computerroom-bulkhead has-counterpart) (related hall-j hall-j-hall-k-exit has-exit) (instance hall-j-hall-k-exit starboard-exit) (related hall-j-hall-k-exit hall-k leads-to) (related hall-j-hall-k-exit hall-j has-location) ;;; Hall-k (instance hall-k room) (related hall-k hall-k-briefingroom-exit has-exit) (instance hall-k-briefingroom-exit fore-exit) (related hall-k-briefingroom-exit briefingroom leads-to) (related hall-k-briefingroom-exit hall-k has-location) (related hall-k hall-k-stationcontrol-exit has-exit) (instance hall-k-stationcontrol-exit aft-exit) (related hall-k-stationcontrol-exit stationcontrol leads-to) (related hall-k-stationcontrol-exit hall-k has-location) (related hall-k hall-k-hall-l-exit has-exit) (instance hall-k-hall-l-exit starboard-exit) (related hall-k-hall-l-exit hall-l leads-to) (related hall-k-hall-l-exit hall-k has-location) (related hall-k hall-k-hall-j-exit has-exit) (instance hall-k-hall-j-exit port-exit) (related hall-k-hall-j-exit hall-j leads-to) (related hall-k-hall-j-exit hall-k has-location) ;;; Hall-l (instance hall-l room) (related hall-l hall-l-hall-k-exit has-exit) (instance hall-l-hall-k-exit port-exit) (related hall-l-hall-k-exit hall-k leads-to) (related hall-l-hall-k-exit hall-l has-location) (related hall-l hall-l-hall-m-exit has-exit) (instance hall-l-hall-m-exit starboard-exit) (related hall-l-hall-m-exit hall-m leads-to) (related hall-l-hall-m-exit hall-l has-location) (related hall-l hall-l-office-exit has-exit) (instance hall-l-office-exit aft-exit) (related hall-l-office-exit office leads-to) (related hall-l-office-exit hall-l has-location) (related hall-l hall-l-store-exit has-exit) (instance hall-l-store-exit (and fore-exit barrier locked)) (related hall-l-store-exit store leads-to) (related hall-l-store-exit hall-l has-location) (related hall-l-store-exit store-hall-l-exit has-counterpart) ;;; Hall-m (instance hall-m room) (related hall-m hall-m-tube1 has-exit) (instance hall-m-tube1 transport-tube) (related hall-m-tube1 docking-port leads-to) (related hall-m-tube1 hall-m has-location) (related hall-m hall-m-hall-n-exit has-exit) (instance hall-m-hall-n-exit starboard-exit) (related hall-m-hall-n-exit hall-n leads-to) (related hall-m-hall-n-exit hall-m has-location) (related hall-m hall-m-hall-l-exit has-exit) (instance hall-m-hall-l-exit port-exit) (related hall-m-hall-l-exit hall-l leads-to) (related hall-m-hall-l-exit hall-m has-location) ;;; Hall-n (instance hall-n room) (related hall-n hall-n-tube1 has-exit) (instance hall-n-tube1 transport-tube) (related hall-n-tube1 lounge leads-to) (related hall-n-tube1 hall-n has-location) (related hall-n hall-n-sickbay-exit has-exit) (instance hall-n-sickbay-exit fore-exit) (related hall-n-sickbay-exit sickbay leads-to) (related hall-n-sickbay-exit hall-n has-location) (related hall-n hall-n-hall-m-exit has-exit) (instance hall-n-hall-m-exit port-exit) (related hall-n-hall-m-exit hall-m leads-to) (related hall-n-hall-m-exit hall-n has-location) (related hall-n hall-n-hall-o-exit has-exit) (instance hall-n-hall-o-exit starboard-exit) (related hall-n-hall-o-exit hall-o leads-to) (related hall-n-hall-o-exit hall-n has-location) ;;; Hall-o (instance hall-o room) (related hall-o hall-o-hall-p-exit has-exit) (instance hall-o-hall-p-exit starboard-exit) (related hall-o-hall-p-exit hall-p leads-to) (related hall-o-hall-p-exit hall-o has-location) (related hall-o hall-o-hall-n-exit has-exit) (instance hall-o-hall-n-exit port-exit) (related hall-o-hall-n-exit hall-n leads-to) (related hall-o-hall-n-exit hall-o has-location) (related hall-o hall-o-lab-exit has-exit) (instance hall-o-lab-exit fore-exit) (related hall-o-lab-exit lab leads-to) (related hall-o-lab-exit hall-o has-location) ;;; Hall-p (instance hall-p room) (related hall-p hall-p-hall-o-exit has-exit) (instance hall-p-hall-o-exit port-exit) (related hall-p-hall-o-exit hall-o leads-to) (related hall-p-hall-o-exit hall-p has-location) (related hall-p engineering-bulkhead has-exit) (instance engineering-bulkhead (and starboard-exit locked)) ;;; (related engineering-bulkhead ???? leads-to) (related engineering-bulkhead hall-p has-location) (related hall-p hall-p-sanfac-exit has-exit) (instance hall-p-sanfac-exit fore-exit) (related hall-p-sanfac-exit sanfac leads-to) (related hall-p-sanfac-exit hall-p has-location) (related hall-p hall-p-waitingroom-exit has-exit) (instance hall-p-waitingroom-exit aft-exit) (related hall-p-waitingroom-exit waitingroom leads-to) (related hall-p-waitingroom-exit hall-p has-location) (instance sign1 sign) (related sign1 white has-colour) (related sign1 red has-colour) (related engineering-bulkhead sign1 has-detail) ;;; SanFac Room (instance sanfac room) (related sanfac sanfac-hall-p-exit has-exit) (instance sanfac-hall-p-exit aft-exit) (related sanfac-hall-p-exit hall-p leads-to) (related sanfac-hall-p-exit sanfac has-location) (instance stall1 stall) (related stall1 sanfac has-location) (related stall1 white has-colour) (instance sink1 sink) (related sink1 sanfac has-location) (related sink1 yellow has-colour) (instance trashcan1 trashcan) (related trashcan1 sanfac has-location) (related trashcan1 yellow has-colour) (instance rubbish1 rubbish) (related rubbish1 trashcan1 has-location) (related rubbish1 brown has-colour) (instance toiletroll1 toiletroll) (related toiletroll1 trashcan1 has-location) (related toiletroll1 brown has-colour) ;;; Waiting Room (instance waitingroom room) (related waitingroom waitingroom-hall-p-exit has-exit) (instance waitingroom-hall-p-exit fore-exit) (related waitingroom-hall-p-exit hall-p leads-to) (related waitingroom-hall-p-exit waitingroom has-location) (related waitingroom waitingroom-dentistroom-exit has-exit) (instance waitingroom-dentistroom-exit (and port-exit locked)) (related waitingroom-dentistroom-exit dentistroom leads-to) (related waitingroom-dentistroom-exit waitingroom has-location) (related waitingroom-dentistroom-exit dentistroom-waitingroom-exit has-counterpart) (instance table3 table) (related table3 waitingroom has-location) (related table3 red has-colour) (instance magazine1 magazine) (instance magazine2 magazine) (instance magazine3 magazine) (instance book1 book) (related magazine1 table3 has-location) (related magazine2 table3 has-location) (related magazine3 table3 has-location) (related book1 table3 has-location) ;;; Dentistroom (instance dentistroom room) (related dentistroom dentistroom-waitingroom-exit has-exit) (instance dentistroom-waitingroom-exit (and starboard-exit locked)) (related dentistroom-waitingroom-exit waitingroom leads-to) (related dentistroom-waitingroom-exit dentistroom has-location) (related dentistroom-waitingroom-exit waitingroom-dentistroom-exit has-counterpart) (instance chair3 chair) (related chair3 red has-colour) (related chair3 dentistroom has-location) (instance drill1 drill) (related drill1 dentistroom has-location) (instance implement1 implement) (related implement1 dentistroom has-location) (instance hosing1 hosing) (related hosing1 dentistroom has-location) ;;; Laboratory (instance lab room) (related lab lab-hall-o-exit has-exit) (instance lab-hall-o-exit aft-exit) (related lab-hall-o-exit hall-o leads-to) (related lab-hall-o-exit lab has-location) (instance device1 device) (related device1 lab has-location) (instance devicemonitor1 devicemonitor) (related device1 devicemonitor1 has-detail) (instance device2 device) (related device2 lab has-location) (instance devicemonitor2 devicemonitor) (related device2 devicemonitor2 has-detail) (instance device3 device) (related device3 lab has-location) (instance devicemonitor3 devicemonitor) (related device3 devicemonitor3 has-detail) (instance maze1 maze) (related maze1 black has-colour) (related maze1 lab has-location) (instance headset1 headset) (related headset1 black has-colour) (related maze1 headset1 has-detail) ;;; Lounge (instance lounge room) (related lounge lounge-tube1 has-exit) (instance lounge-tube1 transport-tube) (related lounge-tube1 hall-n leads-to) (related lounge-tube1 lounge has-location) (instance window2 window) (related window2 lounge has-location) (instance planet1 planet) (related planet1 green has-colour) (related planet1 space1 has-location) (related window2 planet1 shows) (related window2 space1 shows) (instance carpet1 carpet) (related carpet1 lounge has-location) (related carpet1 yellow has-colour) (instance table1 table) (related table1 lounge has-location) (related table1 brown has-colour) (instance table2 table) (related table2 lounge has-location) (related table2 brown has-colour) (instance chair1 chair) (related chair1 lounge has-location) (related chair1 brown has-colour) (instance chair2 chair) (related chair2 lounge has-location) (related chair2 brown has-colour) (instance coin2 centimidcoin) (related coin2 table1 has-location) (related coin2 silver has-colour) (instance dispenser1 dispenser) (related dispenser1 lounge has-location) (related dispenser1 red has-colour) (related dispenser1 white has-colour) (instance display1 display) (related dispenser1 display1 has-detail) (instance tray1 tray) (related dispenser1 tray1 has-detail) (instance pre-tray1 tray) (instance button1 button) (related dispenser1 button1 has-detail) (related button1 white has-colour) (instance button2 button) (related dispenser1 button2 has-detail) (related button2 white has-colour) (instance button3 button) (related dispenser1 button3 has-detail) (related button3 white has-colour) (instance button4 button) (related dispenser1 button4 has-detail) (related button4 white has-colour) (instance button5 button) (related dispenser1 button5 has-detail) (related button5 white has-colour) (instance button6 button) (related dispenser1 button6 has-detail) (related button6 white has-colour) (instance light1 light-on) (related dispenser1 light1 has-detail) (instance light2 light-on) (related dispenser1 light2 has-detail) (instance light3 light-off) (related dispenser1 light3 has-detail) (instance light4 light-off) (related dispenser1 light4 has-detail) (instance light5 light-off) (related dispenser1 light5 has-detail) (instance light6 light-off) (related dispenser1 light6 has-detail) (instance slot2 slot) (related dispenser1 slot2 has-detail) (instance colamonitor1 colamonitor) (related dispenser1 colamonitor1 has-detail) (instance cable1 cable) (related colamonitor1 cable1 has-detail) (instance coinstore1 coinstore) (related dispenser1 coinstore1 has-detail) (related coinstore1 silver has-colour) (instance zorkmidcoin1 zorkmidcoin) (related zorkmidcoin1 dispenser1 has-location) (related zorkmidcoin1 golden has-colour) (instance refundbutton1 refundbutton) (related dispenser1 refundbutton1 has-detail) (related refundbutton1 black has-colour) (instance standardcolacan1 (and standardcolacan full)) (related standardcolacan1 red has-colour) (related standardcolacan1 dispenser1 has-location) (instance dietcolacan1 (and dietcolacan full)) (related dietcolacan1 white has-colour) (related dietcolacan1 dispenser1 has-location) ;;; Sick Bay (instance sickbay room) (related sickbay sickbay-hall-n-exit has-exit) (instance sickbay-hall-n-exit aft-exit) (related sickbay-hall-n-exit hall-n leads-to) (related sickbay-hall-n-exit sickbay has-location) (instance syringe1 syringe) (instance needle1 needle) (instance plunger1 plunger) (related syringe1 needle1 has-detail) (related syringe1 plunger1 has-detail) (related syringe1 sickbay has-location) (instance cage1 (and cage locked)) (instance bar1 bar) (instance bar2 bar) (related cage1 sickbay has-location) (related cage1 silver has-colour) (related cage1 bar1 has-detail) (related cage1 bar2 has-detail) (related bar1 silver has-colour) (related bar2 silver has-colour) (instance fussbudget1 (and fussbudget alive)) (related fussbudget1 cage1 has-location) ;;; Station Control (instance stationcontrol room) (related stationcontrol stationcontrol-hall-k-exit has-exit) (instance stationcontrol-hall-k-exit fore-exit) (related stationcontrol-hall-k-exit hall-k leads-to) (related stationcontrol-hall-k-exit stationcontrol has-location) (instance monitor1 monitor) (related monitor1 stationcontrol has-location) (instance monitor2 monitor) (related monitor2 stationcontrol has-location) (instance monitor3 monitor) (related monitor3 stationcontrol has-location) (instance monitor4 monitor) (related monitor4 stationcontrol has-location) (instance monitor5 monitor) (related monitor5 stationcontrol has-location) (instance monitor6 monitor) (related monitor6 stationcontrol has-location) ;;; Briefing Room (instance briefingroom room) (related briefingroom briefingroom-hall-k-exit has-exit) (instance briefingroom-hall-k-exit aft-exit) (related briefingroom-hall-k-exit hall-k leads-to) (related briefingroom-hall-k-exit briefingroom has-location) (instance photo1 photo) (related photo1 briefingroom has-location) (instance robot1 robot) (related photo1 robot1 shows) (instance table4 table) (related table4 briefingroom has-location) (related table4 black has-colour) (instance tag1 tag) (related tag1 table4 has-location) (related tag1 black has-colour) (instance tag2 tag) (related tag2 table4 has-location) (related tag2 black has-colour) (instance tag3 tag) (related tag3 table4 has-location) (related tag3 black has-colour) (instance tag4 tag) (related tag4 table4 has-location) (related tag4 black has-colour) (instance chair4 chair) (related chair4 briefingroom has-location) (related chair4 black has-colour) ;;; Directors Office (instance directorsoffice room) (related directorsoffice directorsoffice-hall-l-exit has-exit) (instance directorsoffice-hall-l-exit fore-exit) (related directorsoffice-hall-l-exit hall-l leads-to) (related directorsoffice-hall-l-exit directorsoffice has-location) (instance desk1 desk) (related desk1 black has-colour) (related desk1 directorsoffice has-location) (instance cabinet1 (and cabinet closed)) (related cabinet1 directorsoffice has-location) (instance key1 key) (related key1 silver has-colour) (related key1 cabinet1 has-location) (related key1 toolbox1 fits-in) (related key1 waitingroom-dentistroom-exit fits-in) (related key1 dentistroom-waitingroom-exit fits-in) (instance outlet1 outlet) (related outlet1 white has-colour) (related outlet1 directorsoffice has-location) (instance manual1 manual) (related manual1 white has-colour) (related manual1 cabinet1 has-location) (instance computer1 computer) (related computer1 black has-colour) (related computer1 desk1 has-location) (instance screen1 screen) (related computer1 screen1 has-detail) (instance cord1 cord) (related cord1 black has-colour) (related computer1 cord1 has-detail) (instance plug1 plug) (related plug1 black has-colour) (related cord1 plug1 has-detail) (instance keyboard1 keyboard) (related keyboard1 black has-colour) (related computer1 keyboard1 has-detail) (instance paper1 paper) (related paper1 white has-colour) (related paper1 desk1 has-location) ;;; Teleport Room (instance teleportroom room) (related teleportroom teleportroom-hall-j-exit has-exit) (instance teleportroom-hall-j-exit fore-exit) (related teleportroom-hall-j-exit hall-j leads-to) (related teleportroom-hall-j-exit teleportroom has-location) (instance teleporter1 teleporter) (related teleporter1 teleportroom has-location) (instance transporterpad1 transporterpad) (related teleporter1 transporterpad1 has-detail) (instance controlpanel1 controlpanel) (related teleporter1 controlpanel1 has-detail) (instance button7 button) (related button7 red has-colour) (related controlpanel1 button7 has-detail) ;;; Map Room (instance maproom room) (related maproom maproom-hall-j-exit has-exit) (instance maproom-hall-j-exit aft-exit) (related maproom-hall-j-exit hall-j leads-to) (related maproom-hall-j-exit maproom has-location) (instance spacestationmap1 map) (instance colonymap1 map) (instance elevatormap1 map) (related spacestationmap1 maproom has-location) (related colonymap1 maproom has-location) (related elevatormap1 maproom has-location) ;;; Store (instance store room) (related store store-hall-l-exit has-exit) (instance store-hall-l-exit (and aft-exit barrier locked)) (related store-hall-l-exit hall-l leads-to) (related store-hall-l-exit store has-location) (related store-hall-l-exit hall-l-store-exit has-counterpart) (instance adapter1 adapter) (related adapter1 black has-colour) (related adapter1 store has-location) (instance fruit1 fruit) (related fruit1 crate1 has-location) (instance fruit2 fruit) (related fruit2 crate1 has-location) (instance fruit3 fruit) (related fruit3 crate1 has-location) (instance crate1 crate) (related crate1 brown has-colour) (related crate1 store has-location) (instance board1 board) (related board1 brown has-colour) (related crate1 board1 has-detail) (instance board2 board) (related board2 brown has-colour) (related crate2 board1 has-detail) (instance board3 board) (related board3 brown has-colour) (related crate3 board1 has-detail) ;;; Computer Room (instance computerroom room) (related computerroom computerroom-bulkhead has-exit) (instance computerroom-bulkhead (and starboard-exit locked)) (related computerroom-bulkhead hall-j leads-to) (related computerroom-bulkhead computerroom has-location) (related computerroom-bulkhead habitation-bulkhead has-counterpart) (instance kid1 (and kid alive)) (related kid1 computerroom has-location) (instance kid2 (and kid alive)) (related kid2 computerroom has-location) (instance terminal1 terminal) (related terminal1 computerroom has-location)
30,585
Common Lisp
.lisp
1
30,581
30,585
0.787968
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
396fee8fc63b98385f36be41fb7194d049426da7a7379216e701a80c4628f5a7
12,567
[ -1 ]
12,568
alchif-rplus-prover.lisp
lambdamikel_DLMAPS/src/prover/alchif-rplus-prover.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (define-prover ((abox-sat alchif-rplus abox)) (:main (perform (deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (block-nodes) (:body (perform (feature-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (some-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (success))))))))))))))
955
Common Lisp
.lisp
32
16.3125
60
0.414581
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
4fbb9c4a50ac9e069dd22e76ba0402ed9c1f29595ab17a5387f127bf0d487bf0
12,568
[ -1 ]
12,569
macros.lisp
lambdamikel_DLMAPS/src/prover/macros.lisp
;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defmacro defvar1 (&rest body) `(#+:lispworks SYSTEM::WITHOUT-WARNING-ON-REDEFINITION #-:lispworks progn (defvar ,@body))) (defmacro defparameter1 (&rest body) `(#+:lispworks SYSTEM::WITHOUT-WARNING-ON-REDEFINITION #-:lispworks progn (defparameter ,@body))) ;;; ;;; ;;; (defmacro with-logging (&body body) `(with-open-file (stream "prover.log" :direction :output :if-exists :supersede :if-does-not-exist :create) (setf *stream* stream) (let* ((*standard-output* stream) (*print-pretty* t) (*debug-io* *standard-output*) (*error-output* *standard-output*) (*trace-output* *standard-output*)) (handler-case ,@body (error (error) (format *standard-output* "~%~%******** ERROR ~A ************~%" error) (loop-over-abox-nodes (node *abox*) (describe-object node *standard-output*)) (force-output *standard-output*) 'error))))) (defmacro timed-defmethod (name &body body) (let ((var-name (intern (format nil "*TIME-SPEND-IN-~A*" name))) (body1 (last body))) `(progn (defvar1 ,var-name 0) (defmethod ,name ,@(butlast body) (let ((*start-time* (get-internal-run-time))) (unwind-protect ,@body1 (incf ,var-name (- (get-internal-run-time) *start-time*)))))))) (defmacro timed-defun (name &body body) (let ((var-name (intern (format nil "*TIME-SPEND-IN-~A*" name))) (body1 (last body))) `(progn (defvar1 ,var-name 0) (defun ,name ,@(butlast body) (let ((*start-time* (get-internal-run-time))) (unwind-protect ,@body1 (incf ,var-name (- (get-internal-run-time) *start-time*)))))))) (defmacro true! (body) `(unless ,body (error "~A must evaluate to TRUE!" ',body))) (defmacro false! (body) `(when ,body (error "~A must evaluate to FALSE!" ',body))) (defmacro push-all-to (add to-list &key (remove-duplicates-p t)) (let ((var1 (gensym)) (var2 (gensym))) `(let ((,var2 ,add)) (dolist (,var1 ,add) (push ,var1 ,to-list)) ,(when remove-duplicates-p `(setf ,to-list (remove-duplicates ,to-list))) ,var2))) ;;; ;;; ;;; ;;; (defmacro with-tbox* ((name &rest args &key delete-if-exists-p &allow-other-keys) &rest body) `(let* ((*cur-tbox* (when ,name (or (and ,(not delete-if-exists-p) (find-tbox ,name)) (make-tbox ,name ,@args)))) (*cur-store* (concept-store *cur-tbox*))) ,@body)) (defmacro in-tbox* (name &rest args &key delete-if-exists-p &allow-other-keys) `(progn (setf *cur-tbox* (when ,name (or (and ,(not delete-if-exists-p) (find-tbox ,name)) (make-tbox ,name ,@args)))) (setf *cur-store* (concept-store *cur-tbox*)) *cur-tbox*)) ;;; ;;; ;;; (defmacro with-tbox ((name &rest args) &rest body) `(with-tbox* ( (quote ,name) ,@args) ,@body)) (defmacro in-tbox (name &rest args) `(in-tbox* (quote ,name) ,@args)) ;;; ;;; ;;; (defmacro with-abox ((name &rest args &key type delete-if-exists-p &allow-other-keys) &rest body) `(with-substrate (,name ,@args :delete-if-exists-p ,delete-if-exists-p :type (or ,type (get-abox-type-for-tbox *cur-tbox*))) ,@body)) (defmacro in-abox (name &optional tbox &rest args &key type delete-if-exists-p &allow-other-keys) (if tbox `(with-tbox (,tbox) (in-substrate ,name ,@args :delete-if-exists-p ,delete-if-exists-p :type (or ,type (get-abox-type-for-tbox *cur-tbox*)))) `(in-substrate ,name ,@args :delete-if-exists-p ,delete-if-exists-p :type (or ,type (get-abox-type-for-tbox *cur-tbox*))))) ;;; ;;; die "*"-Varianten evaluieren das "name"-Argument! ;;; s. with-substrate* etc. in substrate7.lisp ;;; (defmacro with-abox* ((name &rest args &key type delete-if-exists-p &allow-other-keys) &rest body) `(with-substrate* (,name ,@args :delete-if-exists-p ,delete-if-exists-p :type (or ,type (get-abox-type-for-tbox *cur-tbox*))) ,@body)) (defmacro in-abox* (name &rest args &key type delete-if-exists-p &allow-other-keys) `(in-substrate* ,name ,@args :delete-if-exists-p ,delete-if-exists-p :type (or ,type (get-abox-type-for-tbox *cur-tbox*)))) ;;; ;;; ;;; (defmacro in-knowledge-base (tbox abox &rest args) `(progn (in-tbox ,tbox ,@args) (in-abox ,abox ,@args))) (defmacro with-knowledge-base ((tbox abox &rest args) &body body) `(with-tbox (,tbox ,@args) (with-abox (,abox ,@args) ,@body))) ;;; ;;; ;;; (defmacro in-knowledge-base* (tbox abox &rest args) `(progn (in-tbox* ,tbox ,@args) (in-abox* ,abox ,@args))) (defmacro with-knowledge-base* ((tbox abox &rest args) &body body) `(with-tbox* (,tbox ,@args) (with-abox* (,abox ,@args) ,@body))) ;;; ;;; ;;; (defmacro with-kb ((tbox abox &rest args) &body body) `(with-knowledge-base (,tbox ,abox ,@args) ,@body)) (defmacro with-kb* ((tbox abox &rest args) &body body) `(with-knowledge-base* (,tbox ,abox ,@args) ,@body)) (defmacro in-kb (tbox abox &rest args) `(in-knowledge-base ,tbox ,abox ,@args)) (defmacro in-kb* (tbox abox &rest args) `(in-knowledge-base* ,tbox ,abox ,@args)) ;;; ;;; ;;; (defmacro with-timing ((var) &body body) `(let ((*start-time* (get-internal-run-time))) (unwind-protect (progn ,@body) (incf ,var (- (get-internal-run-time) *start-time*)))))
6,374
Common Lisp
.lisp
180
26.438889
98
0.532184
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
e18d35f7c5aea1501f1a1c3076f10075c498e757ff1234ee485ad1a4301dc8be
12,569
[ -1 ]
12,570
file-interface.lisp
lambdamikel_DLMAPS/src/prover/file-interface.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) (defmethod save-tbox ((tbox tbox) filename) (with-open-file (stream filename :direction :output :if-exists :supersede) (format stream "(in-tbox ~A)" (name tbox)) (dolist (role (get-all-roles tbox)) (when (parse-name role) (if (feature-p role) (format stream "~%(define-primitive-attribute") (format stream "~%(define-primitive-role")) (format stream " ~A" (parse-name role) ) (when (superroles role) (format stream " :parents ~A" (mapcar #'parse-name (superroles role)))) (when (parse-name (get-inverse-role role)) (format stream " :inverse ~A" (parse-name (get-inverse-role role)))) (unless (is-top-concept-p (role-domain role)) (format stream " :domain ~A" (unparse (role-domain role)))) (unless (is-top-concept-p (role-range role)) (format stream " :range ~A" (unparse (role-range role)))) (if (transitive-p role) (format stream " :transitive T)") (format stream ")")))) (dolist (axiom (get-simple-axioms tbox)) (if (primitive-p axiom) (format stream "~%(define-primitive-concept ") (format stream "~%(define-concept ")) (format stream "~A ~A)" (unparse (left axiom)) (unparse (right axiom)))) (dolist (axiom (get-gcis tbox)) (unless (primitive-p axiom) (error "Found bad GCI ~A!" axiom)) (format stream "~%(implies ~A ~A)" (unparse (left axiom)) (unparse (right axiom))))))
1,756
Common Lisp
.lisp
40
33
76
0.546682
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
160afbe314e856590167a6cab28e6be51933b1395fe9816613f6dca92afa7fe1
12,570
[ -1 ]
12,571
abox-saturation.lisp
lambdamikel_DLMAPS/src/prover/abox-saturation.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defrule initial-abox-saturation (dl-with-combined-some-all-rule abox) ;;; das muss so gemacht werden! ;;; Denn sonst ist z.B. die ABOx ;;; ;;; ((instance a (or (all r c) (all r d))) ;;; (related a b r) ;;; (instance b (and (not c) (not d)))) ;;; ;;; consistent, wegen combined-some-all-rule-p- ;;; Kopplung (let ((start-time2 nil)) (labels ((do-it () (perform (deterministic-expansion :language-type dl) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (do-it))) (:negative (unless start-time2 (break "no start time2!")) (incf *time-spend-in-initial-abox-saturation* (- (get-internal-run-time) start-time2)) +insert-body-code+))))))) #| ;;; geht so nicht, weiteres Markierungsattribut erforderlich (every #'(lambda (node) (deactivate-all-nodes abox) (spreading-activation node) (if (zerop (1- (no-of-nodes abox))) (progn (loop-over-abox-nodes (node abox) (register-label-is-stable node)) +insert-body-code+) (let ((*combined-some-all-rule-p* nil)) (perform (abox-enumeration) (:body (do-it)) (:after-successful-clash-repair (do-it)))))) (compute-cluster abox)) |# (with-strategy (+abox-saturation-strategy+) (perform (abox-enumeration) (:body (setf start-time2 (get-internal-run-time)) (do-it)) (:after-successful-clash-repair (setf start-time2 (get-internal-run-time)) (do-it))))))) ;;; ;;; ;;; #| (defmethod compute-cluster ((abox abox)) ;;; fuer demnaechst (deactivate-all-nodes abox) (let ((cluster nil)) (loop-over-abox-nodes (node abox) (unless (active-p node) (push node cluster) (spreading-activation node))) cluster)) (defmethod deactivate-all-nodes ((abox abox)) (loop-over-abox-nodes (node abox) (when (active-p node) (deactivate node)))) (defmethod spreading-activation ((node abox-node)) (unless (active-p node) (activate node) (dolist (out (outgoing node)) (spreading-activation (to out))) (dolist (in (incoming node)) (spreading-activation (from in))))) |#
2,939
Common Lisp
.lisp
83
23.337349
70
0.503991
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
af296f9809efcb1c32eaebf872a78e97705f654964994b40b1a153d1d4e7d86b
12,571
[ -1 ]
12,572
alchi-prover.lisp
lambdamikel_DLMAPS/src/prover/alchi-prover.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (define-prover ((abox-sat alchi abox)) (:init (start-main)) (:main (perform (deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (some-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (success))))))))) (:success (completion-found)))
713
Common Lisp
.lisp
28
15.678571
60
0.464809
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
a6552ee63386be43add35e70819eab327761404cee334a68afd626a70f1df758
12,572
[ -1 ]
12,573
syntax9.lisp
lambdamikel_DLMAPS/src/prover/syntax9.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defmacro with-disabled-concept-store (&body body) `(let ((*use-store-p* nil) (*cross-referencing-p* nil) (*insert-into-store-p* nil) (*create-negated-concept-p* nil)) ,@body)) (defmacro with-enabled-concept-store (&body body) `(let ((*use-store-p* t) (*insert-into-store-p* t) (*create-negated-concept-p* t)) ,@body)) (defmacro with-lookup-in-concept-store-enabled (&body body) `(let ((*use-store-p* t) (*insert-into-store-p* nil) (*create-negated-concept-p* nil)) ,@body)) (defmacro with-protected-concept-store (&body body) `(let ((*dont-invalidate-store-p* t)) ,@body)) ;;; ;;; ;;; (defpersistentclass role (description) ;;; abstrakt ((inverse-role :initform nil :initarg :inverse-role) (symmetric-role :reader symmetric-role :initform nil :initarg :symmetric-role) (id :reader id) (parse-name :reader parse-name :initarg :parse-name :initform nil) (role-domain :accessor role-domain :initform nil :initarg :role-domain) (role-range :accessor role-range :initform nil :initarg :role-range) (superroles :reader superroles :initform nil :initarg :superroles) (subroles :reader subroles :initform nil :initarg :subroles) (all-superroles :reader all-superroles :initform nil :initarg :all-superroles) (all-subroles :reader all-subroles :initform nil :initarg :all-subroles) (textually-used-p :accessor textually-used-p :initform nil :initarg :textually-used-p) (rbox :reader rbox :initform nil :initarg :rbox) (concept-store :reader concept-store :initform nil :initarg :concept-store) (tbox :reader tbox :initform nil :initarg :tbox) ;;; es gibt komplexe Features! z.B. (and f g)! (feature-p :reader feature-p :initform nil :initarg :feature-p))) (defpersistentclass simple-role (role) ((inverse-p :reader inverse-p :initarg :inverse-p :initform nil) (transitive-p :reader transitive-p :initform nil :initarg :transitive-p))) ;;; ;;; ;;; (defpersistentclass and/or-role (role) ;;; abstrakt ((arguments :reader arguments :initarg :arguments))) (defpersistentclass and-role (and/or-role)) (defpersistentclass or-role (and/or-role)) ;;; ;;; ;;; (defmethod inverse-p ((role role)) ;;; weil (inv (and r s)) -> ;;; (and (inv r) (inv s)) ;;; gewandelt wird! nil) (defmethod transitive-p ((role role)) nil) ;;; ;;; ;;; (defun or-role-p (role) (typep role 'or-role)) (defun and-role-p (role) (typep role 'and-role)) (defun simple-role-p (role) (typep role 'simple-role)) ;;; ;;; ;;; (defmethod print-object ((role role) stream) (if (feature-p role) (format stream "#<FEATURE ~A ~A>" (type-of role) (textual-description role)) (format stream "#<~A ~A>" (type-of role) (textual-description role)))) (defmethod print-object ((role simple-role) stream) (if *print-pretty* (format stream "~A" (textual-description role)) (call-next-method))) (defmethod print-object ((role and-role) stream) (if *print-pretty* (format stream "(AND~{ ~A~})" (arguments role)) (call-next-method))) (defmethod print-object ((role or-role) stream) (if *print-pretty* (format stream "(OR~{ ~A~})" (arguments role)) (call-next-method))) ;;; ;;; ;;; (defmethod underspecified-p ((role role) &rest args) nil) (defmethod underspecified-p ((role or-role) &rest args) ;;; per Def. hat eine OR-ROLE mind. 2 Argumente! (or r) -> r durch Parser t) ;;; ;;; ;;; (defpersistentclass concept (description) ;;; Achtung - die von description geerbten Slots inconsistent, satsifiable, etc. ;;; werden hier als offensichtlich inconsistent, satisfiable etc. gedeutet! ((referenced-by :accessor referenced-by :initform nil :initarg :referenced-by) (referenced-by-ors :accessor referenced-by-ors :initform nil :initarg :referenced-by-ors) (referenced-by-ands :accessor referenced-by-ands :initform nil :initarg :referenced-by-ands) (or-ref-counter :reader or-ref-counter :initform 0) (and-ref-counter :reader and-ref-counter :initform 0) (boolean-concept-p :reader boolean-concept-p :initform nil) (all-atoms) (all-store-roles) (marked-p :accessor marked-p :initform nil) (id :reader id) (old-p :reader old-p :initarg :old-p) (negated-concept :reader negated-concept :initform nil :initarg :negated-concept) (told-subsumers :accessor told-subsumers :initform nil) (cached-models :reader cached-models :initform nil) (instance-retrieval-model :accessor instance-retrieval-model :initform nil) (language :initform nil :initarg :language) (constructors :accessor constructors :initform nil) (concept-store :reader concept-store :initform nil :initarg :concept-store) (tbox :reader tbox :initform nil :initarg :tbox))) ;;; ;;; ;;; (defmethod reset-sat-status :after ((concept concept)) (with-slots (cached-models instance-retrieval-model) concept (setf cached-models nil instance-retrieval-model nil) (dolist (ref (referenced-by concept)) (when (or (is-some-concept-p ref) (is-or-concept-p ref) (is-at-least-concept-p ref) (is-all-concept-p ref) (is-at-most-concept-p ref)) (reset-sat-status ref))))) ;;; ;;; ;;; (defmethod register-concept-model ((concept concept) model) (with-slots (cached-models) concept (push model cached-models) (register-concept-is-satisfiable concept))) ;;; ;;; ;;; (defun make-weak-hash-table (&rest args) (let ((table (apply #'make-hash-table args))) ;(hcl:set-hash-table-weak table :key) table)) (defpersistentclass concept-store () ((name :reader name :initarg :name) (prepared-p :reader prepared-p :initform nil) (tbox :reader tbox :initform nil :initarg :tbox) (language :initform nil :initarg :language) (role-hierarchies-p :accessor role-hierarchies-p :initform nil) (inverse-roles-p :accessor inverse-roles-p :initform nil) (transitive-roles-p :accessor transitive-roles-p :initform nil) (features-p :accessor features-p :initform nil) (complex-roles-p :accessor complex-roles-p :initform nil) (all-concepts :accessor all-concepts :initform nil) (all-store-roles :accessor all-store-roles :initform nil) (atoms :initform (make-weak-hash-table :size 1000 :rehash-size 1000 :test #'equal)) (all-atoms :accessor all-atoms :initform nil) (positive-atoms :accessor positive-atoms :initform nil) (negative-atoms :accessor negative-atoms :initform nil) (ands :initform (make-weak-hash-table :size 10000 :rehash-size 10000 :test #'equal)) (ors :initform (make-weak-hash-table :size 10000 :rehash-size 10000 :test #'equal)) (somes :initform (make-weak-hash-table :size 1000 :rehash-size 1000 :test #'equal)) (alls :initform (make-weak-hash-table :size 1000 :rehash-size 1000 :test #'equal)) (roles :initform (make-weak-hash-table :size 100 :rehash-size 100 :test #'equal)) (at-leasts :initform (make-weak-hash-table :size 1000 :rehash-size 1000 :test #'equal)) (at-mosts :initform (make-weak-hash-table :size 100 :rehash-size 100 :test #'equal)) (id-counter :initform 0 :accessor id-counter) (role-counter :initform 0 :accessor role-counter) (constructors :accessor constructors :initform nil))) (defun make-concept-store (&optional name tbox) (make-instance 'concept-store :tbox tbox :name (or name 'anonymous-store))) ;;; ;;; ;;; (defmethod reset-sat-status ((store concept-store)) (setf (slot-value store 'prepared-p) nil) store) ;;; ;;; ;;; (defmethod print-object ((store concept-store) stream) (format stream "#<Store ~A>" (name store))) (defmethod print-store-statistics ((store concept-store)) (with-slots (id-counter all-concepts atoms ands ors somes alls at-leasts at-mosts roles) store (format t "*** Statistics of concept store ~A:~% ID COUNTER : ~A ALL CONCEPTS : ~A ATOMIC CONCEPTS: ~A AND CONCEPTS: ~A OR CONCEPTS: ~A SOME CONCEPTS: ~A ALL CONCEPTS: ~A AT LEAST CONCEPTS: ~A AT MOST CONCEPTS: ~A ROLES : ~A~%~%" store id-counter (length all-concepts) (hash-table-count atoms) (hash-table-count ands) (hash-table-count ors) (hash-table-count somes) (hash-table-count alls) (hash-table-count at-leasts) (hash-table-count at-mosts) (hash-table-count roles)))) (defun statistics () (print-store-statistics *cur-store*)) ;;; ;;; ;;; (defmacro with-concept-store ((store) &body body) `(with-slots (atoms ands ors somes alls at-leasts at-mosts roles) ,store (let ((*cur-store* ,store) (*atoms-store* atoms) (*and-store* ands) (*or-store* ors) (*some-store* somes) (*all-store* alls) (*at-least-store* at-leasts) (*at-most-store* at-mosts) (*roles-store* roles)) ,@body))) (defmacro in-concept-store (store) `(with-slots (atoms ands ors somes alls at-leasts at-mosts roles) ,store (setf *cur-store* ,store) (setf *atoms-store* atoms *and-store* ands *or-store* ors *some-store* somes *all-store* alls *at-least-store* at-leasts *at-most-store* at-mosts *roles-store* roles) *cur-store*)) ;;; ;;; ;;; (defmethod clear-store ((store concept-store)) #+:clim (reset-kinds) ; f. Graph Visualizer (with-slots (id-counter atoms all-atoms positive-atoms negative-atoms ands ors somes alls at-leasts at-mosts roles all-concepts inverse-roles-p transitive-roles-p features-p role-hierarchies-p complex-roles-p language ) store (setf id-counter 0) (clrhash ands) (clrhash ors) (clrhash somes) (clrhash alls) (clrhash at-leasts) (clrhash at-mosts) (clrhash atoms) (clrhash roles) (setf positive-atoms nil negative-atoms nil all-atoms nil all-concepts nil language nil role-hierarchies-p nil complex-roles-p nil inverse-roles-p nil transitive-roles-p nil features-p nil)) store) ;;; ;;; ;;; (defun find-role (description) (when *use-store-p* (with-concept-store (*cur-store*) (gethash description *roles-store*)))) ;;; ;;; ;;; (defun parse-feature (description) (parse-role description :feature-p t)) (defun parse-role (description &key feature-p textually-used-p) (labels ((create-role (type description &rest args) (let ((role (apply #'make-instance type :textual-description description :old-p *old-concept-p* :rbox *cur-rbox* :constructor-sym 'reparse-role :create-inverse-role-p *create-inverse-role-p* :allow-other-keys t args))) role)) (make-role (description &optional top-level-p) (unless description (error "Bad NULL description given to parse-role!")) (let ((description (cond ((and *cur-rbox* (or (symbolp description) (and (consp description) (eq 'inv (first description)) ;;; weil role in NF -> (second description) ist symbol (symbolp (get-role *cur-rbox* description)) ;;; symbolp, iff inverse rolle in role box verzeichnet ))) (get-role *cur-rbox* description)) (t description)))) (or (find-role description) (let ((role (if (symbolp description) (create-role 'simple-role description :feature-p (and top-level-p feature-p)) (ecase (first description) (inv (create-role 'simple-role description :feature-p (and top-level-p feature-p) :inverse-p t)) (or ;; was spricht dagegen?? ;; (when feature-p ;; (error "*** BAD FEATURE SYNTAX: ~A" description)) (create-role 'or-role description :feature-p (and top-level-p feature-p) :arguments (mapcar #'make-role (rest description)))) (and ;; was spricht dagegen?? ;; (when feature-p ;; (error "*** BAD FEATURE SYNTAX: ~A" description)) (create-role 'and-role description :feature-p (and top-level-p feature-p) :arguments (mapcar #'make-role (rest description)))))))) role)))) (make-role-nf (description &optional inv-p) ;; (princ description) (terpri) (if (symbolp description) (cond (*cur-rbox* (if inv-p (get-role *cur-rbox* `(inv ,description)) (get-role *cur-rbox* description))) (t (if inv-p `(inv ,description) description))) (ecase (first description) (inv (make-role-nf (second description) (if inv-p nil t))) (or (let* ((args (remove-duplicates (mapcar #'(lambda (x) (make-role-nf x inv-p)) (rest description)) :test #'equal)) (or-args (apply #'append (mapcar #'rest (remove-if-not #'(lambda (x) (and (consp x) (eq (first x) 'or))) args)))) (atomic-args (append (sort (remove-if-not #'symbolp args) #'string-lessp :key #'symbol-name) (sort (remove-if-not #'(lambda (x) (and (consp x) (eq (first x) 'inv))) args) #'string-lessp :key #'(lambda (x) (symbol-name (second x)))))) (and-args (remove-if-not #'(lambda (x) (and (consp x) (eq (first x) 'and))) args)) (all-args (append atomic-args or-args and-args))) (if (cdr all-args) (remove nil `(or ,@atomic-args ,@or-args ,@and-args)) (first all-args)))) (and (let* ((args (remove-duplicates (mapcar #'(lambda (x) (make-role-nf x inv-p)) (rest description)) :test #'equal)) (and-args (apply #'append (mapcar #'rest (remove-if-not #'(lambda (x) (and (consp x) (eq (first x) 'and))) args)))) (or-args (mapcar #'rest (remove-if-not #'(lambda (x) (and (consp x) (eq (first x) 'or))) args))) (atomic-args (append (sort (remove-if-not #'symbolp args) #'string-lessp :key #'symbol-name) (sort (remove-if-not #'(lambda (x) (and (consp x) (eq (first x) 'inv))) args) #'string-lessp :key #'(lambda (x) (symbol-name (second x)))))) (prod (newprod (append or-args (mapcar #'list atomic-args) (mapcar #'list and-args))))) (if (not (cdr prod)) (if (cdr (first prod)) `(and ,@(first prod)) (first (first prod))) (if prod `(or ,@(mapcar #'(lambda (prod) `(and ,@prod)) prod)) `(and ,@atomic-args ,@and-args))))))))) (let* ((role (if (is-role-p description) description (make-role (make-role-nf description) t)))) (setf (textually-used-p role) (or (textually-used-p role) textually-used-p)) ;; einige Inverse werden nur "auf Vorrat" produziert, ;; kommen aber nicht literal in der KB vor -> ;; Problem fuer "get-language" (if *create-inverse-role-p* (values role (get-inverse-role role)) role)))) ;;; ;;; ;;; (defmethod initialize-instance :after ((role role) &rest initargs &key dont-initialize-p) (unless dont-initialize-p (with-concept-store (*cur-store*) (push role (all-store-roles *cur-store*)) (setf (slot-value role 'id) (incf (role-counter *cur-store*))) (register-name-for-role role (textual-description role)) (setf (slot-value role 'tbox) (tbox *cur-store*)) (setf (slot-value role 'concept-store) *cur-store*)))) (defmethod register-name-for-role ((role role) name) (setf (gethash name *roles-store*) role)) ;;; ;;; ;;; (defmethod prepare ((store concept-store) (dl dl)) (with-slots (prepared-p all-concepts) store (unless prepared-p (dolist (concept all-concepts) (reset-sat-status concept)) (compute-language store)) store)) (defmethod compute-language ((store concept-store)) (with-slots (language prepared-p all-store-roles role-hierarchies-p inverse-roles-p complex-roles-p transitive-roles-p features-p all-concepts constructors) store (setf constructors nil role-hierarchies-p nil inverse-roles-p nil complex-roles-p nil transitive-roles-p nil features-p nil) (dolist (c all-concepts) (dolist (c (constructors c)) (pushnew c (constructors *cur-store*)))) (dolist (role all-store-roles) (let ((inv-role (get-inverse-role role))) (when (textually-used-p role) (when (is-and/or-role-p role) (setf complex-roles-p t)) (when (superroles role) (setf role-hierarchies-p t)) (when (textually-used-p inv-role) (setf inverse-roles-p t)) (when (transitive-p role) (setf transitive-roles-p t)) (when (feature-p role) (setf features-p t))))) (setf prepared-p t) (with-concept-store (store) (let* ((constructors (constructors store)) (inverse-roles-p (inverse-roles-p store)) (transitive-roles-p (transitive-roles-p store)) (features-p (features-p store)) (complex-roles-p (complex-roles-p store)) (role-hierarchies-p (role-hierarchies-p store)) (i inverse-roles-p) (f features-p) (n (or (member 'unqualified-at-least constructors) (member 'unqualified-at-most constructors))) (q (or (member 'qualified-at-least constructors) (member 'qualified-at-most constructors))) (r transitive-roles-p)) (declare (ignorable role-hierarchies-p)) (setf language (if (or complex-roles-p q) (to-be-implemented 'dl) (if i (if r (if f (if n +alchifn-rplus+ +alchif-rplus+) (if n +alchifn-rplus+ +alchi-rplus+)) (if f (if n +alchifn-rplus+ +alchif-rplus+) (if n +alchifn-rplus+ +alchi+))) (if r (if f (if n +alchfn-rplus+ +alchf-rplus+) (if n +alchfn-rplus+ +alchf-rplus+)) (if f (if n +alchfn-rplus+ +alchf+) (if n +alchn+ +alch+)))))))) store)) ;;; ;;; ;;; (defmethod register-inverses ((role role) (inv-role role)) (setf (slot-value role 'inverse-role) inv-role (slot-value inv-role 'inverse-role) role)) (defmethod get-inverse-role ((role role)) (or (slot-value role 'inverse-role) (when *create-inverse-role-p* (let* ((*create-inverse-role-p* nil) (inv-role (parse-role (list 'inv (textual-description role))))) (register-inverses role inv-role) inv-role)))) ;;; ;;; ;;; (defmethod implies-p ((i role) (j role) &rest args) ;;; fängt alle nicht spezifizierten Fälle ab nil) ;;; ;;; ;;; (defmethod implies-p ((i simple-role) (j simple-role) &rest args) (or (eq i j) #| (equal (textual-description i) (textual-description j)) (some #'(lambda (j) (implies-p i j)) (subroles j)) |# (member j (all-superroles i)))) (defmethod implies-p ((i simple-role) (j or-role) &rest args) (some #'(lambda (j) (implies-p i j)) (arguments j))) (defmethod implies-p ((i simple-role) (j and-role) &rest args) (every #'(lambda (j) (implies-p i j)) (arguments j))) ;;; ;;; ;;; (defmethod implies-p ((i or-role) (j or-role) &rest args) (every #'(lambda (i) (implies-p i j)) (arguments i))) (defmethod implies-p ((i or-role) (j and-role) &rest args) (every #'(lambda (j) (implies-p i j)) (arguments j))) ;;; ;;; ;;; (defmethod implies-p ((i and-role) (j simple-role) &rest args) (some #'(lambda (i) (implies-p i j)) (arguments i))) (defmethod implies-p ((i and-role) (j and-role) &rest args) (every #'(lambda (j) (implies-p i j)) (arguments j))) (defmethod implies-p ((i and-role) (j or-role) &rest args) (some #'(lambda (j) (implies-p i j)) (arguments j))) ;;; ;;; ;;; (defpersistentclass atomic-concept (concept) ((name :reader name :initarg :name) (boolean-concept-p :initform t) (primitive-p :accessor primitive-p :initform nil) (cyclic-p :accessor cyclic-p :initform nil) ; f. blocking (ts-cyclic-p :accessor ts-cyclic-p :initform nil) ; f. Told Subsumer Bestimmung! (negated-p :accessor negated-p :initform nil :initarg :negated-p) (references-atoms :accessor references-atoms :initform nil :initarg :references-atoms) (constructors :initform '(atoms)))) (defpersistentclass top-concept (atomic-concept) ((boolean-concept-p :initform t) ;; denn TOP => ... -Axiome sind immer GCIs! (inconsistent :initform nil) (satisfiable :initform t) (tautological :initform t) (negated-p :initform nil) (name :initform 'top) (constructors :initform '(top)))) (defpersistentclass bottom-concept (atomic-concept) ((boolean-concept-p :initform t) (inconsistent :initform t) (satisfiable :initform nil) (tautological :initform nil) (negated-p :initform nil) (name :initform 'bottom) (constructors :initform '(bottom)))) ;;; ;;; ;;; (defpersistentclass and/or-concept (concept) ((arguments :reader arguments :initarg :arguments) (arg-counter :reader arg-counter) (atomic-arguments :reader atomic-arguments))) ;;; ;;; ;;; (defun no-of-atoms () (hash-table-count *atoms-store*)) (defun no-of-ands () (hash-table-count *and-store*)) (defun no-of-ors () (hash-table-count *or-store*)) (defun no-of-somes () (hash-table-count *some-store*)) (defun no-of-alls () (hash-table-count *all-store*)) (defun no-of-at-leasts () (hash-table-count *at-least-store*)) (defun no-of-at-mosts () (hash-table-count *at-most-store*)) (defun no-of-concepts () (+ (no-of-atoms) (no-of-ands) (no-of-ors) (no-of-somes) (no-of-alls) (no-of-at-leasts) (no-of-at-mosts))) ;;; ;;; ;;; (defpersistentclass and-concept (and/or-concept) ((modal-successor-sets :reader modal-successor-sets :initform nil) (constructors :initform '(and)))) (defpersistentclass or-concept (and/or-concept) ((constructors :initform '(or)))) (defpersistentclass some/all-concept (concept) ((role :reader role :initarg :role) (qualification :reader qualification :initarg :qualification) (boolean-concept-p :initform nil))) (defpersistentclass some-concept (some/all-concept)) (defpersistentclass attribute-exists-concept (some-concept)) #| (defpersistentclass concrete-attribute-exists-concept (concept)) |# (defpersistentclass at-least/most-concept (some/all-concept) ((n :reader n :initarg :n))) (defpersistentclass at-least-concept (at-least/most-concept)) (defpersistentclass at-most-concept (at-least/most-concept)) (defpersistentclass all-concept (some/all-concept)) ;;; ;;; (defmethod reset-sat-status :after ((concept and-concept)) (with-slots (arguments) concept (dolist (arg arguments) (reset-sat-status arg)))) ;;; ;;; ;;; (defmethod initialize-instance :after ((concept concept) &rest initargs &key dont-initialize-p) (unless dont-initialize-p (setf (slot-value concept 'id) (incf (id-counter *cur-store*))) (setf (slot-value concept 'tbox) (tbox *cur-store*)) (setf (slot-value concept 'concept-store) *cur-store*) (when *insert-into-store-p* (insert-into-store concept)))) (defmethod initialize-instance :after ((concept and/or-concept) &rest initargs &key dont-initialize-p) (unless dont-initialize-p (setf (slot-value concept 'atomic-arguments) (remove-if-not #'is-atomic-concept-p (arguments concept)) (slot-value concept 'boolean-concept-p) (every #'boolean-concept-p (arguments concept)) (constructors concept) (delete-duplicates (reduce #'append (mapcar #'constructors (arguments concept)))) (slot-value concept 'arg-counter) (length (arguments concept))))) (defmethod initialize-instance :after ((concept and-concept) &rest initargs &key dont-initialize-p) (unless dont-initialize-p (when *syntactic-consistency-checking-p* (when *syntactic-consistency-checking-of-some/all-conjuncts-p* (setf (slot-value concept 'modal-successor-sets) (let* ((args (arguments concept)) (alls (remove-if-not #'is-all-concept-p args)) (somes (remove-if-not #'is-some-concept-p args)) (res nil)) (dolist (some somes) (let* ((role (role some)) (alls (loop as all in alls when (eq (role all) role) collect all)) (concept (make-and-concept (list (qualification some) (mapcar #'qualification alls))))) (push (list role alls somes concept) res))) res))) (check-if-obviously-inconsistent-p concept)))) (defmethod initialize-instance :after ((concept or-concept) &rest initargs &key dont-initialize-p) (unless dont-initialize-p (when *syntactic-consistency-checking-p* (check-if-obviously-inconsistent-p concept)))) (defmethod initialize-instance :after ((concept some-concept) &rest initargs &key dont-initialize-p) (unless dont-initialize-p (when *syntactic-consistency-checking-p* (check-if-obviously-inconsistent-p concept)) (setf (constructors concept) (remove-duplicates (cons (if (is-top-concept-p (qualification concept)) 'unqualified-some 'qualified-some) (constructors (qualification concept))))))) (defmethod initialize-instance :after ((concept all-concept) &rest initargs &key dont-initialize-p) (unless dont-initialize-p (when *syntactic-consistency-checking-p* (check-if-obviously-inconsistent-p concept)) (setf (constructors concept) (remove-duplicates (cons 'all (constructors (qualification concept))))))) (defmethod initialize-instance :after ((concept at-least-concept) &rest initargs &key dont-initialize-p) (unless dont-initialize-p (when *syntactic-consistency-checking-p* (check-if-obviously-inconsistent-p concept)) (setf (constructors concept) (remove-duplicates (cons (if (is-top-concept-p (qualification concept)) 'unqualified-at-least 'at-least) (constructors (qualification concept))))))) (defmethod initialize-instance :after ((concept at-most-concept) &rest initargs &key dont-initialize-p) (unless dont-initialize-p (when *syntactic-consistency-checking-p* (check-if-obviously-inconsistent-p concept)) (setf (constructors concept) (remove-duplicates (cons (if (is-top-concept-p (qualification concept)) 'unqualified-at-most 'at-most) (constructors (qualification concept))))))) ;;; ;;; ;;; (defun order (args) (sort args #'< :key #'id)) (defmethod insert-into-store ((concept concept)) t) (defmethod insert-into-store :after ((concept concept)) (unless *dont-invalidate-store-p* ;;; wird nur invalidiert, wenn ;;; der Prover nicht laeuft, sonst ewiges ;;; reprepare, es werden ja temporaere Konzepte ;;; angelegt beim Beweisen! aber die Sprache ;;; aendert sich dann nciht mehr! (reset-sat-status *cur-store*)) (push concept (all-concepts *cur-store*))) (defmethod insert-into-store ((concept atomic-concept)) (setf (gethash (original-description concept) *atoms-store*) concept) (push concept (all-atoms (concept-store concept))) (if (negated-p concept) (push concept (negative-atoms (concept-store concept))) (push concept (positive-atoms (concept-store concept))))) (defmethod insert-into-store ((concept and-concept)) (let ((args (arguments concept))) (setf (gethash (arguments concept) *and-store*) concept) (when *cross-referencing-p* (mapc #'(lambda (arg) (pushnew concept (referenced-by arg)) (unless (member concept (referenced-by-ands arg)) (incf (slot-value arg 'and-ref-counter)) (push concept (referenced-by-ands arg)))) args)))) (defmethod insert-into-store ((concept or-concept)) (let ((args (arguments concept))) (setf (gethash (arguments concept) *or-store*) concept) (when *cross-referencing-p* (mapc #'(lambda (arg) (pushnew concept (referenced-by arg)) (unless (member concept (referenced-by-ors arg)) (incf (slot-value arg 'or-ref-counter)) (push concept (referenced-by-ors arg)))) args)))) (defmethod insert-into-store ((concept some-concept)) (let ((qual (qualification concept))) (when *cross-referencing-p* (push concept (referenced-by qual))) (setf (gethash (list (role concept) qual) *some-store*) concept))) (defmethod insert-into-store ((concept all-concept)) (let ((qual (qualification concept))) (when *cross-referencing-p* (push concept (referenced-by qual))) (setf (gethash (list (role concept) qual) *all-store*) concept))) (defmethod insert-into-store ((concept at-least-concept)) (let ((qual (qualification concept)) (n (n concept))) (when *cross-referencing-p* (push concept (referenced-by qual))) (setf (gethash (list n (role concept) qual) *at-least-store*) concept))) (defmethod insert-into-store ((concept at-most-concept)) (let ((qual (qualification concept)) (n (n concept))) (when *cross-referencing-p* (push concept (referenced-by qual))) (setf (gethash (list n (role concept) qual) *at-most-store*) concept))) ;;; ;;; ;;; (defmethod print-object ((concept atomic-concept) stream) (if *print-pretty* (if (negated-p concept) (format stream "(NOT ~A)" (name concept)) (format stream "~A" (name concept))) (if (negated-p concept) (format stream "#<(NOT ~A|~A)>" (name concept) (id concept)) (format stream "#<~A|~A>" (name concept) (id concept))))) (defmethod print-object ((concept top-concept) stream) (if *print-pretty* (format stream "TOP") (format stream "#<TOP>"))) (defmethod print-object ((concept bottom-concept) stream) (if *print-pretty* (format stream "BOTTOM") (format stream "#<BOTTOM>"))) (defmethod print-object ((concept and-concept) stream) (if *print-pretty* (format stream "(AND~{ ~A~})" (arguments concept)) (format stream "#<(AND~{ ~A~}|~A)>" (arguments concept) (id concept)))) (defmethod print-object ((concept or-concept) stream) (if *print-pretty* (format stream "(OR~{ ~A~})" (arguments concept)) (format stream "#<(OR~{ ~A~}|~A)>" (arguments concept) (id concept)))) (defmethod print-object ((concept some-concept) stream) (if *print-pretty* (format stream "(SOME ~A ~A)" (role concept) (qualification concept)) (format stream "#<(SOME ~A ~A)|~A>" (role concept) (qualification concept) (id concept)))) (defmethod print-object ((concept all-concept) stream) (if *print-pretty* (format stream "(ALL ~A ~A)" (role concept) (qualification concept)) (format stream "#<(ALL ~A ~A)|~A>" (role concept) (qualification concept) (id concept)))) (defmethod print-object ((concept at-least-concept) stream) (if *print-pretty* (format stream "(AT-LEAST ~A ~A ~A)" (n concept) (role concept) (qualification concept)) (format stream "#<(AT-LEAST ~A ~A ~A)|~A>" (n concept) (role concept) (qualification concept) (id concept)))) (defmethod print-object ((concept at-most-concept) stream) (if *print-pretty* (format stream "(AT-MOST ~A ~A ~A)" (n concept) (role concept) (qualification concept)) (format stream "#<(AT-MOST ~A ~A ~A)|~A>" (n concept) (role concept) (qualification concept) (id concept)))) ;;; ;;; ;;; (defmethod unparse ((item null)) nil) (defmethod unparse ((item cons)) (cons (unparse (car item)) (unparse (cdr item)))) (defmethod unparse ((role role)) (let ((*print-pretty* t) (*package* (find-package :prover))) (if (not (inverse-p role)) (read-from-string (format nil "|~A|" (print-object role nil))) `(inv ,(unparse (slot-value role 'inverse-role)))))) (defmethod unparse ((concept concept)) (let ((*print-pretty* t) (*package* (find-package :prover))) (read-from-string (format nil "|~A|" (print-object concept nil))))) ;;; ;;; ;;; (defmethod get-negated-description ((concept concept)) (get-negated-concept concept)) ;;; ;;; ;;; (defmethod get-negated-concept :around ((concept concept)) (with-concept-store ((concept-store concept)) (let ((*create-negated-concept-p* nil)) (call-next-method)))) (defmethod get-negated-concept ((concept bottom-concept)) (or (negated-concept concept) (register-duals (make-top-concept) concept))) (defmethod get-negated-concept ((concept top-concept)) (or (negated-concept concept) (register-duals (make-bottom-concept) concept))) (defmethod get-negated-concept ((concept atomic-concept)) (or (negated-concept concept) (register-duals (make-atomic-concept (if (negated-p concept) (name concept) `(not ,(name concept)))) concept))) (defmethod get-negated-concept ((concept and-concept)) (or (negated-concept concept) (register-duals (make-or-concept (mapcar #'get-negated-concept (arguments concept))) concept))) (defmethod get-negated-concept ((concept or-concept)) (or (negated-concept concept) (register-duals (make-and-concept (mapcar #'get-negated-concept (arguments concept))) concept))) (defmethod get-negated-concept ((concept some-concept)) (or (negated-concept concept) (register-duals (make-all-concept (role concept) (get-negated-concept (qualification concept))) concept))) (defmethod get-negated-concept ((concept all-concept)) (or (negated-concept concept) (register-duals (make-some-concept (role concept) (get-negated-concept (qualification concept))) concept))) (defmethod get-negated-concept ((concept at-least-concept)) (or (negated-concept concept) (register-duals (make-at-most-concept (1- (n concept)) (role concept) (qualification concept)) concept))) (defmethod get-negated-concept ((concept at-most-concept)) (or (negated-concept concept) (register-duals (make-at-least-concept (1+ (n concept)) (role concept) (qualification concept)) concept))) ;;; ;;; ;;; (defun register-duals (cona conb) (setf (slot-value cona 'negated-concept) conb (slot-value conb 'negated-concept) cona) cona) ;;; ;;; ;;; (defun find-atomic-concept (expr) (when *use-store-p* (gethash expr *atoms-store*))) (defun find-and-concept (args) (when *use-store-p* (gethash args *and-store*))) (defun find-or-concept (args) (when *use-store-p* (gethash args *or-store*))) (defun find-some-concept (role qual) (when *use-store-p* (gethash (list role qual) *some-store*))) (defun find-all-concept (role qual) (when *use-store-p* (gethash (list role qual) *all-store*))) (defun find-at-least-concept (n role qual) (when *use-store-p* (gethash (list n role qual) *at-least-store*))) (defun find-at-most-concept (n role qual) (when *use-store-p* (gethash (list n role qual) *at-most-store*))) ;;; ;;; ;;; (defun make-top-concept () (with-concept-store (*cur-store*) (let ((concept (or (find-atomic-concept 'top) (make-instance 'top-concept :original-description 'top :old-p *old-concept-p*)))) (if *create-negated-concept-p* (values concept (get-negated-concept concept)) concept)))) (defun make-bottom-concept () (with-concept-store (*cur-store*) (let ((concept (or (find-atomic-concept 'bottom) (make-instance 'bottom-concept :original-description 'bottom :old-p *old-concept-p*)))) (if *create-negated-concept-p* (values concept (get-negated-concept concept)) concept)))) ;;; ;;; ;;; (defun make-not-concept (arg) (unless (get-negated-concept arg) (error "Can't get negated concept of ~A!" arg)) (values (negated-concept arg) arg)) (defun make-atomic-concept (expr) (with-concept-store (*cur-store*) (if (atomic-concept*-p expr) (let ((concept (or (find-atomic-concept expr) (make-instance 'atomic-concept :original-description expr :name (if (symbolp expr) expr (second expr)) :old-p *old-concept-p* :negated-p (if (symbolp expr) nil (and (consp expr) (not (cddr expr)) (eq (first expr) 'not))))))) (if *create-negated-concept-p* (values concept (get-negated-concept concept)) concept)) (error "Bad concept: ~A!" expr)))) (defun make-and-concept (args) (with-concept-store (*cur-store*) (if (every #'is-concept-p args) (let ((fargs nil)) (dolist (arg args) (unless (is-top-concept-p arg) (if (is-and-concept-p arg) (dolist (arg (arguments arg)) (unless (is-top-concept-p arg) (push arg fargs))) (push arg fargs)))) (let ((args (order (remove-duplicates fargs)))) (if (not args) (make-top-concept) (if (cdr args) (let ((concept (or (find-and-concept args) (make-instance 'and-concept :original-description `(and ,@args) :old-p *old-concept-p* :arguments args)))) (if *create-negated-concept-p* (values concept (get-negated-concept concept)) concept)) (if *create-negated-concept-p* (values (first args) (get-negated-concept (first args))) (first args)))))) (error "Bad concept: (AND ~A)!" args)))) (defun make-or-concept (args) (with-concept-store (*cur-store*) (if (every #'is-concept-p args) (let ((fargs nil)) (dolist (arg args) (unless (is-bottom-concept-p arg) (if (is-or-concept-p arg) (dolist (arg (arguments arg)) (unless (is-bottom-concept-p arg) (push arg fargs))) (push arg fargs)))) (let ((args (order (remove-duplicates fargs)))) (if (not args) (make-bottom-concept) (if (cdr args) (let ((concept (or (find-or-concept args) (make-instance 'or-concept :original-description `(or ,@args) :old-p *old-concept-p* :arguments args)))) (if *create-negated-concept-p* (values concept (get-negated-concept concept)) concept)) (if *create-negated-concept-p* (values (first args) (get-negated-concept (first args))) (first args)))))) (error "Bad concept: (OR ~A)!" args)))) (defun make-some-concept (role qualification) (with-concept-store (*cur-store*) (if (and (typep role 'role) (typep qualification 'concept)) (let ((concept (or (find-some-concept role qualification) (make-instance (if (feature-p role) 'attribute-exists-concept 'some-concept) :original-description `(some ,role ,qualification) :role role :old-p *old-concept-p* :qualification qualification)))) (if *create-negated-concept-p* (values concept (get-negated-concept concept)) concept)) (error "Bad concept: (SOME ~A ~A)!" role qualification)))) (defun make-all-concept (role qualification) (with-concept-store (*cur-store*) (if (and (typep role 'role) (typep qualification 'concept)) (let ((concept (or (find-all-concept role qualification) (make-instance 'all-concept :original-description `(all ,role ,qualification) :role role :old-p *old-concept-p* :qualification qualification)))) (if *create-negated-concept-p* (values concept (get-negated-concept concept)) concept)) (error "Bad concept: (ALL ~A ~A)!" role qualification)))) (defun make-at-least-concept (n role qualification) (with-concept-store (*cur-store*) (if (and (typep role 'role) (integerp n) (not (minusp n)) (typep qualification 'concept)) (cond ((zerop n) (make-top-concept)) ((zerop (1- n)) (make-some-concept role qualification)) (t (let ((concept (or (find-at-least-concept n role qualification) (make-instance 'at-least-concept :old-p *old-concept-p* :original-description `(at-least ,n ,role ,qualification) :role role :n n :qualification qualification)))) (if *create-negated-concept-p* (values concept (get-negated-concept concept)) concept)))) (error "Bad concept: (AT-LEAST ~A ~A ~A)!" n role qualification)))) (defun make-at-most-concept (n role qualification) (with-concept-store (*cur-store*) (if (and (typep role 'role) (integerp n) (not (minusp n)) (typep qualification 'concept)) (cond ((zerop n) (make-all-concept role (get-negated-concept qualification))) (t (let ((concept (or (find-at-most-concept n role qualification) (make-instance 'at-most-concept :old-p *old-concept-p* :original-description `(at-most ,n ,role ,qualification) :role role :n n :qualification qualification)))) (if *create-negated-concept-p* (values concept (get-negated-concept concept)) concept)))) (error "Bad concept: (AT-MOST ~A ~A ~A)!" n role qualification)))) ;;; ;;; ;;; (defun atomic-concept*-p (term) (or (symbolp term) (and (consp term) (eq (first term) 'not) (symbolp (second term))))) (defun top-concept*-p (concept) (or (eq concept 'top) (eq concept '*top*) (eq concept '+top+) (eq concept t))) (defun bottom-concept*-p (concept) (or (eq concept 'bottom) (eq concept 'bot) (eq concept '*bot*) (eq concept '+bot+) (eq concept '*bottom*) (eq concept nil))) (defun all-concept*-p (concept) (and (consp concept) (eq (first concept) 'all) (cddr concept) (not (cdddr concept)))) (defun at-least-concept*-p (concept) (and (consp concept) (eq (first concept) 'at-least) ;; (cdddr concept) (not (cddddr concept)))) (defun at-most-concept*-p (concept) (and (consp concept) (eq (first concept) 'at-most) ;; (cdddr concept) (not (cddddr concept)))) (defun exactly-concept*-p (concept) (and (consp concept) (eq (first concept) 'exactly) ;; (cdddr concept) (not (cddddr concept)))) (defun or-concept*-p (concept) (and (consp concept) (eq (first concept) 'or))) (defun and-concept*-p (concept) (and (consp concept) (eq (first concept) 'and))) (defun implies-concept*-p (concept) (and (consp concept) (eq (first concept) '=>) (cddr concept) (not (cdddr concept)))) (defun implied-by-concept*-p (concept) (and (consp concept) (eq (first concept) '<=) (cddr concept) (not (cdddr concept)))) (defun equivalent-concept*-p (concept) (and (consp concept) (eq (first concept) '<=>) (cddr concept) (not (cdddr concept)))) (defun some-concept*-p (concept) (and (consp concept) (eq (first concept) 'some) (cddr concept) (not (cdddr concept)))) (defun cd-concept*-p (concept) (and (consp concept) (let ((op (first concept))) (member op '(a an no string= string<> min max < > <= >= =))))) ;;; ;;; ;;; (defun flatten (concept) (if (consp concept) (let ((op (first concept))) (case op ((and or => <= <=>) (if (and (consp concept) (null (cddr concept))) (flatten (second concept)) `(,op ,@(remove-duplicates (mapcan #'(lambda (x) (let ((res (flatten x))) (if (and (consp res) (eq (first res) op)) (rest res) (list res)))) (rest concept)))))) ((some all) `(,op ,(second concept) ,(flatten (third concept)))) ((at-least at-most exactly) `(,op ,(second concept) ,(third concept) ,(flatten (fourth concept)))) (not `(,op ,(flatten (second concept)))))) concept)) (defun parse-concept (concept) (labels ((do-it (concept) (cond ((top-concept*-p concept) (make-top-concept)) ((bottom-concept*-p concept) (make-bottom-concept)) ((and (consp concept) ;;; wichtig! reihenfolge! (eq (first concept) 'not)) (make-not-concept (do-it (second concept)))) ((atomic-concept*-p concept) (make-atomic-concept concept)) ((and-concept*-p concept) (make-and-concept (mapcar #'do-it (rest concept)))) ((or-concept*-p concept) (make-or-concept (mapcar #'do-it (rest concept)))) ((some-concept*-p concept) (make-some-concept (parse-role (second concept) :textually-used-p t) (do-it (third concept)))) ((all-concept*-p concept) (make-all-concept (parse-role (second concept) :textually-used-p t) (do-it (third concept)))) ((at-least-concept*-p concept) (make-at-least-concept (second concept) (parse-role (third concept) :textually-used-p t) (if (fourth concept) (do-it (fourth concept)) (make-top-concept)))) ((at-most-concept*-p concept) (make-at-most-concept (second concept) (parse-role (third concept) :textually-used-p t) (if (fourth concept) (do-it (fourth concept)) (make-top-concept)))) ((exactly-concept*-p concept) (do-it `(and (at-least ,@(rest concept)) (at-most ,@(rest concept))))) ;;; =>, <=, <=> ((implies-concept*-p concept) (make-or-concept (list (make-not-concept (do-it (second concept))) (do-it (third concept))))) ((implied-by-concept*-p concept) (make-or-concept (list (make-not-concept (do-it (third concept))) (do-it (second concept))))) ((equivalent-concept*-p concept) (make-and-concept (list (make-or-concept (list (make-not-concept (do-it (second concept))) (do-it (third concept)))) (make-or-concept (list (make-not-concept (do-it (third concept))) (do-it (second concept))))))) ;;; RacerPro Dummies ((cd-concept*-p concept) (make-top-concept)) ;;; ;;; ;; (t (error "Unable to parse ~A!" concept))))) (if (is-concept-p concept) concept (let ((concept (do-it concept))) (if *syntactic-consistency-checking-p* (cond ((check-if-obviously-inconsistent-p concept) (make-bottom-concept)) ((check-if-obviously-tautological-p concept) (make-top-concept)) (t concept)) concept))))) ;;; ;;; ;;; (defmethod check-if-obviously-inconsistent-p :around ((concept concept)) (when *syntactic-consistency-checking-p* (when (eq (slot-value concept 'inconsistent) :not-tested) (let ((res (call-next-method))) (when res ;; Achtung - der Algorithmus ist unvollstaendig! (setf (slot-value concept 'inconsistent) t) (setf (slot-value concept 'satisfiable) nil) (setf (slot-value concept 'tautological) nil))))) (eq (slot-value concept 'inconsistent) t)) (defmethod check-if-obviously-inconsistent-p ((concept bottom-concept)) t) (defmethod check-if-obviously-inconsistent-p ((concept top-concept)) nil) (defmethod check-if-obviously-inconsistent-p ((concept atomic-concept)) nil) (defmethod check-if-obviously-inconsistent-p ((concept and-concept)) (or (some #'check-if-obviously-inconsistent-p (arguments concept)) (some #'(lambda (atom) (member (get-negated-concept atom) (atomic-arguments concept))) (atomic-arguments concept)) (some #'(lambda (modal-set) (check-if-obviously-inconsistent-p (fourth modal-set))) (modal-successor-sets concept)))) (defmethod check-if-obviously-inconsistent-p ((concept or-concept)) (every #'check-if-obviously-inconsistent-p (arguments concept))) (defmethod check-if-obviously-inconsistent-p ((concept some-concept)) (check-if-obviously-inconsistent-p (qualification concept))) (defmethod check-if-obviously-inconsistent-p ((concept all-concept)) nil) (defmethod check-if-obviously-inconsistent-p ((concept at-least-concept)) (check-if-obviously-inconsistent-p (qualification concept))) (defmethod check-if-obviously-inconsistent-p ((concept at-most-concept)) nil) ;;; ;;; ;;; (defmethod check-if-obviously-tautological-p :around ((concept concept)) (when *syntactic-consistency-checking-p* (when (eq (slot-value concept 'tautological) :not-tested) (let ((res (call-next-method))) (when res (setf (slot-value concept 'tautological) t) (setf (slot-value concept 'satisfiable) t) (setf (slot-value concept 'inconsistent) nil))))) (eq (slot-value concept 'tautological) t)) (defmethod check-if-obviously-tautological-p ((concept concept)) (check-if-obviously-inconsistent-p (get-negated-concept concept))) ;;; ;;; ;;; (defmethod already-known-to-be-inconsistent-p ((concept concept)) (eq (slot-value concept 'inconsistent) t)) (defmethod already-known-to-be-tautological-p ((concept concept)) (eq (slot-value concept 'tautological) t)) (defmethod already-known-to-be-satisfiable-p ((concept concept)) (eq (slot-value concept 'satisfiable) t)) ;;; ;;; ;;; (defmethod register-concept-is-satisfiable ((concept concept)) (unless (already-known-to-be-satisfiable-p concept) (with-slots (inconsistent satisfiable tautological) concept (setf inconsistent nil satisfiable t tautological :not-tested) (dolist (ref (referenced-by concept)) (when (or (is-some-concept-p ref) (is-or-concept-p ref) (is-at-least-concept-p ref) (is-all-concept-p ref) (is-at-most-concept-p ref)) (register-concept-is-satisfiable ref)))))) (defmethod register-concept-is-satisfiable :after ((concept and-concept)) (with-slots (arguments) concept (dolist (arg arguments) (register-concept-is-satisfiable arg)))) ;;; ;;; ;;; (defmethod register-concept-is-inconsistent ((concept concept)) (unless (already-known-to-be-inconsistent-p concept) (with-slots (inconsistent satisfiable tautological) concept (setf inconsistent t satisfiable nil tautological :not-tested) (dolist (ref (referenced-by-ands concept)) (register-concept-is-inconsistent ref)) (dolist (ref (referenced-by concept)) (when (or (is-some-concept-p ref) (is-at-least-concept-p ref)) (register-concept-is-inconsistent ref)))) (register-concept-is-satisfiable (get-negated-concept concept)))) (defmethod register-concept-is-inconsistent :after ((concept or-concept)) (with-slots (arguments) concept (dolist (arg arguments) (register-concept-is-inconsistent arg)))) ;;; ;;; (defmethod transitive-p ((all-concept all-concept)) (transitive-p (role all-concept))) ;;; ;;; ;;; (defun scramble-ids () (when *cur-store* (with-slots (atoms ands ors somes alls id-counter) *cur-store* (let ((ids (reorder (loop as i from 0 to id-counter collect i)))) (dolist (slot '(atoms ands ors somes alls)) (let ((table (slot-value *cur-store* slot))) (loop as concept being the hash-value of table do (setf (slot-value concept 'id) (pop ids)) (unless ids (error "!"))))) (princ ids))))) ;;; ;;; ;;; (defmethod get-all-atoms :around ((concept concept)) (if (slot-boundp concept 'all-atoms) (slot-value concept 'all-atoms) (setf (slot-value concept 'all-atoms) (call-next-method)))) (defmethod get-all-atoms ((concept top-concept)) (list concept)) (defmethod get-all-atoms ((concept bottom-concept)) (list concept)) (defmethod get-all-atoms ((concept atomic-concept)) (list concept)) (defmethod get-all-atoms ((concept and/or-concept)) (let ((res nil)) (loop as arg in (arguments concept) do (if (is-atomic-concept-p arg) (push arg res) (dolist (arg (get-all-atoms arg)) (push arg res)))) (remove-duplicates res))) (defmethod get-all-atoms ((concept some/all-concept)) (get-all-atoms (qualification concept))) ;;; ;;; ;;; (defmethod get-all-roles :around ((concept concept)) (if (slot-boundp concept 'all-store-roles) ; auch die features etc. (slot-value concept 'all-store-roles) (setf (slot-value concept 'all-store-roles) (call-next-method)))) (defmethod get-all-roles ((concept atomic-concept)) nil) (defmethod get-all-roles ((concept some/all-concept)) (cons (role concept) (get-all-roles (qualification concept)))) (defmethod get-all-roles ((concept and/or-concept)) (let ((res nil)) (loop as arg in (arguments concept) do (dolist (role (get-all-roles arg)) (push role res))) (remove-duplicates res))) ;;; ;;; ;;; (defmethod get-language ((concept-store concept-store) &optional recompute-p) (declare (ignorable recompute-p)) (prepare concept-store +dl+) (slot-value concept-store 'language)) (defmethod get-language ((concept concept) &optional recompute-p) (declare (ignorable recompute-p)) (prepare (concept-store concept) +dl+) (when recompute-p ; wichtig (compute-language (concept-store concept))) (slot-value (concept-store concept) 'language))
66,557
Common Lisp
.lisp
1,576
28.73033
113
0.523561
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
50af910d657e3241968f69c471b357859f7e816afeb0acb5f0b245af8dcc7d8a
12,573
[ -1 ]
12,574
abox-queries3.lisp
lambdamikel_DLMAPS/src/prover/abox-queries3.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defconstant +marker+ (gensym "M")) (defun error-abox-inconsistent (abox) (error "ABox ~A is inconsistent!" abox)) (defvar *time-spend-in-individual-instance-rollback* 0) (defvar *time-spend-in-individual-instance-rollback2* 0) (defvar *time-spend-in-global-rollback* 0) (defvar *time-spend-in-individual-instance-register-told-concepts* 0) (defvar *time-spend-in-individual-instance-init-abox* 0) (defvar *time-spend-in-individual-instance-abox-sat* 0) (defvar *retrieval-context* nil) (defvar *rollback-to* nil) (defvar *rollback-from* nil) ;;; ;;; ;;; (defmacro with-abox-retrieval ((abox) &body body) `(let ((*retrieval-context* :prepare) (*rollback-to* nil)) (unwind-protect (progn ,@body) (when (eq *retrieval-context* :established) (global-rollback ,abox))))) (defmethod global-rollback ((abox abox) &key (rollback-from *rollback-from*) (rollback-to *rollback-to*)) (announce "Leaving Abox retrieval context, global rollback!") (with-timing (*time-spend-in-global-rollback*) (let ((*MAINTAIN-UNEXPANDED-SOME-CONCEPTS1-HEAP-P* nil) (*MAINTAIN-UNEXPANDED-AT-LEAST-CONCEPTS-HEAP-P* nil) (*MAINTAIN-UNEXPANDED-ATOMIC-CONCEPTS1-HEAP-P* nil) (*MAINTAIN-DEACTIVATED-NODES-P* nil) (*MAINTAIN-LEAF-NODES-P* nil) (*MAINTAIN-UNEXPANDED-AT-LEAST-CONCEPTS1-HEAP-P* nil) (*MAINTAIN-UNEXPANDED-ATTRIBUTE-EXISTS-CONCEPTS-HEAP-P* nil) (*MAINTAIN-CACHE-SAT-NODES-P* nil) (*MAINTAIN-UNEXPANDED-ATOMIC-CONCEPTS-HEAP-P* nil) (*MAINTAIN-UNEXPANDED-OR-CONCEPTS1-HEAP-P* nil) (*MAINTAIN-OLD-NODES-P* nil) (*MAINTAIN-UNEXPANDED-AND-CONCEPTS-HEAP-P* nil) (*MAINTAIN-UNEXPANDED-OR-CONCEPTS-HEAP-P* nil) (*MAINTAIN-ACTIVE-NODES-P* nil) (*MAINTAIN-UNEXPANDED-AND-CONCEPTS-HEAP1-P* nil) (*MAINTAIN-UNEXPANDED-ATTRIBUTE-EXISTS-CONCEPTS1-HEAP-P* nil) (*MAINTAIN-UNEXPANDED-SOME-CONCEPTS-HEAP-P* nil) (*MAINTAIN-BLOCKED-NODES-P* nil)) (setf (slot-value abox 'current-action) rollback-from) (rollback-to abox rollback-to)))) (define-prover ((concept-instances dl abox) &key concept continuation) (:rollback :no) (:init (announce "CONCEPT INSTANCES PROVER") (let* ((res nil) (negated (get-negated-concept concept)) (action nil) (init-performed-p nil) (same-loop-abox-init-done-p nil) (count 0) (pos 0) (nodes nil) (n 1) (lastpos nil) (instance nil) (instance-found nil)) (labels ((do-it () (block prover (with-clash-handler (dolist (node nodes) (incf *all-instance-tests*) (when *debug-p* (princ "CHECKING NODE ") (princ node) (terpri) (princ concept) (terpri) (describe-object node t) (describe-object abox t)) (incf count) (setf pos (floor (+ 0.5 (* 30 (/ count n))))) (setf clashes nil) (setf instance nil) (cond ((obvious-non-instance abox node concept) (incf *obvious-non-instance-hits*) t) ((obvious-instance abox node concept) (incf *obvious-instance-hits*) (setf instance t) (push node res)) (t (labels ((abox-sat () (loop-over-abox-nodes (node abox) (when (initial-concept node) (break "initial concept 1 : ~A!" node))) (let ((action (get-current-action))) (prog1 (or (let ((added ; macht den einen Knoten wieder aktiv! (register-as-unexpanded negated :node node :new-choice-point 0))) (check-for-clash node added) clashes) (with-timing (*time-spend-in-individual-instance-abox-sat*) (incf *individual-instance-proofs*) (prover-init 'abox-sat language abox :compute-core-model-p nil :store-ind-models-p t :keep-det-assertions-p nil :maintain-prover-state-p t))) (announce ">>>> CONCEPT INSTANCES: Now rolling back!") (with-timing (*time-spend-in-individual-instance-rollback*) (let ((*maintain-active-nodes-p* t)) (rollback-to abox action))) (loop-over-abox-nodes (node abox) (when (initial-concept node) (break "initial concept2 ~A !" node))) (reset-cached-sat-result abox))))) (when (if (or (not *abox-init-required-p*) (eq *retrieval-context* :established) same-loop-abox-init-done-p ) (with-strategy (+abox-saturation-strategy+) (not (abox-sat))) (let ((*abox-init-required-p* nil)) (when (eq *retrieval-context* :prepare) (setf *retrieval-context* :established) (setf *rollback-to* (get-current-action))) (setf same-loop-abox-init-done-p t init-performed-p t) (setf action (get-current-action)) ;(visualize abox) (break) (announce ">>>> CONCEPT INSTANCES: Now performing initial deterministic expansion") (with-timing (*time-spend-in-individual-instance-register-told-concepts*) (register-told-concepts abox language) (prepare-index-structures abox)) (loop-over-abox-nodes (node abox) (when (initial-concept node) (break "initial concept!"))) (announce ">>>> CONCEPT INSTANCES: Initial deterministic expansion") (let ((start-time1 (get-internal-run-time))) (with-strategy (+abox-saturation-strategy+) (perform (deterministic-expansion :language-type dl) (:body (announce "Done!") ;(visualize abox) (break) (incf *time-spend-in-individual-instance-init-abox* (- (get-internal-run-time) start-time1)) (setf *rollback-from* (get-current-action)) (if clashes ;;; kann eigentlich nicht vorkommen! (error-abox-inconsistent abox) (not (abox-sat))))))))) (setf instance t) (push node res))))) (when (and instance continuation) (funcall continuation node)) (setf instance-found (or instance-found instance)) (when (and t ; *debug-p* (or (not lastpos) (not (= pos lastpos)))) (loop as i from (or lastpos 0) to (1- pos) do (if instance-found (princ "+") (princ "-"))) (setf instance-found nil) (setf lastpos pos))) (when t ; *debug-p* (terpri)) (when (and init-performed-p (not *retrieval-context*)) (global-rollback abox :rollback-to action)) res)))) (loop-over-abox-nodes (node abox) (when (old-p node) (push node nodes))) (setf n (length nodes)) (when t ; *debug-p* (terpri) (loop as i from 0 to 29 do (princ "=")) (terpri)) (do-it))))) (define-prover ((individual-instance-p dl abox) &key node concept) (:rollback :no) (:init (announce "INDIVIDUAL INSTANCE?") (incf *all-instance-tests*) (let* ((negated (get-negated-concept concept)) (action nil) (init-performed-p nil) (instance nil)) (labels ((do-it () (block prover (with-clash-handler (setf clashes nil) (setf instance nil) (cond ((obvious-non-instance abox node concept) (incf *obvious-non-instance-hits*) t) ((obvious-instance abox node concept) (incf *obvious-instance-hits*) (setf instance t)) (t (labels ((abox-sat () (let ((action (get-current-action))) (prog1 (or (let ((added ; macht den einen Knoten wieder aktiv! (register-as-unexpanded negated :node node :new-choice-point 0))) (check-for-clash node added) clashes) (with-timing (*time-spend-in-individual-instance-abox-sat*) (incf *individual-instance-proofs*) (prover-init 'abox-sat language abox :compute-core-model-p nil :store-ind-models-p nil :keep-det-assertions-p nil :maintain-prover-state-p t))) (announce ">>>> INDIVIDUAL INSTANCE-P: Now rolling back!") (with-timing (*time-spend-in-individual-instance-rollback*) (let ((*maintain-active-nodes-p* t)) (rollback-to abox action))) (reset-cached-sat-result abox))))) (when (if (or (not *abox-init-required-p*) (eq *retrieval-context* :established)) (not (abox-sat)) (let ((*abox-init-required-p* nil)) ; (visualize abox) (break) (when (eq *retrieval-context* :prepare) (setf *retrieval-context* :established) (setf *rollback-to* (get-current-action))) (announce ">>>> INDIVIDUAL INSTANCE-P: Now performing initial deterministic expansion") (setf init-performed-p t) (setf action (get-current-action)) (with-timing (*time-spend-in-individual-instance-register-told-concepts*) (register-told-concepts abox language) (prepare-index-structures abox)) (announce ">>>> INDIVIDUAL INSTANCE-P: Initial deterministic expansion") (let ((start-time1 (get-internal-run-time))) (with-strategy (+abox-saturation-strategy+) (perform (deterministic-expansion :language-type dl) (:body (announce "Done!") (incf *time-spend-in-individual-instance-init-abox* (- (get-internal-run-time) start-time1)) (setf *rollback-from* (get-current-action)) (if clashes ;;; kann eigentlich nicht vorkommen! (error-abox-inconsistent abox) (not (abox-sat))))))))) (setf instance t))))) (when (and init-performed-p (not *retrieval-context*)) (global-rollback abox :rollback-to action)) instance)))) (do-it))))) #| (define-prover ((simple-individual-instance-p dl abox) &key node concept) (:rollback :no) (:init (announce "INDIVIDUAL INSTANCE?") (let* ((negated (get-negated-concept concept)) (instance nil)) (labels ((do-it () (setf instance nil) (cond ((obvious-non-instance abox node concept) t) ((obvious-instance abox node concept) (setf instance t)) (t (labels ((abox-sat () (let ((action nil)) (prog1 (or (let ((added ; macht den einen Knoten wieder aktiv! (register-as-unexpanded negated :node node :new-choice-point 0))) (setf action (get-current-action)) (block prover ; wird nicht benutzt als Ausgang (with-clash-handler (check-for-clash node added) clashes))) (with-timing (*time-spend-in-individual-instance-abox-sat*) (prover-init 'abox-sat language abox :compute-core-model-p nil :store-ind-models-p nil :keep-det-assertions-p nil :maintain-prover-state-p nil))) (undo-action abox action) (reset-cached-sat-result abox))))) (unless (abox-sat) (setf instance t))))) instance)) (do-it))))) |# ;;; ;;; ;;; (defun related-p (abox from to role &rest args) (let* ((abox (find-abox abox :error-p t)) (from (find-node abox from :error-p t)) (to (find-node abox to :error-p t))) (with-abox* (abox) (if (apply #'prepare-abox-for-querying-and-sat-p abox args) (let* ((role (parse-role role)) (marker (with-protected-concept-store (get-negated-concept (parse-concept +marker+)))) (concept (with-protected-concept-store (parse-concept `(all ,(unparse role) ,+marker+))))) (node-instance from concept) (node-instance to marker) (prog1 (not (apply #'abox-sat-p abox args)) (node-forget from concept) (node-forget to marker))) (error-abox-inconsistent abox))))) ;;; ;;; ;;; (defmethod obvious-instance ((abox abox) node concept) (cond ((is-top-concept-p concept) t) ((is-bottom-concept-p concept) nil) (t (cond ((member concept (told-concepts node)) t) ((member (negated-concept concept) (told-concepts node)) nil) (t (let ((negated (negated-concept concept))) (unless (core-model node) (break "no core models for ~A?" node)) (unless (instance-retrieval-model negated) (break "no instance retrieval model for ~A?" negated)) (models-surely-not-mergeable-p +dl+ (core-model node) (instance-retrieval-model negated)))))))) (defmethod obvious-non-instance ((abox abox) node concept) (cond ((is-bottom-concept-p concept) t) ((is-top-concept-p concept) nil) ((member concept (told-concepts node)) nil) (t (let ((negated (negated-concept concept))) (if (member negated (told-concepts node)) t (progn (unless (ind-models node) (break "no ind models for ~A?" node)) (unless (cached-models negated) (break "no concept models for ~A?" negated)) (or (some #'(lambda (ma) (some #'(lambda (mb) (models-mergeable-p +alchn+ ma mb)) (cached-models negated))) (ind-models node)) (obvious-instance abox node negated)))))))) ;;; ;;; ;;; (defun instance-p (abox node concept &rest args &key language) (let* ((abox (find-abox abox :error-p t)) (node (find-node abox node :error-p t))) (with-protected-concept-store (with-abox* (abox) (let* ((concept (parse-concept concept)) (language (or language (get-language concept t))) (res (apply #'compute-models-and-sat-p concept args)) (abox-sat-p (apply #'prepare-abox-for-querying-and-sat-p abox args))) (if abox-sat-p (ecase res (:top t) (:yes (cond ((obvious-non-instance abox node concept) nil) ((obvious-instance abox node concept) t) (t (apply #'prover-init 'individual-instance-p (make-language language) abox :debug-p nil ; t :node node :concept concept args)))) (:no nil)) (error-abox-inconsistent abox))))))) (defun retrieve-concept-instances (abox concept &rest args &key language continuation &allow-other-keys) (let* ((abox (find-abox abox :error-p t))) (with-protected-concept-store (with-abox* (abox) (let* ((concept (parse-concept concept)) (language (or language (get-language concept t))) (res (apply #'compute-models-and-sat-p concept args)) (abox-sat-p (apply #'prepare-abox-for-querying-and-sat-p abox args))) (if abox-sat-p (case res (:top (let ((res nil)) (loop-over-old-nodes (node abox) (when (old-p node) (when continuation (funcall continuation node)) (push node res))) res)) (:yes (let ((res (apply #'prover-init 'concept-instances (make-language language) abox :concept concept :continuation continuation args))) res)) (:no nil)) (error-abox-inconsistent abox))))))) (defun retrieve-role-fillers (abox ind role &rest args &key language continuation &allow-other-keys) (let* ((abox (find-abox abox :error-p t)) (node (find-node abox ind :error-p t)) (language (or language (get-language abox)))) (with-protected-concept-store (with-abox* (abox) (let* ((role (parse-role role)) (marker (parse-concept +marker+)) (concept (parse-concept `(all ,(unparse role) ,+marker+)))) (node-instance node concept) (prog1 (apply #'retrieve-concept-instances abox marker :continuation continuation :language language args) (node-forget node concept))))))) ;;; ;;; ;;; (defmethod compute-models-and-sat-p ((concept concept) &rest args) (announce "Compute models and sat-p!") (let ((negated (get-negated-concept concept))) (if (or (already-known-to-be-satisfiable-p concept) (cached-models concept) (apply #'sat-p concept :store-instance-retrieval-model-p t :store-ind-models-p t :maintain-prover-state-p nil :recompute-p t args)) (progn (when (or (not (instance-retrieval-model concept)) (not (cached-models concept))) (apply #'sat-p concept :store-instance-retrieval-model-p t :maintain-prover-state-p nil :store-ind-models-p t :recompute-p t args)) (if (or (already-known-to-be-satisfiable-p negated) (cached-models negated) (apply #'sat-p negated :store-instance-retrieval-model-p t :maintain-prover-state-p nil :store-ind-models-p t :recompute-p t args)) (progn (when (or (not (instance-retrieval-model negated)) (not (cached-models negated))) (apply #'sat-p negated :maintain-prover-state-p nil :store-instance-retrieval-model-p t :store-ind-models-p t :recompute-p t args)) :yes) :top)) :no))) ;;; ;;; ;;; (defmethod prepare-abox-for-querying-and-sat-p ((abox abox) &rest args) (announce "Prepare abox for querying and sat-p!") (if (slot-value abox 'ready-for-retrieval) t (prog1 (apply #'abox-consistent-p abox :recompute-p t :store-ind-models-p t :compute-core-model-p t :maintain-prover-state-p nil args) (setf (slot-value abox 'ready-for-retrieval) t)))) #| (progn (full-reset) (with-kb (test test :delete-if-exists-p t) (instance a (or (all r c) (all r d))) (related a b r) (prepare-abox-for-querying-and-sat-p *cur-abox*) (with-abox-retrieval (*cur-abox*) (princ (retrieve-concept-instances *cur-abox* '(or c d))) (princ (individual-instance? a (or (all r (or c d)) x))) (princ (retrieve-concept-instances *cur-abox* '(or c d )))))) |# #| (defun abox-queries-test () (delete-all-tboxes) (instance i c) (instance j d) (related i j r) (pprint (ts::midelora-retrieve (?x ?y) (and (?x c) (?x ?y r) (?y d)))) (pprint (ts::midelora-retrieve (?x) (and (i ?x r) (?x d))))) |#
29,418
Common Lisp
.lisp
536
27.041045
127
0.404576
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
5469c2fbbd57dca27fea385c609e4d99243c439542bad76d0beadcd8b0c36c79
12,574
[ -1 ]
12,575
simple-kaon-test.lisp
lambdamikel_DLMAPS/src/prover/simple-kaon-test.lisp
 > H]ÍTEXTCCL2simple-kaon-test.lispoo^ 4MonacoH MonacoÊ52õÊ52õöö(  oo^€’^FREDMPSR6ÿÿYÿÿÿÿgíÿÿ Ä
554
Common Lisp
.lisp
3
184
403
0.139493
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
af7d65f79edac1b17857ddf15ad7012329b5be81b17cc4fc6045ed4b8377cd03
12,575
[ -1 ]
12,576
alchf-prover.lisp
lambdamikel_DLMAPS/src/prover/alchf-prover.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (define-prover ((abox-sat alchf abox)) (:init (cond ((zerop (1- (no-of-nodes abox))) (loop-over-abox-nodes (node abox) (register-label-is-stable abox node)) (with-strategy (+abox-saturation-strategy+) (start-main))) (t (announce "Looking for initial feature clashes") (let ((features (and *cur-tbox* (get-all-features *cur-tbox*)))) (loop-over-abox-nodes (node abox) (when (some #'(lambda (f) (announce "Looking for ~A : ~A = ~A" node f) (when (cdr (get-role-successors node f)) (announce "Found non-resolvable feature clash ~A : ~A" node f) t)) features) (return-from prover-init nil))) (perform (initial-abox-saturation) (:body (with-strategy (+abox-saturation-strategy+) ;;; (loop-over-abox-nodes (node abox) ;;; (register-label-is-stable abox node)) ;;; Falsch! Erst nach "Hineinmergen" von "(some f c)" ;;; kenne ich das initiale Label! (perform (model-merging) (:body (start-main)))))))))) (:main (perform (deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (make-models-for-nodes) (:body (perform (feature-expansion) (:positive (if clashes (handle-clashes) (perform (model-merging :node succ) (:body (next-round))))) (:negative (perform (some-expansion) (:positive (if clashes (handle-clashes) (perform (model-merging :node new-node) (:body (next-round))))) (:negative (perform (make-models-for-old-nodes) (:body (success)))))))))))))))) (define-prover ((abox-sat alchf abox1)) (:init (cond ((zerop (1- (no-of-nodes abox))) (loop-over-abox-nodes (node abox) (register-label-is-stable abox node)) (with-strategy (+trace-strategy+) (start-main))) (t (announce "Looking for initial feature clashes") (let ((features (and *cur-tbox* (get-all-features *cur-tbox*)))) (loop-over-abox-nodes (node abox) (when (some #'(lambda (f) (announce "Looking for ~A : ~A = ~A" node f) (when (cdr (get-role-successors node f)) (announce "Found non-resolvable feature clash ~A : ~A" node f) t)) features) (return-from prover-init nil))) (perform (initial-abox-saturation) (:body (with-strategy (+trace-strategy+) ;; (loop-over-abox-nodes (node abox) ;; (register-label-is-stable abox node)) ;; s.o. (perform (model-merging) (:body (start-main)))))))))) (:rollback (let ((*maintain-active-nodes-p* t)) (rollback))) (:main (perform (focused-deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (feature-expansion) (:positive (if clashes (handle-clashes) (perform (model-merging :node succ) (:body (next-round))))) (:negative (perform (some-expansion) (:positive (if clashes (handle-clashes) (perform (model-merging :node new-node) (:body (next-round))))) (:negative (perform (pop-active-nodes-heap) (:positive (next-round)) (:negative (perform (make-models-for-old-nodes) (:body (success)))))))))))))))) #| (progn (progn (delete-all-tboxes) (delete-all-aboxes) (with-abox (test :delete-if-exists-p t) (define-primitive-attribute f) (related a f1 f) (related a f2 f) (false! (abox-sat? test :debug-p t)))) (progn (delete-all-tboxes) (delete-all-aboxes) (with-abox (test :delete-if-exists-p t) (define-primitive-attribute f) (related a b f) (instance b (not c)) (instance a (some f c)) (false! (abox-sat? test :debug-p t)))) (progn (delete-all-tboxes) (with-tbox (test :delete-if-exists-p t) (define-primitive-attribute f) (define-primitive-attribute f1 :parents (f)) (define-primitive-attribute f2 :parents (f)) (prepare *cur-tbox* +alchf+) (unless (and (implies-p (parse-role 'f1) (parse-role 'f)) (implies-p (parse-role 'f2) (parse-role 'f))) (error "Bad features!")) (when (sat? (and (some f1 a) (some f2 (not a))) :language +alchf+ :debug-p t :cache-models-p nil :use-cached-models-p nil :recompute-p t :visualize-p nil) (error "Bad features!")))) (progn (delete-all-tboxes) (with-tbox (test :delete-if-exists-p t) (define-primitive-concept a TOP) (define-primitive-concept b a) (define-primitive-concept c TOP) (define-primitive-concept d c) (define-primitive-attribute f) (define-primitive-attribute g) (define-concept x (AND a (SOME f (SOME g c)))) (define-concept y (AND b (SOME f (SOME g d)))) (unless (subsumes? x y :language +alchf+ :debug-p t) (error "Error in prover!")))) (progn (delete-all-tboxes) (with-tbox (test :delete-if-exists-p t) (define-primitive-attribute fa) (define-primitive-attribute fb) (define-primitive-attribute fc) (define-primitive-attribute f1 :parents (fa)) (define-primitive-attribute f2 :parents (fa fb)) (define-primitive-attribute f3 :parents (fb)) (when (sat? (and (some f1 c) (some f2 d) (some f3 e) (all fa (not (and c d e)))) :language +alchf+ :debug-p t) (error "Error in prover!")))) (progn (with-kb (test test :delete-if-exists-p t) (define-primitive-attribute f) (related a b f) ;(related a c f) (instance b test) (instance a (or (some f (not test)) (some f (not ddtest)))) (instance a (all f ddtest)) (princ (abox-sat? test :debug-p t)))) (progn (delete-all-tboxes) (with-kb (test test :delete-if-exists-p t) (defrole r :domain a :range b) (related i j r) (unless (individual-instance? i (and a (all r b))) (break "Bug!")) (princ "-----------------------") (terpri) (unless (individual-instance? i (and a (all r (and b (all (inv r) a))))) (break "Bug!"))))) |#
8,218
Common Lisp
.lisp
218
23.825688
94
0.475141
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
c198d57fdfd503debd24502f656d235bb881a4cab4f210ffe62fc3a6da51cb0a
12,576
[ -1 ]
12,577
edge-label.lisp
lambdamikel_DLMAPS/src/prover/edge-label.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defpersistentclass edge-label (rolebox-edge-description)) (defmethod reset-label ((edge-label edge-label)) nil) ;;; ;;; ;;; (defmethod initialize-description ((description edge-label)) (unless (typep (textual-description description) 'role) (setf (textual-description description) (parse-role (textual-description description))) description)) (defmethod copy ((label edge-label) &rest args) (declare (ignorable args)) (make-edge-description 'edge-label (textual-description label) :type (type-of label))) ;;; ;;; ;;; (defmethod change-textual-description ((description edge-label) (role role) &key) (setf (textual-description description) role)) ;;; ;;; ;;; (defmethod underspecified-p ((edge edge-label) &rest args) (underspecified-p (textual-description edge))) ;;; ;;; ;;; (defmethod implies-p ((label-a edge-label) (label-b edge-label) &rest args) (implies-p (textual-description label-a) (textual-description label-b))) (defmethod implies-p ((label edge-label) (role role) &rest args) (implies-p (textual-description label) role)) (defmethod implies-p ((role role) (label edge-label) &rest args) (implies-p role (textual-description label)))
1,374
Common Lisp
.lisp
41
29.317073
81
0.680851
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
5cc1be7b7f3fc7a6f249494fae685783aa623809b545ef57a0b878c86c3919da
12,577
[ -1 ]
12,578
wine.lisp
lambdamikel_DLMAPS/src/prover/wine.lisp
(IN-TBOX |~/Desktop/wine.rdf| :SIZE 200 :ROLE-SIZE 30) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2000/01/rdf-schema#comment| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2002/07/owl#comment| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2000/01/rdf-schema#seeAlso| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2002/07/owl#seeAlso| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2000/01/rdf-schema#isDefinedBy| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2002/07/owl#isDefinedBy| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2000/01/rdf-schema#label| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2002/07/owl#label| :RANGE STRING) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/2002/07/owl#versionInfo| :RANGE STRING) (DEFINE-PRIMITIVE-ATTRIBUTE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| :PARENTS |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasWineDescriptor| :DOMAIN (AND (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|) :RANGE (AND (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor|)) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| :PARENTS |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#madeFromFruit| :INVERSE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeIntoWine| :DOMAIN (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) :RANGE (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineGrape| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineGrape|))) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| :TRANSITIVE T :DOMAIN TOP :RANGE (AND (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region|)) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#adjacentRegion| :INVERSE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#adjacentRegion| :DOMAIN (AND (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region|) (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region|)) :RANGE (AND (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region|) (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region|))) (DEFINE-DATATYPE-PROPERTY |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#yearValue| :RANGE CARDINAL) (DEFINE-PRIMITIVE-ATTRIBUTE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasVintageYear| :DOMAIN (AND (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Vintage| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Vintage|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Vintage|) :RANGE (AND (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#VintageYear| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#VintageYear|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#VintageYear|)) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#madeFromFruit| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeIntoWine| :PARENTS #:|http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#madeFromFruit-INV-50898| :INVERSE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| :DOMAIN (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineGrape| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineGrape|)) :RANGE (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|))) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasWineDescriptor| :DOMAIN (AND (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|) :RANGE (AND (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineDescriptor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineDescriptor|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineDescriptor|)) (DEFINE-PRIMITIVE-ATTRIBUTE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| :PARENTS |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasWineDescriptor| :RANGE (AND (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineSugar|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineSugar|)) (DEFINE-PRIMITIVE-ATTRIBUTE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| :PARENTS |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasWineDescriptor| :RANGE (AND (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineBody|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineBody|)) (DEFINE-PRIMITIVE-ATTRIBUTE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| :PARENTS |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasWineDescriptor| :RANGE (AND (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineFlavor|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineFlavor|)) (DEFINE-PRIMITIVE-ATTRIBUTE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasMaker| :INVERSE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#producesWine|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#producesWine| :INVERSE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasMaker|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PotableLiquid|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#course| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meal| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|) (DEFINE-PRIMITIVE-ROLE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| :DOMAIN |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse| :RANGE |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Winery| *TOP*) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing| *TOP*) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#VintageYear| *TOP*) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region| *TOP*) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LoireRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BourgogneRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BordeauxRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ZinfandelGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ToursRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RieslingGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#StEmilionRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SancerreRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotNoirGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlancGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteSyrahGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PauillacRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MedocRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MuscadetRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MeursaultRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFrancGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MalbecGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteVerdotGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MargauxRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ItalianRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#GermanyRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#GamayGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#FrenchRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CotesDOrRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlancGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ChardonnayGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CaliforniaRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TexasRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BeaujolaisRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AnjouRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#USRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AlsaceRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauterneRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PortugalRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ChiantiRegion|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SangioveseGrape|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Full|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Strong|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Light|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Delicate|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Sweet|) (DEFINE-PRIMITIVE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OffDry|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Juice| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#madeFromFruit| *TOP*) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PotableLiquid|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Chianti| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SangioveseGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ChiantiRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ItalianWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#EarlyHarvest| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry|)) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LateHarvest|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sauternes| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauterneRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LateHarvest| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Port| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PortugalRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EatingGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Grape|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor| (AND (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Rose| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineDescriptor|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Rose| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor|) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineDescriptor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineTaste| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineColor|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineTaste| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineDescriptor|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineSugar|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineSugar| (AND (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineTaste|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineSugar|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineSugar|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineBody|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineBody| (AND (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineTaste|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineBody|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineBody|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineFlavor|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineFlavor| (AND (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineTaste|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineFlavor|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineFlavor|) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonConsumableThing| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Vintage| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasVintageYear| *TOP*)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruitCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OffDry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Delicate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse| (AND (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SpicyRedMeat|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SpicyRedMeatCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeat|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeatCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Seafood|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SeafoodCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Shellfish|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ShellfishCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#BlandFish|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#BlandFishCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#CheeseNutsDessert|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#CheeseNutsDessertCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DarkMeatFowl|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DarkMeatFowlCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetDessert|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetDessertCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dessert|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DessertCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fish|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#FishCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#FruitCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#LightMeatFowl|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#LightMeatFowlCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonBlandFish|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonBlandFishCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonOysterShellfish|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonOysterShellfishCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonRedMeat|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonRedMeatCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSpicyRedMeat|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSpicyRedMeatCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruit|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruitCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruit|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruitCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFoodCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OysterShellfish|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OysterShellfishCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithHeavyCreamSauce|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithHeavyCreamCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithLightCreamSauce|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithLightCreamCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithNonSpicyRedSauce|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithNonSpicyRedSauceCourse|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithSpicyRedSauce|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithSpicyRedSauceCourse|) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Wine|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| *TOP*) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| *TOP*) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meal| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#course| *TOP*) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PotableLiquid| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meal|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruit| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruit| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruit| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSweetFruit|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithWhiteSauce| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithLightCreamSauce| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithWhiteSauce|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithHeavyCreamSauce| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithLightCreamSauce|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithWhiteSauce|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithRedSauce| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithWhiteSauce|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithSpicyRedSauce| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithRedSauce|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithNonSpicyRedSauce| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithRedSauce| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithSpicyRedSauce|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meat| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonRedMeat| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meat|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeat| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meat| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonRedMeat|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSpicyRedMeat| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeat|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SpicyRedMeat| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeat| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSpicyRedMeat|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Grape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruit|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WineGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Grape|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Beaujolais| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BeaujolaisRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#GamayGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Wine| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BordeauxRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LoireRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BeaujolaisRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Beaujolais|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BourgogneRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Burgundy|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFrancGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFranc|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignon|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ChardonnayGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Chardonnay|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlancGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlanc|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteVerdotGrape|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MalbecGrape|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFrancGrape|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|))) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Meritage|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Merlot|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteSyrahGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteSyrah|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlancGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlanc|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotNoirGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotNoir|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RieslingGrape|)) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Riesling|) (OR (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonGrape|))) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonOrSauvignonBlanc|) (OR (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ZinfandelGrape|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Zinfandel|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Region|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| *TOP*) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| *TOP*) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| *TOP*) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| *TOP*) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| *TOP*) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasMaker| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Winery|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasMaker| *TOP*) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PotableLiquid|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Wine|) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Wine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AlsatianWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AlsaceRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AmericanWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#USRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFranc| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFrancGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignon| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TexasWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TexasRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CaliforniaWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CaliforniaRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Chardonnay| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ChardonnayGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlanc| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlancGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TableWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TableWine|) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#FrenchWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#FrenchRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#FullBodiedWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Gamay| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#GamayGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#GermanWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#GermanyRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ItalianWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ItalianRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LateHarvest| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DessertWine| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#IceWine| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LateHarvest|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#IceWine| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DessertWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LateHarvest|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Meritage| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteVerdotGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MalbecGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetFrancGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-LEAST 2 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Merlot| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteSyrah| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PetiteSyrahGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlanc| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlancGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotNoir| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotNoirGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RoseWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Rose|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonOrSauvignonBlanc| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonGrape|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Semillon| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonOrSauvignonBlanc|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlanc| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonOrSauvignonBlanc|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SweetRiesling| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DessertWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Riesling|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Riesling| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryRiesling|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SweetRiesling|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RieslingGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryRiesling| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Riesling|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SweetWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sweet|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Zinfandel| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ZinfandelGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TableWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryRedWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TableWine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedTableWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryRedWine|) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryWhiteWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#TableWine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteTableWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryWhiteWine|) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#White|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteNonSweetWine| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AnjouRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Anjou|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MuscadetRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Muscadet|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SancerreRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sancerre|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ToursRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Tours|) (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteLoire| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#LoireRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteLoire| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlancGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlancGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Tours| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CheninBlancGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ToursRegion|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Sancerre| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medium|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SancerreRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Muscadet| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MuscadetRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotBlancGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Anjou| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Light|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#OffDry|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#AnjouRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Rose|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Loire|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MedocRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medoc|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#StEmilionRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#StEmilion|) (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteBordeaux| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BordeauxRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteBordeaux| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SauvignonBlancGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#SemillonGrape|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#StEmilion| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#StEmilionRegion|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedBordeaux| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine| (AND (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedBordeaux| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedBurgundy| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CotesDOrRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CotesDOr|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PinotNoirGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Burgundy|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Burgundy| (AND (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedBurgundy| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine|)) (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteBurgundy| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#BourgogneRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteBurgundy| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MeursaultRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Meursault|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#ChardonnayGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Burgundy| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Meursault| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MeursaultRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteBurgundy|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CotesDOr| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Moderate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CotesDOrRegion|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedBurgundy|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryRedWine| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#RedWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medoc| (AND (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MargauxRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Margaux|) (OR (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PauillacRegion|)) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Pauillac|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MedocRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Red|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Bordeaux|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Pauillac| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Strong|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#CabernetSauvignonGrape|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Full|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#PauillacRegion|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medoc|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Margaux| (AND (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Delicate|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#locatedIn| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MargauxRegion|) (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MerlotGrape|) (AT-MOST 1 |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#madeFromGrape|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Medoc|)) (DEFINE-CONCEPT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryWhiteWine| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#DryWine| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhiteWine|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fowl| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meat|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#LightMeatFowl| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fowl|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DarkMeatFowl| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fowl| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#LightMeatFowl|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dessert| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fowl|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meat|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetDessert| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dessert|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#CheeseNutsDessert| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetDessert|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dessert|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Seafood| (AND (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dessert|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fowl|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meat|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta|) (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fish| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Seafood|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonBlandFish| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fish|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#BlandFish| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fish| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonBlandFish|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Shellfish| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Seafood| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fish|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OysterShellfish| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Shellfish|) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonOysterShellfish| (AND |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Shellfish| (NOT |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OysterShellfish|))) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithSpicyRedSauceCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Strong|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Full|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithSpicyRedSauce|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithNonSpicyRedSauceCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithNonSpicyRedSauce|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithLightCreamCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Delicate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Light|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithLightCreamSauce|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithHeavyCreamCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PastaWithHeavyCreamSauce|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OysterShellfishCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Sweet|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OysterShellfish|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFoodCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#OtherTomatoBasedFood|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruitCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Sweet|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSpicyRedMeatCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Strong|))) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonSpicyRedMeat|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonRedMeatCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Strong|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonRedMeat|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonOysterShellfishCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonOysterShellfish|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonBlandFishCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonBlandFish|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#LightMeatFowlCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#LightMeatFowl|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#FruitCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#FishCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Medium|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fish|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DessertCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Sweet|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Strong|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Full|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dessert|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetDessertCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetDessert|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DarkMeatFowlCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Delicate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Light|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#DarkMeatFowl|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#CheeseNutsDessertCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#CheeseNutsDessert|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#BlandFishCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Delicate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#BlandFish|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ShellfishCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| (OR |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Strong|))) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Full|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Shellfish|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SeafoodCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#White|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Seafood|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeatCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#RedMeat|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|)) (IMPLIES |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SpicyRedMeatCourse| (AND (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasFlavor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Moderate|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Dry|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasBody| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Full|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink| (SOME |http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasColor| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Red|)) (ALL |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasFood| |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SpicyRedMeat|) |http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse|))
93,525
Common Lisp
.lisp
231
402.87013
5,946
0.743949
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
b1351f6e6cc1aa709edc0f37ae9496ec82197084a4af0dc8d367ec0af3ba93f8
12,578
[ -1 ]
12,579
concept-selection13.lisp
lambdamikel_DLMAPS/src/prover/concept-selection13.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defun ensure-active-nodes-present () (unless (is-abox1-p *abox*) (error "Bad ABox for trace strategy!")) (when (and *reflexive-checks-p* (not *maintain-active-nodes-p*)) (error "active nodes missing!"))) (defun ensure-not-blocked (node) (when *reflexive-checks-p* (unless (old-p node) (when (blocked-p node) (error "node ~A is blocked!" node)) (when (and nil (find-blocking-node *abox* node)) (error "node ~A is blocked (2)!" node))))) ;;; ;;; ;;; (timed-defmethod select-det-node ((abox abox1) (strategy strategy) (language dl)) (with-slots (active-nodes) abox (ensure-active-nodes-present) (let* ((node (heap-peek active-nodes))) (when node (announce "Checking active node for det node: ~A, ~A" node (list (not (deterministically-expanded-p node)) (has-unexpanded-atomic-concepts-p node) (has-unexpanded-and-concepts-p node) (has-unexpanded-or-concepts-p node))) (when (and node (not (deterministically-expanded-p node)) (or (has-unexpanded-atomic-concepts-p node) (has-unexpanded-and-concepts-p node) (has-unexpanded-or-concepts-p node))) (ensure-not-blocked node) node))))) ;;; ;;; ;;; (timed-defmethod select-or-concept1 ((node abox-node) (strategy strategy) (language dl)) (let ((concept nil) (best-score nil)) (labels ((get-or-score (node concept) (declare (ignorable node concept)) 1)) (when *reflexive-checks-p* (ensure-not-blocked node) (unless (deterministically-expanded-p node) (error "SELECT-OR-CONCEPT: Strategy Error!"))) (loop-over-node-unexpanded-or-concepts (or-concept node nil) (let ((score (get-or-score node or-concept))) (when (or (not best-score) (> score best-score)) (setf best-score score concept or-concept)))) (values concept best-score)))) (timed-defmethod select-or-concept ((abox abox) (strategy strategy) (language dl)) (let ((node nil) (best-score nil) (concept nil)) (loop-over-active-nodes (or-node abox nil) (when (has-unexpanded-or-concepts-p or-node nil) (multiple-value-bind (or-concept score) (select-or-concept1 or-node strategy language) (when (or (not concept) (> score best-score)) (setf node or-node concept or-concept best-score score))))) (when node (announce "~%+++ Selected OR CONCEPT ~A : ~A" node concept) (values concept node)))) (timed-defmethod select-or-concept ((abox abox) (strategy abox-saturation-strategy) (language dl)) (let ((node (get-oldest-node-with-unexpanded-or-concepts abox))) (when node (let ((concept (select-or-concept1 node strategy language))) (announce "~%+++ Selected OR CONCEPT ~A : ~A" node concept) (values concept node))))) (timed-defmethod select-or-concept ((abox abox1) (strategy strategy) (language dl)) (call-next-method)) (timed-defmethod select-or-concept ((abox abox1) (strategy trace-strategy) (language dl)) (with-slots (active-nodes) abox (ensure-active-nodes-present) (let ((node (heap-peek active-nodes))) (when (and node (has-unexpanded-or-concepts-p node)) (let ((concept (select-or-concept1 node strategy language))) (announce "~%+++ Selected OR CONCEPT ~A : ~A" node concept) (values concept node)))))) ;;; ;;; Code for semantic branching ;;; (timed-defmethod select-open-disjunct1 ((node abox-node) (strategy strategy) (language dl)) (let ((concept nil) (disjunct nil) (best-score nil) (ors nil) (open-diss nil)) (labels ((get-disjunct-score (node concept) (declare (ignorable node concept)) (break))) (when *reflexive-checks-p* (ensure-not-blocked node) (unless (deterministically-expanded-p node) (error "SELECT-OPEN-DISJUNCT: Strategy Error!")) (unless (has-unexpanded-or-concepts-p node) (error "No unexpanded or concepts!"))) (loop-over-node-unexpanded-or-concepts (or-concept node nil) (push or-concept ors) (dolist (dis (arguments or-concept)) (unless (on-tableau-p node (get-negated-concept dis)) (push (list dis or-concept) open-diss)))) (dolist (dis-and-or open-diss) (let ((dis (first dis-and-or)) (or-concept (second dis-and-or))) (dolist (dis (list dis (get-negated-concept dis))) (let ((score 0)) (dolist (or-concept ors) (if (is-abox-saturation-strategy-p strategy) (setf score (if (is-all-concept-p dis) 2 1)) (when (member dis (arguments or-concept)) (incf score)))) (when (or (not best-score) (> score best-score)) (setf best-score score concept or-concept disjunct dis))))))) (values disjunct concept best-score))) (timed-defmethod select-open-disjunct ((abox abox) (strategy strategy) (language dl)) (let ((node nil) (best-score nil) (concept nil) (best-disjunct nil)) (loop-over-active-nodes (or-node abox nil) (when (has-unexpanded-or-concepts-p or-node nil) (multiple-value-bind (disjunct or-concept score) (select-open-disjunct1 or-node strategy language) (when (or (not concept) (> score best-score)) (setf node or-node concept or-concept best-disjunct disjunct best-score score))))) (when node (announce "~%+++ Selected OPEN DISJUNCT ~A OF ~A : ~A" best-disjunct concept node) (values best-disjunct concept node)))) (timed-defmethod select-open-disjunct ((abox abox) (strategy abox-saturation-strategy) (language dl)) (let ((node (get-oldest-node-with-unexpanded-or-concepts abox))) (when node (multiple-value-bind (best-disjunct concept) (select-open-disjunct1 node strategy language) (when node (announce "~%+++ Selected OPEN DISJUNCT ~A OF ~A : ~A" best-disjunct concept node) (values best-disjunct concept node)))))) (timed-defmethod select-open-disjunct ((abox abox1) (strategy strategy) (language dl)) (call-next-method)) (timed-defmethod select-open-disjunct ((abox abox1) (strategy trace-strategy) (language dl)) (with-slots (active-nodes) abox (ensure-active-nodes-present) (let ((node (heap-peek active-nodes))) (when (and node (has-unexpanded-or-concepts-p node)) (multiple-value-bind (best-disjunct concept) (select-open-disjunct1 node strategy language) (announce "~%+++ Selected OPEN DISJUNCT ~A OF ~A : ~A" best-disjunct concept node) (values best-disjunct concept node)))))) ;;; ;;; ;;; (timed-defmethod select-some-concept1 ((node abox-node) (strategy strategy) (language dl)) (let ((concept nil) (best-score nil) (abox (in-graph node))) (labels ((get-some-score (node concept) (- (choice-point-counter abox) (maximum (get-choice-points concept :node node))))) (when *reflexive-checks-p* (ensure-not-blocked node) (when (or (has-unexpanded-atomic-concepts-p node) (has-unexpanded-and-concepts-p node) (has-unexpanded-or-concepts-p node) (has-unexpanded-attribute-exists-concepts-p node)) (describe-object node t) (error "SELECT-SOME-CONCEPT: Strategy Error!")) (unless (has-unexpanded-some-concepts-p node) (error "No unexpanded some concepts!"))) (loop-over-node-unexpanded-some-concepts (some-concept node nil) (let ((score (get-some-score node some-concept))) (when (or (not best-score) (> score best-score)) (setf best-score score concept some-concept)))) (values concept best-score)))) (timed-defmethod select-some-concept ((abox abox) (strategy strategy) (language dl)) (let ((node nil) (best-score nil) (concept nil)) (loop-over-active-nodes (some-node abox nil) (when (has-unexpanded-some-concepts-p some-node nil) (multiple-value-bind (some-concept score) (select-some-concept1 some-node strategy language) (when (or (not best-score) (> score best-score)) (setf node some-node concept some-concept best-score score))))) (when node (announce "~%+++ Selected SOME CONCEPT ~A : ~A" node concept) (values concept node)))) (timed-defmethod select-some-concept ((abox abox1) (strategy strategy) (language dl)) (call-next-method)) (timed-defmethod select-some-concept ((abox abox) (strategy abox-saturation-strategy) (language dl)) (let ((node (get-oldest-node-with-unexpanded-some-concepts abox))) (when node (let ((concept (select-some-concept1 node strategy language))) (when node (announce "~%+++ Selected SOME CONCEPT ~A : ~A" node concept) (values concept node)))))) (timed-defmethod select-some-concept ((abox abox1) (strategy trace-strategy) (language dl)) (with-slots (active-nodes) abox (ensure-active-nodes-present) (let ((node (heap-peek active-nodes))) (when (and node (has-unexpanded-some-concepts-p node)) (let ((concept (select-some-concept1 node strategy language))) (announce "~%+++ Selected SOME CONCEPT ~A : ~A" node concept) (values concept node)))))) ;;; ;;; ;;; (timed-defmethod select-attribute-exists-concepts1 ((node abox-node) (strategy strategy) (language dl)) (let ((concept nil) (ae-concepts nil) (relevant-ae-concepts nil) (best-score nil) (abox (in-graph node))) (labels ((get-ae-score (node concept) (- (choice-point-counter abox) (maximum (get-choice-points concept :node node))))) (when *reflexive-checks-p* (ensure-not-blocked node) (when (or (has-unexpanded-atomic-concepts-p node) (has-unexpanded-and-concepts-p node) (has-unexpanded-or-concepts-p node)) (error "Strategy error - attribute-exists-rule!"))) ;;; ;;; ;;; (loop-over-node-unexpanded-attribute-exists-concepts (ae-concept node nil) (push ae-concept ae-concepts) (let ((score (get-ae-score node ae-concept))) (when (or (not best-score) (> score best-score)) (setf best-score score concept ae-concept)))) (push concept relevant-ae-concepts) ;;; ;;; ;;; (let ((found t)) (loop while found do (setf found nil) (let ((relevant-ae-concept (find-if #'(lambda (x) (some #'(lambda (y) (has-common-parent-feature (role x) (role y))) relevant-ae-concepts)) ae-concepts))) (when relevant-ae-concept (setf found t) (setf ae-concepts (delete relevant-ae-concept ae-concepts)) (push relevant-ae-concept relevant-ae-concepts))))) (setf relevant-ae-concepts (delete-duplicates relevant-ae-concepts)) (values concept relevant-ae-concepts best-score)))) (timed-defmethod select-attribute-exists-concepts ((abox abox) (strategy strategy) (language dl)) (let ((node nil) (best-score nil) (concept nil) (best-concepts nil)) (loop-over-active-nodes (ae-node abox nil) (when (has-unexpanded-attribute-exists-concepts-p ae-node nil) (multiple-value-bind (ae-concept relevant-ae-concepts score) (select-attribute-exists-concepts1 node strategy language) (when (or (not concept) (> score best-score)) (setf node ae-node concept ae-concept best-concepts relevant-ae-concepts best-score score))))) (when node (announce "~%+++ Selected group of ATTRIBUTE-EXISTS CONCEPTS ~A : ~A" node best-concepts) (values concept best-concepts node)))) (timed-defmethod select-attribute-exists-concepts ((abox abox1) (strategy strategy) (language dl)) (call-next-method)) (timed-defmethod select-attribute-exists-concepts ((abox abox) (strategy abox-saturation-strategy) (language dl)) (let ((node (get-oldest-node-with-unexpanded-attribute-exists-concepts abox))) (when node (multiple-value-bind (concept relevant-ae-concepts) (select-attribute-exists-concepts1 node strategy language) (announce "~%+++ Selected group of ATTRIBUTE-EXISTS CONCEPTS ~A : ~A" node relevant-ae-concepts) (values concept relevant-ae-concepts node))))) (timed-defmethod select-attribute-exists-concepts ((abox abox1) (strategy trace-strategy) (language dl)) (with-slots (active-nodes) abox (let ((node (heap-peek active-nodes))) (when (and node (has-unexpanded-attribute-exists-concepts-p node)) (multiple-value-bind (concept relevant-ae-concepts) (select-attribute-exists-concepts1 node strategy language) (announce "~%+++ Selected group of ATTRIBUTE-EXISTS CONCEPTS ~A : ~A" node relevant-ae-concepts) (values concept relevant-ae-concepts node)))))) ;;; ;;; ;;; (timed-defmethod select-at-least-concept1 ((node abox-node) (strategy strategy) (language dl)) (let ((concept nil) (best-score nil) (abox (in-graph node))) (labels ((get-at-least-score (node concept) (- (choice-point-counter abox) (maximum (get-choice-points concept :node node))))) (when *reflexive-checks-p* (ensure-not-blocked node) (when (has-unexpanded-some-concepts-p node) (error "SELECT-AT-LEAST-CONCEPT: Strategy Error!"))) (loop-over-node-unexpanded-at-least-concepts (at-least-concept node nil) (let ((score (get-at-least-score node at-least-concept))) (when (or (not best-score) (> score best-score)) (setf best-score score concept at-least-concept)))) (values concept best-score)))) (timed-defmethod select-at-least-concept ((abox abox) (strategy strategy) (language dl)) (let ((node nil) (best-score nil) (concept nil)) (loop-over-active-nodes (at-least-node abox nil) (when (has-unexpanded-at-least-concepts-p at-least-node nil) (multiple-value-bind (at-least-concept score) (select-at-least-concept1 at-least-node strategy language) (when (or (not concept) (> score best-score)) (setf node at-least-node concept at-least-concept best-score score))))) (when node (announce "~%+++ Selected AT LEAST CONCEPT ~A : ~A" node concept) (values concept node)))) (timed-defmethod select-at-least-concept ((abox abox1) (strategy strategy) (language dl)) (call-next-method)) (timed-defmethod select-at-least-concept ((abox abox) (strategy abox-saturation-strategy) (language dl)) (let ((node (get-oldest-node-with-unexpanded-at-least-concepts abox))) (when node (let ((concept (select-at-least-concept1 node strategy language))) (when node (announce "~%+++ Selected AT LEAST CONCEPT ~A : ~A" node concept) (values concept node)))))) (timed-defmethod select-at-least-concept ((abox abox1) (strategy trace-strategy) (language dl)) (with-slots (active-nodes) abox (let ((node (heap-peek active-nodes))) (when (and node (has-unexpanded-at-least-concepts-p node)) (let ((concept (select-at-least-concept1 node strategy language))) (when node (announce "~%+++ Selected AT LEAST CONCEPT ~A : ~A" node concept) (values concept node))))))) ;;; ;;; ;;; (timed-defmethod select-violated-at-most-concept ((abox abox) (strategy strategy) (language dl)) (loop-over-active-nodes (node abox) (when (has-unexpanded-at-most-concepts-p node) ;;; kleinstes (at-most n R) pro Rolle R raussuchen (let ((role-n-entries nil)) (loop-over-node-unexpanded-at-most-concepts (at-most-concept node) (unless (is-top-concept-p (qualification at-most-concept)) (error "To be implemented!")) (let ((role-n (assoc (role at-most-concept) role-n-entries))) (if role-n (setf (second role-n) (if (< (n at-most-concept) (n (second role-n))) at-most-concept (second role-n))) (push (list (role at-most-concept) at-most-concept) role-n-entries)))) ;;; (dolist (role-n role-n-entries) (let* ((role (first role-n)) (at-most-concept (second role-n)) (n (n at-most-concept)) (m 0) (edges nil)) (loop-over-role-successors (node role) (succ edge) ;;; (format t "~% ~A ~A ~A ~A" node role succ edge) (if (eq node (from edge)) (unless (zerop (multiplicity edge)) (push edge edges) (incf m (multiplicity edge))) (unless (zerop (inverse-multiplicity edge)) (push edge edges) (incf m (inverse-multiplicity edge))))) (when (> m n) (announce "~%+++ Selected violated AT-MOST CONCEPT ~A : ~A" node at-most-concept) (announce "~%+++ Edges found: ~A" edges) (return-from select-violated-at-most-concept (values at-most-concept node edges m)))))))))
22,420
Common Lisp
.lisp
414
34.835749
117
0.535395
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
0125bf2f6c01363c258eba8a2992df7480bf2d50e75c9fb926ab3b6e6135e83d
12,579
[ -1 ]
12,580
alci-ra-jepd-prover.lisp
lambdamikel_DLMAPS/src/prover/alci-ra-jepd-prover.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (eval-when (:compile-toplevel :load-toplevel :execute) (defpersistentclass jepd-abox (rolebox-abox jepd-substrate))) (defmethod get-language ((abox jepd-abox)) +alci-ra-jepd+) ;;; ;;; ;;; (eval-when (:compile-toplevel :load-toplevel :execute) (defpersistentclass jepd-abox-edge (jepd-substrate-edge rolebox-abox-edge))) ;;; ;;; ;;; (defmethod get-standard-edge-description-class ((abox jepd-abox)) 'jepd-edge-label) (eval-when (:compile-toplevel :load-toplevel :execute) (defpersistentclass jepd-edge-label (edge-label))) (defmethod initialize-description ((description jepd-edge-label)) (labels ((check-role (role) (if (and (typep role 'role) (not (or (typep role 'simple-role) (typep role 'or-role)))) (error "Can't use role ~A for a JEPD abox!" (textual-description description)) role))) (let ((role (textual-description description))) (check-role role) (unless (typep role 'role) (setf (textual-description description) (check-role (parse-role role))))) description)) ;;; ;;; ;;; (defmethod get-standard-node-class ((jepd-abox jepd-abox)) 'jepd-abox-node) (defmethod get-standard-edge-class ((jepd-abox jepd-abox)) 'jepd-abox-edge) ;;; ;;; ;;; (eval-when (:compile-toplevel :load-toplevel :execute) (defpersistentclass jepd-abox-node (rolebox-abox-node jepd-substrate-node))) (defun jepd-abox-node-p (x) (typep x 'jepd-abox-node)) ;;; ;;; ;;; (defmethod role-consistent-p ((abox jepd-abox) &rest args) (declare (ignore args)) (consistent-p abox :check-node-labels-p nil ; macht keinen Sinn! :check-edge-labels-p nil ; nur die Frame-Conditions checken! )) (defmethod make-and-description ((descr role) &key descriptions) (let ((descr (mapcar #'textual-description (reduce #'intersection (append (mapcar #'list (remove-if #'or-role-p (cons descr descriptions))) (mapcar #'arguments (remove-if-not #'or-role-p (cons descr descriptions)))))))) (when descr (parse-role `(or ,@descr))))) (defmethod get-implied-label ((edge jepd-abox-edge) &key &allow-other-keys) (if (reflexive-edge-p edge) (description edge) (if (get-choice-points edge) (description edge) ;; fresh edge, added by "add missing edges"! (with-slots (rbox) (in-graph edge) (let* ((support (remove-if #'(lambda (x) (or (member edge x) (some #'reflexive-edge-p x))) (get-support edge))) (comps (mapcar #'(lambda (supp) (list (lookup rbox (first supp) (second supp)) supp)) support)) (old-label (textual-description (description edge))) (relevant-comps-and-support (remove-if #'(lambda (x) (let ((rx (first x))) (or (implies-p old-label rx) (some #'(lambda (y) (let ((ry (first y))) (and (implies-p ry rx) (not (eq ry rx))))) comps)))) comps))) (if (not relevant-comps-and-support) (description edge) (let ((relevant-support (apply #'append (mapcar #'second relevant-comps-and-support))) (new-label (make-and-description ;;; ineffizient!!! old-label :descriptions (mapcar #'(lambda (comp) (change-textual-description (copy (description edge)) comp)) (mapcar #'first relevant-comps-and-support))))) (unless new-label (return-from get-implied-label (values nil (remove-duplicates relevant-support)))) (change-textual-description (description edge) new-label) (when *debug-p* (format t "*** REGISTERING SUPPORT FOR ~A: ~A!~%" edge relevant-comps-and-support)) (register-as-unexpanded edge :depends-on (apply #'append (mapcar #'second relevant-comps-and-support))) (description edge)))))))) ;;; ;;; ;;; (defrule abox-completion (alci-ra-jepd jepd-abox) (announce "Adding missing edges on level ~A" level) (add-missing-edges abox) (multiple-value-bind (abox clash-reasons) (compute-minimal-label abox) (unless abox (when *debug-p* (format t "*** COMPUTE-MINIMAL-LABEL ON LEVEL ~A RETURNED NIL! CLASH-REASONS: ~A!~%" level clash-reasons) (format t " RETURNING CHOICE POINTS ~A!~%~%" (mapcar #'get-choice-points clash-reasons))) (return-from prover (values nil (apply #'append (mapcar #'get-choice-points clash-reasons))))) (when *debug-p* (format t "*** ABOX EDGES AFTER COMPUTE-MINIMAL-LABEL ON LEVEL ~A:~%" level) (describe-object abox t)) +insert-body-code+ )) ;;; ;;; ;;; (defmethod add-missing-edges ((abox jepd-abox) &key &allow-other-keys) (apply #'call-next-method abox :edge-constructor #'(lambda (from to) (create-edge abox from to (make-edge-description (get-standard-edge-description-class abox) (cons 'or (full-disjunctive-role (substrate-rbox abox)))) :depends-on (append (created-by from) (created-by to)) :register-choice-points-p nil :create-inverse-p t)) nil)) ;;; ;;; ;;; (define-prover ((abox-sat alci-ra-jepd jepd-abox)) (:init (start-main)) (:main (perform (abox-completion) (:body (perform (abox-enumeration) (:body (perform (deterministic-expansion) (:body (if clashes (handle-clashes) (perform (or-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (perform (some-expansion) (:positive (if clashes (handle-clashes) (restart-main))) (:negative (success))))))))) (:after-successful-clash-repair (restart-main)))))) (:success (completion-found))) #| (progn (with-rbox (rcc5-rolebox) (with-tbox (test) (with-abox (test :delete-if-exists-p t) (ins a (and a (all dr (not b)) (all po (not b)) (all ppi (not b)) (all pp (not b)) (all eq (not c)))) (ins b b) (true! (abox-sat-p *cur-abox*)) (ins b c) (false! (abox-sat-p *cur-abox*)))))) (with-rbox (rcc5-rolebox) (with-tbox (test) (with-abox (test :delete-if-exists-p t) (ins a a) (ins b b) (true! (abox-sat-p *cur-abox*))))) (with-rbox (rcc5-rolebox) (with-tbox (test) (with-abox (test :delete-if-exists-p t) (ins a A) (ins b b) (ins c c) (rel a b pp) (rel b c pp) (rel a c (or dr ppi)) (false! (abox-sat-p *cur-abox*))))) (with-rbox (rcc5-rolebox) (with-tbox (test) (with-abox (test :delete-if-exists-p t) (ins a a) (ins b b) (ins c c) (rel a b pp) (rel b c pp) (rel a c (or po ppi eq eq pp)) (true! (abox-sat-p *cur-abox*))))) (progn (delete-all-tboxes) (with-rbox (rcc5-rolebox) (with-tbox (meta :delete-if-exists-p t) (def* linear-time (and (all dr bottom) (all ec bottom) (all po bottom) (all ppi linear-time) (all pp linear-time))) (def* dense (=> (some ppi top) (some ppi (some ppi top)))) (def* right-bounded (some ppi (and last-node (all ppi bottom)))) (def* left-bounded (some pp (and first-node (all pp bottom)))) (def* left-unbounded (all pp (some pp top))) (def* right-unbounded (all ppi (some ppi top))) (with-abox (test :delete-if-exists-p t) (ins a (and linear-time (some ppi (some ppi (some ppi (some ppi c)))) (some ppi (some ppi (some ppi (some ppi (some ppi (some ppi (some ppi (some ppi (some ppi (some ppi d)))))))))) left-bounded right-bounded)) (time (true! (abox-sat? test #+:clim :completion-found-hook #+:clim #'(lambda (x) (visualize (reorder-ppi x))) :debug-p nil))))))) (with-rbox (rcc5-rolebox) (with-tbox (test :delete-if-exists-p t) (with-abox (test :delete-if-exists-p t) (ins a a) (ins b b) (ins c c) (rel a b pp) (rel b c pp) (ins c (all (inv pp) (not a))) (false! (abox-Sat-p *cur-abox*))))) |#
10,591
Common Lisp
.lisp
280
23.932143
113
0.477897
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
ef047b62b9b038a1c76c8d9e81712040b48de5a45881b64b71f934e6839b367a
12,580
[ -1 ]
12,581
galen-2.lisp
lambdamikel_DLMAPS/src/prover/KBs/galen-2.lisp
(define-primitive-role R1) (define-primitive-role R2) (define-primitive-role R3) (define-primitive-role R4) (define-primitive-role R5) (define-primitive-role R6) (define-primitive-role R7) (define-primitive-role R8) (define-primitive-role R9) (define-primitive-role R10) (define-primitive-role R11) (define-primitive-role R12) (define-primitive-role R13) (define-primitive-role R14) (define-primitive-role R15) (define-primitive-role R16) (define-primitive-role R17) (define-primitive-role R18) (define-primitive-role R19) (define-primitive-role R20) (define-primitive-role R21) (define-primitive-role R22) (define-primitive-role R23) (define-primitive-role R24) (define-primitive-role R25) (define-primitive-role R26) (define-primitive-role R27) (define-primitive-role R28) (define-primitive-role R29) (define-primitive-role R30) (define-primitive-role R31) (define-primitive-role R32) (define-primitive-role R33) (define-primitive-role R34) (define-primitive-role R35) (define-primitive-role R36) (define-primitive-role R37) (define-primitive-role R38) (define-primitive-role R39) (define-primitive-role R40) (define-primitive-role R41) (define-primitive-role R42) (define-primitive-role R43) (define-primitive-role R44) (define-primitive-role R45) (define-primitive-role R46) (define-primitive-role R47) (define-primitive-role R48) (define-primitive-role R49) (define-primitive-role R50) (define-primitive-role R51) (define-primitive-role R52) (define-primitive-role R53) (define-primitive-role R54) (define-primitive-role R55) (define-primitive-role R56) (define-primitive-role R57) (define-primitive-role R58) (define-primitive-role R59) (define-primitive-role R60) (define-primitive-role R61) (define-primitive-role R62) (define-primitive-role R63) (define-primitive-role R64) (define-primitive-role R65) (define-primitive-role R66) (define-primitive-role R67) (define-primitive-role R68) (define-primitive-role R69) (define-primitive-role R70) (define-primitive-role R71) (define-primitive-role R72) (define-primitive-role R73) (define-primitive-role R74) (define-primitive-role R75) (define-primitive-role R76) (define-primitive-role R77) (define-primitive-role R78) (define-primitive-role R79) (define-primitive-role R80) (define-primitive-role R81) (define-primitive-role R82) (define-primitive-role R83) (define-primitive-role R84) (define-primitive-role R85) (define-primitive-role R86) (define-primitive-role R87) (define-primitive-role R88) (define-primitive-role R89) (define-primitive-role R90) (define-primitive-role R91) (define-primitive-role R92) (define-primitive-role R93) (define-primitive-role R94) (define-primitive-role R95) (define-primitive-role R96) (define-primitive-role R97) (define-primitive-role R98) (define-primitive-role R99) (define-primitive-role R100) (define-primitive-role R101) (define-primitive-role R102) (define-primitive-role R103) (define-primitive-role R104) (define-primitive-role R105) (define-primitive-role R106) (define-primitive-role R107) (define-primitive-role R108) (define-primitive-role R109) (define-primitive-role R110) (define-primitive-role R111) (define-primitive-role R112) (define-primitive-role R113) (define-primitive-role R114) (define-primitive-role R115) (define-primitive-role R116) (define-primitive-role R117) (define-primitive-role R118) (define-primitive-role R119) (define-primitive-role R120) (define-primitive-role R121) (define-primitive-role R122) (define-primitive-role R123) (define-primitive-role R124) (define-primitive-role R125) (define-primitive-role R126) (define-primitive-role R127) (define-primitive-role R128) (define-primitive-role R129) (define-primitive-role R130) (define-primitive-role R131) (define-primitive-role R132) (define-primitive-role R133) (define-primitive-role R134) (define-primitive-role R135) (define-primitive-role R136) (define-primitive-role R137) (define-primitive-role R138) (define-primitive-role R139) (define-primitive-role R140) (define-primitive-role R141) (define-primitive-role R142) (define-primitive-role R143) (define-primitive-role R144) (define-primitive-role R145) (define-primitive-role R146) (define-primitive-role R147) (define-primitive-role R148) (define-primitive-role R149) (define-primitive-role R150) (define-primitive-role R151) (define-primitive-role R152) (define-primitive-role R153) (define-primitive-role R154) (define-primitive-role R155) (define-primitive-role R156) (define-primitive-role R157) (define-primitive-role R158) (define-primitive-role R159) (define-primitive-role R160) (define-primitive-role R161) (define-primitive-role R162) (define-primitive-role R163) (define-primitive-role R164) (define-primitive-role R165) (define-primitive-role R166) (define-primitive-role R167) (define-primitive-role R168) (define-primitive-role R169) (define-primitive-role R170) (define-primitive-role R171) (define-primitive-role R172) (define-primitive-role R173) (define-primitive-role R174) (define-primitive-role R175) (define-primitive-role R176) (define-primitive-role R177) (define-primitive-role R178) (define-primitive-role R179) (define-primitive-role R180) (define-primitive-role R181) (define-primitive-role R182) (define-primitive-role R183) (define-primitive-role R184) (define-primitive-role R185) (define-primitive-role R186) (define-primitive-role R187) (define-primitive-role R188) (define-primitive-role R189) (define-primitive-role R190) (define-primitive-role R191) (define-primitive-role R192) (define-primitive-role R193) (define-primitive-role R194) (define-primitive-role R195) (define-primitive-role R196) (define-primitive-role R197) (define-primitive-role R198) (define-primitive-role R199) (define-primitive-role R200) (define-primitive-role R201) (define-primitive-role R202) (define-primitive-role R203) (define-primitive-role R204) (define-primitive-role R205) (define-primitive-role R206) (define-primitive-role R207) (define-primitive-role R208) (define-primitive-role R209) (define-primitive-role R210) (define-primitive-role R211) (define-primitive-role R212) (define-primitive-role R213) (define-primitive-role R214) (define-primitive-role R215) (define-primitive-role R216) (define-primitive-role R217) (define-primitive-role R218) (define-primitive-role R219) (define-primitive-role R220) (define-primitive-role R221) (define-primitive-role R222) (define-primitive-role R223) (define-primitive-role R224) (define-primitive-role R225) (define-primitive-role R226) (define-primitive-role R227) (define-primitive-role R228) (define-primitive-role R229) (define-primitive-role R230) (define-primitive-role R231) (define-primitive-role R232) (define-primitive-role R233) (define-primitive-role R234) (define-primitive-role R235) (define-primitive-role R236) (define-primitive-role R237) (define-primitive-role R238) (define-primitive-role R239) (define-primitive-role R240) (define-primitive-role R241) (define-primitive-role R242) (define-primitive-role R243) (define-primitive-role R244) (define-primitive-role R245) (define-primitive-role R246) (define-primitive-role R247) (define-primitive-role R248) (define-primitive-role R249) (define-primitive-role R250) (define-primitive-role R251) (define-primitive-role R252) (define-primitive-role R253) (define-primitive-role R254) (define-primitive-role R255) (define-primitive-role R256) (define-primitive-role R257) (define-primitive-role R258) (define-primitive-role R259) (define-primitive-role R260) (define-primitive-role R261) (define-primitive-role R262) (define-primitive-role R263) (define-primitive-role R264) (define-primitive-role R265) (define-primitive-role R266) (define-primitive-role R267) (define-primitive-role R268) (define-primitive-role R269) (define-primitive-role R270) (define-primitive-role R271) (define-primitive-role R272) (define-primitive-role R273) (define-primitive-role R274) (define-primitive-role R275) (define-primitive-role R276) (define-primitive-role R277) (define-primitive-role R278) (define-primitive-role R279) (define-primitive-role R280) (define-primitive-role R281) (define-primitive-role R282) (define-primitive-role R283) (define-primitive-role R284) (define-primitive-role R285) (define-primitive-role R286) (define-primitive-role R287) (define-primitive-role R288) (define-primitive-role R289) (define-primitive-role R290) (define-primitive-role R291) (define-primitive-role R292) (define-primitive-role R293) (define-primitive-role R294) (define-primitive-role R295) (define-primitive-role R296) (define-primitive-role R297) (define-primitive-role R298) (define-primitive-role R299) (define-primitive-role R300) (define-primitive-role R301) (define-primitive-role R302) (define-primitive-role R303) (define-primitive-role R304) (define-primitive-role R305) (define-primitive-role R306) (define-primitive-role R307) (define-primitive-role R308) (define-primitive-role R309) (define-primitive-role R310) (define-primitive-role R311) (define-primitive-role R312) (define-primitive-role R313) (define-primitive-role R314) (define-primitive-role R315) (define-primitive-role R316) (define-primitive-role R317) (define-primitive-role R318) (define-primitive-role R319) (define-primitive-role R320) (define-primitive-role R321) (define-primitive-role R322) (define-primitive-role R323) (define-primitive-role R324) (define-primitive-role R325) (define-primitive-role R326) (define-primitive-role R327) (define-primitive-role R328) (define-primitive-role R329) (define-primitive-role R330) (define-primitive-role R331) (define-primitive-role R332) (define-primitive-role R333) (define-primitive-role R334) (define-primitive-role R335) (define-primitive-role R336) (define-primitive-role R337) (define-primitive-role R338) (define-primitive-role R339) (define-primitive-role R340) (define-primitive-role R341) (define-primitive-role R342) (define-primitive-role R343) (define-primitive-role R344) (define-primitive-role R345) (define-primitive-role R346) (define-primitive-role R347) (define-primitive-role R348) (define-primitive-role R349) (define-primitive-role R350) (define-primitive-role R351) (define-primitive-role R352) (define-primitive-role R353) (define-primitive-role R354) (define-primitive-role R355) (define-primitive-role R356) (define-primitive-role R357) (define-primitive-role R358) (define-primitive-role R359) (define-primitive-role R360) (define-primitive-role R361) (define-primitive-role R362) (define-primitive-role R363) (define-primitive-role R364) (define-primitive-role R365) (define-primitive-role R366) (define-primitive-role R367) (define-primitive-role R368) (define-primitive-role R369) (define-primitive-role R370) (define-primitive-role R371) (define-primitive-role R372) (define-primitive-role R373) (define-primitive-role R374) (define-primitive-role R375) (define-primitive-role R376) (define-primitive-role R377) (define-primitive-role R378) (define-primitive-role R379) (define-primitive-role R380) (define-primitive-role R381) (define-primitive-role R382) (define-primitive-role R383) (define-primitive-role R384) (define-primitive-role R385) (define-primitive-role R386) (define-primitive-role R387) (define-primitive-role R388) (define-primitive-role R389) (define-primitive-role R390) (define-primitive-role R391) (define-primitive-role R392) (define-primitive-role R393) (define-primitive-role R394) (define-primitive-role R395) (define-primitive-role R396) (define-primitive-role R397) (define-primitive-role R398) (define-primitive-role R399) (define-primitive-role R400) (define-primitive-role R401) (define-primitive-role R402) (define-primitive-role R403) (define-primitive-role R404) (define-primitive-role R405) (define-primitive-role R406) (define-primitive-role R407) (define-primitive-role R408) (define-primitive-role R409) (define-primitive-role R410) (define-primitive-role R411) (define-primitive-role R412) (define-primitive-role R413) (define-primitive-concept C1) (define-primitive-concept C2) (define-primitive-concept C3) (define-primitive-concept C4 C1) (define-primitive-concept C5 C4) (define-primitive-concept C6 C5) (define-primitive-concept C7 C4) (define-primitive-concept C8 C7) (define-primitive-concept C9 C8) (define-primitive-concept C10 C9) (define-primitive-concept C11 C9) (define-primitive-concept C12 C11) (define-primitive-concept C13 C11) (define-primitive-concept C14 C9) (define-primitive-concept C15 C9) (define-primitive-concept C16 C8) (define-primitive-concept C17 C7) (define-primitive-concept C18 C17) (define-primitive-concept C19 C17) (define-primitive-concept C20 C17) (define-primitive-concept C21 C20) (define-primitive-concept C22 C21) (define-primitive-concept C23 C21) (define-primitive-concept C24 C21) (define-primitive-concept C25 C21) (define-primitive-concept C26 C20) (define-primitive-concept C27 (AND C21 C26)) (define-primitive-concept C28 C4) (define-primitive-concept C29 C28) (define-primitive-concept C30 C29) (define-primitive-concept C31 C29) (define-primitive-concept C32 C4) (define-primitive-concept C33 C32) (define-primitive-concept C34 C32) (define-primitive-concept C35 C32) (define-primitive-concept C36 C32) (define-primitive-concept C37 C32) (define-primitive-concept C38 C37) (define-primitive-concept C39 C37) (define-primitive-concept C40 C39) (define-primitive-concept C41 C32) (define-primitive-concept C42 C41) (define-primitive-concept C43 C5) (define-primitive-concept C44 C43) (define-primitive-concept C45 C43) (define-primitive-concept C46 C43) (define-primitive-concept C47 C5) (define-primitive-concept C48 C47) (define-primitive-concept C49 C48) (define-primitive-concept C50 C48) (define-primitive-concept C51 C47) (define-primitive-concept C52 C51) (define-primitive-concept C53 C51) (define-primitive-concept C54 C5) (define-primitive-concept C55 C54) (define-primitive-concept C56 C54) (define-primitive-concept C57 C56) (define-primitive-concept C58 C5) (define-primitive-concept C59 C58) (define-primitive-concept C60 C59) (define-primitive-concept C61 C60) (define-primitive-concept C62 C61) (define-primitive-concept C63 C58) (define-primitive-concept C64 C63) (define-primitive-concept C65 C64) (define-primitive-concept C66 C4) (define-primitive-concept C67 C20) (define-primitive-concept C68 (AND C66 C67)) (define-primitive-concept C69 C46) (define-primitive-concept C70 C69) (define-primitive-concept C71 C70) (define-primitive-concept C72 C70) (define-primitive-concept C73 C46) (define-primitive-concept C74 C73) (define-primitive-concept C75 C74) (define-primitive-concept C76 C75) (define-primitive-concept C77 C75) (define-primitive-concept C78 C77) (define-primitive-concept C79 C78) (define-primitive-concept C80 C74) (define-primitive-concept C81 C73) (define-primitive-concept C82 C81) (define-primitive-concept C83 C81) (define-primitive-concept C84 C83) (define-primitive-concept C85 C83) (define-primitive-concept C86 C46) (define-primitive-concept C87 C46) (define-primitive-concept C88 C87) (define-primitive-concept C89 C88) (define-primitive-concept C90 C89) (define-primitive-concept C91 C89) (define-primitive-concept C92 C87) (define-primitive-concept C93 C92) (define-primitive-concept C94 C93) (define-primitive-concept C95 C94) (define-primitive-concept C96 C94) (define-primitive-concept C97 C94) (define-primitive-concept C98 C93) (define-primitive-concept C99 C92) (define-primitive-concept C100 C99) (define-primitive-concept C101 C99) (define-primitive-concept C102 C46) (define-concept C103 (AND C4 (SOME R178 C100))) (define-concept C104 (AND C4 (SOME R182 C94))) (define-primitive-concept C105 C15) (define-primitive-concept C106 C15) (define-primitive-concept C107 C15) (define-primitive-concept C108 C15) (define-primitive-concept C109 C15) (define-primitive-concept C110 C15) (define-primitive-concept C111 C110) (define-primitive-concept C112 C110) (define-primitive-concept C113 C110) (define-primitive-concept C114 C110) (define-primitive-concept C115 C14) (define-primitive-concept C116 C14) (define-primitive-concept C117 C16) (define-primitive-concept C118 C16) (define-primitive-concept C119 C16) (define-primitive-concept C120 C16) (define-primitive-concept C121 C16) (define-primitive-concept C122 C16) (define-primitive-concept C123 C16) (define-primitive-concept C124 C16) (define-primitive-concept C125 C124) (define-primitive-concept C126 C16) (define-primitive-concept C127 C126) (define-primitive-concept C128 C126) (define-primitive-concept C129 C16) (define-primitive-concept C130 C16) (define-primitive-concept C131 C130) (define-primitive-concept C132 C130) (define-primitive-concept C133 C130) (define-primitive-concept C134 C18) (define-primitive-concept C135 C24) (define-primitive-concept C136 (AND C19 C135)) (define-primitive-concept C137 C136) (define-primitive-concept C138 C136) (define-primitive-concept C139 C136) (define-primitive-concept C140 C19) (define-primitive-concept C141 C140) (define-primitive-concept C142 C140) (define-primitive-concept C143 C140) (define-primitive-concept C144 C140) (define-primitive-concept C145 C26) (define-primitive-concept C146 C145) (define-primitive-concept C147 C20) (define-primitive-concept C148 C147) (define-primitive-concept C149 C147) (define-primitive-concept C150 C147) (define-primitive-concept C151 C22) (define-primitive-concept C152 C22) (define-primitive-concept C153 C24) (define-primitive-concept C154 C25) (define-primitive-concept C155 C25) (define-primitive-concept C156 C25) (define-primitive-concept C157 C25) (define-primitive-concept C158 (AND C27 C145)) (define-primitive-concept C159 (AND C158 C146)) (define-primitive-concept C160 C158) (define-primitive-concept C161 C160) (define-primitive-concept C162 C158) (define-primitive-concept C163 C162) (define-primitive-concept C164 C20) (define-primitive-concept C165 C164) (define-primitive-concept C166 C164) (define-primitive-concept C167 C20) (define-primitive-concept C168 C167) (define-primitive-concept C169 C167) (define-primitive-concept C170 C168) (define-primitive-concept C171 C168) (define-primitive-concept C172 C169) (define-primitive-concept C173 C67) (define-primitive-concept C174 C173) (define-primitive-concept C175 C174) (define-primitive-concept C176 C174) (define-primitive-concept C177 C174) (define-primitive-concept C178 C174) (define-primitive-concept C179 C174) (define-primitive-concept C180 C174) (define-primitive-concept C181 C173) (define-primitive-concept C182 C181) (define-primitive-concept C183 C182) (define-primitive-concept C184 C182) (define-primitive-concept C185 C182) (define-primitive-concept C186 C181) (define-primitive-concept C187 C181) (define-primitive-concept C188 C181) (define-primitive-concept C189 C181) (define-primitive-concept C190 C181) (define-primitive-concept C191 C181) (define-primitive-concept C192 C181) (define-primitive-concept C193 C173) (define-primitive-concept C194 C193) (define-primitive-concept C195 C193) (define-primitive-concept C196 C193) (define-primitive-concept C197 C67) (define-primitive-concept C198 C67) (define-primitive-concept C199 C67) (define-primitive-concept C200 C20) (define-primitive-concept C201 C20) (define-primitive-concept C202 C201) (define-primitive-concept C203 C30) (define-primitive-concept C204 C30) (define-primitive-concept C205 C28) (define-primitive-concept C206 C205) (define-primitive-concept C207 C205) (define-primitive-concept C208 C205) (define-primitive-concept C209 C35) (define-primitive-concept C210 C35) (define-primitive-concept C211 C35) (define-primitive-concept C212 C36) (define-primitive-concept C213 C36) (define-primitive-concept C214 C36) (define-primitive-concept C215 C36) (define-primitive-concept C216 C37) (define-primitive-concept C217 C37) (define-primitive-concept C218 C40) (define-primitive-concept C219 C41) (define-primitive-concept C220 C5) (define-primitive-concept C221 C220) (define-primitive-concept C222 C220) (define-primitive-concept C223 C6) (define-primitive-concept C224 C223) (define-primitive-concept C225 C224) (define-primitive-concept C226 C224) (define-primitive-concept C227 C224) (define-primitive-concept C228 C224) (define-primitive-concept C229 C224) (define-primitive-concept C230 C224) (define-primitive-concept C231 C224) (define-primitive-concept C232 C224) (define-primitive-concept C233 C224) (define-primitive-concept C234 C224) (define-primitive-concept C235 C224) (define-primitive-concept C236 C223) (define-primitive-concept C237 C236) (define-primitive-concept C238 C236) (define-primitive-concept C239 C236) (define-primitive-concept C240 C236) (define-primitive-concept C241 C236) (define-primitive-concept C242 C236) (define-primitive-concept C243 C236) (define-primitive-concept C244 C236) (define-primitive-concept C245 C236) (define-primitive-concept C246 C223) (define-primitive-concept C247 C246) (define-primitive-concept C248 C223) (define-primitive-concept C249 C248) (define-primitive-concept C250 C248) (define-primitive-concept C251 C248) (define-primitive-concept C252 C248) (define-primitive-concept C253 C248) (define-primitive-concept C254 C248) (define-primitive-concept C255 C248) (define-primitive-concept C256 C248) (define-primitive-concept C257 C248) (define-primitive-concept C258 C223) (define-primitive-concept C259 C258) (define-primitive-concept C260 C258) (define-primitive-concept C261 C258) (define-primitive-concept C262 C223) (define-primitive-concept C263 C262) (define-primitive-concept C264 C262) (define-primitive-concept C265 C262) (define-primitive-concept C266 C262) (define-primitive-concept C267 C262) (define-primitive-concept C268 C262) (define-primitive-concept C269 C262) (define-primitive-concept C270 C262) (define-primitive-concept C271 C262) (define-primitive-concept C272 C262) (define-primitive-concept C273 C6) (define-primitive-concept C274 C273) (define-primitive-concept C275 C273) (define-primitive-concept C276 C275) (define-primitive-concept C277 C275) (define-primitive-concept C278 C275) (define-primitive-concept C279 C275) (define-primitive-concept C280 C273) (define-primitive-concept C281 C280) (define-primitive-concept C282 C280) (define-primitive-concept C283 C280) (define-primitive-concept C284 C280) (define-primitive-concept C285 C280) (define-primitive-concept C286 C280) (define-primitive-concept C287 C280) (define-primitive-concept C288 C280) (define-primitive-concept C289 C280) (define-primitive-concept C290 C280) (define-primitive-concept C291 C280) (define-primitive-concept C292 C280) (define-primitive-concept C293 C273) (define-primitive-concept C294 C273) (define-primitive-concept C295 C273) (define-primitive-concept C296 C273) (define-primitive-concept C297 C273) (define-primitive-concept C298 C273) (define-primitive-concept C299 C273) (define-primitive-concept C300 C68) (define-primitive-concept C301 C68) (define-primitive-concept C302 C68) (define-primitive-concept C303 C68) (define-primitive-concept C304 C66) (define-primitive-concept C305 C304) (define-primitive-concept C306 C304) (define-primitive-concept C307 C66) (define-primitive-concept C308 (AND C66 C307)) (define-primitive-concept C309 C2) (define-primitive-concept C310 C309) (define-primitive-concept C311 C309) (define-primitive-concept C312 C309) (define-primitive-concept C313 C309) (define-primitive-concept C314 C309) (define-primitive-concept C315 C309) (define-primitive-concept C316 C309) (define-primitive-concept C317 C309) (define-primitive-concept C318 C309) (define-primitive-concept C319 C309) (define-primitive-concept C320 C309) (define-primitive-concept C321 C309) (define-primitive-concept C322 C309) (define-primitive-concept C323 C309) (define-primitive-concept C324 C309) (define-primitive-concept C325 C153) (define-primitive-concept C326 (AND C325 C157)) (define-primitive-concept C327 C153) (define-primitive-concept C328 (AND C327 C157)) (define-primitive-concept C329 C153) (define-primitive-concept C330 (AND C329 C157)) (define-primitive-concept C331 C153) (define-primitive-concept C332 (AND C331 C157)) (define-primitive-concept C333 C153) (define-primitive-concept C334 (AND C333 C157)) (define-primitive-concept C335 C153) (define-primitive-concept C336 (AND C335 C157)) (define-primitive-concept C337 C153) (define-primitive-concept C338 (AND C337 C157)) (define-primitive-concept C339 C153) (define-primitive-concept C340 (AND C339 C157)) (define-primitive-concept C341 C153) (define-primitive-concept C342 (AND C341 C157)) (define-primitive-concept C343 C153) (define-primitive-concept C344 (AND C343 C157)) (define-primitive-concept C345 C153) (define-primitive-concept C346 (AND C345 C157)) (define-primitive-concept C347 C153) (define-primitive-concept C348 C153) (define-primitive-concept C349 C153) (define-primitive-concept C350 C153) (define-primitive-concept C351 C153) (define-primitive-concept C352 C153) (define-primitive-concept C353 C153) (define-primitive-concept C354 C153) (define-primitive-concept C355 C153) (define-primitive-concept C356 C153) (define-primitive-concept C357 C153) (define-primitive-concept C358 C153) (define-primitive-concept C359 C153) (define-primitive-concept C360 C153) (define-primitive-concept C361 C153) (define-primitive-concept C362 C153) (define-primitive-concept C363 C156) (define-primitive-concept C364 C156) (define-primitive-concept C365 C156) (define-primitive-concept C366 C156) (define-primitive-concept C367 C156) (define-primitive-concept C368 C156) (define-primitive-concept C369 C156) (define-primitive-concept C370 C156) (define-primitive-concept C371 C156) (define-primitive-concept C372 C156) (define-primitive-concept C373 C156) (define-primitive-concept C374 C156) (define-primitive-concept C375 C156) (define-primitive-concept C376 C156) (define-primitive-concept C377 C154) (define-primitive-concept C378 C377) (define-primitive-concept C379 C377) (define-primitive-concept C380 C377) (define-primitive-concept C381 C377) (define-primitive-concept C382 C377) (define-primitive-concept C383 C377) (define-primitive-concept C384 C154) (define-primitive-concept C385 C384) (define-primitive-concept C386 C384) (define-primitive-concept C387 C384) (define-primitive-concept C388 C384) (define-primitive-concept C389 C384) (define-primitive-concept C390 C154) (define-primitive-concept C391 C390) (define-primitive-concept C392 C154) (define-primitive-concept C393 (AND C390 C392)) (define-primitive-concept C394 C390) (define-primitive-concept C395 C390) (define-primitive-concept C396 C390) (define-primitive-concept C397 C390) (define-primitive-concept C398 C154) (define-primitive-concept C399 C398) (define-primitive-concept C400 C398) (define-primitive-concept C401 C398) (define-primitive-concept C402 C398) (define-primitive-concept C403 C398) (define-primitive-concept C404 C392) (define-primitive-concept C405 C392) (define-primitive-concept C406 C392) (define-primitive-concept C407 C392) (define-primitive-concept C408 C392) (define-primitive-concept C409 C392) (define-primitive-concept C410 C392) (define-primitive-concept C411 C392) (define-primitive-concept C412 C392) (define-primitive-concept C413 C392) (define-primitive-concept C414 C154) (define-primitive-concept C415 C414) (define-primitive-concept C416 C414) (define-primitive-concept C417 C414) (define-primitive-concept C418 C414) (define-primitive-concept C419 C414) (define-primitive-concept C420 C414) (define-primitive-concept C421 C414) (define-primitive-concept C422 C414) (define-primitive-concept C423 C414) (define-primitive-concept C424 C414) (define-primitive-concept C425 C414) (define-primitive-concept C426 C414) (define-primitive-concept C427 C414) (define-primitive-concept C428 C427) (define-primitive-concept C429 C428) (define-primitive-concept C430 C428) (define-primitive-concept C431 C428) (define-primitive-concept C432 C428) (define-primitive-concept C433 C428) (define-primitive-concept C434 C433) (define-primitive-concept C435 C433) (define-primitive-concept C436 C427) (define-primitive-concept C437 C436) (define-primitive-concept C438 C436) (define-primitive-concept C439 C436) (define-primitive-concept C440 C154) (define-primitive-concept C441 C440) (define-primitive-concept C442 C441) (define-primitive-concept C443 C442) (define-primitive-concept C444 C442) (define-primitive-concept C445 C441) (define-primitive-concept C446 C445) (define-primitive-concept C447 C445) (define-primitive-concept C448 C445) (define-primitive-concept C449 C445) (define-primitive-concept C450 C441) (define-primitive-concept C451 C450) (define-primitive-concept C452 C450) (define-primitive-concept C453 C450) (define-primitive-concept C454 C450) (define-primitive-concept C455 C440) (define-primitive-concept C456 C455) (define-primitive-concept C457 C455) (define-primitive-concept C458 C157) (define-primitive-concept C459 C458) (define-primitive-concept C460 C458) (define-primitive-concept C461 C458) (define-primitive-concept C462 C458) (define-primitive-concept C463 C458) (define-primitive-concept C464 C157) (define-primitive-concept C465 (AND C458 C464)) (define-primitive-concept C466 C458) (define-primitive-concept C467 C458) (define-primitive-concept C468 C458) (define-primitive-concept C469 C157) (define-primitive-concept C470 C469) (define-primitive-concept C471 C469) (define-primitive-concept C472 C469) (define-primitive-concept C473 C469) (define-primitive-concept C474 C469) (define-primitive-concept C475 C469) (define-primitive-concept C476 C469) (define-primitive-concept C477 C469) (define-primitive-concept C478 C477) (define-primitive-concept C479 C477) (define-primitive-concept C480 C469) (define-primitive-concept C481 C469) (define-primitive-concept C482 C469) (define-primitive-concept C483 C469) (define-primitive-concept C484 C469) (define-primitive-concept C485 C469) (define-primitive-concept C486 C469) (define-primitive-concept C487 C469) (define-primitive-concept C488 C469) (define-primitive-concept C489 C469) (define-primitive-concept C490 C469) (define-primitive-concept C491 C469) (define-primitive-concept C492 C469) (define-primitive-concept C493 C469) (define-primitive-concept C494 C469) (define-primitive-concept C495 C469) (define-primitive-concept C496 C469) (define-primitive-concept C497 C469) (define-primitive-concept C498 C469) (define-primitive-concept C499 (AND C469 C326)) (define-primitive-concept C500 (AND C469 C326)) (define-primitive-concept C501 (AND C469 C326)) (define-primitive-concept C502 C469) (define-primitive-concept C503 C469) (define-primitive-concept C504 C469) (define-primitive-concept C505 C469) (define-primitive-concept C506 C469) (define-primitive-concept C507 C469) (define-primitive-concept C508 C469) (define-primitive-concept C509 C469) (define-primitive-concept C510 C157) (define-primitive-concept C511 C510) (define-primitive-concept C512 C510) (define-primitive-concept C513 C510) (define-primitive-concept C514 C510) (define-primitive-concept C515 C510) (define-primitive-concept C516 C510) (define-primitive-concept C517 C510) (define-primitive-concept C518 C510) (define-primitive-concept C519 C510) (define-primitive-concept C520 C510) (define-primitive-concept C521 C510) (define-primitive-concept C522 C510) (define-primitive-concept C523 C157) (define-primitive-concept C524 C523) (define-primitive-concept C525 C524) (define-primitive-concept C526 C524) (define-primitive-concept C527 C524) (define-primitive-concept C528 C524) (define-primitive-concept C529 C523) (define-primitive-concept C530 C529) (define-primitive-concept C531 C529) (define-primitive-concept C532 C529) (define-primitive-concept C533 C328) (define-primitive-concept C534 C328) (define-primitive-concept C535 C328) (define-primitive-concept C536 C328) (define-primitive-concept C537 C157) (define-primitive-concept C538 (AND C328 C537)) (define-primitive-concept C539 C330) (define-primitive-concept C540 C539) (define-primitive-concept C541 C539) (define-primitive-concept C542 C330) (define-primitive-concept C543 C330) (define-primitive-concept C544 C330) (define-primitive-concept C545 C330) (define-primitive-concept C546 C330) (define-primitive-concept C547 C330) (define-primitive-concept C548 C330) (define-primitive-concept C549 C157) (define-primitive-concept C550 C549) (define-primitive-concept C551 C550) (define-primitive-concept C552 C550) (define-primitive-concept C553 C550) (define-primitive-concept C554 C550) (define-primitive-concept C555 C550) (define-primitive-concept C556 C550) (define-primitive-concept C557 C550) (define-primitive-concept C558 C550) (define-primitive-concept C559 C550) (define-primitive-concept C560 C550) (define-primitive-concept C561 C550) (define-primitive-concept C562 C550) (define-primitive-concept C563 C549) (define-primitive-concept C564 C563) (define-primitive-concept C565 C564) (define-primitive-concept C566 C564) (define-primitive-concept C567 C564) (define-primitive-concept C568 C564) (define-primitive-concept C569 C564) (define-primitive-concept C570 C564) (define-primitive-concept C571 C564) (define-primitive-concept C572 C564) (define-primitive-concept C573 C564) (define-primitive-concept C574 C549) (define-primitive-concept C575 C574) (define-primitive-concept C576 C575) (define-primitive-concept C577 C575) (define-primitive-concept C578 C575) (define-primitive-concept C579 C575) (define-primitive-concept C580 C579) (define-primitive-concept C581 C579) (define-primitive-concept C582 C579) (define-primitive-concept C583 C579) (define-primitive-concept C584 C579) (define-primitive-concept C585 C579) (define-primitive-concept C586 C579) (define-primitive-concept C587 C579) (define-primitive-concept C588 C575) (define-primitive-concept C589 C588) (define-primitive-concept C590 C588) (define-primitive-concept C591 C588) (define-primitive-concept C592 C588) (define-primitive-concept C593 C588) (define-primitive-concept C594 C588) (define-primitive-concept C595 C588) (define-primitive-concept C596 C574) (define-primitive-concept C597 C596) (define-primitive-concept C598 C596) (define-primitive-concept C599 C574) (define-primitive-concept C600 C599) (define-primitive-concept C601 C599) (define-primitive-concept C602 C599) (define-primitive-concept C603 C599) (define-primitive-concept C604 C599) (define-primitive-concept C605 C599) (define-primitive-concept C606 C574) (define-primitive-concept C607 C606) (define-primitive-concept C608 C606) (define-primitive-concept C609 C606) (define-primitive-concept C610 C606) (define-primitive-concept C611 C606) (define-primitive-concept C612 C606) (define-primitive-concept C613 C606) (define-primitive-concept C614 C606) (define-primitive-concept C615 C606) (define-primitive-concept C616 C606) (define-primitive-concept C617 C574) (define-primitive-concept C618 C574) (define-primitive-concept C619 C618) (define-primitive-concept C620 C618) (define-primitive-concept C621 C618) (define-primitive-concept C622 C618) (define-primitive-concept C623 C618) (define-primitive-concept C624 C342) (define-primitive-concept C625 C342) (define-primitive-concept C626 C342) (define-primitive-concept C627 C342) (define-primitive-concept C628 C342) (define-primitive-concept C629 C342) (define-primitive-concept C630 C342) (define-primitive-concept C631 C342) (define-primitive-concept C632 C342) (define-primitive-concept C633 C342) (define-primitive-concept C634 C342) (define-primitive-concept C635 C342) (define-primitive-concept C636 C342) (define-primitive-concept C637 C342) (define-primitive-concept C638 C342) (define-primitive-concept C639 C342) (define-primitive-concept C640 C338) (define-primitive-concept C641 C338) (define-primitive-concept C642 C338) (define-primitive-concept C643 C338) (define-primitive-concept C644 C157) (define-primitive-concept C645 C644) (define-primitive-concept C646 C644) (define-primitive-concept C647 C157) (define-primitive-concept C648 C647) (define-primitive-concept C649 C647) (define-primitive-concept C650 C647) (define-primitive-concept C651 C25) (define-primitive-concept C652 C651) (define-primitive-concept C653 C652) (define-primitive-concept C654 C653) (define-primitive-concept C655 C653) (define-primitive-concept C656 C653) (define-primitive-concept C657 C653) (define-primitive-concept C658 C653) (define-primitive-concept C659 C653) (define-primitive-concept C660 C653) (define-primitive-concept C661 C653) (define-primitive-concept C662 C652) (define-primitive-concept C663 C662) (define-primitive-concept C664 C662) (define-primitive-concept C665 C332) (define-primitive-concept C666 C332) (define-primitive-concept C667 C332) (define-primitive-concept C668 C667) (define-primitive-concept C669 C667) (define-primitive-concept C670 C332) (define-primitive-concept C671 C332) (define-primitive-concept C672 C332) (define-primitive-concept C673 C332) (define-primitive-concept C674 C332) (define-primitive-concept C675 C332) (define-primitive-concept C676 C332) (define-primitive-concept C677 C332) (define-primitive-concept C678 C332) (define-primitive-concept C679 C332) (define-primitive-concept C680 C332) (define-primitive-concept C681 C332) (define-primitive-concept C682 C332) (define-primitive-concept C683 C332) (define-primitive-concept C684 C334) (define-primitive-concept C685 C334) (define-primitive-concept C686 C334) (define-primitive-concept C687 C334) (define-primitive-concept C688 C334) (define-primitive-concept C689 C334) (define-primitive-concept C690 C334) (define-primitive-concept C691 C334) (define-primitive-concept C692 C334) (define-primitive-concept C693 C334) (define-primitive-concept C694 C334) (define-primitive-concept C695 C334) (define-primitive-concept C696 C334) (define-primitive-concept C697 C334) (define-primitive-concept C698 C334) (define-primitive-concept C699 C334) (define-primitive-concept C700 C334) (define-primitive-concept C701 C537) (define-primitive-concept C702 C537) (define-primitive-concept C703 C326) (define-primitive-concept C704 (AND C537 C703)) (define-primitive-concept C705 C340) (define-primitive-concept C706 C705) (define-primitive-concept C707 C705) (define-primitive-concept C708 C340) (define-primitive-concept C709 C708) (define-primitive-concept C710 C708) (define-primitive-concept C711 C340) (define-primitive-concept C712 C203) (define-primitive-concept C713 C712) (define-primitive-concept C714 C712) (define-primitive-concept C715 C712) (define-primitive-concept C716 C712) (define-primitive-concept C717 C712) (define-primitive-concept C718 C712) (define-primitive-concept C719 C712) (define-primitive-concept C720 C203) (define-primitive-concept C721 C203) (define-primitive-concept C722 C203) (define-primitive-concept C723 C722) (define-primitive-concept C724 C722) (define-primitive-concept C725 (AND C723 C724)) (define-primitive-concept C726 C722) (define-primitive-concept C727 C722) (define-primitive-concept C728 C727) (define-primitive-concept C729 C728) (define-primitive-concept C730 C727) (define-primitive-concept C731 C727) (define-primitive-concept C732 C722) (define-primitive-concept C733 C203) (define-primitive-concept C734 C733) (define-primitive-concept C735 C733) (define-primitive-concept C736 C733) (define-primitive-concept C737 C733) (define-primitive-concept C738 C733) (define-primitive-concept C739 C204) (define-primitive-concept C740 C204) (define-primitive-concept C741 C204) (define-primitive-concept C742 C204) (define-primitive-concept C743 C204) (define-primitive-concept C744 C204) (define-primitive-concept C745 C204) (define-primitive-concept C746 C204) (define-primitive-concept C747 C204) (define-primitive-concept C748 C204) (define-primitive-concept C749 C204) (define-primitive-concept C750 C204) (define-primitive-concept C751 C32) (define-primitive-concept C752 C209) (define-primitive-concept C753 C216) (define-primitive-concept C754 (AND C752 C753)) (define-primitive-concept C755 C209) (define-primitive-concept C756 C209) (define-primitive-concept C757 C756) (define-primitive-concept C758 C756) (define-primitive-concept C759 C756) (define-primitive-concept C760 C756) (define-primitive-concept C761 C760) (define-primitive-concept C762 C761) (define-primitive-concept C763 C761) (define-primitive-concept C764 C761) (define-primitive-concept C765 C760) (define-primitive-concept C766 C756) (define-primitive-concept C767 C756) (define-primitive-concept C768 C767) (define-primitive-concept C769 C768) (define-primitive-concept C770 C768) (define-primitive-concept C771 C768) (define-primitive-concept C772 C771) (define-primitive-concept C773 C771) (define-primitive-concept C774 C771) (define-primitive-concept C775 C771) (define-primitive-concept C776 C771) (define-primitive-concept C777 C771) (define-primitive-concept C778 C767) (define-primitive-concept C779 C767) (define-primitive-concept C780 C759) (define-primitive-concept C781 (AND C756 C780)) (define-primitive-concept C782 C210) (define-primitive-concept C783 C210) (define-primitive-concept C784 C212) (define-primitive-concept C785 C212) (define-primitive-concept C786 C216) (define-primitive-concept C787 C753) (define-primitive-concept C788 C787) (define-primitive-concept C789 C787) (define-primitive-concept C790 C787) (define-primitive-concept C791 C787) (define-primitive-concept C792 C216) (define-primitive-concept C793 C216) (define-primitive-concept C794 C216) (define-primitive-concept C795 C216) (define-primitive-concept C796 C216) (define-primitive-concept C797 C216) (define-primitive-concept C798 C216) (define-primitive-concept C799 C216) (define-primitive-concept C800 C216) (define-primitive-concept C801 C216) (define-primitive-concept C802 C801) (define-primitive-concept C803 C216) (define-primitive-concept C804 C803) (define-primitive-concept C805 C803) (define-primitive-concept C806 C803) (define-primitive-concept C807 C216) (define-primitive-concept C808 C807) (define-primitive-concept C809 C807) (define-primitive-concept C810 C809) (define-primitive-concept C811 C809) (define-primitive-concept C812 C809) (define-primitive-concept C813 C809) (define-primitive-concept C814 C807) (define-primitive-concept C815 C814) (define-primitive-concept C816 C814) (define-primitive-concept C817 C216) (define-primitive-concept C818 C217) (define-primitive-concept C819 C217) (define-primitive-concept C820 C217) (define-primitive-concept C821 C217) (define-primitive-concept C822 C38) (define-primitive-concept C823 C822) (define-primitive-concept C824 C822) (define-primitive-concept C825 C822) (define-primitive-concept C826 C822) (define-primitive-concept C827 C38) (define-primitive-concept C828 C827) (define-primitive-concept C829 C827) (define-primitive-concept C830 C827) (define-primitive-concept C831 (AND C830 C39)) (define-primitive-concept C832 C831) (define-primitive-concept C833 C831) (define-primitive-concept C834 C831) (define-primitive-concept C835 C831) (define-primitive-concept C836 C831) (define-primitive-concept C837 C827) (define-primitive-concept C838 C38) (define-primitive-concept C839 C838) (define-primitive-concept C840 C838) (define-primitive-concept C841 C38) (define-primitive-concept C842 C841) (define-primitive-concept C843 C841) (define-primitive-concept C844 C214) (define-primitive-concept C845 C844) (define-primitive-concept C846 C844) (define-primitive-concept C847 C844) (define-primitive-concept C848 C844) (define-primitive-concept C849 C844) (define-primitive-concept C850 C844) (define-primitive-concept C851 C844) (define-primitive-concept C852 C851) (define-primitive-concept C853 C851) (define-primitive-concept C854 C851) (define-primitive-concept C855 C851) (define-primitive-concept C856 C214) (define-primitive-concept C857 C856) (define-primitive-concept C858 C856) (define-primitive-concept C859 C856) (define-primitive-concept C860 C856) (define-primitive-concept C861 C42) (define-primitive-concept C862 C42) (define-primitive-concept C863 C42) (define-primitive-concept C864 C863) (define-primitive-concept C865 C863) (define-primitive-concept C866 C863) (define-primitive-concept C867 C44) (define-primitive-concept C868 C867) (define-primitive-concept C869 C44) (define-primitive-concept C870 C869) (define-primitive-concept C871 C869) (define-primitive-concept C872 C869) (define-primitive-concept C873 C869) (define-primitive-concept C874 C869) (define-primitive-concept C875 C869) (define-primitive-concept C876 C869) (define-primitive-concept C877 C869) (define-primitive-concept C878 C869) (define-primitive-concept C879 C878) (define-primitive-concept C880 C869) (define-primitive-concept C881 C869) (define-primitive-concept C882 C869) (define-primitive-concept C883 C869) (define-primitive-concept C884 C883) (define-primitive-concept C885 C870) (define-primitive-concept C886 C870) (define-primitive-concept C887 C870) (define-primitive-concept C888 C870) (define-primitive-concept C889 C870) (define-primitive-concept C890 C870) (define-primitive-concept C891 C870) (define-primitive-concept C892 C44) (define-primitive-concept C893 C892) (define-primitive-concept C894 C893) (define-primitive-concept C895 C894) (define-primitive-concept C896 C894) (define-primitive-concept C897 C894) (define-primitive-concept C898 C894) (define-primitive-concept C899 C894) (define-primitive-concept C900 C894) (define-primitive-concept C901 C894) (define-primitive-concept C902 C894) (define-primitive-concept C903 C893) (define-primitive-concept C904 C903) (define-primitive-concept C905 C892) (define-primitive-concept C906 C905) (define-primitive-concept C907 C905) (define-primitive-concept C908 C905) (define-primitive-concept C909 C905) (define-primitive-concept C910 C905) (define-primitive-concept C911 C905) (define-primitive-concept C912 C892) (define-primitive-concept C913 C892) (define-primitive-concept C914 C913) (define-primitive-concept C915 C913) (define-primitive-concept C916 C913) (define-primitive-concept C917 C916) (define-primitive-concept C918 C913) (define-primitive-concept C919 C913) (define-primitive-concept C920 C919) (define-primitive-concept C921 C919) (define-primitive-concept C922 C913) (define-primitive-concept C923 C892) (define-primitive-concept C924 C44) (define-primitive-concept C925 C924) (define-primitive-concept C926 C925) (define-primitive-concept C927 C926) (define-primitive-concept C928 C927) (define-primitive-concept C929 C928) (define-primitive-concept C930 C928) (define-primitive-concept C931 C927) (define-primitive-concept C932 C925) (define-primitive-concept C933 C932) (define-primitive-concept C934 C924) (define-primitive-concept C935 C924) (define-primitive-concept C936 C924) (define-primitive-concept C937 C44) (define-primitive-concept C938 C937) (define-primitive-concept C939 C937) (define-primitive-concept C940 C937) (define-primitive-concept C941 C937) (define-primitive-concept C942 C937) (define-primitive-concept C943 C937) (define-primitive-concept C944 C937) (define-primitive-concept C945 C937) (define-primitive-concept C946 C937) (define-primitive-concept C947 C937) (define-primitive-concept C948 C937) (define-primitive-concept C949 C45) (define-primitive-concept C950 C949) (define-primitive-concept C951 C950) (define-primitive-concept C952 C950) (define-primitive-concept C953 C949) (define-primitive-concept C954 C953) (define-primitive-concept C955 C953) (define-primitive-concept C956 C949) (define-primitive-concept C957 C956) (define-primitive-concept C958 C957) (define-primitive-concept C959 C958) (define-primitive-concept C960 C958) (define-primitive-concept C961 C956) (define-primitive-concept C962 C961) (define-primitive-concept C963 C956) (define-primitive-concept C964 C963) (define-primitive-concept C965 C963) (define-primitive-concept C966 C963) (define-primitive-concept C967 C966) (define-primitive-concept C968 C967) (define-primitive-concept C969 C949) (define-primitive-concept C970 C969) (define-primitive-concept C971 C969) (define-primitive-concept C972 C969) (define-primitive-concept C973 C969) (define-primitive-concept C974 C969) (define-primitive-concept C975 C969) (define-primitive-concept C976 C949) (define-primitive-concept C977 C976) (define-primitive-concept C978 C977) (define-primitive-concept C979 C977) (define-primitive-concept C980 C976) (define-primitive-concept C981 C976) (define-primitive-concept C982 C981) (define-primitive-concept C983 C976) (define-primitive-concept C984 C949) (define-primitive-concept C985 C984) (define-primitive-concept C986 C984) (define-primitive-concept C987 C984) (define-primitive-concept C988 C949) (define-primitive-concept C989 C988) (define-primitive-concept C990 C989) (define-primitive-concept C991 C989) (define-primitive-concept C992 C989) (define-primitive-concept C993 C989) (define-primitive-concept C994 C989) (define-primitive-concept C995 C989) (define-primitive-concept C996 C989) (define-primitive-concept C997 C989) (define-primitive-concept C998 C988) (define-primitive-concept C999 C988) (define-primitive-concept C1000 C988) (define-primitive-concept C1001 C1000) (define-primitive-concept C1002 C1000) (define-primitive-concept C1003 C1000) (define-primitive-concept C1004 C1000) (define-primitive-concept C1005 C1000) (define-primitive-concept C1006 C1000) (define-primitive-concept C1007 C1000) (define-primitive-concept C1008 C1000) (define-primitive-concept C1009 C1000) (define-primitive-concept C1010 C988) (define-primitive-concept C1011 C988) (define-primitive-concept C1012 C988) (define-primitive-concept C1013 C45) (define-primitive-concept C1014 C1013) (define-primitive-concept C1015 C1014) (define-primitive-concept C1016 C1015) (define-primitive-concept C1017 C1015) (define-primitive-concept C1018 C1015) (define-primitive-concept C1019 C1015) (define-primitive-concept C1020 C1014) (define-primitive-concept C1021 C1020) (define-primitive-concept C1022 C1020) (define-primitive-concept C1023 (AND C1020 C1021)) (define-primitive-concept C1024 (AND C1020 C1021)) (define-primitive-concept C1025 C1014) (define-primitive-concept C1026 C1025) (define-primitive-concept C1027 C1025) (define-primitive-concept C1028 C1025) (define-primitive-concept C1029 C1014) (define-primitive-concept C1030 C1029) (define-primitive-concept C1031 C1029) (define-primitive-concept C1032 C1029) (define-primitive-concept C1033 C1013) (define-primitive-concept C1034 C1033) (define-primitive-concept C1035 C1034) (define-primitive-concept C1036 C1034) (define-primitive-concept C1037 C1034) (define-primitive-concept C1038 C1034) (define-primitive-concept C1039 C1034) (define-primitive-concept C1040 C1034) (define-primitive-concept C1041 C1034) (define-primitive-concept C1042 C1034) (define-primitive-concept C1043 C1034) (define-primitive-concept C1044 C1034) (define-primitive-concept C1045 C1034) (define-primitive-concept C1046 C1034) (define-primitive-concept C1047 C1034) (define-primitive-concept C1048 C1033) (define-primitive-concept C1049 C1033) (define-primitive-concept C1050 C1049) (define-primitive-concept C1051 C1049) (define-primitive-concept C1052 C1049) (define-primitive-concept C1053 C1052) (define-primitive-concept C1054 C1052) (define-primitive-concept C1055 C1052) (define-primitive-concept C1056 C1013) (define-primitive-concept C1057 C1056) (define-primitive-concept C1058 C1056) (define-primitive-concept C1059 C1056) (define-primitive-concept C1060 C1056) (define-primitive-concept C1061 C1056) (define-primitive-concept C1062 C1013) (define-primitive-concept C1063 C1062) (define-primitive-concept C1064 C1062) (define-primitive-concept C1065 C1062) (define-primitive-concept C1066 C45) (define-primitive-concept C1067 C1066) (define-primitive-concept C1068 C1067) (define-primitive-concept C1069 C1068) (define-primitive-concept C1070 C1068) (define-primitive-concept C1071 C1067) (define-primitive-concept C1072 C1071) (define-primitive-concept C1073 C1071) (define-primitive-concept C1074 C1071) (define-primitive-concept C1075 C1067) (define-primitive-concept C1076 C1075) (define-primitive-concept C1077 C1075) (define-primitive-concept C1078 C1075) (define-primitive-concept C1079 C1075) (define-primitive-concept C1080 C1075) (define-primitive-concept C1081 C1067) (define-primitive-concept C1082 C1081) (define-primitive-concept C1083 C1081) (define-primitive-concept C1084 C1081) (define-primitive-concept C1085 C1081) (define-primitive-concept C1086 C1067) (define-primitive-concept C1087 C1086) (define-primitive-concept C1088 C1086) (define-primitive-concept C1089 C1086) (define-primitive-concept C1090 C1066) (define-primitive-concept C1091 C1090) (define-primitive-concept C1092 C1090) (define-primitive-concept C1093 C1066) (define-primitive-concept C1094 C1093) (define-primitive-concept C1095 C1093) (define-primitive-concept C1096 C1066) (define-primitive-concept C1097 C1096) (define-primitive-concept C1098 C1097) (define-primitive-concept C1099 C1097) (define-primitive-concept C1100 C1097) (define-primitive-concept C1101 C1097) (define-primitive-concept C1102 C1066) (define-primitive-concept C1103 C1102) (define-primitive-concept C1104 C1102) (define-primitive-concept C1105 C1066) (define-primitive-concept C1106 C1105) (define-primitive-concept C1107 C1105) (define-primitive-concept C1108 C1066) (define-primitive-concept C1109 C1108) (define-primitive-concept C1110 C1109) (define-primitive-concept C1111 C1109) (define-primitive-concept C1112 C1109) (define-primitive-concept C1113 C1066) (define-primitive-concept C1114 C1113) (define-primitive-concept C1115 C1113) (define-primitive-concept C1116 C1066) (define-primitive-concept C1117 C1116) (define-primitive-concept C1118 C1117) (define-primitive-concept C1119 C1118) (define-primitive-concept C1120 C1117) (define-primitive-concept C1121 C1120) (define-primitive-concept C1122 C45) (define-primitive-concept C1123 C1122) (define-primitive-concept C1124 C1123) (define-primitive-concept C1125 C1123) (define-primitive-concept C1126 C1123) (define-primitive-concept C1127 C1122) (define-primitive-concept C1128 C1127) (define-primitive-concept C1129 C1128) (define-primitive-concept C1130 C1128) (define-primitive-concept C1131 C1127) (define-primitive-concept C1132 C1131) (define-primitive-concept C1133 C1132) (define-primitive-concept C1134 C1132) (define-primitive-concept C1135 C1131) (define-primitive-concept C1136 C1135) (define-primitive-concept C1137 C1136) (define-primitive-concept C1138 C1136) (define-primitive-concept C1139 C1136) (define-primitive-concept C1140 C1136) (define-primitive-concept C1141 C1136) (define-primitive-concept C1142 C1141) (define-primitive-concept C1143 C1141) (define-primitive-concept C1144 C1136) (define-primitive-concept C1145 C1135) (define-primitive-concept C1146 C1145) (define-primitive-concept C1147 C1145) (define-primitive-concept C1148 C1147) (define-primitive-concept C1149 C1148) (define-primitive-concept C1150 C1148) (define-primitive-concept C1151 C1145) (define-primitive-concept C1152 C1145) (define-primitive-concept C1153 C1152) (define-primitive-concept C1154 C1135) (define-primitive-concept C1155 C1154) (define-primitive-concept C1156 C1154) (define-primitive-concept C1157 C1156) (define-primitive-concept C1158 C1156) (define-primitive-concept C1159 C1156) (define-primitive-concept C1160 C1154) (define-primitive-concept C1161 C1160) (define-primitive-concept C1162 C1161) (define-primitive-concept C1163 C1154) (define-primitive-concept C1164 C1154) (define-primitive-concept C1165 C1154) (define-primitive-concept C1166 C1154) (define-primitive-concept C1167 C1166) (define-primitive-concept C1168 C1127) (define-primitive-concept C1169 C1168) (define-primitive-concept C1170 C1169) (define-primitive-concept C1171 C1169) (define-primitive-concept C1172 C1168) (define-primitive-concept C1173 C1172) (define-primitive-concept C1174 C1172) (define-primitive-concept C1175 C1127) (define-primitive-concept C1176 C1175) (define-primitive-concept C1177 C1176) (define-primitive-concept C1178 C1177) (define-primitive-concept C1179 C1177) (define-primitive-concept C1180 C1179) (define-primitive-concept C1181 C1180) (define-primitive-concept C1182 C1179) (define-primitive-concept C1183 C1176) (define-primitive-concept C1184 C1175) (define-primitive-concept C1185 C1184) (define-primitive-concept C1186 C1184) (define-primitive-concept C1187 C1184) (define-primitive-concept C1188 C1184) (define-primitive-concept C1189 C1184) (define-primitive-concept C1190 C1127) (define-primitive-concept C1191 C1190) (define-primitive-concept C1192 C1191) (define-primitive-concept C1193 C1191) (define-primitive-concept C1194 C1191) (define-primitive-concept C1195 C1191) (define-primitive-concept C1196 C1190) (define-primitive-concept C1197 C1196) (define-primitive-concept C1198 C1196) (define-primitive-concept C1199 C1190) (define-primitive-concept C1200 C1127) (define-primitive-concept C1201 C1200) (define-primitive-concept C1202 C1200) (define-primitive-concept C1203 C1122) (define-primitive-concept C1204 C1203) (define-primitive-concept C1205 C1204) (define-primitive-concept C1206 C1205) (define-primitive-concept C1207 C1205) (define-primitive-concept C1208 C1204) (define-primitive-concept C1209 C1208) (define-primitive-concept C1210 C1208) (define-primitive-concept C1211 C1208) (define-primitive-concept C1212 C1204) (define-primitive-concept C1213 C1212) (define-primitive-concept C1214 C1212) (define-primitive-concept C1215 C1204) (define-primitive-concept C1216 C1215) (define-primitive-concept C1217 C1215) (define-primitive-concept C1218 C1204) (define-primitive-concept C1219 C1218) (define-primitive-concept C1220 C1218) (define-primitive-concept C1221 C1204) (define-primitive-concept C1222 C1221) (define-primitive-concept C1223 C1221) (define-primitive-concept C1224 C1221) (define-primitive-concept C1225 C1204) (define-primitive-concept C1226 C1225) (define-primitive-concept C1227 C1225) (define-primitive-concept C1228 C1204) (define-primitive-concept C1229 C1228) (define-primitive-concept C1230 C1228) (define-primitive-concept C1231 (AND C1229 C1230)) (define-primitive-concept C1232 C1203) (define-primitive-concept C1233 C1232) (define-primitive-concept C1234 C1233) (define-primitive-concept C1235 C1233) (define-primitive-concept C1236 C1232) (define-primitive-concept C1237 C1236) (define-primitive-concept C1238 C1236) (define-primitive-concept C1239 C1232) (define-primitive-concept C1240 C1239) (define-primitive-concept C1241 C1239) (define-primitive-concept C1242 C1232) (define-primitive-concept C1243 C1242) (define-primitive-concept C1244 C1242) (define-primitive-concept C1245 C1232) (define-primitive-concept C1246 C1245) (define-primitive-concept C1247 C1245) (define-primitive-concept C1248 C1232) (define-primitive-concept C1249 C1248) (define-primitive-concept C1250 C1248) (define-primitive-concept C1251 C45) (define-primitive-concept C1252 C1251) (define-primitive-concept C1253 C1252) (define-primitive-concept C1254 C1252) (define-primitive-concept C1255 C1252) (define-primitive-concept C1256 C1252) (define-primitive-concept C1257 C1252) (define-primitive-concept C1258 C1251) (define-primitive-concept C1259 C1258) (define-primitive-concept C1260 C1259) (define-primitive-concept C1261 C1259) (define-primitive-concept C1262 C221) (define-primitive-concept C1263 C221) (define-primitive-concept C1264 C1263) (define-primitive-concept C1265 C1263) (define-primitive-concept C1266 C1263) (define-primitive-concept C1267 C1263) (define-primitive-concept C1268 C1263) (define-primitive-concept C1269 C221) (define-primitive-concept C1270 C1269) (define-primitive-concept C1271 C1269) (define-primitive-concept C1272 C1269) (define-primitive-concept C1273 C222) (define-primitive-concept C1274 C222) (define-primitive-concept C1275 C1274) (define-primitive-concept C1276 C222) (define-primitive-concept C1277 C222) (define-primitive-concept C1278 C222) (define-primitive-concept C1279 C221) (define-primitive-concept C1280 C1279) (define-primitive-concept C1281 C1279) (define-primitive-concept C1282 C220) (define-primitive-concept C1283 C1282) (define-primitive-concept C1284 C221) (define-primitive-concept C1285 C1284) (define-primitive-concept C1286 C31) (define-primitive-concept C1287 C1286) (define-primitive-concept C1288 C1286) (define-primitive-concept C1289 C31) (define-primitive-concept C1290 C1289) (define-primitive-concept C1291 (AND C1286 C1290)) (define-primitive-concept C1292 C1286) (define-primitive-concept C1293 C1286) (define-primitive-concept C1294 C1286) (define-primitive-concept C1295 C1286) (define-primitive-concept C1296 C1286) (define-primitive-concept C1297 C1286) (define-primitive-concept C1298 C1286) (define-primitive-concept C1299 (AND C1286 C1290)) (define-primitive-concept C1300 (AND C1286 C1290)) (define-primitive-concept C1301 (AND C1286 C1290)) (define-primitive-concept C1302 C1286) (define-primitive-concept C1303 C1286) (define-primitive-concept C1304 C1286) (define-primitive-concept C1305 C1286) (define-primitive-concept C1306 C1286) (define-primitive-concept C1307 C1286) (define-primitive-concept C1308 C1286) (define-primitive-concept C1309 C1286) (define-primitive-concept C1310 (AND C1286 C1290)) (define-primitive-concept C1311 (AND C1286 C1290)) (define-primitive-concept C1312 (AND C1286 C1290)) (define-primitive-concept C1313 C1286) (define-primitive-concept C1314 (AND C1286 C1290)) (define-primitive-concept C1315 C1286) (define-primitive-concept C1316 (AND C1286 C1290)) (define-primitive-concept C1317 (AND C1286 C1290)) (define-primitive-concept C1318 (AND C1286 C1290)) (define-primitive-concept C1319 C1286) (define-primitive-concept C1320 C1286) (define-primitive-concept C1321 C1286) (define-primitive-concept C1322 C1286) (define-primitive-concept C1323 C1286) (define-primitive-concept C1324 C1286) (define-primitive-concept C1325 C1286) (define-primitive-concept C1326 (AND C1286 C1290)) (define-primitive-concept C1327 (AND C1286 C1290)) (define-primitive-concept C1328 (AND C1286 C1290)) (define-primitive-concept C1329 (AND C1286 C1290)) (define-primitive-concept C1330 C1289) (define-primitive-concept C1331 C1289) (define-primitive-concept C1332 C1289) (define-primitive-concept C1333 C1289) (define-primitive-concept C1334 C1289) (define-primitive-concept C1335 C1289) (define-primitive-concept C1336 C1335) (define-primitive-concept C1337 C1289) (define-primitive-concept C1338 C1337) (define-primitive-concept C1339 C1289) (define-primitive-concept C1340 (AND C1337 C1339)) (define-primitive-concept C1341 C1337) (define-primitive-concept C1342 C1337) (define-primitive-concept C1343 C1337) (define-primitive-concept C1344 C1337) (define-primitive-concept C1345 C1344) (define-primitive-concept C1346 C1289) (define-primitive-concept C1347 C1346) (define-primitive-concept C1348 C1346) (define-primitive-concept C1349 C1346) (define-primitive-concept C1350 C1349) (define-primitive-concept C1351 C1289) (define-primitive-concept C1352 C1351) (define-primitive-concept C1353 C1289) (define-primitive-concept C1354 C1289) (define-primitive-concept C1355 (AND C1353 C1354)) (define-primitive-concept C1356 C1289) (define-primitive-concept C1357 C1356) (define-primitive-concept C1358 C1356) (define-primitive-concept C1359 C1356) (define-primitive-concept C1360 C1356) (define-primitive-concept C1361 C1356) (define-primitive-concept C1362 C1356) (define-primitive-concept C1363 C1356) (define-primitive-concept C1364 C1356) (define-primitive-concept C1365 C1289) (define-primitive-concept C1366 C1354) (define-primitive-concept C1367 C1354) (define-primitive-concept C1368 C1354) (define-primitive-concept C1369 C1354) (define-primitive-concept C1370 C1354) (define-primitive-concept C1371 C1354) (define-primitive-concept C1372 C1354) (define-primitive-concept C1373 C1289) (define-primitive-concept C1374 C1289) (define-primitive-concept C1375 C1374) (define-primitive-concept C1376 C1289) (define-primitive-concept C1377 C1376) (define-primitive-concept C1378 C1289) (define-primitive-concept C1379 C1378) (define-primitive-concept C1380 C1289) (define-primitive-concept C1381 C1380) (define-primitive-concept C1382 C1381) (define-primitive-concept C1383 C1381) (define-primitive-concept C1384 C1380) (define-primitive-concept C1385 C1384) (define-primitive-concept C1386 C1380) (define-primitive-concept C1387 C1380) (define-primitive-concept C1388 C1387) (define-primitive-concept C1389 C1387) (define-primitive-concept C1390 C1289) (define-primitive-concept C1391 C1289) (define-primitive-concept C1392 C1391) (define-primitive-concept C1393 C1391) (define-primitive-concept C1394 C1391) (define-primitive-concept C1395 C1391) (define-primitive-concept C1396 C1391) (define-primitive-concept C1397 C1391) (define-primitive-concept C1398 C1391) (define-primitive-concept C1399 C1391) (define-primitive-concept C1400 C1391) (define-primitive-concept C1401 C1400) (define-primitive-concept C1402 C1400) (define-primitive-concept C1403 C23) (define-primitive-concept C1404 C1403) (define-primitive-concept C1405 C1404) (define-primitive-concept C1406 C1405) (define-primitive-concept C1407 C1405) (define-primitive-concept C1408 C1405) (define-primitive-concept C1409 C1405) (define-primitive-concept C1410 C1405) (define-primitive-concept C1411 C1405) (define-primitive-concept C1412 C1405) (define-primitive-concept C1413 C1405) (define-primitive-concept C1414 C1405) (define-primitive-concept C1415 C1404) (define-primitive-concept C1416 C1415) (define-primitive-concept C1417 C1415) (define-primitive-concept C1418 C1415) (define-primitive-concept C1419 C1418) (define-primitive-concept C1420 C1403) (define-primitive-concept C1421 C1420) (define-primitive-concept C1422 C1420) (define-primitive-concept C1423 C1420) (define-primitive-concept C1424 C1423) (define-primitive-concept C1425 C1403) (define-primitive-concept C1426 C1425) (define-primitive-concept C1427 C1426) (define-primitive-concept C1428 C1403) (define-primitive-concept C1429 C1403) (define-primitive-concept C1430 C1429) (define-primitive-concept C1431 C1403) (define-primitive-concept C1432 C1431) (define-primitive-concept C1433 C1432) (define-primitive-concept C1434 C1432) (define-primitive-concept C1435 C1431) (define-primitive-concept C1436 C1403) (define-primitive-concept C1437 C1436) (define-primitive-concept C1438 C1437) (define-primitive-concept C1439 (AND C1435 C1438)) (define-primitive-concept C1440 C1435) (define-primitive-concept C1441 C1431) (define-primitive-concept C1442 C1403) (define-primitive-concept C1443 C1442) (define-primitive-concept C1444 C1403) (define-primitive-concept C1445 C1444) (define-primitive-concept C1446 C1444) (define-primitive-concept C1447 C1444) (define-primitive-concept C1448 C1444) (define-primitive-concept C1449 C1403) (define-primitive-concept C1450 C1403) (define-primitive-concept C1451 C1450) (define-primitive-concept C1452 C1403) (define-primitive-concept C1453 C1436) (define-primitive-concept C1454 C23) (define-primitive-concept C1455 C1454) (define-primitive-concept C1456 C40) (define-primitive-concept C1457 C40) (define-primitive-concept C1458 C40) (define-primitive-concept C1459 C40) (define-primitive-concept C1460 C218) (define-primitive-concept C1461 C218) (define-primitive-concept C1462 C218) (define-primitive-concept C1463 C218) (define-primitive-concept C1464 C218) (define-primitive-concept C1465 C164) (define-primitive-concept C1466 C1465) (define-primitive-concept C1467 C1465) (define-primitive-concept C1468 C1465) (define-primitive-concept C1469 C1465) (define-primitive-concept C1470 C164) (define-primitive-concept C1471 C1470) (define-primitive-concept C1472 C1470) (define-primitive-concept C1473 C1470) (define-primitive-concept C1474 C1470) (define-primitive-concept C1475 C1470) (define-primitive-concept C1476 C164) (define-primitive-concept C1477 C1476) (define-primitive-concept C1478 C1476) (define-primitive-concept C1479 C1476) (define-primitive-concept C1480 C1479) (define-primitive-concept C1481 C164) (define-primitive-concept C1482 C164) (define-primitive-concept C1483 C164) (define-primitive-concept C1484 C1483) (define-primitive-concept C1485 C1483) (define-primitive-concept C1486 C1485) (define-primitive-concept C1487 C1485) (define-primitive-concept C1488 C1483) (define-primitive-concept C1489 C1483) (define-primitive-concept C1490 C1483) (define-primitive-concept C1491 C1483) (define-primitive-concept C1492 C1484) (define-primitive-concept C1493 C1484) (define-primitive-concept C1494 C1484) (define-primitive-concept C1495 C1484) (define-primitive-concept C1496 C1484) (define-primitive-concept C1497 C1496) (define-primitive-concept C1498 C1496) (define-primitive-concept C1499 C1496) (define-primitive-concept C1500 C1484) (define-primitive-concept C1501 C1484) (define-primitive-concept C1502 C1484) (define-primitive-concept C1503 C164) (define-primitive-concept C1504 C1503) (define-primitive-concept C1505 C1503) (define-primitive-concept C1506 C164) (define-primitive-concept C1507 (AND C1503 C1506)) (define-primitive-concept C1508 C1503) (define-primitive-concept C1509 C1503) (define-primitive-concept C1510 (AND C1503 C1506)) (define-primitive-concept C1511 C1503) (define-primitive-concept C1512 C1503) (define-primitive-concept C1513 C164) (define-primitive-concept C1514 C1513) (define-primitive-concept C1515 C1514) (define-primitive-concept C1516 C1514) (define-primitive-concept C1517 C1514) (define-primitive-concept C1518 C1514) (define-primitive-concept C1519 C1513) (define-primitive-concept C1520 C1513) (define-primitive-concept C1521 C1513) (define-primitive-concept C1522 C1521) (define-primitive-concept C1523 C1521) (define-primitive-concept C1524 C1513) (define-primitive-concept C1525 C1506) (define-primitive-concept C1526 C1525) (define-primitive-concept C1527 C1525) (define-primitive-concept C1528 C1506) (define-primitive-concept C1529 C1528) (define-primitive-concept C1530 C1528) (define-primitive-concept C1531 C164) (define-primitive-concept C1532 C1531) (define-primitive-concept C1533 C1531) (define-primitive-concept C1534 C1533) (define-primitive-concept C1535 C1533) (define-primitive-concept C1536 C1531) (define-primitive-concept C1537 C1536) (define-primitive-concept C1538 C164) (define-primitive-concept C1539 C164) (define-primitive-concept C1540 C1539) (define-primitive-concept C1541 C1539) (define-primitive-concept C1542 C1539) (define-primitive-concept C1543 C1539) (define-primitive-concept C1544 C1539) (define-primitive-concept C1545 C1539) (define-primitive-concept C1546 C1539) (define-primitive-concept C1547 C1539) (define-primitive-concept C1548 C1539) (define-primitive-concept C1549 C1539) (define-primitive-concept C1550 C759) (define-primitive-concept C1551 C1550) (define-primitive-concept C1552 C759) (define-primitive-concept C1553 C1552) (define-primitive-concept C1554 C1552) (define-primitive-concept C1555 C1552) (define-primitive-concept C1556 C1552) (define-primitive-concept C1557 C1552) (define-primitive-concept C1558 C1552) (define-primitive-concept C1559 C1552) (define-primitive-concept C1560 C1552) (define-primitive-concept C1561 C1552) (define-primitive-concept C1562 C759) (define-primitive-concept C1563 (AND C1552 C1562)) (define-primitive-concept C1564 C759) (define-primitive-concept C1565 C1564) (define-primitive-concept C1566 C1564) (define-primitive-concept C1567 C1564) (define-primitive-concept C1568 (AND C1564 C1562)) (define-primitive-concept C1569 C1564) (define-primitive-concept C1570 C1564) (define-primitive-concept C1571 C1564) (define-primitive-concept C1572 C1564) (define-primitive-concept C1573 C1564) (define-primitive-concept C1574 C759) (define-primitive-concept C1575 C1574) (define-primitive-concept C1576 C1574) (define-primitive-concept C1577 C1574) (define-primitive-concept C1578 C1574) (define-primitive-concept C1579 C1574) (define-primitive-concept C1580 C1574) (define-primitive-concept C1581 C1574) (define-primitive-concept C1582 C1574) (define-primitive-concept C1583 C780) (define-primitive-concept C1584 C780) (define-primitive-concept C1585 C780) (define-primitive-concept C1586 C780) (define-primitive-concept C1587 C780) (define-primitive-concept C1588 C780) (define-primitive-concept C1589 C780) (define-primitive-concept C1590 C780) (define-primitive-concept C1591 C1590) (define-primitive-concept C1592 C1590) (define-primitive-concept C1593 C1590) (define-primitive-concept C1594 C1590) (define-primitive-concept C1595 C780) (define-primitive-concept C1596 C780) (define-primitive-concept C1597 C780) (define-primitive-concept C1598 C759) (define-primitive-concept C1599 (AND C780 C1598)) (define-primitive-concept C1600 C759) (define-primitive-concept C1601 C1600) (define-primitive-concept C1602 C1600) (define-primitive-concept C1603 C1600) (define-primitive-concept C1604 C1600) (define-primitive-concept C1605 C1562) (define-primitive-concept C1606 C1562) (define-primitive-concept C1607 C1562) (define-primitive-concept C1608 C1562) (define-primitive-concept C1609 C1562) (define-primitive-concept C1610 (AND C759 C1562)) (define-primitive-concept C1611 C1610) (define-primitive-concept C1612 C1610) (define-primitive-concept C1613 C1610) (define-primitive-concept C1614 C759) (define-primitive-concept C1615 C1614) (define-primitive-concept C1616 C1614) (define-primitive-concept C1617 C1614) (define-primitive-concept C1618 C1614) (define-primitive-concept C1619 C1614) (define-primitive-concept C1620 C1614) (define-primitive-concept C1621 C759) (define-primitive-concept C1622 C1621) (define-primitive-concept C1623 C1621) (define-primitive-concept C1624 C1621) (define-primitive-concept C1625 C1621) (define-primitive-concept C1626 C1621) (define-primitive-concept C1627 C759) (define-primitive-concept C1628 C1627) (define-primitive-concept C1629 C759) (define-primitive-concept C1630 C1629) (define-primitive-concept C1631 C1629) (define-primitive-concept C1632 C1629) (define-primitive-concept C1633 C759) (define-primitive-concept C1634 C1633) (define-primitive-concept C1635 C1633) (define-primitive-concept C1636 C1598) (define-primitive-concept C1637 C1598) (define-primitive-concept C1638 C1598) (define-primitive-concept C1639 C759) (define-primitive-concept C1640 C1639) (define-primitive-concept C1641 C1639) (define-primitive-concept C1642 C1641) (define-primitive-concept C1643 C1641) (define-primitive-concept C1644 C1641) (define-primitive-concept C1645 C1641) (define-primitive-concept C1646 C1641) (define-primitive-concept C1647 C1639) (define-primitive-concept C1648 C1639) (define-primitive-concept C1649 C759) (define-primitive-concept C1650 C1649) (define-primitive-concept C1651 C1649) (define-primitive-concept C1652 C1649) (define-primitive-concept C1653 C1652) (define-primitive-concept C1654 C1652) (define-concept C1655 (AND C103 (SOME R86 C481))) (define-concept C1656 (AND C103 (SOME R86 C469))) (define-concept C1657 (AND C103 (SOME R86 C482))) (define-concept C1658 (AND C103 (SOME R86 C497))) (define-concept C1659 (AND C103 (SOME R86 C465))) (define-concept C1660 (AND C103 (SOME R86 C461))) (define-concept C1661 (AND C103 (SOME R86 C463))) (define-concept C1662 (AND C103 (SOME R86 C460))) (define-concept C1663 (AND C103 (SOME R86 C460) (SOME R86 C465))) (define-concept C1664 (AND C1456 (SOME R146 C300))) (define-concept C1665 (AND C1456 (SOME R146 C301))) (define-concept C1666 (AND C68 (SOME R147 C1456))) (define-concept C1667 (AND C21 (SOME R232 C80))) (define-concept C1668 (AND C21 (SOME R232 C77))) (define-concept C1669 (AND C21 (SOME R232 C79))) (define-concept C1670 (AND C21 (SOME R278 C91))) (define-concept C1671 (AND C917 (SOME R202 C1136))) (define-primitive-concept C1672) (define-concept C1673 (AND C1046 (SOME R216 C1672) (SOME R218 C268))) (define-primitive-concept C1674) (define-concept C1675 (AND C1046 (SOME R216 C1674) (SOME R218 C268))) (define-primitive-concept C1676) (define-concept C1677 (AND C1046 (SOME R216 C1676) (SOME R218 C268))) (define-primitive-concept C1678) (define-concept C1679 (AND C1046 (SOME R216 C1678) (SOME R218 C268))) (define-primitive-concept C1680) (define-concept C1681 (AND C1046 (SOME R216 C1680) (SOME R218 C268))) (define-primitive-concept C1682) (define-concept C1683 (AND C1046 (SOME R216 C1682) (SOME R218 C267))) (define-primitive-concept C1684) (define-concept C1685 (AND C1046 (SOME R216 C1684) (SOME R218 C267))) (define-primitive-concept C1686) (define-concept C1687 (AND C1046 (SOME R216 C1686) (SOME R218 C267))) (define-primitive-concept C1688) (define-concept C1689 (AND C1046 (SOME R216 C1688) (SOME R218 C267))) (define-concept C1690 (AND C1046 (SOME R216 C1672) (SOME R218 C269))) (define-concept C1691 (AND C935 (SOME R202 C1254))) (define-concept C1692 (AND C935 (SOME R202 C1253))) (define-concept C1693 (AND C935 (SOME R202 C1255))) (define-concept C1694 (AND C29 (SOME R348 C1691))) (define-concept C1695 (AND C29 (SOME R348 C1692))) (define-concept C1696 (AND C29 (SOME R348 C1693))) (define-concept C1697 (AND C29 (SOME R166 C1262))) (define-concept C1698 (AND C20 (SOME R166 C1272))) (define-concept C1699 (AND C21 (SOME R166 C1272))) (define-concept C1700 (AND C31 (SOME R166 C1265))) (define-concept C1701 (AND C31 (SOME R166 C1264))) (define-concept C1702 (AND C31 (SOME R166 C1268))) (define-concept C1703 (AND C31 (SOME R166 C1267))) (define-concept C1704 (AND C920 (SOME R202 C1181))) (define-concept C1705 (AND C920 (SOME R202 C1177))) (define-concept C1706 (AND C920 (SOME R202 C1178))) (define-concept C1707 (AND C920 (SOME R202 C1179))) (define-concept C1708 (AND C920 (SOME R202 C1180))) (define-concept C1709 (AND C920 (SOME R202 C1182))) (define-concept C1710 (AND C920 (SOME R202 C1183))) (define-concept C1711 (AND C20 (SOME R268 (AND C920 (SOME R202 C1177))))) (define-concept C1712 (AND C20 (SOME R268 (AND C920 (SOME R202 C1178))))) (define-concept C1713 (AND C20 (SOME R268 (AND C920 (SOME R202 C1179))))) (define-concept C1714 (AND C20 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C1715 (AND C20 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C1716 (AND C21 (SOME R268 (AND C920 (SOME R202 C1178))))) (define-concept C1717 (AND C21 (SOME R268 (AND C920 (SOME R202 C1179))))) (define-concept C1718 (AND C21 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C1719 (AND C21 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C1720 (AND C21 (SOME R284 (AND C917 (SOME R202 C1136))))) (define-concept C1721 (AND C20 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C1722 (AND C21 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C1723 (AND C159 (SOME R51 (AND C21 (SOME R268 (AND C920 (SOME R202 C1181))))))) (define-concept C1724 (AND C159 (SOME R51 (AND C21 (SOME R268 (AND C920 (SOME R202 C1179))))))) (define-concept C1725 (AND C159 (SOME R51 (AND C21 (SOME R268 (AND C920 (SOME R202 C1180))))))) (define-concept C1726 (AND C159 (SOME R51 (AND C21 (SOME R268 (AND C920 (SOME R202 C1182))))))) (define-concept C1727 (AND C159 (SOME R51 (AND C21 (SOME R268 (AND C920 (SOME R202 C1178))))))) (define-concept C1728 (AND C37 (SOME R128 C1436))) (define-concept C1729 (AND C29 (SOME R95 C794))) (define-concept C1730 (AND C793 (SOME R128 (AND C21 (SOME R282 (AND C916 (SOME R208 C1133))))))) (define-concept C1731 (AND C1728 (SOME R128 C1437))) (define-concept C1732 (AND C1728 (SOME R128 C1453))) (define-concept C1733 (AND C720 (SOME R129 C1458))) (define-concept C1734 (AND C1459 (SOME R128 C1430))) (define-concept C1735 (AND C37 (SOME R128 C1431))) (define-concept C1736 (AND C37 (SOME R128 C1435))) (define-concept C1737 (AND C21 (SOME R182 C94))) (define-concept C1738 (AND C21 (SOME R182 C95))) (define-concept C1739 (AND C21 (SOME R182 C96))) (define-concept C1740 (AND C21 (SOME R182 C97))) (define-concept C1741 (AND C21 (SOME R182 C98))) (define-concept C1742 (AND C21 (SOME R184 C94))) (define-concept C1743 (AND C21 (SOME R184 C95))) (define-concept C1744 (AND C21 (SOME R184 C96))) (define-concept C1745 (AND C21 (SOME R184 C97))) (define-concept C1746 (AND C21 (SOME R184 C98))) (define-concept C1747 (AND C21 (SOME R178 C100))) (define-concept C1748 (AND C21 (SOME R178 C101))) (define-concept C1749 (AND C21 (SOME R180 C100))) (define-concept C1750 (AND C21 (SOME R180 C101))) (define-concept C1751 (AND C341 (SOME R30 C728))) (define-concept C1752 (AND C341 (SOME R30 C730))) (define-concept C1753 (AND C341 (SOME R30 C731))) (define-concept C1754 (AND C118 (SOME R173 (AND C45 (SOME R129 C767))))) (define-concept C1755 (AND C1724 (SOME R178 C100))) (define-concept C1756 (AND C1420 (SOME R268 (AND C920 (SOME R202 C1179))))) (define-concept C1757 (AND C159 (SOME R51 (AND C1420 (SOME R268 (AND C920 (SOME R202 C1179))))))) (define-concept C1758 (AND C29 (SOME R53 C1756))) (define-concept C1759 (AND C1699 (SOME R29 C1756))) (define-concept C1760 (AND C25 (SOME R268 (AND C920 (SOME R202 C1177))) (SOME R178 C100))) (define-concept C1761 (AND C1755 (SOME R52 C750))) (define-concept C1762 (AND C21 (SOME R29 (AND C21 (SOME R268 C1705))) (SOME R166 C1272))) (define-concept C1763 (AND C21 (SOME R29 (AND C25 (SOME R268 C1705))) (SOME R166 C1272))) (define-concept C1764 (AND C21 (SOME R30 C724))) (define-concept C1765 (AND C1419 (SOME R30 C723))) (define-concept C1766 (AND C1419 (SOME R30 C734))) (define-concept C1767 (AND C337 (SOME R30 C724))) (define-concept C1768 (AND C30 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C1769 (AND C151 (SOME R21 C1725))) (define-concept C1770 (AND C151 (SOME R95 C1736))) (define-concept C1771 (AND C1698 (SOME R29 C418))) (define-concept C1772 (AND C37 (SOME R178 C100))) (define-concept C1773 (AND C37 (SOME R180 C100))) (define-concept C1774 (AND C36 (SOME R178 C100))) (define-concept C1775 (AND C36 (SOME R180 C100))) (define-concept C1776 (AND C35 (SOME R178 C100))) (define-concept C1777 (AND C35 (SOME R180 C100))) (define-concept C1778 (AND C30 (SOME R178 C100))) (define-concept C1779 (AND C30 (SOME R180 C100))) (define-concept C1780 (AND C10 (SOME R178 C100))) (define-concept C1781 (AND C10 (SOME R180 C100))) (define-concept C1782 (AND C874 (SOME R202 C1106))) (define-concept C1783 (AND C874 (SOME R202 C1107))) (define-concept C1784 (AND C872 (SOME R208 C1026))) (define-concept C1785 (AND C872 (SOME R208 C1028))) (define-concept C1786 (AND C872 (SOME R204 C1016))) (define-concept C1787 (AND C872 (SOME R204 C1017))) (define-concept C1788 (AND C720 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C1789 (AND C720 (SOME R348 (AND C935 (SOME R202 C1253))) (SOME R129 C843))) (define-concept C1790 (AND C21 (SOME R30 C1789))) (define-concept C1791 (AND C308 (SOME R168 C1274))) (define-concept C1792 (AND C1791 (SOME R344 (AND C947 (SOME R202 C1000))))) (define-concept C1793 (AND C308 (SOME R168 C1273))) (define-concept C1794 (AND C21 (SOME R278 C90))) (define-concept C1795 (AND C381 (SOME R320 C1224))) (define-concept C1796 (AND C381 (SOME R320 C1222))) (define-concept C1797 (AND C152 (SOME R13 C444) (SOME R314 C1216))) (define-concept C1798 (AND C1797 (SOME R163 (AND C868 (SOME R202 C1051))))) (define-concept C1799 (AND C152 (SOME R13 C443) (SOME R314 C1216))) (define-concept C1800 (AND C1799 (SOME R163 (AND C868 (SOME R202 C1051))))) (define-concept C1801 (AND C352 (SOME R19 C465))) (define-concept C1802 (AND C1794 (SOME R284 (AND C917 (SOME R202 C1150))))) (define-concept C1803 (AND C1794 (SOME R284 (AND C917 (SOME R202 C1151))))) (define-concept C1804 (AND C1803 (SOME R13 C426))) (define-concept C1805 (AND C940 (SOME R204 C1019))) (define-concept C1806 (AND C941 (SOME R204 C1019))) (define-concept C1807 (AND C940 (SOME R204 C1017))) (define-concept C1808 (AND C940 (SOME R204 C1016))) (define-concept C1809 (AND C940 (SOME R204 C1018))) (define-concept C1810 (AND C941 (SOME R204 C1017))) (define-concept C1811 (AND C941 (SOME R204 C1016))) (define-concept C1812 (AND C941 (SOME R204 C1018))) (define-concept C1813 (AND C942 (SOME R204 C1019))) (define-concept C1814 (AND C942 (SOME R204 C1017))) (define-concept C1815 (AND C942 (SOME R204 C1016))) (define-concept C1816 (AND C942 (SOME R204 C1018))) (define-concept C1817 (AND C933 (SOME R204 C1016))) (define-concept C1818 (AND C31 (SOME R30 C1351) (SOME R30 C1347))) (define-concept C1819 (AND C1698 (SOME R29 C173))) (define-concept C1820 (AND C1698 (SOME R29 C194))) (define-concept C1821 (AND C308 (SOME R168 C1276))) (define-concept C1822 (AND C1591 (SOME R94 C461))) (define-concept C1823 (AND C1603 (SOME R94 C461))) (define-concept C1824 (AND C1289 (SOME R30 C1334) (SOME R30 C1350))) (define-concept C1825 (AND C936 (SOME R353 (AND C1350 (SOME R45 C1788))))) (define-concept C1826 (AND C1825 (SOME R204 C1016))) (define-concept C1827 (AND C767 (SOME R122 C1825))) (define-concept C1828 (AND C10 (SOME R190 C1826))) (define-concept C1829 (AND C936 (SOME R353 (AND C1340 (SOME R45 C1788))))) (define-concept C1830 (AND C1829 (SOME R204 C1016))) (define-concept C1831 (AND C767 (SOME R122 C1829))) (define-concept C1832 (AND C10 (SOME R190 C1830))) (define-concept C1833 (AND C936 (SOME R353 (AND C1336 (SOME R45 C1788))))) (define-concept C1834 (AND C1833 (SOME R204 C1016))) (define-concept C1835 (AND C767 (SOME R122 C1833))) (define-concept C1836 (AND C936 (SOME R353 (AND C1824 (SOME R45 C1788))))) (define-concept C1837 (AND C1836 (SOME R204 C1016))) (define-concept C1838 (AND C767 (SOME R122 C1836))) (define-concept C1839 (AND C936 (SOME R353 (AND C1352 (SOME R45 C1788))))) (define-concept C1840 (AND C1839 (SOME R204 C1016))) (define-concept C1841 (AND C767 (SOME R122 C1839))) (define-concept C1842 (AND C10 (SOME R190 C1840))) (define-concept C1843 (AND C936 (SOME R353 (AND C1330 (SOME R45 C749))))) (define-concept C1844 (AND C1843 (SOME R204 C1016))) (define-concept C1845 (AND C767 (SOME R122 C1843))) (define-concept C1846 (AND C10 (SOME R190 C1844))) (define-concept C1847 (AND C936 (SOME R353 (AND C1308 (SOME R45 C1788))))) (define-concept C1848 (AND C1847 (SOME R204 C1016))) (define-concept C1849 (AND C767 (SOME R122 C1847))) (define-concept C1850 (AND C10 (SOME R190 C1848))) (define-concept C1851 (AND C936 (SOME R353 (AND C1307 (SOME R45 C1788))))) (define-concept C1852 (AND C1851 (SOME R204 C1016))) (define-concept C1853 (AND C767 (SOME R122 C1851))) (define-concept C1854 (AND C10 (SOME R190 C1852))) (define-concept C1855 (AND C936 (SOME R353 (AND C1299 (SOME R45 C1788))))) (define-concept C1856 (AND C1855 (SOME R204 C1016))) (define-concept C1857 (AND C767 (SOME R122 C1855))) (define-concept C1858 (AND C10 (SOME R190 C1856))) (define-concept C1859 (AND C936 (SOME R353 (AND C1296 (SOME R45 C1788))))) (define-concept C1860 (AND C1859 (SOME R204 C1017))) (define-concept C1861 (AND C767 (SOME R122 C1859))) (define-concept C1862 (AND C10 (SOME R190 C1860))) (define-concept C1863 (AND C901 (SOME R291 (AND C176 (SOME R47 C1788))))) (define-concept C1864 (AND C1863 (SOME R204 C1016))) (define-concept C1865 (AND C767 (SOME R122 C1863))) (define-concept C1866 (AND C10 (SOME R190 C1864))) (define-concept C1867 (AND C901 (SOME R291 (AND C178 (SOME R47 C1788))))) (define-concept C1868 (AND C1867 (SOME R204 C1016))) (define-concept C1869 (AND C767 (SOME R122 C1867))) (define-concept C1870 (AND C901 (SOME R291 (AND C179 (SOME R47 C1788))))) (define-concept C1871 (AND C1870 (SOME R204 C1016))) (define-concept C1872 (AND C767 (SOME R122 C1870))) (define-concept C1873 (AND C10 (SOME R190 C1871))) (define-concept C1874 (AND C901 (SOME R291 (AND C177 (SOME R47 C1788))))) (define-concept C1875 (AND C1874 (SOME R204 C1016))) (define-concept C1876 (AND C1874 (SOME R204 C1017))) (define-concept C1877 (AND C767 (SOME R122 C1874))) (define-concept C1878 (AND C10 (SOME R190 C1875))) (define-concept C1879 (AND C10 (SOME R190 C1876))) (define-concept C1880 (AND C901 (SOME R291 (AND C180 (SOME R47 C1788))))) (define-concept C1881 (AND C1880 (SOME R204 C1016))) (define-concept C1882 (AND C1880 (SOME R204 C1017))) (define-concept C1883 (AND C767 (SOME R122 C1880))) (define-concept C1884 (AND C10 (SOME R190 C1881))) (define-concept C1885 (AND C10 (SOME R190 C1882))) (define-concept C1886 (AND C901 (SOME R291 (AND C175 (SOME R47 C1788))))) (define-concept C1887 (AND C1886 (SOME R204 C1016))) (define-concept C1888 (AND C1886 (SOME R204 C1017))) (define-concept C1889 (AND C767 (SOME R122 C1886))) (define-concept C1890 (AND C10 (SOME R190 C1887))) (define-concept C1891 (AND C936 (SOME R353 (AND C1334 (SOME R45 C1788))))) (define-concept C1892 (AND C1891 (SOME R204 C1016))) (define-concept C1893 (AND C1891 (SOME R204 C1017))) (define-concept C1894 (AND C767 (SOME R122 C1891))) (define-concept C1895 (AND C10 (SOME R190 C1893))) (define-concept C1896 (AND C175 (SOME R272 (AND C915 (SOME R212 C1024))))) (define-concept C1897 (AND C175 (SOME R272 (AND C915 (SOME R212 C1023))))) (define-concept C1898 (AND C175 (SOME R270 (AND C914 (SOME R202 C1197))))) (define-concept C1899 (AND C901 (SOME R291 (AND C1898 (SOME R47 C1788))) (SOME R204 C1016))) (define-concept C1900 (AND C901 (SOME R291 (AND C1896 (SOME R47 C1788))) (SOME R204 C1016))) (define-concept C1901 (AND C901 (SOME R291 (AND C1897 (SOME R47 C1788))) (SOME R204 C1016))) (define-concept C1902 (AND C10 (SOME R190 C1900))) (define-concept C1903 (AND C10 (SOME R190 C1901))) (define-concept C1904 (AND C10 (SOME R190 C1899) (SOME R190 C1901) (SOME R190 C1893))) (define-concept C1905 (AND C805 (SOME R94 (AND C175 (SOME R47 C1788))))) (define-concept C1906 (AND C767 (SOME R34 (AND C805 (SOME R94 (AND C175 (SOME R47 C1788))) (SOME R386 (AND C885 (SOME R206 C1673))))))) (define-concept C1907 (AND C134 (SOME R129 (AND C1905 (SOME R386 (AND C885 (SOME R206 C1673))) (SOME R368 (AND C875 (SOME R202 C1114))))))) (define-concept C1908 (AND C1907 (SOME R294 (AND C900 (SOME R204 C1016))))) (define-concept C1909 (AND C118 (SOME R173 (AND C1122 (SOME R203 (AND C892 (SOME R201 C67))) (SOME R129 C772))))) (define-concept C1910 (AND C772 (SOME R152 C1486))) (define-concept C1911 (AND C772 (SOME R152 C1487))) (define-concept C1912 (AND C768 (SOME R122 (AND C874 (SOME R373 C300) (SOME R173 (AND C53 (SOME R405 C1388))))))) (define-concept C1913 (AND C1106 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1388))))))) (define-concept C1914 (AND C1107 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1388))))))) (define-concept C1915 (AND C781 (SOME R126 C749))) (define-concept C1916 (AND C749 (SOME R166 C1280))) (define-concept C1917 (AND C1915 (SOME R152 C1514))) (define-concept C1918 (AND C1916 (SOME R129 C1917))) (define-concept C1919 (AND C1915 (SOME R152 C1521))) (define-concept C1920 (AND C1915 (SOME R34 (AND C803 (SOME R94 C749) (SOME R102 C394))))) (define-concept C1921 (AND C1916 (SOME R129 C1920))) (define-concept C1922 (AND C773 (SOME R96 C1916))) (define-concept C1923 (AND C1922 (SOME R128 (AND C52 (SOME R407 C300))))) (define-concept C1924 (AND C1922 (SOME R128 (AND C53 (SOME R407 C300))))) (define-concept C1925 (AND C770 (SOME R34 C1922) (SOME R34 C1912))) (define-concept C1926 (AND C781 (SOME R126 C720))) (define-concept C1927 (AND C720 (SOME R166 C1280))) (define-concept C1928 (AND C1926 (SOME R150 C1521) (SOME R94 C333))) (define-concept C1929 (AND C1926 (SOME R150 C1521) (SOME R94 C331))) (define-concept C1930 (AND C770 (SOME R34 (AND C773 (SOME R94 C1927))))) (define-concept C1931 (AND C1930 (SOME R128 (AND C52 (SOME R407 C300))))) (define-concept C1932 (AND C1930 (SOME R128 (AND C53 (SOME R407 C300))))) (define-concept C1933 (AND C767 (SOME R122 (AND C873 (SOME R367 (AND C864 (SOME R94 C194))))))) (define-concept C1934 (AND C1698 (SOME R29 C173) (SOME R30 C1818))) (define-concept C1935 (AND C1698 (SOME R29 C173) (SOME R30 C1377))) (define-concept C1936 (AND C300 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C1937 (AND C300 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C1938 (AND C194 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C1939 (AND C194 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C1940 (AND C194 (SOME R95 C864))) (define-concept C1941 (AND C300 (SOME R95 C864))) (define-concept C1942 (AND C118 (SOME R173 (AND C1093 (SOME R129 C1933))))) (define-concept C1943 (AND C118 (SOME R173 (AND C1094 (SOME R129 (AND C1933 (SOME R34 (AND C772 (SOME R122 (AND C914 (SOME R271 C194))) (SOME R128 C1193))))))))) (define-concept C1944 (AND C118 (SOME R173 (AND C1095 (SOME R129 (AND C1933 (SOME R34 (AND C772 (SOME R122 (AND C914 (SOME R271 C194))) (SOME R128 C1192))))))))) (define-concept C1945 (AND C33 (SOME R128 (AND C300 (SOME R90 (AND C34 (SOME R368 (AND C875 (SOME R202 C1115))))))))) (define-concept C1946 (AND C33 (SOME R128 (AND C300 (SOME R332 (AND C939 (SOME R202 C952))))))) (define-concept C1947 (AND C1388 (SOME R131 (AND C862 (SOME R91 C1400) (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C1948 (AND C1388 (SOME R131 (AND C862 (SOME R91 C1400) (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C1949 (AND C1388 (SOME R90 (AND C33 (SOME R128 (AND C300 (SOME R90 (AND C34 (SOME R368 (AND C875 (SOME R202 C1115))))))))))) (define-concept C1950 (AND C1388 (SOME R90 (AND C33 (SOME R128 (AND C300 (SOME R332 (AND C939 (SOME R202 C952))))))))) (define-primitive-concept C1951 C1388) (define-primitive-concept C1952 C1388) (define-primitive-concept C1953 C1388) (define-primitive-concept C1954 C1388) (define-primitive-concept C1955 C1388) (define-primitive-concept C1956 C1388) (define-primitive-concept C1957 C1388) (define-primitive-concept C1958 C1388) (define-primitive-concept C1959 C1388) (define-primitive-concept C1960 C1388) (define-primitive-concept C1961 C1388) (define-primitive-concept C1962 C1388) (define-primitive-concept C1963 C1388) (define-primitive-concept C1964 C1388) (define-primitive-concept C1965 C1388) (define-primitive-concept C1966 C1951) (define-primitive-concept C1967 C1951) (define-primitive-concept C1968 C1951) (define-primitive-concept C1969 C1967) (define-primitive-concept C1970 C1967) (define-primitive-concept C1971 C1967) (define-primitive-concept C1972 C1967) (define-primitive-concept C1973 C1967) (define-primitive-concept C1974 C1967) (define-primitive-concept C1975 C1967) (define-primitive-concept C1976 C1967) (define-primitive-concept C1977 C1968) (define-primitive-concept C1978 C1968) (define-primitive-concept C1979 C1968) (define-primitive-concept C1980 C1968) (define-primitive-concept C1981 C1968) (define-primitive-concept C1982 C1968) (define-primitive-concept C1983 C1952) (define-primitive-concept C1984 C1952) (define-primitive-concept C1985 C1952) (define-primitive-concept C1986 C1953) (define-primitive-concept C1987 C1953) (define-primitive-concept C1988 C1953) (define-primitive-concept C1989 C1953) (define-primitive-concept C1990 C1954) (define-primitive-concept C1991 C1954) (define-primitive-concept C1992 C1955) (define-primitive-concept C1993 C1955) (define-primitive-concept C1994 C1955) (define-primitive-concept C1995 C1955) (define-primitive-concept C1996 C1956) (define-primitive-concept C1997 C1956) (define-primitive-concept C1998 C1956) (define-primitive-concept C1999 C1957) (define-primitive-concept C2000 C1957) (define-primitive-concept C2001 C1958) (define-primitive-concept C2002 C1958) (define-primitive-concept C2003 C1958) (define-primitive-concept C2004 C1958) (define-primitive-concept C2005 C1389) (define-primitive-concept C2006 C1389) (define-primitive-concept C2007 C1389) (define-primitive-concept C2008 C1389) (define-primitive-concept C2009 C1389) (define-primitive-concept C2010 C1389) (define-concept C2011 (AND C1106 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1967))))))) (define-concept C2012 (AND C1107 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1967))))))) (define-concept C2013 (AND C1106 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1971))))))) (define-concept C2014 (AND C1107 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1971))))))) (define-concept C2015 (AND C1106 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1986))))))) (define-concept C2016 (AND C1107 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1986))))))) (define-concept C2017 (AND C1106 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1968))))))) (define-concept C2018 (AND C1107 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1968))))))) (define-primitive-concept C2019 C300) (define-primitive-concept C2020 C300) (define-primitive-concept C2021 C300) (define-primitive-concept C2022 C300) (define-primitive-concept C2023 C300) (define-primitive-concept C2024 C300) (define-primitive-concept C2025 C300) (define-primitive-concept C2026 C300) (define-primitive-concept C2027 C300) (define-primitive-concept C2028 C300) (define-primitive-concept C2029 C300) (define-primitive-concept C2030 C300) (define-primitive-concept C2031 C300) (define-primitive-concept C2032 C300) (define-primitive-concept C2033 C300) (define-primitive-concept C2034 C300) (define-primitive-concept C2035 C300) (define-primitive-concept C2036 C300) (define-primitive-concept C2037 C300) (define-primitive-concept C2038 C300) (define-primitive-concept C2039 C300) (define-primitive-concept C2040 C300) (define-primitive-concept C2041 C300) (define-primitive-concept C2042 C300) (define-primitive-concept C2043 C300) (define-primitive-concept C2044 C300) (define-primitive-concept C2045 C300) (define-primitive-concept C2046 C300) (define-primitive-concept C2047 C300) (define-primitive-concept C2048 C2019) (define-primitive-concept C2049 C2020) (define-primitive-concept C2050 C2020) (define-primitive-concept C2051 C2021) (define-primitive-concept C2052 C2022) (define-primitive-concept C2053 C2023) (define-primitive-concept C2054 C2024) (define-primitive-concept C2055 C2024) (define-primitive-concept C2056 C2024) (define-primitive-concept C2057 C2025) (define-primitive-concept C2058 C2025) (define-primitive-concept C2059 C2025) (define-primitive-concept C2060 C2027) (define-primitive-concept C2061 C2027) (define-primitive-concept C2062 C2027) (define-primitive-concept C2063 C2027) (define-primitive-concept C2064 C2027) (define-primitive-concept C2065 C2027) (define-primitive-concept C2066 C2027) (define-primitive-concept C2067 C2027) (define-primitive-concept C2068 C2027) (define-primitive-concept C2069 C2027) (define-primitive-concept C2070 C2027) (define-primitive-concept C2071 C2027) (define-primitive-concept C2072 C2027) (define-primitive-concept C2073 C2027) (define-primitive-concept C2074 C2028) (define-primitive-concept C2075 C2028) (define-primitive-concept C2076 C2028) (define-primitive-concept C2077 C2029) (define-primitive-concept C2078 C2029) (define-primitive-concept C2079 C2029) (define-primitive-concept C2080 C2029) (define-primitive-concept C2081 C2029) (define-primitive-concept C2082 C2029) (define-primitive-concept C2083 C2029) (define-primitive-concept C2084 C2029) (define-primitive-concept C2085 C2029) (define-primitive-concept C2086 C2029) (define-primitive-concept C2087 C2077) (define-primitive-concept C2088 C2078) (define-primitive-concept C2089 C2078) (define-primitive-concept C2090 C2078) (define-primitive-concept C2091 C2078) (define-primitive-concept C2092 C2079) (define-primitive-concept C2093 C2080) (define-primitive-concept C2094 C2081) (define-primitive-concept C2095 C2081) (define-primitive-concept C2096 C2082) (define-primitive-concept C2097 C2083) (define-primitive-concept C2098 C2083) (define-primitive-concept C2099 C2083) (define-primitive-concept C2100 C2083) (define-primitive-concept C2101 C2083) (define-primitive-concept C2102 C2083) (define-primitive-concept C2103 C2083) (define-primitive-concept C2104 C2083) (define-primitive-concept C2105 C2083) (define-primitive-concept C2106 C2083) (define-primitive-concept C2107 C2083) (define-primitive-concept C2108 C2083) (define-primitive-concept C2109 C2083) (define-primitive-concept C2110 C2083) (define-primitive-concept C2111 C2083) (define-primitive-concept C2112 C2083) (define-primitive-concept C2113 C2083) (define-primitive-concept C2114 C2083) (define-primitive-concept C2115 C2083) (define-primitive-concept C2116 C2083) (define-primitive-concept C2117 C2083) (define-primitive-concept C2118 C2083) (define-primitive-concept C2119 C2083) (define-primitive-concept C2120 C2083) (define-primitive-concept C2121 C2083) (define-primitive-concept C2122 C2083) (define-primitive-concept C2123 C2083) (define-primitive-concept C2124 C2083) (define-primitive-concept C2125 C2083) (define-primitive-concept C2126 C2083) (define-primitive-concept C2127 C2083) (define-primitive-concept C2128 C2083) (define-primitive-concept C2129 C2083) (define-primitive-concept C2130 C2083) (define-primitive-concept C2131 C2083) (define-primitive-concept C2132 C2097) (define-primitive-concept C2133 C2098) (define-primitive-concept C2134 C2103) (define-primitive-concept C2135 C2084) (define-primitive-concept C2136 C2085) (define-primitive-concept C2137 C2085) (define-primitive-concept C2138 C2085) (define-primitive-concept C2139 C2085) (define-primitive-concept C2140 C2086) (define-primitive-concept C2141 C2086) (define-primitive-concept C2142 C2086) (define-primitive-concept C2143 C2030) (define-primitive-concept C2144 C2031) (define-primitive-concept C2145 C2031) (define-primitive-concept C2146 C2032) (define-primitive-concept C2147 C2033) (define-primitive-concept C2148 C2034) (define-primitive-concept C2149 C2035) (define-primitive-concept C2150 C2035) (define-primitive-concept C2151 C2036) (define-primitive-concept C2152 C2036) (define-primitive-concept C2153 C2036) (define-primitive-concept C2154 C2036) (define-primitive-concept C2155 C2036) (define-primitive-concept C2156 C2036) (define-primitive-concept C2157 C2036) (define-primitive-concept C2158 C2036) (define-primitive-concept C2159 C2038) (define-primitive-concept C2160 C2038) (define-primitive-concept C2161 C2039) (define-primitive-concept C2162 C2040) (define-primitive-concept C2163 C2041) (define-primitive-concept C2164 C2043) (define-primitive-concept C2165 C2043) (define-primitive-concept C2166 C2044) (define-primitive-concept C2167 C2044) (define-primitive-concept C2168 C2044) (define-primitive-concept C2169 C2044) (define-primitive-concept C2170 C2044) (define-primitive-concept C2171 C2044) (define-primitive-concept C2172 C2044) (define-primitive-concept C2173 C2044) (define-primitive-concept C2174 C2044) (define-primitive-concept C2175 C2045) (define-primitive-concept C2176 C2046) (define-primitive-concept C2177 C2047) (define-primitive-concept C2178 C2037) (define-primitive-concept C2179 C2037) (define-primitive-concept C2180 C2037) (define-primitive-concept C2181 C2037) (define-primitive-concept C2182 C2037) (define-primitive-concept C2183 C2037) (define-primitive-concept C2184 C2042) (define-primitive-concept C2185 C2042) (define-primitive-concept C2186 C2042) (define-primitive-concept C2187 C2042) (define-primitive-concept C2188 C2042) (define-primitive-concept C2189 C2026) (define-primitive-concept C2190 C2026) (define-primitive-concept C2191 C303) (define-primitive-concept C2192 C2191) (define-primitive-concept C2193 C303) (define-primitive-concept C2194 C2193) (define-primitive-concept C2195 C2102) (define-primitive-concept C2196 C2110) (define-primitive-concept C2197 C2100) (define-primitive-concept C2198 C68) (define-primitive-concept C2199 C2198) (define-primitive-concept C2200 C2199) (define-primitive-concept C2201 C2199) (define-primitive-concept C2202 C2198) (define-primitive-concept C2203 C2202) (define-primitive-concept C2204 C2202) (define-primitive-concept C2205 C2202) (define-primitive-concept C2206 C2202) (define-primitive-concept C2207 C2202) (define-primitive-concept C2208 C2198) (define-primitive-concept C2209 C2208) (define-primitive-concept C2210 C2198) (define-primitive-concept C2211 C2210) (define-primitive-concept C2212 C2198) (define-primitive-concept C2213 C2198) (define-primitive-concept C2214 C2213) (define-primitive-concept C2215 C2213) (define-primitive-concept C2216 C2198) (define-primitive-concept C2217 C2198) (define-primitive-concept C2218 C2217) (define-primitive-concept C2219 C2217) (define-primitive-concept C2220 C2217) (define-primitive-concept C2221 C2198) (define-concept C2222 (AND C861 (SOME R360 (AND C877 (SOME R202 C1100))))) (define-concept C2223 (AND C861 (SOME R360 (AND C877 (SOME R202 C1101))))) (define-concept C2224 (AND C861 (SOME R360 (AND C877 (SOME R202 C1098))))) (define-concept C2225 (AND C861 (SOME R360 (AND C877 (SOME R202 C1099))))) (define-concept C2226 (AND C300 (SOME R282 (AND C916 (SOME R202 C1157))))) (define-concept C2227 (AND C300 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C2228 (AND C194 (SOME R276 (AND C921 (SOME R202 C1189))))) (define-concept C2229 (AND C300 (SOME R276 (AND C921 (SOME R202 C1189))))) (define-concept C2230 (AND C34 (SOME R128 C197))) (define-concept C2231 (AND C803 (SOME R94 C1380) (SOME R100 C21))) (define-concept C2232 (AND C2231 (SOME R368 (AND C875 (SOME R202 C1114))))) (define-concept C2233 (AND C2231 (SOME R368 (AND C875 (SOME R202 C1114))) (SOME R398 (AND C890 (SOME R202 C1084))))) (define-concept C2234 (AND C2231 (SOME R368 (AND C875 (SOME R202 C1114))) (SOME R398 (AND C890 (SOME R202 C1083))))) (define-concept C2235 (AND C803 (SOME R96 C1380) (SOME R100 C497))) (define-concept C2236 (AND C803 (SOME R96 C1380) (SOME R100 C333))) (define-concept C2237 (AND C803 (SOME R96 C1380) (SOME R100 C341))) (define-primitive-concept C2238 C181) (define-primitive-concept C2239 C1381) (define-primitive-concept C2240 C1381) (define-primitive-concept C2241 C1381) (define-primitive-concept C2242 C1381) (define-primitive-concept C2243 C1381) (define-primitive-concept C2244 C1380) (define-primitive-concept C2245 C2244) (define-primitive-concept C2246 C2244) (define-primitive-concept C2247 C2244) (define-primitive-concept C2248 C2244) (define-primitive-concept C2249 C2244) (define-primitive-concept C2250 C2244) (define-primitive-concept C2251 C2244) (define-primitive-concept C2252 C2244) (define-primitive-concept C2253 C2244) (define-primitive-concept C2254 C2244) (define-primitive-concept C2255 C2244) (define-primitive-concept C2256 C2244) (define-primitive-concept C2257 C2244) (define-concept C2258 (AND C902 (SOME R204 C1016) (SOME R297 C383))) (define-concept C2259 (AND C902 (SOME R210 C1030) (SOME R297 C383))) (define-concept C2260 (AND C902 (SOME R210 C1032) (SOME R297 C383))) (define-concept C2261 (AND C803 (SOME R96 C1350))) (define-concept C2262 (AND C803 (SOME R94 C29) (SOME R100 C181))) (define-concept C2263 (AND C803 (SOME R100 C181) (SOME R102 C720) (SOME R96 C1350))) (define-concept C2264 (AND C1703 (SOME R133 C1461))) (define-concept C2265 (AND C7 (SOME R133 C1461))) (define-concept C2266 (AND C29 (SOME R133 C1461))) (define-concept C2267 (AND C32 (SOME R133 C1461))) (define-concept C2268 (AND C885 (SOME R387 C1461))) (define-concept C2269 (AND C874 (SOME R173 (AND C53 (SOME R405 C1355))))) (define-concept C2270 (AND C874 (SOME R173 (AND C53 (SOME R405 C1355))) (SOME R202 C1107))) (define-concept C2271 (AND C874 (SOME R173 (AND C53 (SOME R405 C1355))) (SOME R202 C1106))) (define-concept C2272 (AND C803 (SOME R102 C720) (SOME R100 C181) (SOME R96 C1350) (SOME R366 (AND C873 (SOME R202 C1095))) (SOME R134 (AND C181 (SOME R372 (AND C874 (SOME R173 (AND C53 (SOME R405 C1355))) (SOME R202 C1107))))))) (define-concept C2273 (AND C803 (SOME R102 C720) (SOME R100 C181) (SOME R96 C1350) (SOME R366 (AND C873 (SOME R202 C1095))) (SOME R134 (AND C1355 (SOME R404 C52))))) (define-concept C2274 (AND C803 (SOME R102 C720) (SOME R100 C181) (SOME R96 C1350) (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C2275 (AND C1461 (SOME R34 (AND C803 (SOME R102 C720) (SOME R100 C181) (SOME R96 C1350) (SOME R366 (AND C873 (SOME R202 C1095))) (SOME R134 (AND C181 (SOME R372 (AND C874 (SOME R173 (AND C53 (SOME R405 C1355))) (SOME R202 C1107))))))))) (define-concept C2276 (AND C1461 (SOME R34 (AND C803 (SOME R102 C720) (SOME R100 C181) (SOME R96 C1350) (SOME R366 (AND C873 (SOME R202 C1095))) (SOME R134 (AND C1355 (SOME R404 C52))))))) (define-concept C2277 (AND C1461 (SOME R364 (AND C879 (SOME R202 C1112))))) (define-primitive-concept C2278 C128) (define-concept C2279 (AND C2278 (SOME R330 C71))) (define-concept C2280 (AND C2278 (SOME R330 C72))) (define-concept C2281 (AND C347 (SOME R29 C461))) (define-concept C2282 (AND C348 (SOME R29 C461))) (define-concept C2283 (AND C349 (SOME R29 C461))) (define-concept C2284 (AND C351 (SOME R25 C461))) (define-concept C2285 (AND C350 (SOME R25 C461))) (define-concept C2286 (AND C325 (SOME R25 C516))) (define-concept C2287 (AND C1751 (SOME R25 C518))) (define-concept C2288 (AND C1725 (SOME R51 C518))) (define-concept C2289 (AND C718 (SOME R29 (AND C1699 (SOME R29 C518))))) (define-concept C2290 (AND C718 (SOME R29 (AND C1699 (SOME R29 C516))))) (define-concept C2291 (AND C718 (SOME R29 (AND C1699 (SOME R29 C522))))) (define-concept C2292 (AND C793 (SOME R128 (AND C21 (SOME R282 (AND C916 (SOME R208 C1134))))))) (define-concept C2293 (AND C2292 (SOME R91 C341))) (define-concept C2294 (AND C2292 (SOME R91 C1751))) (define-concept C2295 (AND C2292 (SOME R91 C1752))) (define-concept C2296 (AND C2292 (SOME R91 C1753))) (define-concept C2297 (AND C749 (SOME R46 C194))) (define-concept C2298 (AND C749 (SOME R46 C175))) (define-concept C2299 (AND C749 (SOME R44 C750))) (define-concept C2300 (AND C749 (SOME R44 C1350))) (define-concept C2301 (AND C749 (SOME R44 C1371))) (define-concept C2302 (AND C1044 (SOME R203 (AND C1287 (SOME R350 C1260) (SOME R45 C749))))) (define-concept C2303 (AND C1044 (SOME R203 (AND C1287 (SOME R350 C1260) (SOME R45 (AND C29 (SOME R348 (AND C935 (SOME R202 C1254))))))))) (define-concept C2304 (AND C796 (SOME R96 C749))) (define-concept C2305 (AND C803 (SOME R93 C511) (SOME R96 C749))) (define-concept C2306 (AND C2305 (SOME R100 C200) (SOME R102 C518))) (define-concept C2307 (AND C2295 (SOME R368 (AND C875 (SOME R202 C1114))) (SOME R398 (AND C890 (SOME R202 C1083))) (SOME R390 (AND C891 (SOME R204 C1016))))) (define-concept C2308 (AND C2307 (SOME R136 C1817))) (define-concept C2309 (AND C202 (SOME R108 C511))) (define-concept C2310 (AND C202 (SOME R108 C516))) (define-concept C2311 (AND C202 (SOME R108 C518))) (define-concept C2312 (AND C53 (SOME R407 (AND C202 (SOME R108 C511))))) (define-concept C2313 (AND C1735 (SOME R108 C461))) (define-concept C2314 (AND C1456 (SOME R135 C2313))) (define-concept C2315 (AND C2313 (SOME R134 C219))) (define-concept C2316 (AND C2313 (SOME R146 C1703))) (define-concept C2317 (AND C2314 (SOME R146 C300))) (define-concept C2318 (AND C2314 (SOME R146 C2036))) (define-concept C2319 (AND C1761 (SOME R108 C461))) (define-concept C2320 (AND C1735 (SOME R108 C515))) (define-concept C2321 (AND C1735 (SOME R108 C518))) (define-concept C2322 (AND C2321 (SOME R134 C1456))) (define-concept C2323 (AND C2321 (SOME R134 C219))) (define-concept C2324 (AND C2321 (SOME R146 C1703))) (define-concept C2325 (AND C1735 (SOME R108 C520))) (define-concept C2326 (AND C851 (SOME R194 C2306))) (define-concept C2327 (AND C2306 (SOME R368 (AND C875 (SOME R202 C1115))))) (define-concept C2328 (AND C2306 (SOME R370 (AND C872 (SOME R212 C1023))))) (define-concept C2329 (AND C2306 (SOME R370 (AND C872 (SOME R212 C1024))))) (define-concept C2330 (AND C2306 (SOME R390 (AND C891 (SOME R208 C1026))))) (define-concept C2331 (AND C2294 (SOME R91 C2287) (SOME R368 (AND C875 (SOME R202 C1115))))) (define-concept C2332 (AND C2327 (SOME R136 (AND C1571 (SOME R96 C522))))) (define-concept C2333 (AND C10 (SOME R190 (AND C1114 (SOME R203 (AND C875 (SOME R369 C2326))))) (SOME R190 (AND C53 (SOME R407 C1923))))) (define-concept C2334 (AND C797 (SOME R128 (AND C21 (SOME R107 C1442))))) (define-concept C2335 (AND C544 (SOME R107 C1442))) (define-concept C2336 (AND C797 (SOME R96 C544) (SOME R128 C2335))) (define-concept C2337 (AND C10 (SOME R190 (AND C1114 (SOME R203 (AND C875 (SOME R369 C2332))))) (SOME R190 (AND C53 (SOME R407 C2335))))) (define-concept C2338 (AND C1331 (SOME R44 C1299) (SOME R44 C1305))) (define-concept C2339 (AND C1528 (SOME R129 (AND C755 (SOME R154 C111))))) (define-concept C2340 (AND C151 (SOME R284 (AND C917 (SOME R202 C1145))) (SOME R17 C574) (SOME R90 C807))) (define-concept C2341 (AND C723 (SOME R29 C2340))) (define-concept C2342 (AND C723 (SOME R29 C21))) (define-concept C2343 (AND C337 (SOME R90 (AND C794 (SOME R96 C747))))) (define-concept C2344 (AND C563 (SOME R24 C2343))) (define-concept C2345 (AND C159 (SOME R51 (AND C563 (SOME R268 (AND C920 (SOME R202 C1180))))))) (define-concept C2346 (AND C1767 (SOME R25 C563) (SOME R48 C2345))) (define-concept C2347 (AND C1767 (SOME R25 C2344) (SOME R48 C2345))) (define-concept C2348 (AND C339 (SOME R25 C563))) (define-concept C2349 (AND C1770 (SOME R19 C2343) (SOME R163 (AND C868 (SOME R202 C1051))))) (define-concept C2350 (AND C1770 (SOME R19 C2343) (SOME R163 (AND C868 (SOME R202 C1052))))) (define-concept C2351 (AND C563 (SOME R95 C808))) (define-concept C2352 (AND C563 (SOME R95 C809))) (define-concept C2353 (AND C563 (SOME R95 (AND C807 (SOME R182 C95))))) (define-concept C2354 (AND C882 (SOME R383 (AND C807 (SOME R94 C563))))) (define-concept C2355 (AND C27 (SOME R107 C759))) (define-concept C2356 (AND C2355 (SOME R52 (AND C720 (SOME R404 C52))))) (define-concept C2357 (AND C661 (SOME R19 C603))) (define-concept C2358 (AND C660 (SOME R19 C603))) (define-concept C2359 (AND C654 (SOME R19 C603))) (define-concept C2360 (AND C654 (SOME R19 C603) (SOME R312 C1207))) (define-concept C2361 (AND C654 (SOME R19 C603) (SOME R312 C1206))) (define-concept C2362 (AND C663 (SOME R19 (AND C27 (SOME R49 C2360) (SOME R49 C2361))))) (define-concept C2363 (AND C655 (SOME R19 C603) (SOME R312 C1207))) (define-concept C2364 (AND C655 (SOME R19 C603) (SOME R312 C1206))) (define-concept C2365 (AND C657 (SOME R63 C624) (SOME R19 C603))) (define-concept C2366 (AND C657 (SOME R63 C625) (SOME R19 C603))) (define-concept C2367 (AND C657 (SOME R63 C630) (SOME R19 C603))) (define-concept C2368 (AND C2340 (SOME R19 C2362))) (define-concept C2369 (AND C2340 (SOME R19 C2361))) (define-concept C2370 (AND C2340 (SOME R19 C2360))) (define-concept C2371 (AND C2340 (SOME R24 C2369) (SOME R24 C2370) (SOME R24 C2368))) (define-concept C2372 (AND C661 (SOME R19 C605))) (define-concept C2373 (AND C660 (SOME R19 C605))) (define-concept C2374 (AND C656 (SOME R312 C1206))) (define-concept C2375 (AND C661 (SOME R19 C600))) (define-concept C2376 (AND C660 (SOME R19 C600))) (define-concept C2377 (AND C655 (SOME R19 C600) (SOME R312 C1207))) (define-concept C2378 (AND C655 (SOME R19 C600) (SOME R312 C1206))) (define-concept C2379 (AND C654 (SOME R19 C600) (SOME R312 C1207))) (define-concept C2380 (AND C654 (SOME R19 C600) (SOME R312 C1206))) (define-concept C2381 (AND C661 (SOME R19 C601))) (define-concept C2382 (AND C660 (SOME R19 C601))) (define-concept C2383 (AND C657 (SOME R19 C601))) (define-concept C2384 (AND C661 (SOME R19 C602))) (define-concept C2385 (AND C660 (SOME R19 C602))) (define-concept C2386 (AND C654 (SOME R19 C604) (SOME R312 C1207))) (define-concept C2387 (AND C654 (SOME R19 C604) (SOME R312 C1206))) (define-concept C2388 (AND C655 (SOME R19 C604) (SOME R312 C1207))) (define-concept C2389 (AND C655 (SOME R19 C604) (SOME R312 C1206))) (define-concept C2390 (AND C656 (SOME R312 C1207))) (define-concept C2391 (AND C658 (SOME R19 C604))) (define-concept C2392 (AND C657 (SOME R19 C2391))) (define-concept C2393 (AND C345 (SOME R60 C631))) (define-concept C2394 (AND C345 (SOME R60 C632))) (define-concept C2395 (AND C339 (SOME R60 C2393) (SOME R62 C597))) (define-concept C2396 (AND C339 (SOME R60 C2394) (SOME R62 C597))) (define-concept C2397 (AND C339 (SOME R24 C2395) (SOME R24 C2396))) (define-concept C2398 (AND C657 (SOME R19 C604) (SOME R63 C711))) (define-concept C2399 (AND C2340 (SOME R19 C2391))) (define-concept C2400 (AND C2340 (SOME R19 C597))) (define-concept C2401 (AND C563 (SOME R24 C2400) (SOME R24 C2368))) (define-concept C2402 (AND C343 (SOME R242 (AND C907 (SOME R208 C1246) (SOME R174 C597))))) (define-concept C2403 (AND C359 (SOME R27 C563))) (define-concept C2404 (AND C359 (SOME R27 C566))) (define-concept C2405 (AND C359 (SOME R312 C1207) (SOME R27 C566))) (define-concept C2406 (AND C359 (SOME R312 C1206) (SOME R27 C566))) (define-concept C2407 (AND C355 (SOME R314 C1216) (SOME R19 C2405))) (define-concept C2408 (AND C355 (SOME R314 C1216) (SOME R19 C2406))) (define-concept C2409 (AND C339 (SOME R60 C2407) (SOME R62 C2408))) (define-concept C2410 (AND C159 (SOME R51 C566))) (define-concept C2411 (AND C1767 (SOME R25 C566) (SOME R48 C2410))) (define-concept C2412 (AND C151 (SOME R21 C2410))) (define-concept C2413 (AND C2412 (SOME R244 (AND C910 (SOME R208 C1240) (SOME R174 C597))))) (define-concept C2414 (AND C566 (SOME R95 (AND C807 (SOME R382 (AND C882 (SOME R212 C1024))))))) (define-concept C2415 (AND C882 (SOME R383 (AND C813 (SOME R96 C566))))) (define-concept C2416 (AND C882 (SOME R383 (AND C811 (SOME R96 C566))))) (define-concept C2417 (AND C882 (SOME R383 (AND C810 (SOME R96 C566))))) (define-concept C2418 (AND C882 (SOME R383 (AND C812 (SOME R96 C566))))) (define-concept C2419 (AND C882 (SOME R383 (AND C807 (SOME R96 C566))))) (define-concept C2420 (AND C843 (SOME R96 C720))) (define-concept C2421 (AND C765 (SOME R126 (AND C66 (SOME R338 C944))) (SOME R128 (AND C66 (SOME R338 (AND C944 (SOME R202 C975))))))) (define-concept C2422 (AND C765 (SOME R128 (AND C66 (SOME R338 (AND C944 (SOME R202 C970))))))) (define-concept C2423 (AND C765 (SOME R128 (AND C66 (SOME R338 (AND C944 (SOME R202 C971))))))) (define-concept C2424 (AND C765 (SOME R128 (AND C66 (SOME R338 (AND C944 (SOME R202 C973))))))) (define-concept C2425 (AND C765 (SOME R128 (AND C66 (SOME R338 (AND C944 (SOME R202 C972))))))) (define-concept C2426 (AND C765 (SOME R128 (AND C66 (SOME R338 (AND C944 (SOME R202 C974))))))) (define-concept C2427 (AND C1642 (SOME R150 C1484))) (define-concept C2428 (AND C1642 (SOME R150 C1496))) (define-concept C2429 (AND C759 (SOME R34 C2427))) (define-concept C2430 (AND C759 (SOME R34 C2428))) (define-concept C2431 (AND C1636 (SOME R94 C1724))) (define-concept C2432 (AND C1641 (SOME R150 C1538))) (define-concept C2433 (AND C164 (SOME R151 C2430))) (define-primitive-concept C2434 C332) (define-primitive-concept C2435 C332) (define-primitive-concept C2436 C332) (define-primitive-concept C2437 C332) (define-primitive-concept C2438 C332) (define-primitive-concept C2439 C332) (define-primitive-concept C2440 C332) (define-primitive-concept C2441 C332) (define-primitive-concept C2442 C332) (define-primitive-concept C2443 C332) (define-primitive-concept C2444 C332) (define-primitive-concept C2445 C332) (define-primitive-concept C2446 C332) (define-primitive-concept C2447 C332) (define-primitive-concept C2448 C332) (define-primitive-concept C2449 C332) (define-primitive-concept C2450 C332) (define-primitive-concept C2451 C332) (define-primitive-concept C2452 C332) (define-primitive-concept C2453 C332) (define-primitive-concept C2454 C332) (define-primitive-concept C2455 C332) (define-primitive-concept C2456 C332) (define-primitive-concept C2457 C332) (define-primitive-concept C2458 C332) (define-primitive-concept C2459 C332) (define-primitive-concept C2460 C332) (define-primitive-concept C2461 C332) (define-primitive-concept C2462 C332) (define-primitive-concept C2463 C332) (define-primitive-concept C2464 C332) (define-primitive-concept C2465 C332) (define-primitive-concept C2466 C332) (define-primitive-concept C2467 C332) (define-primitive-concept C2468 C332) (define-primitive-concept C2469 C332) (define-primitive-concept C2470 C332) (define-primitive-concept C2471 C332) (define-primitive-concept C2472 C332) (define-primitive-concept C2473 C332) (define-primitive-concept C2474 (AND C332 C2473)) (define-primitive-concept C2475 (AND C332 C2473)) (define-primitive-concept C2476 C332) (define-primitive-concept C2477 C332) (define-primitive-concept C2478 (AND C332 C2477)) (define-primitive-concept C2479 (AND C332 C2477)) (define-primitive-concept C2480 C332) (define-primitive-concept C2481 C332) (define-primitive-concept C2482 C332) (define-primitive-concept C2483 C332) (define-primitive-concept C2484 C332) (define-primitive-concept C2485 C332) (define-primitive-concept C2486 C332) (define-primitive-concept C2487 C332) (define-primitive-concept C2488 C332) (define-primitive-concept C2489 C332) (define-primitive-concept C2490 C332) (define-primitive-concept C2491 C332) (define-primitive-concept C2492 C332) (define-primitive-concept C2493 C332) (define-primitive-concept C2494 C332) (define-primitive-concept C2495 C332) (define-primitive-concept C2496 C332) (define-primitive-concept C2497 C332) (define-primitive-concept C2498 C334) (define-primitive-concept C2499 C334) (define-primitive-concept C2500 C334) (define-primitive-concept C2501 C334) (define-primitive-concept C2502 C334) (define-primitive-concept C2503 C334) (define-primitive-concept C2504 C334) (define-primitive-concept C2505 C334) (define-primitive-concept C2506 C334) (define-primitive-concept C2507 C334) (define-primitive-concept C2508 C334) (define-primitive-concept C2509 C334) (define-primitive-concept C2510 C334) (define-primitive-concept C2511 C334) (define-primitive-concept C2512 C334) (define-primitive-concept C2513 C334) (define-primitive-concept C2514 C334) (define-primitive-concept C2515 C334) (define-concept C2516 (AND C759 (SOME R94 C460))) (define-concept C2517 (AND C1555 (SOME R94 C325))) (define-concept C2518 (AND C1555 (SOME R94 C460))) (define-concept C2519 (AND C786 (SOME R96 C1788))) (define-primitive-concept C2520 C336) (define-primitive-concept C2521 C537) (define-primitive-concept C2522 C537) (define-primitive-concept C2523 C537) (define-primitive-concept C2524 C342) (define-primitive-concept C2525 C346) (define-primitive-concept C2526 (AND C703 C1468)) (define-primitive-concept C2527 C1460) (define-primitive-concept C2528 C1735) (define-primitive-concept C2529 C1735) (define-primitive-concept C2530 C1735) (define-primitive-concept C2531 C1735) (define-concept C2532 (AND C332 (SOME R232 C78))) (define-concept C2533 (AND C332 (SOME R232 C80))) (define-concept C2534 (AND C717 (SOME R29 C331))) (define-concept C2535 (AND C1801 (SOME R320 C1224))) (define-concept C2536 (AND C1801 (SOME R320 C1223))) (define-concept C2537 (AND C1801 (SOME R320 C1222))) (define-concept C2538 (AND C2535 (SOME R310 C1230))) (define-concept C2539 (AND C2535 (SOME R310 C1229))) (define-concept C2540 (AND C2536 (SOME R310 C1230))) (define-concept C2541 (AND C2536 (SOME R310 C1229))) (define-concept C2542 (AND C2537 (SOME R310 C1230))) (define-concept C2543 (AND C2537 (SOME R310 C1229))) (define-concept C2544 (AND C701 (SOME R310 C1229))) (define-concept C2545 (AND C701 (SOME R310 C1230))) (define-concept C2546 (AND C702 (SOME R310 C1229))) (define-concept C2547 (AND C702 (SOME R310 C1230))) (define-concept C2548 (AND C1699 (SOME R29 C460))) (define-primitive-concept C2549 C2548) (define-primitive-concept C2550 C2548) (define-primitive-concept C2551 C2548) (define-primitive-concept C2552 C2548) (define-primitive-concept C2553 C2548) (define-primitive-concept C2554 C2548) (define-primitive-concept C2555 C2548) (define-primitive-concept C2556 C2548) (define-primitive-concept C2557 C2548) (define-concept C2558 (AND C1699 (SOME R29 C2544) (SOME R29 C2545))) (define-concept C2559 (AND C1699 (SOME R29 C2546) (SOME R29 C2547))) (define-concept C2560 (AND C674 (SOME R310 C1229))) (define-concept C2561 (AND C674 (SOME R310 C1230))) (define-concept C2562 (AND C703 (SOME R76 C2546) (SOME R78 C2544))) (define-concept C2563 (AND C703 (SOME R76 C2544) (SOME R78 C673))) (define-concept C2564 (AND C703 (SOME R76 C2547) (SOME R78 C2545))) (define-concept C2565 (AND C703 (SOME R76 C2545) (SOME R78 C2435))) (define-concept C2566 (AND C325 (SOME R76 C702) (SOME R78 C701))) (define-concept C2567 (AND C27 (SOME R49 C460) (SOME R49 C2523))) (define-concept C2568 (AND C1753 (SOME R92 C806))) (define-concept C2569 (AND C2568 (SOME R19 C2558))) (define-concept C2570 (AND C2568 (SOME R19 C701))) (define-concept C2571 (AND C2568 (SOME R19 C2544))) (define-concept C2572 (AND C2568 (SOME R19 C2545))) (define-concept C2573 (AND C806 (SOME R93 C1753) (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C2574 (AND C806 (SOME R93 C2571) (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C2575 (AND C806 (SOME R93 C2572) (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C2576 (AND C1699 (SOME R29 C331))) (define-concept C2577 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C103 (SOME R86 C465))))))) (define-concept C2578 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C103 (SOME R86 C460) (SOME R86 C465))))))) (define-concept C2579 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C103 (SOME R86 C460) (SOME R86 C465) (SOME R396 (AND C889 (SOME R202 C1072))))))))) (define-concept C2580 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C103 (SOME R86 C460) (SOME R86 C465) (SOME R396 (AND C889 (SOME R202 C1074))))))))) (define-concept C2581 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C103 (SOME R86 C460))))))) (define-concept C2582 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C1662 (SOME R133 C1659))))))) (define-concept C2583 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C1662 (SOME R133 C1659) (SOME R396 (AND C889 (SOME R202 C1072))))))))) (define-concept C2584 (AND C1735 (SOME R94 C1801))) (define-concept C2585 (AND C1735 (SOME R96 C2539))) (define-concept C2586 (AND C1735 (SOME R96 C2541))) (define-concept C2587 (AND C1735 (SOME R96 C2543))) (define-concept C2588 (AND C1735 (SOME R96 C2538))) (define-concept C2589 (AND C1735 (SOME R96 C2540))) (define-concept C2590 (AND C1735 (SOME R96 C2542))) (define-concept C2591 (AND C1790 (SOME R108 (AND C331 (SOME R70 C465))))) (define-concept C2592 (AND C1430 (SOME R106 C465))) (define-concept C2593 (AND C1447 (SOME R76 C674) (SOME R78 C686))) (define-concept C2594 (AND C824 (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C2595 (AND C10 (SOME R190 (AND C53 (SOME R407 C2594))))) (define-concept C2596 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C824 (SOME R370 C1786))))))) (define-concept C2597 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C460 (SOME R272 (AND C915 (SOME R204 C1170))))))))) (define-concept C2598 (AND C1445 (SOME R108 C460))) (define-concept C2599 (AND C1451 (SOME R108 C331))) (define-concept C2600 (AND C1451 (SOME R108 C674))) (define-concept C2601 (AND C1451 (SOME R108 C673))) (define-concept C2602 (AND C1451 (SOME R108 C460))) (define-concept C2603 (AND C1451 (SOME R108 C701))) (define-concept C2604 (AND C1451 (SOME R108 C702))) (define-concept C2605 (AND C1447 (SOME R108 C460))) (define-concept C2606 (AND C1728 (SOME R96 C1753))) (define-concept C2607 (AND C1732 (SOME R96 C1753))) (define-concept C2608 (AND C759 (SOME R94 C703))) (define-concept C2609 (AND C1555 (SOME R94 C703))) (define-concept C2610 (AND C2594 (SOME R141 C2516))) (define-concept C2611 (AND C2594 (SOME R141 C2526))) (define-concept C2612 (AND C2594 (SOME R141 C2518))) (define-concept C2613 (AND C2594 (SOME R141 C2609))) (define-concept C2614 (AND C1730 (SOME R96 C460))) (define-concept C2615 (AND C1730 (SOME R96 C701))) (define-concept C2616 (AND C1730 (SOME R96 C702))) (define-concept C2617 (AND C1730 (SOME R96 C360))) (define-concept C2618 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C2524 (SOME R178 C100))))))) (define-concept C2619 (AND C1445 (SOME R108 C2525))) (define-concept C2620 (AND C1445 (SOME R108 C2524))) (define-concept C2621 (AND C1731 (SOME R96 C2524))) (define-concept C2622 (AND C1728 (SOME R94 C2524))) (define-concept C2623 (AND C1408 (SOME R108 C2524))) (define-concept C2624 (AND C1624 (SOME R93 C2524) (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C2625 (AND C1624 (SOME R93 C2524) (SOME R368 (AND C875 (SOME R202 C1115))))) (define-concept C2626 (AND C1734 (SOME R96 C2524) (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2627 (AND C2528 (SOME R128 C1441))) (define-concept C2628 (AND C2528 (SOME R138 (AND C1635 (SOME R96 C460))))) (define-concept C2629 (AND C2528 (SOME R396 (AND C889 (SOME R202 C1074))))) (define-concept C2630 (AND C2528 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2631 (AND C2530 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2632 (AND C2530 (SOME R396 (AND C889 (SOME R202 C1073))))) (define-concept C2633 (AND C2530 (SOME R134 C1456))) (define-concept C2634 (AND C2530 (SOME R134 (AND C1456 (SOME R146 C300))))) (define-concept C2635 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C341 (SOME R178 C100))))))) (define-concept C2636 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C1753 (SOME R178 C100))))))) (define-concept C2637 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C1788 (SOME R53 C333) (SOME R354 (AND C927 (SOME R204 C1016))))))))) (define-concept C2638 (AND C927 (SOME R355 (AND C1788 (SOME R53 C333))) (SOME R204 C1016))) (define-concept C2639 (AND C2594 (SOME R138 C2638))) (define-concept C2640 (AND C2594 (SOME R93 C2521))) (define-concept C2641 (AND C2594 (SOME R93 C2522))) (define-concept C2642 (AND C2641 (SOME R129 C2640))) (define-concept C2643 (AND C1662 (SOME R138 C833))) (define-concept C2644 (AND C2567 (SOME R52 C720))) (define-concept C2645 (AND C10 (SOME R190 (AND C53 (SOME R407 C1460))))) (define-concept C2646 (AND C1460 (SOME R136 C1428))) (define-concept C2647 (AND C1460 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2648 (AND C1460 (SOME R396 (AND C889 (SOME R202 C1074))))) (define-concept C2649 (AND C1460 (SOME R133 C103))) (define-concept C2650 (AND C1662 (SOME R134 C1460))) (define-concept C2651 (AND C1660 (SOME R134 C1460))) (define-concept C2652 (AND C103 (SOME R86 C461) (SOME R86 C460) (SOME R133 C1460))) (define-concept C2653 (AND C1662 (SOME R139 C1459))) (define-concept C2654 (AND C1662 (SOME R139 (AND C1459 (SOME R396 (AND C889 (SOME R202 C1072))))))) (define-concept C2655 (AND C1662 (SOME R139 (AND C1459 (SOME R396 (AND C889 (SOME R202 C1074))))))) (define-concept C2656 (AND C1429 (SOME R106 C1753))) (define-concept C2657 (AND C1459 (SOME R96 C1753))) (define-concept C2658 (AND C1430 (SOME R108 C1753))) (define-concept C2659 (AND C1734 (SOME R96 C1753))) (define-concept C2660 (AND C2658 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2661 (AND C2660 (SOME R110 C2556) (SOME R110 C2552))) (define-concept C2662 (AND C2660 (SOME R110 C2552) (SOME R110 C2558))) (define-concept C2663 (AND C2660 (SOME R110 C2554) (SOME R320 C1224))) (define-concept C2664 (AND C1430 (SOME R110 (AND C713 (SOME R29 (AND C2548 (SOME R29 C2544))))))) (define-concept C2665 (AND C1459 (SOME R96 (AND C713 (SOME R29 (AND C2548 (SOME R29 C2544))))))) (define-concept C2666 (AND C2659 (SOME R392 (AND C888 (SOME R202 C1087))))) (define-concept C2667 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C1772 (SOME R139 C2666))))))) (define-concept C2668 (AND C853 (SOME R139 C2657) (SOME R194 C2657))) (define-concept C2669 (AND C1436 (SOME R110 C2534))) (define-concept C2670 (AND C1772 (SOME R128 C2669))) (define-concept C2671 (AND C2670 (SOME R94 C665))) (define-concept C2672 (AND C37 (SOME R128 C1446))) (define-concept C2673 (AND C37 (SOME R128 C1434))) (define-concept C2674 (AND C37 (SOME R128 C1433))) (define-concept C2675 (AND C37 (SOME R128 C1445))) (define-concept C2676 (AND C37 (SOME R128 C1432))) (define-concept C2677 (AND C103 (SOME R86 C504))) (define-concept C2678 (AND C1727 (SOME R51 C415))) (define-primitive-concept C2679 C128) (define-concept C2680 (AND C803 (SOME R93 C483))) (define-concept C2681 (AND C794 (SOME R96 C740) (SOME R91 C497))) (define-concept C2682 (AND C1434 (SOME R108 C469) (SOME R146 C1370))) (define-concept C2683 (AND C37 (SOME R128 C1439))) (define-concept C2684 (AND C1435 (SOME R108 C482))) (define-concept C2685 (AND C37 (SOME R128 C2684))) (define-concept C2686 (AND C1435 (SOME R108 C497))) (define-concept C2687 (AND C2680 (SOME R368 (AND C875 (SOME R202 C1115))))) (define-concept C2688 (AND C1115 (SOME R203 (AND C875 (SOME R369 C2680))))) (define-concept C2689 (AND C21 (SOME R137 C2687))) (define-concept C2690 (AND C800 (SOME R93 C501) (SOME R368 (AND C875 (SOME R202 C1115))))) (define-concept C2691 (AND C800 (SOME R93 C501) (SOME R368 (AND C875 (SOME R202 C1115))) (SOME R178 C100))) (define-concept C2692 (AND C1114 (SOME R203 (AND C875 (SOME R369 (AND C800 (SOME R93 C501))))))) (define-concept C2693 (AND C1115 (SOME R203 (AND C875 (SOME R369 (AND C800 (SOME R93 C501))))))) (define-concept C2694 (AND C55 (SOME R160 C1448))) (define-concept C2695 (AND C37 (SOME R128 C2694))) (define-concept C2696 (AND C55 (SOME R160 C1424))) (define-concept C2697 (AND C37 (SOME R128 C2696))) (define-concept C2698 (AND C37 (SOME R128 C1421))) (define-concept C2699 (AND C801 (SOME R178 C100))) (define-concept C2700 (AND C1066 (SOME R203 (AND C869 (SOME R201 (AND C801 (SOME R178 C100))))))) (define-concept C2701 (AND C1699 (SOME R29 C497))) (define-concept C2702 (AND C1699 (SOME R29 C481))) (define-concept C2703 (AND C1699 (SOME R29 C505))) (define-concept C2704 (AND C1699 (SOME R29 C500))) (define-concept C2705 (AND C718 (SOME R29 (AND C1699 (SOME R29 C497))))) (define-concept C2706 (AND C1434 (SOME R108 C497))) (define-concept C2707 (AND C1434 (SOME R108 C500))) (define-concept C2708 (AND C1433 (SOME R108 C497))) (define-concept C2709 (AND C1435 (SOME R108 C481))) (define-concept C2710 (AND C1435 (SOME R108 C505))) (define-concept C2711 (AND C1735 (SOME R128 C2686))) (define-concept C2712 (AND C1735 (SOME R128 C2709))) (define-concept C2713 (AND C1735 (SOME R128 C2710))) (define-concept C2714 (AND C2711 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2715 (AND C2711 (SOME R396 (AND C889 (SOME R202 C1074))))) (define-concept C2716 (AND C1442 (SOME R108 C718))) (define-concept C2717 (AND C1442 (SOME R108 C2705))) (define-concept C2718 (AND C1437 (SOME R108 C718))) (define-concept C2719 (AND C1437 (SOME R108 C2705))) (define-concept C2720 (AND C1458 (SOME R108 C2701))) (define-concept C2721 (AND C1458 (SOME R108 C2702))) (define-concept C2722 (AND C1446 (SOME R108 C2701))) (define-concept C2723 (AND C1446 (SOME R108 C2704))) (define-concept C2724 (AND C2706 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2725 (AND C2706 (SOME R396 (AND C889 (SOME R202 C1074))))) (define-concept C2726 (AND C2708 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2727 (AND C2711 (SOME R143 (AND C840 (SOME R94 (AND C1339 (SOME R166 C1262))))))) (define-primitive-concept C2728 C2711) (define-concept C2729 (AND C28 (SOME R404 C51) (SOME R406 C51))) (define-concept C2730 (AND C7 (SOME R404 C51) (SOME R406 C51))) (define-concept C2731 (AND C66 (SOME R404 C51) (SOME R406 C51))) (define-concept C2732 (AND C54 (SOME R404 C51) (SOME R406 C51))) (define-concept C2733 (AND C21 (SOME R129 (AND C37 (SOME R184 C94))) (SOME R184 C94))) (define-concept C2734 (AND C30 (SOME R129 (AND C37 (SOME R184 C94))) (SOME R184 C94))) (define-concept C2735 (AND C21 (SOME R129 (AND C37 (SOME R180 C100))) (SOME R180 C100))) (define-concept C2736 (AND C30 (SOME R129 (AND C37 (SOME R180 C100))) (SOME R180 C100))) (define-concept C2737 (AND C37 (SOME R128 (AND C30 (SOME R184 C94))) (SOME R184 C94))) (define-concept C2738 (AND C37 (SOME R128 (AND C21 (SOME R184 C94))) (SOME R184 C94))) (define-concept C2739 (AND C37 (SOME R128 (AND C21 (SOME R180 C100))) (SOME R180 C100))) (define-concept C2740 (AND C37 (SOME R128 (AND C30 (SOME R180 C100))) (SOME R180 C100))) (define-concept C2741 (AND C23 (SOME R180 C100))) (define-concept C2742 (AND C39 (SOME R184 C94))) (define-concept C2743 (AND C40 (SOME R180 C100))) (define-concept C2744 (AND C38 (SOME R180 C101))) (define-concept C2745 (AND C25 (SOME R184 C98))) (define-concept C2746 (AND C21 (SOME R180 C100) (SOME R178 C100))) (define-concept C2747 (AND C30 (SOME R180 C100) (SOME R178 C100))) (define-concept C2748 (AND C37 (SOME R180 C100) (SOME R178 C100))) (define-concept C2749 (AND C10 (SOME R180 C100) (SOME R178 C100))) (define-concept C2750 (AND C36 (SOME R180 C100) (SOME R178 C100))) (define-concept C2751 (AND C35 (SOME R180 C100) (SOME R178 C100))) (define-concept C2752 (AND C7 (SOME R129 C37) (SOME R180 C100) (SOME R178 C100))) (define-concept C2753 (AND C28 (SOME R129 C37) (SOME R180 C100) (SOME R178 C100))) (define-concept C2754 (AND C32 (SOME R129 C37) (SOME R180 C100) (SOME R178 C100))) (define-concept C2755 (AND C53 (SOME R407 (AND C21 (SOME R180 C100))) (SOME R178 C100))) (define-concept C2756 (AND C53 (SOME R407 (AND C30 (SOME R180 C100))) (SOME R178 C100))) (define-concept C2757 (AND C53 (SOME R407 (AND C37 (SOME R180 C100))) (SOME R178 C100))) (define-concept C2758 (AND C53 (SOME R407 (AND C10 (SOME R180 C100))) (SOME R178 C100))) (define-concept C2759 (AND C53 (SOME R407 (AND C36 (SOME R180 C100))) (SOME R178 C100))) (define-concept C2760 (AND C53 (SOME R407 (AND C35 (SOME R180 C100))) (SOME R178 C100))) (define-concept C2761 (AND C53 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R180 C100))) (SOME R178 C100))) (define-concept C2762 (AND C53 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R180 C100))) (SOME R178 C100))) (define-concept C2763 (AND C53 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R180 C100))) (SOME R178 C100))) (define-concept C2764 (AND C52 (SOME R407 (AND C21 (SOME R180 C100))) (SOME R182 C98))) (define-concept C2765 (AND C52 (SOME R407 (AND C30 (SOME R180 C100))) (SOME R182 C98))) (define-concept C2766 (AND C52 (SOME R407 (AND C37 (SOME R180 C100))) (SOME R182 C98))) (define-concept C2767 (AND C52 (SOME R407 (AND C10 (SOME R180 C100))) (SOME R182 C98))) (define-concept C2768 (AND C52 (SOME R407 (AND C36 (SOME R180 C100))) (SOME R182 C98))) (define-concept C2769 (AND C52 (SOME R407 (AND C35 (SOME R180 C100))) (SOME R182 C98))) (define-concept C2770 (AND C52 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R180 C100))) (SOME R182 C98))) (define-concept C2771 (AND C52 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R180 C100))) (SOME R182 C98))) (define-concept C2772 (AND C52 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R180 C100))) (SOME R182 C98))) (define-concept C2773 (AND C52 (SOME R407 (AND C21 (SOME R180 C100))) (SOME R178 C101))) (define-concept C2774 (AND C52 (SOME R407 (AND C30 (SOME R180 C100))) (SOME R178 C101))) (define-concept C2775 (AND C52 (SOME R407 (AND C37 (SOME R180 C100))) (SOME R178 C101))) (define-concept C2776 (AND C52 (SOME R407 (AND C10 (SOME R180 C100))) (SOME R178 C101))) (define-concept C2777 (AND C52 (SOME R407 (AND C36 (SOME R180 C100))) (SOME R178 C101))) (define-concept C2778 (AND C52 (SOME R407 (AND C35 (SOME R180 C100))) (SOME R178 C101))) (define-concept C2779 (AND C52 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R180 C100))) (SOME R178 C101))) (define-concept C2780 (AND C52 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R180 C100))) (SOME R178 C101))) (define-concept C2781 (AND C52 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R180 C100))) (SOME R178 C101))) (define-concept C2782 (AND C21 (SOME R184 C94) (SOME R182 C94))) (define-concept C2783 (AND C30 (SOME R184 C94) (SOME R182 C94))) (define-concept C2784 (AND C37 (SOME R184 C94) (SOME R182 C94))) (define-concept C2785 (AND C10 (SOME R184 C94) (SOME R182 C94))) (define-concept C2786 (AND C36 (SOME R184 C94) (SOME R182 C94))) (define-concept C2787 (AND C35 (SOME R184 C94) (SOME R182 C94))) (define-concept C2788 (AND C7 (SOME R129 C37) (SOME R184 C94) (SOME R182 C94))) (define-concept C2789 (AND C28 (SOME R129 C37) (SOME R184 C94) (SOME R182 C94))) (define-concept C2790 (AND C32 (SOME R129 C37) (SOME R184 C94) (SOME R182 C94))) (define-concept C2791 (AND C53 (SOME R407 (AND C21 (SOME R184 C94))) (SOME R182 C94))) (define-concept C2792 (AND C53 (SOME R407 (AND C30 (SOME R184 C94))) (SOME R182 C94))) (define-concept C2793 (AND C53 (SOME R407 (AND C37 (SOME R184 C94))) (SOME R182 C94))) (define-concept C2794 (AND C53 (SOME R407 (AND C10 (SOME R184 C94))) (SOME R182 C94))) (define-concept C2795 (AND C53 (SOME R407 (AND C36 (SOME R184 C94))) (SOME R182 C94))) (define-concept C2796 (AND C53 (SOME R407 (AND C35 (SOME R184 C94))) (SOME R182 C94))) (define-concept C2797 (AND C53 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R184 C94))) (SOME R182 C94))) (define-concept C2798 (AND C53 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R184 C94))) (SOME R182 C94))) (define-concept C2799 (AND C53 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R184 C94))) (SOME R182 C94))) (define-concept C2800 (AND C52 (SOME R407 (AND C21 (SOME R184 C94))) (SOME R182 C98))) (define-concept C2801 (AND C52 (SOME R407 (AND C30 (SOME R184 C94))) (SOME R182 C98))) (define-concept C2802 (AND C52 (SOME R407 (AND C37 (SOME R184 C94))) (SOME R182 C98))) (define-concept C2803 (AND C52 (SOME R407 (AND C10 (SOME R184 C94))) (SOME R182 C98))) (define-concept C2804 (AND C52 (SOME R407 (AND C36 (SOME R184 C94))) (SOME R182 C98))) (define-concept C2805 (AND C52 (SOME R407 (AND C35 (SOME R184 C94))) (SOME R182 C98))) (define-concept C2806 (AND C52 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R184 C94))) (SOME R182 C98))) (define-concept C2807 (AND C52 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R184 C94))) (SOME R182 C98))) (define-concept C2808 (AND C52 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R184 C94))) (SOME R182 C98))) (define-concept C2809 (AND C52 (SOME R407 (AND C21 (SOME R184 C94))) (SOME R178 C101))) (define-concept C2810 (AND C52 (SOME R407 (AND C30 (SOME R184 C94))) (SOME R178 C101))) (define-concept C2811 (AND C52 (SOME R407 (AND C37 (SOME R184 C94))) (SOME R178 C101))) (define-concept C2812 (AND C52 (SOME R407 (AND C10 (SOME R184 C94))) (SOME R178 C101))) (define-concept C2813 (AND C52 (SOME R407 (AND C36 (SOME R184 C94))) (SOME R178 C101))) (define-concept C2814 (AND C52 (SOME R407 (AND C35 (SOME R184 C94))) (SOME R178 C101))) (define-concept C2815 (AND C52 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R184 C94))) (SOME R178 C101))) (define-concept C2816 (AND C52 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R184 C94))) (SOME R178 C101))) (define-concept C2817 (AND C52 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R184 C94))) (SOME R178 C101))) (define-concept C2818 (AND C52 (SOME R407 (AND C21 (SOME R184 C98))) (SOME R182 C94))) (define-concept C2819 (AND C52 (SOME R407 (AND C30 (SOME R184 C98))) (SOME R182 C94))) (define-concept C2820 (AND C52 (SOME R407 (AND C37 (SOME R184 C98))) (SOME R182 C94))) (define-concept C2821 (AND C52 (SOME R407 (AND C10 (SOME R184 C98))) (SOME R182 C94))) (define-concept C2822 (AND C52 (SOME R407 (AND C36 (SOME R184 C98))) (SOME R182 C94))) (define-concept C2823 (AND C52 (SOME R407 (AND C35 (SOME R184 C98))) (SOME R182 C94))) (define-concept C2824 (AND C52 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R184 C98))) (SOME R182 C94))) (define-concept C2825 (AND C52 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R184 C98))) (SOME R182 C94))) (define-concept C2826 (AND C52 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R184 C98))) (SOME R182 C94))) (define-concept C2827 (AND C53 (SOME R407 (AND C21 (SOME R178 C100))) (SOME R178 C100))) (define-concept C2828 (AND C53 (SOME R407 (AND C30 (SOME R178 C100))) (SOME R178 C100))) (define-concept C2829 (AND C53 (SOME R407 (AND C37 (SOME R178 C100))) (SOME R178 C100))) (define-concept C2830 (AND C53 (SOME R407 (AND C10 (SOME R178 C100))) (SOME R178 C100))) (define-concept C2831 (AND C53 (SOME R407 (AND C36 (SOME R178 C100))) (SOME R178 C100))) (define-concept C2832 (AND C53 (SOME R407 (AND C35 (SOME R178 C100))) (SOME R178 C100))) (define-concept C2833 (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C100))) (SOME R178 C100))) (define-concept C2834 (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C100))) (SOME R178 C100))) (define-concept C2835 (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C100))) (SOME R178 C100))) (define-concept C2836 (AND C53 (SOME R407 (AND C54 (SOME R178 C100))) (SOME R178 C100))) (define-concept C2837 (AND C53 (SOME R407 (AND C21 (SOME R178 C100))) (SOME R182 C94))) (define-concept C2838 (AND C53 (SOME R407 (AND C30 (SOME R178 C100))) (SOME R182 C94))) (define-concept C2839 (AND C53 (SOME R407 (AND C37 (SOME R178 C100))) (SOME R182 C94))) (define-concept C2840 (AND C53 (SOME R407 (AND C10 (SOME R178 C100))) (SOME R182 C94))) (define-concept C2841 (AND C53 (SOME R407 (AND C36 (SOME R178 C100))) (SOME R182 C94))) (define-concept C2842 (AND C53 (SOME R407 (AND C35 (SOME R178 C100))) (SOME R182 C94))) (define-concept C2843 (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C100))) (SOME R182 C94))) (define-concept C2844 (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C100))) (SOME R182 C94))) (define-concept C2845 (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C100))) (SOME R182 C94))) (define-concept C2846 (AND C53 (SOME R407 (AND C54 (SOME R178 C100))) (SOME R182 C94))) (define-concept C2847 (AND C52 (SOME R407 (AND C21 (SOME R178 C100))) (SOME R178 C101))) (define-concept C2848 (AND C52 (SOME R407 (AND C30 (SOME R178 C100))) (SOME R178 C101))) (define-concept C2849 (AND C52 (SOME R407 (AND C37 (SOME R178 C100))) (SOME R178 C101))) (define-concept C2850 (AND C52 (SOME R407 (AND C10 (SOME R178 C100))) (SOME R178 C101))) (define-concept C2851 (AND C52 (SOME R407 (AND C36 (SOME R178 C100))) (SOME R178 C101))) (define-concept C2852 (AND C52 (SOME R407 (AND C35 (SOME R178 C100))) (SOME R178 C101))) (define-concept C2853 (AND C52 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C100))) (SOME R178 C101))) (define-concept C2854 (AND C52 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C100))) (SOME R178 C101))) (define-concept C2855 (AND C52 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C100))) (SOME R178 C101))) (define-concept C2856 (AND C52 (SOME R407 (AND C54 (SOME R178 C100))) (SOME R178 C101))) (define-concept C2857 (AND C52 (SOME R407 (AND C21 (SOME R178 C100))) (SOME R182 C98))) (define-concept C2858 (AND C52 (SOME R407 (AND C30 (SOME R178 C100))) (SOME R182 C98))) (define-concept C2859 (AND C52 (SOME R407 (AND C37 (SOME R178 C100))) (SOME R182 C98))) (define-concept C2860 (AND C52 (SOME R407 (AND C10 (SOME R178 C100))) (SOME R182 C98))) (define-concept C2861 (AND C52 (SOME R407 (AND C36 (SOME R178 C100))) (SOME R182 C98))) (define-concept C2862 (AND C52 (SOME R407 (AND C35 (SOME R178 C100))) (SOME R182 C98))) (define-concept C2863 (AND C52 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C100))) (SOME R182 C98))) (define-concept C2864 (AND C52 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C100))) (SOME R182 C98))) (define-concept C2865 (AND C52 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C100))) (SOME R182 C98))) (define-concept C2866 (AND C52 (SOME R407 (AND C54 (SOME R178 C100))) (SOME R182 C98))) (define-concept C2867 (AND C53 (SOME R407 (AND C21 (SOME R178 C101))) (SOME R178 C101))) (define-concept C2868 (AND C53 (SOME R407 (AND C30 (SOME R178 C101))) (SOME R178 C101))) (define-concept C2869 (AND C53 (SOME R407 (AND C37 (SOME R178 C101))) (SOME R178 C101))) (define-concept C2870 (AND C53 (SOME R407 (AND C10 (SOME R178 C101))) (SOME R178 C101))) (define-concept C2871 (AND C53 (SOME R407 (AND C36 (SOME R178 C101))) (SOME R178 C101))) (define-concept C2872 (AND C53 (SOME R407 (AND C35 (SOME R178 C101))) (SOME R178 C101))) (define-concept C2873 (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C101))) (SOME R178 C101))) (define-concept C2874 (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C101))) (SOME R178 C101))) (define-concept C2875 (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C101))) (SOME R178 C101))) (define-concept C2876 (AND C53 (SOME R407 (AND C54 (SOME R178 C101))) (SOME R178 C101))) (define-concept C2877 (AND C53 (SOME R407 (AND C21 (SOME R178 C101))) (SOME R182 C98))) (define-concept C2878 (AND C53 (SOME R407 (AND C30 (SOME R178 C101))) (SOME R182 C98))) (define-concept C2879 (AND C53 (SOME R407 (AND C37 (SOME R178 C101))) (SOME R182 C98))) (define-concept C2880 (AND C53 (SOME R407 (AND C10 (SOME R178 C101))) (SOME R182 C98))) (define-concept C2881 (AND C53 (SOME R407 (AND C36 (SOME R178 C101))) (SOME R182 C98))) (define-concept C2882 (AND C53 (SOME R407 (AND C35 (SOME R178 C101))) (SOME R182 C98))) (define-concept C2883 (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C101))) (SOME R182 C98))) (define-concept C2884 (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C101))) (SOME R182 C98))) (define-concept C2885 (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C101))) (SOME R182 C98))) (define-concept C2886 (AND C53 (SOME R407 (AND C54 (SOME R178 C101))) (SOME R182 C98))) (define-concept C2887 (AND C52 (SOME R407 (AND C21 (SOME R178 C101))) (SOME R182 C94))) (define-concept C2888 (AND C52 (SOME R407 (AND C30 (SOME R178 C101))) (SOME R182 C94))) (define-concept C2889 (AND C52 (SOME R407 (AND C37 (SOME R178 C101))) (SOME R182 C94))) (define-concept C2890 (AND C52 (SOME R407 (AND C10 (SOME R178 C101))) (SOME R182 C94))) (define-concept C2891 (AND C52 (SOME R407 (AND C36 (SOME R178 C101))) (SOME R182 C94))) (define-concept C2892 (AND C52 (SOME R407 (AND C35 (SOME R178 C101))) (SOME R182 C94))) (define-concept C2893 (AND C52 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C101))) (SOME R182 C94))) (define-concept C2894 (AND C52 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C101))) (SOME R182 C94))) (define-concept C2895 (AND C52 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C101))) (SOME R182 C94))) (define-concept C2896 (AND C52 (SOME R407 (AND C54 (SOME R178 C101))) (SOME R182 C94))) (define-concept C2897 (AND C52 (SOME R407 (AND C21 (SOME R182 C98))) (SOME R182 C94))) (define-concept C2898 (AND C52 (SOME R407 (AND C30 (SOME R182 C98))) (SOME R182 C94))) (define-concept C2899 (AND C52 (SOME R407 (AND C37 (SOME R182 C98))) (SOME R182 C94))) (define-concept C2900 (AND C52 (SOME R407 (AND C10 (SOME R182 C98))) (SOME R182 C94))) (define-concept C2901 (AND C52 (SOME R407 (AND C36 (SOME R182 C98))) (SOME R182 C94))) (define-concept C2902 (AND C52 (SOME R407 (AND C35 (SOME R182 C98))) (SOME R182 C94))) (define-concept C2903 (AND C52 (SOME R407 (AND C7 (SOME R129 C37) (SOME R182 C98))) (SOME R182 C94))) (define-concept C2904 (AND C52 (SOME R407 (AND C28 (SOME R129 C37) (SOME R182 C98))) (SOME R182 C94))) (define-concept C2905 (AND C52 (SOME R407 (AND C32 (SOME R129 C37) (SOME R182 C98))) (SOME R182 C94))) (define-concept C2906 (AND C52 (SOME R407 (AND C54 (SOME R182 C98))) (SOME R182 C94))) (define-concept C2907 (AND C53 (SOME R407 (AND C21 (SOME R182 C98))) (SOME R182 C98))) (define-concept C2908 (AND C53 (SOME R407 (AND C30 (SOME R182 C98))) (SOME R182 C98))) (define-concept C2909 (AND C53 (SOME R407 (AND C37 (SOME R182 C98))) (SOME R182 C98))) (define-concept C2910 (AND C53 (SOME R407 (AND C10 (SOME R182 C98))) (SOME R182 C98))) (define-concept C2911 (AND C53 (SOME R407 (AND C36 (SOME R182 C98))) (SOME R182 C98))) (define-concept C2912 (AND C53 (SOME R407 (AND C35 (SOME R182 C98))) (SOME R182 C98))) (define-concept C2913 (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R182 C98))) (SOME R182 C98))) (define-concept C2914 (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R182 C98))) (SOME R182 C98))) (define-concept C2915 (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R182 C98))) (SOME R182 C98))) (define-concept C2916 (AND C53 (SOME R407 (AND C54 (SOME R182 C98))) (SOME R182 C98))) (define-concept C2917 (AND C53 (SOME R407 (AND C21 (SOME R182 C98))) (SOME R178 C101))) (define-concept C2918 (AND C53 (SOME R407 (AND C30 (SOME R182 C98))) (SOME R178 C101))) (define-concept C2919 (AND C53 (SOME R407 (AND C37 (SOME R182 C98))) (SOME R178 C101))) (define-concept C2920 (AND C53 (SOME R407 (AND C10 (SOME R182 C98))) (SOME R178 C101))) (define-concept C2921 (AND C53 (SOME R407 (AND C36 (SOME R182 C98))) (SOME R178 C101))) (define-concept C2922 (AND C53 (SOME R407 (AND C35 (SOME R182 C98))) (SOME R178 C101))) (define-concept C2923 (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R182 C98))) (SOME R178 C101))) (define-concept C2924 (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R182 C98))) (SOME R178 C101))) (define-concept C2925 (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R182 C98))) (SOME R178 C101))) (define-concept C2926 (AND C53 (SOME R407 (AND C54 (SOME R182 C98))) (SOME R178 C101))) (define-concept C2927 (AND C52 (SOME R407 (AND C21 (SOME R182 C94))) (SOME R182 C98))) (define-concept C2928 (AND C52 (SOME R407 (AND C30 (SOME R182 C94))) (SOME R182 C98))) (define-concept C2929 (AND C52 (SOME R407 (AND C37 (SOME R182 C94))) (SOME R182 C98))) (define-concept C2930 (AND C52 (SOME R407 (AND C10 (SOME R182 C94))) (SOME R182 C98))) (define-concept C2931 (AND C52 (SOME R407 (AND C36 (SOME R182 C94))) (SOME R182 C98))) (define-concept C2932 (AND C52 (SOME R407 (AND C35 (SOME R182 C94))) (SOME R182 C98))) (define-concept C2933 (AND C52 (SOME R407 (AND C7 (SOME R129 C37) (SOME R182 C94))) (SOME R182 C98))) (define-concept C2934 (AND C52 (SOME R407 (AND C28 (SOME R129 C37) (SOME R182 C94))) (SOME R182 C98))) (define-concept C2935 (AND C52 (SOME R407 (AND C32 (SOME R129 C37) (SOME R182 C94))) (SOME R182 C98))) (define-concept C2936 (AND C52 (SOME R407 (AND C54 (SOME R182 C94))) (SOME R182 C98))) (define-concept C2937 (AND C52 (SOME R407 (AND C21 (SOME R182 C94))) (SOME R178 C101))) (define-concept C2938 (AND C52 (SOME R407 (AND C30 (SOME R182 C94))) (SOME R178 C101))) (define-concept C2939 (AND C52 (SOME R407 (AND C37 (SOME R182 C94))) (SOME R178 C101))) (define-concept C2940 (AND C52 (SOME R407 (AND C10 (SOME R182 C94))) (SOME R178 C101))) (define-concept C2941 (AND C52 (SOME R407 (AND C36 (SOME R182 C94))) (SOME R178 C101))) (define-concept C2942 (AND C52 (SOME R407 (AND C35 (SOME R182 C94))) (SOME R178 C101))) (define-concept C2943 (AND C52 (SOME R407 (AND C7 (SOME R129 C37) (SOME R182 C94))) (SOME R178 C101))) (define-concept C2944 (AND C52 (SOME R407 (AND C28 (SOME R129 C37) (SOME R182 C94))) (SOME R178 C101))) (define-concept C2945 (AND C52 (SOME R407 (AND C32 (SOME R129 C37) (SOME R182 C94))) (SOME R178 C101))) (define-concept C2946 (AND C52 (SOME R407 (AND C54 (SOME R182 C94))) (SOME R178 C101))) (define-concept C2947 (AND C53 (SOME R407 (AND C21 (SOME R182 C94))) (SOME R182 C94))) (define-concept C2948 (AND C53 (SOME R407 (AND C30 (SOME R182 C94))) (SOME R182 C94))) (define-concept C2949 (AND C53 (SOME R407 (AND C37 (SOME R182 C94))) (SOME R182 C94))) (define-concept C2950 (AND C53 (SOME R407 (AND C10 (SOME R182 C94))) (SOME R182 C94))) (define-concept C2951 (AND C53 (SOME R407 (AND C36 (SOME R182 C94))) (SOME R182 C94))) (define-concept C2952 (AND C53 (SOME R407 (AND C35 (SOME R182 C94))) (SOME R182 C94))) (define-concept C2953 (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R182 C94))) (SOME R182 C94))) (define-concept C2954 (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R182 C94))) (SOME R182 C94))) (define-concept C2955 (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R182 C94))) (SOME R182 C94))) (define-concept C2956 (AND C53 (SOME R407 (AND C54 (SOME R182 C94))) (SOME R182 C94))) (define-concept C2957 (AND C1456 (SOME R146 C68))) (define-concept C2958 (AND C157 (SOME R278 C91))) (define-concept C2959 (AND C469 (SOME R410 C62))) (define-concept C2960 (AND C157 (SOME R410 C61) (SOME R232 C77) (SOME R238 (AND C906 (SOME R202 C1208))) (SOME R410 C62))) (define-concept C2961 (AND C21 (SOME R232 C79) (SOME R410 C61))) (define-concept C2962 (AND C29 (SOME R280 C85))) (define-concept C2963 (AND C1423 (SOME R280 C82))) (define-concept C2964 (AND C24 (SOME R280 C82))) (define-concept C2965 (AND C1403 (SOME R280 C82))) (define-concept C2966 (AND C164 (SOME R280 C82))) (define-concept C2967 (AND C167 (SOME R280 C82))) (define-concept C2968 (AND C27 (SOME R280 C82))) (define-concept C2969 (AND C67 (SOME R280 C82))) (define-concept C2970 (AND C201 (SOME R280 C82))) (define-concept C2971 (AND C154 (SOME R280 C82))) (define-concept C2972 (AND C156 (SOME R280 C82))) (define-concept C2973 (AND C157 (SOME R280 C82))) (define-concept C2974 (AND C152 (SOME R280 C82))) (define-concept C2975 (AND C151 (SOME R280 C82))) (define-concept C2976 (AND C155 (SOME R280 C82))) (define-concept C2977 (AND C20 (SOME R268 (AND C920 (SOME R202 C1177))) (SOME R280 C82))) (define-concept C2978 (AND C1421 (SOME R280 C82))) (define-concept C2979 (AND C1353 (SOME R166 C1264))) (define-concept C2980 (AND C1356 (SOME R166 C1268))) (define-concept C2981 (AND C1391 (SOME R166 C1265))) (define-concept C2982 (AND C1380 (SOME R166 C1267))) (define-concept C2983 (AND C326 (SOME R166 C1285))) (define-concept C2984 (AND C1666 (SOME R170 C1283))) (define-concept C2985 (AND C1283 (SOME R171 C1666))) (define-concept C2986 (AND C18 (SOME R282 (AND C916 (SOME R202 C1136))))) (define-concept C2987 (AND C19 (SOME R282 (AND C916 (SOME R202 C1145))))) (define-concept C2988 (AND C21 (SOME R268 (AND C920 (SOME R202 C1181))) (SOME R284 (AND C917 (SOME R202 C1136))))) (define-concept C2989 (AND C1699 (SOME R29 (AND C21 (SOME R268 C1705))) (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C2990 (AND C415 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C2991 (AND C1422 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C2992 (AND C425 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C2993 (AND C349 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C2994 (AND C419 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C2995 (AND C357 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C2996 (AND C420 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C2997 (AND C337 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C2998 (AND C559 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C2999 (AND C560 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C3000 (AND C152 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C3001 (AND C520 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C3002 (AND C1432 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C3003 (AND C562 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3004 (AND C356 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3005 (AND C347 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3006 (AND C440 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3007 (AND C350 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3008 (AND C355 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3009 (AND C461 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3010 (AND C463 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3011 (AND C352 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3012 (AND C465 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3013 (AND C358 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3014 (AND C557 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3015 (AND C558 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3016 (AND C348 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3017 (AND C359 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3018 (AND C466 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3019 (AND C351 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3020 (AND C561 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3021 (AND C468 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3022 (AND C329 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3023 (AND C647 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3024 (AND C644 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3025 (AND C339 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3026 (AND C341 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3027 (AND C335 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3028 (AND C354 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3029 (AND C353 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3030 (AND C345 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3031 (AND C530 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3032 (AND C339 (SOME R284 (AND C917 (SOME R202 C1136))))) (define-concept C3033 (AND C599 (SOME R284 (AND C917 (SOME R202 C1136))))) (define-concept C3034 (AND C341 (SOME R284 (AND C917 (SOME R202 C1136))))) (define-concept C3035 (AND C335 (SOME R284 (AND C917 (SOME R202 C1136))))) (define-concept C3036 (AND C354 (SOME R284 (AND C917 (SOME R202 C1136))))) (define-concept C3037 (AND C353 (SOME R284 (AND C917 (SOME R202 C1136))))) (define-concept C3038 (AND C345 (SOME R284 (AND C917 (SOME R202 C1136))))) (define-concept C3039 (AND C331 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3040 (AND C471 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3041 (AND C162 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3042 (AND C160 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3043 (AND C514 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3044 (AND C527 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3045 (AND C1450 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3046 (AND C327 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3047 (AND C532 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3048 (AND C528 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3049 (AND C459 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3050 (AND C460 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3051 (AND C519 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3052 (AND C462 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3053 (AND C599 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3054 (AND C513 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3055 (AND C1455 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3056 (AND C469 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3057 (AND C556 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3058 (AND C1444 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3059 (AND C467 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3060 (AND C515 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3061 (AND C552 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3062 (AND C512 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3063 (AND C516 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3064 (AND C517 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3065 (AND C522 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3066 (AND C518 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3067 (AND C521 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3068 (AND C525 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3069 (AND C526 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3070 (AND C531 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3071 (AND C325 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3072 (AND C333 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3073 (AND C26 (SOME R268 (AND C920 (SOME R202 C1177))))) (define-concept C3074 (AND C173 (SOME R268 (AND C920 (SOME R202 C1177))))) (define-concept C3075 (AND C418 (SOME R268 (AND C920 (SOME R202 C1177))))) (define-concept C3076 (AND C554 (SOME R268 (AND C920 (SOME R202 C1177))))) (define-concept C3077 (AND C702 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C3078 (AND C159 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C3079 (AND C343 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C3080 (AND C551 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C3081 (AND C701 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C3082 (AND C32 (SOME R390 C891) (SOME R398 (AND C890 (SOME R202 C1083))))) (define-concept C3083 (AND C824 (SOME R91 C460))) (define-concept C3084 (AND C325 (SOME R92 C800))) (define-concept C3085 (AND C40 (SOME R412 C65))) (define-concept C3086 (AND C37 (SOME R180 C101) (SOME R366 (AND C873 (SOME R202 C1095))) (SOME R178 C100))) (define-concept C3087 (AND C37 (SOME R182 C94) (SOME R412 C65) (SOME R91 (AND C21 (SOME R410 C61))) (SOME R410 C61))) (define-concept C3088 (AND C37 (SOME R182 C94) (SOME R412 C65) (SOME R94 (AND C21 (SOME R410 C62))) (SOME R410 C62))) (define-concept C3089 (AND C37 (SOME R128 (AND C21 (SOME R410 C62))) (SOME R410 C62))) (define-concept C3090 (AND C37 (SOME R128 (AND C21 (SOME R410 C61))) (SOME R410 C61))) (define-concept C3091 (AND C1458 (SOME R128 C720))) (define-concept C3092 (AND C21 (SOME R17 (AND C21 (SOME R232 C77) (SOME R184 C98))) (SOME R184 C98) (SOME R232 C77))) (define-concept C3093 (AND C21 (SOME R17 (AND C21 (SOME R232 C79) (SOME R184 C98))) (SOME R184 C98) (SOME R232 C79))) (define-concept C3094 (AND C1670 (SOME R17 (AND C1670 (SOME R232 C77))) (SOME R232 C77))) (define-concept C3095 (AND C25 (SOME R25 (AND C25 (SOME R232 C79))) (SOME R232 C79))) (define-concept C3096 (AND C22 (SOME R25 (AND C25 (SOME R232 C79))) (SOME R232 C79))) (define-concept C3097 (AND C24 (SOME R25 (AND C25 (SOME R232 C79))) (SOME R232 C79))) (define-concept C3098 (AND C25 (SOME R25 (AND C25 (SOME R184 C98))) (SOME R184 C98))) (define-concept C3099 (AND C22 (SOME R25 (AND C25 (SOME R184 C98))) (SOME R184 C98))) (define-concept C3100 (AND C24 (SOME R25 (AND C25 (SOME R184 C98))) (SOME R184 C98))) (define-concept C3101 (AND C194 (SOME R25 C300))) (define-concept C3102 (AND C25 (SOME R25 (AND C25 (SOME R232 C75))) (SOME R232 C75))) (define-concept C3103 (AND C25 (SOME R25 (AND C24 (SOME R232 C75))) (SOME R232 C75))) (define-concept C3104 (AND C24 (SOME R25 (AND C25 (SOME R232 C75))) (SOME R232 C75))) (define-concept C3105 (AND C24 (SOME R25 (AND C24 (SOME R232 C75))) (SOME R232 C75))) (define-concept C3106 (AND C27 (SOME R51 (AND C21 (SOME R232 C79))) (SOME R232 C79))) (define-concept C3107 (AND C27 (SOME R51 (AND C21 (SOME R184 C98))) (SOME R184 C98))) (define-concept C3108 (AND C339 (SOME R30 C724))) (define-concept C3109 (AND C749 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C3110 (AND C767 (SOME R34 (AND C781 (SOME R128 C1649))) (SOME R128 C1649))) (define-concept C3111 (AND C21 (SOME R232 C78) (SOME R310 C1228) (SOME R410 C61))) (define-concept C3112 (AND C159 (SOME R51 (AND C25 (SOME R268 (AND C920 (SOME R202 C1177))) (SOME R178 C100))) (SOME R178 C100))) (define-concept C3113 (AND C788 (SOME R178 C100))) (define-concept C3114 (AND C791 (SOME R178 C100))) (define-concept C3115 (AND C835 (SOME R178 C100))) (define-concept C3116 (AND C836 (SOME R178 C100))) (define-concept C3117 (AND C833 (SOME R178 C100))) (define-concept C3118 (AND C151 (SOME R17 C1724) (SOME R268 (AND C920 (SOME R202 C1179))))) (define-concept C3119 (AND C151 (SOME R17 C1725) (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C3120 (AND C1403 (SOME R106 (AND C21 (SOME R410 C61))) (SOME R410 C61))) (define-concept C3121 (AND C843 (SOME R96 (AND C720 (SOME R348 (AND C935 (SOME R202 C1254))))) (SOME R366 (AND C873 (SOME R202 C1094))) (SOME R128 (AND C720 (SOME R348 (AND C935 (SOME R202 C1253))))))) (define-concept C3122 (AND C1407 (SOME R274 (AND C918 (SOME R202 C1201))))) (define-concept C3123 (AND C746 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C3124 (AND C739 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C3125 (AND C742 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C3126 (AND C745 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C3127 (AND C750 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C3128 (AND C743 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C3129 (AND C744 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C3130 (AND C1331 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C3131 (AND C748 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C3132 (AND C1794 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C3133 (AND C154 (SOME R278 C90))) (define-concept C3134 (AND C155 (SOME R278 C90))) (define-concept C3135 (AND C719 (SOME R29 C155))) (define-concept C3136 (AND C154 (SOME R410 C61) (SOME R232 C79) (SOME R310 C1228) (SOME R410 C62))) (define-concept C3137 (AND C156 (SOME R278 C90))) (define-concept C3138 (AND C1794 (SOME R13 (AND C1794 (SOME R232 C75))) (SOME R232 C75))) (define-concept C3139 (AND C152 (SOME R13 (AND C1794 (SOME R232 C75))) (SOME R232 C75))) (define-concept C3140 (AND C383 (SOME R232 C80))) (define-concept C3141 (AND C383 (SOME R410 C62))) (define-concept C3142 (AND C378 (SOME R13 C383))) (define-concept C3143 (AND C379 (SOME R13 C383))) (define-concept C3144 (AND C381 (SOME R13 C383))) (define-concept C3145 (AND C380 (SOME R13 C383))) (define-concept C3146 (AND C381 (SOME R232 C79))) (define-concept C3147 (AND C381 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3148 (AND C381 (SOME R320 C1221) (SOME R410 C61))) (define-concept C3149 (AND C381 (SOME R320 C1224) (SOME R310 C1228) (SOME R410 C62))) (define-concept C3150 (AND C381 (SOME R320 C1222) (SOME R310 C1228) (SOME R410 C62))) (define-concept C3151 (AND C441 (SOME R232 C79))) (define-concept C3152 (AND C441 (SOME R410 C61))) (define-concept C3153 (AND C401 (SOME R17 C1795))) (define-concept C3154 (AND C401 (SOME R17 C380))) (define-concept C3155 (AND C399 (SOME R13 C380))) (define-concept C3156 (AND C399 (SOME R13 C1795))) (define-concept C3157 (AND C451 (SOME R17 C1795))) (define-concept C3158 (AND C600 (SOME R25 C451))) (define-concept C3159 (AND C447 (SOME R17 C1795))) (define-concept C3160 (AND C565 (SOME R25 C447))) (define-concept C3161 (AND C452 (SOME R17 C1795))) (define-concept C3162 (AND C601 (SOME R25 C452))) (define-concept C3163 (AND C602 (SOME R25 C452))) (define-concept C3164 (AND C449 (SOME R17 C1795))) (define-concept C3165 (AND C579 (SOME R25 C449))) (define-concept C3166 (AND C444 (SOME R17 C1795))) (define-concept C3167 (AND C456 (SOME R17 C444))) (define-concept C3168 (AND C375 (SOME R13 C444))) (define-concept C3169 (AND C576 (SOME R25 C444))) (define-concept C3170 (AND C577 (SOME R25 C444))) (define-concept C3171 (AND C152 (SOME R13 C375) (SOME R314 C1216))) (define-concept C3172 (AND C375 (SOME R13 C1797))) (define-concept C3173 (AND C1797 (SOME R278 C90))) (define-concept C3174 (AND C370 (SOME R13 C375))) (define-concept C3175 (AND C368 (SOME R13 C375))) (define-concept C3176 (AND C455 (SOME R232 C75))) (define-concept C3177 (AND C456 (SOME R410 C61))) (define-concept C3178 (AND C457 (SOME R410 C61))) (define-concept C3179 (AND C456 (SOME R230 C309) (SOME R310 C1228) (SOME R410 C62))) (define-concept C3180 (AND C457 (SOME R230 C309) (SOME R310 C1228) (SOME R410 C62))) (define-concept C3181 (AND C456 (SOME R230 C309) (SOME R310 C1228) (SOME R232 C79))) (define-concept C3182 (AND C457 (SOME R230 C309) (SOME R310 C1228) (SOME R232 C79))) (define-concept C3183 (AND C403 (SOME R232 C77))) (define-concept C3184 (AND C400 (SOME R232 C77))) (define-concept C3185 (AND C403 (SOME R17 C380))) (define-concept C3186 (AND C400 (SOME R17 C380))) (define-concept C3187 (AND C403 (SOME R17 C1796))) (define-concept C3188 (AND C400 (SOME R17 C1796))) (define-concept C3189 (AND C403 (SOME R410 C61))) (define-concept C3190 (AND C400 (SOME R410 C61))) (define-concept C3191 (AND C402 (SOME R232 C77))) (define-concept C3192 (AND C402 (SOME R17 C380))) (define-concept C3193 (AND C402 (SOME R17 C1796))) (define-concept C3194 (AND C402 (SOME R410 C61))) (define-concept C3195 (AND C570 (SOME R25 C402))) (define-concept C3196 (AND C454 (SOME R17 C1796))) (define-concept C3197 (AND C603 (SOME R25 C454))) (define-concept C3198 (AND C448 (SOME R17 C1796))) (define-concept C3199 (AND C566 (SOME R25 C448))) (define-concept C3200 (AND C453 (SOME R17 C1796))) (define-concept C3201 (AND C604 (SOME R25 C453))) (define-concept C3202 (AND C605 (SOME R25 C453))) (define-concept C3203 (AND C372 (SOME R17 C453))) (define-concept C3204 (AND C371 (SOME R13 C453))) (define-concept C3205 (AND C446 (SOME R17 C1796))) (define-concept C3206 (AND C568 (SOME R25 C446))) (define-concept C3207 (AND C443 (SOME R17 C1796))) (define-concept C3208 (AND C457 (SOME R17 C443))) (define-concept C3209 (AND C367 (SOME R17 C443))) (define-concept C3210 (AND C369 (SOME R13 C443))) (define-concept C3211 (AND C152 (SOME R13 C369) (SOME R314 C1216))) (define-concept C3212 (AND C369 (SOME R13 C1799))) (define-concept C3213 (AND C380 (SOME R232 C80))) (define-concept C3214 (AND C465 (SOME R232 C78))) (define-concept C3215 (AND C418 (SOME R232 C80))) (define-concept C3216 (AND C418 (SOME R13 C380))) (define-concept C3217 (AND C416 (SOME R232 C79))) (define-concept C3218 (AND C416 (SOME R13 C418))) (define-concept C3219 (AND C423 (SOME R232 C79))) (define-concept C3220 (AND C423 (SOME R13 C416))) (define-concept C3221 (AND C1802 (SOME R410 C60))) (define-concept C3222 (AND C1803 (SOME R410 C60))) (define-concept C3223 (AND C415 (SOME R13 C380))) (define-concept C3224 (AND C415 (SOME R232 C80))) (define-concept C3225 (AND C415 (SOME R268 (AND C920 (SOME R202 C1178))))) (define-concept C3226 (AND C365 (SOME R13 C415))) (define-concept C3227 (AND C364 (SOME R13 C415))) (define-concept C3228 (AND C422 (SOME R13 C415))) (define-concept C3229 (AND C364 (SOME R232 C77))) (define-concept C3230 (AND C365 (SOME R232 C80))) (define-concept C3231 (AND C415 (SOME R12 (AND C1802 (SOME R13 C415))))) (define-concept C3232 (AND C1802 (SOME R13 C415) (SOME R232 C78))) (define-concept C3233 (AND C1802 (SOME R13 C415) (SOME R410 C61))) (define-concept C3234 (AND C1802 (SOME R13 C415) (SOME R320 C1221) (SOME R310 C1228) (SOME R410 C62))) (define-concept C3235 (AND C1794 (SOME R13 C415) (SOME R163 (AND C868 (SOME R202 C1055))) (SOME R232 C78))) (define-concept C3236 (AND C426 (SOME R13 C380))) (define-concept C3237 (AND C426 (SOME R232 C79))) (define-concept C3238 (AND C426 (SOME R12 (AND C1803 (SOME R13 C426))))) (define-concept C3239 (AND C424 (SOME R232 C80))) (define-concept C3240 (AND C424 (SOME R13 C380))) (define-concept C3241 (AND C524 (SOME R328 C72))) (define-concept C3242 (AND C428 (SOME R328 C72))) (define-concept C3243 (AND C436 (SOME R328 C71))) (define-concept C3244 (AND C529 (SOME R328 C71))) (define-concept C3245 (AND C429 (SOME R232 C80))) (define-concept C3246 (AND C429 (SOME R13 (AND C424 (SOME R330 C72))))) (define-concept C3247 (AND C431 (SOME R232 C80))) (define-concept C3248 (AND C431 (SOME R13 C429))) (define-concept C3249 (AND C430 (SOME R232 C80))) (define-concept C3250 (AND C430 (SOME R13 C429))) (define-concept C3251 (AND C432 (SOME R232 C80))) (define-concept C3252 (AND C432 (SOME R13 C429))) (define-concept C3253 (AND C390 (SOME R284 (AND C917 (SOME R202 C1147))))) (define-concept C3254 (AND C397 (SOME R232 C79))) (define-concept C3255 (AND C396 (SOME R232 C79))) (define-concept C3256 (AND C393 (SOME R232 C80))) (define-concept C3257 (AND C395 (SOME R232 C80))) (define-concept C3258 (AND C394 (SOME R232 C80))) (define-concept C3259 (AND C391 (SOME R232 C80))) (define-concept C3260 (AND C437 (SOME R232 C80))) (define-concept C3261 (AND C437 (SOME R13 (AND C424 (SOME R330 C71))))) (define-concept C3262 (AND C438 (SOME R232 C80))) (define-concept C3263 (AND C438 (SOME R13 C437))) (define-concept C3264 (AND C439 (SOME R232 C80))) (define-concept C3265 (AND C439 (SOME R13 C437))) (define-concept C3266 (AND C391 (SOME R76 C471))) (define-concept C3267 (AND C391 (SOME R78 C424))) (define-concept C3268 (AND C391 (SOME R13 C424))) (define-concept C3269 (AND C395 (SOME R76 C526))) (define-concept C3270 (AND C395 (SOME R78 (AND C424 (SOME R330 C72))))) (define-concept C3271 (AND C395 (SOME R13 (AND C424 (SOME R330 C72))))) (define-concept C3272 (AND C66 (SOME R90 C797))) (define-concept C3273 (AND C1826 (SOME R182 C95))) (define-concept C3274 (AND C1826 (SOME R142 C1456))) (define-concept C3275 (AND C771 (SOME R150 C1541) (SOME R122 (AND C901 (SOME R291 (AND C174 (SOME R47 C1788))))))) (define-concept C3276 (AND C1863 (SOME R204 C1016) (SOME R178 C100))) (define-concept C3277 (AND C1867 (SOME R204 C1016) (SOME R178 C100))) (define-concept C3278 (AND C1870 (SOME R204 C1016) (SOME R178 C100))) (define-concept C3279 (AND C1874 (SOME R204 C1016) (SOME R178 C100))) (define-concept C3280 (AND C1874 (SOME R204 C1017) (SOME R178 C100))) (define-concept C3281 (AND C1880 (SOME R204 C1016) (SOME R178 C100))) (define-concept C3282 (AND C1880 (SOME R204 C1017) (SOME R178 C100))) (define-concept C3283 (AND C1886 (SOME R204 C1016) (SOME R178 C100))) (define-concept C3284 (AND C1886 (SOME R204 C1017) (SOME R178 C100))) (define-concept C3285 (AND C1891 (SOME R204 C1016) (SOME R178 C100))) (define-concept C3286 (AND C1891 (SOME R204 C1017) (SOME R178 C100))) (define-concept C3287 (AND C914 (SOME R202 C1197) (SOME R271 C175) (SOME R178 C100))) (define-concept C3288 (AND C915 (SOME R212 C1023) (SOME R273 C175) (SOME R178 C100))) (define-concept C3289 (AND C915 (SOME R212 C1024) (SOME R273 C175) (SOME R178 C100))) (define-concept C3290 (AND C901 (SOME R291 (AND C1898 (SOME R47 C1788))) (SOME R204 C1016) (SOME R178 C100))) (define-concept C3291 (AND C10 (SOME R190 C1900) (SOME R178 C100))) (define-concept C3292 (AND C10 (SOME R190 C1901) (SOME R178 C100))) (define-concept C3293 (AND C10 (SOME R190 C1899) (SOME R190 C1901) (SOME R190 C1893) (SOME R178 C100))) (define-concept C3294 (AND C1908 (SOME R178 C100))) (define-concept C3295 (AND C895 (SOME R293 C1907) (SOME R206 (AND C1038 (SOME R218 C239))))) (define-concept C3296 (AND C1485 (SOME R151 C772))) (define-concept C3297 (AND C772 (SOME R122 (AND C892 (SOME R201 C301))) (SOME R150 C1486))) (define-concept C3298 (AND C1915 (SOME R126 C1916))) (define-concept C3299 (AND C1915 (SOME R152 C1521) (SOME R34 (AND C1585 (SOME R94 (AND C749 (SOME R53 C518))))))) (define-concept C3300 (AND C1922 (SOME R34 (AND C773 (SOME R94 C1916))))) (define-concept C3301 (AND C1922 (SOME R34 C1915))) (define-concept C3302 (AND C1922 (SOME R122 (AND C51 (SOME R407 (AND C194 (SOME R47 C749))))))) (define-concept C3303 (AND C1926 (SOME R126 C1927))) (define-concept C3304 (AND C1927 (SOME R129 C1926))) (define-concept C3305 (AND C1930 (SOME R34 C1926))) (define-concept C3306 (AND C1930 (SOME R122 (AND C51 (SOME R407 (AND C194 (SOME R43 C720))))))) (define-concept C3307 (AND C1933 (SOME R34 (AND C772 (SOME R122 (AND C914 (SOME R271 C194))))) (SOME R34 (AND C864 (SOME R94 C194))))) (define-concept C3308 (AND C864 (SOME R94 C1934) (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C3309 (AND C864 (SOME R94 C1935) (SOME R366 (AND C873 (SOME R202 C1094))))) (define-concept C3310 (AND C1938 (SOME R25 C1936))) (define-concept C3311 (AND C1939 (SOME R25 C1937))) (define-concept C3312 (AND C1938 (SOME R28 C1935))) (define-concept C3313 (AND C1939 (SOME R28 C1934))) (define-concept C3314 (AND C1094 (SOME R129 (AND C1933 (SOME R34 (AND C772 (SOME R122 (AND C914 (SOME R271 C194))) (SOME R128 C1193))))))) (define-concept C3315 (AND C1095 (SOME R129 (AND C1933 (SOME R34 (AND C772 (SOME R122 (AND C914 (SOME R271 C194))) (SOME R128 C1192))))))) (define-concept C3316 (AND C300 (SOME R131 (AND C1388 (SOME R372 (AND C874 (SOME R202 C1107) (SOME R173 (AND C53 (SOME R405 C1400))))))) (SOME R90 (AND C794 (SOME R96 C1400))) (SOME R372 (AND C874 (SOME R202 C1106) (SOME R173 (AND C53 (SOME R405 C1388))))))) (define-concept C3317 (AND C862 (SOME R91 C1400) (SOME R130 (AND C1388 (SOME R372 (AND C874 (SOME R202 C1107) (SOME R173 (AND C53 (SOME R405 C1400))))))) (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C3318 (AND C1972 (SOME R372 (AND C874 (SOME R202 C1107) (SOME R173 (AND C53 (SOME R405 C1400))))))) (define-concept C3319 (AND C2019 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164))))))) (define-concept C3320 (AND C2020 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164))))))) (define-concept C3321 (AND C2021 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164))))))) (define-concept C3322 (AND C2022 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164))))))) (define-concept C3323 (AND C2027 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164))))))) (define-concept C3324 (AND C2028 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164))))))) (define-concept C3325 (AND C2029 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164))))))) (define-concept C3326 (AND C2031 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164))))))) (define-concept C3327 (AND C2036 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164))))))) (define-concept C3328 (AND C2019 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C3329 (AND C2020 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C3330 (AND C2021 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C3331 (AND C2022 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C3332 (AND C2027 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C3333 (AND C2028 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C3334 (AND C2029 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C3335 (AND C2031 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C3336 (AND C2036 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C3337 (AND C2035 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1159))))))) (define-concept C3338 (AND C2035 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C3339 (AND C2038 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1158))))))) (define-concept C3340 (AND C2038 (SOME R282 (AND C916 (SOME R202 C1158))))) (define-concept C3341 (AND C2043 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1157))))))) (define-concept C3342 (AND C2044 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1157))))))) (define-concept C3343 (AND C2043 (SOME R282 (AND C916 (SOME R202 C1157))))) (define-concept C3344 (AND C2044 (SOME R282 (AND C916 (SOME R202 C1157))))) (define-concept C3345 (AND C2025 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1141))) (SOME R276 (AND C921 (SOME R202 C1189))))))) (define-concept C3346 (AND C2025 (SOME R282 (AND C916 (SOME R202 C1141))))) (define-concept C3347 (AND C2025 (SOME R276 (AND C921 (SOME R202 C1189))))) (define-concept C3348 (AND C2033 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1144))))))) (define-concept C3349 (AND C2023 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1144))))))) (define-concept C3350 (AND C2045 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1144))))))) (define-concept C3351 (AND C2033 (SOME R282 (AND C916 (SOME R202 C1144))))) (define-concept C3352 (AND C2023 (SOME R282 (AND C916 (SOME R202 C1144))))) (define-concept C3353 (AND C2045 (SOME R282 (AND C916 (SOME R202 C1144))))) (define-concept C3354 (AND C2037 (SOME R276 (AND C921 (SOME R202 C1188))))) (define-concept C3355 (AND C2034 (SOME R24 (AND C194 (SOME R276 (AND C921 (SOME R202 C1189))))))) (define-concept C3356 (AND C2041 (SOME R24 (AND C194 (SOME R276 (AND C921 (SOME R202 C1189))))))) (define-concept C3357 (AND C2034 (SOME R276 (AND C921 (SOME R202 C1189))))) (define-concept C3358 (AND C2041 (SOME R276 (AND C921 (SOME R202 C1189))))) (define-concept C3359 (AND C2047 (SOME R24 (AND C194 (SOME R276 (AND C921 (SOME R202 C1189))) (SOME R282 (AND C916 (SOME R202 C1164))))))) (define-concept C3360 (AND C2047 (SOME R276 (AND C921 (SOME R202 C1189))))) (define-concept C3361 (AND C2047 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C3362 (AND C2024 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164))) (SOME R276 (AND C921 (SOME R202 C1188))))))) (define-concept C3363 (AND C2024 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C3364 (AND C2024 (SOME R276 (AND C921 (SOME R202 C1188))))) (define-concept C3365 (AND C2036 (SOME R95 (AND C865 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C3366 (AND C2021 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3367 (AND C2022 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3368 (AND C2023 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3369 (AND C2024 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3370 (AND C2025 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3371 (AND C2029 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3372 (AND C2031 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3373 (AND C2032 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3374 (AND C2033 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3375 (AND C2035 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3376 (AND C2037 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3377 (AND C2038 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3378 (AND C2041 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3379 (AND C2045 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3380 (AND C2047 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C3381 (AND C2019 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C3382 (AND C2020 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C3383 (AND C2027 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C3384 (AND C2028 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C3385 (AND C2034 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C3386 (AND C2039 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C3387 (AND C2040 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C3388 (AND C2043 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C3389 (AND C2044 (SOME R95 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C3390 (AND C2021 (SOME R90 C2222))) (define-concept C3391 (AND C2027 (SOME R90 C2222))) (define-concept C3392 (AND C2040 (SOME R90 C2222))) (define-concept C3393 (AND C2020 (SOME R90 C2223))) (define-concept C3394 (AND C2191 (SOME R90 C2223))) (define-concept C3395 (AND C2025 (SOME R90 C2223))) (define-concept C3396 (AND C2033 (SOME R90 C2223))) (define-concept C3397 (AND C2035 (SOME R90 C2223))) (define-concept C3398 (AND C2036 (SOME R90 C2223))) (define-concept C3399 (AND C2038 (SOME R90 C2223))) (define-concept C3400 (AND C2039 (SOME R90 C2223))) (define-concept C3401 (AND C2041 (SOME R90 C2223))) (define-concept C3402 (AND C2047 (SOME R90 C2223))) (define-concept C3403 (AND C2020 (SOME R90 C2224))) (define-concept C3404 (AND C2029 (SOME R90 C2224))) (define-concept C3405 (AND C2034 (SOME R90 C2224))) (define-concept C3406 (AND C2037 (SOME R90 C2224))) (define-concept C3407 (AND C2043 (SOME R90 C2224))) (define-concept C3408 (AND C2044 (SOME R90 C2224))) (define-concept C3409 (AND C2019 (SOME R90 C2225))) (define-concept C3410 (AND C794 (SOME R96 C1392) (SOME R91 C2164))) (define-concept C3411 (AND C794 (SOME R96 C1393) (SOME R91 C2164))) (define-concept C3412 (AND C794 (SOME R96 C1394) (SOME R91 C2164))) (define-concept C3413 (AND C794 (SOME R96 C1395) (SOME R91 C2164))) (define-concept C3414 (AND C794 (SOME R96 C1396) (SOME R91 C2164))) (define-concept C3415 (AND C2172 (SOME R90 (AND C794 (SOME R96 C1393))))) (define-concept C3416 (AND C2020 (SOME R90 (AND C794 (SOME R96 C1393))))) (define-concept C3417 (AND C2173 (SOME R90 (AND C794 (SOME R96 C1393))))) (define-concept C3418 (AND C2166 (SOME R90 (AND C794 (SOME R96 C1393))))) (define-concept C3419 (AND C2171 (SOME R90 (AND C794 (SOME R96 C1393))))) (define-concept C3420 (AND C2166 (SOME R90 (AND C794 (SOME R96 C1396))))) (define-concept C3421 (AND C2166 (SOME R90 (AND C794 (SOME R96 C1398))))) (define-concept C3422 (AND C803 (SOME R96 C1380) (SOME R100 C497) (SOME R102 C393))) (define-concept C3423 (AND C803 (SOME R96 C1350) (SOME R102 C720) (SOME R100 C173))) (define-concept C3424 (AND C181 (SOME R372 (AND C874 (SOME R173 (AND C53 (SOME R405 C1355))))))) (define-concept C3425 (AND C803 (SOME R102 C720) (SOME R100 C181) (SOME R96 C1350) (SOME R366 (AND C873 (SOME R202 C1095))) (SOME R35 C1461))) (define-concept C3426 (AND C803 (SOME R102 C720) (SOME R100 C181) (SOME R96 C1350) (SOME R366 (AND C873 (SOME R202 C1095))) (SOME R128 C1826))) (define-concept C3427 (AND C202 (SOME R180 C100))) (define-concept C3428 (AND C202 (SOME R178 C100))) (define-concept C3429 (AND C510 (SOME R410 C61))) (define-concept C3430 (AND C511 (SOME R25 C2278))) (define-concept C3431 (AND C516 (SOME R25 C2278))) (define-concept C3432 (AND C522 (SOME R25 C2278))) (define-concept C3433 (AND C518 (SOME R25 C2278))) (define-concept C3434 (AND C521 (SOME R25 C2278))) (define-concept C3435 (AND C517 (SOME R25 C2278))) (define-concept C3436 (AND C512 (SOME R25 C2278))) (define-concept C3437 (AND C513 (SOME R25 C2278))) (define-concept C3438 (AND C519 (SOME R25 C2278))) (define-concept C3439 (AND C461 (SOME R25 C2278))) (define-concept C3440 (AND C436 (SOME R25 C2279))) (define-concept C3441 (AND C544 (SOME R25 C2279))) (define-concept C3442 (AND C428 (SOME R25 C2280))) (define-concept C3443 (AND C511 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C3444 (AND C510 (SOME R28 C718))) (define-concept C3445 (AND C512 (SOME R23 C511))) (define-concept C3446 (AND C513 (SOME R23 C511))) (define-concept C3447 (AND C514 (SOME R21 C512))) (define-concept C3448 (AND C515 (SOME R23 C512))) (define-concept C3449 (AND C516 (SOME R23 C512))) (define-concept C3450 (AND C517 (SOME R23 C512))) (define-concept C3451 (AND C518 (SOME R23 C513))) (define-concept C3452 (AND C519 (SOME R23 C513))) (define-concept C3453 (AND C522 (SOME R23 C513))) (define-concept C3454 (AND C394 (SOME R79 C522))) (define-concept C3455 (AND C512 (SOME R232 C79))) (define-concept C3456 (AND C513 (SOME R232 C80))) (define-concept C3457 (AND C513 (SOME R410 C62))) (define-concept C3458 (AND C461 (SOME R232 C79))) (define-concept C3459 (AND C514 (SOME R25 C461))) (define-concept C3460 (AND C515 (SOME R25 C461))) (define-concept C3461 (AND C461 (SOME R24 C350))) (define-concept C3462 (AND C461 (SOME R24 C351))) (define-concept C3463 (AND C461 (SOME R28 C347))) (define-concept C3464 (AND C461 (SOME R28 C348))) (define-concept C3465 (AND C461 (SOME R28 C349))) (define-concept C3466 (AND C2286 (SOME R410 C61))) (define-concept C3467 (AND C520 (SOME R17 C518))) (define-concept C3468 (AND C521 (SOME R17 C518))) (define-concept C3469 (AND C518 (SOME R24 C1751))) (define-concept C3470 (AND C749 (SOME R46 C173) (SOME R180 C100))) (define-concept C3471 (AND C749 (SOME R97 C796))) (define-concept C3472 (AND C796 (SOME R96 C749) (SOME R91 C511))) (define-concept C3473 (AND C511 (SOME R92 C803))) (define-concept C3474 (AND C2305 (SOME R35 C2304))) (define-concept C3475 (AND C800 (SOME R93 C2286) (SOME R35 (AND C2305 (SOME R100 C518))))) (define-concept C3476 (AND C518 (SOME R92 (AND C792 (SOME R96 C749))))) (define-concept C3477 (AND C792 (SOME R96 C749) (SOME R35 C2304))) (define-concept C3478 (AND C518 (SOME R90 C2294))) (define-concept C3479 (AND C2294 (SOME R91 C518) (SOME R35 C2306))) (define-concept C3480 (AND C804 (SOME R182 C94))) (define-concept C3481 (AND C804 (SOME R178 C100))) (define-concept C3482 (AND C2306 (SOME R398 (AND C890 (SOME R202 C1083))))) (define-concept C3483 (AND C2294 (SOME R91 C2287) (SOME R368 (AND C875 (SOME R202 C1115))) (SOME R140 C2327))) (define-concept C3484 (AND C2333 (SOME R180 C100))) (define-concept C3485 (AND C797 (SOME R128 (AND C21 (SOME R107 C1442))) (SOME R178 C100))) (define-concept C3486 (AND C544 (SOME R107 C1442) (SOME R178 C100))) (define-concept C3487 (AND C544 (SOME R107 C1442) (SOME R272 (AND C915 (SOME R204 C1170))))) (define-concept C3488 (AND C743 (SOME R97 (AND C794 (SOME R91 C539))))) (define-concept C3489 (AND C744 (SOME R97 (AND C794 (SOME R91 C545))))) (define-concept C3490 (AND C748 (SOME R97 (AND C794 (SOME R91 C416))))) (define-concept C3491 (AND C659 (SOME R284 (AND C917 (SOME R202 C1136))))) (define-concept C3492 (AND C2340 (SOME R28 C723))) (define-concept C3493 (AND C2345 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C3494 (AND C159 (SOME R51 C2344) (SOME R52 C747))) (define-concept C3495 (AND C2344 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C3496 (AND C564 (SOME R24 C2343))) (define-concept C3497 (AND C807 (SOME R184 C98))) (define-concept C3498 (AND C807 (SOME R180 C101))) (define-concept C3499 (AND C807 (SOME R380 (AND C881 (SOME R212 C1024))) (SOME R382 (AND C882 (SOME R212 C1024))))) (define-concept C3500 (AND C807 (SOME R382 (AND C882 (SOME R212 C1024))) (SOME R182 C95))) (define-concept C3501 (AND C807 (SOME R382 (AND C882 (SOME R212 C1024))) (SOME R178 C100))) (define-concept C3502 (AND C2353 (SOME R178 C100))) (define-concept C3503 (AND C599 (SOME R232 C79))) (define-concept C3504 (AND C597 (SOME R232 C79))) (define-concept C3505 (AND C662 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C3506 (AND C654 (SOME R232 C75))) (define-concept C3507 (AND C655 (SOME R232 C75))) (define-concept C3508 (AND C656 (SOME R232 C75))) (define-concept C3509 (AND C359 (SOME R232 C75))) (define-concept C3510 (AND C708 (SOME R232 C75))) (define-concept C3511 (AND C705 (SOME R232 C75))) (define-concept C3512 (AND C599 (SOME R22 C659))) (define-concept C3513 (AND C660 (SOME R284 C1671))) (define-concept C3514 (AND C661 (SOME R268 C1710))) (define-concept C3515 (AND C654 (SOME R16 C2340))) (define-concept C3516 (AND C654 (SOME R312 C1205) (SOME R232 C79))) (define-concept C3517 (AND C655 (SOME R312 C1205) (SOME R232 C79))) (define-concept C3518 (AND C359 (SOME R312 C1205) (SOME R232 C79))) (define-concept C3519 (AND C656 (SOME R312 C1205) (SOME R232 C79))) (define-concept C3520 (AND C603 (SOME R18 C2357))) (define-concept C3521 (AND C603 (SOME R18 C2358))) (define-concept C3522 (AND C603 (SOME R18 C2360))) (define-concept C3523 (AND C603 (SOME R18 C2361))) (define-concept C3524 (AND C603 (SOME R18 C2362))) (define-concept C3525 (AND C603 (SOME R18 C2363))) (define-concept C3526 (AND C603 (SOME R18 C2364))) (define-concept C3527 (AND C603 (SOME R18 C2365))) (define-concept C3528 (AND C603 (SOME R18 C2366))) (define-concept C3529 (AND C603 (SOME R18 C2367))) (define-concept C3530 (AND C2340 (SOME R19 C2362) (SOME R232 C79))) (define-concept C3531 (AND C2340 (SOME R19 C2361) (SOME R232 C79))) (define-concept C3532 (AND C2340 (SOME R19 C2360) (SOME R232 C79))) (define-concept C3533 (AND C2340 (SOME R24 C2369) (SOME R24 C2370) (SOME R24 C2368) (SOME R232 C79))) (define-concept C3534 (AND C605 (SOME R18 C2372))) (define-concept C3535 (AND C605 (SOME R18 C2373))) (define-concept C3536 (AND C605 (SOME R18 C2374))) (define-concept C3537 (AND C600 (SOME R18 C2375))) (define-concept C3538 (AND C600 (SOME R18 C2376))) (define-concept C3539 (AND C600 (SOME R18 C2377))) (define-concept C3540 (AND C600 (SOME R18 C2378))) (define-concept C3541 (AND C600 (SOME R18 C2379))) (define-concept C3542 (AND C600 (SOME R18 C2380))) (define-concept C3543 (AND C601 (SOME R18 C2381))) (define-concept C3544 (AND C601 (SOME R18 C2382))) (define-concept C3545 (AND C601 (SOME R18 C2383))) (define-concept C3546 (AND C602 (SOME R18 C2384))) (define-concept C3547 (AND C602 (SOME R18 C2385))) (define-concept C3548 (AND C604 (SOME R18 C2386))) (define-concept C3549 (AND C604 (SOME R18 C2387))) (define-concept C3550 (AND C604 (SOME R18 C2388))) (define-concept C3551 (AND C604 (SOME R18 C2389))) (define-concept C3552 (AND C604 (SOME R18 C2390))) (define-concept C3553 (AND C604 (SOME R18 C2391))) (define-concept C3554 (AND C604 (SOME R18 C2392))) (define-concept C3555 (AND C2393 (SOME R232 C79))) (define-concept C3556 (AND C2394 (SOME R232 C79))) (define-concept C3557 (AND C705 (SOME R314 C1215) (SOME R232 C79))) (define-concept C3558 (AND C706 (SOME R314 C1216))) (define-concept C3559 (AND C706 (SOME R60 (AND C151 (SOME R19 C2362) (SOME R242 (AND C907 (SOME R202 C1217))) (SOME R163 (AND C868 (SOME R202 C1055))))))) (define-concept C3560 (AND C706 (SOME R62 (AND C151 (SOME R19 C2392) (SOME R242 (AND C907 (SOME R202 C1216))) (SOME R163 (AND C868 (SOME R202 C1055))))))) (define-concept C3561 (AND C707 (SOME R314 C1217))) (define-concept C3562 (AND C707 (SOME R58 (AND C151 (SOME R19 C2392) (SOME R242 (AND C907 (SOME R202 C1217))) (SOME R163 (AND C868 (SOME R202 C1055))))))) (define-concept C3563 (AND C707 (SOME R58 (AND C151 (SOME R19 C2362) (SOME R242 (AND C907 (SOME R202 C1216))) (SOME R163 (AND C868 (SOME R202 C1055))))))) (define-concept C3564 (AND C711 (SOME R60 C597))) (define-concept C3565 (AND C711 (SOME R62 (AND C657 (SOME R19 C604))))) (define-concept C3566 (AND C710 (SOME R60 C2372))) (define-concept C3567 (AND C710 (SOME R62 C2364))) (define-concept C3568 (AND C710 (SOME R312 C1206))) (define-concept C3569 (AND C709 (SOME R60 (AND C659 (SOME R23 C603))))) (define-concept C3570 (AND C709 (SOME R62 C2363))) (define-concept C3571 (AND C709 (SOME R312 C1207))) (define-concept C3572 (AND C604 (SOME R18 C2398))) (define-concept C3573 (AND C2399 (SOME R232 C79))) (define-concept C3574 (AND C2391 (SOME R18 C2399))) (define-concept C3575 (AND C597 (SOME R18 C2340))) (define-concept C3576 (AND C597 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C3577 (AND C2400 (SOME R232 C79))) (define-concept C3578 (AND C2400 (SOME R268 C1710))) (define-concept C3579 (AND C2401 (SOME R232 C79))) (define-concept C3580 (AND C2402 (SOME R232 C79))) (define-concept C3581 (AND C2404 (SOME R232 C75))) (define-concept C3582 (AND C359 (SOME R30 C725))) (define-concept C3583 (AND C2405 (SOME R232 C79))) (define-concept C3584 (AND C2406 (SOME R232 C79))) (define-concept C3585 (AND C355 (SOME R19 C2404) (SOME R232 C75))) (define-concept C3586 (AND C355 (SOME R19 C2404) (SOME R314 C1215))) (define-concept C3587 (AND C355 (SOME R314 C1216) (SOME R19 C2405) (SOME R232 C79))) (define-concept C3588 (AND C355 (SOME R314 C1216) (SOME R19 C2406) (SOME R232 C79))) (define-concept C3589 (AND C339 (SOME R60 C2407) (SOME R62 C2408) (SOME R232 C79))) (define-concept C3590 (AND C564 (SOME R232 C75))) (define-concept C3591 (AND C151 (SOME R21 C2410) (SOME R232 C79))) (define-concept C3592 (AND C151 (SOME R17 C2412) (SOME R232 C79))) (define-concept C3593 (AND C566 (SOME R24 C2411) (SOME R24 (AND C2343 (SOME R25 C566))))) (define-concept C3594 (AND C566 (SOME R24 C2391) (SOME R24 C2359) (SOME R24 C705) (SOME R24 C708) (SOME R24 C2404))) (define-concept C3595 (AND C566 (SOME R95 C808))) (define-concept C3596 (AND C566 (SOME R95 C809))) (define-concept C3597 (AND C2410 (SOME R20 C2413))) (define-concept C3598 (AND C2428 (SOME R96 C563))) (define-concept C3599 (AND C1496 (SOME R151 C2430))) (define-concept C3600 (AND C673 (SOME R232 C80))) (define-concept C3601 (AND C2463 (SOME R232 C80))) (define-concept C3602 (AND C2434 (SOME R232 C80))) (define-concept C3603 (AND C2436 (SOME R232 C80))) (define-concept C3604 (AND C680 (SOME R232 C80))) (define-concept C3605 (AND C2437 (SOME R232 C80))) (define-concept C3606 (AND C2438 (SOME R232 C80))) (define-concept C3607 (AND C2439 (SOME R232 C80))) (define-concept C3608 (AND C2440 (SOME R232 C80))) (define-concept C3609 (AND C2441 (SOME R232 C80))) (define-concept C3610 (AND C2442 (SOME R232 C80))) (define-concept C3611 (AND C2443 (SOME R232 C80))) (define-concept C3612 (AND C2444 (SOME R232 C80))) (define-concept C3613 (AND C2445 (SOME R232 C80))) (define-concept C3614 (AND C2446 (SOME R232 C80))) (define-concept C3615 (AND C2447 (SOME R232 C80))) (define-concept C3616 (AND C2448 (SOME R232 C80))) (define-concept C3617 (AND C2449 (SOME R232 C80))) (define-concept C3618 (AND C2450 (SOME R232 C80))) (define-concept C3619 (AND C2451 (SOME R232 C80))) (define-concept C3620 (AND C2452 (SOME R232 C80))) (define-concept C3621 (AND C2453 (SOME R232 C80))) (define-concept C3622 (AND C2454 (SOME R232 C80))) (define-concept C3623 (AND C2455 (SOME R232 C80))) (define-concept C3624 (AND C2456 (SOME R232 C80))) (define-concept C3625 (AND C2457 (SOME R232 C80))) (define-concept C3626 (AND C2458 (SOME R232 C80))) (define-concept C3627 (AND C2459 (SOME R232 C80))) (define-concept C3628 (AND C2460 (SOME R232 C80))) (define-concept C3629 (AND C2461 (SOME R232 C80))) (define-concept C3630 (AND C2462 (SOME R232 C80))) (define-concept C3631 (AND C2464 (SOME R232 C80))) (define-concept C3632 (AND C2465 (SOME R232 C80))) (define-concept C3633 (AND C2466 (SOME R232 C80))) (define-concept C3634 (AND C2467 (SOME R232 C80))) (define-concept C3635 (AND C2468 (SOME R232 C80))) (define-concept C3636 (AND C2469 (SOME R232 C80))) (define-concept C3637 (AND C2470 (SOME R232 C80))) (define-concept C3638 (AND C2471 (SOME R232 C80))) (define-concept C3639 (AND C2472 (SOME R232 C80))) (define-concept C3640 (AND C2473 (SOME R232 C80))) (define-concept C3641 (AND C2474 (SOME R232 C80))) (define-concept C3642 (AND C2475 (SOME R232 C80))) (define-concept C3643 (AND C2476 (SOME R232 C80))) (define-concept C3644 (AND C2477 (SOME R232 C80))) (define-concept C3645 (AND C2478 (SOME R232 C80))) (define-concept C3646 (AND C2479 (SOME R232 C80))) (define-concept C3647 (AND C2480 (SOME R232 C80))) (define-concept C3648 (AND C2481 (SOME R232 C80))) (define-concept C3649 (AND C2482 (SOME R232 C80))) (define-concept C3650 (AND C2483 (SOME R232 C80))) (define-concept C3651 (AND C2484 (SOME R232 C80))) (define-concept C3652 (AND C2485 (SOME R232 C80))) (define-concept C3653 (AND C2486 (SOME R232 C80))) (define-concept C3654 (AND C2498 (SOME R232 C80))) (define-concept C3655 (AND C2499 (SOME R232 C80))) (define-concept C3656 (AND C2500 (SOME R232 C80))) (define-concept C3657 (AND C693 (SOME R232 C80))) (define-concept C3658 (AND C2501 (SOME R232 C80))) (define-concept C3659 (AND C2487 (SOME R232 C79))) (define-concept C3660 (AND C2488 (SOME R232 C79))) (define-concept C3661 (AND C2489 (SOME R232 C79))) (define-concept C3662 (AND C2490 (SOME R232 C79))) (define-concept C3663 (AND C2491 (SOME R232 C79))) (define-concept C3664 (AND C2492 (SOME R232 C79))) (define-concept C3665 (AND C2493 (SOME R232 C79))) (define-concept C3666 (AND C2494 (SOME R232 C79))) (define-concept C3667 (AND C2495 (SOME R232 C79))) (define-concept C3668 (AND C2496 (SOME R232 C79))) (define-concept C3669 (AND C2497 (SOME R232 C79))) (define-concept C3670 (AND C672 (SOME R232 C79))) (define-concept C3671 (AND C2502 (SOME R232 C79))) (define-concept C3672 (AND C2503 (SOME R232 C79))) (define-concept C3673 (AND C2504 (SOME R232 C79))) (define-concept C3674 (AND C2505 (SOME R232 C79))) (define-concept C3675 (AND C695 (SOME R232 C79))) (define-concept C3676 (AND C688 (SOME R232 C79))) (define-concept C3677 (AND C690 (SOME R232 C79))) (define-concept C3678 (AND C2506 (SOME R232 C79))) (define-concept C3679 (AND C2507 (SOME R232 C79))) (define-concept C3680 (AND C2508 (SOME R232 C79))) (define-concept C3681 (AND C691 (SOME R232 C79))) (define-concept C3682 (AND C692 (SOME R232 C79))) (define-concept C3683 (AND C698 (SOME R232 C79))) (define-concept C3684 (AND C2511 (SOME R232 C79))) (define-concept C3685 (AND C2512 (SOME R232 C79))) (define-concept C3686 (AND C2513 (SOME R232 C79))) (define-concept C3687 (AND C2514 (SOME R232 C79))) (define-concept C3688 (AND C2515 (SOME R232 C79))) (define-concept C3689 (AND C2521 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C3690 (AND C2522 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C3691 (AND C360 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C3692 (AND C2523 (SOME R268 (AND C920 (SOME R202 C1178))))) (define-concept C3693 (AND C1801 (SOME R232 C78))) (define-concept C3694 (AND C702 (SOME R232 C78))) (define-concept C3695 (AND C701 (SOME R232 C78))) (define-concept C3696 (AND C2521 (SOME R17 C460))) (define-concept C3697 (AND C2522 (SOME R17 C460))) (define-concept C3698 (AND C2521 (SOME R25 C460))) (define-concept C3699 (AND C2522 (SOME R25 C460))) (define-concept C3700 (AND C2525 (SOME R25 C460))) (define-concept C3701 (AND C703 (SOME R25 C460))) (define-concept C3702 (AND C674 (SOME R232 C78))) (define-concept C3703 (AND C460 (SOME R53 C2523))) (define-concept C3704 (AND C2523 (SOME R53 C418))) (define-concept C3705 (AND C2523 (SOME R30 C724))) (define-concept C3706 (AND C1699 (SOME R29 C460) (SOME R28 C715))) (define-concept C3707 (AND C1699 (SOME R29 C460) (SOME R28 C713))) (define-concept C3708 (AND C1699 (SOME R29 C331) (SOME R28 C714))) (define-concept C3709 (AND C2463 (SOME R17 C673))) (define-concept C3710 (AND C2434 (SOME R17 C673))) (define-concept C3711 (AND C2434 (SOME R79 C2463))) (define-concept C3712 (AND C2463 (SOME R77 C2434))) (define-concept C3713 (AND C2436 (SOME R69 C2434))) (define-concept C3714 (AND C2480 (SOME R69 C2434))) (define-concept C3715 (AND C2447 (SOME R69 C2434))) (define-concept C3716 (AND C2448 (SOME R69 C2434))) (define-concept C3717 (AND C2456 (SOME R69 C2434))) (define-concept C3718 (AND C2487 (SOME R69 C2434))) (define-concept C3719 (AND C2497 (SOME R69 C2434))) (define-concept C3720 (AND C680 (SOME R69 C2436))) (define-concept C3721 (AND C2437 (SOME R69 C2436))) (define-concept C3722 (AND C2446 (SOME R69 C2436))) (define-concept C3723 (AND C2453 (SOME R69 C680))) (define-concept C3724 (AND C2452 (SOME R69 C680))) (define-concept C3725 (AND C2450 (SOME R69 C680))) (define-concept C3726 (AND C2449 (SOME R69 C680))) (define-concept C3727 (AND C2454 (SOME R69 C2453))) (define-concept C3728 (AND C2455 (SOME R69 C2453))) (define-concept C3729 (AND C2451 (SOME R69 C2454))) (define-concept C3730 (AND C2443 (SOME R69 C2437))) (define-concept C3731 (AND C2438 (SOME R69 C2437))) (define-concept C3732 (AND C2440 (SOME R69 C2443))) (define-concept C3733 (AND C2442 (SOME R69 C2443))) (define-concept C3734 (AND C2445 (SOME R69 C2443))) (define-concept C3735 (AND C2444 (SOME R69 C2445))) (define-concept C3736 (AND C2441 (SOME R69 C2442))) (define-concept C3737 (AND C2462 (SOME R69 C2438))) (define-concept C3738 (AND C2460 (SOME R69 C2438))) (define-concept C3739 (AND C2461 (SOME R79 C2438))) (define-concept C3740 (AND C2438 (SOME R77 C2461))) (define-concept C3741 (AND C2458 (SOME R69 C2462))) (define-concept C3742 (AND C2459 (SOME R69 C2460))) (define-concept C3743 (AND C2457 (SOME R69 C2456))) (define-concept C3744 (AND C2464 (SOME R69 C2456))) (define-concept C3745 (AND C2465 (SOME R69 C2456))) (define-concept C3746 (AND C2466 (SOME R69 C2456))) (define-concept C3747 (AND C2473 (SOME R69 C2456))) (define-concept C3748 (AND C2469 (SOME R69 C2456))) (define-concept C3749 (AND C2467 (SOME R69 C2466))) (define-concept C3750 (AND C2468 (SOME R69 C2466))) (define-concept C3751 (AND C2472 (SOME R69 C2468))) (define-concept C3752 (AND C2470 (SOME R69 C2469))) (define-concept C3753 (AND C2471 (SOME R69 C2469))) (define-concept C3754 (AND C2479 (SOME R69 C2469))) (define-concept C3755 (AND C2476 (SOME R69 C2473))) (define-concept C3756 (AND C2478 (SOME R69 C2476))) (define-concept C3757 (AND C2481 (SOME R69 C2480))) (define-concept C3758 (AND C2484 (SOME R69 C2480))) (define-concept C3759 (AND C2485 (SOME R69 C2480))) (define-concept C3760 (AND C2486 (SOME R69 C2480))) (define-concept C3761 (AND C2482 (SOME R69 C2481))) (define-concept C3762 (AND C2483 (SOME R79 C2481))) (define-concept C3763 (AND C2481 (SOME R77 C2483))) (define-concept C3764 (AND C2488 (SOME R69 C2487))) (define-concept C3765 (AND C2489 (SOME R69 C2487))) (define-concept C3766 (AND C2490 (SOME R69 C2487))) (define-concept C3767 (AND C2491 (SOME R69 C2487))) (define-concept C3768 (AND C2492 (SOME R69 C2487))) (define-concept C3769 (AND C2493 (SOME R69 C2487))) (define-concept C3770 (AND C2494 (SOME R69 C2487))) (define-concept C3771 (AND C2495 (SOME R69 C2487))) (define-concept C3772 (AND C2496 (SOME R69 C2487))) (define-concept C3773 (AND C677 (SOME R69 C2497))) (define-concept C3774 (AND C678 (SOME R69 C2497))) (define-concept C3775 (AND C672 (SOME R69 C678))) (define-concept C3776 (AND C497 (SOME R71 C2440) (SOME R71 C2446) (SOME R71 C2449) (SOME R71 C2450) (SOME R71 C2461))) (define-concept C3777 (AND C481 (SOME R71 C2439) (SOME R71 C2458) (SOME R71 C2459) (SOME R71 C2460) (SOME R71 C2462))) (define-concept C3778 (AND C459 (SOME R71 C2441))) (define-concept C3779 (AND C463 (SOME R71 C2442) (SOME R71 C2444) (SOME R71 C2445))) (define-concept C3780 (AND C466 (SOME R71 C2451) (SOME R71 C2452) (SOME R71 C2453) (SOME R71 C2457) (SOME R71 C2458) (SOME R71 C2459) (SOME R71 C2460) (SOME R71 C2462))) (define-concept C3781 (AND C468 (SOME R71 C680))) (define-concept C3782 (AND C496 (SOME R71 C2478))) (define-concept C3783 (AND C490 (SOME R71 C2479))) (define-concept C3784 (AND C474 (SOME R71 C2470) (SOME R71 C2471))) (define-concept C3785 (AND C472 (SOME R71 C2472))) (define-concept C3786 (AND C493 (SOME R71 C2485))) (define-concept C3787 (AND C461 (SOME R71 C2488) (SOME R71 C2489) (SOME R71 C2490) (SOME R71 C2491) (SOME R71 C2493) (SOME R71 C2494) (SOME R71 C2495))) (define-concept C3788 (AND C2502 (SOME R310 C1230) (SOME R69 C2498))) (define-concept C3789 (AND C2502 (SOME R310 C1229) (SOME R69 C2498))) (define-concept C3790 (AND C2500 (SOME R69 C2498))) (define-concept C3791 (AND C2503 (SOME R69 C2502))) (define-concept C3792 (AND C2504 (SOME R69 C2502))) (define-concept C3793 (AND C2505 (SOME R69 C2502))) (define-concept C3794 (AND C695 (SOME R69 C2505))) (define-concept C3795 (AND C688 (SOME R69 C695))) (define-concept C3796 (AND C690 (SOME R69 C695))) (define-concept C3797 (AND C2506 (SOME R69 C690))) (define-concept C3798 (AND C693 (SOME R69 C2499))) (define-concept C3799 (AND C2507 (SOME R310 C1230) (SOME R69 C2499))) (define-concept C3800 (AND C2508 (SOME R310 C1230) (SOME R69 C2499))) (define-concept C3801 (AND C2507 (SOME R310 C1229) (SOME R69 C2499))) (define-concept C3802 (AND C2508 (SOME R310 C1229) (SOME R69 C2499))) (define-concept C3803 (AND C691 (SOME R69 C2508))) (define-concept C3804 (AND C692 (SOME R69 C2508))) (define-concept C3805 (AND C698 (SOME R77 C692))) (define-concept C3806 (AND C2510 (SOME R69 C698))) (define-concept C3807 (AND C2511 (SOME R69 C698))) (define-concept C3808 (AND C2512 (SOME R69 C698))) (define-concept C3809 (AND C2509 (SOME R69 C2512))) (define-concept C3810 (AND C2514 (SOME R69 C2512))) (define-concept C3811 (AND C2515 (SOME R69 C2512))) (define-concept C3812 (AND C2513 (SOME R69 C2512))) (define-concept C3813 (AND C497 (SOME R71 C2501))) (define-concept C3814 (AND C481 (SOME R71 C2501))) (define-concept C3815 (AND C459 (SOME R71 C2501))) (define-concept C3816 (AND C466 (SOME R71 C2501))) (define-concept C3817 (AND C468 (SOME R71 C2501))) (define-concept C3818 (AND C496 (SOME R71 C2501))) (define-concept C3819 (AND C490 (SOME R71 C2501))) (define-concept C3820 (AND C474 (SOME R71 C2501))) (define-concept C3821 (AND C463 (SOME R71 C693))) (define-concept C3822 (AND C453 (SOME R71 C698) (SOME R71 C692))) (define-concept C3823 (AND C372 (SOME R71 C2512))) (define-concept C3824 (AND C443 (SOME R71 C2510) (SOME R71 C2514))) (define-concept C3825 (AND C2558 (SOME R18 C1753))) (define-concept C3826 (AND C701 (SOME R18 C1753))) (define-concept C3827 (AND C2524 (SOME R17 C1753))) (define-concept C3828 (AND C2560 (SOME R69 C2435))) (define-concept C3829 (AND C2561 (SOME R69 C2435))) (define-concept C3830 (AND C2547 (SOME R77 C704))) (define-concept C3831 (AND C2546 (SOME R79 C704))) (define-concept C3832 (AND C2521 (SOME R16 C2544) (SOME R16 C2546) (SOME R16 C2562) (SOME R16 C2563))) (define-concept C3833 (AND C2521 (SOME R24 C2544) (SOME R24 C2546))) (define-concept C3834 (AND C2522 (SOME R16 C2545) (SOME R16 C2547))) (define-concept C3835 (AND C2522 (SOME R24 C2545) (SOME R24 C2547) (SOME R24 C2564) (SOME R24 C2565))) (define-concept C3836 (AND C2568 (SOME R19 C701) (SOME R69 C2569))) (define-concept C3837 (AND C1624 (SOME R96 C2566) (SOME R93 C2524))) (define-concept C3838 (AND C1624 (SOME R93 C2524) (SOME R366 (AND C873 (SOME R202 C1095))) (SOME R178 C100))) (define-concept C3839 (AND C2528 (SOME R96 C2523))) (define-concept C3840 (AND C2530 (SOME R96 C713))) (define-concept C3841 (AND C2660 (SOME R110 C2554) (SOME R232 C77))) (define-concept C3842 (AND C1699 (SOME R29 C469) (SOME R28 C718))) (define-concept C3843 (AND C729 (SOME R29 (AND C1699 (SOME R29 C469))))) (define-concept C3844 (AND C483 (SOME R23 C470))) (define-concept C3845 (AND C482 (SOME R23 C470))) (define-concept C3846 (AND C501 (SOME R23 C482))) (define-concept C3847 (AND C497 (SOME R23 C483))) (define-concept C3848 (AND C477 (SOME R17 C497))) (define-concept C3849 (AND C484 (SOME R17 C497))) (define-concept C3850 (AND C485 (SOME R17 C497))) (define-concept C3851 (AND C492 (SOME R17 C497))) (define-concept C3852 (AND C500 (SOME R23 C483))) (define-concept C3853 (AND C488 (SOME R23 C483))) (define-concept C3854 (AND C496 (SOME R23 C488))) (define-concept C3855 (AND C481 (SOME R23 C496))) (define-concept C3856 (AND C489 (SOME R23 C496))) (define-concept C3857 (AND C486 (SOME R23 C496))) (define-concept C3858 (AND C490 (SOME R23 C488))) (define-concept C3859 (AND C474 (SOME R21 C490))) (define-concept C3860 (AND C472 (SOME R21 C474))) (define-concept C3861 (AND C499 (SOME R23 C488))) (define-concept C3862 (AND C476 (SOME R23 C490))) (define-concept C3863 (AND C473 (SOME R23 C490))) (define-concept C3864 (AND C498 (SOME R23 C490))) (define-concept C3865 (AND C480 (SOME R23 C490))) (define-concept C3866 (AND C495 (SOME R23 C490))) (define-concept C3867 (AND C494 (SOME R23 C490))) (define-concept C3868 (AND C491 (SOME R23 C490))) (define-concept C3869 (AND C493 (SOME R23 C483))) (define-concept C3870 (AND C471 (SOME R23 C483))) (define-concept C3871 (AND C502 (SOME R23 C483))) (define-concept C3872 (AND C497 (SOME R23 C502))) (define-concept C3873 (AND C500 (SOME R23 C502))) (define-concept C3874 (AND C481 (SOME R23 C502))) (define-concept C3875 (AND C503 (SOME R23 C483))) (define-concept C3876 (AND C489 (SOME R23 C503))) (define-concept C3877 (AND C486 (SOME R23 C503))) (define-concept C3878 (AND C490 (SOME R23 C503))) (define-concept C3879 (AND C493 (SOME R23 C503))) (define-concept C3880 (AND C504 (SOME R23 C483))) (define-concept C3881 (AND C482 (SOME R23 C504))) (define-concept C3882 (AND C502 (SOME R23 C504))) (define-concept C3883 (AND C505 (SOME R23 C483))) (define-concept C3884 (AND C497 (SOME R23 C505))) (define-concept C3885 (AND C500 (SOME R23 C505))) (define-concept C3886 (AND C481 (SOME R23 C505))) (define-concept C3887 (AND C506 (SOME R23 C483))) (define-concept C3888 (AND C505 (SOME R23 C506))) (define-concept C3889 (AND C486 (SOME R23 C506))) (define-concept C3890 (AND C489 (SOME R23 C506))) (define-concept C3891 (AND C507 (SOME R23 C483))) (define-concept C3892 (AND C497 (SOME R23 C507))) (define-concept C3893 (AND C500 (SOME R23 C507))) (define-concept C3894 (AND C488 (SOME R23 C507))) (define-concept C3895 (AND C2679 (SOME R24 C469))) (define-concept C3896 (AND C1431 (SOME R129 C1735))) (define-concept C3897 (AND C1432 (SOME R129 C2676))) (define-concept C3898 (AND C1434 (SOME R129 C2673))) (define-concept C3899 (AND C1433 (SOME R129 C2674))) (define-concept C3900 (AND C839 (SOME R91 C483))) (define-concept C3901 (AND C839 (SOME R398 (AND C890 (SOME R202 C1083))))) (define-concept C3902 (AND C483 (SOME R92 C795))) (define-concept C3903 (AND C839 (SOME R34 (AND C795 (SOME R93 C483))))) (define-concept C3904 (AND C483 (SOME R92 C803))) (define-concept C3905 (AND C803 (SOME R93 C483) (SOME R35 C839))) (define-concept C3906 (AND C469 (SOME R92 C801))) (define-concept C3907 (AND C801 (SOME R93 C469) (SOME R35 C839))) (define-concept C3908 (AND C740 (SOME R97 C794))) (define-concept C3909 (AND C739 (SOME R97 C794))) (define-concept C3910 (AND C794 (SOME R96 C739) (SOME R91 C497))) (define-concept C3911 (AND C497 (SOME R90 (AND C794 (SOME R96 C1379))))) (define-concept C3912 (AND C794 (SOME R96 C739) (SOME R91 C497) (SOME R35 C839))) (define-concept C3913 (AND C794 (SOME R96 C740) (SOME R91 C497) (SOME R35 C839))) (define-concept C3914 (AND C501 (SOME R92 C800))) (define-concept C3915 (AND C1457 (SOME R410 C62))) (define-concept C3916 (AND C218 (SOME R410 C62))) (define-concept C3917 (AND C2682 (SOME R110 (AND C718 (SOME R29 (AND C1699 (SOME R29 C505))))))) (define-concept C3918 (AND C2682 (SOME R110 (AND C1699 (SOME R29 C505))))) (define-concept C3919 (AND C1439 (SOME R108 C497))) (define-concept C3920 (AND C1439 (SOME R110 (AND C718 (SOME R29 (AND C1699 (SOME R29 C497))))))) (define-concept C3921 (AND C1439 (SOME R110 (AND C1699 (SOME R29 C497))))) (define-concept C3922 (AND C1449 (SOME R108 (AND C25 (SOME R268 (AND C920 (SOME R202 C1181))))))) (define-concept C3923 (AND C1448 (SOME R280 C82))) (define-concept C3924 (AND C1448 (SOME R184 C95))) (define-concept C3925 (AND C1424 (SOME R280 C82))) (define-concept C3926 (AND C1424 (SOME R184 C95)))
225,124
Common Lisp
.lisp
4,605
46.15874
99
0.74063
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
55c6e4a297562439e1c487c5e3061a9e3f3f497e64101664b243d2984aa8adbf
12,581
[ -1 ]
12,582
galen-full-transformed.lisp
lambdamikel_DLMAPS/src/prover/KBs/galen-full-transformed.lisp
(define-primitive-role R1 :parents NIL) (define-primitive-role R2 :parents (R1)) (define-primitive-role R3 :parents (R1)) (define-primitive-role R4 :parents (R2) :transitive T) (define-primitive-role R5 :parents (R3)) (define-primitive-role R6 :parents (R4) :transitive T) (define-primitive-role R7 :parents (R5)) (define-primitive-role R8 :parents (R6) :transitive T) (define-primitive-role R9 :parents (R7)) (define-primitive-role R10 :parents (R8) :transitive T) (define-primitive-role R11 :parents (R9)) (define-primitive-role R12 :parents (R10) :transitive T) (define-primitive-role R13 :parents (R11)) (define-primitive-role R14 :parents (R12)) (define-primitive-attribute R15 :parents (R13)) (define-primitive-role R16 :parents (R10) :transitive T) (define-primitive-role R17 :parents (R11)) (define-primitive-role R18 :parents (R16)) (define-primitive-attribute R19 :parents (R17)) (define-primitive-role R20 :parents (R16)) (define-primitive-attribute R21 :parents (R17)) (define-primitive-role R22 :parents (R10) :transitive T) (define-primitive-role R23 :parents (R11)) (define-primitive-role R24 :parents (R8) :transitive T) (define-primitive-role R25 :parents (R9)) (define-primitive-role R26 :parents (R24)) (define-primitive-attribute R27 :parents (R25)) (define-primitive-role R28 :parents (R8) :transitive T) (define-primitive-role R29 :parents (R9) :transitive T) (define-primitive-role R30 :parents (R8) :transitive T) (define-primitive-role R31 :parents (R9)) (define-primitive-role R32 :parents (R6)) (define-primitive-role R33 :parents (R7)) (define-primitive-role R34 :parents (R32) :transitive T) (define-primitive-role R35 :parents (R33)) (define-primitive-role R36 :parents (R4)) (define-primitive-role R37 :parents (R5)) (define-primitive-role R38 :parents (R36) :transitive T) (define-primitive-role R39 :parents (R37)) (define-primitive-role R40 :parents (R38) :transitive T) (define-primitive-role R41 :parents (R39)) (define-primitive-role R42 :parents (R40) :transitive T) (define-primitive-role R43 :parents (R41)) (define-primitive-role R44 :parents (R42)) (define-primitive-role R45 :parents (R43)) (define-primitive-role R46 :parents (R42)) (define-primitive-role R47 :parents (R43)) (define-primitive-role R48 :parents (R40)) (define-primitive-role R49 :parents (R41)) (define-primitive-attribute R50 :parents (R48)) (define-primitive-role R51 :parents (R49)) (define-primitive-role R52 :parents (R40) :transitive T) (define-primitive-role R53 :parents (R41)) (define-primitive-attribute R54 :parents (R50 R52)) (define-primitive-role R55 :parents (R51 R53)) (define-primitive-role R56 :parents (R38)) (define-primitive-role R57 :parents (R39)) (define-primitive-role R58 :parents (R56)) (define-primitive-role R59 :parents (R57)) (define-primitive-role R60 :parents (R58)) (define-primitive-attribute R61 :parents (R59)) (define-primitive-role R62 :parents (R58)) (define-primitive-attribute R63 :parents (R59)) (define-primitive-role R64 :parents (R56)) (define-primitive-role R65 :parents (R57)) (define-primitive-role R66 :parents (R56) :transitive T) (define-primitive-role R67 :parents (R57)) (define-primitive-role R68 :parents (R56)) (define-primitive-attribute R69 :parents (R57)) (define-primitive-role R70 :parents (R36)) (define-primitive-role R71 :parents (R37)) (define-primitive-attribute R72 :parents (R70)) (define-primitive-role R73 :parents (R71)) (define-primitive-role R74 :parents (R36)) (define-primitive-role R75 :parents (R37)) (define-primitive-role R76 :parents (R74)) (define-primitive-attribute R77 :parents (R75)) (define-primitive-role R78 :parents (R74)) (define-primitive-attribute R79 :parents (R75)) (define-primitive-role R80 :parents (R74)) (define-primitive-attribute R81 :parents (R75)) (define-primitive-role R82 :parents (R74)) (define-primitive-attribute R83 :parents (R75)) (define-primitive-attribute R84 :parents (R36)) (define-primitive-role R85 :parents (R37)) (define-primitive-role R86 :parents (R4) :transitive T) (define-primitive-role R87 :parents (R5)) (define-primitive-role R88 :parents (R86) :transitive T) (define-primitive-role R89 :parents (R87)) (define-primitive-role R90 :parents (R88)) (define-primitive-role R91 :parents (R89)) (define-primitive-role R92 :parents (R90)) (define-primitive-attribute R93 :parents (R91)) (define-primitive-role R94 :parents (R95 R88)) (define-primitive-role R96 :parents (R97 R89)) (define-primitive-attribute R98 :parents (R94)) (define-primitive-role R99 :parents (R96)) (define-primitive-role R100 :parents (R94)) (define-primitive-role R101 :parents (R96)) (define-primitive-role R102 :parents (R100)) (define-primitive-role R103 :parents (R101)) (define-primitive-role R104 :parents (R100)) (define-primitive-role R105 :parents (R101)) (define-primitive-role R106 :parents (R86) :transitive T) (define-primitive-role R107 :parents (R87)) (define-primitive-role R108 :parents (R106) :transitive T) (define-primitive-role R109 :parents (R107)) (define-primitive-attribute R110 :parents (R108)) (define-primitive-role R111 :parents (R109)) (define-primitive-role R112 :parents (R108)) (define-primitive-role R113 :parents (R109)) (define-primitive-attribute R114 :parents (R112)) (define-primitive-role R115 :parents (R113)) (define-primitive-role R95 :parents (R4)) (define-primitive-role R97 :parents (R5)) (define-primitive-attribute R116 :parents (R91)) (define-primitive-attribute R117 :parents (R90)) (define-primitive-role R118 :parents (R95) :transitive T) (define-primitive-role R119 :parents (R97)) (define-primitive-role R120 :parents (R95)) (define-primitive-role R121 :parents (R97)) (define-primitive-role R122 :parents (R120)) (define-primitive-role R123 :parents (R121)) (define-primitive-attribute R124 :parents (R122)) (define-primitive-role R125 :parents (R123)) (define-primitive-attribute R126 :parents (R120)) (define-primitive-role R127 :parents (R121)) (define-primitive-attribute R128 :parents (R95)) (define-primitive-attribute R129 :parents (R97)) (define-primitive-role R130 :parents (R95)) (define-primitive-role R131 :parents (R97)) (define-primitive-role R132 :parents (R4) :transitive T) (define-primitive-role R133 :parents (R5)) (define-primitive-role R134 :parents (R132) :transitive T) (define-primitive-role R135 :parents (R133)) (define-primitive-attribute R136 :parents (R134)) (define-primitive-attribute R137 :parents (R135)) (define-primitive-role R138 :parents (R132) :transitive T) (define-primitive-role R139 :parents (R133)) (define-primitive-attribute R140 :parents (R138)) (define-primitive-attribute R141 :parents (R139)) (define-primitive-role R142 :parents (R132) :transitive T) (define-primitive-role R143 :parents (R133)) (define-primitive-attribute R144 :parents (R142)) (define-primitive-attribute R145 :parents (R143)) (define-primitive-role R146 :parents (R132)) (define-primitive-role R147 :parents (R133)) (define-primitive-attribute R148 :parents (R146)) (define-primitive-role R149 :parents (R147)) (define-primitive-role R150 :parents (R132)) (define-primitive-role R151 :parents (R133)) (define-primitive-attribute R152 :parents (R150)) (define-primitive-role R153 :parents (R151)) (define-primitive-role R154 :parents (R132)) (define-primitive-role R155 :parents (R133)) (define-primitive-attribute R156 :parents (R154)) (define-primitive-role R157 :parents (R155)) (define-primitive-role R158 :parents (R4)) (define-primitive-role R159 :parents (R5)) (define-primitive-attribute R160 :parents (R158)) (define-primitive-role R161 :parents (R159)) (define-primitive-attribute R162 :parents (R158)) (define-primitive-role R163 :parents (R159)) (define-primitive-attribute R164 :parents (R4)) (define-primitive-role R165 :parents (R5)) (define-primitive-attribute R166 :parents (R164)) (define-primitive-role R167 :parents (R165)) (define-primitive-attribute R168 :parents (R164)) (define-primitive-role R169 :parents (R165)) (define-primitive-attribute R170 :parents (R164)) (define-primitive-role R171 :parents (R165)) (define-primitive-attribute R172 :parents (R4)) (define-primitive-role R173 :parents (R5)) (define-primitive-attribute R174 :parents (R4)) (define-primitive-role R175 :parents (R5)) (define-primitive-attribute R176 :parents (R2)) (define-primitive-role R177 :parents (R3)) (define-primitive-attribute R178 :parents (R176)) (define-primitive-role R179 :parents (R177)) (define-primitive-attribute R180 :parents (R176)) (define-primitive-role R181 :parents (R177)) (define-primitive-attribute R182 :parents (R176)) (define-primitive-role R183 :parents (R177)) (define-primitive-attribute R184 :parents (R176)) (define-primitive-role R185 :parents (R177)) (define-primitive-attribute R186 :parents (R176)) (define-primitive-role R187 :parents (R177)) (define-primitive-role R188 :parents (R2)) (define-primitive-role R189 :parents (R3)) (define-primitive-role R190 :parents (R188)) (define-primitive-role R191 :parents (R189)) (define-primitive-attribute R192 :parents (R2)) (define-primitive-role R193 :parents (R3)) (define-primitive-attribute R194 :parents (R192)) (define-primitive-role R195 :parents (R193)) (define-primitive-role R196 :parents (R2)) (define-primitive-role R197 :parents (R3)) (define-primitive-role R198 :parents (R196)) (define-primitive-role R199 :parents (R197)) (define-primitive-role R200 :parents (R198)) (define-primitive-role R201 :parents (R199)) (define-primitive-attribute R202 :parents (R198)) (define-primitive-role R203 :parents (R199)) (define-primitive-attribute R204 :parents (R202)) (define-primitive-role R205 :parents (R203)) (define-primitive-attribute R206 :parents (R202)) (define-primitive-role R207 :parents (R203)) (define-primitive-attribute R208 :parents (R202)) (define-primitive-role R209 :parents (R203)) (define-primitive-attribute R210 :parents (R202)) (define-primitive-role R211 :parents (R203)) (define-primitive-attribute R212 :parents (R202)) (define-primitive-role R213 :parents (R203)) (define-primitive-role R214 :parents (R196)) (define-primitive-role R215 :parents (R197)) (define-primitive-attribute R216 :parents (R214)) (define-primitive-role R217 :parents (R215)) (define-primitive-attribute R218 :parents (R214)) (define-primitive-role R219 :parents (R215)) (define-primitive-role R220 :parents (R196)) (define-primitive-role R221 :parents (R197)) (define-primitive-role R222 :parents (R220)) (define-primitive-role R223 :parents (R221)) (define-primitive-role R224 :parents (R220)) (define-primitive-role R225 :parents (R221)) (define-primitive-role R226 :parents (R200)) (define-primitive-role R227 :parents (R201)) (define-primitive-attribute R228 :parents (R226)) (define-primitive-role R229 :parents (R227)) (define-primitive-attribute R230 :parents (R228)) (define-primitive-role R231 :parents (R229)) (define-primitive-attribute R232 :parents (R228)) (define-primitive-role R233 :parents (R229)) (define-primitive-attribute R234 :parents (R228)) (define-primitive-role R235 :parents (R229)) (define-primitive-attribute R236 :parents (R234)) (define-primitive-role R237 :parents (R235)) (define-primitive-attribute R238 :parents (R236)) (define-primitive-role R239 :parents (R237)) (define-primitive-attribute R240 :parents (R236)) (define-primitive-role R241 :parents (R237)) (define-primitive-attribute R242 :parents (R236)) (define-primitive-role R243 :parents (R237)) (define-primitive-attribute R244 :parents (R236)) (define-primitive-role R245 :parents (R237)) (define-primitive-attribute R246 :parents (R236)) (define-primitive-role R247 :parents (R237)) (define-primitive-attribute R248 :parents (R236)) (define-primitive-role R249 :parents (R237)) (define-primitive-attribute R250 :parents (R234)) (define-primitive-role R251 :parents (R235)) (define-primitive-attribute R252 :parents (R250)) (define-primitive-role R253 :parents (R251)) (define-primitive-attribute R254 :parents (R250)) (define-primitive-role R255 :parents (R251)) (define-primitive-attribute R256 :parents (R250)) (define-primitive-role R257 :parents (R251)) (define-primitive-attribute R258 :parents (R250)) (define-primitive-role R259 :parents (R251)) (define-primitive-attribute R260 :parents (R250)) (define-primitive-role R261 :parents (R251)) (define-primitive-attribute R262 :parents (R250)) (define-primitive-role R263 :parents (R251)) (define-primitive-attribute R264 :parents (R226)) (define-primitive-role R265 :parents (R227)) (define-primitive-attribute R266 :parents (R264)) (define-primitive-role R267 :parents (R265)) (define-primitive-attribute R268 :parents (R264)) (define-primitive-role R269 :parents (R265)) (define-primitive-attribute R270 :parents (R264)) (define-primitive-role R271 :parents (R265)) (define-primitive-attribute R272 :parents (R264)) (define-primitive-role R273 :parents (R265)) (define-primitive-attribute R274 :parents (R264)) (define-primitive-role R275 :parents (R265)) (define-primitive-attribute R276 :parents (R264)) (define-primitive-role R277 :parents (R265)) (define-primitive-attribute R278 :parents (R264)) (define-primitive-role R279 :parents (R265)) (define-primitive-attribute R280 :parents (R264)) (define-primitive-role R281 :parents (R265)) (define-primitive-attribute R282 :parents (R264)) (define-primitive-role R283 :parents (R265)) (define-primitive-attribute R284 :parents (R282)) (define-primitive-role R285 :parents (R283)) (define-primitive-attribute R286 :parents (R226)) (define-primitive-role R287 :parents (R227)) (define-primitive-attribute R288 :parents (R286)) (define-primitive-role R289 :parents (R287)) (define-primitive-attribute R290 :parents (R286)) (define-primitive-role R291 :parents (R287)) (define-primitive-attribute R292 :parents (R286)) (define-primitive-role R293 :parents (R287)) (define-primitive-attribute R294 :parents (R286)) (define-primitive-role R295 :parents (R287)) (define-primitive-attribute R296 :parents (R286)) (define-primitive-role R297 :parents (R287)) (define-primitive-attribute R298 :parents (R286)) (define-primitive-role R299 :parents (R287)) (define-primitive-attribute R300 :parents (R286)) (define-primitive-role R301 :parents (R287)) (define-primitive-attribute R302 :parents (R286)) (define-primitive-role R303 :parents (R287)) (define-primitive-attribute R304 :parents (R286)) (define-primitive-role R305 :parents (R287)) (define-primitive-attribute R306 :parents (R226)) (define-primitive-role R307 :parents (R227)) (define-primitive-attribute R308 :parents (R306)) (define-primitive-role R309 :parents (R307)) (define-primitive-attribute R310 :parents (R308)) (define-primitive-role R311 :parents (R309)) (define-primitive-attribute R312 :parents (R308)) (define-primitive-role R313 :parents (R309)) (define-primitive-attribute R314 :parents (R308)) (define-primitive-role R315 :parents (R309)) (define-primitive-attribute R316 :parents (R308)) (define-primitive-role R317 :parents (R309)) (define-primitive-attribute R318 :parents (R308)) (define-primitive-role R319 :parents (R309)) (define-primitive-attribute R320 :parents (R308)) (define-primitive-role R321 :parents (R309)) (define-primitive-attribute R322 :parents (R308)) (define-primitive-role R323 :parents (R309)) (define-primitive-attribute R324 :parents (R306)) (define-primitive-role R325 :parents (R307)) (define-primitive-attribute R326 :parents (R200)) (define-primitive-role R327 :parents (R201)) (define-primitive-attribute R328 :parents (R326)) (define-primitive-role R329 :parents (R327)) (define-primitive-attribute R330 :parents (R326)) (define-primitive-role R331 :parents (R327)) (define-primitive-attribute R332 :parents (R326)) (define-primitive-role R333 :parents (R327)) (define-primitive-attribute R334 :parents (R326)) (define-primitive-role R335 :parents (R327)) (define-primitive-attribute R336 :parents (R326)) (define-primitive-role R337 :parents (R327)) (define-primitive-attribute R338 :parents (R326)) (define-primitive-role R339 :parents (R327)) (define-primitive-attribute R340 :parents (R326)) (define-primitive-role R341 :parents (R327)) (define-primitive-attribute R342 :parents (R326)) (define-primitive-role R343 :parents (R327)) (define-primitive-attribute R344 :parents (R326)) (define-primitive-role R345 :parents (R327)) (define-primitive-role R346 :parents (R200)) (define-primitive-role R347 :parents (R201)) (define-primitive-attribute R348 :parents (R346)) (define-primitive-role R349 :parents (R347)) (define-primitive-attribute R350 :parents (R346)) (define-primitive-role R351 :parents (R347)) (define-primitive-attribute R352 :parents (R346)) (define-primitive-role R353 :parents (R347)) (define-primitive-attribute R354 :parents (R346)) (define-primitive-role R355 :parents (R347)) (define-primitive-attribute R356 :parents (R200)) (define-primitive-role R357 :parents (R201)) (define-primitive-attribute R358 :parents (R356)) (define-primitive-role R359 :parents (R357)) (define-primitive-attribute R360 :parents (R358)) (define-primitive-role R361 :parents (R359)) (define-primitive-attribute R362 :parents (R356)) (define-primitive-role R363 :parents (R357)) (define-primitive-attribute R364 :parents (R356)) (define-primitive-role R365 :parents (R357)) (define-primitive-attribute R366 :parents (R356)) (define-primitive-role R367 :parents (R357)) (define-primitive-attribute R368 :parents (R356)) (define-primitive-role R369 :parents (R357)) (define-primitive-attribute R370 :parents (R356)) (define-primitive-role R371 :parents (R357)) (define-primitive-attribute R372 :parents (R356)) (define-primitive-role R373 :parents (R357)) (define-primitive-attribute R374 :parents (R356)) (define-primitive-role R375 :parents (R357)) (define-primitive-attribute R376 :parents (R356)) (define-primitive-role R377 :parents (R357)) (define-primitive-attribute R378 :parents (R356)) (define-primitive-role R379 :parents (R357)) (define-primitive-attribute R380 :parents (R356)) (define-primitive-role R381 :parents (R357)) (define-primitive-attribute R382 :parents (R356)) (define-primitive-role R383 :parents (R357)) (define-primitive-attribute R384 :parents (R200)) (define-primitive-role R385 :parents (R201)) (define-primitive-attribute R386 :parents (R384)) (define-primitive-role R387 :parents (R385)) (define-primitive-attribute R388 :parents (R384)) (define-primitive-role R389 :parents (R385)) (define-primitive-attribute R390 :parents (R384)) (define-primitive-role R391 :parents (R385)) (define-primitive-attribute R392 :parents (R384)) (define-primitive-role R393 :parents (R385)) (define-primitive-attribute R394 :parents (R384)) (define-primitive-role R395 :parents (R385)) (define-primitive-attribute R396 :parents (R384)) (define-primitive-role R397 :parents (R385)) (define-primitive-attribute R398 :parents (R384)) (define-primitive-role R399 :parents (R385)) (define-primitive-attribute R400 :parents (R200)) (define-primitive-role R401 :parents (R201)) (define-primitive-attribute R402 :parents (R196)) (define-primitive-role R403 :parents (R197)) (define-primitive-attribute R404 :parents (R402)) (define-primitive-role R405 :parents (R403)) (define-primitive-attribute R406 :parents (R402)) (define-primitive-role R407 :parents (R403)) (define-primitive-attribute R408 :parents (R2)) (define-primitive-role R409 :parents (R3)) (define-primitive-attribute R410 :parents (R408)) (define-primitive-role R411 :parents (R409)) (define-primitive-attribute R412 :parents (R408)) (define-primitive-role R413 :parents (R409)) (IMPLIES C1694 *TOP*) (IMPLIES C1692 *TOP*) (IMPLIES C1690 *TOP*) (IMPLIES C1688 *TOP*) (IMPLIES C1686 *TOP*) (IMPLIES C1684 *TOP*) (IMPLIES C1682 *TOP*) (IMPLIES C1680 *TOP*) (IMPLIES C1678 *TOP*) (IMPLIES C3 *TOP*) (IMPLIES C2 *TOP*) (IMPLIES C309 C2) (IMPLIES C310 C309) (IMPLIES C311 C309) (IMPLIES C312 C309) (IMPLIES C313 C309) (IMPLIES C314 C309) (IMPLIES C315 C309) (IMPLIES C316 C309) (IMPLIES C317 C309) (IMPLIES C318 C309) (IMPLIES C319 C309) (IMPLIES C320 C309) (IMPLIES C321 C309) (IMPLIES C322 C309) (IMPLIES C323 C309) (IMPLIES C324 C309) (IMPLIES C1 *TOP*) (IMPLIES C4 C1) (IMPLIES C66 (AND (OR (SOME R406 C51) (ALL R404 (NOT C51))) (SOME R90 C797) C4)) (IMPLIES C5 C4) (IMPLIES C54 (AND (OR (SOME R406 C51) (ALL R404 (NOT C51))) C5)) (IMPLIES C55 C54) (IMPLIES C56 C54) (IMPLIES C57 C56) (IMPLIES C58 C5) (IMPLIES C59 C58) (IMPLIES C60 C59) (IMPLIES C61 C60) (IMPLIES C62 C61) (IMPLIES C63 C58) (IMPLIES C64 C63) (IMPLIES C65 C64) (IMPLIES C6 C5) (IMPLIES C273 C6) (IMPLIES C274 C273) (IMPLIES C280 C273) (IMPLIES C281 C280) (IMPLIES C282 C280) (IMPLIES C284 C280) (IMPLIES C285 C280) (IMPLIES C286 C280) (IMPLIES C287 C280) (IMPLIES C289 C280) (IMPLIES C290 C280) (IMPLIES C291 C280) (IMPLIES C275 C273) (IMPLIES C276 C275) (IMPLIES C277 C275) (IMPLIES C278 C275) (IMPLIES C279 C275) (IMPLIES C288 C280) (IMPLIES C283 C280) (IMPLIES C292 C280) (IMPLIES C7 (AND (OR (SOME R406 C51) (ALL R404 (NOT C51))) (OR (ALL R129 (NOT C37)) (ALL R180 (NOT C100)) (SOME R178 C100)) (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C94)) (SOME R182 C94)) C4)) (IMPLIES C293 C273) (IMPLIES C8 C7) (IMPLIES C294 C273) (IMPLIES C9 C8) (IMPLIES C295 C273) (IMPLIES C296 C273) (IMPLIES C11 C9) (IMPLIES C297 C273) (IMPLIES C12 C11) (IMPLIES C298 C273) (IMPLIES C13 C11) (IMPLIES C299 C273) (IMPLIES C14 C9) (IMPLIES C15 C9) (IMPLIES C16 C8) (IMPLIES C105 C15) (IMPLIES C17 C7) (IMPLIES C106 C15) (IMPLIES C18 (AND (SOME R282 (AND (SOME R202 C1136) C916)) C17)) (IMPLIES C107 C15) (IMPLIES C304 C66) (IMPLIES C19 (AND (SOME R282 (AND (SOME R202 C1145) C916)) C17)) (IMPLIES C140 C19) (IMPLIES C141 C140) (IMPLIES C142 C140) (IMPLIES C143 C140) (IMPLIES C144 C140) (IMPLIES C108 C15) (IMPLIES C305 C304) (IMPLIES C20 (AND (OR (SOME R280 C82) (ALL R268 (OR (ALL R202 (NOT C1177)) (NOT C920)))) C17)) (IMPLIES C147 C20) (IMPLIES C148 C147) (IMPLIES C149 C147) (IMPLIES C150 C147) (IMPLIES C67 (AND (SOME R280 C82) C20)) (IMPLIES C197 C67) (IMPLIES C164 (AND (SOME R280 C82) C20)) (IMPLIES C1512 C164) (IMPLIES C1471 C164) (IMPLIES C1473 C1471) (IMPLIES C1531 C1512) (IMPLIES C1533 C1531) (IMPLIES C1544 C164) (IMPLIES C1474 C1471) (IMPLIES C1534 C1512) (IMPLIES C1535 C1534) (IMPLIES C1536 C1534) (IMPLIES C1509 C164) (IMPLIES C1510 C1509) (IMPLIES C1514 C1509) (IMPLIES C1515 C1509) (IMPLIES C1518 C1509) (IMPLIES C1513 (AND C1512 C1509)) (IMPLIES C1516 (AND C1512 C1509)) (IMPLIES C1472 C1471) (IMPLIES C1517 C1509) (IMPLIES C1537 C164) (IMPLIES C1538 C1537) (IMPLIES C1539 C1537) (IMPLIES C1542 C1537) (IMPLIES C1541 C1539) (IMPLIES C1543 C1542) (IMPLIES C1511 C1509) (IMPLIES C1532 C1531) (IMPLIES C1545 C164) (IMPLIES C1546 C1545) (IMPLIES C1547 C1545) (IMPLIES C1548 C1545) (IMPLIES C1540 C1539) (IMPLIES C1549 C1545) (IMPLIES C165 C164) (IMPLIES C1550 C1545) (IMPLIES C166 C164) (IMPLIES C1551 C1545) (IMPLIES C167 (AND (SOME R280 C82) C20)) (IMPLIES C1552 C1545) (IMPLIES C168 C167) (IMPLIES C1553 C1545) (IMPLIES C169 C167) (IMPLIES C1554 C1545) (IMPLIES C170 C168) (IMPLIES C1555 C1545) (IMPLIES C171 C168) (IMPLIES C172 C169) (IMPLIES C173 (AND (SOME R268 (AND (SOME R202 C1177) C920)) C67)) (IMPLIES C193 C173) (IMPLIES C195 C193) (IMPLIES C196 C193) (IMPLIES C174 C173) (IMPLIES C175 C174) (IMPLIES C176 C174) (IMPLIES C177 C174) (IMPLIES C178 C174) (IMPLIES C179 C174) (IMPLIES C180 C174) (IMPLIES C181 (AND (SOME R372 (AND (SOME R173 (AND (SOME R405 C1357) C53)) C874)) C173)) (IMPLIES C182 C181) (IMPLIES C186 C181) (IMPLIES C187 C181) (IMPLIES C188 C181) (IMPLIES C189 C181) (IMPLIES C190 C181) (IMPLIES C191 C181) (IMPLIES C192 C181) (IMPLIES C183 C182) (IMPLIES C184 C182) (IMPLIES C185 C182) (IMPLIES C109 C15) (IMPLIES C198 C67) (IMPLIES C306 C304) (IMPLIES C1475 C1471) (IMPLIES C110 C15) (IMPLIES C199 C67) (IMPLIES C307 C66) (IMPLIES C1476 C164) (IMPLIES C111 C110) (IMPLIES C200 C20) (IMPLIES C308 (AND C307 C66)) (IMPLIES C1477 C1476) (IMPLIES C112 C110) (IMPLIES C201 (AND (SOME R280 C82) C20)) (IMPLIES C1478 C1476) (IMPLIES C113 C110) (IMPLIES C202 (AND (SOME R180 C100) (SOME R178 C100) C201)) (IMPLIES C1479 C1476) (IMPLIES C114 C110) (IMPLIES C1480 C1476) (IMPLIES C26 (AND (SOME R268 (AND (SOME R202 C1177) C920)) C20)) (IMPLIES C145 C26) (IMPLIES C146 C145) (IMPLIES C115 C14) (IMPLIES C1481 C1476) (IMPLIES C116 C14) (IMPLIES C1482 C164) (IMPLIES C28 (AND (OR (SOME R406 C51) (ALL R404 (NOT C51))) (OR (ALL R129 (NOT C37)) (ALL R180 (NOT C100)) (SOME R178 C100)) (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C94)) (SOME R182 C94)) C4)) (IMPLIES C205 C28) (IMPLIES C117 C16) (IMPLIES C206 C205) (IMPLIES C1483 C1482) (IMPLIES C29 (AND (SOME R280 C85) C28)) (IMPLIES C118 C16) (IMPLIES C207 C205) (IMPLIES C1484 C1482) (IMPLIES C30 (AND (OR (ALL R129 (OR (ALL R184 (NOT C94)) (NOT C37))) (SOME R184 C94)) (OR (ALL R129 (OR (ALL R180 (NOT C100)) (NOT C37))) (SOME R180 C100)) (OR (ALL R180 (NOT C100)) (SOME R178 C100)) (OR (ALL R184 (NOT C94)) (SOME R182 C94)) C29)) (IMPLIES C203 C30) (IMPLIES C712 C203) (IMPLIES C713 C712) (IMPLIES C715 C712) (IMPLIES C717 C712) (IMPLIES C718 C712) (IMPLIES C722 C203) (IMPLIES C723 C722) (IMPLIES C726 C722) (IMPLIES C733 C203) (IMPLIES C735 C733) (IMPLIES C736 C733) (IMPLIES C738 C733) (IMPLIES C721 C203) (IMPLIES C734 C733) (IMPLIES C716 C712) (IMPLIES C724 C722) (IMPLIES C725 (AND C724 C723)) (IMPLIES C737 C733) (IMPLIES C719 (AND (SOME R29 C155) C712)) (IMPLIES C732 C722) (IMPLIES C714 C712) (IMPLIES C727 C722) (IMPLIES C728 C727) (IMPLIES C729 (AND (SOME R29 (AND (SOME R29 C469) C1705)) C728)) (IMPLIES C730 C727) (IMPLIES C731 C727) (IMPLIES C204 C30) (IMPLIES C743 (AND (SOME R99 (AND (SOME R91 C539) C794)) (SOME R348 (AND (SOME R202 C1254) C935)) C204)) (IMPLIES C744 (AND (SOME R99 (AND (SOME R91 C545) C794)) (SOME R348 (AND (SOME R202 C1254) C935)) C204)) (IMPLIES C748 (AND (SOME R99 (AND (SOME R91 C416) C794)) (SOME R348 (AND (SOME R202 C1254) C935)) C204)) (IMPLIES C739 (AND (SOME R99 C794) (SOME R348 (AND (SOME R202 C1254) C935)) C204)) (IMPLIES C740 (AND (SOME R99 C794) C204)) (IMPLIES C741 C204) (IMPLIES C742 (AND (SOME R348 (AND (SOME R202 C1254) C935)) C204)) (IMPLIES C745 (AND (SOME R348 (AND (SOME R202 C1254) C935)) C204)) (IMPLIES C746 (AND (SOME R348 (AND (SOME R202 C1254) C935)) C204)) (IMPLIES C747 C204) (IMPLIES C749 (AND (OR (ALL R46 (NOT C173)) (SOME R180 C100)) (SOME R99 C796) (SOME R348 (AND (SOME R202 C1254) C935)) C204)) (IMPLIES C750 (AND (SOME R348 (AND (SOME R202 C1254) C935)) C204)) (IMPLIES C119 C16) (IMPLIES C208 C205) (IMPLIES C1485 C1482) (IMPLIES C31 C29) (IMPLIES C1289 C31) (IMPLIES C1331 (AND (SOME R348 (AND (SOME R202 C1254) C935)) C1289)) (IMPLIES C1355 (AND (SOME R166 C1264) C1289)) (IMPLIES C1332 C1289) (IMPLIES C1356 C1289) (IMPLIES C1378 C1356) (IMPLIES C1357 (AND C1356 C1355)) (IMPLIES C1379 C1289) (IMPLIES C1334 C1289) (DEFINE-CONCEPT C1333 C1334) (IMPLIES C1358 (AND (SOME R166 C1268) C1289)) (IMPLIES C1367 C1358) (IMPLIES C1368 C1358) (IMPLIES C1370 C1358) (DEFINE-CONCEPT C1369 C1370) (IMPLIES C1380 C1289) (IMPLIES C1381 C1380) (IMPLIES C1360 C1358) (DEFINE-CONCEPT C1359 C1360) (IMPLIES C1290 C1289) (IMPLIES C1382 C1289) (IMPLIES C1371 C1289) (IMPLIES C1336 C1289) (DEFINE-CONCEPT C1335 C1336) (IMPLIES C1383 C1382) (IMPLIES C1372 C1356) (IMPLIES C1361 C1358) (IMPLIES C1384 C1289) (IMPLIES C1348 C1289) (IMPLIES C1337 C1289) (IMPLIES C1373 C1356) (IMPLIES C1385 C1384) (IMPLIES C1362 C1358) (IMPLIES C1349 C1348) (IMPLIES C1338 C1337) (IMPLIES C1386 (AND (SOME R166 C1267) C1289)) (IMPLIES C1392 C1386) (IMPLIES C1350 C1348) (IMPLIES C1374 C1356) (IMPLIES C1364 C1358) (DEFINE-CONCEPT C1363 C1364) (IMPLIES C1387 C1386) (IMPLIES C2252 C1387) (IMPLIES C2253 C1387) (IMPLIES C1339 C1289) (IMPLIES C1343 C1339) (IMPLIES C1344 C1339) (IMPLIES C1345 C1339) (IMPLIES C1346 C1339) (IMPLIES C1347 C1346) (IMPLIES C1351 C1348) (IMPLIES C1375 C1356) (IMPLIES C1388 C1387) (IMPLIES C2254 C1386) (IMPLIES C2257 C2254) (IMPLIES C2258 C2254) (IMPLIES C2259 C2254) (IMPLIES C2260 C2254) (IMPLIES C2261 C2254) (IMPLIES C2262 C2254) (IMPLIES C2263 C2254) (IMPLIES C2264 C2254) (IMPLIES C2265 C2254) (IMPLIES C1340 C1339) (IMPLIES C1352 C1351) (IMPLIES C1376 C1356) (IMPLIES C1366 C1358) (DEFINE-CONCEPT C1365 C1366) (IMPLIES C1353 C1289) (IMPLIES C1389 C1387) (IMPLIES C2266 C2254) (IMPLIES C2255 C2254) (IMPLIES C1341 C1289) (IMPLIES C1342 (AND C1341 C1339)) (IMPLIES C1377 C1356) (IMPLIES C1354 C1353) (IMPLIES C1330 C1289) (IMPLIES C1390 C1386) (IMPLIES C1391 C1390) (IMPLIES C2267 C2254) (IMPLIES C2256 C2254) (IMPLIES C1286 C31) (IMPLIES C1287 C1286) (IMPLIES C1288 C1286) (IMPLIES C1292 C1286) (IMPLIES C1293 C1286) (IMPLIES C1294 C1286) (IMPLIES C1295 C1286) (IMPLIES C1296 C1286) (IMPLIES C1297 C1286) (IMPLIES C1298 C1286) (IMPLIES C1319 C1286) (IMPLIES C1320 C1286) (IMPLIES C1321 C1286) (IMPLIES C1322 C1286) (IMPLIES C1323 C1286) (IMPLIES C1324 C1286) (IMPLIES C1325 C1286) (IMPLIES C1291 (AND C1290 C1286)) (IMPLIES C1314 (AND C1290 C1286)) (IMPLIES C1326 (AND C1290 C1286)) (IMPLIES C1327 (AND C1290 C1286)) (IMPLIES C1328 (AND C1290 C1286)) (IMPLIES C1329 (AND C1290 C1286)) (IMPLIES C120 C16) (IMPLIES C1299 (AND C1290 C1286)) (IMPLIES C1393 C1386) (IMPLIES C32 (AND (OR (ALL R129 (NOT C37)) (ALL R180 (NOT C100)) (SOME R178 C100)) (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C94)) (SOME R182 C94)) (OR (ALL R390 (NOT C891)) (SOME R398 (AND (SOME R202 C1083) C890))) C4)) (IMPLIES C751 C32) (IMPLIES C121 C16) (IMPLIES C1300 (AND C1290 C1286)) (IMPLIES C1394 C1393) (IMPLIES C1970 C1394) (IMPLIES C1973 C1394) (IMPLIES C1968 C1394) (IMPLIES C1971 C1394) (IMPLIES C1966 C1394) (IMPLIES C2009 C1966) (IMPLIES C2010 C1966) (IMPLIES C2012 C1966) (IMPLIES C1969 C1394) (IMPLIES C1972 C1394) (IMPLIES C2011 C1966) (IMPLIES C1967 C1394) (IMPLIES C1486 C1485) (IMPLIES C33 C32) (IMPLIES C122 C16) (IMPLIES C1301 (AND C1290 C1286)) (IMPLIES C1395 C1393) (IMPLIES C2013 C1395) (IMPLIES C2014 C1395) (IMPLIES C2015 C1395) (IMPLIES C2016 C1395) (IMPLIES C2017 C1395) (IMPLIES C2018 C1395) (IMPLIES C1488 C164) (IMPLIES C34 C32) (IMPLIES C123 C16) (IMPLIES C1302 C1286) (IMPLIES C1396 C1289) (IMPLIES C1489 C164) (IMPLIES C35 (AND (OR (ALL R180 (NOT C100)) (SOME R178 C100)) (OR (ALL R184 (NOT C94)) (SOME R182 C94)) C32)) (IMPLIES C211 C35) (IMPLIES C209 C35) (IMPLIES C752 C209) (IMPLIES C755 C209) (IMPLIES C756 C209) (IMPLIES C757 C756) (IMPLIES C758 C756) (IMPLIES C768 C767) (IMPLIES C769 C768) (IMPLIES C778 C767) (IMPLIES C779 C767) (IMPLIES C759 C756) (IMPLIES C1633 C759) (IMPLIES C1568 C759) (IMPLIES C1606 C759) (IMPLIES C1655 C759) (IMPLIES C1639 C759) (IMPLIES C1612 C1568) (IMPLIES C1558 C759) (IMPLIES C1563 C1558) (IMPLIES C1634 C1633) (IMPLIES C1569 (AND C1568 C1558)) (IMPLIES C1607 C1606) (IMPLIES C1645 C759) (IMPLIES C1580 C759) (IMPLIES C1584 C1580) (IMPLIES C1585 C1580) (IMPLIES C1656 C1655) (IMPLIES C1564 C1558) (IMPLIES C1640 C1639) (IMPLIES C1613 C1568) (IMPLIES C1586 C1580) (IMPLIES C1559 C1558) (IMPLIES C780 C759) (IMPLIES C1590 C780) (IMPLIES C1591 C780) (IMPLIES C1595 C780) (IMPLIES C1596 C780) (IMPLIES C1601 C780) (IMPLIES C1602 C780) (IMPLIES C1597 C1596) (IMPLIES C1635 C759) (IMPLIES C1570 C759) (IMPLIES C1575 C1570) (IMPLIES C1579 C1570) (IMPLIES C1574 (AND C1570 C1568)) (IMPLIES C1608 C1606) (IMPLIES C1646 C1645) (IMPLIES C1581 C1580) (IMPLIES C1657 C1655) (IMPLIES C1592 C780) (IMPLIES C1565 C1558) (IMPLIES C1603 C780) (IMPLIES C1641 C1639) (IMPLIES C1576 C1570) (IMPLIES C1614 C1568) (IMPLIES C1587 C1580) (IMPLIES C1560 C1558) (IMPLIES C1598 C1596) (IMPLIES C1636 C1635) (IMPLIES C1571 C1570) (IMPLIES C1609 C1606) (IMPLIES C1647 C1645) (IMPLIES C1649 C1647) (IMPLIES C1650 C1647) (IMPLIES C1651 C1647) (IMPLIES C1652 C1647) (IMPLIES C1582 C1580) (IMPLIES C1620 C759) (IMPLIES C1622 C1620) (IMPLIES C1623 C1620) (IMPLIES C1624 C1620) (IMPLIES C1625 C1620) (IMPLIES C1658 C1655) (IMPLIES C1660 C1658) (IMPLIES C1593 C780) (IMPLIES C1566 C1558) (IMPLIES C1604 C759) (IMPLIES C1644 C1604) (IMPLIES C760 C756) (IMPLIES C765 C760) (IMPLIES C1642 C1604) (IMPLIES C1577 C1570) (IMPLIES C1615 C1568) (IMPLIES C771 (AND (OR (SOME R122 (AND (SOME R291 (AND (SOME R47 C1796) C174)) C901)) (ALL R150 (NOT C1547))) C768)) (IMPLIES C774 C771) (IMPLIES C775 C771) (IMPLIES C776 C771) (IMPLIES C1653 C1645) (IMPLIES C1588 C1580) (IMPLIES C1626 C1620) (IMPLIES C1561 C1558) (IMPLIES C1637 C1635) (IMPLIES C1572 C1570) (IMPLIES C1610 C1606) (IMPLIES C766 C756) (IMPLIES C1583 C1580) (IMPLIES C1621 C1620) (IMPLIES C1556 C759) (IMPLIES C1557 C1556) (IMPLIES C777 C771) (IMPLIES C1659 C1658) (IMPLIES C1594 C780) (IMPLIES C1567 C1558) (IMPLIES C1605 (AND C1604 C780)) (IMPLIES C761 C760) (IMPLIES C762 C761) (IMPLIES C763 C761) (IMPLIES C764 C761) (IMPLIES C1643 C1604) (IMPLIES C1578 C1570) (IMPLIES C1616 (AND C1568 C759)) (IMPLIES C1617 C1616) (IMPLIES C1618 C1616) (IMPLIES C1619 C1616) (IMPLIES C772 (AND (OR (SOME R150 C1492) (ALL R122 (OR (ALL R201 (NOT C301)) (NOT C892)))) C771)) (IMPLIES C1654 C1645) (IMPLIES C1589 C780) (IMPLIES C1627 C759) (IMPLIES C1628 C1627) (IMPLIES C1629 C1627) (IMPLIES C1631 C1627) (IMPLIES C1632 C1627) (IMPLIES C1630 (AND (OR (ALL R98 (NOT C2581)) (SOME R93 C2539)) (OR (ALL R93 (NOT C2539)) (ALL R366 (OR (ALL R202 (NOT C1095)) (NOT C873))) (SOME R178 C100)) C1627)) (IMPLIES C1562 C1558) (IMPLIES C1638 C1635) (IMPLIES C1573 C1570) (IMPLIES C210 C35) (IMPLIES C782 C210) (IMPLIES C783 C210) (IMPLIES C1611 C1568) (IMPLIES C1599 C1596) (IMPLIES C124 C16) (IMPLIES C1490 C1489) (IMPLIES C1501 C1490) (IMPLIES C1506 C1490) (IMPLIES C1507 C1490) (IMPLIES C1508 C1490) (IMPLIES C1397 (AND (SOME R166 C1265) C1289)) (IMPLIES C36 (AND (OR (ALL R180 (NOT C100)) (SOME R178 C100)) (OR (ALL R184 (NOT C94)) (SOME R182 C94)) C32)) (IMPLIES C212 C36) (IMPLIES C213 C36) (IMPLIES C784 C212) (IMPLIES C1304 C1286) (IMPLIES C1398 C1397) (IMPLIES C1600 C1596) (IMPLIES C125 C124) (IMPLIES C214 C36) (IMPLIES C844 C214) (IMPLIES C845 C844) (IMPLIES C846 C844) (IMPLIES C847 C844) (IMPLIES C848 C844) (IMPLIES C849 C844) (IMPLIES C850 C844) (IMPLIES C851 C844) (IMPLIES C852 C851) (IMPLIES C853 C851) (IMPLIES C854 C851) (IMPLIES C855 C851) (IMPLIES C856 C214) (IMPLIES C857 C856) (IMPLIES C858 C856) (IMPLIES C859 C856) (IMPLIES C860 C856) (IMPLIES C1491 (AND (SOME R151 C772) C1489)) (IMPLIES C785 C212) (IMPLIES C1303 C1286) (IMPLIES C1399 C1397) (IMPLIES C37 (AND (OR (ALL R128 (OR (ALL R184 (NOT C94)) (NOT C30))) (SOME R184 C94)) (OR (ALL R128 (OR (ALL R184 (NOT C94)) (NOT C21))) (SOME R184 C94)) (OR (ALL R128 (OR (ALL R180 (NOT C100)) (NOT C21))) (SOME R180 C100)) (OR (ALL R128 (OR (ALL R180 (NOT C100)) (NOT C30))) (SOME R180 C100)) (OR (ALL R366 (OR (ALL R202 (NOT C1095)) (NOT C873))) (ALL R180 (NOT C101)) (SOME R178 C100)) (OR (ALL R91 (OR (ALL R410 (NOT C61)) (NOT C21))) (ALL R412 (NOT C65)) (SOME R410 C61) (ALL R182 (NOT C94))) (OR (ALL R94 (OR (ALL R410 (NOT C62)) (NOT C21))) (ALL R412 (NOT C65)) (SOME R410 C62) (ALL R182 (NOT C94))) (OR (ALL R128 (OR (ALL R410 (NOT C62)) (NOT C21))) (SOME R410 C62)) (OR (ALL R128 (OR (ALL R410 (NOT C61)) (NOT C21))) (SOME R410 C61)) (OR (ALL R180 (NOT C100)) (SOME R178 C100)) (OR (ALL R184 (NOT C94)) (SOME R182 C94)) C32)) (IMPLIES C2544 C1742) (IMPLIES C2545 (AND (SOME R98 C713) C1742)) (IMPLIES C2546 C1742) (IMPLIES C2543 (AND (SOME R98 C2538) C1742)) (IMPLIES C1492 C1491) (IMPLIES C126 C16) (IMPLIES C215 C36) (IMPLIES C1305 C1286) (IMPLIES C1400 C1397) (IMPLIES C1487 C164) (IMPLIES C38 (AND (SOME R180 C101) C37)) (IMPLIES C822 C38) (IMPLIES C827 C38) (IMPLIES C838 C38) (IMPLIES C839 (AND (SOME R34 (AND (SOME R93 C483) C795)) (SOME R91 C483) (SOME R398 (AND (SOME R202 C1083) C890)) C838)) (IMPLIES C840 C838) (IMPLIES C841 C38) (IMPLIES C823 C822) (IMPLIES C824 (AND (SOME R91 C460) C822)) (IMPLIES C825 C822) (IMPLIES C826 C822) (IMPLIES C828 C827) (IMPLIES C829 C827) (IMPLIES C830 C827) (IMPLIES C837 C827) (IMPLIES C842 C841) (IMPLIES C843 (AND (OR (SOME R128 (AND (SOME R348 (AND (SOME R202 C1253) C935)) C720)) (ALL R98 (OR (ALL R348 (OR (ALL R202 (NOT C1254)) (NOT C935))) (NOT C720))) (ALL R366 (OR (ALL R202 (NOT C1094)) (NOT C873)))) C841)) (IMPLIES C127 C126) (IMPLIES C1401 C1397) (IMPLIES C1493 C1491) (IMPLIES C216 C37) (IMPLIES C800 (AND (OR (SOME R35 (AND (SOME R102 C518) C2315)) (ALL R93 (NOT C2296))) C216)) (IMPLIES C801 (AND (OR (ALL R93 (NOT C469)) (SOME R35 C839)) C216)) (IMPLIES C817 C216) (IMPLIES C786 C216) (IMPLIES C799 C216) (IMPLIES C804 (AND (SOME R182 C94) (SOME R178 C100) C803)) (IMPLIES C805 C803) (IMPLIES C806 C803) (IMPLIES C807 (AND (OR (ALL R380 (OR (ALL R212 (NOT C1024)) (NOT C881))) (SOME R382 (AND (SOME R212 C1024) C882))) (OR (ALL R382 (OR (ALL R212 (NOT C1024)) (NOT C882))) (SOME R182 C95)) (OR (ALL R382 (OR (ALL R212 (NOT C1024)) (NOT C882))) (SOME R178 C100)) (SOME R180 C101) (SOME R184 C98) C216)) (IMPLIES C808 C807) (IMPLIES C809 C807) (IMPLIES C814 C807) (IMPLIES C810 C809) (IMPLIES C811 C809) (IMPLIES C812 C809) (IMPLIES C813 C809) (IMPLIES C816 C814) (IMPLIES C802 C801) (IMPLIES C815 C814) (IMPLIES C753 C216) (IMPLIES C754 (AND C753 C752)) (IMPLIES C787 C753) (IMPLIES C1402 C1397) (IMPLIES C1494 C1489) (IMPLIES C39 (AND (SOME R184 C94) C37)) (IMPLIES C831 (AND C830 C39)) (IMPLIES C832 C831) (IMPLIES C833 (AND (SOME R178 C100) C831)) (IMPLIES C834 C831) (IMPLIES C835 (AND (SOME R178 C100) C831)) (IMPLIES C836 (AND (SOME R178 C100) C831)) (IMPLIES C1307 C1286) (IMPLIES C128 C126) (IMPLIES C2288 C128) (IMPLIES C2696 (AND (SOME R24 C469) C128)) (IMPLIES C217 C37) (IMPLIES C818 C217) (IMPLIES C819 C217) (IMPLIES C820 C217) (IMPLIES C821 C217) (IMPLIES C1403 C1397) (IMPLIES C788 (AND (SOME R178 C100) C787)) (IMPLIES C1495 C1489) (IMPLIES C40 (AND (SOME R412 C65) (SOME R180 C100) C39)) (IMPLIES C1462 (AND (SOME R146 C68) C40)) (IMPLIES C1463 (AND (SOME R410 C62) C40)) (IMPLIES C1464 (AND (SOME R128 C720) C40)) (IMPLIES C1465 C40) (IMPLIES C1308 C1286) (IMPLIES C129 C16) (IMPLIES C218 (AND (SOME R410 C62) C40)) (IMPLIES C1466 C218) (IMPLIES C1467 C218) (IMPLIES C1468 C218) (IMPLIES C1469 C218) (IMPLIES C1470 C218) (IMPLIES C2542 C1466) (IMPLIES C1404 C1397) (IMPLIES C789 C787) (IMPLIES C1496 C1489) (IMPLIES C41 C32) (IMPLIES C1309 C1286) (IMPLIES C130 C16) (IMPLIES C219 C41) (IMPLIES C1405 C1397) (IMPLIES C790 C787) (IMPLIES C300 (AND (OR (SOME R372 (AND (SOME R173 (AND (SOME R405 C1394) C53)) (SOME R202 C1106) C874)) (ALL R90 (OR (ALL R98 (NOT C1406)) (NOT C794))) (ALL R131 (OR (ALL R372 (OR (ALL R173 (OR (ALL R405 (NOT C1406)) (NOT C53))) (ALL R202 (NOT C1107)) (NOT C874))) (NOT C1394)))) C68)) (IMPLIES C2036 (AND (SOME R24 (AND (SOME R282 (AND (SOME R202 C1164) C916)) C194)) (SOME R282 (AND (SOME R202 C1164) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1094) C873)) C864)) C300)) (IMPLIES C2037 (AND (SOME R90 C2234) (SOME R24 (AND (SOME R282 (AND (SOME R202 C1164) C916)) C194)) (SOME R282 (AND (SOME R202 C1164) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2092 C2037) (IMPLIES C2091 C2037) (IMPLIES C301 C68) (IMPLIES C2104 C2091) (IMPLIES C2093 C2037) (IMPLIES C2113 C2093) (IMPLIES C2114 C2093) (IMPLIES C2115 C2093) (IMPLIES C2124 C2093) (IMPLIES C2125 C2093) (IMPLIES C2126 C2093) (IMPLIES C2135 C2093) (IMPLIES C2038 C300) (IMPLIES C2027 (AND (SOME R90 C2235) (SOME R24 (AND (SOME R282 (AND (SOME R202 C1164) C916)) C194)) (SOME R282 (AND (SOME R202 C1164) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1094) C873)) C864)) C300)) (IMPLIES C2127 C2093) (IMPLIES C302 C68) (IMPLIES C2116 C2093) (IMPLIES C2105 C2091) (IMPLIES C2094 C2037) (IMPLIES C2039 (AND (SOME R24 (AND (SOME R282 (AND (SOME R202 C1164) C916)) C194)) (SOME R282 (AND (SOME R202 C1164) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2028 (AND (SOME R90 (AND (SOME R98 C1399) C794)) (SOME R90 C2234) (SOME R90 C2233) (SOME R24 (AND (SOME R282 (AND (SOME R202 C1164) C916)) C194)) (SOME R282 (AND (SOME R202 C1164) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1094) C873)) C864)) C300)) (IMPLIES C2058 C2028) (IMPLIES C2128 C2093) (IMPLIES C303 C68) (IMPLIES C2203 C303) (IMPLIES C2204 C2203) (IMPLIES C2201 (AND (SOME R90 C2233) C303)) (IMPLIES C2202 C2201) (IMPLIES C2117 C2093) (IMPLIES C2106 C2092) (IMPLIES C2095 C2037) (IMPLIES C2146 C2095) (IMPLIES C2147 C2095) (IMPLIES C2148 C2095) (IMPLIES C2149 C2095) (IMPLIES C2084 C2036) (IMPLIES C2040 (AND (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2029 (AND (SOME R90 C2232) (SOME R24 (AND (SOME R282 (AND (SOME R202 C1164) C916)) C194)) (SOME R282 (AND (SOME R202 C1164) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2059 C2029) (IMPLIES C2129 C2093) (IMPLIES C2118 C2093) (IMPLIES C2107 C2093) (IMPLIES C2096 C2037) (IMPLIES C2150 C2096) (IMPLIES C2151 C2096) (IMPLIES C2085 C2036) (IMPLIES C2041 (AND (SOME R90 C2233) (SOME R24 (AND (SOME R282 (AND (SOME R202 C1144) C916)) C194)) (SOME R282 (AND (SOME R202 C1144) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2157 C2041) (IMPLIES C2030 (AND (SOME R24 (AND (SOME R282 (AND (SOME R202 C1164) C916)) C194)) (SOME R282 (AND (SOME R202 C1164) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2060 C2030) (IMPLIES C2152 C2096) (IMPLIES C2130 C2093) (IMPLIES C2119 C2093) (IMPLIES C2108 C2093) (IMPLIES C2086 C2036) (IMPLIES C2042 (AND (SOME R90 C2234) (SOME R24 (AND (SOME R276 (AND (SOME R202 C1189) C921)) C194)) (SOME R276 (AND (SOME R202 C1189) C921)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1094) C873)) C864)) C300)) (IMPLIES C2158 C2042) (IMPLIES C2031 (AND (SOME R24 (AND (SOME R282 (AND (SOME R202 C1144) C916)) C194)) (SOME R282 (AND (SOME R202 C1144) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2061 C2031) (IMPLIES C2208 C68) (IMPLIES C2212 C2208) (IMPLIES C2218 C2208) (IMPLIES C2223 C2208) (IMPLIES C2213 C2212) (IMPLIES C2214 C2212) (IMPLIES C2215 C2212) (IMPLIES C2216 C2212) (IMPLIES C2217 C2212) (IMPLIES C2219 C2218) (IMPLIES C2153 C2038) (IMPLIES C2131 C2093) (IMPLIES C2120 C2093) (IMPLIES C2206 C2120) (IMPLIES C2109 C2093) (IMPLIES C2087 C2037) (IMPLIES C2097 C2087) (IMPLIES C2043 (AND (SOME R90 C2233) (SOME R24 (AND (SOME R282 (AND (SOME R202 C1159) C916)) C194)) (SOME R282 (AND (SOME R202 C1164) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2159 C2043) (IMPLIES C2160 C2043) (IMPLIES C2032 (AND (SOME R24 (AND (SOME R276 (AND (SOME R202 C1188) C921)) (SOME R282 (AND (SOME R202 C1164) C916)) C194)) (SOME R276 (AND (SOME R202 C1188) C921)) (SOME R282 (AND (SOME R202 C1164) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2062 C2032) (IMPLIES C2063 C2032) (IMPLIES C2064 C2032) (IMPLIES C2220 C2208) (IMPLIES C2209 C2208) (IMPLIES C2154 C2039) (IMPLIES C2132 C2093) (IMPLIES C2121 C2093) (IMPLIES C2110 C2093) (IMPLIES C2207 C2110) (IMPLIES C2088 C2037) (IMPLIES C2098 C2088) (IMPLIES C2099 C2088) (IMPLIES C2055 (AND (SOME R90 C2233) (SOME R24 (AND (SOME R276 (AND (SOME R202 C1189) C921)) (SOME R282 (AND (SOME R202 C1164) C916)) C194)) (SOME R276 (AND (SOME R202 C1189) C921)) (SOME R282 (AND (SOME R202 C1164) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2187 C2055) (IMPLIES C2044 (AND (SOME R90 C2233) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1094) C873)) C865)) (SOME R24 (AND (SOME R282 (AND (SOME R202 C1164) C916)) C194)) (SOME R282 (AND (SOME R202 C1164) C916)) C300)) (IMPLIES C2161 C2044) (IMPLIES C2162 C2044) (IMPLIES C2163 C2044) (IMPLIES C2164 C2044) (IMPLIES C2165 C2044) (IMPLIES C2168 C2044) (IMPLIES C2033 (AND (SOME R90 C2233) (SOME R24 (AND (SOME R282 (AND (SOME R202 C1141) C916)) (SOME R276 (AND (SOME R202 C1189) C921)) C194)) (SOME R282 (AND (SOME R202 C1141) C916)) (SOME R276 (AND (SOME R202 C1189) C921)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2065 C2033) (IMPLIES C2066 C2033) (IMPLIES C2221 C2220) (IMPLIES C2210 C2209) (IMPLIES C2166 C2044) (IMPLIES C2155 C2039) (IMPLIES C2144 C2113) (IMPLIES C2133 C2093) (IMPLIES C2122 C2093) (IMPLIES C2111 C2093) (IMPLIES C2100 C2088) (IMPLIES C2089 C2037) (IMPLIES C2102 C2089) (IMPLIES C2067 C2033) (IMPLIES C2056 C2027) (IMPLIES C2045 (AND (SOME R90 C2234) (SOME R276 (AND (SOME R202 C1188) C921)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2188 C2045) (IMPLIES C2190 C2045) (IMPLIES C2191 C2045) (IMPLIES C2192 C2045) (IMPLIES C2193 C2045) (IMPLIES C2034 C300) (IMPLIES C2199 C2034) (IMPLIES C2222 C2208) (IMPLIES C2211 C2209) (IMPLIES C2200 C2034) (IMPLIES C2189 C2045) (IMPLIES C2167 C2044) (IMPLIES C2156 C2040) (IMPLIES C2145 C2094) (IMPLIES C2134 C2093) (IMPLIES C2123 C2093) (IMPLIES C2112 C2093) (IMPLIES C2205 C2112) (IMPLIES C2101 C2088) (IMPLIES C2090 C2037) (IMPLIES C2103 C2090) (IMPLIES C2057 C2028) (IMPLIES C2046 (AND (SOME R90 C2233) (SOME R24 (AND (SOME R282 (AND (SOME R202 C1158) C916)) C194)) (SOME R282 (AND (SOME R202 C1158) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2169 C2046) (IMPLIES C2170 C2046) (IMPLIES C2035 (AND (SOME R90 C2232) (SOME R24 (AND (SOME R282 (AND (SOME R202 C1164) C916)) C194)) (SOME R282 (AND (SOME R202 C1164) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1094) C873)) C864)) C300)) (IMPLIES C2068 C2035) (IMPLIES C2069 C2035) (IMPLIES C2070 C2035) (IMPLIES C2083 C2035) (DEFINE-CONCEPT C2071 C2083) (IMPLIES C2072 C2035) (IMPLIES C2082 C2035) (DEFINE-CONCEPT C2073 C2082) (IMPLIES C2074 C2035) (IMPLIES C2075 C2035) (IMPLIES C2076 C2035) (IMPLIES C2077 C2035) (IMPLIES C2078 C2035) (IMPLIES C2079 C2035) (IMPLIES C2080 C2035) (IMPLIES C2081 C2035) (IMPLIES C2224 C2223) (IMPLIES C1497 C1489) (IMPLIES C42 C41) (IMPLIES C861 C42) (IMPLIES C862 (AND (OR (ALL R130 (OR (ALL R372 (OR (ALL R173 (OR (ALL R405 (NOT C1406)) (NOT C53))) (ALL R202 (NOT C1107)) (NOT C874))) (NOT C1394))) (ALL R91 (NOT C1406)) (SOME R366 (AND (SOME R202 C1095) C873))) C42)) (IMPLIES C863 C42) (IMPLIES C864 (AND (OR (ALL R94 (NOT C1942)) (SOME R366 (AND (SOME R202 C1095) C873))) (OR (ALL R94 (NOT C1943)) (SOME R366 (AND (SOME R202 C1094) C873))) C863)) (IMPLIES C865 C863) (IMPLIES C866 C863) (IMPLIES C1310 (AND C1290 C1286)) (IMPLIES C131 C130) (IMPLIES C220 C5) (IMPLIES C1282 C220) (IMPLIES C1283 (AND (SOME R171 C1672) C1282)) (IMPLIES C1406 C1397) (IMPLIES C791 (AND (SOME R178 C100) C787)) (IMPLIES C2047 (AND (SOME R90 C2233) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1094) C873)) C864)) C300)) (IMPLIES C2171 C2047) (IMPLIES C2136 C2093) (IMPLIES C2225 C2223) (IMPLIES C1498 C1490) (IMPLIES C43 C5) (IMPLIES C1311 (AND C1290 C1286)) (IMPLIES C132 C130) (IMPLIES C221 C220) (IMPLIES C1262 C221) (IMPLIES C1263 C221) (IMPLIES C1269 C221) (IMPLIES C1279 C221) (IMPLIES C1284 C221) (IMPLIES C1264 C1263) (IMPLIES C1265 C1263) (IMPLIES C1266 C1263) (IMPLIES C1267 C1263) (IMPLIES C1268 C1263) (IMPLIES C1270 C1269) (IMPLIES C1271 C1269) (IMPLIES C1272 C1269) (IMPLIES C1280 C1279) (IMPLIES C1281 C1279) (IMPLIES C1285 C1284) (IMPLIES C1407 C1406) (IMPLIES C1959 C1394) (IMPLIES C1974 C1959) (IMPLIES C1975 C1959) (IMPLIES C1976 C1959) (IMPLIES C1977 C1975) (IMPLIES C1978 C1975) (IMPLIES C1979 C1975) (IMPLIES C1980 (AND (SOME R372 (AND (SOME R173 (AND (SOME R405 C1406) C53)) (SOME R202 C1107) C874)) C1975)) (IMPLIES C1981 C1975) (IMPLIES C1982 C1975) (IMPLIES C1983 C1975) (IMPLIES C1984 C1975) (IMPLIES C1985 C1976) (IMPLIES C1986 C1976) (IMPLIES C1987 C1976) (IMPLIES C1988 C1976) (IMPLIES C1989 C1976) (IMPLIES C1990 C1976) (IMPLIES C792 (AND (OR (SOME R35 C2314) (ALL R98 (NOT C749))) C216)) (IMPLIES C2048 (AND (SOME R90 C2232) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1094) C873)) C864)) C300)) (IMPLIES C2172 C2048) (IMPLIES C2137 C2093) (IMPLIES C2226 C2208) (IMPLIES C1499 C1490) (IMPLIES C1519 C164) (IMPLIES C1526 C1519) (IMPLIES C1527 C1519) (IMPLIES C1528 C1527) (IMPLIES C1529 C1527) (IMPLIES C1530 C1519) (IMPLIES C44 C43) (IMPLIES C867 C44) (IMPLIES C868 C867) (IMPLIES C869 C44) (IMPLIES C873 C869) (IMPLIES C874 C869) (IMPLIES C875 C869) (IMPLIES C880 C869) (IMPLIES C881 C869) (IMPLIES C882 C869) (IMPLIES C876 C869) (IMPLIES C883 C869) (IMPLIES C871 C869) (IMPLIES C877 C869) (IMPLIES C884 C883) (IMPLIES C924 C44) (IMPLIES C934 C924) (IMPLIES C935 C924) (IMPLIES C878 C869) (IMPLIES C870 C869) (IMPLIES C887 C870) (IMPLIES C925 C924) (IMPLIES C932 C925) (IMPLIES C933 C932) (IMPLIES C885 C870) (IMPLIES C879 C878) (IMPLIES C937 C44) (IMPLIES C938 C937) (IMPLIES C939 C937) (IMPLIES C940 C937) (IMPLIES C941 C937) (IMPLIES C942 C937) (IMPLIES C944 C937) (IMPLIES C945 C937) (IMPLIES C946 C937) (IMPLIES C947 C937) (IMPLIES C948 C937) (IMPLIES C872 C869) (IMPLIES C886 C870) (IMPLIES C926 C925) (IMPLIES C927 C926) (IMPLIES C928 C927) (IMPLIES C931 C927) (IMPLIES C929 C928) (IMPLIES C930 C928) (IMPLIES C943 C937) (IMPLIES C1312 (AND C1290 C1286)) (IMPLIES C133 C130) (IMPLIES C222 C220) (IMPLIES C1273 C222) (IMPLIES C1274 C222) (IMPLIES C1276 C222) (IMPLIES C1277 C222) (IMPLIES C1278 C222) (IMPLIES C1275 C1274) (IMPLIES C1408 C1406) (IMPLIES C2749 C2729) (IMPLIES C1960 C1394) (IMPLIES C1991 C1960) (IMPLIES C1992 C1960) (IMPLIES C1993 C1960) (IMPLIES C2049 (AND (SOME R90 C2233) (SOME R24 (AND (SOME R276 (AND (SOME R202 C1189) C921)) C194)) (SOME R276 (AND (SOME R202 C1189) C921)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2173 C2049) (IMPLIES C888 C870) (IMPLIES C2138 C2093) (IMPLIES C2227 C2208) (IMPLIES C1500 C1490) (IMPLIES C1520 C1519) (IMPLIES C45 C43) (IMPLIES C1251 C45) (IMPLIES C1252 C1251) (IMPLIES C1253 C1252) (IMPLIES C1254 C1252) (IMPLIES C1255 C1252) (IMPLIES C1256 C1252) (IMPLIES C1013 C45) (IMPLIES C1033 C1013) (IMPLIES C1056 C1013) (IMPLIES C1058 C1056) (IMPLIES C1061 C1056) (IMPLIES C1059 C1056) (IMPLIES C1034 C1033) (IMPLIES C1036 C1034) (IMPLIES C1044 C1034) (IMPLIES C1047 C1034) (IMPLIES C1045 C1034) (IMPLIES C1037 C1034) (IMPLIES C1048 C1033) (IMPLIES C1057 C1056) (IMPLIES C1043 C1034) (IMPLIES C1035 C1034) (IMPLIES C1060 C1056) (IMPLIES C1046 C1034) (IMPLIES C1038 C1034) (IMPLIES C1049 C1033) (IMPLIES C1122 C45) (IMPLIES C1127 C1122) (IMPLIES C1128 C1127) (IMPLIES C1129 C1128) (IMPLIES C1190 C1127) (IMPLIES C1196 C1190) (IMPLIES C1203 C1122) (IMPLIES C1232 C1203) (IMPLIES C1233 C1232) (IMPLIES C1239 C1232) (IMPLIES C1242 C1232) (IMPLIES C1241 C1239) (IMPLIES C1243 C1242) (IMPLIES C1244 C1242) (IMPLIES C1130 C1128) (IMPLIES C1191 C1190) (IMPLIES C1194 C1191) (IMPLIES C1195 C1191) (IMPLIES C1204 C1203) (IMPLIES C1208 C1204) (IMPLIES C1215 C1204) (IMPLIES C1228 C1204) (IMPLIES C1209 C1208) (IMPLIES C1216 C1215) (IMPLIES C1240 C1239) (IMPLIES C1131 C1127) (IMPLIES C1217 C1215) (IMPLIES C1192 C1191) (IMPLIES C1229 C1228) (IMPLIES C1205 C1204) (IMPLIES C1207 C1205) (IMPLIES C1168 C1127) (IMPLIES C1169 C1168) (IMPLIES C1170 C1169) (IMPLIES C1132 C1131) (IMPLIES C1133 C1132) (IMPLIES C1134 C1132) (IMPLIES C1221 C1204) (IMPLIES C1193 C1191) (IMPLIES C1218 C1204) (IMPLIES C1219 C1218) (IMPLIES C1220 C1218) (IMPLIES C1230 C1228) (IMPLIES C1231 (AND C1230 C1229)) (IMPLIES C1206 C1205) (IMPLIES C1050 C1049) (IMPLIES C1210 C1208) (IMPLIES C1171 C1169) (IMPLIES C1222 C1221) (IMPLIES C1234 C1233) (IMPLIES C1197 C1196) (IMPLIES C1062 C1013) (IMPLIES C1065 C1062) (IMPLIES C1245 C1232) (IMPLIES C1014 C1013) (IMPLIES C1020 C1014) (IMPLIES C1025 C1014) (IMPLIES C1021 C1020) (IMPLIES C1022 C1020) (IMPLIES C1026 C1025) (IMPLIES C1027 C1025) (IMPLIES C1023 (AND C1021 C1020)) (IMPLIES C1024 (AND C1021 C1020)) (IMPLIES C1123 C1122) (IMPLIES C1257 C1252) (IMPLIES C1135 C1131) (IMPLIES C1145 C1135) (IMPLIES C1154 C1135) (IMPLIES C1146 C1145) (IMPLIES C1147 C1145) (IMPLIES C1155 C1154) (IMPLIES C1156 C1154) (IMPLIES C1160 C1154) (IMPLIES C1164 C1154) (IMPLIES C1165 C1154) (IMPLIES C1166 C1154) (IMPLIES C1157 C1156) (IMPLIES C1158 C1156) (IMPLIES C1159 C1156) (IMPLIES C1167 C1166) (IMPLIES C1051 C1049) (IMPLIES C1211 C1208) (IMPLIES C1148 C1147) (IMPLIES C1172 C1168) (IMPLIES C1223 C1221) (IMPLIES C1235 C1233) (IMPLIES C1161 C1160) (IMPLIES C1015 C1014) (IMPLIES C1019 C1015) (IMPLIES C1063 C1062) (IMPLIES C1040 C1034) (IMPLIES C1136 C1135) (IMPLIES C1137 C1136) (IMPLIES C1140 C1136) (IMPLIES C1141 C1136) (IMPLIES C1144 C1136) (IMPLIES C1142 C1141) (IMPLIES C1143 C1141) (IMPLIES C1028 C1025) (IMPLIES C1246 C1245) (IMPLIES C1124 C1123) (IMPLIES C1258 C1251) (IMPLIES C1149 C1148) (IMPLIES C1052 C1049) (IMPLIES C1055 C1052) (IMPLIES C1016 C1015) (IMPLIES C1212 C1204) (IMPLIES C1173 C1172) (IMPLIES C1224 C1221) (IMPLIES C1236 C1232) (IMPLIES C1238 C1236) (IMPLIES C1162 C1161) (IMPLIES C949 C45) (IMPLIES C953 C949) (IMPLIES C955 C953) (IMPLIES C976 C949) (IMPLIES C981 C976) (IMPLIES C956 C949) (IMPLIES C963 C956) (IMPLIES C966 C963) (IMPLIES C967 C966) (IMPLIES C968 C967) (IMPLIES C964 C963) (IMPLIES C977 C976) (IMPLIES C978 C977) (IMPLIES C979 C977) (IMPLIES C984 C949) (IMPLIES C986 C984) (IMPLIES C987 C984) (IMPLIES C954 C953) (IMPLIES C988 C949) (IMPLIES C989 C988) (IMPLIES C998 C988) (IMPLIES C999 C988) (IMPLIES C1000 C988) (IMPLIES C1010 C988) (IMPLIES C1011 C988) (IMPLIES C1012 C988) (IMPLIES C990 C989) (IMPLIES C992 C989) (IMPLIES C996 C989) (IMPLIES C997 C989) (IMPLIES C1004 C1000) (IMPLIES C1007 C1000) (IMPLIES C1008 C1000) (IMPLIES C957 C956) (IMPLIES C958 C957) (IMPLIES C959 C958) (IMPLIES C969 C949) (IMPLIES C971 C969) (IMPLIES C974 C969) (IMPLIES C975 C969) (IMPLIES C993 C989) (IMPLIES C1009 C1000) (IMPLIES C965 C963) (IMPLIES C1001 C1000) (IMPLIES C980 C976) (IMPLIES C991 C989) (IMPLIES C973 C969) (IMPLIES C960 C958) (IMPLIES C985 C984) (IMPLIES C1064 C1062) (IMPLIES C1039 C1034) (IMPLIES C1029 C1014) (IMPLIES C1031 C1029) (IMPLIES C1032 C1029) (IMPLIES C1247 C1245) (IMPLIES C1125 C1123) (IMPLIES C1017 C1015) (IMPLIES C982 C981) (IMPLIES C1053 C1052) (IMPLIES C1138 C1136) (IMPLIES C1259 C1258) (IMPLIES C1261 C1259) (IMPLIES C1150 C1148) (IMPLIES C994 C989) (IMPLIES C1213 C1212) (IMPLIES C1174 C1172) (IMPLIES C972 C969) (IMPLIES C1225 C1204) (IMPLIES C1227 C1225) (IMPLIES C1237 C1236) (IMPLIES C1163 C1154) (IMPLIES C961 C956) (IMPLIES C962 C961) (IMPLIES C950 C949) (IMPLIES C951 C950) (IMPLIES C952 C950) (IMPLIES C983 C976) (IMPLIES C1018 C1015) (IMPLIES C1041 C1034) (IMPLIES C1151 C1145) (IMPLIES C1030 C1029) (IMPLIES C1248 C1232) (IMPLIES C1249 C1248) (IMPLIES C1250 C1248) (IMPLIES C1126 C1123) (IMPLIES C1054 C1052) (IMPLIES C1139 C1136) (IMPLIES C1260 C1259) (IMPLIES C995 C989) (IMPLIES C1214 C1212) (IMPLIES C1042 C1034) (IMPLIES C1066 C45) (IMPLIES C1105 C1066) (IMPLIES C1113 C1066) (IMPLIES C1115 C1113) (IMPLIES C1093 C1066) (IMPLIES C1106 C1105) (IMPLIES C1102 C1066) (IMPLIES C1067 C1066) (IMPLIES C1075 C1067) (IMPLIES C1086 C1067) (IMPLIES C1077 C1075) (IMPLIES C1080 C1075) (IMPLIES C1088 C1086) (IMPLIES C1116 C1066) (IMPLIES C1078 C1075) (IMPLIES C1095 (AND (SOME R129 (AND (SOME R34 (AND (SOME R128 C1192) (SOME R122 (AND (SOME R271 C194) C914)) C772)) C1941)) C1093)) (IMPLIES C1089 C1086) (IMPLIES C1107 C1105) (IMPLIES C1104 C1102) (IMPLIES C1068 C1067) (IMPLIES C1069 C1068) (IMPLIES C1070 C1068) (IMPLIES C1081 C1067) (IMPLIES C1083 C1081) (IMPLIES C1084 C1081) (IMPLIES C1085 C1081) (IMPLIES C1076 C1075) (IMPLIES C1087 C1086) (IMPLIES C1096 C1066) (IMPLIES C1097 C1096) (IMPLIES C1108 C1066) (IMPLIES C1109 C1108) (IMPLIES C1110 C1109) (IMPLIES C1111 C1109) (IMPLIES C1112 C1109) (IMPLIES C1071 C1067) (IMPLIES C1072 C1071) (IMPLIES C1073 C1071) (IMPLIES C1074 C1071) (IMPLIES C1117 C1116) (IMPLIES C1118 C1117) (IMPLIES C1120 C1117) (IMPLIES C1119 C1118) (IMPLIES C1121 C1120) (IMPLIES C1079 C1075) (IMPLIES C1114 C1113) (IMPLIES C1090 C1066) (IMPLIES C1091 C1090) (IMPLIES C1092 C1090) (IMPLIES C1082 C1081) (IMPLIES C1175 C1127) (IMPLIES C1176 C1175) (IMPLIES C1184 C1175) (IMPLIES C1177 C1176) (IMPLIES C1183 C1176) (IMPLIES C1185 C1184) (IMPLIES C1186 C1184) (IMPLIES C1187 C1184) (IMPLIES C1188 C1184) (IMPLIES C1189 C1184) (IMPLIES C1178 C1177) (IMPLIES C1179 C1177) (IMPLIES C1180 C1179) (IMPLIES C1182 C1179) (IMPLIES C1181 C1180) (IMPLIES C970 C969) (IMPLIES C1226 C1225) (IMPLIES C1152 C1145) (IMPLIES C1153 C1152) (IMPLIES C1313 C1286) (IMPLIES C1098 C1097) (IMPLIES C223 C6) (IMPLIES C236 C223) (IMPLIES C246 C223) (IMPLIES C248 C223) (IMPLIES C258 C223) (IMPLIES C262 C223) (IMPLIES C237 C236) (IMPLIES C238 C236) (IMPLIES C239 C236) (IMPLIES C240 C236) (IMPLIES C241 C236) (IMPLIES C242 C236) (IMPLIES C243 C236) (IMPLIES C244 C236) (IMPLIES C245 C236) (IMPLIES C247 C246) (IMPLIES C249 C248) (IMPLIES C250 C248) (IMPLIES C251 C248) (IMPLIES C252 C248) (IMPLIES C253 C248) (IMPLIES C254 C248) (IMPLIES C255 C248) (IMPLIES C256 C248) (IMPLIES C257 C248) (IMPLIES C259 C258) (IMPLIES C260 C258) (IMPLIES C261 C258) (IMPLIES C263 C262) (IMPLIES C264 C262) (IMPLIES C265 C262) (IMPLIES C266 C262) (IMPLIES C267 C262) (IMPLIES C268 C262) (IMPLIES C269 C262) (IMPLIES C270 C262) (IMPLIES C271 C262) (IMPLIES C272 C262) (IMPLIES C1961 C1394) (IMPLIES C1994 C1961) (IMPLIES C1995 C1961) (IMPLIES C1996 C1961) (IMPLIES C1997 C1961) (IMPLIES C1198 C1196) (IMPLIES C794 (AND (OR (SOME R91 C2174) (ALL R98 (NOT C1398))) (OR (ALL R98 (NOT C1399)) (SOME R91 C2174)) (OR (ALL R98 (NOT C1400)) (SOME R91 C2174)) (OR (ALL R98 (NOT C1401)) (SOME R91 C2174)) (OR (ALL R98 (NOT C1402)) (SOME R91 C2174)) (OR (SOME R91 C497) (ALL R98 (NOT C740))) (OR (ALL R98 (NOT C739)) (SOME R91 C497)) (OR (ALL R98 (NOT C739)) (SOME R35 C839) (ALL R91 (NOT C497))) (OR (SOME R35 C839) (ALL R91 (NOT C497)) (ALL R98 (NOT C740))) C216)) (IMPLIES C2050 C300) (IMPLIES C2194 C2050) (IMPLIES C2195 C2050) (IMPLIES C2196 C2050) (IMPLIES C2197 C2050) (IMPLIES C2198 C2050) (IMPLIES C889 C870) (IMPLIES C2139 C2093) (IMPLIES C1002 C1000) (IMPLIES C2572 C2563) (IMPLIES C2564 C2563) (IMPLIES C2565 C2563) (IMPLIES C2566 C2563) (IMPLIES C22 (AND (OR (ALL R25 (OR (ALL R232 (NOT C79)) (NOT C25))) (SOME R232 C79)) (OR (ALL R25 (OR (ALL R184 (NOT C98)) (NOT C25))) (SOME R184 C98)) C21)) (IMPLIES C2567 C2563) (IMPLIES C23 (AND (SOME R180 C100) C21)) (IMPLIES C1409 (AND (OR (ALL R108 (OR (ALL R410 (NOT C61)) (NOT C21))) (SOME R410 C61)) (SOME R280 C82) C23)) (IMPLIES C1456 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C1409)) (IMPLIES C1448 C1409) (IMPLIES C1449 C1448) (IMPLIES C1457 C1456) (IMPLIES C1431 C1409) (IMPLIES C1426 C1409) (IMPLIES C1428 (AND (SOME R284 (AND (SOME R202 C1145) C917)) C1426)) (IMPLIES C1434 C1409) (IMPLIES C1455 (AND (SOME R110 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C25)) C1409)) (IMPLIES C1442 C1409) (IMPLIES C1443 C1442) (IMPLIES C1459 C1442) (IMPLIES C1444 C1443) (IMPLIES C1429 (AND (SOME R280 C82) C1426)) (IMPLIES C1430 (AND (SOME R280 C82) (SOME R184 C95) C1429)) (IMPLIES C1450 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C1409)) (IMPLIES C1451 C1450) (IMPLIES C1452 C1450) (IMPLIES C1454 (AND (SOME R280 C82) (SOME R184 C95) C1450)) (IMPLIES C1458 C1409) (IMPLIES C1432 C1431) (IMPLIES C1433 C1432) (IMPLIES C1453 C1450) (IMPLIES C1427 (AND (SOME R280 C82) C1426)) (IMPLIES C1435 C1409) (IMPLIES C1437 (AND (SOME R129 C1742) C1409)) (IMPLIES C1447 C1437) (IMPLIES C2568 C2563) (IMPLIES C1460 C23) (IMPLIES C24 (AND (OR (ALL R25 (OR (ALL R232 (NOT C75)) (NOT C25))) (SOME R232 C75)) (OR (ALL R25 (OR (ALL R232 (NOT C75)) (NOT C24))) (SOME R232 C75)) (OR (ALL R25 (OR (ALL R232 (NOT C79)) (NOT C25))) (SOME R232 C79)) (OR (ALL R25 (OR (ALL R184 (NOT C98)) (NOT C25))) (SOME R184 C98)) (SOME R280 C82) C21)) (IMPLIES C153 C24) (IMPLIES C354 (AND (SOME R284 (AND (SOME R202 C1136) C917)) (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C355 (AND (OR (ALL R19 (NOT C2414)) (SOME R232 C75)) (OR (ALL R19 (NOT C2414)) (SOME R314 C1215)) (OR (ALL R19 (NOT C2415)) (ALL R314 (NOT C1216)) (SOME R232 C79)) (OR (ALL R19 (NOT C2416)) (ALL R314 (NOT C1216)) (SOME R232 C79)) (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C347 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C348 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C337 (AND (SOME R284 (AND (SOME R202 C1145) C917)) C153)) (IMPLIES C360 (AND (SOME R268 (AND (SOME R202 C1180) C920)) C153)) (IMPLIES C349 (AND (SOME R284 (AND (SOME R202 C1145) C917)) C153)) (IMPLIES C327 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C153)) (IMPLIES C361 C153) (IMPLIES C350 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C339 (AND (OR (ALL R62 (NOT C2418)) (ALL R60 (NOT C2417)) (SOME R232 C79)) (SOME R30 C724) (SOME R284 (AND (SOME R202 C1136) C917)) (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C362 C153) (IMPLIES C351 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C329 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C341 (AND (SOME R284 (AND (SOME R202 C1136) C917)) (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C353 (AND (SOME R284 (AND (SOME R202 C1136) C917)) (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C331 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C153)) (IMPLIES C1438 (AND (SOME R129 C2693) (SOME R284 (AND (SOME R202 C1145) C917)) C1437)) (IMPLIES C2569 C2563) (IMPLIES C1461 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C1460)) (IMPLIES C356 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C25 (AND (OR (ALL R25 (OR (ALL R232 (NOT C75)) (NOT C25))) (SOME R232 C75)) (OR (ALL R25 (OR (ALL R232 (NOT C75)) (NOT C24))) (SOME R232 C75)) (OR (ALL R25 (OR (ALL R232 (NOT C79)) (NOT C25))) (SOME R232 C79)) (SOME R184 C98) C21)) (IMPLIES C651 C25) (IMPLIES C652 C651) (IMPLIES C653 C652) (IMPLIES C654 (AND (OR (ALL R312 (NOT C1205)) (SOME R232 C79)) (SOME R16 C2350) (SOME R232 C75) C653)) (IMPLIES C655 (AND (OR (ALL R312 (NOT C1205)) (SOME R232 C79)) (SOME R232 C75) C653)) (IMPLIES C656 (AND (OR (ALL R312 (NOT C1205)) (SOME R232 C79)) (SOME R232 C75) C653)) (IMPLIES C657 C653) (IMPLIES C659 (AND (SOME R284 (AND (SOME R202 C1136) C917)) C653)) (IMPLIES C660 (AND (SOME R284 C1677) C653)) (IMPLIES C661 (AND (SOME R268 C1716) C653)) (IMPLIES C154 (AND (OR (ALL R310 (NOT C1228)) (ALL R410 (NOT C61)) (SOME R410 C62) (ALL R232 (NOT C79))) (SOME R280 C82) (SOME R278 C90) C25)) (IMPLIES C392 C154) (IMPLIES C410 C392) (IMPLIES C405 C392) (IMPLIES C413 C392) (IMPLIES C408 C392) (IMPLIES C390 (AND (SOME R284 (AND (SOME R202 C1147) C917)) C154)) (IMPLIES C395 (AND (SOME R78 (AND (SOME R330 C72) C424)) (SOME R76 C526) (SOME R13 (AND (SOME R330 C72) C424)) (SOME R232 C80) C390)) (IMPLIES C411 C392) (IMPLIES C393 (AND (SOME R232 C80) C392 C390)) (IMPLIES C406 C392) (IMPLIES C414 C154) (IMPLIES C416 (AND (SOME R13 C418) (SOME R232 C79) C414)) (IMPLIES C418 (AND (SOME R13 C380) (SOME R268 (AND (SOME R202 C1177) C920)) (SOME R232 C80) C414)) (IMPLIES C426 (AND (SOME R12 (AND (SOME R13 C426) C1811)) (SOME R13 C380) (SOME R232 C79) C414)) (IMPLIES C427 C414) (IMPLIES C436 (AND (SOME R25 C2289) (SOME R328 C71) C427)) (IMPLIES C437 (AND (SOME R13 (AND (SOME R330 C71) C424)) (SOME R232 C80) C436)) (IMPLIES C439 (AND (SOME R13 C437) (SOME R232 C80) C436)) (IMPLIES C440 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C154)) (IMPLIES C455 (AND (SOME R232 C75) C440)) (IMPLIES C457 (AND (OR (ALL R230 (NOT C309)) (ALL R310 (NOT C1228)) (SOME R410 C62)) (OR (ALL R230 (NOT C309)) (ALL R310 (NOT C1228)) (SOME R232 C79)) (SOME R17 C443) (SOME R410 C61) C455)) (IMPLIES C396 (AND (SOME R232 C79) C390)) (IMPLIES C409 C392) (IMPLIES C391 (AND (SOME R13 C424) (SOME R78 C424) (SOME R76 C471) (SOME R232 C80) C390)) (IMPLIES C404 C392) (IMPLIES C417 C414) (IMPLIES C456 (AND (OR (ALL R230 (NOT C309)) (ALL R310 (NOT C1228)) (SOME R410 C62)) (OR (ALL R230 (NOT C309)) (ALL R310 (NOT C1228)) (SOME R232 C79)) (SOME R17 C444) (SOME R410 C61) C455)) (IMPLIES C412 C392) (IMPLIES C425 (AND (SOME R284 (AND (SOME R202 C1145) C917)) C414)) (IMPLIES C438 (AND (SOME R13 C437) (SOME R232 C80) C436)) (IMPLIES C394 (AND (SOME R79 C522) (SOME R232 C80) C390)) (IMPLIES C407 C392) (IMPLIES C415 (AND (SOME R12 (AND (SOME R13 C415) C1810)) (SOME R13 C380) (SOME R284 (AND (SOME R202 C1145) C917)) (SOME R268 (AND (SOME R202 C1178) C920)) (SOME R232 C80) C414)) (IMPLIES C428 (AND (SOME R25 C2290) (SOME R328 C72) C427)) (IMPLIES C433 C428) (IMPLIES C429 (AND (SOME R13 (AND (SOME R330 C72) C424)) (SOME R232 C80) C428)) (IMPLIES C434 C433) (IMPLIES C435 C433) (IMPLIES C430 (AND (SOME R13 C429) (SOME R232 C80) C428)) (IMPLIES C431 (AND (SOME R13 C429) (SOME R232 C80) C428)) (IMPLIES C432 (AND (SOME R13 C429) (SOME R232 C80) C428)) (IMPLIES C384 C154) (IMPLIES C385 C384) (IMPLIES C386 C384) (IMPLIES C387 C384) (IMPLIES C388 C384) (IMPLIES C389 C384) (IMPLIES C441 (AND (SOME R410 C61) (SOME R232 C79) C440)) (IMPLIES C450 C441) (IMPLIES C451 (AND (SOME R17 C1803) C450)) (IMPLIES C452 (AND (SOME R17 C1803) C450)) (IMPLIES C454 (AND (SOME R17 C1804) C450)) (IMPLIES C453 (AND (SOME R71 C692) (SOME R71 C698) (SOME R17 C1804) C450)) (IMPLIES C419 (AND (SOME R284 (AND (SOME R202 C1145) C917)) C414)) (IMPLIES C397 (AND (SOME R232 C79) C390)) (IMPLIES C662 (AND (SOME R284 (AND (SOME R202 C1145) C917)) C652)) (IMPLIES C155 (AND (SOME R280 C82) (SOME R278 C90) C25)) (IMPLIES C442 C441) (IMPLIES C420 (AND (SOME R284 (AND (SOME R202 C1145) C917)) C414)) (IMPLIES C398 C154) (IMPLIES C403 (AND (SOME R17 C1804) (SOME R17 C380) (SOME R410 C61) (SOME R232 C77) C398)) (IMPLIES C663 C662) (IMPLIES C156 (AND (SOME R280 C82) (SOME R278 C90) C25)) (IMPLIES C375 (AND (SOME R13 C1805) (SOME R13 C444) C156)) (IMPLIES C369 (AND (SOME R13 C1807) (SOME R13 C443) C156)) (IMPLIES C363 C156) (IMPLIES C364 (AND (SOME R13 C415) (SOME R232 C77) C156)) (IMPLIES C365 (AND (SOME R13 C415) (SOME R232 C80) C156)) (IMPLIES C366 C156) (IMPLIES C373 C156) (IMPLIES C374 C156) (IMPLIES C376 C156) (IMPLIES C371 (AND (SOME R13 C453) C156)) (IMPLIES C368 (AND (SOME R13 C375) C156)) (IMPLIES C370 (AND (SOME R13 C375) C156)) (IMPLIES C372 (AND (SOME R71 C2522) (SOME R17 C453) C156)) (IMPLIES C367 (AND (SOME R17 C443) C156)) (IMPLIES C443 (AND (SOME R71 C2524) (SOME R71 C2520) (SOME R17 C1804) C442)) (IMPLIES C399 (AND (SOME R13 C1803) (SOME R13 C380) C398)) (IMPLIES C377 C154) (IMPLIES C382 C377) (IMPLIES C383 (AND (SOME R410 C62) (SOME R232 C80) C377)) (IMPLIES C381 (AND (OR (ALL R320 (NOT C1221)) (SOME R410 C61)) (OR (ALL R310 (NOT C1228)) (SOME R410 C62) (ALL R320 (NOT C1224))) (OR (ALL R310 (NOT C1228)) (SOME R410 C62) (ALL R320 (NOT C1222))) (SOME R13 C383) (SOME R268 (AND (SOME R202 C1183) C920)) (SOME R232 C79) C377)) (IMPLIES C664 C662) (IMPLIES C157 (AND (OR (ALL R238 (OR (ALL R202 (NOT C1208)) (NOT C906))) (ALL R410 (NOT C61)) (SOME R410 C62) (ALL R232 (NOT C77))) (SOME R280 C82) (SOME R278 C91) C25)) (IMPLIES C344 (AND C343 C157)) (IMPLIES C346 (AND C345 C157)) (IMPLIES C523 C157) (IMPLIES C524 (AND (SOME R328 C72) C523)) (IMPLIES C458 C157) (IMPLIES C466 (AND (SOME R71 C2511) (SOME R71 C2467) (SOME R71 C2463) (SOME R71 C2462) (SOME R71 C2461) (SOME R71 C2472) (SOME R71 C2470) (SOME R71 C2469) (SOME R71 C2468) (SOME R268 (AND (SOME R202 C1183) C920)) C458)) (IMPLIES C326 (AND (SOME R166 C1285) C325 C157)) (IMPLIES C525 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C524)) (IMPLIES C459 (AND (SOME R71 C2511) (SOME R71 C2451) (SOME R268 (AND (SOME R202 C1181) C920)) C458)) (IMPLIES C647 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C157)) (IMPLIES C338 (AND C337 C157)) (IMPLIES C641 C338) (IMPLIES C642 C338) (IMPLIES C537 C157) (IMPLIES C701 (AND (SOME R18 C1761) (SOME R232 C78) (SOME R268 (AND (SOME R202 C1180) C920)) C537)) (IMPLIES C2538 (AND (SOME R53 C418) (SOME R30 C724) (SOME R268 (AND (SOME R202 C1178) C920)) C537)) (IMPLIES C2536 (AND (SOME R24 C2561) (SOME R24 C2559) (SOME R16 C2578) (SOME R16 C2577) (SOME R16 C2561) (SOME R16 C2559) (SOME R25 C460) (SOME R17 C460) (SOME R268 (AND (SOME R202 C1180) C920)) C537)) (IMPLIES C2537 (AND (SOME R24 C2580) (SOME R24 C2579) (SOME R24 C2562) (SOME R24 C2560) (SOME R16 C2562) (SOME R16 C2560) (SOME R25 C460) (SOME R17 C460) (SOME R268 (AND (SOME R202 C1180) C920)) C537)) (IMPLIES C526 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C524)) (IMPLIES C703 (AND (SOME R25 C460) C326)) (IMPLIES C460 (AND (SOME R53 C2538) (SOME R268 (AND (SOME R202 C1181) C920)) C458)) (IMPLIES C648 C647) (IMPLIES C549 C157) (IMPLIES C328 (AND C327 C157)) (IMPLIES C536 C328) (IMPLIES C538 (AND C537 C328)) (IMPLIES C527 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C524)) (IMPLIES C2540 (AND (SOME R25 C460) C346)) (IMPLIES C704 (AND C703 C537)) (IMPLIES C461 (AND (SOME R71 C2505) (SOME R71 C2504) (SOME R71 C2503) (SOME R71 C2501) (SOME R71 C2500) (SOME R71 C2499) (SOME R71 C2498) (SOME R28 C349) (SOME R28 C348) (SOME R28 C347) (SOME R24 C351) (SOME R24 C350) (SOME R25 C2288) (SOME R268 (AND (SOME R202 C1183) C920)) (SOME R232 C79) C458)) (IMPLIES C649 C647) (IMPLIES C340 (AND C339 C157)) (IMPLIES C550 C549) (IMPLIES C553 C550) (IMPLIES C554 (AND (SOME R268 (AND (SOME R202 C1177) C920)) C550)) (IMPLIES C558 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C550)) (IMPLIES C559 (AND (SOME R284 (AND (SOME R202 C1145) C917)) C550)) (IMPLIES C560 (AND (SOME R284 (AND (SOME R202 C1145) C917)) C550)) (IMPLIES C561 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C550)) (IMPLIES C528 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C524)) (IMPLIES C2541 (AND C1474 C703)) (IMPLIES C705 (AND (OR (ALL R314 (NOT C1215)) (SOME R232 C79)) (SOME R232 C75) C340)) (IMPLIES C462 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C458)) (IMPLIES C650 C647) (IMPLIES C562 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C550)) (IMPLIES C551 (AND (SOME R268 (AND (SOME R202 C1180) C920)) C550)) (IMPLIES C330 (AND C329 C157)) (IMPLIES C539 C330) (IMPLIES C542 C330) (IMPLIES C543 C330) (IMPLIES C545 C330) (IMPLIES C546 C330) (IMPLIES C547 C330) (IMPLIES C548 C330) (IMPLIES C544 (AND (OR (ALL R109 (NOT C1448)) (SOME R178 C100)) (OR (SOME R272 (AND (SOME R204 C1170) C915)) (ALL R109 (NOT C1448))) (SOME R25 C2289) C330)) (IMPLIES C540 C539) (IMPLIES C529 (AND (SOME R328 C71) C523)) (IMPLIES C531 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C529)) (IMPLIES C532 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C529)) (IMPLIES C463 (AND (SOME R71 C693) (SOME R71 C2455) (SOME R71 C2454) (SOME R71 C2452) (SOME R268 (AND (SOME R202 C1183) C920)) C458)) (IMPLIES C640 C338) (IMPLIES C574 C549) (IMPLIES C575 C574) (IMPLIES C596 C574) (IMPLIES C606 C574) (IMPLIES C588 C575) (IMPLIES C607 C606) (IMPLIES C608 C606) (IMPLIES C609 C606) (IMPLIES C610 C606) (IMPLIES C611 C606) (IMPLIES C612 C606) (IMPLIES C613 C606) (IMPLIES C614 C606) (IMPLIES C615 C606) (IMPLIES C616 C606) (IMPLIES C589 C588) (IMPLIES C590 C588) (IMPLIES C591 C588) (IMPLIES C592 C588) (IMPLIES C593 C588) (IMPLIES C594 C588) (IMPLIES C595 C588) (IMPLIES C579 (AND (SOME R25 C449) C575)) (IMPLIES C580 C579) (IMPLIES C581 C579) (IMPLIES C582 C579) (IMPLIES C583 C579) (IMPLIES C584 C579) (IMPLIES C586 C579) (IMPLIES C587 C579) (IMPLIES C597 (AND (SOME R18 C2350) (SOME R268 (AND (SOME R202 C1183) C920)) (SOME R232 C79) C596)) (IMPLIES C585 C579) (IMPLIES C564 (AND (SOME R232 C75) (SOME R24 C2353) C563)) (IMPLIES C566 (AND (SOME R24 C2414) (SOME R24 C708) (SOME R24 C705) (SOME R24 C2369) (SOME R24 C2401) (SOME R24 (AND (SOME R25 C566) C2353)) (SOME R24 C2421) (SOME R25 C448) (SOME R96 C809) (SOME R96 C808) C564)) (IMPLIES C567 C564) (IMPLIES C569 C564) (IMPLIES C571 C564) (IMPLIES C572 C564) (IMPLIES C573 C564) (IMPLIES C568 (AND (SOME R25 C446) C564)) (IMPLIES C565 (AND (SOME R25 C447) C564)) (IMPLIES C570 (AND (SOME R25 C402) C564)) (IMPLIES C342 (AND C341 C157)) (IMPLIES C624 C342) (IMPLIES C625 C342) (IMPLIES C626 C342) (IMPLIES C627 C342) (IMPLIES C628 C342) (IMPLIES C629 C342) (IMPLIES C630 C342) (IMPLIES C631 C342) (IMPLIES C632 C342) (IMPLIES C633 C342) (IMPLIES C634 C342) (IMPLIES C635 C342) (IMPLIES C636 C342) (IMPLIES C637 C342) (IMPLIES C638 C342) (IMPLIES C639 C342) (IMPLIES C2539 (AND (SOME R17 C1761) C342)) (IMPLIES C552 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C550)) (IMPLIES C541 C539) (IMPLIES C530 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C529)) (IMPLIES C464 C157) (IMPLIES C465 (AND (SOME R232 C78) (SOME R268 (AND (SOME R202 C1183) C920)) C464 C458)) (IMPLIES C598 C596) (IMPLIES C444 (AND (SOME R17 C1803) C442)) (IMPLIES C576 (AND (SOME R25 C444) C575)) (IMPLIES C400 (AND (SOME R17 C1804) (SOME R17 C380) (SOME R410 C61) (SOME R232 C77) C398)) (IMPLIES C555 C550) (IMPLIES C378 (AND (SOME R13 C383) C377)) (IMPLIES C533 C328) (IMPLIES C643 C338) (IMPLIES C1439 (AND (SOME R129 C2691) C1438)) (IMPLIES C467 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C458)) (IMPLIES C599 (AND (SOME R22 C659) (SOME R284 (AND (SOME R202 C1136) C917)) (SOME R268 (AND (SOME R202 C1181) C920)) (SOME R232 C79) C574)) (IMPLIES C602 (AND (SOME R18 C2395) (SOME R18 C2394) (SOME R25 C452) C599)) (IMPLIES C605 (AND (SOME R18 C2384) (SOME R18 C2383) (SOME R18 C2382) (SOME R25 C453) C599)) (IMPLIES C603 (AND (SOME R18 C2377) (SOME R18 C2376) (SOME R18 C2375) (SOME R18 C2374) (SOME R18 C2373) (SOME R18 C2372) (SOME R18 C2371) (SOME R18 C2370) (SOME R18 C2368) (SOME R18 C2367) (SOME R25 C454) C599)) (IMPLIES C604 (AND (SOME R18 C2408) (SOME R18 C2402) (SOME R18 C2401) (SOME R18 C2400) (SOME R18 C2399) (SOME R18 C2398) (SOME R18 C2397) (SOME R18 C2396) (SOME R25 C453) C599)) (IMPLIES C445 C441) (IMPLIES C447 (AND (SOME R17 C1803) C445)) (IMPLIES C448 (AND (SOME R17 C1804) C445)) (IMPLIES C449 (AND (SOME R17 C1803) C445)) (IMPLIES C2570 C2563) (IMPLIES C577 (AND (SOME R25 C444) C575)) (IMPLIES C401 (AND (SOME R17 C380) (SOME R17 C1803) C398)) (IMPLIES C556 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C550)) (IMPLIES C379 (AND (SOME R13 C383) C377)) (IMPLIES C534 C328) (IMPLIES C357 (AND (SOME R284 (AND (SOME R202 C1145) C917)) C153)) (IMPLIES C644 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C157)) (IMPLIES C646 C644) (IMPLIES C468 (AND (SOME R71 C2511) (SOME R71 C680) (SOME R268 (AND (SOME R202 C1183) C920)) C458)) (IMPLIES C600 (AND (SOME R18 C2390) (SOME R18 C2389) (SOME R18 C2388) (SOME R18 C2387) (SOME R18 C2386) (SOME R18 C2385) (SOME R25 C451) C599)) (IMPLIES C446 (AND (SOME R17 C1804) C445)) (IMPLIES C2571 C2563) (IMPLIES C578 C575) (IMPLIES C402 (AND (SOME R17 C1804) (SOME R17 C380) (SOME R410 C61) (SOME R232 C77) C398)) (IMPLIES C711 (AND (SOME R62 (AND (SOME R19 C604) C657)) (SOME R60 C597) C340)) (IMPLIES C557 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C550)) (IMPLIES C380 (AND (SOME R13 C383) (SOME R232 C80) C377)) (IMPLIES C535 C328) (IMPLIES C358 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C645 C644) (IMPLIES C27 (AND (OR (ALL R51 (OR (ALL R232 (NOT C79)) (NOT C21))) (SOME R232 C79)) (OR (ALL R51 (OR (ALL R184 (NOT C98)) (NOT C21))) (SOME R184 C98)) (SOME R280 C82) C26 C21)) (IMPLIES C158 (AND C145 C27)) (IMPLIES C162 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C158)) (IMPLIES C163 C162) (IMPLIES C1441 C1437) (IMPLIES C1446 C1441) (IMPLIES C1445 (AND (SOME R112 (AND (SOME R29 C497) C1705)) (SOME R112 (AND (SOME R29 (AND (SOME R29 C497) C1705)) C718)) (SOME R110 C497) C1444 C1441)) (IMPLIES C469 (AND (SOME R92 C801) (SOME R410 C62) (SOME R268 (AND (SOME R202 C1181) C920)) C157)) (IMPLIES C470 C469) (IMPLIES C475 C469) (IMPLIES C487 C469) (IMPLIES C508 C469) (IMPLIES C474 (AND (SOME R21 C490) (SOME R71 C2511) (SOME R71 C2481) (SOME R71 C2480) C469)) (IMPLIES C472 (AND (SOME R21 C474) (SOME R71 C2482) C469)) (IMPLIES C471 (AND (SOME R23 C483) (SOME R268 (AND (SOME R202 C1181) C920)) C469)) (IMPLIES C477 (AND (SOME R17 C497) C469)) (IMPLIES C482 (AND (SOME R23 C504) (SOME R23 C470) C469)) (IMPLIES C483 (AND (SOME R92 C795) (SOME R23 C470) (SOME R92 C803) C469)) (IMPLIES C484 (AND (SOME R17 C497) C469)) (IMPLIES C485 (AND (SOME R17 C497) C469)) (IMPLIES C488 (AND (SOME R23 C507) (SOME R23 C483) C469)) (IMPLIES C492 (AND (SOME R17 C497) C469)) (IMPLIES C497 (AND (SOME R90 (AND (SOME R98 C1385) C794)) (SOME R23 C507) (SOME R23 C505) (SOME R23 C502) (SOME R23 C483) (SOME R71 C2511) (SOME R71 C2471) (SOME R71 C2460) (SOME R71 C2459) (SOME R71 C2456) (SOME R71 C2450) C469)) (IMPLIES C502 (AND (SOME R23 C504) (SOME R23 C483) C469)) (IMPLIES C503 (AND (SOME R23 C483) C469)) (IMPLIES C504 (AND (SOME R23 C483) C469)) (IMPLIES C505 (AND (SOME R23 C506) (SOME R23 C483) C469)) (IMPLIES C506 (AND (SOME R23 C483) C469)) (IMPLIES C507 (AND (SOME R23 C483) C469)) (IMPLIES C478 C477) (IMPLIES C479 C477) (IMPLIES C493 (AND (SOME R23 C503) (SOME R23 C483) (SOME R71 C2495) C469)) (IMPLIES C490 (AND (SOME R23 C503) (SOME R23 C488) (SOME R71 C2511) (SOME R71 C2489) C469)) (IMPLIES C496 (AND (SOME R23 C488) (SOME R71 C2511) (SOME R71 C2488) C469)) (IMPLIES C473 (AND (SOME R23 C490) C469)) (IMPLIES C476 (AND (SOME R23 C490) C469)) (IMPLIES C480 (AND (SOME R23 C490) C469)) (IMPLIES C491 (AND (SOME R23 C490) C469)) (IMPLIES C494 (AND (SOME R23 C490) C469)) (IMPLIES C495 (AND (SOME R23 C490) C469)) (IMPLIES C498 (AND (SOME R23 C490) C469)) (IMPLIES C486 (AND (SOME R23 C506) (SOME R23 C503) (SOME R23 C496) C469)) (IMPLIES C489 (AND (SOME R23 C506) (SOME R23 C503) (SOME R23 C496) C469)) (IMPLIES C500 (AND (SOME R23 C507) (SOME R23 C505) (SOME R23 C502) (SOME R23 C483) C469 C326)) (IMPLIES C499 (AND (SOME R23 C488) C469 C326)) (IMPLIES C501 (AND (SOME R23 C482) (SOME R92 C800) C469 C326)) (IMPLIES C481 (AND (SOME R23 C505) (SOME R23 C502) (SOME R23 C496) (SOME R71 C2511) (SOME R71 C2472) (SOME R71 C2470) (SOME R71 C2469) (SOME R71 C2468) (SOME R71 C2449) C469)) (IMPLIES C160 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C158)) (IMPLIES C161 C160) (IMPLIES C601 (AND (SOME R18 C2393) (SOME R18 C2392) (SOME R18 C2391) (SOME R25 C452) C599)) (IMPLIES C2228 C2227) (IMPLIES C509 C469) (IMPLIES C1099 C1097) (IMPLIES C1410 C1409) (IMPLIES C1421 C1410) (IMPLIES C1422 C1421) (IMPLIES C1423 C1421) (IMPLIES C1424 C1421) (IMPLIES C1425 C1424) (IMPLIES C1521 C1520) (IMPLIES C46 C43) (IMPLIES C69 C46) (IMPLIES C73 C46) (IMPLIES C86 C46) (IMPLIES C87 C46) (IMPLIES C102 C46) (IMPLIES C70 C69) (IMPLIES C74 C73) (IMPLIES C81 C73) (IMPLIES C88 C87) (IMPLIES C92 C87) (IMPLIES C71 C70) (IMPLIES C72 C70) (IMPLIES C75 C74) (IMPLIES C80 C74) (IMPLIES C82 C81) (IMPLIES C83 C81) (IMPLIES C89 C88) (IMPLIES C93 C92) (IMPLIES C99 C92) (IMPLIES C76 C75) (IMPLIES C77 C75) (IMPLIES C84 C83) (IMPLIES C85 C83) (IMPLIES C90 C89) (IMPLIES C91 C89) (IMPLIES C94 C93) (IMPLIES C98 C93) (IMPLIES C100 C99) (IMPLIES C101 C99) (IMPLIES C78 C77) (IMPLIES C95 C94) (IMPLIES C96 C94) (IMPLIES C97 C94) (IMPLIES C79 C78) (IMPLIES C1306 C1286) (IMPLIES C135 C24) (IMPLIES C224 C223) (IMPLIES C229 C224) (IMPLIES C230 C224) (IMPLIES C231 C224) (IMPLIES C232 C224) (IMPLIES C233 C224) (IMPLIES C234 C224) (IMPLIES C235 C224) (IMPLIES C617 C574) (IMPLIES C1199 C1190) (IMPLIES C706 (AND (SOME R62 (AND (SOME R242 (AND (SOME R202 C1216) C907)) (SOME R19 C2402) (SOME R163 (AND (SOME R202 C1055) C868)) C151)) (SOME R60 (AND (SOME R242 (AND (SOME R202 C1217) C907)) (SOME R163 (AND (SOME R202 C1055) C868)) (SOME R19 C2372) C151)) (SOME R314 C1216) C705)) (IMPLIES C1962 C1394) (IMPLIES C1998 C1962) (IMPLIES C1999 C1962) (IMPLIES C795 C216) (IMPLIES C2051 (AND (SOME R90 C2234) (SOME R24 (AND (SOME R282 (AND (SOME R202 C1157) C916)) C194)) (SOME R282 (AND (SOME R202 C1157) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1094) C873)) C864)) C300)) (IMPLIES C2174 C2051) (IMPLIES C2175 C2051) (IMPLIES C332 (AND C331 C157)) (IMPLIES C2471 (AND (SOME R79 C2448) (SOME R232 C80) C332)) (IMPLIES C665 C332) (IMPLIES C678 (AND (SOME R69 C2507) C332)) (IMPLIES C2497 (AND (SOME R69 C2444) (SOME R232 C79) C332)) (IMPLIES C2453 (AND (SOME R69 C2447) (SOME R232 C80) C332)) (IMPLIES C2466 (AND (SOME R69 C2444) (SOME R232 C80) C332)) (IMPLIES C673 (AND (SOME R232 C80) C332)) (IMPLIES C2479 (AND (SOME R69 C2466) (SOME R232 C80) C332)) (IMPLIES C2492 (AND (SOME R69 C2491) (SOME R232 C80) C332)) (IMPLIES C2448 (AND (SOME R77 C2471) (SOME R69 C2447) (SOME R232 C80) C332)) (IMPLIES C2505 (AND (SOME R69 C2497) (SOME R232 C79) C332)) (IMPLIES C2461 (AND (SOME R69 C2464) (SOME R232 C80) C332)) (IMPLIES C2474 (AND (SOME R69 C2466) (SOME R232 C80) C332)) (IMPLIES C2487 (AND (SOME R232 C80) C332)) (IMPLIES C681 C332) (IMPLIES C2500 (AND (SOME R69 C2497) (SOME R232 C79) C332)) (IMPLIES C2456 (AND (SOME R69 C2446) (SOME R232 C80) C332)) (IMPLIES C2469 (AND (SOME R69 C2470) (SOME R232 C80) C332)) (IMPLIES C676 C332) (IMPLIES C2482 (AND (SOME R69 C2478) (SOME R232 C80) C332)) (IMPLIES C2495 (AND (SOME R69 C2490) (SOME R232 C80) C332)) (IMPLIES C2451 (AND (SOME R69 C2452) (SOME R232 C80) C332)) (IMPLIES C2464 (AND (SOME R69 C2463) (SOME R232 C80) C332)) (IMPLIES C671 C332) (IMPLIES C2477 (AND (SOME R69 C2476) (SOME R232 C80) C332)) (IMPLIES C2490 (AND (SOME R69 C2444) (SOME R232 C80) C332)) (IMPLIES C2446 (AND (SOME R69 C2444) (SOME R232 C80) C332)) (IMPLIES C2503 (AND (SOME R69 C2497) (SOME R232 C79) C332)) (IMPLIES C2459 (AND (SOME R69 C680) (SOME R232 C80) C332)) (IMPLIES C2472 (AND (SOME R69 C2448) (SOME R232 C80) C332)) (IMPLIES C666 C332) (IMPLIES C679 C332) (IMPLIES C2498 (AND (SOME R69 C2497) (SOME R232 C79) C332)) (IMPLIES C2454 (AND (SOME R69 C2455) (SOME R232 C80) C332)) (IMPLIES C2467 (AND (SOME R69 C2466) (SOME R232 C80) C332)) (IMPLIES C2480 (AND (SOME R69 C2479) (SOME R232 C80) C332)) (IMPLIES C2493 (AND (SOME R79 C2491) (SOME R232 C80) C332)) (IMPLIES C2449 (AND (SOME R232 C80) C332)) (IMPLIES C2506 (AND (SOME R69 C2497) (SOME R232 C79) C332)) (IMPLIES C2462 (AND (SOME R69 C680) (SOME R232 C80) C332)) (IMPLIES C2475 (AND (SOME R69 C2466) (SOME R232 C80) C332)) (IMPLIES C682 C332) (IMPLIES C2488 (AND (SOME R69 C2486) (SOME R232 C80) C2487 C332)) (IMPLIES C2444 (AND (SOME R79 C2473) (SOME R17 C673) (SOME R232 C80) C332)) (IMPLIES C2501 (AND (SOME R69 C2497) (SOME R232 C79) C332)) (IMPLIES C2457 (AND (SOME R69 C2444) (SOME R232 C80) C332)) (IMPLIES C2470 (AND (SOME R69 C2448) (SOME R232 C80) C332)) (IMPLIES C677 (AND (SOME R69 C2507) C332)) (IMPLIES C2483 (AND (SOME R69 C2466) (SOME R232 C80) C332)) (IMPLIES C2484 (AND (SOME R232 C80) C2483 C332)) (IMPLIES C2485 (AND (SOME R232 C80) C2483 C332)) (IMPLIES C2496 (AND (SOME R69 C2490) (SOME R232 C80) C332)) (IMPLIES C2452 (AND (SOME R69 C2453) (SOME R232 C80) C332)) (IMPLIES C2465 (AND (SOME R69 C2463) (SOME R232 C80) C332)) (IMPLIES C672 (AND (SOME R69 C678) (SOME R232 C79) C332)) (IMPLIES C2478 (AND (SOME R69 C2476) (SOME R232 C80) C332)) (IMPLIES C2491 (AND (SOME R77 C2493) (SOME R69 C2490) (SOME R232 C80) C332)) (IMPLIES C2447 (AND (SOME R69 C2446) (SOME R232 C80) C332)) (IMPLIES C2504 (AND (SOME R69 C2497) (SOME R232 C79) C332)) (IMPLIES C2460 (AND (SOME R69 C680) (SOME R232 C80) C332)) (IMPLIES C2473 (AND (SOME R77 C2444) (SOME R17 C673) (SOME R232 C80) C332)) (IMPLIES C667 C332) (IMPLIES C668 C667) (IMPLIES C669 C667) (IMPLIES C680 (AND (SOME R69 C2446) (SOME R232 C80) C332)) (IMPLIES C2486 (AND (SOME R69 C2483) (SOME R232 C80) C332)) (IMPLIES C2499 (AND (SOME R69 C2497) (SOME R232 C79) C332)) (IMPLIES C2455 (AND (SOME R69 C2453) (SOME R232 C80) C332)) (IMPLIES C2468 (AND (SOME R69 C2472) (SOME R232 C80) C332)) (IMPLIES C675 C332) (IMPLIES C2481 (AND (SOME R69 C2479) (SOME R232 C80) C332)) (IMPLIES C2494 (AND (SOME R69 C2490) (SOME R232 C80) C332)) (IMPLIES C2450 (AND (SOME R69 C2453) (SOME R232 C80) C332)) (IMPLIES C2507 (AND (SOME R69 C2444) (SOME R232 C79) C332)) (IMPLIES C2463 (AND (SOME R69 C680) (SOME R232 C80) C332)) (IMPLIES C670 C332) (IMPLIES C2476 (AND (SOME R69 C2466) (SOME R232 C80) C332)) (IMPLIES C683 C332) (IMPLIES C2489 (AND (SOME R69 C2479) (SOME R232 C80) C2487 C332)) (IMPLIES C2445 C332) (IMPLIES C2502 (AND (SOME R69 C2497) (SOME R232 C79) C332)) (IMPLIES C2458 (AND (SOME R69 C2444) (SOME R232 C80) C332)) (IMPLIES C890 C870) (IMPLIES C2140 C2093) (IMPLIES C1502 (AND (SOME R151 C2440) C1490)) (IMPLIES C421 C414) (IMPLIES C2229 C2227) (IMPLIES C510 (AND (SOME R28 C718) (SOME R410 C61) C157)) (IMPLIES C518 (AND (SOME R90 C2304) (SOME R92 (AND (SOME R98 C749) C792)) (SOME R24 C1758) (SOME R23 C513) (SOME R25 C2288) (SOME R268 (AND (SOME R202 C1181) C920)) C510)) (IMPLIES C519 (AND (SOME R23 C513) (SOME R25 C2288) (SOME R268 (AND (SOME R202 C1181) C920)) C510)) (IMPLIES C520 (AND (SOME R17 C518) (SOME R284 (AND (SOME R202 C1145) C917)) C510)) (IMPLIES C521 (AND (SOME R17 C518) (SOME R25 C2288) (SOME R268 (AND (SOME R202 C1181) C920)) C510)) (IMPLIES C522 (AND (SOME R23 C513) (SOME R25 C2288) (SOME R268 (AND (SOME R202 C1181) C920)) C510)) (IMPLIES C516 (AND (SOME R23 C512) (SOME R25 C2288) (SOME R268 (AND (SOME R202 C1181) C920)) C510)) (IMPLIES C517 (AND (SOME R23 C512) (SOME R25 C2288) (SOME R268 (AND (SOME R202 C1181) C920)) C510)) (IMPLIES C514 (AND (SOME R21 C512) (SOME R25 C461) (SOME R268 (AND (SOME R202 C1181) C920)) C510)) (IMPLIES C515 (AND (SOME R23 C512) (SOME R25 C461) (SOME R268 (AND (SOME R202 C1181) C920)) C510)) (IMPLIES C1100 C1097) (IMPLIES C1411 C1410) (IMPLIES C1415 C1411) (IMPLIES C1416 C1411) (IMPLIES C1417 C1411) (IMPLIES C1418 C1411) (IMPLIES C1419 C1411) (IMPLIES C1420 C1411) (IMPLIES C1522 C1520) (IMPLIES C47 C5) (IMPLIES C51 C47) (IMPLIES C52 (AND (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C21))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C30))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C37))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C10))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C36))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C35))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R180 (NOT C100)) (NOT C7))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R180 (NOT C100)) (NOT C28))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R180 (NOT C100)) (NOT C32))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C21))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C30))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C37))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C10))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C36))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C35))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R180 (NOT C100)) (NOT C7))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R180 (NOT C100)) (NOT C28))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R180 (NOT C100)) (NOT C32))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C21))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C30))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C37))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C10))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C36))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C35))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C94)) (NOT C7))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C94)) (NOT C28))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C94)) (NOT C32))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C21))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C30))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C37))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C10))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C36))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C35))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C94)) (NOT C7))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C94)) (NOT C28))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C94)) (NOT C32))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R184 (NOT C98)) (NOT C21))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R184 (NOT C98)) (NOT C30))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R184 (NOT C98)) (NOT C37))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R184 (NOT C98)) (NOT C10))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R184 (NOT C98)) (NOT C36))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R184 (NOT C98)) (NOT C35))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C98)) (NOT C7))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C98)) (NOT C28))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C98)) (NOT C32))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C21))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C30))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C37))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C10))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C36))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C35))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C100)) (NOT C7))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C100)) (NOT C28))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C100)) (NOT C32))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C54))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C21))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C30))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C37))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C10))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C36))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C35))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C100)) (NOT C7))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C100)) (NOT C28))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C100)) (NOT C32))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C54))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C21))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C30))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C37))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C10))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C36))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C35))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C101)) (NOT C7))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C101)) (NOT C28))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C101)) (NOT C32))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C54))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C21))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C30))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C37))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C10))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C36))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C35))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C98)) (NOT C7))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C98)) (NOT C28))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C98)) (NOT C32))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C54))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C21))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C30))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C37))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C10))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C36))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C35))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C94)) (NOT C7))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C94)) (NOT C28))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C94)) (NOT C32))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C54))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C21))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C30))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C37))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C10))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C36))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C35))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C94)) (NOT C7))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C94)) (NOT C28))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C94)) (NOT C32))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C54))) (SOME R178 C101)) C51)) (IMPLIES C53 (AND (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C21))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C30))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C37))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C10))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C36))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R180 (NOT C100)) (NOT C35))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R180 (NOT C100)) (NOT C7))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R180 (NOT C100)) (NOT C28))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R180 (NOT C100)) (NOT C32))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C21))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C30))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C37))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C10))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C36))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R184 (NOT C94)) (NOT C35))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C94)) (NOT C7))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C94)) (NOT C28))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R184 (NOT C94)) (NOT C32))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C21))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C30))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C37))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C10))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C36))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C35))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C100)) (NOT C7))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C100)) (NOT C28))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C100)) (NOT C32))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C54))) (SOME R178 C100)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C21))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C30))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C37))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C10))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C36))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C35))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C100)) (NOT C7))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C100)) (NOT C28))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C100)) (NOT C32))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C100)) (NOT C54))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C21))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C30))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C37))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C10))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C36))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C35))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C101)) (NOT C7))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C101)) (NOT C28))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C101)) (NOT C32))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C54))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C21))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C30))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C37))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C10))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C36))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C35))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C101)) (NOT C7))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C101)) (NOT C28))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R178 (NOT C101)) (NOT C32))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R178 (NOT C101)) (NOT C54))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C21))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C30))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C37))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C10))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C36))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C35))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C98)) (NOT C7))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C98)) (NOT C28))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C98)) (NOT C32))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C54))) (SOME R182 C98)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C21))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C30))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C37))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C10))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C36))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C35))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C98)) (NOT C7))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C98)) (NOT C28))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C98)) (NOT C32))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R182 (NOT C98)) (NOT C54))) (SOME R178 C101)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C21))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C30))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C37))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C10))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C36))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C35))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C94)) (NOT C7))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C94)) (NOT C28))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R129 (NOT C37)) (ALL R182 (NOT C94)) (NOT C32))) (SOME R182 C94)) (OR (ALL R407 (OR (ALL R182 (NOT C94)) (NOT C54))) (SOME R182 C94)) C51)) (IMPLIES C1315 C1286) (IMPLIES C2248 C181) (IMPLIES C136 (AND C135 C19)) (IMPLIES C225 C224) (IMPLIES C1003 C1000) (IMPLIES C891 C870) (IMPLIES C618 C574) (IMPLIES C622 C618) (IMPLIES C623 C618) (IMPLIES C1200 C1127) (IMPLIES C707 (AND (SOME R58 (AND (SOME R242 (AND (SOME R202 C1216) C907)) (SOME R163 (AND (SOME R202 C1055) C868)) (SOME R19 C2372) C151)) (SOME R58 (AND (SOME R19 C2402) (SOME R242 (AND (SOME R202 C1217) C907)) (SOME R163 (AND (SOME R202 C1055) C868)) C151)) (SOME R314 C1217) C705)) (IMPLIES C1963 C1394) (IMPLIES C2000 C1963) (IMPLIES C2001 C1963) (IMPLIES C2002 C1963) (IMPLIES C2003 C1963) (IMPLIES C796 (AND (OR (SOME R91 C511) (ALL R98 (NOT C749))) C216)) (IMPLIES C2052 (AND (SOME R90 C2234) (SOME R24 (AND (SOME R282 (AND (SOME R202 C1157) C916)) C194)) (SOME R282 (AND (SOME R202 C1157) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1094) C873)) C864)) C300)) (IMPLIES C2177 C2052) (IMPLIES C2178 C2052) (IMPLIES C2179 C2052) (IMPLIES C2180 C2052) (IMPLIES C2181 (AND (SOME R90 (AND (SOME R98 C1399) C794)) C2052)) (IMPLIES C2182 (AND (SOME R90 (AND (SOME R98 C1399) C794)) C2052)) (IMPLIES C2183 (AND (SOME R90 (AND (SOME R98 C1399) C794)) C2052)) (IMPLIES C2184 C2052) (IMPLIES C2176 (AND (SOME R90 (AND (SOME R98 C1404) C794)) (SOME R90 (AND (SOME R98 C1402) C794)) (SOME R90 (AND (SOME R98 C1399) C794)) C2052)) (IMPLIES C333 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C153)) (IMPLIES C2141 C2093) (IMPLIES C1503 C1502) (IMPLIES C422 (AND (SOME R13 C415) C414)) (IMPLIES C2230 C2227) (IMPLIES C511 (AND (SOME R92 C803) (SOME R25 C2288) (SOME R268 (AND (SOME R202 C1181) C920)) C510)) (IMPLIES C1101 C1097) (IMPLIES C1412 C1411) (IMPLIES C1523 C1520) (IMPLIES C48 C47) (IMPLIES C892 C44) (IMPLIES C923 C892) (IMPLIES C905 C892) (IMPLIES C908 C905) (IMPLIES C911 C905) (IMPLIES C906 C905) (IMPLIES C909 C905) (IMPLIES C912 C892) (IMPLIES C907 C905) (IMPLIES C910 C905) (IMPLIES C1316 (AND C1290 C1286)) (IMPLIES C2249 C1387) (IMPLIES C137 C136) (IMPLIES C226 C224) (IMPLIES C619 C618) (IMPLIES C1201 C1200) (IMPLIES C1005 C1000) (IMPLIES C708 (AND (SOME R232 C75) C340)) (IMPLIES C710 (AND (SOME R62 C2374) (SOME R60 C2382) (SOME R312 C1206) C708)) (IMPLIES C1964 C1394) (IMPLIES C2004 C1964) (IMPLIES C2005 C1964) (IMPLIES C2006 C1964) (IMPLIES C797 (AND (OR (ALL R128 (OR (ALL R109 (NOT C1448)) (NOT C21))) (SOME R178 C100)) C216)) (IMPLIES C2053 (AND (SOME R24 (AND (SOME R282 (AND (SOME R202 C1144) C916)) C194)) (SOME R282 (AND (SOME R202 C1144) C916)) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (IMPLIES C2185 C2053) (IMPLIES C334 (AND C333 C157)) (IMPLIES C684 C334) (IMPLIES C685 C334) (IMPLIES C686 C334) (IMPLIES C687 C334) (IMPLIES C689 C334) (IMPLIES C694 C334) (IMPLIES C696 C334) (IMPLIES C697 C334) (IMPLIES C699 C334) (IMPLIES C700 C334) (IMPLIES C2508 (AND (SOME R232 C80) C334)) (IMPLIES C2509 (AND (SOME R232 C80) C334)) (IMPLIES C2511 (AND (SOME R232 C80) C334)) (IMPLIES C693 (AND (SOME R69 C2509) (SOME R232 C80) C334)) (IMPLIES C2510 (AND (SOME R69 C2508) (SOME R232 C80) C334)) (IMPLIES C2526 (AND (OR (SOME R69 C2508) (ALL R310 (NOT C1230))) (OR (SOME R69 C2508) (ALL R310 (NOT C1229))) (SOME R232 C79) C334)) (DEFINE-CONCEPT C2512 C2526) (IMPLIES C2518 (AND (OR (SOME R69 C2509) (ALL R310 (NOT C1230))) (OR (SOME R69 C2509) (ALL R310 (NOT C1229))) (SOME R232 C79) C334)) (IMPLIES C691 (AND (SOME R69 C2518) (SOME R232 C79) C334)) (IMPLIES C692 (AND (SOME R69 C2518) (SOME R232 C79) C334)) (IMPLIES C2513 (AND (SOME R69 C2512) (SOME R232 C79) C334)) (IMPLIES C2514 (AND (SOME R69 C2512) (SOME R232 C79) C334)) (IMPLIES C2515 (AND (SOME R69 C2512) (SOME R232 C79) C334)) (IMPLIES C695 (AND (SOME R69 C2515) (SOME R232 C79) C334)) (IMPLIES C698 (AND (SOME R77 C692) (SOME R232 C79) C334)) (IMPLIES C688 (AND (SOME R69 C695) (SOME R232 C79) C334)) (IMPLIES C690 (AND (SOME R69 C695) (SOME R232 C79) C334)) (IMPLIES C2530 (AND (SOME R69 C698) C334)) (DEFINE-CONCEPT C2529 C2530) (DEFINE-CONCEPT C2520 C2530) (IMPLIES C2521 (AND (SOME R69 C698) (SOME R232 C79) C334)) (IMPLIES C2522 (AND (SOME R69 C698) (SOME R232 C79) C334)) (IMPLIES C2516 (AND (SOME R69 C690) (SOME R232 C79) C334)) (IMPLIES C2528 (AND (SOME R69 C2522) C334)) (DEFINE-CONCEPT C2527 C2528) (DEFINE-CONCEPT C2519 C2528) (IMPLIES C2523 (AND (SOME R69 C2522) (SOME R232 C79) C334)) (IMPLIES C2524 (AND (SOME R69 C2522) (SOME R232 C79) C334)) (IMPLIES C2525 (AND (SOME R69 C2522) (SOME R232 C79) C334)) (IMPLIES C913 C892) (IMPLIES C916 C913) (IMPLIES C918 C913) (IMPLIES C919 C913) (IMPLIES C922 C913) (IMPLIES C917 C916) (IMPLIES C920 C919) (IMPLIES C921 C919) (IMPLIES C2142 C2107) (IMPLIES C893 C892) (IMPLIES C903 C893) (IMPLIES C904 C903) (IMPLIES C1504 C1502) (IMPLIES C423 (AND (SOME R13 C416) (SOME R232 C79) C414)) (IMPLIES C2231 C2208) (IMPLIES C1094 (AND (SOME R129 (AND (SOME R34 (AND (SOME R128 C1193) (SOME R122 (AND (SOME R271 C194) C914)) C772)) C1941)) C1093)) (IMPLIES C512 (AND (SOME R23 C511) (SOME R25 C2288) (SOME R268 (AND (SOME R202 C1181) C920)) (SOME R232 C79) C510)) (IMPLIES C1413 (AND (SOME R274 (AND (SOME R202 C1201) C918)) C1411)) (IMPLIES C1524 C1520) (IMPLIES C49 C48) (IMPLIES C1317 (AND C1290 C1286)) (IMPLIES C2250 C1387) (IMPLIES C138 C136) (IMPLIES C227 C224) (IMPLIES C914 (AND (OR (ALL R271 (NOT C175)) (ALL R202 (NOT C1197)) (SOME R178 C100)) C913)) (IMPLIES C620 C618) (IMPLIES C894 C893) (IMPLIES C896 C894) (IMPLIES C897 C894) (IMPLIES C898 C894) (IMPLIES C899 C894) (IMPLIES C900 C894) (IMPLIES C902 C894) (IMPLIES C1202 C1200) (IMPLIES C2517 (AND (OR (SOME R69 C2509) (ALL R310 (NOT C1230))) (OR (SOME R69 C2509) (ALL R310 (NOT C1229))) (SOME R232 C79) C334)) (IMPLIES C1006 C1000) (IMPLIES C709 (AND (SOME R62 C2373) (SOME R60 (AND (SOME R23 C603) C659)) (SOME R312 C1207) C708)) (IMPLIES C1965 C1394) (IMPLIES C2007 C1965) (IMPLIES C2008 C1965) (IMPLIES C798 C216) (IMPLIES C2054 C300) (IMPLIES C2186 C2054) (IMPLIES C335 (AND (SOME R284 (AND (SOME R202 C1136) C917)) (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C336 (AND C335 C157)) (IMPLIES C2535 C336) (IMPLIES C2143 C2108) (IMPLIES C1505 C1502) (IMPLIES C424 (AND (SOME R13 C380) (SOME R232 C80) C414)) (IMPLIES C513 (AND (SOME R23 C511) (SOME R25 C2288) (SOME R410 C62) (SOME R268 (AND (SOME R202 C1181) C920)) (SOME R232 C80) C510)) (IMPLIES C1103 C1102) (IMPLIES C1414 C1411) (IMPLIES C1525 C1519) (IMPLIES C50 C48) (IMPLIES C915 (AND (OR (ALL R273 (NOT C175)) (ALL R212 (NOT C1023)) (SOME R178 C100)) (OR (ALL R273 (NOT C175)) (ALL R212 (NOT C1024)) (SOME R178 C100)) C913)) (IMPLIES C1318 (AND C1290 C1286)) (IMPLIES C2251 C1387) (IMPLIES C895 (AND (OR (SOME R206 (AND (SOME R218 C239) C1038)) (ALL R293 (NOT C1915))) C894)) (IMPLIES C139 C136) (IMPLIES C228 C224) (IMPLIES C621 C618) (DEFINE-CONCEPT C2275 (AND (SOME R133 C1467) C7)) (IMPLIES C10 (AND (OR (ALL R190 (OR (ALL R407 (NOT C1931)) (NOT C53))) (ALL R190 (OR (ALL R203 (OR (ALL R369 (NOT C2336)) (NOT C875))) (NOT C1114))) C2343) (OR (ALL R190 (NOT C1908)) (SOME R178 C100)) (OR (ALL R190 (NOT C1909)) (SOME R178 C100)) (OR (ALL R190 (NOT C1907)) (ALL R190 (NOT C1909)) (ALL R190 (NOT C1901)) (SOME R178 C100)) (OR (ALL R180 (NOT C100)) (SOME R178 C100)) (OR (ALL R184 (NOT C94)) (SOME R182 C94)) C9)) (IMPLIES C2343 (AND (SOME R190 (AND (SOME R407 C1931) C53)) (SOME R190 (AND (SOME R203 (AND (SOME R369 C2336) C875)) C1114)) (SOME R180 C100) C10)) (DEFINE-CONCEPT C1788 (AND (SOME R178 C100) C10)) (DEFINE-CONCEPT C1789 (AND (SOME R180 C100) C10)) (DEFINE-CONCEPT C1903 (AND (SOME R190 C1901) C10)) (DEFINE-CONCEPT C2651 (AND (SOME R190 (AND (SOME R407 (AND (SOME R178 C100) C341)) C53)) C10)) (DEFINE-CONCEPT C2652 (AND (SOME R190 (AND (SOME R407 (AND (SOME R178 C100) C1761)) C53)) C10)) (DEFINE-CONCEPT C1874 (AND (SOME R190 C1872) C10)) (DEFINE-CONCEPT C1881 (AND (SOME R190 C1879) C10)) (DEFINE-CONCEPT C1886 (AND (SOME R190 C1883) C10)) (DEFINE-CONCEPT C1887 (AND (SOME R190 C1884) C10)) (DEFINE-CONCEPT C1892 (AND (SOME R190 C1889) C10)) (DEFINE-CONCEPT C1893 (AND (SOME R190 C1890) C10)) (DEFINE-CONCEPT C1898 (AND (SOME R190 C1895) C10)) (DEFINE-CONCEPT C2597 (AND (SOME R190 (AND (SOME R407 (AND (SOME R86 C460) C103)) C53)) C10)) (DEFINE-CONCEPT C2662 (AND (SOME R190 (AND (SOME R407 C1466) C53)) C10)) (DEFINE-CONCEPT C2593 (AND (SOME R190 (AND (SOME R407 (AND (SOME R86 C465) C103)) C53)) C10)) (DEFINE-CONCEPT C2594 (AND (SOME R190 (AND (SOME R407 (AND (SOME R86 C460) (SOME R86 C465) C103)) C53)) C10)) (DEFINE-CONCEPT C2653 (AND (SOME R190 (AND (SOME R407 (AND (SOME R354 (AND (SOME R204 C1016) C927)) (SOME R53 C333) C1796)) C53)) C10)) (DEFINE-CONCEPT C1862 (AND (SOME R190 C1860) C10)) (DEFINE-CONCEPT C1870 (AND (SOME R190 C1868) C10)) (DEFINE-CONCEPT C1866 (AND (SOME R190 C1864) C10)) (DEFINE-CONCEPT C2598 (AND (SOME R190 (AND (SOME R407 (AND (SOME R133 C1665) C1668)) C53)) C10)) (DEFINE-CONCEPT C2595 (AND (SOME R190 (AND (SOME R407 (AND (SOME R396 (AND (SOME R202 C1072) C889)) (SOME R86 C460) (SOME R86 C465) C103)) C53)) C10)) (DEFINE-CONCEPT C2596 (AND (SOME R190 (AND (SOME R407 (AND (SOME R396 (AND (SOME R202 C1074) C889)) (SOME R86 C460) (SOME R86 C465) C103)) C53)) C10)) (DEFINE-CONCEPT C2599 (AND (SOME R190 (AND (SOME R407 (AND (SOME R133 C1665) (SOME R396 (AND (SOME R202 C1072) C889)) C1668)) C53)) C10)) (DEFINE-CONCEPT C2347 (AND (SOME R190 (AND (SOME R407 C2345) C53)) (SOME R190 (AND (SOME R203 (AND (SOME R369 C2342) C875)) C1114)) C10)) (DEFINE-CONCEPT C2684 (AND (SOME R190 (AND (SOME R407 (AND (SOME R139 C2683) C1780)) C53)) C10)) (DEFINE-CONCEPT C1910 (AND (SOME R190 C1908) C10)) (DEFINE-CONCEPT C1911 (AND (SOME R190 C1909) C10)) (DEFINE-CONCEPT C103 (AND (SOME R178 C100) C4)) (DEFINE-CONCEPT C2694 (AND (SOME R86 C504) C103)) (DEFINE-CONCEPT C2669 (AND (SOME R133 C1466) (SOME R86 C460) (SOME R86 C461) C103)) (DEFINE-CONCEPT C1912 (AND (SOME R190 C1907) (SOME R190 C1909) (SOME R190 C1901) C10)) (DEFINE-CONCEPT C104 (AND (SOME R182 C94) C4)) (DEFINE-CONCEPT C2611 (AND (SOME R190 (AND (SOME R407 C2610) C53)) C10)) (DEFINE-CONCEPT C2612 (AND (SOME R190 (AND (SOME R407 (AND (SOME R370 C1794) C824)) C53)) C10)) (DEFINE-CONCEPT C2613 (AND (SOME R190 (AND (SOME R407 (AND (SOME R272 (AND (SOME R204 C1170) C915)) C460)) C53)) C10)) (DEFINE-CONCEPT C1728 (AND (SOME R284 (AND (SOME R202 C1145) C917)) C20)) (DEFINE-CONCEPT C1704 (AND (SOME R166 C1272) C20)) (DEFINE-CONCEPT C1779 (AND (SOME R29 C418) C1704)) (DEFINE-CONCEPT C1827 (AND (SOME R29 C173) C1704)) (DEFINE-CONCEPT C1828 (AND (SOME R29 C194) C1704)) (DEFINE-CONCEPT C2443 (AND (SOME R151 C2440) C164)) (DEFINE-CONCEPT C2349 (AND (SOME R129 (AND (SOME R154 C111) C755)) C1534)) (DEFINE-CONCEPT C1904 (AND (SOME R272 (AND (SOME R212 C1024) C915)) C175)) (DEFINE-CONCEPT C1905 (AND (SOME R272 (AND (SOME R212 C1023) C915)) C175)) (DEFINE-CONCEPT C1906 (AND (SOME R270 (AND (SOME R202 C1197) C914)) C175)) (DEFINE-CONCEPT C1717 (AND (SOME R268 (AND (SOME R202 C1177) C920)) C20)) (DEFINE-CONCEPT C1718 (AND (SOME R268 (AND (SOME R202 C1178) C920)) C20)) (DEFINE-CONCEPT C1719 (AND (SOME R268 (AND (SOME R202 C1179) C920)) C20)) (DEFINE-CONCEPT C1720 (AND (SOME R268 (AND (SOME R202 C1180) C920)) C20)) (DEFINE-CONCEPT C1721 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C20)) (DEFINE-CONCEPT C1799 (AND (SOME R168 C1274) C308)) (DEFINE-CONCEPT C1801 (AND (SOME R168 C1273) C308)) (DEFINE-CONCEPT C1829 (AND (SOME R168 C1276) C308)) (DEFINE-CONCEPT C1800 (AND (SOME R344 (AND (SOME R202 C1000) C947)) C1799)) (DEFINE-CONCEPT C1942 (AND (SOME R30 C1826) (SOME R29 C173) C1704)) (DEFINE-CONCEPT C2712 (AND (SOME R160 C1454) C55)) (DEFINE-CONCEPT C1943 (AND (SOME R30 C1383) (SOME R29 C173) C1704)) (DEFINE-CONCEPT C1836 (AND (SOME R190 C1834) C10)) (DEFINE-CONCEPT C1700 (AND (SOME R348 C1697) C29)) (DEFINE-CONCEPT C1701 (AND (SOME R348 C1698) C29)) (DEFINE-CONCEPT C2276 (AND (SOME R133 C1467) C29)) (DEFINE-CONCEPT C1702 (AND (SOME R348 C1699) C29)) (DEFINE-CONCEPT C1736 (AND (SOME R96 C794) C29)) (DEFINE-CONCEPT C1703 (AND (SOME R166 C1262) C29)) (DEFINE-CONCEPT C1917 (AND (SOME R173 (AND (SOME R129 C772) (SOME R203 (AND (SOME R201 C67) C892)) C1122)) C118)) (DEFINE-CONCEPT C2319 (AND (SOME R110 C511) C202)) (DEFINE-CONCEPT C2714 (AND (SOME R160 C1430) C55)) (DEFINE-CONCEPT C1786 (AND (SOME R178 C100) C30)) (DEFINE-CONCEPT C2549 (AND (SOME R29 C331) C717)) (IMPLIES C1935 (AND (SOME R129 C1934) (SOME R166 C1280) C720)) (IMPLIES C720 (AND (OR (ALL R166 (NOT C1280)) C1935) C203)) (DEFINE-CONCEPT C1796 (AND (SOME R348 (AND (SOME R202 C1254) C935)) C720)) (DEFINE-CONCEPT C2299 (AND (SOME R29 (AND (SOME R29 C518) C1705)) C718)) (DEFINE-CONCEPT C2301 (AND (SOME R29 (AND (SOME R29 C522) C1705)) C718)) (DEFINE-CONCEPT C2352 (AND (SOME R29 C21) C723)) (DEFINE-CONCEPT C1776 (AND (SOME R348 (AND (SOME R202 C1254) C935)) C30)) (DEFINE-CONCEPT C2351 (AND (SOME R29 C2350) C723)) (DEFINE-CONCEPT C1740 (AND (SOME R129 C1464) C720)) (DEFINE-CONCEPT C1797 (AND (SOME R129 C843) (SOME R348 (AND (SOME R202 C1253) C935)) C720)) (DEFINE-CONCEPT C1787 (AND (SOME R180 C100) C30)) (DEFINE-CONCEPT C1924 (AND (SOME R166 C1280) C749)) (DEFINE-CONCEPT C2307 (AND (SOME R46 C194) C749)) (DEFINE-CONCEPT C2308 (AND (SOME R46 C175) C749)) (DEFINE-CONCEPT C2310 (AND (SOME R44 C1352) C749)) (DEFINE-CONCEPT C2309 (AND (SOME R44 C750) C749)) (DEFINE-CONCEPT C2311 (AND (SOME R44 C1377) C749)) (DEFINE-CONCEPT C1926 (AND (SOME R129 C1925) C1924)) (DEFINE-CONCEPT C1929 (AND (SOME R129 C1928) C1924)) (DEFINE-CONCEPT C2300 (AND (SOME R29 (AND (SOME R29 C516) C1705)) C718)) (DEFINE-CONCEPT C2320 (AND (SOME R110 C516) C202)) (DEFINE-CONCEPT C1661 (AND (SOME R86 C481) C103)) (DEFINE-CONCEPT C1826 (AND (SOME R30 C1349) (SOME R30 C1353) C31)) (DEFINE-CONCEPT C1706 (AND (SOME R166 C1265) C31)) (DEFINE-CONCEPT C1707 (AND (SOME R166 C1264) C31)) (DEFINE-CONCEPT C1370 C1369) (DEFINE-CONCEPT C2348 (AND (SOME R44 C1305) (SOME R44 C1299) C1331)) (DEFINE-CONCEPT C1334 C1333) (DEFINE-CONCEPT C1708 (AND (SOME R166 C1268) C31)) (DEFINE-CONCEPT C1360 C1359) (DEFINE-CONCEPT C1336 C1335) (DEFINE-CONCEPT C1709 (AND (SOME R166 C1267) C31)) (DEFINE-CONCEPT C1832 (AND (SOME R30 C1352) (SOME R30 C1335) C1289)) (DEFINE-CONCEPT C2274 (AND (SOME R133 C1467) C1709)) (DEFINE-CONCEPT C1364 C1363) (DEFINE-CONCEPT C1366 C1365) (DEFINE-CONCEPT C2321 (AND (SOME R110 C518) C202)) (IMPLIES C1947 (AND (SOME R28 C1942) (SOME R25 C1945) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C194)) (IMPLIES C1946 (AND (SOME R28 C1943) (SOME R25 C1944) (SOME R96 (AND (SOME R366 (AND (SOME R202 C1094) C873)) C864)) C194)) (IMPLIES C194 (AND (OR (ALL R96 (OR (ALL R366 (OR (ALL R202 (NOT C1095)) (NOT C873))) (NOT C864))) C1947) (OR (ALL R96 (OR (ALL R366 (OR (ALL R202 (NOT C1094)) (NOT C873))) (NOT C864))) C1946) (SOME R25 C300) C193)) (DEFINE-CONCEPT C2238 (AND (SOME R276 (AND (SOME R202 C1189) C921)) C194)) (DEFINE-CONCEPT C1662 (AND (SOME R86 C469) C103)) (DEFINE-CONCEPT C1840 (AND (SOME R190 C1838) C10)) (DEFINE-CONCEPT C2277 (AND (SOME R133 C1467) C32)) (DEFINE-CONCEPT C1948 (AND (SOME R96 C864) C194)) (DEFINE-CONCEPT C1663 (AND (SOME R86 C482) C103)) (DEFINE-CONCEPT C1664 (AND (SOME R86 C497) C103)) (DEFINE-CONCEPT C2240 (AND (SOME R128 C197) C34)) (DEFINE-CONCEPT C1950 (AND (SOME R173 (AND (SOME R129 C1941) C1093)) C118)) (DEFINE-CONCEPT C1665 (AND (SOME R86 C465) C103)) (DEFINE-CONCEPT C1785 (AND (SOME R180 C100) C35)) (DEFINE-CONCEPT C1784 (AND (SOME R178 C100) C35)) (IMPLIES C1941 (AND (SOME R34 (AND (SOME R94 C194) C864)) (SOME R34 (AND (SOME R122 (AND (SOME R271 C194) C914)) C772)) (SOME R122 (AND (SOME R367 (AND (SOME R94 C194) C864)) C873)) C767)) (IMPLIES C767 (AND (OR (ALL R122 (OR (ALL R367 (OR (ALL R94 (NOT C194)) (NOT C864))) (NOT C873))) C1941) (OR (ALL R34 (OR (ALL R128 (NOT C1655)) (NOT C781))) (SOME R128 C1655)) C756)) (DEFINE-CONCEPT C1835 (AND (SOME R122 C1833) C767)) (DEFINE-CONCEPT C1873 (AND (SOME R122 C1871) C767)) (DEFINE-CONCEPT C1877 (AND (SOME R122 C1875) C767)) (DEFINE-CONCEPT C1920 (AND (SOME R122 (AND (SOME R173 (AND (SOME R405 C1394) C53)) (SOME R373 C300) C874)) C768)) (DEFINE-CONCEPT C1861 (AND (SOME R122 C1859) C767)) (DEFINE-CONCEPT C1839 (AND (SOME R122 C1837) C767)) (DEFINE-CONCEPT C2624 (AND (SOME R94 C703) C759)) (DEFINE-CONCEPT C2439 (AND (SOME R34 C2437) C759)) (DEFINE-CONCEPT C2531 (AND (SOME R94 C460) C759)) (DEFINE-CONCEPT C2440 (AND (SOME R34 C2438) C759)) (DEFINE-CONCEPT C1830 (AND (SOME R94 C461) C1597)) (IMPLIES C781 (AND (OR (ALL R126 (NOT C720)) C1934) (OR (ALL R126 (NOT C749)) C1923) C780 C756)) (IMPLIES C1934 (AND (SOME R126 C1935) (SOME R126 C720) C781)) (IMPLIES C1923 (AND (OR (SOME R34 (AND (SOME R94 (AND (SOME R53 C518) C749)) C1591)) (ALL R152 (NOT C1527))) (SOME R126 C1924) (SOME R126 C749) C781)) (DEFINE-CONCEPT C1925 (AND (SOME R152 C1520) C1923)) (DEFINE-CONCEPT C1928 (AND (SOME R34 (AND (SOME R104 C394) (SOME R94 C749) C803)) C1923)) (DEFINE-CONCEPT C1936 (AND (SOME R94 C333) (SOME R150 C1527) C1934)) (DEFINE-CONCEPT C1885 (AND (SOME R122 C1882) C767)) (DEFINE-CONCEPT C2442 (AND (SOME R150 C1544) C1647)) (DEFINE-CONCEPT C1831 (AND (SOME R94 C461) C1609)) (DEFINE-CONCEPT C1869 (AND (SOME R122 C1867) C767)) (DEFINE-CONCEPT C1880 (AND (SOME R122 C1878) C767)) (DEFINE-CONCEPT C2431 (AND (SOME R128 (AND (SOME R338 (AND (SOME R202 C975) C944)) C66)) (SOME R126 (AND (SOME R338 C944) C66)) C765)) (DEFINE-CONCEPT C2434 (AND (SOME R128 (AND (SOME R338 (AND (SOME R202 C973) C944)) C66)) C765)) (DEFINE-CONCEPT C2435 (AND (SOME R128 (AND (SOME R338 (AND (SOME R202 C972) C944)) C66)) C765)) (DEFINE-CONCEPT C2436 (AND (SOME R128 (AND (SOME R338 (AND (SOME R202 C974) C944)) C66)) C765)) (DEFINE-CONCEPT C2441 (AND (SOME R94 C1731) C1642)) (DEFINE-CONCEPT C1891 (AND (SOME R122 C1888) C767)) (IMPLIES C1930 (AND (SOME R122 (AND (SOME R407 (AND (SOME R47 C749) C194)) C51)) (SOME R34 C1923) (SOME R34 (AND (SOME R94 C1924) C773)) (SOME R98 C1924) C773)) (IMPLIES C773 (AND (OR (ALL R98 (NOT C1924)) C1930) C771)) (DEFINE-CONCEPT C1931 (AND (SOME R128 (AND (SOME R407 C300) C52)) C1930)) (DEFINE-CONCEPT C2533 (AND (SOME R94 C460) C1561)) (DEFINE-CONCEPT C2532 (AND (SOME R94 C325) C1561)) (DEFINE-CONCEPT C2625 (AND (SOME R94 C703) C1561)) (DEFINE-CONCEPT C1902 (AND (SOME R122 C1899) C767)) (DEFINE-CONCEPT C1937 (AND (SOME R94 C331) (SOME R150 C1527) C1934)) (DEFINE-CONCEPT C2432 (AND (SOME R128 (AND (SOME R338 (AND (SOME R202 C970) C944)) C66)) C765)) (DEFINE-CONCEPT C1897 (AND (SOME R122 C1894) C767)) (DEFINE-CONCEPT C1932 (AND (SOME R128 (AND (SOME R407 C300) C53)) C1930)) (DEFINE-CONCEPT C1843 (AND (SOME R122 C1841) C767)) (IMPLIES C2438 (AND (SOME R98 C563) (SOME R150 C1502) C1648)) (IMPLIES C1648 (AND (OR (ALL R150 (NOT C1502)) C2438) C1647)) (DEFINE-CONCEPT C2437 (AND (SOME R150 C1490) C1648)) (DEFINE-CONCEPT C1918 (AND (SOME R152 C1492) C772)) (DEFINE-CONCEPT C1919 (AND (SOME R152 C1493) C772)) (DEFINE-CONCEPT C1927 (AND (SOME R152 C1527) C1923)) (DEFINE-CONCEPT C1865 (AND (SOME R122 C1863) C767)) (IMPLIES C1938 (AND (SOME R122 (AND (SOME R407 (AND (SOME R43 C720) C194)) C51)) (SOME R34 C1934) (SOME R34 (AND (SOME R94 C1935) C773)) C770)) (IMPLIES C770 (AND (OR (ALL R34 (OR (ALL R94 (NOT C1935)) (NOT C773))) C1938) C768)) (DEFINE-CONCEPT C1939 (AND (SOME R128 (AND (SOME R407 C300) C52)) C1938)) (DEFINE-CONCEPT C1940 (AND (SOME R128 (AND (SOME R407 C300) C53)) C1938)) (DEFINE-CONCEPT C1933 (AND (SOME R34 C1920) (SOME R34 C1930) C770)) (DEFINE-CONCEPT C2433 (AND (SOME R128 (AND (SOME R338 (AND (SOME R202 C971) C944)) C66)) C765)) (DEFINE-CONCEPT C1914 (AND (SOME R34 (AND (SOME R386 (AND (SOME R206 C1679) C885)) (SOME R94 (AND (SOME R47 C1796) C175)) C805)) C767)) (DEFINE-CONCEPT C1951 (AND (SOME R173 (AND (SOME R129 (AND (SOME R34 (AND (SOME R128 C1193) (SOME R122 (AND (SOME R271 C194) C914)) C772)) C1941)) C1094)) C118)) (DEFINE-CONCEPT C1666 (AND (SOME R86 C461) C103)) (DEFINE-CONCEPT C2668 (AND (SOME R134 C1466) C1666)) (DEFINE-CONCEPT C1782 (AND (SOME R178 C100) C36)) (DEFINE-CONCEPT C1783 (AND (SOME R180 C100) C36)) (DEFINE-CONCEPT C2685 (AND (SOME R194 C2674) (SOME R139 C2674) C853)) (DEFINE-CONCEPT C1952 (AND (SOME R173 (AND (SOME R129 (AND (SOME R34 (AND (SOME R128 C1192) (SOME R122 (AND (SOME R271 C194) C914)) C772)) C1941)) C1095)) C118)) (DEFINE-CONCEPT C1667 (AND (SOME R86 C463) C103)) (DEFINE-CONCEPT C1781 (AND (SOME R180 C100) C37)) (DEFINE-CONCEPT C2701 (AND (SOME R128 C1445) C37)) (DEFINE-CONCEPT C2700 C2701) (DEFINE-CONCEPT C2689 (AND (SOME R128 C1452) C37)) (DEFINE-CONCEPT C2701 (AND (SOME R128 C1445) C37)) (DEFINE-CONCEPT C2690 (AND (SOME R128 C1440) C37)) (DEFINE-CONCEPT C1742 (AND (SOME R128 C1437) C37)) (DEFINE-CONCEPT C2600 (AND (SOME R94 C1809) C1742)) (DEFINE-CONCEPT C2601 (AND (SOME R98 C2554) C1742)) (DEFINE-CONCEPT C2602 (AND (SOME R98 C2556) C1742)) (DEFINE-CONCEPT C2323 (AND (SOME R110 C461) C1742)) (DEFINE-CONCEPT C2325 (AND (SOME R134 C219) C2323)) (DEFINE-CONCEPT C2326 (AND (SOME R146 C1709) C2323)) (DEFINE-CONCEPT C2713 (AND (SOME R128 C2712) C37)) (DEFINE-CONCEPT C2691 (AND (SOME R128 C1439) C37)) (DEFINE-CONCEPT C2647 (AND (SOME R396 (AND (SOME R202 C1072) C889)) C2545)) (DEFINE-CONCEPT C2603 (AND (SOME R98 C2558) C1742)) (DEFINE-CONCEPT C1743 (AND (SOME R128 C1441) C37)) (DEFINE-CONCEPT C2703 (AND (SOME R128 C2702) C37)) (DEFINE-CONCEPT C2692 (AND (SOME R128 C1451) C37)) (DEFINE-CONCEPT C2648 (AND (SOME R396 (AND (SOME R202 C1073) C889)) C2545)) (DEFINE-CONCEPT C2604 (AND (SOME R98 C2553) C1742)) (DEFINE-CONCEPT C2715 (AND (SOME R128 C2714) C37)) (DEFINE-CONCEPT C2693 (AND (SOME R128 C1438) C37)) (DEFINE-CONCEPT C2649 (AND (SOME R134 C1462) C2545)) (DEFINE-CONCEPT C2605 (AND (SOME R98 C2555) C1742)) (DEFINE-CONCEPT C2716 (AND (SOME R128 C1427) C37)) (DEFINE-CONCEPT C2650 (AND (SOME R134 (AND (SOME R146 C300) C1462)) C2545)) (DEFINE-CONCEPT C2606 (AND (SOME R98 C2557) C1742)) (DEFINE-CONCEPT C1735 (AND (SOME R128 C1442) C37)) (DEFINE-CONCEPT C2622 (AND (SOME R98 C1761) C1735)) (DEFINE-CONCEPT C1738 (AND (SOME R128 C1443) C1735)) (DEFINE-CONCEPT C1739 (AND (SOME R128 C1459) C1735)) (DEFINE-CONCEPT C2623 (AND (SOME R98 C1761) C1739)) (DEFINE-CONCEPT C1780 (AND (SOME R178 C100) C37)) (DEFINE-CONCEPT C2687 (AND (SOME R128 C2686) C1780)) (DEFINE-CONCEPT C2688 (AND (SOME R94 C665) C2687)) (DEFINE-CONCEPT C1953 (AND (SOME R128 (AND (SOME R90 (AND (SOME R368 (AND (SOME R202 C1115) C875)) C34)) C300)) C33)) (DEFINE-CONCEPT C1668 (AND (SOME R86 C460) C103)) (DEFINE-CONCEPT C2667 (AND (SOME R134 C1466) C1668)) (DEFINE-CONCEPT C2670 (AND (SOME R139 C1465) C1668)) (DEFINE-CONCEPT C2659 (AND (SOME R138 C833) C1668)) (DEFINE-CONCEPT C2671 (AND (SOME R139 (AND (SOME R396 (AND (SOME R202 C1072) C889)) C1465)) C1668)) (DEFINE-CONCEPT C2672 (AND (SOME R139 (AND (SOME R396 (AND (SOME R202 C1074) C889)) C1465)) C1668)) (DEFINE-CONCEPT C1846 (AND (SOME R122 C1844) C767)) (DEFINE-CONCEPT C2610 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C824)) (DEFINE-CONCEPT C2430 (AND (SOME R98 C720) C843)) (DEFINE-CONCEPT C2626 (AND (SOME R141 C2531) C2610)) (DEFINE-CONCEPT C2628 (AND (SOME R141 C2533) C2610)) (DEFINE-CONCEPT C2655 (AND (SOME R138 C2654) C2610)) (DEFINE-CONCEPT C2627 (AND (SOME R141 C2541) C2610)) (DEFINE-CONCEPT C2629 (AND (SOME R141 C2625) C2610)) (DEFINE-CONCEPT C2656 (AND (SOME R93 C2536) C2610)) (DEFINE-CONCEPT C2657 (AND (SOME R93 C2537) C2610)) (DEFINE-CONCEPT C2658 (AND (SOME R129 C2656) C2657)) (DEFINE-CONCEPT C2634 (AND (SOME R190 (AND (SOME R407 (AND (SOME R178 C100) C2539)) C53)) C10)) (DEFINE-CONCEPT C2708 (AND (SOME R93 C501) (SOME R368 (AND (SOME R202 C1115) C875)) C800)) (DEFINE-CONCEPT C2709 (AND (SOME R93 C501) (SOME R368 (AND (SOME R202 C1115) C875)) (SOME R178 C100) C800)) (DEFINE-CONCEPT C2717 (AND (SOME R178 C100) C801)) (DEFINE-CONCEPT C2534 (AND (SOME R98 C1796) C786)) (IMPLIES C2315 (AND (OR (ALL R104 (NOT C518)) (ALL R102 (NOT C200)) C2316) (SOME R35 C2314) (SOME R93 C511) (SOME R98 C749) C803)) (IMPLIES C2316 (AND (SOME R104 C518) (SOME R102 C200) (SOME R398 (AND (SOME R202 C1083) C890)) C2315)) (IMPLIES C803 (AND (OR (ALL R93 (NOT C511)) (ALL R98 (NOT C749)) C2315) (OR (SOME R104 C393) (ALL R102 (NOT C497)) (ALL R98 (NOT C1386))) (OR (SOME R102 C173) (ALL R104 (NOT C720)) (ALL R98 (NOT C1352))) (OR (SOME R35 C1467) (ALL R104 (NOT C720)) (ALL R102 (NOT C181)) (ALL R98 (NOT C1352)) (ALL R366 (OR (ALL R202 (NOT C1095)) (NOT C873)))) (OR (SOME R128 C1834) (ALL R104 (NOT C720)) (ALL R102 (NOT C181)) (ALL R98 (NOT C1352)) (ALL R366 (OR (ALL R202 (NOT C1095)) (NOT C873)))) (OR (ALL R93 (NOT C511)) (SOME R98 C749)) (OR (SOME R35 C839) (ALL R93 (NOT C483))) C216)) (DEFINE-CONCEPT C2241 (AND (SOME R102 C21) (SOME R94 C1386) C803)) (DEFINE-CONCEPT C2272 (AND (SOME R102 C181) (SOME R94 C29) C803)) (DEFINE-CONCEPT C2273 (AND (SOME R104 C720) (SOME R102 C181) (SOME R98 C1352) C803)) (DEFINE-CONCEPT C2282 (AND (SOME R134 (AND (SOME R372 (AND (SOME R173 (AND (SOME R405 C1357) C53)) (SOME R202 C1107) C874)) C181)) (SOME R104 C720) (SOME R102 C181) (SOME R98 C1352) (SOME R366 (AND (SOME R202 C1095) C873)) C803)) (DEFINE-CONCEPT C2283 (AND (SOME R134 (AND (SOME R404 C52) C1357)) (SOME R104 C720) (SOME R102 C181) (SOME R98 C1352) (SOME R366 (AND (SOME R202 C1095) C873)) C803)) (DEFINE-CONCEPT C1913 (AND (SOME R94 (AND (SOME R47 C1796) C175)) C805)) (DEFINE-CONCEPT C2589 (AND (SOME R93 C1761) (SOME R366 (AND (SOME R202 C1095) C873)) C806)) (DEFINE-CONCEPT C2590 (AND (SOME R93 C2587) (SOME R366 (AND (SOME R202 C1095) C873)) C806)) (DEFINE-CONCEPT C2271 (AND (SOME R98 C1352) C803)) (DEFINE-CONCEPT C2284 (AND (SOME R104 C720) (SOME R102 C181) (SOME R98 C1352) (SOME R366 (AND (SOME R202 C1095) C873)) C803)) (DEFINE-CONCEPT C2697 (AND (SOME R93 C483) C803)) (DEFINE-CONCEPT C2591 (AND (SOME R93 C2588) (SOME R366 (AND (SOME R202 C1095) C873)) C806)) (DEFINE-CONCEPT C2705 (AND (SOME R368 (AND (SOME R202 C1115) C875)) C2697)) (DEFINE-CONCEPT C2723 (AND (SOME R29 (AND (SOME R29 C497) C1705)) C718)) (DEFINE-CONCEPT C1954 (AND (SOME R128 (AND (SOME R332 (AND (SOME R202 C952) C939)) C300)) C33)) (DEFINE-CONCEPT C1669 (AND (SOME R86 C460) (SOME R86 C465) C103)) (DEFINE-CONCEPT C2289 (AND (SOME R330 C71) C2288)) (DEFINE-CONCEPT C2290 (AND (SOME R330 C72) C2288)) (DEFINE-CONCEPT C1955 (AND (SOME R131 (AND (SOME R91 C1406) (SOME R366 (AND (SOME R202 C1095) C873)) C862)) C1394)) (DEFINE-CONCEPT C2741 (AND (SOME R110 C2719) C1464)) (DEFINE-CONCEPT C2740 C2741) (DEFINE-CONCEPT C2741 C2740) (DEFINE-CONCEPT C1670 (AND (SOME R146 C300) C1462)) (DEFINE-CONCEPT C2742 (AND (SOME R110 C2720) C1464)) (DEFINE-CONCEPT C2674 (AND (SOME R98 C1761) C1465)) (DEFINE-CONCEPT C2682 (AND (SOME R98 (AND (SOME R29 (AND (SOME R29 C2559) C2563)) C713)) C1465)) (DEFINE-CONCEPT C1741 (AND (SOME R128 C1436) C1465)) (DEFINE-CONCEPT C2676 (AND (SOME R98 C1761) C1741)) (DEFINE-CONCEPT C2683 (AND (SOME R392 (AND (SOME R202 C1087) C888)) C2676)) (DEFINE-CONCEPT C2324 (AND (SOME R135 C2323) C1462)) (DEFINE-CONCEPT C2327 (AND (SOME R146 C300) C2324)) (DEFINE-CONCEPT C2328 (AND (SOME R146 C2044) C2324)) (DEFINE-CONCEPT C2330 (AND (SOME R110 C515) C1742)) (DEFINE-CONCEPT C2663 (AND (SOME R136 C1434) C1466)) (DEFINE-CONCEPT C2285 (AND (SOME R34 (AND (SOME R134 (AND (SOME R372 (AND (SOME R173 (AND (SOME R405 C1357) C53)) (SOME R202 C1107) C874)) C181)) (SOME R104 C720) (SOME R102 C181) (SOME R98 C1352) (SOME R366 (AND (SOME R202 C1095) C873)) C803)) C1467)) (DEFINE-CONCEPT C2286 (AND (SOME R34 (AND (SOME R134 (AND (SOME R404 C52) C1357)) (SOME R104 C720) (SOME R102 C181) (SOME R98 C1352) (SOME R366 (AND (SOME R202 C1095) C873)) C803)) C1467)) (DEFINE-CONCEPT C2666 (AND (SOME R133 C103) C1466)) (DEFINE-CONCEPT C2664 (AND (SOME R396 (AND (SOME R202 C1072) C889)) C1466)) (DEFINE-CONCEPT C2665 (AND (SOME R396 (AND (SOME R202 C1074) C889)) C1466)) (DEFINE-CONCEPT C2287 (AND (SOME R364 (AND (SOME R202 C1112) C879)) C1467)) (DEFINE-CONCEPT C1956 (AND (SOME R131 (AND (SOME R91 C1406) (SOME R366 (AND (SOME R202 C1094) C873)) C862)) C1394)) (DEFINE-CONCEPT C1671 (AND (SOME R146 C301) C1462)) (DEFINE-CONCEPT C1849 (AND (SOME R122 C1847) C767)) (DEFINE-CONCEPT C2242 (AND (SOME R368 (AND (SOME R202 C1114) C875)) C2241)) (DEFINE-CONCEPT C2331 (AND (SOME R110 C518) C1742)) (DEFINE-CONCEPT C2637 (AND (SOME R98 C2539) C1738)) (DEFINE-CONCEPT C1957 (AND (SOME R90 (AND (SOME R128 (AND (SOME R90 (AND (SOME R368 (AND (SOME R202 C1115) C875)) C34)) C300)) C33)) C1394)) (IMPLIES C1672 (AND (SOME R170 C1283) (SOME R147 C1462) C68)) (IMPLIES C68 (AND (OR (ALL R147 (NOT C1462)) C1672) C67 C66)) (DEFINE-CONCEPT C2236 (AND (SOME R282 (AND (SOME R202 C1157) C916)) C300)) (DEFINE-CONCEPT C1949 (AND (SOME R96 C864) C300)) (DEFINE-CONCEPT C2237 (AND (SOME R282 (AND (SOME R202 C1164) C916)) C300)) (DEFINE-CONCEPT C2239 (AND (SOME R276 (AND (SOME R202 C1189) C921)) C300)) (DEFINE-CONCEPT C1944 (AND (SOME R96 (AND (SOME R366 (AND (SOME R202 C1094) C873)) C864)) C300)) (DEFINE-CONCEPT C1945 (AND (SOME R96 (AND (SOME R366 (AND (SOME R202 C1095) C873)) C864)) C300)) (DEFINE-CONCEPT C2082 C2073) (DEFINE-CONCEPT C2083 C2071) (DEFINE-CONCEPT C1850 (AND (SOME R190 C1848) C10)) (DEFINE-CONCEPT C2234 (AND (SOME R360 (AND (SOME R202 C1098) C877)) C861)) (DEFINE-CONCEPT C2233 (AND (SOME R360 (AND (SOME R202 C1101) C877)) C861)) (DEFINE-CONCEPT C2235 (AND (SOME R360 (AND (SOME R202 C1099) C877)) C861)) (DEFINE-CONCEPT C2243 (AND (SOME R398 (AND (SOME R202 C1084) C890)) (SOME R368 (AND (SOME R202 C1114) C875)) C2241)) (DEFINE-CONCEPT C2332 (AND (SOME R134 C1462) C2331)) (DEFINE-CONCEPT C2638 (AND (SOME R94 C2539) C1735)) (DEFINE-CONCEPT C1958 (AND (SOME R90 (AND (SOME R128 (AND (SOME R332 (AND (SOME R202 C952) C939)) C300)) C33)) C1394)) (DEFINE-CONCEPT C1762 (AND (SOME R173 (AND (SOME R129 C767) C45)) C118)) (DEFINE-CONCEPT C2244 (AND (SOME R398 (AND (SOME R202 C1083) C890)) (SOME R368 (AND (SOME R202 C1114) C875)) C2241)) (DEFINE-CONCEPT C2333 (AND (SOME R134 C219) C2331)) (DEFINE-CONCEPT C1790 (AND (SOME R202 C1106) C874)) (DEFINE-CONCEPT C1791 (AND (SOME R202 C1107) C874)) (DEFINE-CONCEPT C2364 (AND (SOME R383 (AND (SOME R94 C563) C807)) C882)) (DEFINE-CONCEPT C2279 (AND (SOME R173 (AND (SOME R405 C1357) C53)) C874)) (DEFINE-CONCEPT C1698 (AND (SOME R202 C1253) C935)) (DEFINE-CONCEPT C1699 (AND (SOME R202 C1255) C935)) (DEFINE-CONCEPT C2280 (AND (SOME R173 (AND (SOME R405 C1357) C53)) (SOME R202 C1107) C874)) (IMPLIES C936 (AND (OR (ALL R353 (OR (ALL R45 (NOT C1796)) (NOT C1352))) C1833) (OR (ALL R353 (OR (ALL R45 (NOT C1796)) (NOT C1336))) C1899) C924)) (IMPLIES C1899 (AND (OR (ALL R204 (NOT C1016)) (SOME R178 C100)) (OR (ALL R204 (NOT C1017)) (SOME R178 C100)) (SOME R353 (AND (SOME R45 C1796) C1336)) C936)) (IMPLIES C1834 (AND (SOME R142 C1462) (SOME R204 C1016) (SOME R182 C95) C1833)) (IMPLIES C1833 (AND (OR (ALL R204 (NOT C1016)) C1834) (SOME R353 (AND (SOME R45 C1796) C1352)) C936)) (DEFINE-CONCEPT C1900 (AND (SOME R204 C1016) C1899)) (DEFINE-CONCEPT C1901 (AND (SOME R204 C1017) C1899)) (DEFINE-CONCEPT C1844 (AND (SOME R353 (AND (SOME R45 C1796) C1832)) C936)) (DEFINE-CONCEPT C1847 (AND (SOME R353 (AND (SOME R45 C1796) C1354)) C936)) (DEFINE-CONCEPT C1851 (AND (SOME R353 (AND (SOME R45 C749) C1330)) C936)) (DEFINE-CONCEPT C1841 (AND (SOME R353 (AND (SOME R45 C1796) C1338)) C936)) (DEFINE-CONCEPT C1845 (AND (SOME R204 C1016) C1844)) (DEFINE-CONCEPT C1852 (AND (SOME R204 C1016) C1851)) (DEFINE-CONCEPT C1867 (AND (SOME R353 (AND (SOME R45 C1796) C1296)) C936)) (DEFINE-CONCEPT C1842 (AND (SOME R204 C1016) C1841)) (DEFINE-CONCEPT C1863 (AND (SOME R353 (AND (SOME R45 C1796) C1299)) C936)) (DEFINE-CONCEPT C1868 (AND (SOME R204 C1017) C1867)) (DEFINE-CONCEPT C1825 (AND (SOME R204 C1016) C933)) (DEFINE-CONCEPT C1864 (AND (SOME R204 C1016) C1863)) (DEFINE-CONCEPT C1837 (AND (SOME R353 (AND (SOME R45 C1796) C1342)) C936)) (DEFINE-CONCEPT C2278 (AND (SOME R387 C1467) C885)) (DEFINE-CONCEPT C1848 (AND (SOME R204 C1016) C1847)) (DEFINE-CONCEPT C1859 (AND (SOME R353 (AND (SOME R45 C1796) C1307)) C936)) (DEFINE-CONCEPT C1860 (AND (SOME R204 C1016) C1859)) (DEFINE-CONCEPT C1813 (AND (SOME R204 C1019) C940)) (DEFINE-CONCEPT C1814 (AND (SOME R204 C1019) C941)) (DEFINE-CONCEPT C1815 (AND (SOME R204 C1017) C940)) (DEFINE-CONCEPT C1817 (AND (SOME R204 C1018) C940)) (DEFINE-CONCEPT C1818 (AND (SOME R204 C1017) C941)) (DEFINE-CONCEPT C1819 (AND (SOME R204 C1016) C941)) (DEFINE-CONCEPT C1820 (AND (SOME R204 C1018) C941)) (DEFINE-CONCEPT C1821 (AND (SOME R204 C1019) C942)) (DEFINE-CONCEPT C1823 (AND (SOME R204 C1016) C942)) (DEFINE-CONCEPT C1824 (AND (SOME R204 C1018) C942)) (DEFINE-CONCEPT C1816 (AND (SOME R204 C1016) C940)) (DEFINE-CONCEPT C1697 (AND (SOME R202 C1254) C935)) (DEFINE-CONCEPT C1792 (AND (SOME R208 C1026) C872)) (DEFINE-CONCEPT C1793 (AND (SOME R208 C1028) C872)) (DEFINE-CONCEPT C1794 (AND (SOME R204 C1016) C872)) (DEFINE-CONCEPT C1795 (AND (SOME R204 C1017) C872)) (DEFINE-CONCEPT C2281 (AND (SOME R173 (AND (SOME R405 C1357) C53)) (SOME R202 C1106) C874)) (DEFINE-CONCEPT C2654 (AND (SOME R355 (AND (SOME R53 C333) C1796)) (SOME R204 C1016) C927)) (DEFINE-CONCEPT C1838 (AND (SOME R204 C1016) C1837)) (DEFINE-CONCEPT C1822 (AND (SOME R204 C1017) C942)) (DEFINE-CONCEPT C2245 (AND (SOME R102 C497) (SOME R98 C1386) C803)) (DEFINE-CONCEPT C2334 (AND (SOME R146 C1709) C2331)) (DEFINE-CONCEPT C2640 (AND (SOME R93 C2539) (SOME R366 (AND (SOME R202 C1095) C873)) C1630)) (DEFINE-CONCEPT C2729 (AND (SOME R128 C2704) C1742)) (DEFINE-CONCEPT C2748 (AND (SOME R143 (AND (SOME R94 (AND (SOME R166 C1262) C1341)) C840)) C2729)) (IMPLIES C793 (AND (OR (ALL R128 (OR (ALL R282 (OR (ALL R208 (NOT C1134)) (NOT C916))) (NOT C21))) C2302) C216)) (IMPLIES C2304 (AND (OR (SOME R35 C2316) (ALL R91 (NOT C518))) (OR (SOME R140 C2337) (ALL R91 (NOT C2297)) (ALL R368 (OR (ALL R202 (NOT C1115)) (NOT C875)))) (SOME R91 C1758) C2302)) (IMPLIES C2302 (AND (OR (ALL R91 (NOT C1758)) C2304) (SOME R128 (AND (SOME R282 (AND (SOME R208 C1134) C916)) C21)) C793)) (DEFINE-CONCEPT C2303 (AND (SOME R91 C341) C2302)) (DEFINE-CONCEPT C2306 (AND (SOME R91 C1760) C2302)) (DEFINE-CONCEPT C2341 (AND (SOME R91 C2297) (SOME R368 (AND (SOME R202 C1115) C875)) C2304)) (DEFINE-CONCEPT C1737 (AND (SOME R128 (AND (SOME R282 (AND (SOME R208 C1133) C916)) C21)) C793)) (DEFINE-CONCEPT C2305 (AND (SOME R91 C1759) C2302)) (DEFINE-CONCEPT C2630 (AND (SOME R98 C460) C1737)) (DEFINE-CONCEPT C2631 (AND (SOME R98 C701) C1737)) (DEFINE-CONCEPT C2317 (AND (SOME R390 (AND (SOME R204 C1016) C891)) (SOME R398 (AND (SOME R202 C1083) C890)) (SOME R368 (AND (SOME R202 C1114) C875)) C2305)) (DEFINE-CONCEPT C2633 (AND (SOME R98 C360) C1737)) (DEFINE-CONCEPT C2318 (AND (SOME R136 C1825) C2317)) (DEFINE-CONCEPT C2632 (AND (SOME R98 C702) C1737)) (DEFINE-CONCEPT C1853 (AND (SOME R122 C1851) C767)) (DEFINE-CONCEPT C2313 (AND (SOME R203 (AND (SOME R45 (AND (SOME R348 (AND (SOME R202 C1254) C935)) C29)) (SOME R350 C1260) C1287)) C1044)) (DEFINE-CONCEPT C2312 (AND (SOME R203 (AND (SOME R350 C1260) (SOME R45 C749) C1287)) C1044)) (DEFINE-CONCEPT C1683 (AND (SOME R216 C1682) (SOME R218 C268) C1046)) (DEFINE-CONCEPT C1685 (AND (SOME R216 C1684) (SOME R218 C268) C1046)) (DEFINE-CONCEPT C1687 (AND (SOME R216 C1686) (SOME R218 C268) C1046)) (DEFINE-CONCEPT C1693 (AND (SOME R216 C1692) (SOME R218 C267) C1046)) (DEFINE-CONCEPT C1695 (AND (SOME R216 C1694) (SOME R218 C267) C1046)) (DEFINE-CONCEPT C1696 (AND (SOME R218 C269) (SOME R216 C1678) C1046)) (DEFINE-CONCEPT C1689 (AND (SOME R218 C267) (SOME R216 C1688) C1046)) (DEFINE-CONCEPT C1691 (AND (SOME R216 C1690) (SOME R218 C267) C1046)) (DEFINE-CONCEPT C1681 (AND (SOME R216 C1680) (SOME R218 C268) C1046)) (DEFINE-CONCEPT C2711 (AND (SOME R203 (AND (SOME R369 (AND (SOME R93 C501) C800)) C875)) C1115)) (DEFINE-CONCEPT C2706 (AND (SOME R203 (AND (SOME R369 C2697) C875)) C1115)) (DEFINE-CONCEPT C1921 (AND (SOME R203 (AND (SOME R173 (AND (SOME R405 C1394) C53)) C874)) C1106)) (DEFINE-CONCEPT C2025 (AND (SOME R203 (AND (SOME R173 (AND (SOME R405 C1976) C53)) C874)) C1106)) (DEFINE-CONCEPT C2023 (AND (SOME R203 (AND (SOME R173 (AND (SOME R405 C1994) C53)) C874)) C1106)) (DEFINE-CONCEPT C1922 (AND (SOME R203 (AND (SOME R173 (AND (SOME R405 C1394) C53)) C874)) C1107)) (DEFINE-CONCEPT C2020 (AND (SOME R203 (AND (SOME R173 (AND (SOME R405 C1975) C53)) C874)) C1107)) (DEFINE-CONCEPT C2022 (AND (SOME R203 (AND (SOME R173 (AND (SOME R405 C1979) C53)) C874)) C1107)) (DEFINE-CONCEPT C2026 (AND (SOME R203 (AND (SOME R173 (AND (SOME R405 C1976) C53)) C874)) C1107)) (DEFINE-CONCEPT C2021 (AND (SOME R203 (AND (SOME R173 (AND (SOME R405 C1979) C53)) C874)) C1106)) (DEFINE-CONCEPT C2024 (AND (SOME R203 (AND (SOME R173 (AND (SOME R405 C1994) C53)) C874)) C1107)) (DEFINE-CONCEPT C2718 (AND (SOME R203 (AND (SOME R201 (AND (SOME R178 C100) C801)) C869)) C1066)) (DEFINE-CONCEPT C2710 (AND (SOME R203 (AND (SOME R369 (AND (SOME R93 C501) C800)) C875)) C1114)) (DEFINE-CONCEPT C2019 (AND (SOME R203 (AND (SOME R173 (AND (SOME R405 C1975) C53)) C874)) C1106)) (DEFINE-CONCEPT C2246 (AND (SOME R102 C333) (SOME R98 C1386) C803)) (IMPLIES C134 (AND (OR (ALL R129 (OR (ALL R368 (OR (ALL R202 (NOT C1114)) (NOT C875))) (ALL R386 (OR (ALL R206 (NOT C1679)) (NOT C885))) (NOT C1913))) C1915) C18)) (IMPLIES C1916 (AND (SOME R294 (AND (SOME R204 C1016) C900)) (SOME R178 C100) C1915)) (IMPLIES C1915 (AND (OR (ALL R294 (OR (ALL R204 (NOT C1016)) (NOT C900))) C1916) (SOME R129 (AND (SOME R368 (AND (SOME R202 C1114) C875)) (SOME R386 (AND (SOME R206 C1679) C885)) C1913)) C134)) (DEFINE-CONCEPT C2335 (AND (SOME R110 C520) C1742)) (DEFINE-CONCEPT C2641 (AND (SOME R93 C2539) (SOME R368 (AND (SOME R202 C1115) C875)) C1630)) (DEFINE-CONCEPT C2730 (AND (SOME R128 C2727) C1742)) (DEFINE-CONCEPT C2698 (AND (SOME R91 C497) (SOME R98 C740) C794)) (IMPLIES C1676 (AND (OR (ALL R17 (OR (ALL R232 (NOT C77)) (NOT C1676))) (SOME R232 C77)) (SOME R278 C91) C21)) (IMPLIES C21 (AND (OR (ALL R278 (NOT C90)) C1802) (OR (ALL R278 (NOT C91)) C1676) (OR (ALL R166 (NOT C1272)) C1705) (OR (SOME R410 C61) (ALL R232 (NOT C79))) (OR (SOME R284 (AND (SOME R202 C1136) C917)) (ALL R268 (OR (ALL R202 (NOT C1181)) (NOT C920)))) (OR (ALL R17 (OR (ALL R184 (NOT C98)) (ALL R232 (NOT C77)) (NOT C21))) (ALL R184 (NOT C98)) (SOME R232 C77)) (OR (ALL R17 (OR (ALL R184 (NOT C98)) (ALL R232 (NOT C79)) (NOT C21))) (ALL R184 (NOT C98)) (SOME R232 C79)) (OR (ALL R310 (NOT C1228)) (SOME R410 C61) (ALL R232 (NOT C78))) (OR (ALL R129 (OR (ALL R184 (NOT C94)) (NOT C37))) (SOME R184 C94)) (OR (ALL R129 (OR (ALL R180 (NOT C100)) (NOT C37))) (SOME R180 C100)) (OR (ALL R180 (NOT C100)) (SOME R178 C100)) (OR (ALL R184 (NOT C94)) (SOME R182 C94)) C20)) (IMPLIES C1705 (AND (OR (ALL R29 (NOT C2560)) (ALL R29 (NOT C2559)) C2573) (OR (ALL R29 (OR (ALL R268 (NOT C1711)) (NOT C21))) (SOME R284 (AND (SOME R202 C1145) C917))) (OR (SOME R28 C715) (ALL R29 (NOT C460))) (OR (SOME R28 C713) (ALL R29 (NOT C460))) (OR (SOME R28 C714) (ALL R29 (NOT C331))) (OR (ALL R29 (NOT C469)) (SOME R28 C718)) (SOME R166 C1272) C21)) (IMPLIES C1811 (AND (SOME R410 C60) (SOME R284 (AND (SOME R202 C1151) C917)) C1802)) (IMPLIES C1810 (AND (OR (ALL R13 (NOT C415)) (SOME R232 C78)) (OR (ALL R13 (NOT C415)) (SOME R410 C61)) (OR (ALL R13 (NOT C415)) (ALL R320 (NOT C1221)) (ALL R310 (NOT C1228)) (SOME R410 C62)) (SOME R410 C60) (SOME R284 (AND (SOME R202 C1150) C917)) C1802)) (IMPLIES C2573 (AND (SOME R18 C1761) (SOME R29 C2560) (SOME R29 C2559) C1705)) (IMPLIES C1802 (AND (OR (ALL R284 (OR (ALL R202 (NOT C1151)) (NOT C917))) C1811) (OR (ALL R284 (OR (ALL R202 (NOT C1150)) (NOT C917))) C1810) (OR (ALL R163 (OR (ALL R202 (NOT C1055)) (NOT C868))) (ALL R13 (NOT C415)) (SOME R232 C78)) (OR (ALL R13 (OR (ALL R232 (NOT C75)) (NOT C1802))) (SOME R232 C75)) (SOME R278 C90) (SOME R284 (AND (SOME R202 C1145) C917)) C21)) (DEFINE-CONCEPT C1757 (AND (SOME R180 C101) C21)) (DEFINE-CONCEPT C2574 (AND (SOME R29 C2562) (SOME R29 C2561) C1705)) (DEFINE-CONCEPT C2707 (AND (SOME R137 C2705) C21)) (DEFINE-CONCEPT C1673 (AND (SOME R232 C80) C21)) (DEFINE-CONCEPT C1674 (AND (SOME R232 C77) C21)) (DEFINE-CONCEPT C1675 (AND (SOME R232 C79) C21)) (DEFINE-CONCEPT C1744 (AND (SOME R182 C94) C21)) (DEFINE-CONCEPT C1722 (AND (SOME R268 (AND (SOME R202 C1178) C920)) C21)) (DEFINE-CONCEPT C1745 (AND (SOME R182 C95) C21)) (DEFINE-CONCEPT C1723 (AND (SOME R268 (AND (SOME R202 C1179) C920)) C21)) (DEFINE-CONCEPT C1812 (AND (SOME R13 C426) C1811)) (DEFINE-CONCEPT C1746 (AND (SOME R182 C96) C21)) (DEFINE-CONCEPT C1724 (AND (SOME R268 (AND (SOME R202 C1180) C920)) C21)) (DEFINE-CONCEPT C1747 (AND (SOME R182 C97) C21)) (DEFINE-CONCEPT C1726 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C21)) (DEFINE-CONCEPT C1725 C1726) (DEFINE-CONCEPT C2563 (AND (SOME R29 C460) C1705)) (DEFINE-CONCEPT C1770 (AND (SOME R29 (AND (SOME R268 C1711) C21)) (SOME R166 C1272) C21)) (DEFINE-CONCEPT C1748 (AND (SOME R182 C98) C21)) (DEFINE-CONCEPT C1726 (AND (SOME R268 (AND (SOME R202 C1183) C920)) C21)) (DEFINE-CONCEPT C1771 (AND (SOME R29 (AND (SOME R268 C1711) C25)) (SOME R166 C1272) C21)) (DEFINE-CONCEPT C1749 (AND (SOME R184 C94) C21)) (DEFINE-CONCEPT C1727 (AND (SOME R284 (AND (SOME R202 C1136) C917)) C21)) (DEFINE-CONCEPT C2719 (AND (SOME R29 C497) C1705)) (DEFINE-CONCEPT C1772 (AND (SOME R30 C724) C21)) (DEFINE-CONCEPT C1750 (AND (SOME R184 C95) C21)) (DEFINE-CONCEPT C2720 (AND (SOME R29 C481) C1705)) (IMPLIES C1805 (AND (SOME R314 C1216) (SOME R13 C444) (SOME R278 C90) C152)) (IMPLIES C152 (AND (OR (ALL R314 (NOT C1216)) (ALL R13 (NOT C444)) C1805) (OR (ALL R13 (OR (ALL R232 (NOT C75)) (NOT C1802))) (SOME R232 C75)) (OR (ALL R13 (NOT C375)) (SOME R314 C1216)) (OR (ALL R13 (NOT C369)) (SOME R314 C1216)) (SOME R280 C82) (SOME R284 (AND (SOME R202 C1145) C917)) C22)) (DEFINE-CONCEPT C1807 (AND (SOME R13 C443) (SOME R314 C1216) C152)) (DEFINE-CONCEPT C1806 (AND (SOME R163 (AND (SOME R202 C1051) C868)) C1805)) (DEFINE-CONCEPT C1808 (AND (SOME R163 (AND (SOME R202 C1051) C868)) C1807)) (DEFINE-CONCEPT C1751 (AND (SOME R184 C96) C21)) (DEFINE-CONCEPT C1729 (AND (SOME R284 (AND (SOME R202 C1145) C917)) C21)) (DEFINE-CONCEPT C2721 (AND (SOME R29 C505) C1705)) (DEFINE-CONCEPT C2618 (AND (SOME R110 C460) C1457)) (DEFINE-CONCEPT C2620 (AND (SOME R110 C702) C1457)) (DEFINE-CONCEPT C2616 (AND (SOME R110 C674) C1457)) (DEFINE-CONCEPT C2737 (AND (SOME R110 C718) C1443)) (DEFINE-CONCEPT C2686 (AND (SOME R112 C2549) C1442)) (DEFINE-CONCEPT C2739 (AND (SOME R110 C2723) C1443)) (DEFINE-CONCEPT C2738 C2739) (DEFINE-CONCEPT C2739 C2738) (DEFINE-CONCEPT C2743 (AND (SOME R110 C2719) C1452)) (DEFINE-CONCEPT C2619 (AND (SOME R110 C701) C1457)) (DEFINE-CONCEPT C2621 (AND (SOME R110 C460) C1453)) (DEFINE-CONCEPT C2609 (AND (SOME R78 C686) (SOME R76 C674) C1453)) (DEFINE-CONCEPT C2673 (AND (SOME R108 C1761) C1435)) (IMPLIES C2675 (AND (OR (ALL R396 (OR (ALL R202 (NOT C1072)) (NOT C889))) C2677) (SOME R110 C1761) C1436)) (IMPLIES C1436 (AND (OR (ALL R110 (NOT C1761)) C2675) C1435)) (IMPLIES C2677 (AND (OR (ALL R112 (NOT C2569)) (SOME R232 C77)) (SOME R396 (AND (SOME R202 C1072) C889)) C2675)) (DEFINE-CONCEPT C2608 (AND (SOME R108 C465) C1436)) (DEFINE-CONCEPT C2617 (AND (SOME R110 C673) C1457)) (DEFINE-CONCEPT C1764 (AND (SOME R268 (AND (SOME R202 C1179) C920)) C1426)) (DEFINE-CONCEPT C1752 (AND (SOME R184 C97) C21)) (DEFINE-CONCEPT C2744 (AND (SOME R110 C2722) C1452)) (DEFINE-CONCEPT C2722 (AND (SOME R29 C500) C1705)) (DEFINE-CONCEPT C2678 (AND (SOME R112 C2567) (SOME R112 C2571) C2677)) (IMPLIES C2412 (AND (SOME R242 (AND (SOME R174 C597) (SOME R208 C1246) C907)) (SOME R232 C79) C343)) (IMPLIES C343 (AND (OR (ALL R242 (OR (ALL R174 (NOT C597)) (ALL R208 (NOT C1246)) (NOT C907))) C2412) (SOME R268 (AND (SOME R202 C1180) C920)) C153)) (IMPLIES C2404 (AND (SOME R60 C632) (SOME R232 C79) C345)) (IMPLIES C2403 (AND (SOME R60 C631) (SOME R232 C79) C345)) (IMPLIES C345 (AND (OR (ALL R60 (NOT C632)) C2404) (OR (ALL R60 (NOT C631)) C2403) (SOME R284 (AND (SOME R202 C1136) C917)) (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (DEFINE-CONCEPT C2291 (AND (SOME R29 C461) C347)) (DEFINE-CONCEPT C2292 (AND (SOME R29 C461) C348)) (DEFINE-CONCEPT C1775 (AND (SOME R30 C724) C337)) (DEFINE-CONCEPT C2356 (AND (SOME R48 C2355) (SOME R25 C563) C1775)) (DEFINE-CONCEPT C2357 (AND (SOME R25 C2354) (SOME R48 C2355) C1775)) (DEFINE-CONCEPT C2293 (AND (SOME R29 C461) C349)) (IMPLIES C2296 (AND (SOME R410 C61) (SOME R25 C516) C325)) (IMPLIES C325 (AND (OR (ALL R25 (NOT C516)) C2296) (SOME R92 C800) (SOME R268 (AND (SOME R202 C1181) C920)) C153)) (DEFINE-CONCEPT C2581 (AND (SOME R78 C701) (SOME R76 C702) C325)) (DEFINE-CONCEPT C2295 (AND (SOME R25 C461) C350)) (DEFINE-CONCEPT C2358 (AND (SOME R25 C563) C339)) (DEFINE-CONCEPT C2405 (AND (SOME R62 C597) (SOME R60 C2403) C339)) (DEFINE-CONCEPT C2406 (AND (SOME R60 C2404) (SOME R62 C597) C339)) (DEFINE-CONCEPT C2407 (AND (SOME R24 C2406) (SOME R24 C2405) C339)) (DEFINE-CONCEPT C2419 (AND (SOME R62 C2418) (SOME R60 C2417) C339)) (DEFINE-CONCEPT C2294 (AND (SOME R25 C461) C351)) (DEFINE-CONCEPT C2353 (AND (SOME R90 (AND (SOME R98 C747) C794)) C337)) (IMPLIES C352 (AND (OR (ALL R19 (NOT C465)) C1809) (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (IMPLIES C1809 (AND (SOME R232 C78) (SOME R19 C465) C352)) (DEFINE-CONCEPT C2552 (AND (SOME R320 C1222) C1809)) (DEFINE-CONCEPT C2557 (AND (SOME R310 C1230) C2552)) (DEFINE-CONCEPT C2558 (AND (SOME R310 C1229) C2552)) (DEFINE-CONCEPT C1761 (AND (SOME R30 C731) C341)) (DEFINE-CONCEPT C1760 C1761) (DEFINE-CONCEPT C1761 C1760) (DEFINE-CONCEPT C1759 (AND (SOME R30 C730) C341)) (DEFINE-CONCEPT C2584 (AND (SOME R92 C806) C1761)) (DEFINE-CONCEPT C2583 C2584) (DEFINE-CONCEPT C2584 C2583) (DEFINE-CONCEPT C2587 (AND (SOME R19 C2559) C2583)) (DEFINE-CONCEPT C2588 (AND (SOME R19 C2560) C2583)) (DEFINE-CONCEPT C2585 (AND (SOME R19 C2573) C2583)) (DEFINE-CONCEPT C1758 (AND (SOME R30 C728) C341)) (DEFINE-CONCEPT C2297 (AND (SOME R25 C518) C1758)) (DEFINE-CONCEPT C2421 (AND (SOME R48 C2420) (SOME R25 C566) C1775)) (DEFINE-CONCEPT C2586 (AND (SOME R19 C701) C2583)) (DEFINE-CONCEPT C1753 (AND (SOME R184 C98) C21)) (DEFINE-CONCEPT C2679 (AND (SOME R112 C2573) (SOME R112 C2567) C2677)) (DEFINE-CONCEPT C2635 (AND (SOME R110 C2540) C1451)) (IMPLIES C2416 (AND (SOME R27 C566) (SOME R312 C1206) (SOME R232 C79) C359)) (IMPLIES C2415 (AND (SOME R27 C566) (SOME R312 C1207) (SOME R232 C79) C359)) (IMPLIES C2414 (AND (SOME R232 C75) (SOME R27 C566) C359)) (IMPLIES C359 (AND (OR (ALL R27 (NOT C566)) (ALL R312 (NOT C1206)) C2416) (OR (ALL R27 (NOT C566)) (ALL R312 (NOT C1207)) C2415) (OR (ALL R27 (NOT C566)) C2414) (OR (ALL R312 (NOT C1205)) (SOME R232 C79)) (SOME R30 C725) (SOME R232 C75) (SOME R268 (AND (SOME R202 C1183) C920)) C153)) (DEFINE-CONCEPT C2413 (AND (SOME R27 C563) C359)) (DEFINE-CONCEPT C1798 (AND (SOME R30 C1797) C21)) (DEFINE-CONCEPT C2607 (AND (SOME R110 (AND (SOME R70 C465) C331)) C1798)) (DEFINE-CONCEPT C2397 (AND (SOME R19 C604) (SOME R312 C1206) C654)) (DEFINE-CONCEPT C2398 (AND (SOME R19 C604) (SOME R312 C1207) C655)) (DEFINE-CONCEPT C2399 (AND (SOME R19 C604) (SOME R312 C1206) C655)) (DEFINE-CONCEPT C2384 (AND (SOME R312 C1206) C656)) (DEFINE-CONCEPT C2400 (AND (SOME R312 C1207) C656)) (DEFINE-CONCEPT C2408 (AND (SOME R63 C711) (SOME R19 C604) C657)) (DEFINE-CONCEPT C2375 (AND (SOME R63 C624) (SOME R19 C603) C657)) (DEFINE-CONCEPT C2376 (AND (SOME R63 C625) (SOME R19 C603) C657)) (DEFINE-CONCEPT C2377 (AND (SOME R63 C630) (SOME R19 C603) C657)) (DEFINE-CONCEPT C2402 (AND (SOME R19 C2401) C657)) (IMPLIES C658 (AND (OR (ALL R19 (NOT C604)) C2401) C653)) (IMPLIES C2401 (AND (SOME R18 C2409) (SOME R19 C604) C658)) (DEFINE-CONCEPT C2387 (AND (SOME R19 C600) (SOME R312 C1207) C655)) (DEFINE-CONCEPT C2388 (AND (SOME R19 C600) (SOME R312 C1206) C655)) (DEFINE-CONCEPT C2383 (AND (SOME R19 C605) C660)) (DEFINE-CONCEPT C2386 (AND (SOME R19 C600) C660)) (DEFINE-CONCEPT C2389 (AND (SOME R19 C600) (SOME R312 C1207) C654)) (DEFINE-CONCEPT C2382 (AND (SOME R19 C605) C661)) (DEFINE-CONCEPT C2367 (AND (SOME R19 C603) C661)) (DEFINE-CONCEPT C2385 (AND (SOME R19 C600) C661)) (DEFINE-CONCEPT C2390 (AND (SOME R19 C600) (SOME R312 C1206) C654)) (DEFINE-CONCEPT C2368 (AND (SOME R19 C603) C660)) (DEFINE-CONCEPT C2391 (AND (SOME R19 C601) C661)) (DEFINE-CONCEPT C2369 (AND (SOME R19 C603) C654)) (DEFINE-CONCEPT C2392 (AND (SOME R19 C601) C660)) (DEFINE-CONCEPT C2370 (AND (SOME R312 C1207) (SOME R19 C603) C654)) (DEFINE-CONCEPT C1803 (AND (SOME R320 C1224) C381)) (DEFINE-CONCEPT C1804 (AND (SOME R320 C1222) C381)) (DEFINE-CONCEPT C2393 (AND (SOME R19 C601) C657)) (DEFINE-CONCEPT C2371 (AND (SOME R312 C1206) (SOME R19 C603) C654)) (DEFINE-CONCEPT C2559 (AND (SOME R310 C1229) C701)) (DEFINE-CONCEPT C2560 (AND (SOME R310 C1230) C701)) (DEFINE-CONCEPT C2578 (AND (SOME R78 C673) (SOME R76 C2559) C703)) (DEFINE-CONCEPT C2580 (AND (SOME R78 C2445) (SOME R76 C2560) C703)) (DEFINE-CONCEPT C2577 (AND (SOME R78 C2559) (SOME R76 C2561) C703)) (DEFINE-CONCEPT C2579 (AND (SOME R78 C2560) (SOME R76 C2562) C703)) (IMPLIES C2562 (AND (SOME R77 C704) (SOME R310 C1230) C702)) (IMPLIES C2561 (AND (SOME R79 C704) (SOME R310 C1229) C702)) (IMPLIES C702 (AND (OR (ALL R310 (NOT C1229)) C2561) (OR (ALL R310 (NOT C1230)) C2562) (SOME R232 C78) (SOME R268 (AND (SOME R202 C1180) C920)) C537)) (DEFINE-CONCEPT C2345 (AND (SOME R109 C1448) C544)) (IMPLIES C563 (AND (OR (ALL R24 (NOT C2410)) (ALL R24 (NOT C2378)) C2411) (OR (ALL R96 (OR (ALL R182 (NOT C95)) (NOT C807))) C2363) (OR (ALL R24 (NOT C2353)) C2354) C549)) (IMPLIES C2411 (AND (SOME R24 C2410) (SOME R24 C2378) (SOME R232 C79) C563)) (IMPLIES C2363 (AND (SOME R96 (AND (SOME R182 C95) C807)) (SOME R178 C100) C563)) (IMPLIES C2354 (AND (SOME R24 C2353) (SOME R268 (AND (SOME R202 C1180) C920)) C563)) (DEFINE-CONCEPT C2424 (AND (SOME R96 (AND (SOME R382 (AND (SOME R212 C1024) C882)) C807)) C566)) (DEFINE-CONCEPT C2361 (AND (SOME R96 C808) C563)) (DEFINE-CONCEPT C2362 (AND (SOME R96 C809) C563)) (DEFINE-CONCEPT C2394 (AND (SOME R19 C602) C661)) (DEFINE-CONCEPT C2372 (AND (SOME R19 (AND (SOME R49 C2371) (SOME R49 C2370) C27)) C663)) (DEFINE-CONCEPT C1754 (AND (SOME R178 C100) C21)) (IMPLIES C2350 (AND (OR (ALL R19 (NOT C597)) C2410) (OR (ALL R19 (NOT C2401)) C2409) (OR (ALL R19 (NOT C2372)) (SOME R232 C79)) (OR (ALL R19 (NOT C2371)) (SOME R232 C79)) (OR (ALL R19 (NOT C2370)) (SOME R232 C79)) (OR (ALL R24 (NOT C2378)) (ALL R24 (NOT C2380)) (ALL R24 (NOT C2379)) (SOME R232 C79)) (SOME R28 C723) (SOME R90 C807) (SOME R17 C574) (SOME R284 (AND (SOME R202 C1145) C917)) C151)) (IMPLIES C2410 (AND (SOME R268 C1716) (SOME R19 C597) (SOME R232 C79) C2350)) (IMPLIES C2409 (AND (SOME R19 C2401) (SOME R232 C79) C2350)) (IMPLIES C151 (AND (OR (ALL R90 (NOT C807)) (ALL R17 (NOT C574)) (ALL R284 (OR (ALL R202 (NOT C1145)) (NOT C917))) C2350) (OR (ALL R17 (NOT C1731)) (SOME R268 (AND (SOME R202 C1179) C920))) (OR (ALL R17 (NOT C1732)) (SOME R268 (AND (SOME R202 C1180) C920))) (OR (ALL R21 (NOT C2420)) (SOME R232 C79)) (OR (ALL R17 (NOT C2422)) (SOME R232 C79)) (SOME R280 C82) C22)) (DEFINE-CONCEPT C2378 (AND (SOME R19 C2372) C2350)) (DEFINE-CONCEPT C2379 (AND (SOME R19 C2371) C2350)) (DEFINE-CONCEPT C2380 (AND (SOME R19 C2370) C2350)) (DEFINE-CONCEPT C2381 (AND (SOME R24 C2378) (SOME R24 C2380) (SOME R24 C2379) C2350)) (DEFINE-CONCEPT C2422 (AND (SOME R21 C2420) C151)) (DEFINE-CONCEPT C2423 (AND (SOME R244 (AND (SOME R208 C1240) (SOME R174 C597) C910)) C2422)) (DEFINE-CONCEPT C2680 (AND (SOME R112 C2569) (SOME R320 C1224) C2677)) (DEFINE-CONCEPT C2636 (AND (SOME R110 C2539) C1451)) (DEFINE-CONCEPT C2417 (AND (SOME R19 C2415) (SOME R314 C1216) C355)) (DEFINE-CONCEPT C2614 (AND (SOME R110 C460) C1451)) (DEFINE-CONCEPT C2395 (AND (SOME R19 C602) C660)) (DEFINE-CONCEPT C1777 (AND (SOME R21 C1732) C151)) (DEFINE-CONCEPT C2592 (AND (SOME R29 C331) C1705)) (DEFINE-CONCEPT C2550 (AND (SOME R320 C1224) C1809)) (DEFINE-CONCEPT C2553 (AND (SOME R310 C1230) C2550)) (DEFINE-CONCEPT C2554 (AND (SOME R310 C1229) C2550)) (IMPLIES C1440 (AND (OR (ALL R146 (NOT C1376)) (ALL R110 (NOT C469)) C2699) (SOME R129 C2690) C1438)) (IMPLIES C2699 (AND (SOME R112 (AND (SOME R29 C505) C1705)) (SOME R112 (AND (SOME R29 (AND (SOME R29 C505) C1705)) C718)) (SOME R146 C1376) (SOME R110 C469) C1440)) (DEFINE-CONCEPT C2724 (AND (SOME R110 C497) C1440)) (DEFINE-CONCEPT C2745 (AND (SOME R396 (AND (SOME R202 C1072) C889)) C2724)) (DEFINE-CONCEPT C2746 (AND (SOME R396 (AND (SOME R202 C1074) C889)) C2724)) (DEFINE-CONCEPT C2373 (AND (SOME R312 C1207) (SOME R19 C603) C655)) (DEFINE-CONCEPT C1755 (AND (SOME R178 C101) C21)) (DEFINE-CONCEPT C2725 (AND (SOME R110 C500) C1440)) (DEFINE-CONCEPT C2681 (AND (SOME R112 (AND (SOME R29 (AND (SOME R29 C2559) C2563)) C713)) C1436)) (DEFINE-CONCEPT C2418 (AND (SOME R19 C2416) (SOME R314 C1216) C355)) (DEFINE-CONCEPT C2615 (AND (SOME R110 C331) C1457)) (DEFINE-CONCEPT C2396 (AND (SOME R19 C604) (SOME R312 C1207) C654)) (DEFINE-CONCEPT C1778 (AND (SOME R96 C1743) C151)) (DEFINE-CONCEPT C2360 (AND (SOME R163 (AND (SOME R202 C1052) C868)) (SOME R19 C2353) C1778)) (DEFINE-CONCEPT C2359 (AND (SOME R19 C2353) (SOME R163 (AND (SOME R202 C1051) C868)) C1778)) (DEFINE-CONCEPT C2365 (AND (SOME R109 C759) C27)) (DEFINE-CONCEPT C2660 (AND (SOME R49 C2538) (SOME R49 C460) C27)) (DEFINE-CONCEPT C2582 C2660) (DEFINE-CONCEPT C2660 (AND (SOME R49 C2538) (SOME R49 C460) C27)) (DEFINE-CONCEPT C2366 (AND (SOME R52 (AND (SOME R404 C52) C720)) C2365)) (DEFINE-CONCEPT C2661 (AND (SOME R52 C720) C2660)) (IMPLIES C2420 (AND (SOME R20 C2423) (SOME R51 C566) C159)) (IMPLIES C2355 (AND (SOME R51 (AND (SOME R268 (AND (SOME R202 C1180) C920)) C563)) (SOME R268 (AND (SOME R202 C1180) C920)) C159)) (IMPLIES C159 (AND (OR (ALL R51 (NOT C566)) C2420) (OR (ALL R51 (OR (ALL R268 (OR (ALL R202 (NOT C1180)) (NOT C920))) (NOT C563))) C2355) (OR (ALL R51 (OR (ALL R268 (OR (ALL R202 (NOT C1177)) (NOT C920))) (ALL R178 (NOT C100)) (NOT C25))) (SOME R178 C100)) (OR (SOME R52 C747) (ALL R51 (NOT C2354))) (SOME R268 (AND (SOME R202 C1180) C920)) C158 C146)) (DEFINE-CONCEPT C1730 (AND (SOME R51 (AND (SOME R268 (AND (SOME R202 C1181) C920)) C21)) C159)) (DEFINE-CONCEPT C1731 (AND (SOME R51 (AND (SOME R268 (AND (SOME R202 C1179) C920)) C21)) C159)) (DEFINE-CONCEPT C1732 (AND (SOME R51 (AND (SOME R268 (AND (SOME R202 C1180) C920)) C21)) C159)) (DEFINE-CONCEPT C1763 (AND (SOME R178 C100) C1731)) (DEFINE-CONCEPT C2298 (AND (SOME R51 C518) C1732)) (DEFINE-CONCEPT C1733 (AND (SOME R51 (AND (SOME R268 (AND (SOME R202 C1182) C920)) C21)) C159)) (DEFINE-CONCEPT C2551 (AND (SOME R320 C1223) C1809)) (DEFINE-CONCEPT C2555 (AND (SOME R310 C1230) C2551)) (DEFINE-CONCEPT C2556 (AND (SOME R310 C1229) C2551)) (DEFINE-CONCEPT C2704 (AND (SOME R110 C497) C1441)) (DEFINE-CONCEPT C2728 (AND (SOME R110 C505) C1441)) (DEFINE-CONCEPT C2702 (AND (SOME R110 C482) C1441)) (DEFINE-CONCEPT C2727 (AND (SOME R110 C481) C1441)) (DEFINE-CONCEPT C2374 (AND (SOME R312 C1206) (SOME R19 C603) C655)) (DEFINE-CONCEPT C1756 (AND (SOME R180 C100) C21)) (DEFINE-CONCEPT C1734 (AND (SOME R51 (AND (SOME R268 (AND (SOME R202 C1178) C920)) C21)) C159)) (DEFINE-CONCEPT C2695 (AND (SOME R51 C415) C1734)) (DEFINE-CONCEPT C2726 (AND (SOME R110 C497) C1439)) (DEFINE-CONCEPT C2747 (AND (SOME R396 (AND (SOME R202 C1072) C889)) C2726)) (DEFINE-CONCEPT C1765 (AND (SOME R51 (AND (SOME R268 (AND (SOME R202 C1179) C920)) C1426)) C159)) (DEFINE-CONCEPT C1773 (AND (SOME R30 C723) C1425)) (DEFINE-CONCEPT C1774 (AND (SOME R30 C734) C1425)) (DEFINE-CONCEPT C1854 (AND (SOME R190 C1852) C10)) (DEFINE-CONCEPT C2247 (AND (SOME R102 C341) (SOME R98 C1386) C803)) (DEFINE-CONCEPT C2336 (AND (SOME R194 C2316) C851)) (DEFINE-CONCEPT C2642 (AND (SOME R98 C2539) (SOME R396 (AND (SOME R202 C1072) C889)) C1741)) (DEFINE-CONCEPT C2731 (AND (SOME R128 C2728) C1742)) (DEFINE-CONCEPT C2425 (AND (SOME R383 (AND (SOME R98 C566) C813)) C882)) (DEFINE-CONCEPT C2547 (AND (SOME R232 C78) C332)) (IMPLIES C2575 (AND (SOME R69 C2445) (SOME R310 C1229) C674)) (IMPLIES C2576 (AND (SOME R69 C2445) (SOME R310 C1230) C674)) (IMPLIES C674 (AND (OR (ALL R310 (NOT C1230)) C2576) (OR (ALL R310 (NOT C1229)) C2575) (SOME R232 C78) C332)) (DEFINE-CONCEPT C2548 (AND (SOME R232 C80) C332)) (DEFINE-CONCEPT C1766 (AND (SOME R53 C1764) C29)) (DEFINE-CONCEPT C1855 (AND (SOME R353 (AND (SOME R45 C1796) C1308)) C936)) (DEFINE-CONCEPT C2322 (AND (SOME R407 (AND (SOME R110 C511) C202)) C53)) (DEFINE-CONCEPT C2337 (AND (SOME R368 (AND (SOME R202 C1115) C875)) C2316)) (DEFINE-CONCEPT C2342 (AND (SOME R136 (AND (SOME R98 C522) C1577)) C2337)) (DEFINE-CONCEPT C2643 (AND (SOME R128 C1447) C2543)) (DEFINE-CONCEPT C2732 (AND (SOME R396 (AND (SOME R202 C1072) C889)) C2729)) (DEFINE-CONCEPT C2426 (AND (SOME R383 (AND (SOME R98 C566) C811)) C882)) (DEFINE-CONCEPT C2314 (AND (SOME R98 C749) C796)) (DEFINE-CONCEPT C1767 (AND (SOME R29 C1764) C1705)) (DEFINE-CONCEPT C1856 (AND (SOME R204 C1016) C1855)) (DEFINE-CONCEPT C2338 (AND (SOME R370 (AND (SOME R212 C1023) C872)) C2316)) (DEFINE-CONCEPT C2644 (AND (SOME R138 (AND (SOME R98 C460) C1641)) C2543)) (DEFINE-CONCEPT C2733 (AND (SOME R396 (AND (SOME R202 C1074) C889)) C2729)) (DEFINE-CONCEPT C2427 (AND (SOME R383 (AND (SOME R98 C566) C810)) C882)) (DEFINE-CONCEPT C2344 (AND (SOME R128 (AND (SOME R109 C1448) C21)) C797)) (DEFINE-CONCEPT C2346 (AND (SOME R128 C2345) (SOME R98 C544) C797)) (DEFINE-CONCEPT C2526 C2512) (DEFINE-CONCEPT C2529 C2520) (DEFINE-CONCEPT C2530 C2520) (DEFINE-CONCEPT C2527 C2519) (DEFINE-CONCEPT C2528 C2519) (DEFINE-CONCEPT C1677 (AND (SOME R202 C1136) C917)) (DEFINE-CONCEPT C1711 (AND (SOME R202 C1177) C920)) (DEFINE-CONCEPT C1716 (AND (SOME R202 C1183) C920)) (DEFINE-CONCEPT C1712 (AND (SOME R202 C1178) C920)) (DEFINE-CONCEPT C1713 (AND (SOME R202 C1179) C920)) (DEFINE-CONCEPT C1714 (AND (SOME R202 C1180) C920)) (DEFINE-CONCEPT C1715 (AND (SOME R202 C1182) C920)) (DEFINE-CONCEPT C1710 (AND (SOME R202 C1181) C920)) (DEFINE-CONCEPT C1679 (AND (SOME R218 C268) (SOME R216 C1678) C1046)) (DEFINE-CONCEPT C1768 (AND (SOME R268 (AND (SOME R202 C1177) C920)) (SOME R178 C100) C25)) (DEFINE-CONCEPT C1857 (AND (SOME R122 C1855) C767)) (DEFINE-CONCEPT C2339 (AND (SOME R370 (AND (SOME R212 C1024) C872)) C2316)) (DEFINE-CONCEPT C2645 (AND (SOME R396 (AND (SOME R202 C1074) C889)) C2543)) (DEFINE-CONCEPT C2734 (AND (SOME R110 C718) C1448)) (DEFINE-CONCEPT C2428 (AND (SOME R383 (AND (SOME R98 C566) C812)) C882)) (IMPLIES C1894 (AND (OR (ALL R204 (NOT C1016)) (SOME R178 C100)) (OR (ALL R204 (NOT C1017)) (SOME R178 C100)) (SOME R291 (AND (SOME R47 C1796) C175)) C901)) (IMPLIES C1888 (AND (OR (ALL R204 (NOT C1016)) (SOME R178 C100)) (OR (ALL R204 (NOT C1017)) (SOME R178 C100)) (SOME R291 (AND (SOME R47 C1796) C180)) C901)) (IMPLIES C1882 (AND (OR (ALL R204 (NOT C1016)) (SOME R178 C100)) (OR (ALL R204 (NOT C1017)) (SOME R178 C100)) (SOME R291 (AND (SOME R47 C1796) C177)) C901)) (IMPLIES C1878 (AND (OR (ALL R204 (NOT C1016)) (SOME R178 C100)) (SOME R291 (AND (SOME R47 C1796) C179)) C901)) (IMPLIES C1875 (AND (OR (ALL R204 (NOT C1016)) (SOME R178 C100)) (SOME R291 (AND (SOME R47 C1796) C178)) C901)) (IMPLIES C1871 (AND (OR (ALL R204 (NOT C1016)) (SOME R178 C100)) (SOME R291 (AND (SOME R47 C1796) C176)) C901)) (IMPLIES C901 (AND (OR (ALL R291 (OR (ALL R47 (NOT C1796)) (NOT C175))) C1894) (OR (ALL R291 (OR (ALL R47 (NOT C1796)) (NOT C180))) C1888) (OR (ALL R291 (OR (ALL R47 (NOT C1796)) (NOT C177))) C1882) (OR (ALL R291 (OR (ALL R47 (NOT C1796)) (NOT C179))) C1878) (OR (ALL R291 (OR (ALL R47 (NOT C1796)) (NOT C178))) C1875) (OR (ALL R291 (OR (ALL R47 (NOT C1796)) (NOT C176))) C1871) (OR (ALL R291 (OR (ALL R47 (NOT C1796)) (NOT C1906))) (ALL R204 (NOT C1016)) (SOME R178 C100)) C894)) (DEFINE-CONCEPT C1872 (AND (SOME R204 C1016) C1871)) (DEFINE-CONCEPT C1876 (AND (SOME R204 C1016) C1875)) (DEFINE-CONCEPT C1879 (AND (SOME R204 C1016) C1878)) (DEFINE-CONCEPT C1883 (AND (SOME R204 C1016) C1882)) (DEFINE-CONCEPT C1884 (AND (SOME R204 C1017) C1882)) (DEFINE-CONCEPT C1889 (AND (SOME R204 C1016) C1888)) (DEFINE-CONCEPT C1890 (AND (SOME R204 C1017) C1888)) (DEFINE-CONCEPT C1895 (AND (SOME R204 C1016) C1894)) (DEFINE-CONCEPT C1896 (AND (SOME R204 C1017) C1894)) (DEFINE-CONCEPT C1907 (AND (SOME R291 (AND (SOME R47 C1796) C1906)) (SOME R204 C1016) C901)) (DEFINE-CONCEPT C1908 (AND (SOME R291 (AND (SOME R47 C1796) C1904)) (SOME R204 C1016) C901)) (DEFINE-CONCEPT C1909 (AND (SOME R291 (AND (SOME R47 C1796) C1905)) (SOME R204 C1016) C901)) (DEFINE-CONCEPT C2268 (AND (SOME R297 C383) (SOME R204 C1016) C902)) (DEFINE-CONCEPT C2269 (AND (SOME R210 C1030) (SOME R297 C383) C902)) (DEFINE-CONCEPT C2270 (AND (SOME R210 C1032) (SOME R297 C383) C902)) (DEFINE-CONCEPT C2232 (AND (SOME R360 (AND (SOME R202 C1100) C877)) C861)) (DEFINE-CONCEPT C1769 (AND (SOME R52 C750) C1763)) (DEFINE-CONCEPT C2329 (AND (SOME R110 C461) C1769)) (DEFINE-CONCEPT C2639 (AND (SOME R110 C2539) C1414)) (DEFINE-CONCEPT C1858 (AND (SOME R190 C1856) C10)) (DEFINE-CONCEPT C2340 (AND (SOME R390 (AND (SOME R208 C1026) C891)) C2316)) (DEFINE-CONCEPT C2646 (AND (SOME R396 (AND (SOME R202 C1072) C889)) C2543)) (DEFINE-CONCEPT C2736 (AND (SOME R110 C2723) C1448)) (DEFINE-CONCEPT C2735 C2736) (DEFINE-CONCEPT C2736 C2735) (DEFINE-CONCEPT C2429 (AND (SOME R383 (AND (SOME R98 C566) C807)) C882))
163,453
Common Lisp
.lisp
3,183
49.481621
7,932
0.709322
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
21088941949e6196ab450771a05bdfc418232e6dae11af1d2a8f37bfa690e472
12,582
[ -1 ]
12,583
galen-full.lisp
lambdamikel_DLMAPS/src/prover/KBs/galen-full.lisp
(define-primitive-role R1 :parents NIL) (define-primitive-role R2 :parents (R1)) (define-primitive-role R3 :parents (R1)) (define-primitive-role R4 :parents (R2) :transitive T) (define-primitive-role R5 :parents (R3)) (define-primitive-role R6 :parents (R4) :transitive T) (define-primitive-role R7 :parents (R5)) (define-primitive-role R8 :parents (R6) :transitive T) (define-primitive-role R9 :parents (R7)) (define-primitive-role R10 :parents (R8) :transitive T) (define-primitive-role R11 :parents (R9)) (define-primitive-role R12 :parents (R10) :transitive T) (define-primitive-role R13 :parents (R11)) (define-primitive-role R14 :parents (R12)) (define-primitive-attribute R15 :parents (R13)) (define-primitive-role R16 :parents (R10) :transitive T) (define-primitive-role R17 :parents (R11)) (define-primitive-role R18 :parents (R16)) (define-primitive-attribute R19 :parents (R17)) (define-primitive-role R20 :parents (R16)) (define-primitive-attribute R21 :parents (R17)) (define-primitive-role R22 :parents (R10) :transitive T) (define-primitive-role R23 :parents (R11)) (define-primitive-role R24 :parents (R8) :transitive T) (define-primitive-role R25 :parents (R9)) (define-primitive-role R26 :parents (R24)) (define-primitive-attribute R27 :parents (R25)) (define-primitive-role R28 :parents (R8) :transitive T) (define-primitive-role R29 :parents (R9) :transitive T) (define-primitive-role R30 :parents (R8) :transitive T) (define-primitive-role R31 :parents (R9)) (define-primitive-role R32 :parents (R6)) (define-primitive-role R33 :parents (R7)) (define-primitive-role R34 :parents (R32) :transitive T) (define-primitive-role R35 :parents (R33)) (define-primitive-role R36 :parents (R4)) (define-primitive-role R37 :parents (R5)) (define-primitive-role R38 :parents (R36) :transitive T) (define-primitive-role R39 :parents (R37)) (define-primitive-role R40 :parents (R38) :transitive T) (define-primitive-role R41 :parents (R39)) (define-primitive-role R42 :parents (R40) :transitive T) (define-primitive-role R43 :parents (R41)) (define-primitive-role R44 :parents (R42)) (define-primitive-role R45 :parents (R43)) (define-primitive-role R46 :parents (R42)) (define-primitive-role R47 :parents (R43)) (define-primitive-role R48 :parents (R40)) (define-primitive-role R49 :parents (R41)) (define-primitive-attribute R50 :parents (R48)) (define-primitive-role R51 :parents (R49)) (define-primitive-role R52 :parents (R40) :transitive T) (define-primitive-role R53 :parents (R41)) (define-primitive-attribute R54 :parents (R50 R52)) (define-primitive-role R55 :parents (R51 R53)) (define-primitive-role R56 :parents (R38)) (define-primitive-role R57 :parents (R39)) (define-primitive-role R58 :parents (R56)) (define-primitive-role R59 :parents (R57)) (define-primitive-role R60 :parents (R58)) (define-primitive-attribute R61 :parents (R59)) (define-primitive-role R62 :parents (R58)) (define-primitive-attribute R63 :parents (R59)) (define-primitive-role R64 :parents (R56)) (define-primitive-role R65 :parents (R57)) (define-primitive-role R66 :parents (R56) :transitive T) (define-primitive-role R67 :parents (R57)) (define-primitive-role R68 :parents (R56)) (define-primitive-attribute R69 :parents (R57)) (define-primitive-role R70 :parents (R36)) (define-primitive-role R71 :parents (R37)) (define-primitive-attribute R72 :parents (R70)) (define-primitive-role R73 :parents (R71)) (define-primitive-role R74 :parents (R36)) (define-primitive-role R75 :parents (R37)) (define-primitive-role R76 :parents (R74)) (define-primitive-attribute R77 :parents (R75)) (define-primitive-role R78 :parents (R74)) (define-primitive-attribute R79 :parents (R75)) (define-primitive-role R80 :parents (R74)) (define-primitive-attribute R81 :parents (R75)) (define-primitive-role R82 :parents (R74)) (define-primitive-attribute R83 :parents (R75)) (define-primitive-attribute R84 :parents (R36)) (define-primitive-role R85 :parents (R37)) (define-primitive-role R86 :parents (R4) :transitive T) (define-primitive-role R87 :parents (R5)) (define-primitive-role R88 :parents (R86) :transitive T) (define-primitive-role R89 :parents (R87)) (define-primitive-role R90 :parents (R88)) (define-primitive-role R91 :parents (R89)) (define-primitive-role R92 :parents (R90)) (define-primitive-attribute R93 :parents (R91)) (define-primitive-role R94 :parents (R95 R88)) (define-primitive-role R96 :parents (R97 R89)) (define-primitive-attribute R98 :parents (R94)) (define-primitive-role R99 :parents (R96)) (define-primitive-role R100 :parents (R94)) (define-primitive-role R101 :parents (R96)) (define-primitive-role R102 :parents (R100)) (define-primitive-role R103 :parents (R101)) (define-primitive-role R104 :parents (R100)) (define-primitive-role R105 :parents (R101)) (define-primitive-role R106 :parents (R86) :transitive T) (define-primitive-role R107 :parents (R87)) (define-primitive-role R108 :parents (R106) :transitive T) (define-primitive-role R109 :parents (R107)) (define-primitive-attribute R110 :parents (R108)) (define-primitive-role R111 :parents (R109)) (define-primitive-role R112 :parents (R108)) (define-primitive-role R113 :parents (R109)) (define-primitive-attribute R114 :parents (R112)) (define-primitive-role R115 :parents (R113)) (define-primitive-role R95 :parents (R4)) (define-primitive-role R97 :parents (R5)) (define-primitive-attribute R116 :parents (R91)) (define-primitive-attribute R117 :parents (R90)) (define-primitive-role R118 :parents (R95) :transitive T) (define-primitive-role R119 :parents (R97)) (define-primitive-role R120 :parents (R95)) (define-primitive-role R121 :parents (R97)) (define-primitive-role R122 :parents (R120)) (define-primitive-role R123 :parents (R121)) (define-primitive-attribute R124 :parents (R122)) (define-primitive-role R125 :parents (R123)) (define-primitive-attribute R126 :parents (R120)) (define-primitive-role R127 :parents (R121)) (define-primitive-attribute R128 :parents (R95)) (define-primitive-attribute R129 :parents (R97)) (define-primitive-role R130 :parents (R95)) (define-primitive-role R131 :parents (R97)) (define-primitive-role R132 :parents (R4) :transitive T) (define-primitive-role R133 :parents (R5)) (define-primitive-role R134 :parents (R132) :transitive T) (define-primitive-role R135 :parents (R133)) (define-primitive-attribute R136 :parents (R134)) (define-primitive-attribute R137 :parents (R135)) (define-primitive-role R138 :parents (R132) :transitive T) (define-primitive-role R139 :parents (R133)) (define-primitive-attribute R140 :parents (R138)) (define-primitive-attribute R141 :parents (R139)) (define-primitive-role R142 :parents (R132) :transitive T) (define-primitive-role R143 :parents (R133)) (define-primitive-attribute R144 :parents (R142)) (define-primitive-attribute R145 :parents (R143)) (define-primitive-role R146 :parents (R132)) (define-primitive-role R147 :parents (R133)) (define-primitive-attribute R148 :parents (R146)) (define-primitive-role R149 :parents (R147)) (define-primitive-role R150 :parents (R132)) (define-primitive-role R151 :parents (R133)) (define-primitive-attribute R152 :parents (R150)) (define-primitive-role R153 :parents (R151)) (define-primitive-role R154 :parents (R132)) (define-primitive-role R155 :parents (R133)) (define-primitive-attribute R156 :parents (R154)) (define-primitive-role R157 :parents (R155)) (define-primitive-role R158 :parents (R4)) (define-primitive-role R159 :parents (R5)) (define-primitive-attribute R160 :parents (R158)) (define-primitive-role R161 :parents (R159)) (define-primitive-attribute R162 :parents (R158)) (define-primitive-role R163 :parents (R159)) (define-primitive-attribute R164 :parents (R4)) (define-primitive-role R165 :parents (R5)) (define-primitive-attribute R166 :parents (R164)) (define-primitive-role R167 :parents (R165)) (define-primitive-attribute R168 :parents (R164)) (define-primitive-role R169 :parents (R165)) (define-primitive-attribute R170 :parents (R164)) (define-primitive-role R171 :parents (R165)) (define-primitive-attribute R172 :parents (R4)) (define-primitive-role R173 :parents (R5)) (define-primitive-attribute R174 :parents (R4)) (define-primitive-role R175 :parents (R5)) (define-primitive-attribute R176 :parents (R2)) (define-primitive-role R177 :parents (R3)) (define-primitive-attribute R178 :parents (R176)) (define-primitive-role R179 :parents (R177)) (define-primitive-attribute R180 :parents (R176)) (define-primitive-role R181 :parents (R177)) (define-primitive-attribute R182 :parents (R176)) (define-primitive-role R183 :parents (R177)) (define-primitive-attribute R184 :parents (R176)) (define-primitive-role R185 :parents (R177)) (define-primitive-attribute R186 :parents (R176)) (define-primitive-role R187 :parents (R177)) (define-primitive-role R188 :parents (R2)) (define-primitive-role R189 :parents (R3)) (define-primitive-role R190 :parents (R188)) (define-primitive-role R191 :parents (R189)) (define-primitive-attribute R192 :parents (R2)) (define-primitive-role R193 :parents (R3)) (define-primitive-attribute R194 :parents (R192)) (define-primitive-role R195 :parents (R193)) (define-primitive-role R196 :parents (R2)) (define-primitive-role R197 :parents (R3)) (define-primitive-role R198 :parents (R196)) (define-primitive-role R199 :parents (R197)) (define-primitive-role R200 :parents (R198)) (define-primitive-role R201 :parents (R199)) (define-primitive-attribute R202 :parents (R198)) (define-primitive-role R203 :parents (R199)) (define-primitive-attribute R204 :parents (R202)) (define-primitive-role R205 :parents (R203)) (define-primitive-attribute R206 :parents (R202)) (define-primitive-role R207 :parents (R203)) (define-primitive-attribute R208 :parents (R202)) (define-primitive-role R209 :parents (R203)) (define-primitive-attribute R210 :parents (R202)) (define-primitive-role R211 :parents (R203)) (define-primitive-attribute R212 :parents (R202)) (define-primitive-role R213 :parents (R203)) (define-primitive-role R214 :parents (R196)) (define-primitive-role R215 :parents (R197)) (define-primitive-attribute R216 :parents (R214)) (define-primitive-role R217 :parents (R215)) (define-primitive-attribute R218 :parents (R214)) (define-primitive-role R219 :parents (R215)) (define-primitive-role R220 :parents (R196)) (define-primitive-role R221 :parents (R197)) (define-primitive-role R222 :parents (R220)) (define-primitive-role R223 :parents (R221)) (define-primitive-role R224 :parents (R220)) (define-primitive-role R225 :parents (R221)) (define-primitive-role R226 :parents (R200)) (define-primitive-role R227 :parents (R201)) (define-primitive-attribute R228 :parents (R226)) (define-primitive-role R229 :parents (R227)) (define-primitive-attribute R230 :parents (R228)) (define-primitive-role R231 :parents (R229)) (define-primitive-attribute R232 :parents (R228)) (define-primitive-role R233 :parents (R229)) (define-primitive-attribute R234 :parents (R228)) (define-primitive-role R235 :parents (R229)) (define-primitive-attribute R236 :parents (R234)) (define-primitive-role R237 :parents (R235)) (define-primitive-attribute R238 :parents (R236)) (define-primitive-role R239 :parents (R237)) (define-primitive-attribute R240 :parents (R236)) (define-primitive-role R241 :parents (R237)) (define-primitive-attribute R242 :parents (R236)) (define-primitive-role R243 :parents (R237)) (define-primitive-attribute R244 :parents (R236)) (define-primitive-role R245 :parents (R237)) (define-primitive-attribute R246 :parents (R236)) (define-primitive-role R247 :parents (R237)) (define-primitive-attribute R248 :parents (R236)) (define-primitive-role R249 :parents (R237)) (define-primitive-attribute R250 :parents (R234)) (define-primitive-role R251 :parents (R235)) (define-primitive-attribute R252 :parents (R250)) (define-primitive-role R253 :parents (R251)) (define-primitive-attribute R254 :parents (R250)) (define-primitive-role R255 :parents (R251)) (define-primitive-attribute R256 :parents (R250)) (define-primitive-role R257 :parents (R251)) (define-primitive-attribute R258 :parents (R250)) (define-primitive-role R259 :parents (R251)) (define-primitive-attribute R260 :parents (R250)) (define-primitive-role R261 :parents (R251)) (define-primitive-attribute R262 :parents (R250)) (define-primitive-role R263 :parents (R251)) (define-primitive-attribute R264 :parents (R226)) (define-primitive-role R265 :parents (R227)) (define-primitive-attribute R266 :parents (R264)) (define-primitive-role R267 :parents (R265)) (define-primitive-attribute R268 :parents (R264)) (define-primitive-role R269 :parents (R265)) (define-primitive-attribute R270 :parents (R264)) (define-primitive-role R271 :parents (R265)) (define-primitive-attribute R272 :parents (R264)) (define-primitive-role R273 :parents (R265)) (define-primitive-attribute R274 :parents (R264)) (define-primitive-role R275 :parents (R265)) (define-primitive-attribute R276 :parents (R264)) (define-primitive-role R277 :parents (R265)) (define-primitive-attribute R278 :parents (R264)) (define-primitive-role R279 :parents (R265)) (define-primitive-attribute R280 :parents (R264)) (define-primitive-role R281 :parents (R265)) (define-primitive-attribute R282 :parents (R264)) (define-primitive-role R283 :parents (R265)) (define-primitive-attribute R284 :parents (R282)) (define-primitive-role R285 :parents (R283)) (define-primitive-attribute R286 :parents (R226)) (define-primitive-role R287 :parents (R227)) (define-primitive-attribute R288 :parents (R286)) (define-primitive-role R289 :parents (R287)) (define-primitive-attribute R290 :parents (R286)) (define-primitive-role R291 :parents (R287)) (define-primitive-attribute R292 :parents (R286)) (define-primitive-role R293 :parents (R287)) (define-primitive-attribute R294 :parents (R286)) (define-primitive-role R295 :parents (R287)) (define-primitive-attribute R296 :parents (R286)) (define-primitive-role R297 :parents (R287)) (define-primitive-attribute R298 :parents (R286)) (define-primitive-role R299 :parents (R287)) (define-primitive-attribute R300 :parents (R286)) (define-primitive-role R301 :parents (R287)) (define-primitive-attribute R302 :parents (R286)) (define-primitive-role R303 :parents (R287)) (define-primitive-attribute R304 :parents (R286)) (define-primitive-role R305 :parents (R287)) (define-primitive-attribute R306 :parents (R226)) (define-primitive-role R307 :parents (R227)) (define-primitive-attribute R308 :parents (R306)) (define-primitive-role R309 :parents (R307)) (define-primitive-attribute R310 :parents (R308)) (define-primitive-role R311 :parents (R309)) (define-primitive-attribute R312 :parents (R308)) (define-primitive-role R313 :parents (R309)) (define-primitive-attribute R314 :parents (R308)) (define-primitive-role R315 :parents (R309)) (define-primitive-attribute R316 :parents (R308)) (define-primitive-role R317 :parents (R309)) (define-primitive-attribute R318 :parents (R308)) (define-primitive-role R319 :parents (R309)) (define-primitive-attribute R320 :parents (R308)) (define-primitive-role R321 :parents (R309)) (define-primitive-attribute R322 :parents (R308)) (define-primitive-role R323 :parents (R309)) (define-primitive-attribute R324 :parents (R306)) (define-primitive-role R325 :parents (R307)) (define-primitive-attribute R326 :parents (R200)) (define-primitive-role R327 :parents (R201)) (define-primitive-attribute R328 :parents (R326)) (define-primitive-role R329 :parents (R327)) (define-primitive-attribute R330 :parents (R326)) (define-primitive-role R331 :parents (R327)) (define-primitive-attribute R332 :parents (R326)) (define-primitive-role R333 :parents (R327)) (define-primitive-attribute R334 :parents (R326)) (define-primitive-role R335 :parents (R327)) (define-primitive-attribute R336 :parents (R326)) (define-primitive-role R337 :parents (R327)) (define-primitive-attribute R338 :parents (R326)) (define-primitive-role R339 :parents (R327)) (define-primitive-attribute R340 :parents (R326)) (define-primitive-role R341 :parents (R327)) (define-primitive-attribute R342 :parents (R326)) (define-primitive-role R343 :parents (R327)) (define-primitive-attribute R344 :parents (R326)) (define-primitive-role R345 :parents (R327)) (define-primitive-role R346 :parents (R200)) (define-primitive-role R347 :parents (R201)) (define-primitive-attribute R348 :parents (R346)) (define-primitive-role R349 :parents (R347)) (define-primitive-attribute R350 :parents (R346)) (define-primitive-role R351 :parents (R347)) (define-primitive-attribute R352 :parents (R346)) (define-primitive-role R353 :parents (R347)) (define-primitive-attribute R354 :parents (R346)) (define-primitive-role R355 :parents (R347)) (define-primitive-attribute R356 :parents (R200)) (define-primitive-role R357 :parents (R201)) (define-primitive-attribute R358 :parents (R356)) (define-primitive-role R359 :parents (R357)) (define-primitive-attribute R360 :parents (R358)) (define-primitive-role R361 :parents (R359)) (define-primitive-attribute R362 :parents (R356)) (define-primitive-role R363 :parents (R357)) (define-primitive-attribute R364 :parents (R356)) (define-primitive-role R365 :parents (R357)) (define-primitive-attribute R366 :parents (R356)) (define-primitive-role R367 :parents (R357)) (define-primitive-attribute R368 :parents (R356)) (define-primitive-role R369 :parents (R357)) (define-primitive-attribute R370 :parents (R356)) (define-primitive-role R371 :parents (R357)) (define-primitive-attribute R372 :parents (R356)) (define-primitive-role R373 :parents (R357)) (define-primitive-attribute R374 :parents (R356)) (define-primitive-role R375 :parents (R357)) (define-primitive-attribute R376 :parents (R356)) (define-primitive-role R377 :parents (R357)) (define-primitive-attribute R378 :parents (R356)) (define-primitive-role R379 :parents (R357)) (define-primitive-attribute R380 :parents (R356)) (define-primitive-role R381 :parents (R357)) (define-primitive-attribute R382 :parents (R356)) (define-primitive-role R383 :parents (R357)) (define-primitive-attribute R384 :parents (R200)) (define-primitive-role R385 :parents (R201)) (define-primitive-attribute R386 :parents (R384)) (define-primitive-role R387 :parents (R385)) (define-primitive-attribute R388 :parents (R384)) (define-primitive-role R389 :parents (R385)) (define-primitive-attribute R390 :parents (R384)) (define-primitive-role R391 :parents (R385)) (define-primitive-attribute R392 :parents (R384)) (define-primitive-role R393 :parents (R385)) (define-primitive-attribute R394 :parents (R384)) (define-primitive-role R395 :parents (R385)) (define-primitive-attribute R396 :parents (R384)) (define-primitive-role R397 :parents (R385)) (define-primitive-attribute R398 :parents (R384)) (define-primitive-role R399 :parents (R385)) (define-primitive-attribute R400 :parents (R200)) (define-primitive-role R401 :parents (R201)) (define-primitive-attribute R402 :parents (R196)) (define-primitive-role R403 :parents (R197)) (define-primitive-attribute R404 :parents (R402)) (define-primitive-role R405 :parents (R403)) (define-primitive-attribute R406 :parents (R402)) (define-primitive-role R407 :parents (R403)) (define-primitive-attribute R408 :parents (R2)) (define-primitive-role R409 :parents (R3)) (define-primitive-attribute R410 :parents (R408)) (define-primitive-role R411 :parents (R409)) (define-primitive-attribute R412 :parents (R408)) (define-primitive-role R413 :parents (R409)) (define-primitive-concept C1) (define-primitive-concept C2) (define-primitive-concept C3) (define-primitive-concept C4 C1) (define-primitive-concept C5 C4) (define-primitive-concept C6 C5) (define-primitive-concept C7 C4) (define-primitive-concept C8 C7) (define-primitive-concept C9 C8) (define-primitive-concept C10 C9) (define-primitive-concept C11 C9) (define-primitive-concept C12 C11) (define-primitive-concept C13 C11) (define-primitive-concept C14 C9) (define-primitive-concept C15 C9) (define-primitive-concept C16 C8) (define-primitive-concept C17 C7) (define-primitive-concept C18 C17) (define-primitive-concept C19 C17) (define-primitive-concept C20 C17) (define-primitive-concept C21 C20) (define-primitive-concept C22 C21) (define-primitive-concept C23 C21) (define-primitive-concept C24 C21) (define-primitive-concept C25 C21) (define-primitive-concept C26 C20) (define-primitive-concept C27 (AND C21 C26)) (define-primitive-concept C28 C4) (define-primitive-concept C29 C28) (define-primitive-concept C30 C29) (define-primitive-concept C31 C29) (define-primitive-concept C32 C4) (define-primitive-concept C33 C32) (define-primitive-concept C34 C32) (define-primitive-concept C35 C32) (define-primitive-concept C36 C32) (define-primitive-concept C37 C32) (define-primitive-concept C38 C37) (define-primitive-concept C39 C37) (define-primitive-concept C40 C39) (define-primitive-concept C41 C32) (define-primitive-concept C42 C41) (define-primitive-concept C43 C5) (define-primitive-concept C44 C43) (define-primitive-concept C45 C43) (define-primitive-concept C46 C43) (define-primitive-concept C47 C5) (define-primitive-concept C48 C47) (define-primitive-concept C49 C48) (define-primitive-concept C50 C48) (define-primitive-concept C51 C47) (define-primitive-concept C52 C51) (define-primitive-concept C53 C51) (define-primitive-concept C54 C5) (define-primitive-concept C55 C54) (define-primitive-concept C56 C54) (define-primitive-concept C57 C56) (define-primitive-concept C58 C5) (define-primitive-concept C59 C58) (define-primitive-concept C60 C59) (define-primitive-concept C61 C60) (define-primitive-concept C62 C61) (define-primitive-concept C63 C58) (define-primitive-concept C64 C63) (define-primitive-concept C65 C64) (define-primitive-concept C66 C4) (define-primitive-concept C67 C20) (define-primitive-concept C68 (AND C66 C67)) (define-primitive-concept C69 C46) (define-primitive-concept C70 C69) (define-primitive-concept C71 C70) (define-primitive-concept C72 C70) (define-primitive-concept C73 C46) (define-primitive-concept C74 C73) (define-primitive-concept C75 C74) (define-primitive-concept C76 C75) (define-primitive-concept C77 C75) (define-primitive-concept C78 C77) (define-primitive-concept C79 C78) (define-primitive-concept C80 C74) (define-primitive-concept C81 C73) (define-primitive-concept C82 C81) (define-primitive-concept C83 C81) (define-primitive-concept C84 C83) (define-primitive-concept C85 C83) (define-primitive-concept C86 C46) (define-primitive-concept C87 C46) (define-primitive-concept C88 C87) (define-primitive-concept C89 C88) (define-primitive-concept C90 C89) (define-primitive-concept C91 C89) (define-primitive-concept C92 C87) (define-primitive-concept C93 C92) (define-primitive-concept C94 C93) (define-primitive-concept C95 C94) (define-primitive-concept C96 C94) (define-primitive-concept C97 C94) (define-primitive-concept C98 C93) (define-primitive-concept C99 C92) (define-primitive-concept C100 C99) (define-primitive-concept C101 C99) (define-primitive-concept C102 C46) (define-concept C103 (AND C4 (SOME R178 C100))) (define-concept C104 (AND C4 (SOME R182 C94))) (define-primitive-concept C105 C15) (define-primitive-concept C106 C15) (define-primitive-concept C107 C15) (define-primitive-concept C108 C15) (define-primitive-concept C109 C15) (define-primitive-concept C110 C15) (define-primitive-concept C111 C110) (define-primitive-concept C112 C110) (define-primitive-concept C113 C110) (define-primitive-concept C114 C110) (define-primitive-concept C115 C14) (define-primitive-concept C116 C14) (define-primitive-concept C117 C16) (define-primitive-concept C118 C16) (define-primitive-concept C119 C16) (define-primitive-concept C120 C16) (define-primitive-concept C121 C16) (define-primitive-concept C122 C16) (define-primitive-concept C123 C16) (define-primitive-concept C124 C16) (define-primitive-concept C125 C124) (define-primitive-concept C126 C16) (define-primitive-concept C127 C126) (define-primitive-concept C128 C126) (define-primitive-concept C129 C16) (define-primitive-concept C130 C16) (define-primitive-concept C131 C130) (define-primitive-concept C132 C130) (define-primitive-concept C133 C130) (define-primitive-concept C134 C18) (define-primitive-concept C135 C24) (define-primitive-concept C136 (AND C19 C135)) (define-primitive-concept C137 C136) (define-primitive-concept C138 C136) (define-primitive-concept C139 C136) (define-primitive-concept C140 C19) (define-primitive-concept C141 C140) (define-primitive-concept C142 C140) (define-primitive-concept C143 C140) (define-primitive-concept C144 C140) (define-primitive-concept C145 C26) (define-primitive-concept C146 C145) (define-primitive-concept C147 C20) (define-primitive-concept C148 C147) (define-primitive-concept C149 C147) (define-primitive-concept C150 C147) (define-primitive-concept C151 C22) (define-primitive-concept C152 C22) (define-primitive-concept C153 C24) (define-primitive-concept C154 C25) (define-primitive-concept C155 C25) (define-primitive-concept C156 C25) (define-primitive-concept C157 C25) (define-primitive-concept C158 (AND C27 C145)) (define-primitive-concept C159 (AND C158 C146)) (define-primitive-concept C160 C158) (define-primitive-concept C161 C160) (define-primitive-concept C162 C158) (define-primitive-concept C163 C162) (define-primitive-concept C164 C20) (define-primitive-concept C165 C164) (define-primitive-concept C166 C164) (define-primitive-concept C167 C20) (define-primitive-concept C168 C167) (define-primitive-concept C169 C167) (define-primitive-concept C170 C168) (define-primitive-concept C171 C168) (define-primitive-concept C172 C169) (define-primitive-concept C173 C67) (define-primitive-concept C174 C173) (define-primitive-concept C175 C174) (define-primitive-concept C176 C174) (define-primitive-concept C177 C174) (define-primitive-concept C178 C174) (define-primitive-concept C179 C174) (define-primitive-concept C180 C174) (define-primitive-concept C181 C173) (define-primitive-concept C182 C181) (define-primitive-concept C183 C182) (define-primitive-concept C184 C182) (define-primitive-concept C185 C182) (define-primitive-concept C186 C181) (define-primitive-concept C187 C181) (define-primitive-concept C188 C181) (define-primitive-concept C189 C181) (define-primitive-concept C190 C181) (define-primitive-concept C191 C181) (define-primitive-concept C192 C181) (define-primitive-concept C193 C173) (define-primitive-concept C194 C193) (define-primitive-concept C195 C193) (define-primitive-concept C196 C193) (define-primitive-concept C197 C67) (define-primitive-concept C198 C67) (define-primitive-concept C199 C67) (define-primitive-concept C200 C20) (define-primitive-concept C201 C20) (define-primitive-concept C202 C201) (define-primitive-concept C203 C30) (define-primitive-concept C204 C30) (define-primitive-concept C205 C28) (define-primitive-concept C206 C205) (define-primitive-concept C207 C205) (define-primitive-concept C208 C205) (define-primitive-concept C209 C35) (define-primitive-concept C210 C35) (define-primitive-concept C211 C35) (define-primitive-concept C212 C36) (define-primitive-concept C213 C36) (define-primitive-concept C214 C36) (define-primitive-concept C215 C36) (define-primitive-concept C216 C37) (define-primitive-concept C217 C37) (define-primitive-concept C218 C40) (define-primitive-concept C219 C41) (define-primitive-concept C220 C5) (define-primitive-concept C221 C220) (define-primitive-concept C222 C220) (define-primitive-concept C223 C6) (define-primitive-concept C224 C223) (define-primitive-concept C225 C224) (define-primitive-concept C226 C224) (define-primitive-concept C227 C224) (define-primitive-concept C228 C224) (define-primitive-concept C229 C224) (define-primitive-concept C230 C224) (define-primitive-concept C231 C224) (define-primitive-concept C232 C224) (define-primitive-concept C233 C224) (define-primitive-concept C234 C224) (define-primitive-concept C235 C224) (define-primitive-concept C236 C223) (define-primitive-concept C237 C236) (define-primitive-concept C238 C236) (define-primitive-concept C239 C236) (define-primitive-concept C240 C236) (define-primitive-concept C241 C236) (define-primitive-concept C242 C236) (define-primitive-concept C243 C236) (define-primitive-concept C244 C236) (define-primitive-concept C245 C236) (define-primitive-concept C246 C223) (define-primitive-concept C247 C246) (define-primitive-concept C248 C223) (define-primitive-concept C249 C248) (define-primitive-concept C250 C248) (define-primitive-concept C251 C248) (define-primitive-concept C252 C248) (define-primitive-concept C253 C248) (define-primitive-concept C254 C248) (define-primitive-concept C255 C248) (define-primitive-concept C256 C248) (define-primitive-concept C257 C248) (define-primitive-concept C258 C223) (define-primitive-concept C259 C258) (define-primitive-concept C260 C258) (define-primitive-concept C261 C258) (define-primitive-concept C262 C223) (define-primitive-concept C263 C262) (define-primitive-concept C264 C262) (define-primitive-concept C265 C262) (define-primitive-concept C266 C262) (define-primitive-concept C267 C262) (define-primitive-concept C268 C262) (define-primitive-concept C269 C262) (define-primitive-concept C270 C262) (define-primitive-concept C271 C262) (define-primitive-concept C272 C262) (define-primitive-concept C273 C6) (define-primitive-concept C274 C273) (define-primitive-concept C275 C273) (define-primitive-concept C276 C275) (define-primitive-concept C277 C275) (define-primitive-concept C278 C275) (define-primitive-concept C279 C275) (define-primitive-concept C280 C273) (define-primitive-concept C281 C280) (define-primitive-concept C282 C280) (define-primitive-concept C283 C280) (define-primitive-concept C284 C280) (define-primitive-concept C285 C280) (define-primitive-concept C286 C280) (define-primitive-concept C287 C280) (define-primitive-concept C288 C280) (define-primitive-concept C289 C280) (define-primitive-concept C290 C280) (define-primitive-concept C291 C280) (define-primitive-concept C292 C280) (define-primitive-concept C293 C273) (define-primitive-concept C294 C273) (define-primitive-concept C295 C273) (define-primitive-concept C296 C273) (define-primitive-concept C297 C273) (define-primitive-concept C298 C273) (define-primitive-concept C299 C273) (define-primitive-concept C300 C68) (define-primitive-concept C301 C68) (define-primitive-concept C302 C68) (define-primitive-concept C303 C68) (define-primitive-concept C304 C66) (define-primitive-concept C305 C304) (define-primitive-concept C306 C304) (define-primitive-concept C307 C66) (define-primitive-concept C308 (AND C66 C307)) (define-primitive-concept C309 C2) (define-primitive-concept C310 C309) (define-primitive-concept C311 C309) (define-primitive-concept C312 C309) (define-primitive-concept C313 C309) (define-primitive-concept C314 C309) (define-primitive-concept C315 C309) (define-primitive-concept C316 C309) (define-primitive-concept C317 C309) (define-primitive-concept C318 C309) (define-primitive-concept C319 C309) (define-primitive-concept C320 C309) (define-primitive-concept C321 C309) (define-primitive-concept C322 C309) (define-primitive-concept C323 C309) (define-primitive-concept C324 C309) (define-primitive-concept C325 C153) (define-primitive-concept C326 (AND C325 C157)) (define-primitive-concept C327 C153) (define-primitive-concept C328 (AND C327 C157)) (define-primitive-concept C329 C153) (define-primitive-concept C330 (AND C329 C157)) (define-primitive-concept C331 C153) (define-primitive-concept C332 (AND C331 C157)) (define-primitive-concept C333 C153) (define-primitive-concept C334 (AND C333 C157)) (define-primitive-concept C335 C153) (define-primitive-concept C336 (AND C335 C157)) (define-primitive-concept C337 C153) (define-primitive-concept C338 (AND C337 C157)) (define-primitive-concept C339 C153) (define-primitive-concept C340 (AND C339 C157)) (define-primitive-concept C341 C153) (define-primitive-concept C342 (AND C341 C157)) (define-primitive-concept C343 C153) (define-primitive-concept C344 (AND C343 C157)) (define-primitive-concept C345 C153) (define-primitive-concept C346 (AND C345 C157)) (define-primitive-concept C347 C153) (define-primitive-concept C348 C153) (define-primitive-concept C349 C153) (define-primitive-concept C350 C153) (define-primitive-concept C351 C153) (define-primitive-concept C352 C153) (define-primitive-concept C353 C153) (define-primitive-concept C354 C153) (define-primitive-concept C355 C153) (define-primitive-concept C356 C153) (define-primitive-concept C357 C153) (define-primitive-concept C358 C153) (define-primitive-concept C359 C153) (define-primitive-concept C360 C153) (define-primitive-concept C361 C153) (define-primitive-concept C362 C153) (define-primitive-concept C363 C156) (define-primitive-concept C364 C156) (define-primitive-concept C365 C156) (define-primitive-concept C366 C156) (define-primitive-concept C367 C156) (define-primitive-concept C368 C156) (define-primitive-concept C369 C156) (define-primitive-concept C370 C156) (define-primitive-concept C371 C156) (define-primitive-concept C372 C156) (define-primitive-concept C373 C156) (define-primitive-concept C374 C156) (define-primitive-concept C375 C156) (define-primitive-concept C376 C156) (define-primitive-concept C377 C154) (define-primitive-concept C378 C377) (define-primitive-concept C379 C377) (define-primitive-concept C380 C377) (define-primitive-concept C381 C377) (define-primitive-concept C382 C377) (define-primitive-concept C383 C377) (define-primitive-concept C384 C154) (define-primitive-concept C385 C384) (define-primitive-concept C386 C384) (define-primitive-concept C387 C384) (define-primitive-concept C388 C384) (define-primitive-concept C389 C384) (define-primitive-concept C390 C154) (define-primitive-concept C391 C390) (define-primitive-concept C392 C154) (define-primitive-concept C393 (AND C390 C392)) (define-primitive-concept C394 C390) (define-primitive-concept C395 C390) (define-primitive-concept C396 C390) (define-primitive-concept C397 C390) (define-primitive-concept C398 C154) (define-primitive-concept C399 C398) (define-primitive-concept C400 C398) (define-primitive-concept C401 C398) (define-primitive-concept C402 C398) (define-primitive-concept C403 C398) (define-primitive-concept C404 C392) (define-primitive-concept C405 C392) (define-primitive-concept C406 C392) (define-primitive-concept C407 C392) (define-primitive-concept C408 C392) (define-primitive-concept C409 C392) (define-primitive-concept C410 C392) (define-primitive-concept C411 C392) (define-primitive-concept C412 C392) (define-primitive-concept C413 C392) (define-primitive-concept C414 C154) (define-primitive-concept C415 C414) (define-primitive-concept C416 C414) (define-primitive-concept C417 C414) (define-primitive-concept C418 C414) (define-primitive-concept C419 C414) (define-primitive-concept C420 C414) (define-primitive-concept C421 C414) (define-primitive-concept C422 C414) (define-primitive-concept C423 C414) (define-primitive-concept C424 C414) (define-primitive-concept C425 C414) (define-primitive-concept C426 C414) (define-primitive-concept C427 C414) (define-primitive-concept C428 C427) (define-primitive-concept C429 C428) (define-primitive-concept C430 C428) (define-primitive-concept C431 C428) (define-primitive-concept C432 C428) (define-primitive-concept C433 C428) (define-primitive-concept C434 C433) (define-primitive-concept C435 C433) (define-primitive-concept C436 C427) (define-primitive-concept C437 C436) (define-primitive-concept C438 C436) (define-primitive-concept C439 C436) (define-primitive-concept C440 C154) (define-primitive-concept C441 C440) (define-primitive-concept C442 C441) (define-primitive-concept C443 C442) (define-primitive-concept C444 C442) (define-primitive-concept C445 C441) (define-primitive-concept C446 C445) (define-primitive-concept C447 C445) (define-primitive-concept C448 C445) (define-primitive-concept C449 C445) (define-primitive-concept C450 C441) (define-primitive-concept C451 C450) (define-primitive-concept C452 C450) (define-primitive-concept C453 C450) (define-primitive-concept C454 C450) (define-primitive-concept C455 C440) (define-primitive-concept C456 C455) (define-primitive-concept C457 C455) (define-primitive-concept C458 C157) (define-primitive-concept C459 C458) (define-primitive-concept C460 C458) (define-primitive-concept C461 C458) (define-primitive-concept C462 C458) (define-primitive-concept C463 C458) (define-primitive-concept C464 C157) (define-primitive-concept C465 (AND C458 C464)) (define-primitive-concept C466 C458) (define-primitive-concept C467 C458) (define-primitive-concept C468 C458) (define-primitive-concept C469 C157) (define-primitive-concept C470 C469) (define-primitive-concept C471 C469) (define-primitive-concept C472 C469) (define-primitive-concept C473 C469) (define-primitive-concept C474 C469) (define-primitive-concept C475 C469) (define-primitive-concept C476 C469) (define-primitive-concept C477 C469) (define-primitive-concept C478 C477) (define-primitive-concept C479 C477) (define-primitive-concept C480 C469) (define-primitive-concept C481 C469) (define-primitive-concept C482 C469) (define-primitive-concept C483 C469) (define-primitive-concept C484 C469) (define-primitive-concept C485 C469) (define-primitive-concept C486 C469) (define-primitive-concept C487 C469) (define-primitive-concept C488 C469) (define-primitive-concept C489 C469) (define-primitive-concept C490 C469) (define-primitive-concept C491 C469) (define-primitive-concept C492 C469) (define-primitive-concept C493 C469) (define-primitive-concept C494 C469) (define-primitive-concept C495 C469) (define-primitive-concept C496 C469) (define-primitive-concept C497 C469) (define-primitive-concept C498 C469) (define-primitive-concept C499 (AND C469 C326)) (define-primitive-concept C500 (AND C469 C326)) (define-primitive-concept C501 (AND C469 C326)) (define-primitive-concept C502 C469) (define-primitive-concept C503 C469) (define-primitive-concept C504 C469) (define-primitive-concept C505 C469) (define-primitive-concept C506 C469) (define-primitive-concept C507 C469) (define-primitive-concept C508 C469) (define-primitive-concept C509 C469) (define-primitive-concept C510 C157) (define-primitive-concept C511 C510) (define-primitive-concept C512 C510) (define-primitive-concept C513 C510) (define-primitive-concept C514 C510) (define-primitive-concept C515 C510) (define-primitive-concept C516 C510) (define-primitive-concept C517 C510) (define-primitive-concept C518 C510) (define-primitive-concept C519 C510) (define-primitive-concept C520 C510) (define-primitive-concept C521 C510) (define-primitive-concept C522 C510) (define-primitive-concept C523 C157) (define-primitive-concept C524 C523) (define-primitive-concept C525 C524) (define-primitive-concept C526 C524) (define-primitive-concept C527 C524) (define-primitive-concept C528 C524) (define-primitive-concept C529 C523) (define-primitive-concept C530 C529) (define-primitive-concept C531 C529) (define-primitive-concept C532 C529) (define-primitive-concept C533 C328) (define-primitive-concept C534 C328) (define-primitive-concept C535 C328) (define-primitive-concept C536 C328) (define-primitive-concept C537 C157) (define-primitive-concept C538 (AND C328 C537)) (define-primitive-concept C539 C330) (define-primitive-concept C540 C539) (define-primitive-concept C541 C539) (define-primitive-concept C542 C330) (define-primitive-concept C543 C330) (define-primitive-concept C544 C330) (define-primitive-concept C545 C330) (define-primitive-concept C546 C330) (define-primitive-concept C547 C330) (define-primitive-concept C548 C330) (define-primitive-concept C549 C157) (define-primitive-concept C550 C549) (define-primitive-concept C551 C550) (define-primitive-concept C552 C550) (define-primitive-concept C553 C550) (define-primitive-concept C554 C550) (define-primitive-concept C555 C550) (define-primitive-concept C556 C550) (define-primitive-concept C557 C550) (define-primitive-concept C558 C550) (define-primitive-concept C559 C550) (define-primitive-concept C560 C550) (define-primitive-concept C561 C550) (define-primitive-concept C562 C550) (define-primitive-concept C563 C549) (define-primitive-concept C564 C563) (define-primitive-concept C565 C564) (define-primitive-concept C566 C564) (define-primitive-concept C567 C564) (define-primitive-concept C568 C564) (define-primitive-concept C569 C564) (define-primitive-concept C570 C564) (define-primitive-concept C571 C564) (define-primitive-concept C572 C564) (define-primitive-concept C573 C564) (define-primitive-concept C574 C549) (define-primitive-concept C575 C574) (define-primitive-concept C576 C575) (define-primitive-concept C577 C575) (define-primitive-concept C578 C575) (define-primitive-concept C579 C575) (define-primitive-concept C580 C579) (define-primitive-concept C581 C579) (define-primitive-concept C582 C579) (define-primitive-concept C583 C579) (define-primitive-concept C584 C579) (define-primitive-concept C585 C579) (define-primitive-concept C586 C579) (define-primitive-concept C587 C579) (define-primitive-concept C588 C575) (define-primitive-concept C589 C588) (define-primitive-concept C590 C588) (define-primitive-concept C591 C588) (define-primitive-concept C592 C588) (define-primitive-concept C593 C588) (define-primitive-concept C594 C588) (define-primitive-concept C595 C588) (define-primitive-concept C596 C574) (define-primitive-concept C597 C596) (define-primitive-concept C598 C596) (define-primitive-concept C599 C574) (define-primitive-concept C600 C599) (define-primitive-concept C601 C599) (define-primitive-concept C602 C599) (define-primitive-concept C603 C599) (define-primitive-concept C604 C599) (define-primitive-concept C605 C599) (define-primitive-concept C606 C574) (define-primitive-concept C607 C606) (define-primitive-concept C608 C606) (define-primitive-concept C609 C606) (define-primitive-concept C610 C606) (define-primitive-concept C611 C606) (define-primitive-concept C612 C606) (define-primitive-concept C613 C606) (define-primitive-concept C614 C606) (define-primitive-concept C615 C606) (define-primitive-concept C616 C606) (define-primitive-concept C617 C574) (define-primitive-concept C618 C574) (define-primitive-concept C619 C618) (define-primitive-concept C620 C618) (define-primitive-concept C621 C618) (define-primitive-concept C622 C618) (define-primitive-concept C623 C618) (define-primitive-concept C624 C342) (define-primitive-concept C625 C342) (define-primitive-concept C626 C342) (define-primitive-concept C627 C342) (define-primitive-concept C628 C342) (define-primitive-concept C629 C342) (define-primitive-concept C630 C342) (define-primitive-concept C631 C342) (define-primitive-concept C632 C342) (define-primitive-concept C633 C342) (define-primitive-concept C634 C342) (define-primitive-concept C635 C342) (define-primitive-concept C636 C342) (define-primitive-concept C637 C342) (define-primitive-concept C638 C342) (define-primitive-concept C639 C342) (define-primitive-concept C640 C338) (define-primitive-concept C641 C338) (define-primitive-concept C642 C338) (define-primitive-concept C643 C338) (define-primitive-concept C644 C157) (define-primitive-concept C645 C644) (define-primitive-concept C646 C644) (define-primitive-concept C647 C157) (define-primitive-concept C648 C647) (define-primitive-concept C649 C647) (define-primitive-concept C650 C647) (define-primitive-concept C651 C25) (define-primitive-concept C652 C651) (define-primitive-concept C653 C652) (define-primitive-concept C654 C653) (define-primitive-concept C655 C653) (define-primitive-concept C656 C653) (define-primitive-concept C657 C653) (define-primitive-concept C658 C653) (define-primitive-concept C659 C653) (define-primitive-concept C660 C653) (define-primitive-concept C661 C653) (define-primitive-concept C662 C652) (define-primitive-concept C663 C662) (define-primitive-concept C664 C662) (define-primitive-concept C665 C332) (define-primitive-concept C666 C332) (define-primitive-concept C667 C332) (define-primitive-concept C668 C667) (define-primitive-concept C669 C667) (define-primitive-concept C670 C332) (define-primitive-concept C671 C332) (define-primitive-concept C672 C332) (define-primitive-concept C673 C332) (define-primitive-concept C674 C332) (define-primitive-concept C675 C332) (define-primitive-concept C676 C332) (define-primitive-concept C677 C332) (define-primitive-concept C678 C332) (define-primitive-concept C679 C332) (define-primitive-concept C680 C332) (define-primitive-concept C681 C332) (define-primitive-concept C682 C332) (define-primitive-concept C683 C332) (define-primitive-concept C684 C334) (define-primitive-concept C685 C334) (define-primitive-concept C686 C334) (define-primitive-concept C687 C334) (define-primitive-concept C688 C334) (define-primitive-concept C689 C334) (define-primitive-concept C690 C334) (define-primitive-concept C691 C334) (define-primitive-concept C692 C334) (define-primitive-concept C693 C334) (define-primitive-concept C694 C334) (define-primitive-concept C695 C334) (define-primitive-concept C696 C334) (define-primitive-concept C697 C334) (define-primitive-concept C698 C334) (define-primitive-concept C699 C334) (define-primitive-concept C700 C334) (define-primitive-concept C701 C537) (define-primitive-concept C702 C537) (define-primitive-concept C703 C326) (define-primitive-concept C704 (AND C537 C703)) (define-primitive-concept C705 C340) (define-primitive-concept C706 C705) (define-primitive-concept C707 C705) (define-primitive-concept C708 C340) (define-primitive-concept C709 C708) (define-primitive-concept C710 C708) (define-primitive-concept C711 C340) (define-primitive-concept C712 C203) (define-primitive-concept C713 C712) (define-primitive-concept C714 C712) (define-primitive-concept C715 C712) (define-primitive-concept C716 C712) (define-primitive-concept C717 C712) (define-primitive-concept C718 C712) (define-primitive-concept C719 C712) (define-primitive-concept C720 C203) (define-primitive-concept C721 C203) (define-primitive-concept C722 C203) (define-primitive-concept C723 C722) (define-primitive-concept C724 C722) (define-primitive-concept C725 (AND C723 C724)) (define-primitive-concept C726 C722) (define-primitive-concept C727 C722) (define-primitive-concept C728 C727) (define-primitive-concept C729 C728) (define-primitive-concept C730 C727) (define-primitive-concept C731 C727) (define-primitive-concept C732 C722) (define-primitive-concept C733 C203) (define-primitive-concept C734 C733) (define-primitive-concept C735 C733) (define-primitive-concept C736 C733) (define-primitive-concept C737 C733) (define-primitive-concept C738 C733) (define-primitive-concept C739 C204) (define-primitive-concept C740 C204) (define-primitive-concept C741 C204) (define-primitive-concept C742 C204) (define-primitive-concept C743 C204) (define-primitive-concept C744 C204) (define-primitive-concept C745 C204) (define-primitive-concept C746 C204) (define-primitive-concept C747 C204) (define-primitive-concept C748 C204) (define-primitive-concept C749 C204) (define-primitive-concept C750 C204) (define-primitive-concept C751 C32) (define-primitive-concept C752 C209) (define-primitive-concept C753 C216) (define-primitive-concept C754 (AND C752 C753)) (define-primitive-concept C755 C209) (define-primitive-concept C756 C209) (define-primitive-concept C757 C756) (define-primitive-concept C758 C756) (define-primitive-concept C759 C756) (define-primitive-concept C760 C756) (define-primitive-concept C761 C760) (define-primitive-concept C762 C761) (define-primitive-concept C763 C761) (define-primitive-concept C764 C761) (define-primitive-concept C765 C760) (define-primitive-concept C766 C756) (define-primitive-concept C767 C756) (define-primitive-concept C768 C767) (define-primitive-concept C769 C768) (define-primitive-concept C770 C768) (define-primitive-concept C771 C768) (define-primitive-concept C772 C771) (define-primitive-concept C773 C771) (define-primitive-concept C774 C771) (define-primitive-concept C775 C771) (define-primitive-concept C776 C771) (define-primitive-concept C777 C771) (define-primitive-concept C778 C767) (define-primitive-concept C779 C767) (define-primitive-concept C780 C759) (define-primitive-concept C781 (AND C756 C780)) (define-primitive-concept C782 C210) (define-primitive-concept C783 C210) (define-primitive-concept C784 C212) (define-primitive-concept C785 C212) (define-primitive-concept C786 C216) (define-primitive-concept C787 C753) (define-primitive-concept C788 C787) (define-primitive-concept C789 C787) (define-primitive-concept C790 C787) (define-primitive-concept C791 C787) (define-primitive-concept C792 C216) (define-primitive-concept C793 C216) (define-primitive-concept C794 C216) (define-primitive-concept C795 C216) (define-primitive-concept C796 C216) (define-primitive-concept C797 C216) (define-primitive-concept C798 C216) (define-primitive-concept C799 C216) (define-primitive-concept C800 C216) (define-primitive-concept C801 C216) (define-primitive-concept C802 C801) (define-primitive-concept C803 C216) (define-primitive-concept C804 C803) (define-primitive-concept C805 C803) (define-primitive-concept C806 C803) (define-primitive-concept C807 C216) (define-primitive-concept C808 C807) (define-primitive-concept C809 C807) (define-primitive-concept C810 C809) (define-primitive-concept C811 C809) (define-primitive-concept C812 C809) (define-primitive-concept C813 C809) (define-primitive-concept C814 C807) (define-primitive-concept C815 C814) (define-primitive-concept C816 C814) (define-primitive-concept C817 C216) (define-primitive-concept C818 C217) (define-primitive-concept C819 C217) (define-primitive-concept C820 C217) (define-primitive-concept C821 C217) (define-primitive-concept C822 C38) (define-primitive-concept C823 C822) (define-primitive-concept C824 C822) (define-primitive-concept C825 C822) (define-primitive-concept C826 C822) (define-primitive-concept C827 C38) (define-primitive-concept C828 C827) (define-primitive-concept C829 C827) (define-primitive-concept C830 C827) (define-primitive-concept C831 (AND C830 C39)) (define-primitive-concept C832 C831) (define-primitive-concept C833 C831) (define-primitive-concept C834 C831) (define-primitive-concept C835 C831) (define-primitive-concept C836 C831) (define-primitive-concept C837 C827) (define-primitive-concept C838 C38) (define-primitive-concept C839 C838) (define-primitive-concept C840 C838) (define-primitive-concept C841 C38) (define-primitive-concept C842 C841) (define-primitive-concept C843 C841) (define-primitive-concept C844 C214) (define-primitive-concept C845 C844) (define-primitive-concept C846 C844) (define-primitive-concept C847 C844) (define-primitive-concept C848 C844) (define-primitive-concept C849 C844) (define-primitive-concept C850 C844) (define-primitive-concept C851 C844) (define-primitive-concept C852 C851) (define-primitive-concept C853 C851) (define-primitive-concept C854 C851) (define-primitive-concept C855 C851) (define-primitive-concept C856 C214) (define-primitive-concept C857 C856) (define-primitive-concept C858 C856) (define-primitive-concept C859 C856) (define-primitive-concept C860 C856) (define-primitive-concept C861 C42) (define-primitive-concept C862 C42) (define-primitive-concept C863 C42) (define-primitive-concept C864 C863) (define-primitive-concept C865 C863) (define-primitive-concept C866 C863) (define-primitive-concept C867 C44) (define-primitive-concept C868 C867) (define-primitive-concept C869 C44) (define-primitive-concept C870 C869) (define-primitive-concept C871 C869) (define-primitive-concept C872 C869) (define-primitive-concept C873 C869) (define-primitive-concept C874 C869) (define-primitive-concept C875 C869) (define-primitive-concept C876 C869) (define-primitive-concept C877 C869) (define-primitive-concept C878 C869) (define-primitive-concept C879 C878) (define-primitive-concept C880 C869) (define-primitive-concept C881 C869) (define-primitive-concept C882 C869) (define-primitive-concept C883 C869) (define-primitive-concept C884 C883) (define-primitive-concept C885 C870) (define-primitive-concept C886 C870) (define-primitive-concept C887 C870) (define-primitive-concept C888 C870) (define-primitive-concept C889 C870) (define-primitive-concept C890 C870) (define-primitive-concept C891 C870) (define-primitive-concept C892 C44) (define-primitive-concept C893 C892) (define-primitive-concept C894 C893) (define-primitive-concept C895 C894) (define-primitive-concept C896 C894) (define-primitive-concept C897 C894) (define-primitive-concept C898 C894) (define-primitive-concept C899 C894) (define-primitive-concept C900 C894) (define-primitive-concept C901 C894) (define-primitive-concept C902 C894) (define-primitive-concept C903 C893) (define-primitive-concept C904 C903) (define-primitive-concept C905 C892) (define-primitive-concept C906 C905) (define-primitive-concept C907 C905) (define-primitive-concept C908 C905) (define-primitive-concept C909 C905) (define-primitive-concept C910 C905) (define-primitive-concept C911 C905) (define-primitive-concept C912 C892) (define-primitive-concept C913 C892) (define-primitive-concept C914 C913) (define-primitive-concept C915 C913) (define-primitive-concept C916 C913) (define-primitive-concept C917 C916) (define-primitive-concept C918 C913) (define-primitive-concept C919 C913) (define-primitive-concept C920 C919) (define-primitive-concept C921 C919) (define-primitive-concept C922 C913) (define-primitive-concept C923 C892) (define-primitive-concept C924 C44) (define-primitive-concept C925 C924) (define-primitive-concept C926 C925) (define-primitive-concept C927 C926) (define-primitive-concept C928 C927) (define-primitive-concept C929 C928) (define-primitive-concept C930 C928) (define-primitive-concept C931 C927) (define-primitive-concept C932 C925) (define-primitive-concept C933 C932) (define-primitive-concept C934 C924) (define-primitive-concept C935 C924) (define-primitive-concept C936 C924) (define-primitive-concept C937 C44) (define-primitive-concept C938 C937) (define-primitive-concept C939 C937) (define-primitive-concept C940 C937) (define-primitive-concept C941 C937) (define-primitive-concept C942 C937) (define-primitive-concept C943 C937) (define-primitive-concept C944 C937) (define-primitive-concept C945 C937) (define-primitive-concept C946 C937) (define-primitive-concept C947 C937) (define-primitive-concept C948 C937) (define-primitive-concept C949 C45) (define-primitive-concept C950 C949) (define-primitive-concept C951 C950) (define-primitive-concept C952 C950) (define-primitive-concept C953 C949) (define-primitive-concept C954 C953) (define-primitive-concept C955 C953) (define-primitive-concept C956 C949) (define-primitive-concept C957 C956) (define-primitive-concept C958 C957) (define-primitive-concept C959 C958) (define-primitive-concept C960 C958) (define-primitive-concept C961 C956) (define-primitive-concept C962 C961) (define-primitive-concept C963 C956) (define-primitive-concept C964 C963) (define-primitive-concept C965 C963) (define-primitive-concept C966 C963) (define-primitive-concept C967 C966) (define-primitive-concept C968 C967) (define-primitive-concept C969 C949) (define-primitive-concept C970 C969) (define-primitive-concept C971 C969) (define-primitive-concept C972 C969) (define-primitive-concept C973 C969) (define-primitive-concept C974 C969) (define-primitive-concept C975 C969) (define-primitive-concept C976 C949) (define-primitive-concept C977 C976) (define-primitive-concept C978 C977) (define-primitive-concept C979 C977) (define-primitive-concept C980 C976) (define-primitive-concept C981 C976) (define-primitive-concept C982 C981) (define-primitive-concept C983 C976) (define-primitive-concept C984 C949) (define-primitive-concept C985 C984) (define-primitive-concept C986 C984) (define-primitive-concept C987 C984) (define-primitive-concept C988 C949) (define-primitive-concept C989 C988) (define-primitive-concept C990 C989) (define-primitive-concept C991 C989) (define-primitive-concept C992 C989) (define-primitive-concept C993 C989) (define-primitive-concept C994 C989) (define-primitive-concept C995 C989) (define-primitive-concept C996 C989) (define-primitive-concept C997 C989) (define-primitive-concept C998 C988) (define-primitive-concept C999 C988) (define-primitive-concept C1000 C988) (define-primitive-concept C1001 C1000) (define-primitive-concept C1002 C1000) (define-primitive-concept C1003 C1000) (define-primitive-concept C1004 C1000) (define-primitive-concept C1005 C1000) (define-primitive-concept C1006 C1000) (define-primitive-concept C1007 C1000) (define-primitive-concept C1008 C1000) (define-primitive-concept C1009 C1000) (define-primitive-concept C1010 C988) (define-primitive-concept C1011 C988) (define-primitive-concept C1012 C988) (define-primitive-concept C1013 C45) (define-primitive-concept C1014 C1013) (define-primitive-concept C1015 C1014) (define-primitive-concept C1016 C1015) (define-primitive-concept C1017 C1015) (define-primitive-concept C1018 C1015) (define-primitive-concept C1019 C1015) (define-primitive-concept C1020 C1014) (define-primitive-concept C1021 C1020) (define-primitive-concept C1022 C1020) (define-primitive-concept C1023 (AND C1020 C1021)) (define-primitive-concept C1024 (AND C1020 C1021)) (define-primitive-concept C1025 C1014) (define-primitive-concept C1026 C1025) (define-primitive-concept C1027 C1025) (define-primitive-concept C1028 C1025) (define-primitive-concept C1029 C1014) (define-primitive-concept C1030 C1029) (define-primitive-concept C1031 C1029) (define-primitive-concept C1032 C1029) (define-primitive-concept C1033 C1013) (define-primitive-concept C1034 C1033) (define-primitive-concept C1035 C1034) (define-primitive-concept C1036 C1034) (define-primitive-concept C1037 C1034) (define-primitive-concept C1038 C1034) (define-primitive-concept C1039 C1034) (define-primitive-concept C1040 C1034) (define-primitive-concept C1041 C1034) (define-primitive-concept C1042 C1034) (define-primitive-concept C1043 C1034) (define-primitive-concept C1044 C1034) (define-primitive-concept C1045 C1034) (define-primitive-concept C1046 C1034) (define-primitive-concept C1047 C1034) (define-primitive-concept C1048 C1033) (define-primitive-concept C1049 C1033) (define-primitive-concept C1050 C1049) (define-primitive-concept C1051 C1049) (define-primitive-concept C1052 C1049) (define-primitive-concept C1053 C1052) (define-primitive-concept C1054 C1052) (define-primitive-concept C1055 C1052) (define-primitive-concept C1056 C1013) (define-primitive-concept C1057 C1056) (define-primitive-concept C1058 C1056) (define-primitive-concept C1059 C1056) (define-primitive-concept C1060 C1056) (define-primitive-concept C1061 C1056) (define-primitive-concept C1062 C1013) (define-primitive-concept C1063 C1062) (define-primitive-concept C1064 C1062) (define-primitive-concept C1065 C1062) (define-primitive-concept C1066 C45) (define-primitive-concept C1067 C1066) (define-primitive-concept C1068 C1067) (define-primitive-concept C1069 C1068) (define-primitive-concept C1070 C1068) (define-primitive-concept C1071 C1067) (define-primitive-concept C1072 C1071) (define-primitive-concept C1073 C1071) (define-primitive-concept C1074 C1071) (define-primitive-concept C1075 C1067) (define-primitive-concept C1076 C1075) (define-primitive-concept C1077 C1075) (define-primitive-concept C1078 C1075) (define-primitive-concept C1079 C1075) (define-primitive-concept C1080 C1075) (define-primitive-concept C1081 C1067) (define-primitive-concept C1082 C1081) (define-primitive-concept C1083 C1081) (define-primitive-concept C1084 C1081) (define-primitive-concept C1085 C1081) (define-primitive-concept C1086 C1067) (define-primitive-concept C1087 C1086) (define-primitive-concept C1088 C1086) (define-primitive-concept C1089 C1086) (define-primitive-concept C1090 C1066) (define-primitive-concept C1091 C1090) (define-primitive-concept C1092 C1090) (define-primitive-concept C1093 C1066) (define-primitive-concept C1094 C1093) (define-primitive-concept C1095 C1093) (define-primitive-concept C1096 C1066) (define-primitive-concept C1097 C1096) (define-primitive-concept C1098 C1097) (define-primitive-concept C1099 C1097) (define-primitive-concept C1100 C1097) (define-primitive-concept C1101 C1097) (define-primitive-concept C1102 C1066) (define-primitive-concept C1103 C1102) (define-primitive-concept C1104 C1102) (define-primitive-concept C1105 C1066) (define-primitive-concept C1106 C1105) (define-primitive-concept C1107 C1105) (define-primitive-concept C1108 C1066) (define-primitive-concept C1109 C1108) (define-primitive-concept C1110 C1109) (define-primitive-concept C1111 C1109) (define-primitive-concept C1112 C1109) (define-primitive-concept C1113 C1066) (define-primitive-concept C1114 C1113) (define-primitive-concept C1115 C1113) (define-primitive-concept C1116 C1066) (define-primitive-concept C1117 C1116) (define-primitive-concept C1118 C1117) (define-primitive-concept C1119 C1118) (define-primitive-concept C1120 C1117) (define-primitive-concept C1121 C1120) (define-primitive-concept C1122 C45) (define-primitive-concept C1123 C1122) (define-primitive-concept C1124 C1123) (define-primitive-concept C1125 C1123) (define-primitive-concept C1126 C1123) (define-primitive-concept C1127 C1122) (define-primitive-concept C1128 C1127) (define-primitive-concept C1129 C1128) (define-primitive-concept C1130 C1128) (define-primitive-concept C1131 C1127) (define-primitive-concept C1132 C1131) (define-primitive-concept C1133 C1132) (define-primitive-concept C1134 C1132) (define-primitive-concept C1135 C1131) (define-primitive-concept C1136 C1135) (define-primitive-concept C1137 C1136) (define-primitive-concept C1138 C1136) (define-primitive-concept C1139 C1136) (define-primitive-concept C1140 C1136) (define-primitive-concept C1141 C1136) (define-primitive-concept C1142 C1141) (define-primitive-concept C1143 C1141) (define-primitive-concept C1144 C1136) (define-primitive-concept C1145 C1135) (define-primitive-concept C1146 C1145) (define-primitive-concept C1147 C1145) (define-primitive-concept C1148 C1147) (define-primitive-concept C1149 C1148) (define-primitive-concept C1150 C1148) (define-primitive-concept C1151 C1145) (define-primitive-concept C1152 C1145) (define-primitive-concept C1153 C1152) (define-primitive-concept C1154 C1135) (define-primitive-concept C1155 C1154) (define-primitive-concept C1156 C1154) (define-primitive-concept C1157 C1156) (define-primitive-concept C1158 C1156) (define-primitive-concept C1159 C1156) (define-primitive-concept C1160 C1154) (define-primitive-concept C1161 C1160) (define-primitive-concept C1162 C1161) (define-primitive-concept C1163 C1154) (define-primitive-concept C1164 C1154) (define-primitive-concept C1165 C1154) (define-primitive-concept C1166 C1154) (define-primitive-concept C1167 C1166) (define-primitive-concept C1168 C1127) (define-primitive-concept C1169 C1168) (define-primitive-concept C1170 C1169) (define-primitive-concept C1171 C1169) (define-primitive-concept C1172 C1168) (define-primitive-concept C1173 C1172) (define-primitive-concept C1174 C1172) (define-primitive-concept C1175 C1127) (define-primitive-concept C1176 C1175) (define-primitive-concept C1177 C1176) (define-primitive-concept C1178 C1177) (define-primitive-concept C1179 C1177) (define-primitive-concept C1180 C1179) (define-primitive-concept C1181 C1180) (define-primitive-concept C1182 C1179) (define-primitive-concept C1183 C1176) (define-primitive-concept C1184 C1175) (define-primitive-concept C1185 C1184) (define-primitive-concept C1186 C1184) (define-primitive-concept C1187 C1184) (define-primitive-concept C1188 C1184) (define-primitive-concept C1189 C1184) (define-primitive-concept C1190 C1127) (define-primitive-concept C1191 C1190) (define-primitive-concept C1192 C1191) (define-primitive-concept C1193 C1191) (define-primitive-concept C1194 C1191) (define-primitive-concept C1195 C1191) (define-primitive-concept C1196 C1190) (define-primitive-concept C1197 C1196) (define-primitive-concept C1198 C1196) (define-primitive-concept C1199 C1190) (define-primitive-concept C1200 C1127) (define-primitive-concept C1201 C1200) (define-primitive-concept C1202 C1200) (define-primitive-concept C1203 C1122) (define-primitive-concept C1204 C1203) (define-primitive-concept C1205 C1204) (define-primitive-concept C1206 C1205) (define-primitive-concept C1207 C1205) (define-primitive-concept C1208 C1204) (define-primitive-concept C1209 C1208) (define-primitive-concept C1210 C1208) (define-primitive-concept C1211 C1208) (define-primitive-concept C1212 C1204) (define-primitive-concept C1213 C1212) (define-primitive-concept C1214 C1212) (define-primitive-concept C1215 C1204) (define-primitive-concept C1216 C1215) (define-primitive-concept C1217 C1215) (define-primitive-concept C1218 C1204) (define-primitive-concept C1219 C1218) (define-primitive-concept C1220 C1218) (define-primitive-concept C1221 C1204) (define-primitive-concept C1222 C1221) (define-primitive-concept C1223 C1221) (define-primitive-concept C1224 C1221) (define-primitive-concept C1225 C1204) (define-primitive-concept C1226 C1225) (define-primitive-concept C1227 C1225) (define-primitive-concept C1228 C1204) (define-primitive-concept C1229 C1228) (define-primitive-concept C1230 C1228) (define-primitive-concept C1231 (AND C1229 C1230)) (define-primitive-concept C1232 C1203) (define-primitive-concept C1233 C1232) (define-primitive-concept C1234 C1233) (define-primitive-concept C1235 C1233) (define-primitive-concept C1236 C1232) (define-primitive-concept C1237 C1236) (define-primitive-concept C1238 C1236) (define-primitive-concept C1239 C1232) (define-primitive-concept C1240 C1239) (define-primitive-concept C1241 C1239) (define-primitive-concept C1242 C1232) (define-primitive-concept C1243 C1242) (define-primitive-concept C1244 C1242) (define-primitive-concept C1245 C1232) (define-primitive-concept C1246 C1245) (define-primitive-concept C1247 C1245) (define-primitive-concept C1248 C1232) (define-primitive-concept C1249 C1248) (define-primitive-concept C1250 C1248) (define-primitive-concept C1251 C45) (define-primitive-concept C1252 C1251) (define-primitive-concept C1253 C1252) (define-primitive-concept C1254 C1252) (define-primitive-concept C1255 C1252) (define-primitive-concept C1256 C1252) (define-primitive-concept C1257 C1252) (define-primitive-concept C1258 C1251) (define-primitive-concept C1259 C1258) (define-primitive-concept C1260 C1259) (define-primitive-concept C1261 C1259) (define-primitive-concept C1262 C221) (define-primitive-concept C1263 C221) (define-primitive-concept C1264 C1263) (define-primitive-concept C1265 C1263) (define-primitive-concept C1266 C1263) (define-primitive-concept C1267 C1263) (define-primitive-concept C1268 C1263) (define-primitive-concept C1269 C221) (define-primitive-concept C1270 C1269) (define-primitive-concept C1271 C1269) (define-primitive-concept C1272 C1269) (define-primitive-concept C1273 C222) (define-primitive-concept C1274 C222) (define-primitive-concept C1275 C1274) (define-primitive-concept C1276 C222) (define-primitive-concept C1277 C222) (define-primitive-concept C1278 C222) (define-primitive-concept C1279 C221) (define-primitive-concept C1280 C1279) (define-primitive-concept C1281 C1279) (define-primitive-concept C1282 C220) (define-primitive-concept C1283 C1282) (define-primitive-concept C1284 C221) (define-primitive-concept C1285 C1284) (define-primitive-concept C1286 C31) (define-primitive-concept C1287 C1286) (define-primitive-concept C1288 C1286) (define-primitive-concept C1289 C31) (define-primitive-concept C1290 C1289) (define-primitive-concept C1291 (AND C1286 C1290)) (define-primitive-concept C1292 C1286) (define-primitive-concept C1293 C1286) (define-primitive-concept C1294 C1286) (define-primitive-concept C1295 C1286) (define-primitive-concept C1296 C1286) (define-primitive-concept C1297 C1286) (define-primitive-concept C1298 C1286) (define-primitive-concept C1299 (AND C1286 C1290)) (define-primitive-concept C1300 (AND C1286 C1290)) (define-primitive-concept C1301 (AND C1286 C1290)) (define-primitive-concept C1302 C1286) (define-primitive-concept C1303 C1286) (define-primitive-concept C1304 C1286) (define-primitive-concept C1305 C1286) (define-primitive-concept C1306 C1286) (define-primitive-concept C1307 C1286) (define-primitive-concept C1308 C1286) (define-primitive-concept C1309 C1286) (define-primitive-concept C1310 (AND C1286 C1290)) (define-primitive-concept C1311 (AND C1286 C1290)) (define-primitive-concept C1312 (AND C1286 C1290)) (define-primitive-concept C1313 C1286) (define-primitive-concept C1314 (AND C1286 C1290)) (define-primitive-concept C1315 C1286) (define-primitive-concept C1316 (AND C1286 C1290)) (define-primitive-concept C1317 (AND C1286 C1290)) (define-primitive-concept C1318 (AND C1286 C1290)) (define-primitive-concept C1319 C1286) (define-primitive-concept C1320 C1286) (define-primitive-concept C1321 C1286) (define-primitive-concept C1322 C1286) (define-primitive-concept C1323 C1286) (define-primitive-concept C1324 C1286) (define-primitive-concept C1325 C1286) (define-primitive-concept C1326 (AND C1286 C1290)) (define-primitive-concept C1327 (AND C1286 C1290)) (define-primitive-concept C1328 (AND C1286 C1290)) (define-primitive-concept C1329 (AND C1286 C1290)) (define-primitive-concept C1330 C1289) (define-primitive-concept C1331 C1289) (define-primitive-concept C1332 C1289) (define-primitive-concept C1333 C1289) (define-concept C1334 C1333) (define-primitive-concept C1335 C1289) (define-concept C1336 C1335) (define-primitive-concept C1337 C1289) (define-primitive-concept C1338 C1337) (define-primitive-concept C1339 C1289) (define-primitive-concept C1340 C1339) (define-primitive-concept C1341 C1289) (define-primitive-concept C1342 (AND C1339 C1341)) (define-primitive-concept C1343 C1339) (define-primitive-concept C1344 C1339) (define-primitive-concept C1345 C1339) (define-primitive-concept C1346 C1339) (define-primitive-concept C1347 C1346) (define-primitive-concept C1348 C1289) (define-primitive-concept C1349 C1348) (define-primitive-concept C1350 C1348) (define-primitive-concept C1351 C1348) (define-primitive-concept C1352 C1351) (define-primitive-concept C1353 C1289) (define-primitive-concept C1354 C1353) (define-primitive-concept C1355 C1289) (define-primitive-concept C1356 C1289) (define-primitive-concept C1357 (AND C1355 C1356)) (define-primitive-concept C1358 C1289) (define-primitive-concept C1359 C1358) (define-concept C1360 C1359) (define-primitive-concept C1361 C1358) (define-primitive-concept C1362 C1358) (define-primitive-concept C1363 C1358) (define-concept C1364 C1363) (define-primitive-concept C1365 C1358) (define-concept C1366 C1365) (define-primitive-concept C1367 C1358) (define-primitive-concept C1368 C1358) (define-primitive-concept C1369 C1358) (define-concept C1370 C1369) (define-primitive-concept C1371 C1289) (define-primitive-concept C1372 C1356) (define-primitive-concept C1373 C1356) (define-primitive-concept C1374 C1356) (define-primitive-concept C1375 C1356) (define-primitive-concept C1376 C1356) (define-primitive-concept C1377 C1356) (define-primitive-concept C1378 C1356) (define-primitive-concept C1379 C1289) (define-primitive-concept C1380 C1289) (define-primitive-concept C1381 C1380) (define-primitive-concept C1382 C1289) (define-primitive-concept C1383 C1382) (define-primitive-concept C1384 C1289) (define-primitive-concept C1385 C1384) (define-primitive-concept C1386 C1289) (define-primitive-concept C1387 C1386) (define-primitive-concept C1388 C1387) (define-primitive-concept C1389 C1387) (define-primitive-concept C1390 C1386) (define-primitive-concept C1391 C1390) (define-primitive-concept C1392 C1386) (define-primitive-concept C1393 C1386) (define-primitive-concept C1394 C1393) (define-primitive-concept C1395 C1393) (define-primitive-concept C1396 C1289) (define-primitive-concept C1397 C1289) (define-primitive-concept C1398 C1397) (define-primitive-concept C1399 C1397) (define-primitive-concept C1400 C1397) (define-primitive-concept C1401 C1397) (define-primitive-concept C1402 C1397) (define-primitive-concept C1403 C1397) (define-primitive-concept C1404 C1397) (define-primitive-concept C1405 C1397) (define-primitive-concept C1406 C1397) (define-primitive-concept C1407 C1406) (define-primitive-concept C1408 C1406) (define-primitive-concept C1409 C23) (define-primitive-concept C1410 C1409) (define-primitive-concept C1411 C1410) (define-primitive-concept C1412 C1411) (define-primitive-concept C1413 C1411) (define-primitive-concept C1414 C1411) (define-primitive-concept C1415 C1411) (define-primitive-concept C1416 C1411) (define-primitive-concept C1417 C1411) (define-primitive-concept C1418 C1411) (define-primitive-concept C1419 C1411) (define-primitive-concept C1420 C1411) (define-primitive-concept C1421 C1410) (define-primitive-concept C1422 C1421) (define-primitive-concept C1423 C1421) (define-primitive-concept C1424 C1421) (define-primitive-concept C1425 C1424) (define-primitive-concept C1426 C1409) (define-primitive-concept C1427 C1426) (define-primitive-concept C1428 C1426) (define-primitive-concept C1429 C1426) (define-primitive-concept C1430 C1429) (define-primitive-concept C1431 C1409) (define-primitive-concept C1432 C1431) (define-primitive-concept C1433 C1432) (define-primitive-concept C1434 C1409) (define-primitive-concept C1435 C1409) (define-primitive-concept C1436 C1435) (define-primitive-concept C1437 C1409) (define-primitive-concept C1438 C1437) (define-primitive-concept C1439 C1438) (define-primitive-concept C1440 C1438) (define-primitive-concept C1441 C1437) (define-primitive-concept C1442 C1409) (define-primitive-concept C1443 C1442) (define-primitive-concept C1444 C1443) (define-primitive-concept C1445 (AND C1441 C1444)) (define-primitive-concept C1446 C1441) (define-primitive-concept C1447 C1437) (define-primitive-concept C1448 C1409) (define-primitive-concept C1449 C1448) (define-primitive-concept C1450 C1409) (define-primitive-concept C1451 C1450) (define-primitive-concept C1452 C1450) (define-primitive-concept C1453 C1450) (define-primitive-concept C1454 C1450) (define-primitive-concept C1455 C1409) (define-primitive-concept C1456 C1409) (define-primitive-concept C1457 C1456) (define-primitive-concept C1458 C1409) (define-primitive-concept C1459 C1442) (define-primitive-concept C1460 C23) (define-primitive-concept C1461 C1460) (define-primitive-concept C1462 C40) (define-primitive-concept C1463 C40) (define-primitive-concept C1464 C40) (define-primitive-concept C1465 C40) (define-primitive-concept C1466 C218) (define-primitive-concept C1467 C218) (define-primitive-concept C1468 C218) (define-primitive-concept C1469 C218) (define-primitive-concept C1470 C218) (define-primitive-concept C1471 C164) (define-primitive-concept C1472 C1471) (define-primitive-concept C1473 C1471) (define-primitive-concept C1474 C1471) (define-primitive-concept C1475 C1471) (define-primitive-concept C1476 C164) (define-primitive-concept C1477 C1476) (define-primitive-concept C1478 C1476) (define-primitive-concept C1479 C1476) (define-primitive-concept C1480 C1476) (define-primitive-concept C1481 C1476) (define-primitive-concept C1482 C164) (define-primitive-concept C1483 C1482) (define-primitive-concept C1484 C1482) (define-primitive-concept C1485 C1482) (define-primitive-concept C1486 C1485) (define-primitive-concept C1487 C164) (define-primitive-concept C1488 C164) (define-primitive-concept C1489 C164) (define-primitive-concept C1490 C1489) (define-primitive-concept C1491 C1489) (define-primitive-concept C1492 C1491) (define-primitive-concept C1493 C1491) (define-primitive-concept C1494 C1489) (define-primitive-concept C1495 C1489) (define-primitive-concept C1496 C1489) (define-primitive-concept C1497 C1489) (define-primitive-concept C1498 C1490) (define-primitive-concept C1499 C1490) (define-primitive-concept C1500 C1490) (define-primitive-concept C1501 C1490) (define-primitive-concept C1502 C1490) (define-primitive-concept C1503 C1502) (define-primitive-concept C1504 C1502) (define-primitive-concept C1505 C1502) (define-primitive-concept C1506 C1490) (define-primitive-concept C1507 C1490) (define-primitive-concept C1508 C1490) (define-primitive-concept C1509 C164) (define-primitive-concept C1510 C1509) (define-primitive-concept C1511 C1509) (define-primitive-concept C1512 C164) (define-primitive-concept C1513 (AND C1509 C1512)) (define-primitive-concept C1514 C1509) (define-primitive-concept C1515 C1509) (define-primitive-concept C1516 (AND C1509 C1512)) (define-primitive-concept C1517 C1509) (define-primitive-concept C1518 C1509) (define-primitive-concept C1519 C164) (define-primitive-concept C1520 C1519) (define-primitive-concept C1521 C1520) (define-primitive-concept C1522 C1520) (define-primitive-concept C1523 C1520) (define-primitive-concept C1524 C1520) (define-primitive-concept C1525 C1519) (define-primitive-concept C1526 C1519) (define-primitive-concept C1527 C1519) (define-primitive-concept C1528 C1527) (define-primitive-concept C1529 C1527) (define-primitive-concept C1530 C1519) (define-primitive-concept C1531 C1512) (define-primitive-concept C1532 C1531) (define-primitive-concept C1533 C1531) (define-primitive-concept C1534 C1512) (define-primitive-concept C1535 C1534) (define-primitive-concept C1536 C1534) (define-primitive-concept C1537 C164) (define-primitive-concept C1538 C1537) (define-primitive-concept C1539 C1537) (define-primitive-concept C1540 C1539) (define-primitive-concept C1541 C1539) (define-primitive-concept C1542 C1537) (define-primitive-concept C1543 C1542) (define-primitive-concept C1544 C164) (define-primitive-concept C1545 C164) (define-primitive-concept C1546 C1545) (define-primitive-concept C1547 C1545) (define-primitive-concept C1548 C1545) (define-primitive-concept C1549 C1545) (define-primitive-concept C1550 C1545) (define-primitive-concept C1551 C1545) (define-primitive-concept C1552 C1545) (define-primitive-concept C1553 C1545) (define-primitive-concept C1554 C1545) (define-primitive-concept C1555 C1545) (define-primitive-concept C1556 C759) (define-primitive-concept C1557 C1556) (define-primitive-concept C1558 C759) (define-primitive-concept C1559 C1558) (define-primitive-concept C1560 C1558) (define-primitive-concept C1561 C1558) (define-primitive-concept C1562 C1558) (define-primitive-concept C1563 C1558) (define-primitive-concept C1564 C1558) (define-primitive-concept C1565 C1558) (define-primitive-concept C1566 C1558) (define-primitive-concept C1567 C1558) (define-primitive-concept C1568 C759) (define-primitive-concept C1569 (AND C1558 C1568)) (define-primitive-concept C1570 C759) (define-primitive-concept C1571 C1570) (define-primitive-concept C1572 C1570) (define-primitive-concept C1573 C1570) (define-primitive-concept C1574 (AND C1570 C1568)) (define-primitive-concept C1575 C1570) (define-primitive-concept C1576 C1570) (define-primitive-concept C1577 C1570) (define-primitive-concept C1578 C1570) (define-primitive-concept C1579 C1570) (define-primitive-concept C1580 C759) (define-primitive-concept C1581 C1580) (define-primitive-concept C1582 C1580) (define-primitive-concept C1583 C1580) (define-primitive-concept C1584 C1580) (define-primitive-concept C1585 C1580) (define-primitive-concept C1586 C1580) (define-primitive-concept C1587 C1580) (define-primitive-concept C1588 C1580) (define-primitive-concept C1589 C780) (define-primitive-concept C1590 C780) (define-primitive-concept C1591 C780) (define-primitive-concept C1592 C780) (define-primitive-concept C1593 C780) (define-primitive-concept C1594 C780) (define-primitive-concept C1595 C780) (define-primitive-concept C1596 C780) (define-primitive-concept C1597 C1596) (define-primitive-concept C1598 C1596) (define-primitive-concept C1599 C1596) (define-primitive-concept C1600 C1596) (define-primitive-concept C1601 C780) (define-primitive-concept C1602 C780) (define-primitive-concept C1603 C780) (define-primitive-concept C1604 C759) (define-primitive-concept C1605 (AND C780 C1604)) (define-primitive-concept C1606 C759) (define-primitive-concept C1607 C1606) (define-primitive-concept C1608 C1606) (define-primitive-concept C1609 C1606) (define-primitive-concept C1610 C1606) (define-primitive-concept C1611 C1568) (define-primitive-concept C1612 C1568) (define-primitive-concept C1613 C1568) (define-primitive-concept C1614 C1568) (define-primitive-concept C1615 C1568) (define-primitive-concept C1616 (AND C759 C1568)) (define-primitive-concept C1617 C1616) (define-primitive-concept C1618 C1616) (define-primitive-concept C1619 C1616) (define-primitive-concept C1620 C759) (define-primitive-concept C1621 C1620) (define-primitive-concept C1622 C1620) (define-primitive-concept C1623 C1620) (define-primitive-concept C1624 C1620) (define-primitive-concept C1625 C1620) (define-primitive-concept C1626 C1620) (define-primitive-concept C1627 C759) (define-primitive-concept C1628 C1627) (define-primitive-concept C1629 C1627) (define-primitive-concept C1630 C1627) (define-primitive-concept C1631 C1627) (define-primitive-concept C1632 C1627) (define-primitive-concept C1633 C759) (define-primitive-concept C1634 C1633) (define-primitive-concept C1635 C759) (define-primitive-concept C1636 C1635) (define-primitive-concept C1637 C1635) (define-primitive-concept C1638 C1635) (define-primitive-concept C1639 C759) (define-primitive-concept C1640 C1639) (define-primitive-concept C1641 C1639) (define-primitive-concept C1642 C1604) (define-primitive-concept C1643 C1604) (define-primitive-concept C1644 C1604) (define-primitive-concept C1645 C759) (define-primitive-concept C1646 C1645) (define-primitive-concept C1647 C1645) (define-primitive-concept C1648 C1647) (define-primitive-concept C1649 C1647) (define-primitive-concept C1650 C1647) (define-primitive-concept C1651 C1647) (define-primitive-concept C1652 C1647) (define-primitive-concept C1653 C1645) (define-primitive-concept C1654 C1645) (define-primitive-concept C1655 C759) (define-primitive-concept C1656 C1655) (define-primitive-concept C1657 C1655) (define-primitive-concept C1658 C1655) (define-primitive-concept C1659 C1658) (define-primitive-concept C1660 C1658) (define-concept C1661 (AND C103 (SOME R86 C481))) (define-concept C1662 (AND C103 (SOME R86 C469))) (define-concept C1663 (AND C103 (SOME R86 C482))) (define-concept C1664 (AND C103 (SOME R86 C497))) (define-concept C1665 (AND C103 (SOME R86 C465))) (define-concept C1666 (AND C103 (SOME R86 C461))) (define-concept C1667 (AND C103 (SOME R86 C463))) (define-concept C1668 (AND C103 (SOME R86 C460))) (define-concept C1669 (AND C103 (SOME R86 C460) (SOME R86 C465))) (define-concept C1670 (AND C1462 (SOME R146 C300))) (define-concept C1671 (AND C1462 (SOME R146 C301))) (define-concept C1672 (AND C68 (SOME R147 C1462))) (define-concept C1673 (AND C21 (SOME R232 C80))) (define-concept C1674 (AND C21 (SOME R232 C77))) (define-concept C1675 (AND C21 (SOME R232 C79))) (define-concept C1676 (AND C21 (SOME R278 C91))) (define-concept C1677 (AND C917 (SOME R202 C1136))) (define-primitive-concept C1678) (define-concept C1679 (AND C1046 (SOME R216 C1678) (SOME R218 C268))) (define-primitive-concept C1680) (define-concept C1681 (AND C1046 (SOME R216 C1680) (SOME R218 C268))) (define-primitive-concept C1682) (define-concept C1683 (AND C1046 (SOME R216 C1682) (SOME R218 C268))) (define-primitive-concept C1684) (define-concept C1685 (AND C1046 (SOME R216 C1684) (SOME R218 C268))) (define-primitive-concept C1686) (define-concept C1687 (AND C1046 (SOME R216 C1686) (SOME R218 C268))) (define-primitive-concept C1688) (define-concept C1689 (AND C1046 (SOME R216 C1688) (SOME R218 C267))) (define-primitive-concept C1690) (define-concept C1691 (AND C1046 (SOME R216 C1690) (SOME R218 C267))) (define-primitive-concept C1692) (define-concept C1693 (AND C1046 (SOME R216 C1692) (SOME R218 C267))) (define-primitive-concept C1694) (define-concept C1695 (AND C1046 (SOME R216 C1694) (SOME R218 C267))) (define-concept C1696 (AND C1046 (SOME R216 C1678) (SOME R218 C269))) (define-concept C1697 (AND C935 (SOME R202 C1254))) (define-concept C1698 (AND C935 (SOME R202 C1253))) (define-concept C1699 (AND C935 (SOME R202 C1255))) (define-concept C1700 (AND C29 (SOME R348 C1697))) (define-concept C1701 (AND C29 (SOME R348 C1698))) (define-concept C1702 (AND C29 (SOME R348 C1699))) (define-concept C1703 (AND C29 (SOME R166 C1262))) (define-concept C1704 (AND C20 (SOME R166 C1272))) (define-concept C1705 (AND C21 (SOME R166 C1272))) (define-concept C1706 (AND C31 (SOME R166 C1265))) (define-concept C1707 (AND C31 (SOME R166 C1264))) (define-concept C1708 (AND C31 (SOME R166 C1268))) (define-concept C1709 (AND C31 (SOME R166 C1267))) (define-concept C1710 (AND C920 (SOME R202 C1181))) (define-concept C1711 (AND C920 (SOME R202 C1177))) (define-concept C1712 (AND C920 (SOME R202 C1178))) (define-concept C1713 (AND C920 (SOME R202 C1179))) (define-concept C1714 (AND C920 (SOME R202 C1180))) (define-concept C1715 (AND C920 (SOME R202 C1182))) (define-concept C1716 (AND C920 (SOME R202 C1183))) (define-concept C1717 (AND C20 (SOME R268 (AND C920 (SOME R202 C1177))))) (define-concept C1718 (AND C20 (SOME R268 (AND C920 (SOME R202 C1178))))) (define-concept C1719 (AND C20 (SOME R268 (AND C920 (SOME R202 C1179))))) (define-concept C1720 (AND C20 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C1721 (AND C20 (SOME R268 (AND C920 (SOME R202 C1181))))) (define-concept C1722 (AND C21 (SOME R268 (AND C920 (SOME R202 C1178))))) (define-concept C1723 (AND C21 (SOME R268 (AND C920 (SOME R202 C1179))))) (define-concept C1724 (AND C21 (SOME R268 (AND C920 (SOME R202 C1180))))) (define-concept C1725 (AND C21 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C1726 (AND C21 (SOME R268 (AND C920 (SOME R202 C1183))))) (define-concept C1727 (AND C21 (SOME R284 (AND C917 (SOME R202 C1136))))) (define-concept C1728 (AND C20 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C1729 (AND C21 (SOME R284 (AND C917 (SOME R202 C1145))))) (define-concept C1730 (AND C159 (SOME R51 (AND C21 (SOME R268 (AND C920 (SOME R202 C1181))))))) (define-concept C1731 (AND C159 (SOME R51 (AND C21 (SOME R268 (AND C920 (SOME R202 C1179))))))) (define-concept C1732 (AND C159 (SOME R51 (AND C21 (SOME R268 (AND C920 (SOME R202 C1180))))))) (define-concept C1733 (AND C159 (SOME R51 (AND C21 (SOME R268 (AND C920 (SOME R202 C1182))))))) (define-concept C1734 (AND C159 (SOME R51 (AND C21 (SOME R268 (AND C920 (SOME R202 C1178))))))) (define-concept C1735 (AND C37 (SOME R128 C1442))) (define-concept C1736 (AND C29 (SOME R96 C794))) (define-concept C1737 (AND C793 (SOME R128 (AND C21 (SOME R282 (AND C916 (SOME R208 C1133))))))) (define-concept C1738 (AND C1735 (SOME R128 C1443))) (define-concept C1739 (AND C1735 (SOME R128 C1459))) (define-concept C1740 (AND C720 (SOME R129 C1464))) (define-concept C1741 (AND C1465 (SOME R128 C1436))) (define-concept C1742 (AND C37 (SOME R128 C1437))) (define-concept C1743 (AND C37 (SOME R128 C1441))) (define-concept C1744 (AND C21 (SOME R182 C94))) (define-concept C1745 (AND C21 (SOME R182 C95))) (define-concept C1746 (AND C21 (SOME R182 C96))) (define-concept C1747 (AND C21 (SOME R182 C97))) (define-concept C1748 (AND C21 (SOME R182 C98))) (define-concept C1749 (AND C21 (SOME R184 C94))) (define-concept C1750 (AND C21 (SOME R184 C95))) (define-concept C1751 (AND C21 (SOME R184 C96))) (define-concept C1752 (AND C21 (SOME R184 C97))) (define-concept C1753 (AND C21 (SOME R184 C98))) (define-concept C1754 (AND C21 (SOME R178 C100))) (define-concept C1755 (AND C21 (SOME R178 C101))) (define-concept C1756 (AND C21 (SOME R180 C100))) (define-concept C1757 (AND C21 (SOME R180 C101))) (define-concept C1758 (AND C341 (SOME R30 C728))) (define-concept C1759 (AND C341 (SOME R30 C730))) (define-concept C1760 (AND C341 (SOME R30 C731))) (define-concept C1761 C1760) (define-concept C1762 (AND C118 (SOME R173 (AND C45 (SOME R129 C767))))) (define-concept C1763 (AND C1731 (SOME R178 C100))) (define-concept C1764 (AND C1426 (SOME R268 (AND C920 (SOME R202 C1179))))) (define-concept C1765 (AND C159 (SOME R51 (AND C1426 (SOME R268 (AND C920 (SOME R202 C1179))))))) (define-concept C1766 (AND C29 (SOME R53 C1764))) (define-concept C1767 (AND C1705 (SOME R29 C1764))) (define-concept C1768 (AND C25 (SOME R268 (AND C920 (SOME R202 C1177))) (SOME R178 C100))) (define-concept C1769 (AND C1763 (SOME R52 C750))) (define-concept C1770 (AND C21 (SOME R29 (AND C21 (SOME R268 C1711))) (SOME R166 C1272))) (define-concept C1771 (AND C21 (SOME R29 (AND C25 (SOME R268 C1711))) (SOME R166 C1272))) (define-concept C1772 (AND C21 (SOME R30 C724))) (define-concept C1773 (AND C1425 (SOME R30 C723))) (define-concept C1774 (AND C1425 (SOME R30 C734))) (define-concept C1775 (AND C337 (SOME R30 C724))) (define-concept C1776 (AND C30 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C1777 (AND C151 (SOME R21 C1732))) (define-concept C1778 (AND C151 (SOME R96 C1743))) (define-concept C1779 (AND C1704 (SOME R29 C418))) (define-concept C1780 (AND C37 (SOME R178 C100))) (define-concept C1781 (AND C37 (SOME R180 C100))) (define-concept C1782 (AND C36 (SOME R178 C100))) (define-concept C1783 (AND C36 (SOME R180 C100))) (define-concept C1784 (AND C35 (SOME R178 C100))) (define-concept C1785 (AND C35 (SOME R180 C100))) (define-concept C1786 (AND C30 (SOME R178 C100))) (define-concept C1787 (AND C30 (SOME R180 C100))) (define-concept C1788 (AND C10 (SOME R178 C100))) (define-concept C1789 (AND C10 (SOME R180 C100))) (define-concept C1790 (AND C874 (SOME R202 C1106))) (define-concept C1791 (AND C874 (SOME R202 C1107))) (define-concept C1792 (AND C872 (SOME R208 C1026))) (define-concept C1793 (AND C872 (SOME R208 C1028))) (define-concept C1794 (AND C872 (SOME R204 C1016))) (define-concept C1795 (AND C872 (SOME R204 C1017))) (define-concept C1796 (AND C720 (SOME R348 (AND C935 (SOME R202 C1254))))) (define-concept C1797 (AND C720 (SOME R348 (AND C935 (SOME R202 C1253))) (SOME R129 C843))) (define-concept C1798 (AND C21 (SOME R30 C1797))) (define-concept C1799 (AND C308 (SOME R168 C1274))) (define-concept C1800 (AND C1799 (SOME R344 (AND C947 (SOME R202 C1000))))) (define-concept C1801 (AND C308 (SOME R168 C1273))) (define-concept C1802 (AND C21 (SOME R278 C90))) (define-concept C1803 (AND C381 (SOME R320 C1224))) (define-concept C1804 (AND C381 (SOME R320 C1222))) (define-concept C1805 (AND C152 (SOME R13 C444) (SOME R314 C1216))) (define-concept C1806 (AND C1805 (SOME R163 (AND C868 (SOME R202 C1051))))) (define-concept C1807 (AND C152 (SOME R13 C443) (SOME R314 C1216))) (define-concept C1808 (AND C1807 (SOME R163 (AND C868 (SOME R202 C1051))))) (define-concept C1809 (AND C352 (SOME R19 C465))) (define-concept C1810 (AND C1802 (SOME R284 (AND C917 (SOME R202 C1150))))) (define-concept C1811 (AND C1802 (SOME R284 (AND C917 (SOME R202 C1151))))) (define-concept C1812 (AND C1811 (SOME R13 C426))) (define-concept C1813 (AND C940 (SOME R204 C1019))) (define-concept C1814 (AND C941 (SOME R204 C1019))) (define-concept C1815 (AND C940 (SOME R204 C1017))) (define-concept C1816 (AND C940 (SOME R204 C1016))) (define-concept C1817 (AND C940 (SOME R204 C1018))) (define-concept C1818 (AND C941 (SOME R204 C1017))) (define-concept C1819 (AND C941 (SOME R204 C1016))) (define-concept C1820 (AND C941 (SOME R204 C1018))) (define-concept C1821 (AND C942 (SOME R204 C1019))) (define-concept C1822 (AND C942 (SOME R204 C1017))) (define-concept C1823 (AND C942 (SOME R204 C1016))) (define-concept C1824 (AND C942 (SOME R204 C1018))) (define-concept C1825 (AND C933 (SOME R204 C1016))) (define-concept C1826 (AND C31 (SOME R30 C1353) (SOME R30 C1349))) (define-concept C1827 (AND C1704 (SOME R29 C173))) (define-concept C1828 (AND C1704 (SOME R29 C194))) (define-concept C1829 (AND C308 (SOME R168 C1276))) (define-concept C1830 (AND C1597 (SOME R94 C461))) (define-concept C1831 (AND C1609 (SOME R94 C461))) (define-concept C1832 (AND C1289 (SOME R30 C1335) (SOME R30 C1352))) (define-concept C1833 (AND C936 (SOME R353 (AND C1352 (SOME R45 C1796))))) (define-concept C1834 (AND C1833 (SOME R204 C1016))) (define-concept C1835 (AND C767 (SOME R122 C1833))) (define-concept C1836 (AND C10 (SOME R190 C1834))) (define-concept C1837 (AND C936 (SOME R353 (AND C1342 (SOME R45 C1796))))) (define-concept C1838 (AND C1837 (SOME R204 C1016))) (define-concept C1839 (AND C767 (SOME R122 C1837))) (define-concept C1840 (AND C10 (SOME R190 C1838))) (define-concept C1841 (AND C936 (SOME R353 (AND C1338 (SOME R45 C1796))))) (define-concept C1842 (AND C1841 (SOME R204 C1016))) (define-concept C1843 (AND C767 (SOME R122 C1841))) (define-concept C1844 (AND C936 (SOME R353 (AND C1832 (SOME R45 C1796))))) (define-concept C1845 (AND C1844 (SOME R204 C1016))) (define-concept C1846 (AND C767 (SOME R122 C1844))) (define-concept C1847 (AND C936 (SOME R353 (AND C1354 (SOME R45 C1796))))) (define-concept C1848 (AND C1847 (SOME R204 C1016))) (define-concept C1849 (AND C767 (SOME R122 C1847))) (define-concept C1850 (AND C10 (SOME R190 C1848))) (define-concept C1851 (AND C936 (SOME R353 (AND C1330 (SOME R45 C749))))) (define-concept C1852 (AND C1851 (SOME R204 C1016))) (define-concept C1853 (AND C767 (SOME R122 C1851))) (define-concept C1854 (AND C10 (SOME R190 C1852))) (define-concept C1855 (AND C936 (SOME R353 (AND C1308 (SOME R45 C1796))))) (define-concept C1856 (AND C1855 (SOME R204 C1016))) (define-concept C1857 (AND C767 (SOME R122 C1855))) (define-concept C1858 (AND C10 (SOME R190 C1856))) (define-concept C1859 (AND C936 (SOME R353 (AND C1307 (SOME R45 C1796))))) (define-concept C1860 (AND C1859 (SOME R204 C1016))) (define-concept C1861 (AND C767 (SOME R122 C1859))) (define-concept C1862 (AND C10 (SOME R190 C1860))) (define-concept C1863 (AND C936 (SOME R353 (AND C1299 (SOME R45 C1796))))) (define-concept C1864 (AND C1863 (SOME R204 C1016))) (define-concept C1865 (AND C767 (SOME R122 C1863))) (define-concept C1866 (AND C10 (SOME R190 C1864))) (define-concept C1867 (AND C936 (SOME R353 (AND C1296 (SOME R45 C1796))))) (define-concept C1868 (AND C1867 (SOME R204 C1017))) (define-concept C1869 (AND C767 (SOME R122 C1867))) (define-concept C1870 (AND C10 (SOME R190 C1868))) (define-concept C1871 (AND C901 (SOME R291 (AND C176 (SOME R47 C1796))))) (define-concept C1872 (AND C1871 (SOME R204 C1016))) (define-concept C1873 (AND C767 (SOME R122 C1871))) (define-concept C1874 (AND C10 (SOME R190 C1872))) (define-concept C1875 (AND C901 (SOME R291 (AND C178 (SOME R47 C1796))))) (define-concept C1876 (AND C1875 (SOME R204 C1016))) (define-concept C1877 (AND C767 (SOME R122 C1875))) (define-concept C1878 (AND C901 (SOME R291 (AND C179 (SOME R47 C1796))))) (define-concept C1879 (AND C1878 (SOME R204 C1016))) (define-concept C1880 (AND C767 (SOME R122 C1878))) (define-concept C1881 (AND C10 (SOME R190 C1879))) (define-concept C1882 (AND C901 (SOME R291 (AND C177 (SOME R47 C1796))))) (define-concept C1883 (AND C1882 (SOME R204 C1016))) (define-concept C1884 (AND C1882 (SOME R204 C1017))) (define-concept C1885 (AND C767 (SOME R122 C1882))) (define-concept C1886 (AND C10 (SOME R190 C1883))) (define-concept C1887 (AND C10 (SOME R190 C1884))) (define-concept C1888 (AND C901 (SOME R291 (AND C180 (SOME R47 C1796))))) (define-concept C1889 (AND C1888 (SOME R204 C1016))) (define-concept C1890 (AND C1888 (SOME R204 C1017))) (define-concept C1891 (AND C767 (SOME R122 C1888))) (define-concept C1892 (AND C10 (SOME R190 C1889))) (define-concept C1893 (AND C10 (SOME R190 C1890))) (define-concept C1894 (AND C901 (SOME R291 (AND C175 (SOME R47 C1796))))) (define-concept C1895 (AND C1894 (SOME R204 C1016))) (define-concept C1896 (AND C1894 (SOME R204 C1017))) (define-concept C1897 (AND C767 (SOME R122 C1894))) (define-concept C1898 (AND C10 (SOME R190 C1895))) (define-concept C1899 (AND C936 (SOME R353 (AND C1336 (SOME R45 C1796))))) (define-concept C1900 (AND C1899 (SOME R204 C1016))) (define-concept C1901 (AND C1899 (SOME R204 C1017))) (define-concept C1902 (AND C767 (SOME R122 C1899))) (define-concept C1903 (AND C10 (SOME R190 C1901))) (define-concept C1904 (AND C175 (SOME R272 (AND C915 (SOME R212 C1024))))) (define-concept C1905 (AND C175 (SOME R272 (AND C915 (SOME R212 C1023))))) (define-concept C1906 (AND C175 (SOME R270 (AND C914 (SOME R202 C1197))))) (define-concept C1907 (AND C901 (SOME R291 (AND C1906 (SOME R47 C1796))) (SOME R204 C1016))) (define-concept C1908 (AND C901 (SOME R291 (AND C1904 (SOME R47 C1796))) (SOME R204 C1016))) (define-concept C1909 (AND C901 (SOME R291 (AND C1905 (SOME R47 C1796))) (SOME R204 C1016))) (define-concept C1910 (AND C10 (SOME R190 C1908))) (define-concept C1911 (AND C10 (SOME R190 C1909))) (define-concept C1912 (AND C10 (SOME R190 C1907) (SOME R190 C1909) (SOME R190 C1901))) (define-concept C1913 (AND C805 (SOME R94 (AND C175 (SOME R47 C1796))))) (define-concept C1914 (AND C767 (SOME R34 (AND C805 (SOME R94 (AND C175 (SOME R47 C1796))) (SOME R386 (AND C885 (SOME R206 C1679))))))) (define-concept C1915 (AND C134 (SOME R129 (AND C1913 (SOME R386 (AND C885 (SOME R206 C1679))) (SOME R368 (AND C875 (SOME R202 C1114))))))) (define-concept C1916 (AND C1915 (SOME R294 (AND C900 (SOME R204 C1016))))) (define-concept C1917 (AND C118 (SOME R173 (AND C1122 (SOME R203 (AND C892 (SOME R201 C67))) (SOME R129 C772))))) (define-concept C1918 (AND C772 (SOME R152 C1492))) (define-concept C1919 (AND C772 (SOME R152 C1493))) (define-concept C1920 (AND C768 (SOME R122 (AND C874 (SOME R373 C300) (SOME R173 (AND C53 (SOME R405 C1394))))))) (define-concept C1921 (AND C1106 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1394))))))) (define-concept C1922 (AND C1107 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1394))))))) (define-concept C1923 (AND C781 (SOME R126 C749))) (define-concept C1924 (AND C749 (SOME R166 C1280))) (define-concept C1925 (AND C1923 (SOME R152 C1520))) (define-concept C1926 (AND C1924 (SOME R129 C1925))) (define-concept C1927 (AND C1923 (SOME R152 C1527))) (define-concept C1928 (AND C1923 (SOME R34 (AND C803 (SOME R94 C749) (SOME R104 C394))))) (define-concept C1929 (AND C1924 (SOME R129 C1928))) (define-concept C1930 (AND C773 (SOME R98 C1924))) (define-concept C1931 (AND C1930 (SOME R128 (AND C52 (SOME R407 C300))))) (define-concept C1932 (AND C1930 (SOME R128 (AND C53 (SOME R407 C300))))) (define-concept C1933 (AND C770 (SOME R34 C1930) (SOME R34 C1920))) (define-concept C1934 (AND C781 (SOME R126 C720))) (define-concept C1935 (AND C720 (SOME R166 C1280))) (define-concept C1936 (AND C1934 (SOME R150 C1527) (SOME R94 C333))) (define-concept C1937 (AND C1934 (SOME R150 C1527) (SOME R94 C331))) (define-concept C1938 (AND C770 (SOME R34 (AND C773 (SOME R94 C1935))))) (define-concept C1939 (AND C1938 (SOME R128 (AND C52 (SOME R407 C300))))) (define-concept C1940 (AND C1938 (SOME R128 (AND C53 (SOME R407 C300))))) (define-concept C1941 (AND C767 (SOME R122 (AND C873 (SOME R367 (AND C864 (SOME R94 C194))))))) (define-concept C1942 (AND C1704 (SOME R29 C173) (SOME R30 C1826))) (define-concept C1943 (AND C1704 (SOME R29 C173) (SOME R30 C1383))) (define-concept C1944 (AND C300 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C1945 (AND C300 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C1946 (AND C194 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C1947 (AND C194 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C1948 (AND C194 (SOME R96 C864))) (define-concept C1949 (AND C300 (SOME R96 C864))) (define-concept C1950 (AND C118 (SOME R173 (AND C1093 (SOME R129 C1941))))) (define-concept C1951 (AND C118 (SOME R173 (AND C1094 (SOME R129 (AND C1941 (SOME R34 (AND C772 (SOME R122 (AND C914 (SOME R271 C194))) (SOME R128 C1193))))))))) (define-concept C1952 (AND C118 (SOME R173 (AND C1095 (SOME R129 (AND C1941 (SOME R34 (AND C772 (SOME R122 (AND C914 (SOME R271 C194))) (SOME R128 C1192))))))))) (define-concept C1953 (AND C33 (SOME R128 (AND C300 (SOME R90 (AND C34 (SOME R368 (AND C875 (SOME R202 C1115))))))))) (define-concept C1954 (AND C33 (SOME R128 (AND C300 (SOME R332 (AND C939 (SOME R202 C952))))))) (define-concept C1955 (AND C1394 (SOME R131 (AND C862 (SOME R91 C1406) (SOME R366 (AND C873 (SOME R202 C1095))))))) (define-concept C1956 (AND C1394 (SOME R131 (AND C862 (SOME R91 C1406) (SOME R366 (AND C873 (SOME R202 C1094))))))) (define-concept C1957 (AND C1394 (SOME R90 (AND C33 (SOME R128 (AND C300 (SOME R90 (AND C34 (SOME R368 (AND C875 (SOME R202 C1115))))))))))) (define-concept C1958 (AND C1394 (SOME R90 (AND C33 (SOME R128 (AND C300 (SOME R332 (AND C939 (SOME R202 C952))))))))) (define-primitive-concept C1959 C1394) (define-primitive-concept C1960 C1394) (define-primitive-concept C1961 C1394) (define-primitive-concept C1962 C1394) (define-primitive-concept C1963 C1394) (define-primitive-concept C1964 C1394) (define-primitive-concept C1965 C1394) (define-primitive-concept C1966 C1394) (define-primitive-concept C1967 C1394) (define-primitive-concept C1968 C1394) (define-primitive-concept C1969 C1394) (define-primitive-concept C1970 C1394) (define-primitive-concept C1971 C1394) (define-primitive-concept C1972 C1394) (define-primitive-concept C1973 C1394) (define-primitive-concept C1974 C1959) (define-primitive-concept C1975 C1959) (define-primitive-concept C1976 C1959) (define-primitive-concept C1977 C1975) (define-primitive-concept C1978 C1975) (define-primitive-concept C1979 C1975) (define-primitive-concept C1980 C1975) (define-primitive-concept C1981 C1975) (define-primitive-concept C1982 C1975) (define-primitive-concept C1983 C1975) (define-primitive-concept C1984 C1975) (define-primitive-concept C1985 C1976) (define-primitive-concept C1986 C1976) (define-primitive-concept C1987 C1976) (define-primitive-concept C1988 C1976) (define-primitive-concept C1989 C1976) (define-primitive-concept C1990 C1976) (define-primitive-concept C1991 C1960) (define-primitive-concept C1992 C1960) (define-primitive-concept C1993 C1960) (define-primitive-concept C1994 C1961) (define-primitive-concept C1995 C1961) (define-primitive-concept C1996 C1961) (define-primitive-concept C1997 C1961) (define-primitive-concept C1998 C1962) (define-primitive-concept C1999 C1962) (define-primitive-concept C2000 C1963) (define-primitive-concept C2001 C1963) (define-primitive-concept C2002 C1963) (define-primitive-concept C2003 C1963) (define-primitive-concept C2004 C1964) (define-primitive-concept C2005 C1964) (define-primitive-concept C2006 C1964) (define-primitive-concept C2007 C1965) (define-primitive-concept C2008 C1965) (define-primitive-concept C2009 C1966) (define-primitive-concept C2010 C1966) (define-primitive-concept C2011 C1966) (define-primitive-concept C2012 C1966) (define-primitive-concept C2013 C1395) (define-primitive-concept C2014 C1395) (define-primitive-concept C2015 C1395) (define-primitive-concept C2016 C1395) (define-primitive-concept C2017 C1395) (define-primitive-concept C2018 C1395) (define-concept C2019 (AND C1106 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1975))))))) (define-concept C2020 (AND C1107 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1975))))))) (define-concept C2021 (AND C1106 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1979))))))) (define-concept C2022 (AND C1107 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1979))))))) (define-concept C2023 (AND C1106 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1994))))))) (define-concept C2024 (AND C1107 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1994))))))) (define-concept C2025 (AND C1106 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1976))))))) (define-concept C2026 (AND C1107 (SOME R203 (AND C874 (SOME R173 (AND C53 (SOME R405 C1976))))))) (define-primitive-concept C2027 C300) (define-primitive-concept C2028 C300) (define-primitive-concept C2029 C300) (define-primitive-concept C2030 C300) (define-primitive-concept C2031 C300) (define-primitive-concept C2032 C300) (define-primitive-concept C2033 C300) (define-primitive-concept C2034 C300) (define-primitive-concept C2035 C300) (define-primitive-concept C2036 C300) (define-primitive-concept C2037 C300) (define-primitive-concept C2038 C300) (define-primitive-concept C2039 C300) (define-primitive-concept C2040 C300) (define-primitive-concept C2041 C300) (define-primitive-concept C2042 C300) (define-primitive-concept C2043 C300) (define-primitive-concept C2044 C300) (define-primitive-concept C2045 C300) (define-primitive-concept C2046 C300) (define-primitive-concept C2047 C300) (define-primitive-concept C2048 C300) (define-primitive-concept C2049 C300) (define-primitive-concept C2050 C300) (define-primitive-concept C2051 C300) (define-primitive-concept C2052 C300) (define-primitive-concept C2053 C300) (define-primitive-concept C2054 C300) (define-primitive-concept C2055 C300) (define-primitive-concept C2056 C2027) (define-primitive-concept C2057 C2028) (define-primitive-concept C2058 C2028) (define-primitive-concept C2059 C2029) (define-primitive-concept C2060 C2030) (define-primitive-concept C2061 C2031) (define-primitive-concept C2062 C2032) (define-primitive-concept C2063 C2032) (define-primitive-concept C2064 C2032) (define-primitive-concept C2065 C2033) (define-primitive-concept C2066 C2033) (define-primitive-concept C2067 C2033) (define-primitive-concept C2068 C2035) (define-primitive-concept C2069 C2035) (define-primitive-concept C2070 C2035) (define-primitive-concept C2071 C2035) (define-primitive-concept C2072 C2035) (define-primitive-concept C2073 C2035) (define-primitive-concept C2074 C2035) (define-primitive-concept C2075 C2035) (define-primitive-concept C2076 C2035) (define-primitive-concept C2077 C2035) (define-primitive-concept C2078 C2035) (define-primitive-concept C2079 C2035) (define-primitive-concept C2080 C2035) (define-primitive-concept C2081 C2035) (define-concept C2082 C2073) (define-concept C2083 C2071) (define-primitive-concept C2084 C2036) (define-primitive-concept C2085 C2036) (define-primitive-concept C2086 C2036) (define-primitive-concept C2087 C2037) (define-primitive-concept C2088 C2037) (define-primitive-concept C2089 C2037) (define-primitive-concept C2090 C2037) (define-primitive-concept C2091 C2037) (define-primitive-concept C2092 C2037) (define-primitive-concept C2093 C2037) (define-primitive-concept C2094 C2037) (define-primitive-concept C2095 C2037) (define-primitive-concept C2096 C2037) (define-primitive-concept C2097 C2087) (define-primitive-concept C2098 C2088) (define-primitive-concept C2099 C2088) (define-primitive-concept C2100 C2088) (define-primitive-concept C2101 C2088) (define-primitive-concept C2102 C2089) (define-primitive-concept C2103 C2090) (define-primitive-concept C2104 C2091) (define-primitive-concept C2105 C2091) (define-primitive-concept C2106 C2092) (define-primitive-concept C2107 C2093) (define-primitive-concept C2108 C2093) (define-primitive-concept C2109 C2093) (define-primitive-concept C2110 C2093) (define-primitive-concept C2111 C2093) (define-primitive-concept C2112 C2093) (define-primitive-concept C2113 C2093) (define-primitive-concept C2114 C2093) (define-primitive-concept C2115 C2093) (define-primitive-concept C2116 C2093) (define-primitive-concept C2117 C2093) (define-primitive-concept C2118 C2093) (define-primitive-concept C2119 C2093) (define-primitive-concept C2120 C2093) (define-primitive-concept C2121 C2093) (define-primitive-concept C2122 C2093) (define-primitive-concept C2123 C2093) (define-primitive-concept C2124 C2093) (define-primitive-concept C2125 C2093) (define-primitive-concept C2126 C2093) (define-primitive-concept C2127 C2093) (define-primitive-concept C2128 C2093) (define-primitive-concept C2129 C2093) (define-primitive-concept C2130 C2093) (define-primitive-concept C2131 C2093) (define-primitive-concept C2132 C2093) (define-primitive-concept C2133 C2093) (define-primitive-concept C2134 C2093) (define-primitive-concept C2135 C2093) (define-primitive-concept C2136 C2093) (define-primitive-concept C2137 C2093) (define-primitive-concept C2138 C2093) (define-primitive-concept C2139 C2093) (define-primitive-concept C2140 C2093) (define-primitive-concept C2141 C2093) (define-primitive-concept C2142 C2107) (define-primitive-concept C2143 C2108) (define-primitive-concept C2144 C2113) (define-primitive-concept C2145 C2094) (define-primitive-concept C2146 C2095) (define-primitive-concept C2147 C2095) (define-primitive-concept C2148 C2095) (define-primitive-concept C2149 C2095) (define-primitive-concept C2150 C2096) (define-primitive-concept C2151 C2096) (define-primitive-concept C2152 C2096) (define-primitive-concept C2153 C2038) (define-primitive-concept C2154 C2039) (define-primitive-concept C2155 C2039) (define-primitive-concept C2156 C2040) (define-primitive-concept C2157 C2041) (define-primitive-concept C2158 C2042) (define-primitive-concept C2159 C2043) (define-primitive-concept C2160 C2043) (define-primitive-concept C2161 C2044) (define-primitive-concept C2162 C2044) (define-primitive-concept C2163 C2044) (define-primitive-concept C2164 C2044) (define-primitive-concept C2165 C2044) (define-primitive-concept C2166 C2044) (define-primitive-concept C2167 C2044) (define-primitive-concept C2168 C2044) (define-primitive-concept C2169 C2046) (define-primitive-concept C2170 C2046) (define-primitive-concept C2171 C2047) (define-primitive-concept C2172 C2048) (define-primitive-concept C2173 C2049) (define-primitive-concept C2174 C2051) (define-primitive-concept C2175 C2051) (define-primitive-concept C2176 C2052) (define-primitive-concept C2177 C2052) (define-primitive-concept C2178 C2052) (define-primitive-concept C2179 C2052) (define-primitive-concept C2180 C2052) (define-primitive-concept C2181 C2052) (define-primitive-concept C2182 C2052) (define-primitive-concept C2183 C2052) (define-primitive-concept C2184 C2052) (define-primitive-concept C2185 C2053) (define-primitive-concept C2186 C2054) (define-primitive-concept C2187 C2055) (define-primitive-concept C2188 C2045) (define-primitive-concept C2189 C2045) (define-primitive-concept C2190 C2045) (define-primitive-concept C2191 C2045) (define-primitive-concept C2192 C2045) (define-primitive-concept C2193 C2045) (define-primitive-concept C2194 C2050) (define-primitive-concept C2195 C2050) (define-primitive-concept C2196 C2050) (define-primitive-concept C2197 C2050) (define-primitive-concept C2198 C2050) (define-primitive-concept C2199 C2034) (define-primitive-concept C2200 C2034) (define-primitive-concept C2201 C303) (define-primitive-concept C2202 C2201) (define-primitive-concept C2203 C303) (define-primitive-concept C2204 C2203) (define-primitive-concept C2205 C2112) (define-primitive-concept C2206 C2120) (define-primitive-concept C2207 C2110) (define-primitive-concept C2208 C68) (define-primitive-concept C2209 C2208) (define-primitive-concept C2210 C2209) (define-primitive-concept C2211 C2209) (define-primitive-concept C2212 C2208) (define-primitive-concept C2213 C2212) (define-primitive-concept C2214 C2212) (define-primitive-concept C2215 C2212) (define-primitive-concept C2216 C2212) (define-primitive-concept C2217 C2212) (define-primitive-concept C2218 C2208) (define-primitive-concept C2219 C2218) (define-primitive-concept C2220 C2208) (define-primitive-concept C2221 C2220) (define-primitive-concept C2222 C2208) (define-primitive-concept C2223 C2208) (define-primitive-concept C2224 C2223) (define-primitive-concept C2225 C2223) (define-primitive-concept C2226 C2208) (define-primitive-concept C2227 C2208) (define-primitive-concept C2228 C2227) (define-primitive-concept C2229 C2227) (define-primitive-concept C2230 C2227) (define-primitive-concept C2231 C2208) (define-concept C2232 (AND C861 (SOME R360 (AND C877 (SOME R202 C1100))))) (define-concept C2233 (AND C861 (SOME R360 (AND C877 (SOME R202 C1101))))) (define-concept C2234 (AND C861 (SOME R360 (AND C877 (SOME R202 C1098))))) (define-concept C2235 (AND C861 (SOME R360 (AND C877 (SOME R202 C1099))))) (define-concept C2236 (AND C300 (SOME R282 (AND C916 (SOME R202 C1157))))) (define-concept C2237 (AND C300 (SOME R282 (AND C916 (SOME R202 C1164))))) (define-concept C2238 (AND C194 (SOME R276 (AND C921 (SOME R202 C1189))))) (define-concept C2239 (AND C300 (SOME R276 (AND C921 (SOME R202 C1189))))) (define-concept C2240 (AND C34 (SOME R128 C197))) (define-concept C2241 (AND C803 (SOME R94 C1386) (SOME R102 C21))) (define-concept C2242 (AND C2241 (SOME R368 (AND C875 (SOME R202 C1114))))) (define-concept C2243 (AND C2241 (SOME R368 (AND C875 (SOME R202 C1114))) (SOME R398 (AND C890 (SOME R202 C1084))))) (define-concept C2244 (AND C2241 (SOME R368 (AND C875 (SOME R202 C1114))) (SOME R398 (AND C890 (SOME R202 C1083))))) (define-concept C2245 (AND C803 (SOME R98 C1386) (SOME R102 C497))) (define-concept C2246 (AND C803 (SOME R98 C1386) (SOME R102 C333))) (define-concept C2247 (AND C803 (SOME R98 C1386) (SOME R102 C341))) (define-primitive-concept C2248 C181) (define-primitive-concept C2249 C1387) (define-primitive-concept C2250 C1387) (define-primitive-concept C2251 C1387) (define-primitive-concept C2252 C1387) (define-primitive-concept C2253 C1387) (define-primitive-concept C2254 C1386) (define-primitive-concept C2255 C2254) (define-primitive-concept C2256 C2254) (define-primitive-concept C2257 C2254) (define-primitive-concept C2258 C2254) (define-primitive-concept C2259 C2254) (define-primitive-concept C2260 C2254) (define-primitive-concept C2261 C2254) (define-primitive-concept C2262 C2254) (define-primitive-concept C2263 C2254) (define-primitive-concept C2264 C2254) (define-primitive-concept C2265 C2254) (define-primitive-concept C2266 C2254) (define-primitive-concept C2267 C2254) (define-concept C2268 (AND C902 (SOME R204 C1016) (SOME R297 C383))) (define-concept C2269 (AND C902 (SOME R210 C1030) (SOME R297 C383))) (define-concept C2270 (AND C902 (SOME R210 C1032) (SOME R297 C383))) (define-concept C2271 (AND C803 (SOME R98 C1352))) (define-concept C2272 (AND C803 (SOME R94 C29) (SOME R102 C181))) (define-concept C2273 (AND C803 (SOME R102 C181) (SOME R104 C720) (SOME R98 C1352))) (define-concept C2274 (AND C1709 (SOME R133 C1467))) (define-concept C2275 (AND C7 (SOME R133 C1467))) (define-concept C2276 (AND C29 (SOME R133 C1467))) (define-concept C2277 (AND C32 (SOME R133 C1467))) (define-concept C2278 (AND C885 (SOME R387 C1467))) (define-concept C2279 (AND C874 (SOME R173 (AND C53 (SOME R405 C1357))))) (define-concept C2280 (AND C874 (SOME R173 (AND C53 (SOME R405 C1357))) (SOME R202 C1107))) (define-concept C2281 (AND C874 (SOME R173 (AND C53 (SOME R405 C1357))) (SOME R202 C1106))) (define-concept C2282 (AND C803 (SOME R104 C720) (SOME R102 C181) (SOME R98 C1352) (SOME R366 (AND C873 (SOME R202 C1095))) (SOME R134 (AND C181 (SOME R372 (AND C874 (SOME R173 (AND C53 (SOME R405 C1357))) (SOME R202 C1107))))))) (define-concept C2283 (AND C803 (SOME R104 C720) (SOME R102 C181) (SOME R98 C1352) (SOME R366 (AND C873 (SOME R202 C1095))) (SOME R134 (AND C1357 (SOME R404 C52))))) (define-concept C2284 (AND C803 (SOME R104 C720) (SOME R102 C181) (SOME R98 C1352) (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C2285 (AND C1467 (SOME R34 (AND C803 (SOME R104 C720) (SOME R102 C181) (SOME R98 C1352) (SOME R366 (AND C873 (SOME R202 C1095))) (SOME R134 (AND C181 (SOME R372 (AND C874 (SOME R173 (AND C53 (SOME R405 C1357))) (SOME R202 C1107))))))))) (define-concept C2286 (AND C1467 (SOME R34 (AND C803 (SOME R104 C720) (SOME R102 C181) (SOME R98 C1352) (SOME R366 (AND C873 (SOME R202 C1095))) (SOME R134 (AND C1357 (SOME R404 C52))))))) (define-concept C2287 (AND C1467 (SOME R364 (AND C879 (SOME R202 C1112))))) (define-primitive-concept C2288 C128) (define-concept C2289 (AND C2288 (SOME R330 C71))) (define-concept C2290 (AND C2288 (SOME R330 C72))) (define-concept C2291 (AND C347 (SOME R29 C461))) (define-concept C2292 (AND C348 (SOME R29 C461))) (define-concept C2293 (AND C349 (SOME R29 C461))) (define-concept C2294 (AND C351 (SOME R25 C461))) (define-concept C2295 (AND C350 (SOME R25 C461))) (define-concept C2296 (AND C325 (SOME R25 C516))) (define-concept C2297 (AND C1758 (SOME R25 C518))) (define-concept C2298 (AND C1732 (SOME R51 C518))) (define-concept C2299 (AND C718 (SOME R29 (AND C1705 (SOME R29 C518))))) (define-concept C2300 (AND C718 (SOME R29 (AND C1705 (SOME R29 C516))))) (define-concept C2301 (AND C718 (SOME R29 (AND C1705 (SOME R29 C522))))) (define-concept C2302 (AND C793 (SOME R128 (AND C21 (SOME R282 (AND C916 (SOME R208 C1134))))))) (define-concept C2303 (AND C2302 (SOME R91 C341))) (define-concept C2304 (AND C2302 (SOME R91 C1758))) (define-concept C2305 (AND C2302 (SOME R91 C1759))) (define-concept C2306 (AND C2302 (SOME R91 C1760))) (define-concept C2307 (AND C749 (SOME R46 C194))) (define-concept C2308 (AND C749 (SOME R46 C175))) (define-concept C2309 (AND C749 (SOME R44 C750))) (define-concept C2310 (AND C749 (SOME R44 C1352))) (define-concept C2311 (AND C749 (SOME R44 C1377))) (define-concept C2312 (AND C1044 (SOME R203 (AND C1287 (SOME R350 C1260) (SOME R45 C749))))) (define-concept C2313 (AND C1044 (SOME R203 (AND C1287 (SOME R350 C1260) (SOME R45 (AND C29 (SOME R348 (AND C935 (SOME R202 C1254))))))))) (define-concept C2314 (AND C796 (SOME R98 C749))) (define-concept C2315 (AND C803 (SOME R93 C511) (SOME R98 C749))) (define-concept C2316 (AND C2315 (SOME R102 C200) (SOME R104 C518))) (define-concept C2317 (AND C2305 (SOME R368 (AND C875 (SOME R202 C1114))) (SOME R398 (AND C890 (SOME R202 C1083))) (SOME R390 (AND C891 (SOME R204 C1016))))) (define-concept C2318 (AND C2317 (SOME R136 C1825))) (define-concept C2319 (AND C202 (SOME R110 C511))) (define-concept C2320 (AND C202 (SOME R110 C516))) (define-concept C2321 (AND C202 (SOME R110 C518))) (define-concept C2322 (AND C53 (SOME R407 (AND C202 (SOME R110 C511))))) (define-concept C2323 (AND C1742 (SOME R110 C461))) (define-concept C2324 (AND C1462 (SOME R135 C2323))) (define-concept C2325 (AND C2323 (SOME R134 C219))) (define-concept C2326 (AND C2323 (SOME R146 C1709))) (define-concept C2327 (AND C2324 (SOME R146 C300))) (define-concept C2328 (AND C2324 (SOME R146 C2044))) (define-concept C2329 (AND C1769 (SOME R110 C461))) (define-concept C2330 (AND C1742 (SOME R110 C515))) (define-concept C2331 (AND C1742 (SOME R110 C518))) (define-concept C2332 (AND C2331 (SOME R134 C1462))) (define-concept C2333 (AND C2331 (SOME R134 C219))) (define-concept C2334 (AND C2331 (SOME R146 C1709))) (define-concept C2335 (AND C1742 (SOME R110 C520))) (define-concept C2336 (AND C851 (SOME R194 C2316))) (define-concept C2337 (AND C2316 (SOME R368 (AND C875 (SOME R202 C1115))))) (define-concept C2338 (AND C2316 (SOME R370 (AND C872 (SOME R212 C1023))))) (define-concept C2339 (AND C2316 (SOME R370 (AND C872 (SOME R212 C1024))))) (define-concept C2340 (AND C2316 (SOME R390 (AND C891 (SOME R208 C1026))))) (define-concept C2341 (AND C2304 (SOME R91 C2297) (SOME R368 (AND C875 (SOME R202 C1115))))) (define-concept C2342 (AND C2337 (SOME R136 (AND C1577 (SOME R98 C522))))) (define-concept C2343 (AND C10 (SOME R190 (AND C1114 (SOME R203 (AND C875 (SOME R369 C2336))))) (SOME R190 (AND C53 (SOME R407 C1931))))) (define-concept C2344 (AND C797 (SOME R128 (AND C21 (SOME R109 C1448))))) (define-concept C2345 (AND C544 (SOME R109 C1448))) (define-concept C2346 (AND C797 (SOME R98 C544) (SOME R128 C2345))) (define-concept C2347 (AND C10 (SOME R190 (AND C1114 (SOME R203 (AND C875 (SOME R369 C2342))))) (SOME R190 (AND C53 (SOME R407 C2345))))) (define-concept C2348 (AND C1331 (SOME R44 C1299) (SOME R44 C1305))) (define-concept C2349 (AND C1534 (SOME R129 (AND C755 (SOME R154 C111))))) (define-concept C2350 (AND C151 (SOME R284 (AND C917 (SOME R202 C1145))) (SOME R17 C574) (SOME R90 C807))) (define-concept C2351 (AND C723 (SOME R29 C2350))) (define-concept C2352 (AND C723 (SOME R29 C21))) (define-concept C2353 (AND C337 (SOME R90 (AND C794 (SOME R98 C747))))) (define-concept C2354 (AND C563 (SOME R24 C2353))) (define-concept C2355 (AND C159 (SOME R51 (AND C563 (SOME R268 (AND C920 (SOME R202 C1180))))))) (define-concept C2356 (AND C1775 (SOME R25 C563) (SOME R48 C2355))) (define-concept C2357 (AND C1775 (SOME R25 C2354) (SOME R48 C2355))) (define-concept C2358 (AND C339 (SOME R25 C563))) (define-concept C2359 (AND C1778 (SOME R19 C2353) (SOME R163 (AND C868 (SOME R202 C1051))))) (define-concept C2360 (AND C1778 (SOME R19 C2353) (SOME R163 (AND C868 (SOME R202 C1052))))) (define-concept C2361 (AND C563 (SOME R96 C808))) (define-concept C2362 (AND C563 (SOME R96 C809))) (define-concept C2363 (AND C563 (SOME R96 (AND C807 (SOME R182 C95))))) (define-concept C2364 (AND C882 (SOME R383 (AND C807 (SOME R94 C563))))) (define-concept C2365 (AND C27 (SOME R109 C759))) (define-concept C2366 (AND C2365 (SOME R52 (AND C720 (SOME R404 C52))))) (define-concept C2367 (AND C661 (SOME R19 C603))) (define-concept C2368 (AND C660 (SOME R19 C603))) (define-concept C2369 (AND C654 (SOME R19 C603))) (define-concept C2370 (AND C654 (SOME R19 C603) (SOME R312 C1207))) (define-concept C2371 (AND C654 (SOME R19 C603) (SOME R312 C1206))) (define-concept C2372 (AND C663 (SOME R19 (AND C27 (SOME R49 C2370) (SOME R49 C2371))))) (define-concept C2373 (AND C655 (SOME R19 C603) (SOME R312 C1207))) (define-concept C2374 (AND C655 (SOME R19 C603) (SOME R312 C1206))) (define-concept C2375 (AND C657 (SOME R63 C624) (SOME R19 C603))) (define-concept C2376 (AND C657 (SOME R63 C625) (SOME R19 C603))) (define-concept C2377 (AND C657 (SOME R63 C630) (SOME R19 C603))) (define-concept C2378 (AND C2350 (SOME R19 C2372))) (define-concept C2379 (AND C2350 (SOME R19 C2371))) (define-concept C2380 (AND C2350 (SOME R19 C2370))) (define-concept C2381 (AND C2350 (SOME R24 C2379) (SOME R24 C2380) (SOME R24 C2378))) (define-concept C2382 (AND C661 (SOME R19 C605))) (define-concept C2383 (AND C660 (SOME R19 C605))) (define-concept C2384 (AND C656 (SOME R312 C1206))) (define-concept C2385 (AND C661 (SOME R19 C600))) (define-concept C2386 (AND C660 (SOME R19 C600))) (define-concept C2387 (AND C655 (SOME R19 C600) (SOME R312 C1207))) (define-concept C2388 (AND C655 (SOME R19 C600) (SOME R312 C1206))) (define-concept C2389 (AND C654 (SOME R19 C600) (SOME R312 C1207))) (define-concept C2390 (AND C654 (SOME R19 C600) (SOME R312 C1206))) (define-concept C2391 (AND C661 (SOME R19 C601))) (define-concept C2392 (AND C660 (SOME R19 C601))) (define-concept C2393 (AND C657 (SOME R19 C601))) (define-concept C2394 (AND C661 (SOME R19 C602))) (define-concept C2395 (AND C660 (SOME R19 C602))) (define-concept C2396 (AND C654 (SOME R19 C604) (SOME R312 C1207))) (define-concept C2397 (AND C654 (SOME R19 C604) (SOME R312 C1206))) (define-concept C2398 (AND C655 (SOME R19 C604) (SOME R312 C1207))) (define-concept C2399 (AND C655 (SOME R19 C604) (SOME R312 C1206))) (define-concept C2400 (AND C656 (SOME R312 C1207))) (define-concept C2401 (AND C658 (SOME R19 C604))) (define-concept C2402 (AND C657 (SOME R19 C2401))) (define-concept C2403 (AND C345 (SOME R60 C631))) (define-concept C2404 (AND C345 (SOME R60 C632))) (define-concept C2405 (AND C339 (SOME R60 C2403) (SOME R62 C597))) (define-concept C2406 (AND C339 (SOME R60 C2404) (SOME R62 C597))) (define-concept C2407 (AND C339 (SOME R24 C2405) (SOME R24 C2406))) (define-concept C2408 (AND C657 (SOME R19 C604) (SOME R63 C711))) (define-concept C2409 (AND C2350 (SOME R19 C2401))) (define-concept C2410 (AND C2350 (SOME R19 C597))) (define-concept C2411 (AND C563 (SOME R24 C2410) (SOME R24 C2378))) (define-concept C2412 (AND C343 (SOME R242 (AND C907 (SOME R208 C1246) (SOME R174 C597))))) (define-concept C2413 (AND C359 (SOME R27 C563))) (define-concept C2414 (AND C359 (SOME R27 C566))) (define-concept C2415 (AND C359 (SOME R312 C1207) (SOME R27 C566))) (define-concept C2416 (AND C359 (SOME R312 C1206) (SOME R27 C566))) (define-concept C2417 (AND C355 (SOME R314 C1216) (SOME R19 C2415))) (define-concept C2418 (AND C355 (SOME R314 C1216) (SOME R19 C2416))) (define-concept C2419 (AND C339 (SOME R60 C2417) (SOME R62 C2418))) (define-concept C2420 (AND C159 (SOME R51 C566))) (define-concept C2421 (AND C1775 (SOME R25 C566) (SOME R48 C2420))) (define-concept C2422 (AND C151 (SOME R21 C2420))) (define-concept C2423 (AND C2422 (SOME R244 (AND C910 (SOME R208 C1240) (SOME R174 C597))))) (define-concept C2424 (AND C566 (SOME R96 (AND C807 (SOME R382 (AND C882 (SOME R212 C1024))))))) (define-concept C2425 (AND C882 (SOME R383 (AND C813 (SOME R98 C566))))) (define-concept C2426 (AND C882 (SOME R383 (AND C811 (SOME R98 C566))))) (define-concept C2427 (AND C882 (SOME R383 (AND C810 (SOME R98 C566))))) (define-concept C2428 (AND C882 (SOME R383 (AND C812 (SOME R98 C566))))) (define-concept C2429 (AND C882 (SOME R383 (AND C807 (SOME R98 C566))))) (define-concept C2430 (AND C843 (SOME R98 C720))) (define-concept C2431 (AND C765 (SOME R126 (AND C66 (SOME R338 C944))) (SOME R128 (AND C66 (SOME R338 (AND C944 (SOME R202 C975))))))) (define-concept C2432 (AND C765 (SOME R128 (AND C66 (SOME R338 (AND C944 (SOME R202 C970))))))) (define-concept C2433 (AND C765 (SOME R128 (AND C66 (SOME R338 (AND C944 (SOME R202 C971))))))) (define-concept C2434 (AND C765 (SOME R128 (AND C66 (SOME R338 (AND C944 (SOME R202 C973))))))) (define-concept C2435 (AND C765 (SOME R128 (AND C66 (SOME R338 (AND C944 (SOME R202 C972))))))) (define-concept C2436 (AND C765 (SOME R128 (AND C66 (SOME R338 (AND C944 (SOME R202 C974))))))) (define-concept C2437 (AND C1648 (SOME R150 C1490))) (define-concept C2438 (AND C1648 (SOME R150 C1502))) (define-concept C2439 (AND C759 (SOME R34 C2437))) (define-concept C2440 (AND C759 (SOME R34 C2438))) (define-concept C2441 (AND C1642 (SOME R94 C1731))) (define-concept C2442 (AND C1647 (SOME R150 C1544))) (define-concept C2443 (AND C164 (SOME R151 C2440))) (define-primitive-concept C2444 C332) (define-primitive-concept C2445 C332) (define-primitive-concept C2446 C332) (define-primitive-concept C2447 C332) (define-primitive-concept C2448 C332) (define-primitive-concept C2449 C332) (define-primitive-concept C2450 C332) (define-primitive-concept C2451 C332) (define-primitive-concept C2452 C332) (define-primitive-concept C2453 C332) (define-primitive-concept C2454 C332) (define-primitive-concept C2455 C332) (define-primitive-concept C2456 C332) (define-primitive-concept C2457 C332) (define-primitive-concept C2458 C332) (define-primitive-concept C2459 C332) (define-primitive-concept C2460 C332) (define-primitive-concept C2461 C332) (define-primitive-concept C2462 C332) (define-primitive-concept C2463 C332) (define-primitive-concept C2464 C332) (define-primitive-concept C2465 C332) (define-primitive-concept C2466 C332) (define-primitive-concept C2467 C332) (define-primitive-concept C2468 C332) (define-primitive-concept C2469 C332) (define-primitive-concept C2470 C332) (define-primitive-concept C2471 C332) (define-primitive-concept C2472 C332) (define-primitive-concept C2473 C332) (define-primitive-concept C2474 C332) (define-primitive-concept C2475 C332) (define-primitive-concept C2476 C332) (define-primitive-concept C2477 C332) (define-primitive-concept C2478 C332) (define-primitive-concept C2479 C332) (define-primitive-concept C2480 C332) (define-primitive-concept C2481 C332) (define-primitive-concept C2482 C332) (define-primitive-concept C2483 C332) (define-primitive-concept C2484 (AND C332 C2483)) (define-primitive-concept C2485 (AND C332 C2483)) (define-primitive-concept C2486 C332) (define-primitive-concept C2487 C332) (define-primitive-concept C2488 (AND C332 C2487)) (define-primitive-concept C2489 (AND C332 C2487)) (define-primitive-concept C2490 C332) (define-primitive-concept C2491 C332) (define-primitive-concept C2492 C332) (define-primitive-concept C2493 C332) (define-primitive-concept C2494 C332) (define-primitive-concept C2495 C332) (define-primitive-concept C2496 C332) (define-primitive-concept C2497 C332) (define-primitive-concept C2498 C332) (define-primitive-concept C2499 C332) (define-primitive-concept C2500 C332) (define-primitive-concept C2501 C332) (define-primitive-concept C2502 C332) (define-primitive-concept C2503 C332) (define-primitive-concept C2504 C332) (define-primitive-concept C2505 C332) (define-primitive-concept C2506 C332) (define-primitive-concept C2507 C332) (define-primitive-concept C2508 C334) (define-primitive-concept C2509 C334) (define-primitive-concept C2510 C334) (define-primitive-concept C2511 C334) (define-primitive-concept C2512 C334) (define-primitive-concept C2513 C334) (define-primitive-concept C2514 C334) (define-primitive-concept C2515 C334) (define-primitive-concept C2516 C334) (define-primitive-concept C2517 C334) (define-primitive-concept C2518 C334) (define-primitive-concept C2519 C334) (define-primitive-concept C2520 C334) (define-primitive-concept C2521 C334) (define-primitive-concept C2522 C334) (define-primitive-concept C2523 C334) (define-primitive-concept C2524 C334) (define-primitive-concept C2525 C334) (define-concept C2526 C2512) (define-concept C2527 C2519) (define-concept C2528 C2519) (define-concept C2529 C2520) (define-concept C2530 C2520) (define-concept C2531 (AND C759 (SOME R94 C460))) (define-concept C2532 (AND C1561 (SOME R94 C325))) (define-concept C2533 (AND C1561 (SOME R94 C460))) (define-concept C2534 (AND C786 (SOME R98 C1796))) (define-primitive-concept C2535 C336) (define-primitive-concept C2536 C537) (define-primitive-concept C2537 C537) (define-primitive-concept C2538 C537) (define-primitive-concept C2539 C342) (define-primitive-concept C2540 C346) (define-primitive-concept C2541 (AND C703 C1474)) (define-primitive-concept C2542 C1466) (define-primitive-concept C2543 C1742) (define-primitive-concept C2544 C1742) (define-primitive-concept C2545 C1742) (define-primitive-concept C2546 C1742) (define-concept C2547 (AND C332 (SOME R232 C78))) (define-concept C2548 (AND C332 (SOME R232 C80))) (define-concept C2549 (AND C717 (SOME R29 C331))) (define-concept C2550 (AND C1809 (SOME R320 C1224))) (define-concept C2551 (AND C1809 (SOME R320 C1223))) (define-concept C2552 (AND C1809 (SOME R320 C1222))) (define-concept C2553 (AND C2550 (SOME R310 C1230))) (define-concept C2554 (AND C2550 (SOME R310 C1229))) (define-concept C2555 (AND C2551 (SOME R310 C1230))) (define-concept C2556 (AND C2551 (SOME R310 C1229))) (define-concept C2557 (AND C2552 (SOME R310 C1230))) (define-concept C2558 (AND C2552 (SOME R310 C1229))) (define-concept C2559 (AND C701 (SOME R310 C1229))) (define-concept C2560 (AND C701 (SOME R310 C1230))) (define-concept C2561 (AND C702 (SOME R310 C1229))) (define-concept C2562 (AND C702 (SOME R310 C1230))) (define-concept C2563 (AND C1705 (SOME R29 C460))) (define-primitive-concept C2564 C2563) (define-primitive-concept C2565 C2563) (define-primitive-concept C2566 C2563) (define-primitive-concept C2567 C2563) (define-primitive-concept C2568 C2563) (define-primitive-concept C2569 C2563) (define-primitive-concept C2570 C2563) (define-primitive-concept C2571 C2563) (define-primitive-concept C2572 C2563) (define-concept C2573 (AND C1705 (SOME R29 C2559) (SOME R29 C2560))) (define-concept C2574 (AND C1705 (SOME R29 C2561) (SOME R29 C2562))) (define-concept C2575 (AND C674 (SOME R310 C1229))) (define-concept C2576 (AND C674 (SOME R310 C1230))) (define-concept C2577 (AND C703 (SOME R76 C2561) (SOME R78 C2559))) (define-concept C2578 (AND C703 (SOME R76 C2559) (SOME R78 C673))) (define-concept C2579 (AND C703 (SOME R76 C2562) (SOME R78 C2560))) (define-concept C2580 (AND C703 (SOME R76 C2560) (SOME R78 C2445))) (define-concept C2581 (AND C325 (SOME R76 C702) (SOME R78 C701))) (define-concept C2582 (AND C27 (SOME R49 C460) (SOME R49 C2538))) (define-concept C2583 (AND C1761 (SOME R92 C806))) (define-concept C2584 C2583) (define-concept C2585 (AND C2583 (SOME R19 C2573))) (define-concept C2586 (AND C2583 (SOME R19 C701))) (define-concept C2587 (AND C2583 (SOME R19 C2559))) (define-concept C2588 (AND C2583 (SOME R19 C2560))) (define-concept C2589 (AND C806 (SOME R93 C1761) (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C2590 (AND C806 (SOME R93 C2587) (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C2591 (AND C806 (SOME R93 C2588) (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C2592 (AND C1705 (SOME R29 C331))) (define-concept C2593 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C103 (SOME R86 C465))))))) (define-concept C2594 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C103 (SOME R86 C460) (SOME R86 C465))))))) (define-concept C2595 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C103 (SOME R86 C460) (SOME R86 C465) (SOME R396 (AND C889 (SOME R202 C1072))))))))) (define-concept C2596 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C103 (SOME R86 C460) (SOME R86 C465) (SOME R396 (AND C889 (SOME R202 C1074))))))))) (define-concept C2597 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C103 (SOME R86 C460))))))) (define-concept C2598 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C1668 (SOME R133 C1665))))))) (define-concept C2599 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C1668 (SOME R133 C1665) (SOME R396 (AND C889 (SOME R202 C1072))))))))) (define-concept C2600 (AND C1742 (SOME R94 C1809))) (define-concept C2601 (AND C1742 (SOME R98 C2554))) (define-concept C2602 (AND C1742 (SOME R98 C2556))) (define-concept C2603 (AND C1742 (SOME R98 C2558))) (define-concept C2604 (AND C1742 (SOME R98 C2553))) (define-concept C2605 (AND C1742 (SOME R98 C2555))) (define-concept C2606 (AND C1742 (SOME R98 C2557))) (define-concept C2607 (AND C1798 (SOME R110 (AND C331 (SOME R70 C465))))) (define-concept C2608 (AND C1436 (SOME R108 C465))) (define-concept C2609 (AND C1453 (SOME R76 C674) (SOME R78 C686))) (define-concept C2610 (AND C824 (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C2611 (AND C10 (SOME R190 (AND C53 (SOME R407 C2610))))) (define-concept C2612 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C824 (SOME R370 C1794))))))) (define-concept C2613 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C460 (SOME R272 (AND C915 (SOME R204 C1170))))))))) (define-concept C2614 (AND C1451 (SOME R110 C460))) (define-concept C2615 (AND C1457 (SOME R110 C331))) (define-concept C2616 (AND C1457 (SOME R110 C674))) (define-concept C2617 (AND C1457 (SOME R110 C673))) (define-concept C2618 (AND C1457 (SOME R110 C460))) (define-concept C2619 (AND C1457 (SOME R110 C701))) (define-concept C2620 (AND C1457 (SOME R110 C702))) (define-concept C2621 (AND C1453 (SOME R110 C460))) (define-concept C2622 (AND C1735 (SOME R98 C1761))) (define-concept C2623 (AND C1739 (SOME R98 C1761))) (define-concept C2624 (AND C759 (SOME R94 C703))) (define-concept C2625 (AND C1561 (SOME R94 C703))) (define-concept C2626 (AND C2610 (SOME R141 C2531))) (define-concept C2627 (AND C2610 (SOME R141 C2541))) (define-concept C2628 (AND C2610 (SOME R141 C2533))) (define-concept C2629 (AND C2610 (SOME R141 C2625))) (define-concept C2630 (AND C1737 (SOME R98 C460))) (define-concept C2631 (AND C1737 (SOME R98 C701))) (define-concept C2632 (AND C1737 (SOME R98 C702))) (define-concept C2633 (AND C1737 (SOME R98 C360))) (define-concept C2634 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C2539 (SOME R178 C100))))))) (define-concept C2635 (AND C1451 (SOME R110 C2540))) (define-concept C2636 (AND C1451 (SOME R110 C2539))) (define-concept C2637 (AND C1738 (SOME R98 C2539))) (define-concept C2638 (AND C1735 (SOME R94 C2539))) (define-concept C2639 (AND C1414 (SOME R110 C2539))) (define-concept C2640 (AND C1630 (SOME R93 C2539) (SOME R366 (AND C873 (SOME R202 C1095))))) (define-concept C2641 (AND C1630 (SOME R93 C2539) (SOME R368 (AND C875 (SOME R202 C1115))))) (define-concept C2642 (AND C1741 (SOME R98 C2539) (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2643 (AND C2543 (SOME R128 C1447))) (define-concept C2644 (AND C2543 (SOME R138 (AND C1641 (SOME R98 C460))))) (define-concept C2645 (AND C2543 (SOME R396 (AND C889 (SOME R202 C1074))))) (define-concept C2646 (AND C2543 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2647 (AND C2545 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2648 (AND C2545 (SOME R396 (AND C889 (SOME R202 C1073))))) (define-concept C2649 (AND C2545 (SOME R134 C1462))) (define-concept C2650 (AND C2545 (SOME R134 (AND C1462 (SOME R146 C300))))) (define-concept C2651 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C341 (SOME R178 C100))))))) (define-concept C2652 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C1761 (SOME R178 C100))))))) (define-concept C2653 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C1796 (SOME R53 C333) (SOME R354 (AND C927 (SOME R204 C1016))))))))) (define-concept C2654 (AND C927 (SOME R355 (AND C1796 (SOME R53 C333))) (SOME R204 C1016))) (define-concept C2655 (AND C2610 (SOME R138 C2654))) (define-concept C2656 (AND C2610 (SOME R93 C2536))) (define-concept C2657 (AND C2610 (SOME R93 C2537))) (define-concept C2658 (AND C2657 (SOME R129 C2656))) (define-concept C2659 (AND C1668 (SOME R138 C833))) (define-concept C2660 (AND C27 (SOME R49 C2538) (SOME R49 C460))) (define-concept C2661 (AND C2660 (SOME R52 C720))) (define-concept C2662 (AND C10 (SOME R190 (AND C53 (SOME R407 C1466))))) (define-concept C2663 (AND C1466 (SOME R136 C1434))) (define-concept C2664 (AND C1466 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2665 (AND C1466 (SOME R396 (AND C889 (SOME R202 C1074))))) (define-concept C2666 (AND C1466 (SOME R133 C103))) (define-concept C2667 (AND C1668 (SOME R134 C1466))) (define-concept C2668 (AND C1666 (SOME R134 C1466))) (define-concept C2669 (AND C103 (SOME R86 C461) (SOME R86 C460) (SOME R133 C1466))) (define-concept C2670 (AND C1668 (SOME R139 C1465))) (define-concept C2671 (AND C1668 (SOME R139 (AND C1465 (SOME R396 (AND C889 (SOME R202 C1072))))))) (define-concept C2672 (AND C1668 (SOME R139 (AND C1465 (SOME R396 (AND C889 (SOME R202 C1074))))))) (define-concept C2673 (AND C1435 (SOME R108 C1761))) (define-concept C2674 (AND C1465 (SOME R98 C1761))) (define-concept C2675 (AND C1436 (SOME R110 C1761))) (define-concept C2676 (AND C1741 (SOME R98 C1761))) (define-concept C2677 (AND C2675 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2678 (AND C2677 (SOME R112 C2571) (SOME R112 C2567))) (define-concept C2679 (AND C2677 (SOME R112 C2567) (SOME R112 C2573))) (define-concept C2680 (AND C2677 (SOME R112 C2569) (SOME R320 C1224))) (define-concept C2681 (AND C1436 (SOME R112 (AND C713 (SOME R29 (AND C2563 (SOME R29 C2559))))))) (define-concept C2682 (AND C1465 (SOME R98 (AND C713 (SOME R29 (AND C2563 (SOME R29 C2559))))))) (define-concept C2683 (AND C2676 (SOME R392 (AND C888 (SOME R202 C1087))))) (define-concept C2684 (AND C10 (SOME R190 (AND C53 (SOME R407 (AND C1780 (SOME R139 C2683))))))) (define-concept C2685 (AND C853 (SOME R139 C2674) (SOME R194 C2674))) (define-concept C2686 (AND C1442 (SOME R112 C2549))) (define-concept C2687 (AND C1780 (SOME R128 C2686))) (define-concept C2688 (AND C2687 (SOME R94 C665))) (define-concept C2689 (AND C37 (SOME R128 C1452))) (define-concept C2690 (AND C37 (SOME R128 C1440))) (define-concept C2691 (AND C37 (SOME R128 C1439))) (define-concept C2692 (AND C37 (SOME R128 C1451))) (define-concept C2693 (AND C37 (SOME R128 C1438))) (define-concept C2694 (AND C103 (SOME R86 C504))) (define-concept C2695 (AND C1734 (SOME R51 C415))) (define-primitive-concept C2696 C128) (define-concept C2697 (AND C803 (SOME R93 C483))) (define-concept C2698 (AND C794 (SOME R98 C740) (SOME R91 C497))) (define-concept C2699 (AND C1440 (SOME R110 C469) (SOME R146 C1376))) (define-concept C2700 (AND C37 (SOME R128 C1445))) (define-concept C2701 (AND C37 (SOME R128 C1445))) (define-concept C2702 (AND C1441 (SOME R110 C482))) (define-concept C2703 (AND C37 (SOME R128 C2702))) (define-concept C2704 (AND C1441 (SOME R110 C497))) (define-concept C2705 (AND C2697 (SOME R368 (AND C875 (SOME R202 C1115))))) (define-concept C2706 (AND C1115 (SOME R203 (AND C875 (SOME R369 C2697))))) (define-concept C2707 (AND C21 (SOME R137 C2705))) (define-concept C2708 (AND C800 (SOME R93 C501) (SOME R368 (AND C875 (SOME R202 C1115))))) (define-concept C2709 (AND C800 (SOME R93 C501) (SOME R368 (AND C875 (SOME R202 C1115))) (SOME R178 C100))) (define-concept C2710 (AND C1114 (SOME R203 (AND C875 (SOME R369 (AND C800 (SOME R93 C501))))))) (define-concept C2711 (AND C1115 (SOME R203 (AND C875 (SOME R369 (AND C800 (SOME R93 C501))))))) (define-concept C2712 (AND C55 (SOME R160 C1454))) (define-concept C2713 (AND C37 (SOME R128 C2712))) (define-concept C2714 (AND C55 (SOME R160 C1430))) (define-concept C2715 (AND C37 (SOME R128 C2714))) (define-concept C2716 (AND C37 (SOME R128 C1427))) (define-concept C2717 (AND C801 (SOME R178 C100))) (define-concept C2718 (AND C1066 (SOME R203 (AND C869 (SOME R201 (AND C801 (SOME R178 C100))))))) (define-concept C2719 (AND C1705 (SOME R29 C497))) (define-concept C2720 (AND C1705 (SOME R29 C481))) (define-concept C2721 (AND C1705 (SOME R29 C505))) (define-concept C2722 (AND C1705 (SOME R29 C500))) (define-concept C2723 (AND C718 (SOME R29 (AND C1705 (SOME R29 C497))))) (define-concept C2724 (AND C1440 (SOME R110 C497))) (define-concept C2725 (AND C1440 (SOME R110 C500))) (define-concept C2726 (AND C1439 (SOME R110 C497))) (define-concept C2727 (AND C1441 (SOME R110 C481))) (define-concept C2728 (AND C1441 (SOME R110 C505))) (define-concept C2729 (AND C1742 (SOME R128 C2704))) (define-concept C2730 (AND C1742 (SOME R128 C2727))) (define-concept C2731 (AND C1742 (SOME R128 C2728))) (define-concept C2732 (AND C2729 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2733 (AND C2729 (SOME R396 (AND C889 (SOME R202 C1074))))) (define-concept C2734 (AND C1448 (SOME R110 C718))) (define-concept C2735 (AND C1448 (SOME R110 C2723))) (define-concept C2736 C2735) (define-concept C2737 (AND C1443 (SOME R110 C718))) (define-concept C2738 (AND C1443 (SOME R110 C2723))) (define-concept C2739 C2738) (define-concept C2740 (AND C1464 (SOME R110 C2719))) (define-concept C2741 C2740) (define-concept C2742 (AND C1464 (SOME R110 C2720))) (define-concept C2743 (AND C1452 (SOME R110 C2719))) (define-concept C2744 (AND C1452 (SOME R110 C2722))) (define-concept C2745 (AND C2724 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2746 (AND C2724 (SOME R396 (AND C889 (SOME R202 C1074))))) (define-concept C2747 (AND C2726 (SOME R396 (AND C889 (SOME R202 C1072))))) (define-concept C2748 (AND C2729 (SOME R143 (AND C840 (SOME R94 (AND C1341 (SOME R166 C1262))))))) (define-primitive-concept C2749 C2729) (implies (AND C28 (SOME R404 C51)) (SOME R406 C51)) (implies (AND C7 (SOME R404 C51)) (SOME R406 C51)) (implies (AND C66 (SOME R404 C51)) (SOME R406 C51)) (implies (AND C54 (SOME R404 C51)) (SOME R406 C51)) (implies (AND C21 (SOME R129 (AND C37 (SOME R184 C94)))) (SOME R184 C94)) (implies (AND C30 (SOME R129 (AND C37 (SOME R184 C94)))) (SOME R184 C94)) (implies (AND C21 (SOME R129 (AND C37 (SOME R180 C100)))) (SOME R180 C100)) (implies (AND C30 (SOME R129 (AND C37 (SOME R180 C100)))) (SOME R180 C100)) (implies (AND C37 (SOME R128 (AND C30 (SOME R184 C94)))) (SOME R184 C94)) (implies (AND C37 (SOME R128 (AND C21 (SOME R184 C94)))) (SOME R184 C94)) (implies (AND C37 (SOME R128 (AND C21 (SOME R180 C100)))) (SOME R180 C100)) (implies (AND C37 (SOME R128 (AND C30 (SOME R180 C100)))) (SOME R180 C100)) (implies C23 (SOME R180 C100)) (implies C39 (SOME R184 C94)) (implies C40 (SOME R180 C100)) (implies C38 (SOME R180 C101)) (implies C25 (SOME R184 C98)) (implies (AND C21 (SOME R180 C100)) (SOME R178 C100)) (implies (AND C30 (SOME R180 C100)) (SOME R178 C100)) (implies (AND C37 (SOME R180 C100)) (SOME R178 C100)) (implies (AND C10 (SOME R180 C100)) (SOME R178 C100)) (implies (AND C36 (SOME R180 C100)) (SOME R178 C100)) (implies (AND C35 (SOME R180 C100)) (SOME R178 C100)) (implies (AND C7 (SOME R129 C37) (SOME R180 C100)) (SOME R178 C100)) (implies (AND C28 (SOME R129 C37) (SOME R180 C100)) (SOME R178 C100)) (implies (AND C32 (SOME R129 C37) (SOME R180 C100)) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C21 (SOME R180 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C30 (SOME R180 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C37 (SOME R180 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C10 (SOME R180 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C36 (SOME R180 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C35 (SOME R180 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R180 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R180 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R180 C100)))) (SOME R178 C100)) (implies (AND C52 (SOME R407 (AND C21 (SOME R180 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C30 (SOME R180 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C37 (SOME R180 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C10 (SOME R180 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C36 (SOME R180 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C35 (SOME R180 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R180 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R180 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R180 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C21 (SOME R180 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C30 (SOME R180 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C37 (SOME R180 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C10 (SOME R180 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C36 (SOME R180 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C35 (SOME R180 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R180 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R180 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R180 C100)))) (SOME R178 C101)) (implies (AND C21 (SOME R184 C94)) (SOME R182 C94)) (implies (AND C30 (SOME R184 C94)) (SOME R182 C94)) (implies (AND C37 (SOME R184 C94)) (SOME R182 C94)) (implies (AND C10 (SOME R184 C94)) (SOME R182 C94)) (implies (AND C36 (SOME R184 C94)) (SOME R182 C94)) (implies (AND C35 (SOME R184 C94)) (SOME R182 C94)) (implies (AND C7 (SOME R129 C37) (SOME R184 C94)) (SOME R182 C94)) (implies (AND C28 (SOME R129 C37) (SOME R184 C94)) (SOME R182 C94)) (implies (AND C32 (SOME R129 C37) (SOME R184 C94)) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C21 (SOME R184 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C30 (SOME R184 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C37 (SOME R184 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C10 (SOME R184 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C36 (SOME R184 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C35 (SOME R184 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R184 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R184 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R184 C94)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C21 (SOME R184 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C30 (SOME R184 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C37 (SOME R184 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C10 (SOME R184 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C36 (SOME R184 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C35 (SOME R184 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R184 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R184 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R184 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C21 (SOME R184 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C30 (SOME R184 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C37 (SOME R184 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C10 (SOME R184 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C36 (SOME R184 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C35 (SOME R184 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R184 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R184 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R184 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C21 (SOME R184 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C30 (SOME R184 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C37 (SOME R184 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C10 (SOME R184 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C36 (SOME R184 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C35 (SOME R184 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND (AND C7 (SOME R129 C37)) (SOME R184 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND (AND C28 (SOME R129 C37)) (SOME R184 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND (AND C32 (SOME R129 C37)) (SOME R184 C98)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C21 (SOME R178 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C30 (SOME R178 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C37 (SOME R178 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C10 (SOME R178 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C36 (SOME R178 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C35 (SOME R178 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C54 (SOME R178 C100)))) (SOME R178 C100)) (implies (AND C53 (SOME R407 (AND C21 (SOME R178 C100)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C30 (SOME R178 C100)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C37 (SOME R178 C100)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C10 (SOME R178 C100)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C36 (SOME R178 C100)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C35 (SOME R178 C100)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C100)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C100)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C100)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C54 (SOME R178 C100)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C21 (SOME R178 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C30 (SOME R178 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C37 (SOME R178 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C10 (SOME R178 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C36 (SOME R178 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C35 (SOME R178 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C54 (SOME R178 C100)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C21 (SOME R178 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C30 (SOME R178 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C37 (SOME R178 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C10 (SOME R178 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C36 (SOME R178 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C35 (SOME R178 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C100)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C54 (SOME R178 C100)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C21 (SOME R178 C101)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C30 (SOME R178 C101)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C37 (SOME R178 C101)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C10 (SOME R178 C101)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C36 (SOME R178 C101)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C35 (SOME R178 C101)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C101)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C101)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C101)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C54 (SOME R178 C101)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C21 (SOME R178 C101)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C30 (SOME R178 C101)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C37 (SOME R178 C101)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C10 (SOME R178 C101)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C36 (SOME R178 C101)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C35 (SOME R178 C101)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C101)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C101)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C101)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C54 (SOME R178 C101)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C21 (SOME R178 C101)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C30 (SOME R178 C101)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C37 (SOME R178 C101)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C10 (SOME R178 C101)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C36 (SOME R178 C101)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C35 (SOME R178 C101)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C7 (SOME R129 C37) (SOME R178 C101)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C28 (SOME R129 C37) (SOME R178 C101)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C32 (SOME R129 C37) (SOME R178 C101)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C54 (SOME R178 C101)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C21 (SOME R182 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C30 (SOME R182 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C37 (SOME R182 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C10 (SOME R182 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C36 (SOME R182 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C35 (SOME R182 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C7 (SOME R129 C37) (SOME R182 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C28 (SOME R129 C37) (SOME R182 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C32 (SOME R129 C37) (SOME R182 C98)))) (SOME R182 C94)) (implies (AND C52 (SOME R407 (AND C54 (SOME R182 C98)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C21 (SOME R182 C98)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C30 (SOME R182 C98)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C37 (SOME R182 C98)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C10 (SOME R182 C98)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C36 (SOME R182 C98)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C35 (SOME R182 C98)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R182 C98)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R182 C98)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R182 C98)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C54 (SOME R182 C98)))) (SOME R182 C98)) (implies (AND C53 (SOME R407 (AND C21 (SOME R182 C98)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C30 (SOME R182 C98)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C37 (SOME R182 C98)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C10 (SOME R182 C98)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C36 (SOME R182 C98)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C35 (SOME R182 C98)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R182 C98)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R182 C98)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R182 C98)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C54 (SOME R182 C98)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C21 (SOME R182 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C30 (SOME R182 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C37 (SOME R182 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C10 (SOME R182 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C36 (SOME R182 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C35 (SOME R182 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C7 (SOME R129 C37) (SOME R182 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C28 (SOME R129 C37) (SOME R182 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C32 (SOME R129 C37) (SOME R182 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C54 (SOME R182 C94)))) (SOME R182 C98)) (implies (AND C52 (SOME R407 (AND C21 (SOME R182 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C30 (SOME R182 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C37 (SOME R182 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C10 (SOME R182 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C36 (SOME R182 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C35 (SOME R182 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C7 (SOME R129 C37) (SOME R182 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C28 (SOME R129 C37) (SOME R182 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C32 (SOME R129 C37) (SOME R182 C94)))) (SOME R178 C101)) (implies (AND C52 (SOME R407 (AND C54 (SOME R182 C94)))) (SOME R178 C101)) (implies (AND C53 (SOME R407 (AND C21 (SOME R182 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C30 (SOME R182 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C37 (SOME R182 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C10 (SOME R182 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C36 (SOME R182 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C35 (SOME R182 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C7 (SOME R129 C37) (SOME R182 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C28 (SOME R129 C37) (SOME R182 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C32 (SOME R129 C37) (SOME R182 C94)))) (SOME R182 C94)) (implies (AND C53 (SOME R407 (AND C54 (SOME R182 C94)))) (SOME R182 C94)) (implies C1462 (SOME R146 C68)) (implies C157 (SOME R278 C91)) (implies C469 (SOME R410 C62)) (implies (AND C157 (SOME R410 C61) (SOME R232 C77) (SOME R238 (AND C906 (SOME R202 C1208)))) (SOME R410 C62)) (implies (AND C21 (SOME R232 C79)) (SOME R410 C61)) (implies C29 (SOME R280 C85)) (implies C1429 (SOME R280 C82)) (implies C24 (SOME R280 C82)) (implies C1409 (SOME R280 C82)) (implies C164 (SOME R280 C82)) (implies C167 (SOME R280 C82)) (implies C27 (SOME R280 C82)) (implies C67 (SOME R280 C82)) (implies C201 (SOME R280 C82)) (implies C154 (SOME R280 C82)) (implies C156 (SOME R280 C82)) (implies C157 (SOME R280 C82)) (implies C152 (SOME R280 C82)) (implies C151 (SOME R280 C82)) (implies C155 (SOME R280 C82)) (implies (AND C20 (SOME R268 (AND C920 (SOME R202 C1177)))) (SOME R280 C82)) (implies C1427 (SOME R280 C82)) (implies C1355 (SOME R166 C1264)) (implies C1358 (SOME R166 C1268)) (implies C1397 (SOME R166 C1265)) (implies C1386 (SOME R166 C1267)) (implies C326 (SOME R166 C1285)) (implies C1672 (SOME R170 C1283)) (implies C1283 (SOME R171 C1672)) (implies C18 (SOME R282 (AND C916 (SOME R202 C1136)))) (implies C19 (SOME R282 (AND C916 (SOME R202 C1145)))) (implies (AND C21 (SOME R268 (AND C920 (SOME R202 C1181)))) (SOME R284 (AND C917 (SOME R202 C1136)))) (implies (AND C1705 (SOME R29 (AND C21 (SOME R268 C1711)))) (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C415 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C1428 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C425 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C349 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C419 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C357 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C420 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C337 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C559 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C560 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C152 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C520 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C1438 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C562 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C356 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C347 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C440 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C350 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C355 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C461 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C463 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C352 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C465 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C358 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C557 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C558 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C348 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C359 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C466 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C351 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C561 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C468 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C329 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C647 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C644 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C339 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C341 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C335 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C354 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C353 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C345 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C530 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C339 (SOME R284 (AND C917 (SOME R202 C1136)))) (implies C599 (SOME R284 (AND C917 (SOME R202 C1136)))) (implies C341 (SOME R284 (AND C917 (SOME R202 C1136)))) (implies C335 (SOME R284 (AND C917 (SOME R202 C1136)))) (implies C354 (SOME R284 (AND C917 (SOME R202 C1136)))) (implies C353 (SOME R284 (AND C917 (SOME R202 C1136)))) (implies C345 (SOME R284 (AND C917 (SOME R202 C1136)))) (implies C331 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C471 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C162 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C160 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C514 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C527 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C1456 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C327 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C532 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C528 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C459 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C460 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C519 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C462 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C599 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C513 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C1461 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C469 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C556 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C1450 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C467 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C515 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C552 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C512 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C516 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C517 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C522 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C518 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C521 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C525 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C526 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C531 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C325 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C333 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C26 (SOME R268 (AND C920 (SOME R202 C1177)))) (implies C173 (SOME R268 (AND C920 (SOME R202 C1177)))) (implies C418 (SOME R268 (AND C920 (SOME R202 C1177)))) (implies C554 (SOME R268 (AND C920 (SOME R202 C1177)))) (implies C702 (SOME R268 (AND C920 (SOME R202 C1180)))) (implies C159 (SOME R268 (AND C920 (SOME R202 C1180)))) (implies C343 (SOME R268 (AND C920 (SOME R202 C1180)))) (implies C551 (SOME R268 (AND C920 (SOME R202 C1180)))) (implies C701 (SOME R268 (AND C920 (SOME R202 C1180)))) (implies (AND C32 (SOME R390 C891)) (SOME R398 (AND C890 (SOME R202 C1083)))) (implies C824 (SOME R91 C460)) (implies C325 (SOME R92 C800)) (implies C40 (SOME R412 C65)) (implies (AND C37 (SOME R180 C101) (SOME R366 (AND C873 (SOME R202 C1095)))) (SOME R178 C100)) (implies (AND C37 (SOME R182 C94) (SOME R412 C65) (SOME R91 (AND C21 (SOME R410 C61)))) (SOME R410 C61)) (implies (AND C37 (SOME R182 C94) (SOME R412 C65) (SOME R94 (AND C21 (SOME R410 C62)))) (SOME R410 C62)) (implies (AND C37 (SOME R128 (AND C21 (SOME R410 C62)))) (SOME R410 C62)) (implies (AND C37 (SOME R128 (AND C21 (SOME R410 C61)))) (SOME R410 C61)) (implies C1464 (SOME R128 C720)) (implies (AND C21 (SOME R17 (AND C21 (SOME R232 C77) (SOME R184 C98))) (SOME R184 C98)) (SOME R232 C77)) (implies (AND C21 (SOME R17 (AND C21 (SOME R232 C79) (SOME R184 C98))) (SOME R184 C98)) (SOME R232 C79)) (implies (AND C1676 (SOME R17 (AND C1676 (SOME R232 C77)))) (SOME R232 C77)) (implies (AND C25 (SOME R25 (AND C25 (SOME R232 C79)))) (SOME R232 C79)) (implies (AND C22 (SOME R25 (AND C25 (SOME R232 C79)))) (SOME R232 C79)) (implies (AND C24 (SOME R25 (AND C25 (SOME R232 C79)))) (SOME R232 C79)) (implies (AND C25 (SOME R25 (AND C25 (SOME R184 C98)))) (SOME R184 C98)) (implies (AND C22 (SOME R25 (AND C25 (SOME R184 C98)))) (SOME R184 C98)) (implies (AND C24 (SOME R25 (AND C25 (SOME R184 C98)))) (SOME R184 C98)) (implies C194 (SOME R25 C300)) (implies (AND C25 (SOME R25 (AND C25 (SOME R232 C75)))) (SOME R232 C75)) (implies (AND C25 (SOME R25 (AND C24 (SOME R232 C75)))) (SOME R232 C75)) (implies (AND C24 (SOME R25 (AND C25 (SOME R232 C75)))) (SOME R232 C75)) (implies (AND C24 (SOME R25 (AND C24 (SOME R232 C75)))) (SOME R232 C75)) (implies (AND C27 (SOME R51 (AND C21 (SOME R232 C79)))) (SOME R232 C79)) (implies (AND C27 (SOME R51 (AND C21 (SOME R184 C98)))) (SOME R184 C98)) (implies C339 (SOME R30 C724)) (implies C749 (SOME R348 (AND C935 (SOME R202 C1254)))) (implies (AND C767 (SOME R34 (AND C781 (SOME R128 C1655)))) (SOME R128 C1655)) (implies (AND C21 (SOME R232 C78) (SOME R310 C1228)) (SOME R410 C61)) (implies (AND C159 (SOME R51 (AND C25 (SOME R268 (AND C920 (SOME R202 C1177))) (SOME R178 C100)))) (SOME R178 C100)) (implies C788 (SOME R178 C100)) (implies C791 (SOME R178 C100)) (implies C835 (SOME R178 C100)) (implies C836 (SOME R178 C100)) (implies C833 (SOME R178 C100)) (implies (AND C151 (SOME R17 C1731)) (SOME R268 (AND C920 (SOME R202 C1179)))) (implies (AND C151 (SOME R17 C1732)) (SOME R268 (AND C920 (SOME R202 C1180)))) (implies (AND C1409 (SOME R108 (AND C21 (SOME R410 C61)))) (SOME R410 C61)) (implies (AND C843 (SOME R98 (AND C720 (SOME R348 (AND C935 (SOME R202 C1254))))) (SOME R366 (AND C873 (SOME R202 C1094)))) (SOME R128 (AND C720 (SOME R348 (AND C935 (SOME R202 C1253)))))) (implies C1413 (SOME R274 (AND C918 (SOME R202 C1201)))) (implies C746 (SOME R348 (AND C935 (SOME R202 C1254)))) (implies C739 (SOME R348 (AND C935 (SOME R202 C1254)))) (implies C742 (SOME R348 (AND C935 (SOME R202 C1254)))) (implies C745 (SOME R348 (AND C935 (SOME R202 C1254)))) (implies C750 (SOME R348 (AND C935 (SOME R202 C1254)))) (implies C743 (SOME R348 (AND C935 (SOME R202 C1254)))) (implies C744 (SOME R348 (AND C935 (SOME R202 C1254)))) (implies C749 (SOME R348 (AND C935 (SOME R202 C1254)))) (implies C1331 (SOME R348 (AND C935 (SOME R202 C1254)))) (implies C748 (SOME R348 (AND C935 (SOME R202 C1254)))) (implies C1802 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C154 (SOME R278 C90)) (implies C155 (SOME R278 C90)) (implies C719 (SOME R29 C155)) (implies (AND C154 (SOME R410 C61) (SOME R232 C79) (SOME R310 C1228)) (SOME R410 C62)) (implies C156 (SOME R278 C90)) (implies (AND C1802 (SOME R13 (AND C1802 (SOME R232 C75)))) (SOME R232 C75)) (implies (AND C152 (SOME R13 (AND C1802 (SOME R232 C75)))) (SOME R232 C75)) (implies C383 (SOME R232 C80)) (implies C383 (SOME R410 C62)) (implies C378 (SOME R13 C383)) (implies C379 (SOME R13 C383)) (implies C381 (SOME R13 C383)) (implies C380 (SOME R13 C383)) (implies C381 (SOME R232 C79)) (implies C381 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies (AND C381 (SOME R320 C1221)) (SOME R410 C61)) (implies (AND C381 (SOME R320 C1224) (SOME R310 C1228)) (SOME R410 C62)) (implies (AND C381 (SOME R320 C1222) (SOME R310 C1228)) (SOME R410 C62)) (implies C441 (SOME R232 C79)) (implies C441 (SOME R410 C61)) (implies C401 (SOME R17 C1803)) (implies C401 (SOME R17 C380)) (implies C399 (SOME R13 C380)) (implies C399 (SOME R13 C1803)) (implies C451 (SOME R17 C1803)) (implies C600 (SOME R25 C451)) (implies C447 (SOME R17 C1803)) (implies C565 (SOME R25 C447)) (implies C452 (SOME R17 C1803)) (implies C601 (SOME R25 C452)) (implies C602 (SOME R25 C452)) (implies C449 (SOME R17 C1803)) (implies C579 (SOME R25 C449)) (implies C444 (SOME R17 C1803)) (implies C456 (SOME R17 C444)) (implies C375 (SOME R13 C444)) (implies C576 (SOME R25 C444)) (implies C577 (SOME R25 C444)) (implies (AND C152 (SOME R13 C375)) (SOME R314 C1216)) (implies C375 (SOME R13 C1805)) (implies C1805 (SOME R278 C90)) (implies C370 (SOME R13 C375)) (implies C368 (SOME R13 C375)) (implies C455 (SOME R232 C75)) (implies C456 (SOME R410 C61)) (implies C457 (SOME R410 C61)) (implies (AND C456 (SOME R230 C309) (SOME R310 C1228)) (SOME R410 C62)) (implies (AND C457 (SOME R230 C309) (SOME R310 C1228)) (SOME R410 C62)) (implies (AND C456 (SOME R230 C309) (SOME R310 C1228)) (SOME R232 C79)) (implies (AND C457 (SOME R230 C309) (SOME R310 C1228)) (SOME R232 C79)) (implies C403 (SOME R232 C77)) (implies C400 (SOME R232 C77)) (implies C403 (SOME R17 C380)) (implies C400 (SOME R17 C380)) (implies C403 (SOME R17 C1804)) (implies C400 (SOME R17 C1804)) (implies C403 (SOME R410 C61)) (implies C400 (SOME R410 C61)) (implies C402 (SOME R232 C77)) (implies C402 (SOME R17 C380)) (implies C402 (SOME R17 C1804)) (implies C402 (SOME R410 C61)) (implies C570 (SOME R25 C402)) (implies C454 (SOME R17 C1804)) (implies C603 (SOME R25 C454)) (implies C448 (SOME R17 C1804)) (implies C566 (SOME R25 C448)) (implies C453 (SOME R17 C1804)) (implies C604 (SOME R25 C453)) (implies C605 (SOME R25 C453)) (implies C372 (SOME R17 C453)) (implies C371 (SOME R13 C453)) (implies C446 (SOME R17 C1804)) (implies C568 (SOME R25 C446)) (implies C443 (SOME R17 C1804)) (implies C457 (SOME R17 C443)) (implies C367 (SOME R17 C443)) (implies C369 (SOME R13 C443)) (implies (AND C152 (SOME R13 C369)) (SOME R314 C1216)) (implies C369 (SOME R13 C1807)) (implies C380 (SOME R232 C80)) (implies C465 (SOME R232 C78)) (implies C418 (SOME R232 C80)) (implies C418 (SOME R13 C380)) (implies C416 (SOME R232 C79)) (implies C416 (SOME R13 C418)) (implies C423 (SOME R232 C79)) (implies C423 (SOME R13 C416)) (implies C1810 (SOME R410 C60)) (implies C1811 (SOME R410 C60)) (implies C415 (SOME R13 C380)) (implies C415 (SOME R232 C80)) (implies C415 (SOME R268 (AND C920 (SOME R202 C1178)))) (implies C365 (SOME R13 C415)) (implies C364 (SOME R13 C415)) (implies C422 (SOME R13 C415)) (implies C364 (SOME R232 C77)) (implies C365 (SOME R232 C80)) (implies C415 (SOME R12 (AND C1810 (SOME R13 C415)))) (implies (AND C1810 (SOME R13 C415)) (SOME R232 C78)) (implies (AND C1810 (SOME R13 C415)) (SOME R410 C61)) (implies (AND C1810 (SOME R13 C415) (SOME R320 C1221) (SOME R310 C1228)) (SOME R410 C62)) (implies (AND C1802 (SOME R13 C415) (SOME R163 (AND C868 (SOME R202 C1055)))) (SOME R232 C78)) (implies C426 (SOME R13 C380)) (implies C426 (SOME R232 C79)) (implies C426 (SOME R12 (AND C1811 (SOME R13 C426)))) (implies C424 (SOME R232 C80)) (implies C424 (SOME R13 C380)) (implies C524 (SOME R328 C72)) (implies C428 (SOME R328 C72)) (implies C436 (SOME R328 C71)) (implies C529 (SOME R328 C71)) (implies C429 (SOME R232 C80)) (implies C429 (SOME R13 (AND C424 (SOME R330 C72)))) (implies C431 (SOME R232 C80)) (implies C431 (SOME R13 C429)) (implies C430 (SOME R232 C80)) (implies C430 (SOME R13 C429)) (implies C432 (SOME R232 C80)) (implies C432 (SOME R13 C429)) (implies C390 (SOME R284 (AND C917 (SOME R202 C1147)))) (implies C397 (SOME R232 C79)) (implies C396 (SOME R232 C79)) (implies C393 (SOME R232 C80)) (implies C395 (SOME R232 C80)) (implies C394 (SOME R232 C80)) (implies C391 (SOME R232 C80)) (implies C437 (SOME R232 C80)) (implies C437 (SOME R13 (AND C424 (SOME R330 C71)))) (implies C438 (SOME R232 C80)) (implies C438 (SOME R13 C437)) (implies C439 (SOME R232 C80)) (implies C439 (SOME R13 C437)) (implies C391 (SOME R76 C471)) (implies C391 (SOME R78 C424)) (implies C391 (SOME R13 C424)) (implies C391 (SOME R232 C80)) (implies C395 (SOME R76 C526)) (implies C395 (SOME R78 (AND C424 (SOME R330 C72)))) (implies C395 (SOME R13 (AND C424 (SOME R330 C72)))) (implies C395 (SOME R232 C80)) (implies C66 (SOME R90 C797)) (implies C1834 (SOME R182 C95)) (implies C1834 (SOME R142 C1462)) (implies (AND C771 (SOME R150 C1547)) (SOME R122 (AND C901 (SOME R291 (AND C174 (SOME R47 C1796)))))) (implies (AND C1871 (SOME R204 C1016)) (SOME R178 C100)) (implies (AND C1875 (SOME R204 C1016)) (SOME R178 C100)) (implies (AND C1878 (SOME R204 C1016)) (SOME R178 C100)) (implies (AND C1882 (SOME R204 C1016)) (SOME R178 C100)) (implies (AND C1882 (SOME R204 C1017)) (SOME R178 C100)) (implies (AND C1888 (SOME R204 C1016)) (SOME R178 C100)) (implies (AND C1888 (SOME R204 C1017)) (SOME R178 C100)) (implies (AND C1894 (SOME R204 C1016)) (SOME R178 C100)) (implies (AND C1894 (SOME R204 C1017)) (SOME R178 C100)) (implies (AND C1899 (SOME R204 C1016)) (SOME R178 C100)) (implies (AND C1899 (SOME R204 C1017)) (SOME R178 C100)) (implies (AND C914 (SOME R202 C1197) (SOME R271 C175)) (SOME R178 C100)) (implies (AND C915 (SOME R212 C1023) (SOME R273 C175)) (SOME R178 C100)) (implies (AND C915 (SOME R212 C1024) (SOME R273 C175)) (SOME R178 C100)) (implies (AND C901 (SOME R291 (AND C1906 (SOME R47 C1796))) (SOME R204 C1016)) (SOME R178 C100)) (implies (AND C10 (SOME R190 C1908)) (SOME R178 C100)) (implies (AND C10 (SOME R190 C1909)) (SOME R178 C100)) (implies (AND C10 (SOME R190 C1907) (SOME R190 C1909) (SOME R190 C1901)) (SOME R178 C100)) (implies C1916 (SOME R178 C100)) (implies (AND C895 (SOME R293 C1915)) (SOME R206 (AND C1038 (SOME R218 C239)))) (implies C1491 (SOME R151 C772)) (implies (AND C772 (SOME R122 (AND C892 (SOME R201 C301)))) (SOME R150 C1492)) (implies C1923 (SOME R126 C1924)) (implies (AND C1923 (SOME R152 C1527)) (SOME R34 (AND C1591 (SOME R94 (AND C749 (SOME R53 C518)))))) (implies C1930 (SOME R34 (AND C773 (SOME R94 C1924)))) (implies C1930 (SOME R34 C1923)) (implies C1930 (SOME R122 (AND C51 (SOME R407 (AND C194 (SOME R47 C749)))))) (implies C1934 (SOME R126 C1935)) (implies C1935 (SOME R129 C1934)) (implies C1938 (SOME R34 C1934)) (implies C1938 (SOME R122 (AND C51 (SOME R407 (AND C194 (SOME R43 C720)))))) (implies C1941 (AND (SOME R34 (AND C772 (SOME R122 (AND C914 (SOME R271 C194))))) (SOME R34 (AND C864 (SOME R94 C194))))) (implies (AND C864 (SOME R94 C1942)) (SOME R366 (AND C873 (SOME R202 C1095)))) (implies (AND C864 (SOME R94 C1943)) (SOME R366 (AND C873 (SOME R202 C1094)))) (implies C1946 (SOME R25 C1944)) (implies C1947 (SOME R25 C1945)) (implies C1946 (SOME R28 C1943)) (implies C1947 (SOME R28 C1942)) (implies C1094 (SOME R129 (AND C1941 (SOME R34 (AND C772 (SOME R122 (AND C914 (SOME R271 C194))) (SOME R128 C1193)))))) (implies C1095 (SOME R129 (AND C1941 (SOME R34 (AND C772 (SOME R122 (AND C914 (SOME R271 C194))) (SOME R128 C1192)))))) (implies (AND C300 (SOME R131 (AND C1394 (SOME R372 (AND C874 (SOME R202 C1107) (SOME R173 (AND C53 (SOME R405 C1406))))))) (SOME R90 (AND C794 (SOME R98 C1406)))) (SOME R372 (AND C874 (SOME R202 C1106) (SOME R173 (AND C53 (SOME R405 C1394)))))) (implies (AND C862 (SOME R91 C1406) (SOME R130 (AND C1394 (SOME R372 (AND C874 (SOME R202 C1107) (SOME R173 (AND C53 (SOME R405 C1406)))))))) (SOME R366 (AND C873 (SOME R202 C1095)))) (implies C1980 (SOME R372 (AND C874 (SOME R202 C1107) (SOME R173 (AND C53 (SOME R405 C1406)))))) (implies C2027 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164)))))) (implies C2028 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164)))))) (implies C2029 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164)))))) (implies C2030 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164)))))) (implies C2035 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164)))))) (implies C2036 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164)))))) (implies C2037 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164)))))) (implies C2039 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164)))))) (implies C2044 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164)))))) (implies C2027 (SOME R282 (AND C916 (SOME R202 C1164)))) (implies C2028 (SOME R282 (AND C916 (SOME R202 C1164)))) (implies C2029 (SOME R282 (AND C916 (SOME R202 C1164)))) (implies C2030 (SOME R282 (AND C916 (SOME R202 C1164)))) (implies C2035 (SOME R282 (AND C916 (SOME R202 C1164)))) (implies C2036 (SOME R282 (AND C916 (SOME R202 C1164)))) (implies C2037 (SOME R282 (AND C916 (SOME R202 C1164)))) (implies C2039 (SOME R282 (AND C916 (SOME R202 C1164)))) (implies C2044 (SOME R282 (AND C916 (SOME R202 C1164)))) (implies C2043 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1159)))))) (implies C2043 (SOME R282 (AND C916 (SOME R202 C1164)))) (implies C2046 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1158)))))) (implies C2046 (SOME R282 (AND C916 (SOME R202 C1158)))) (implies C2051 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1157)))))) (implies C2052 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1157)))))) (implies C2051 (SOME R282 (AND C916 (SOME R202 C1157)))) (implies C2052 (SOME R282 (AND C916 (SOME R202 C1157)))) (implies C2033 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1141))) (SOME R276 (AND C921 (SOME R202 C1189)))))) (implies C2033 (SOME R282 (AND C916 (SOME R202 C1141)))) (implies C2033 (SOME R276 (AND C921 (SOME R202 C1189)))) (implies C2041 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1144)))))) (implies C2031 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1144)))))) (implies C2053 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1144)))))) (implies C2041 (SOME R282 (AND C916 (SOME R202 C1144)))) (implies C2031 (SOME R282 (AND C916 (SOME R202 C1144)))) (implies C2053 (SOME R282 (AND C916 (SOME R202 C1144)))) (implies C2045 (SOME R276 (AND C921 (SOME R202 C1188)))) (implies C2042 (SOME R24 (AND C194 (SOME R276 (AND C921 (SOME R202 C1189)))))) (implies C2049 (SOME R24 (AND C194 (SOME R276 (AND C921 (SOME R202 C1189)))))) (implies C2042 (SOME R276 (AND C921 (SOME R202 C1189)))) (implies C2049 (SOME R276 (AND C921 (SOME R202 C1189)))) (implies C2055 (SOME R24 (AND C194 (SOME R276 (AND C921 (SOME R202 C1189))) (SOME R282 (AND C916 (SOME R202 C1164)))))) (implies C2055 (SOME R276 (AND C921 (SOME R202 C1189)))) (implies C2055 (SOME R282 (AND C916 (SOME R202 C1164)))) (implies C2032 (SOME R24 (AND C194 (SOME R282 (AND C916 (SOME R202 C1164))) (SOME R276 (AND C921 (SOME R202 C1188)))))) (implies C2032 (SOME R282 (AND C916 (SOME R202 C1164)))) (implies C2032 (SOME R276 (AND C921 (SOME R202 C1188)))) (implies C2044 (SOME R96 (AND C865 (SOME R366 (AND C873 (SOME R202 C1094)))))) (implies C2029 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2030 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2031 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2032 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2033 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2037 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2039 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2040 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2041 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2043 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2045 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2046 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2049 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2053 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2055 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1095)))))) (implies C2027 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094)))))) (implies C2028 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094)))))) (implies C2035 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094)))))) (implies C2036 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094)))))) (implies C2042 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094)))))) (implies C2047 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094)))))) (implies C2048 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094)))))) (implies C2051 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094)))))) (implies C2052 (SOME R96 (AND C864 (SOME R366 (AND C873 (SOME R202 C1094)))))) (implies C2029 (SOME R90 C2232)) (implies C2035 (SOME R90 C2232)) (implies C2048 (SOME R90 C2232)) (implies C2028 (SOME R90 C2233)) (implies C2201 (SOME R90 C2233)) (implies C2033 (SOME R90 C2233)) (implies C2041 (SOME R90 C2233)) (implies C2043 (SOME R90 C2233)) (implies C2044 (SOME R90 C2233)) (implies C2046 (SOME R90 C2233)) (implies C2047 (SOME R90 C2233)) (implies C2049 (SOME R90 C2233)) (implies C2055 (SOME R90 C2233)) (implies C2028 (SOME R90 C2234)) (implies C2037 (SOME R90 C2234)) (implies C2042 (SOME R90 C2234)) (implies C2045 (SOME R90 C2234)) (implies C2051 (SOME R90 C2234)) (implies C2052 (SOME R90 C2234)) (implies C2027 (SOME R90 C2235)) (implies (AND C794 (SOME R98 C1398)) (SOME R91 C2174)) (implies (AND C794 (SOME R98 C1399)) (SOME R91 C2174)) (implies (AND C794 (SOME R98 C1400)) (SOME R91 C2174)) (implies (AND C794 (SOME R98 C1401)) (SOME R91 C2174)) (implies (AND C794 (SOME R98 C1402)) (SOME R91 C2174)) (implies C2182 (SOME R90 (AND C794 (SOME R98 C1399)))) (implies C2028 (SOME R90 (AND C794 (SOME R98 C1399)))) (implies C2183 (SOME R90 (AND C794 (SOME R98 C1399)))) (implies C2176 (SOME R90 (AND C794 (SOME R98 C1399)))) (implies C2181 (SOME R90 (AND C794 (SOME R98 C1399)))) (implies C2176 (SOME R90 (AND C794 (SOME R98 C1402)))) (implies C2176 (SOME R90 (AND C794 (SOME R98 C1404)))) (implies (AND C803 (SOME R98 C1386) (SOME R102 C497)) (SOME R104 C393)) (implies (AND C803 (SOME R98 C1352) (SOME R104 C720)) (SOME R102 C173)) (implies C181 (SOME R372 (AND C874 (SOME R173 (AND C53 (SOME R405 C1357)))))) (implies (AND C803 (SOME R104 C720) (SOME R102 C181) (SOME R98 C1352) (SOME R366 (AND C873 (SOME R202 C1095)))) (SOME R35 C1467)) (implies (AND C803 (SOME R104 C720) (SOME R102 C181) (SOME R98 C1352) (SOME R366 (AND C873 (SOME R202 C1095)))) (SOME R128 C1834)) (implies C202 (SOME R180 C100)) (implies C202 (SOME R178 C100)) (implies C394 (SOME R232 C80)) (implies C510 (SOME R410 C61)) (implies C511 (SOME R25 C2288)) (implies C516 (SOME R25 C2288)) (implies C522 (SOME R25 C2288)) (implies C518 (SOME R25 C2288)) (implies C521 (SOME R25 C2288)) (implies C517 (SOME R25 C2288)) (implies C512 (SOME R25 C2288)) (implies C513 (SOME R25 C2288)) (implies C519 (SOME R25 C2288)) (implies C461 (SOME R25 C2288)) (implies C436 (SOME R25 C2289)) (implies C544 (SOME R25 C2289)) (implies C428 (SOME R25 C2290)) (implies C511 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C516 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C522 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C518 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C521 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C517 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C512 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C513 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C519 (SOME R268 (AND C920 (SOME R202 C1181)))) (implies C510 (SOME R28 C718)) (implies C512 (SOME R23 C511)) (implies C513 (SOME R23 C511)) (implies C514 (SOME R21 C512)) (implies C515 (SOME R23 C512)) (implies C516 (SOME R23 C512)) (implies C517 (SOME R23 C512)) (implies C518 (SOME R23 C513)) (implies C519 (SOME R23 C513)) (implies C522 (SOME R23 C513)) (implies C394 (SOME R79 C522)) (implies C512 (SOME R232 C79)) (implies C513 (SOME R232 C80)) (implies C513 (SOME R410 C62)) (implies C461 (SOME R232 C79)) (implies C514 (SOME R25 C461)) (implies C515 (SOME R25 C461)) (implies C461 (SOME R24 C350)) (implies C461 (SOME R24 C351)) (implies C461 (SOME R28 C347)) (implies C461 (SOME R28 C348)) (implies C461 (SOME R28 C349)) (implies C2296 (SOME R410 C61)) (implies C520 (SOME R17 C518)) (implies C521 (SOME R17 C518)) (implies C518 (SOME R24 C1758)) (implies (AND C749 (SOME R46 C173)) (SOME R180 C100)) (implies C749 (SOME R99 C796)) (implies (AND C796 (SOME R98 C749)) (SOME R91 C511)) (implies C511 (SOME R92 C803)) (implies (AND C803 (SOME R93 C511)) (SOME R98 C749)) (implies C2315 (SOME R35 C2314)) (implies (AND C800 (SOME R93 C2296)) (SOME R35 (AND C2315 (SOME R102 C518)))) (implies C518 (SOME R92 (AND C792 (SOME R98 C749)))) (implies (AND C792 (SOME R98 C749)) (SOME R35 C2314)) (implies C518 (SOME R90 C2304)) (implies (AND C2304 (SOME R91 C518)) (SOME R35 C2316)) (implies C804 (SOME R182 C94)) (implies C804 (SOME R178 C100)) (implies C2316 (SOME R398 (AND C890 (SOME R202 C1083)))) (implies (AND C2304 (SOME R91 C2297) (SOME R368 (AND C875 (SOME R202 C1115)))) (SOME R140 C2337)) (implies C2343 (SOME R180 C100)) (implies (AND C797 (SOME R128 (AND C21 (SOME R109 C1448)))) (SOME R178 C100)) (implies (AND C544 (SOME R109 C1448)) (SOME R178 C100)) (implies (AND C544 (SOME R109 C1448)) (SOME R272 (AND C915 (SOME R204 C1170)))) (implies C743 (SOME R99 (AND C794 (SOME R91 C539)))) (implies C744 (SOME R99 (AND C794 (SOME R91 C545)))) (implies C748 (SOME R99 (AND C794 (SOME R91 C416)))) (implies C659 (SOME R284 (AND C917 (SOME R202 C1136)))) (implies C2350 (SOME R28 C723)) (implies C2355 (SOME R268 (AND C920 (SOME R202 C1180)))) (implies (AND C159 (SOME R51 C2354)) (SOME R52 C747)) (implies C2354 (SOME R268 (AND C920 (SOME R202 C1180)))) (implies C564 (SOME R24 C2353)) (implies C807 (SOME R184 C98)) (implies C807 (SOME R180 C101)) (implies (AND C807 (SOME R380 (AND C881 (SOME R212 C1024)))) (SOME R382 (AND C882 (SOME R212 C1024)))) (implies (AND C807 (SOME R382 (AND C882 (SOME R212 C1024)))) (SOME R182 C95)) (implies (AND C807 (SOME R382 (AND C882 (SOME R212 C1024)))) (SOME R178 C100)) (implies C2363 (SOME R178 C100)) (implies C599 (SOME R232 C79)) (implies C597 (SOME R232 C79)) (implies C662 (SOME R284 (AND C917 (SOME R202 C1145)))) (implies C654 (SOME R232 C75)) (implies C655 (SOME R232 C75)) (implies C656 (SOME R232 C75)) (implies C359 (SOME R232 C75)) (implies C708 (SOME R232 C75)) (implies C705 (SOME R232 C75)) (implies C599 (SOME R22 C659)) (implies C660 (SOME R284 C1677)) (implies C661 (SOME R268 C1716)) (implies C654 (SOME R16 C2350)) (implies (AND C654 (SOME R312 C1205)) (SOME R232 C79)) (implies (AND C655 (SOME R312 C1205)) (SOME R232 C79)) (implies (AND C359 (SOME R312 C1205)) (SOME R232 C79)) (implies (AND C656 (SOME R312 C1205)) (SOME R232 C79)) (implies C603 (SOME R18 C2367)) (implies C603 (SOME R18 C2368)) (implies C603 (SOME R18 C2370)) (implies C603 (SOME R18 C2371)) (implies C603 (SOME R18 C2372)) (implies C603 (SOME R18 C2373)) (implies C603 (SOME R18 C2374)) (implies C603 (SOME R18 C2375)) (implies C603 (SOME R18 C2376)) (implies C603 (SOME R18 C2377)) (implies (AND C2350 (SOME R19 C2372)) (SOME R232 C79)) (implies (AND C2350 (SOME R19 C2371)) (SOME R232 C79)) (implies (AND C2350 (SOME R19 C2370)) (SOME R232 C79)) (implies (AND C2350 (SOME R24 C2379) (SOME R24 C2380) (SOME R24 C2378)) (SOME R232 C79)) (implies C605 (SOME R18 C2382)) (implies C605 (SOME R18 C2383)) (implies C605 (SOME R18 C2384)) (implies C600 (SOME R18 C2385)) (implies C600 (SOME R18 C2386)) (implies C600 (SOME R18 C2387)) (implies C600 (SOME R18 C2388)) (implies C600 (SOME R18 C2389)) (implies C600 (SOME R18 C2390)) (implies C601 (SOME R18 C2391)) (implies C601 (SOME R18 C2392)) (implies C601 (SOME R18 C2393)) (implies C602 (SOME R18 C2394)) (implies C602 (SOME R18 C2395)) (implies C604 (SOME R18 C2396)) (implies C604 (SOME R18 C2397)) (implies C604 (SOME R18 C2398)) (implies C604 (SOME R18 C2399)) (implies C604 (SOME R18 C2400)) (implies C604 (SOME R18 C2401)) (implies C604 (SOME R18 C2402)) (implies C2403 (SOME R232 C79)) (implies C2404 (SOME R232 C79)) (implies (AND C705 (SOME R314 C1215)) (SOME R232 C79)) (implies C706 (SOME R314 C1216)) (implies C706 (SOME R60 (AND C151 (SOME R19 C2372) (SOME R242 (AND C907 (SOME R202 C1217))) (SOME R163 (AND C868 (SOME R202 C1055)))))) (implies C706 (SOME R62 (AND C151 (SOME R19 C2402) (SOME R242 (AND C907 (SOME R202 C1216))) (SOME R163 (AND C868 (SOME R202 C1055)))))) (implies C707 (SOME R314 C1217)) (implies C707 (SOME R58 (AND C151 (SOME R19 C2402) (SOME R242 (AND C907 (SOME R202 C1217))) (SOME R163 (AND C868 (SOME R202 C1055)))))) (implies C707 (SOME R58 (AND C151 (SOME R19 C2372) (SOME R242 (AND C907 (SOME R202 C1216))) (SOME R163 (AND C868 (SOME R202 C1055)))))) (implies C711 (SOME R60 C597)) (implies C711 (SOME R62 (AND C657 (SOME R19 C604)))) (implies C710 (SOME R60 C2382)) (implies C710 (SOME R62 C2374)) (implies C710 (SOME R312 C1206)) (implies C709 (SOME R60 (AND C659 (SOME R23 C603)))) (implies C709 (SOME R62 C2373)) (implies C709 (SOME R312 C1207)) (implies C604 (SOME R18 C2408)) (implies C2409 (SOME R232 C79)) (implies C2401 (SOME R18 C2409)) (implies C597 (SOME R18 C2350)) (implies C597 (SOME R232 C79)) (implies C597 (SOME R268 (AND C920 (SOME R202 C1183)))) (implies C2410 (SOME R232 C79)) (implies C2410 (SOME R268 C1716)) (implies C2411 (SOME R232 C79)) (implies C2412 (SOME R232 C79)) (implies C2414 (SOME R232 C75)) (implies C359 (SOME R30 C725)) (implies C2415 (SOME R232 C79)) (implies C2416 (SOME R232 C79)) (implies (AND C355 (SOME R19 C2414)) (SOME R232 C75)) (implies (AND C355 (SOME R19 C2414)) (SOME R314 C1215)) (implies (AND C355 (SOME R314 C1216) (SOME R19 C2415)) (SOME R232 C79)) (implies (AND C355 (SOME R314 C1216) (SOME R19 C2416)) (SOME R232 C79)) (implies (AND C339 (SOME R60 C2417) (SOME R62 C2418)) (SOME R232 C79)) (implies C564 (SOME R232 C75)) (implies (AND C151 (SOME R21 C2420)) (SOME R232 C79)) (implies (AND C151 (SOME R17 C2422)) (SOME R232 C79)) (implies C566 (AND (SOME R24 C2421) (SOME R24 (AND C2353 (SOME R25 C566))))) (implies C566 (AND (SOME R24 C2401) (SOME R24 C2369) (SOME R24 C705) (SOME R24 C708) (SOME R24 C2414))) (implies C566 (SOME R96 C808)) (implies C566 (SOME R96 C809)) (implies C2420 (SOME R20 C2423)) (implies C2438 (SOME R98 C563)) (implies C1502 (SOME R151 C2440)) (implies C673 (SOME R232 C80)) (implies C2473 (SOME R232 C80)) (implies C2444 (SOME R232 C80)) (implies C2446 (SOME R232 C80)) (implies C680 (SOME R232 C80)) (implies C2447 (SOME R232 C80)) (implies C2448 (SOME R232 C80)) (implies C2449 (SOME R232 C80)) (implies C2450 (SOME R232 C80)) (implies C2451 (SOME R232 C80)) (implies C2452 (SOME R232 C80)) (implies C2453 (SOME R232 C80)) (implies C2454 (SOME R232 C80)) (implies C2455 (SOME R232 C80)) (implies C2456 (SOME R232 C80)) (implies C2457 (SOME R232 C80)) (implies C2458 (SOME R232 C80)) (implies C2459 (SOME R232 C80)) (implies C2460 (SOME R232 C80)) (implies C2461 (SOME R232 C80)) (implies C2462 (SOME R232 C80)) (implies C2463 (SOME R232 C80)) (implies C2464 (SOME R232 C80)) (implies C2465 (SOME R232 C80)) (implies C2466 (SOME R232 C80)) (implies C2467 (SOME R232 C80)) (implies C2468 (SOME R232 C80)) (implies C2469 (SOME R232 C80)) (implies C2470 (SOME R232 C80)) (implies C2471 (SOME R232 C80)) (implies C2472 (SOME R232 C80)) (implies C2474 (SOME R232 C80)) (implies C2475 (SOME R232 C80)) (implies C2476 (SOME R232 C80)) (implies C2477 (SOME R232 C80)) (implies C2478 (SOME R232 C80)) (implies C2479 (SOME R232 C80)) (implies C2480 (SOME R232 C80)) (implies C2481 (SOME R232 C80)) (implies C2482 (SOME R232 C80)) (implies C2483 (SOME R232 C80)) (implies C2484 (SOME R232 C80)) (implies C2485 (SOME R232 C80)) (implies C2486 (SOME R232 C80)) (implies C2487 (SOME R232 C80)) (implies C2488 (SOME R232 C80)) (implies C2489 (SOME R232 C80)) (implies C2490 (SOME R232 C80)) (implies C2491 (SOME R232 C80)) (implies C2492 (SOME R232 C80)) (implies C2493 (SOME R232 C80)) (implies C2494 (SOME R232 C80)) (implies C2495 (SOME R232 C80)) (implies C2496 (SOME R232 C80)) (implies C2508 (SOME R232 C80)) (implies C2509 (SOME R232 C80)) (implies C2510 (SOME R232 C80)) (implies C2509 (SOME R232 C80)) (implies C693 (SOME R232 C80)) (implies C2511 (SOME R232 C80)) (implies C2497 (SOME R232 C79)) (implies C2498 (SOME R232 C79)) (implies C2499 (SOME R232 C79)) (implies C2500 (SOME R232 C79)) (implies C2501 (SOME R232 C79)) (implies C2502 (SOME R232 C79)) (implies C2503 (SOME R232 C79)) (implies C2504 (SOME R232 C79)) (implies C2505 (SOME R232 C79)) (implies C2506 (SOME R232 C79)) (implies C2507 (SOME R232 C79)) (implies C672 (SOME R232 C79)) (implies C2526 (SOME R232 C79)) (implies C2513 (SOME R232 C79)) (implies C2514 (SOME R232 C79)) (implies C2515 (SOME R232 C79)) (implies C695 (SOME R232 C79)) (implies C688 (SOME R232 C79)) (implies C690 (SOME R232 C79)) (implies C2516 (SOME R232 C79)) (implies C2517 (SOME R232 C79)) (implies C2518 (SOME R232 C79)) (implies C691 (SOME R232 C79)) (implies C692 (SOME R232 C79)) (implies C698 (SOME R232 C79)) (implies C2521 (SOME R232 C79)) (implies C2522 (SOME R232 C79)) (implies C2523 (SOME R232 C79)) (implies C2524 (SOME R232 C79)) (implies C2525 (SOME R232 C79)) (implies C2536 (SOME R268 (AND C920 (SOME R202 C1180)))) (implies C2537 (SOME R268 (AND C920 (SOME R202 C1180)))) (implies C360 (SOME R268 (AND C920 (SOME R202 C1180)))) (implies C2538 (SOME R268 (AND C920 (SOME R202 C1178)))) (implies C1809 (SOME R232 C78)) (implies C702 (SOME R232 C78)) (implies C701 (SOME R232 C78)) (implies C2536 (SOME R17 C460)) (implies C2537 (SOME R17 C460)) (implies C2536 (SOME R25 C460)) (implies C2537 (SOME R25 C460)) (implies C2540 (SOME R25 C460)) (implies C703 (SOME R25 C460)) (implies C674 (SOME R232 C78)) (implies C460 (SOME R53 C2538)) (implies C2538 (SOME R53 C418)) (implies C2538 (SOME R30 C724)) (implies (AND C1705 (SOME R29 C460)) (SOME R28 C715)) (implies (AND C1705 (SOME R29 C460)) (SOME R28 C713)) (implies (AND C1705 (SOME R29 C331)) (SOME R28 C714)) (implies C2473 (SOME R17 C673)) (implies C2444 (SOME R17 C673)) (implies C2444 (SOME R79 C2473)) (implies C2473 (SOME R77 C2444)) (implies C2446 (SOME R69 C2444)) (implies C2490 (SOME R69 C2444)) (implies C2457 (SOME R69 C2444)) (implies C2458 (SOME R69 C2444)) (implies C2466 (SOME R69 C2444)) (implies C2497 (SOME R69 C2444)) (implies C2507 (SOME R69 C2444)) (implies C680 (SOME R69 C2446)) (implies C2447 (SOME R69 C2446)) (implies C2456 (SOME R69 C2446)) (implies C2463 (SOME R69 C680)) (implies C2462 (SOME R69 C680)) (implies C2460 (SOME R69 C680)) (implies C2459 (SOME R69 C680)) (implies C2464 (SOME R69 C2463)) (implies C2465 (SOME R69 C2463)) (implies C2461 (SOME R69 C2464)) (implies C2453 (SOME R69 C2447)) (implies C2448 (SOME R69 C2447)) (implies C2450 (SOME R69 C2453)) (implies C2452 (SOME R69 C2453)) (implies C2455 (SOME R69 C2453)) (implies C2454 (SOME R69 C2455)) (implies C2451 (SOME R69 C2452)) (implies C2472 (SOME R69 C2448)) (implies C2470 (SOME R69 C2448)) (implies C2471 (SOME R79 C2448)) (implies C2448 (SOME R77 C2471)) (implies C2468 (SOME R69 C2472)) (implies C2469 (SOME R69 C2470)) (implies C2467 (SOME R69 C2466)) (implies C2474 (SOME R69 C2466)) (implies C2475 (SOME R69 C2466)) (implies C2476 (SOME R69 C2466)) (implies C2483 (SOME R69 C2466)) (implies C2479 (SOME R69 C2466)) (implies C2477 (SOME R69 C2476)) (implies C2478 (SOME R69 C2476)) (implies C2482 (SOME R69 C2478)) (implies C2480 (SOME R69 C2479)) (implies C2481 (SOME R69 C2479)) (implies C2489 (SOME R69 C2479)) (implies C2486 (SOME R69 C2483)) (implies C2488 (SOME R69 C2486)) (implies C2491 (SOME R69 C2490)) (implies C2494 (SOME R69 C2490)) (implies C2495 (SOME R69 C2490)) (implies C2496 (SOME R69 C2490)) (implies C2492 (SOME R69 C2491)) (implies C2493 (SOME R79 C2491)) (implies C2491 (SOME R77 C2493)) (implies C2498 (SOME R69 C2497)) (implies C2499 (SOME R69 C2497)) (implies C2500 (SOME R69 C2497)) (implies C2501 (SOME R69 C2497)) (implies C2502 (SOME R69 C2497)) (implies C2503 (SOME R69 C2497)) (implies C2504 (SOME R69 C2497)) (implies C2505 (SOME R69 C2497)) (implies C2506 (SOME R69 C2497)) (implies C677 (SOME R69 C2507)) (implies C678 (SOME R69 C2507)) (implies C672 (SOME R69 C678)) (implies C497 (AND (SOME R71 C2450) (SOME R71 C2456) (SOME R71 C2459) (SOME R71 C2460) (SOME R71 C2471))) (implies C481 (AND (SOME R71 C2449) (SOME R71 C2468) (SOME R71 C2469) (SOME R71 C2470) (SOME R71 C2472))) (implies C459 (SOME R71 C2451)) (implies C463 (AND (SOME R71 C2452) (SOME R71 C2454) (SOME R71 C2455))) (implies C466 (AND (SOME R71 C2461) (SOME R71 C2462) (SOME R71 C2463) (SOME R71 C2467) (SOME R71 C2468) (SOME R71 C2469) (SOME R71 C2470) (SOME R71 C2472))) (implies C468 (SOME R71 C680)) (implies C496 (SOME R71 C2488)) (implies C490 (SOME R71 C2489)) (implies C474 (AND (SOME R71 C2480) (SOME R71 C2481))) (implies C472 (SOME R71 C2482)) (implies C493 (SOME R71 C2495)) (implies C461 (AND (SOME R71 C2498) (SOME R71 C2499) (SOME R71 C2500) (SOME R71 C2501) (SOME R71 C2503) (SOME R71 C2504) (SOME R71 C2505))) (implies (AND C2526 (SOME R310 C1230)) (SOME R69 C2508)) (implies (AND C2526 (SOME R310 C1229)) (SOME R69 C2508)) (implies C2510 (SOME R69 C2508)) (implies C2513 (SOME R69 C2512)) (implies C2514 (SOME R69 C2512)) (implies C2515 (SOME R69 C2512)) (implies C695 (SOME R69 C2515)) (implies C688 (SOME R69 C695)) (implies C690 (SOME R69 C695)) (implies C2516 (SOME R69 C690)) (implies C693 (SOME R69 C2509)) (implies (AND C2517 (SOME R310 C1230)) (SOME R69 C2509)) (implies (AND C2518 (SOME R310 C1230)) (SOME R69 C2509)) (implies (AND C2517 (SOME R310 C1229)) (SOME R69 C2509)) (implies (AND C2518 (SOME R310 C1229)) (SOME R69 C2509)) (implies C691 (SOME R69 C2518)) (implies C692 (SOME R69 C2518)) (implies C698 (SOME R77 C692)) (implies C2520 (SOME R69 C698)) (implies C2521 (SOME R69 C698)) (implies C2522 (SOME R69 C698)) (implies C2519 (SOME R69 C2522)) (implies C2524 (SOME R69 C2522)) (implies C2525 (SOME R69 C2522)) (implies C2523 (SOME R69 C2522)) (implies C497 (SOME R71 C2511)) (implies C481 (SOME R71 C2511)) (implies C459 (SOME R71 C2511)) (implies C466 (SOME R71 C2511)) (implies C468 (SOME R71 C2511)) (implies C496 (SOME R71 C2511)) (implies C490 (SOME R71 C2511)) (implies C474 (SOME R71 C2511)) (implies C463 (SOME R71 C693)) (implies C453 (AND (SOME R71 C698) (SOME R71 C692))) (implies C372 (SOME R71 C2522)) (implies C443 (AND (SOME R71 C2520) (SOME R71 C2524))) (implies C2573 (SOME R18 C1761)) (implies C701 (SOME R18 C1761)) (implies C2539 (SOME R17 C1761)) (implies C2575 (SOME R69 C2445)) (implies C2576 (SOME R69 C2445)) (implies C2562 (SOME R77 C704)) (implies C2561 (SOME R79 C704)) (implies C2536 (AND (SOME R16 C2559) (SOME R16 C2561) (SOME R16 C2577) (SOME R16 C2578))) (implies C2536 (AND (SOME R24 C2559) (SOME R24 C2561))) (implies C2537 (AND (SOME R16 C2560) (SOME R16 C2562))) (implies C2537 (AND (SOME R24 C2560) (SOME R24 C2562) (SOME R24 C2579) (SOME R24 C2580))) ;;; The following gci causes a tight loop in the gci-absorption function. ;;; (implies (AND C2583 (SOME R19 C701)) (SOME R69 C2585)) (implies (AND C1630 (SOME R98 C2581)) (SOME R93 C2539)) (implies (AND C1630 (SOME R93 C2539) (SOME R366 (AND C873 (SOME R202 C1095)))) (SOME R178 C100)) (implies C2543 (SOME R98 C2538)) (implies C2545 (SOME R98 C713)) (implies (AND C2677 (SOME R112 C2569)) (SOME R232 C77)) (implies (AND C1705 (SOME R29 C469)) (SOME R28 C718)) (implies C729 (SOME R29 (AND C1705 (SOME R29 C469)))) (implies C483 (SOME R23 C470)) (implies C482 (SOME R23 C470)) (implies C501 (SOME R23 C482)) (implies C497 (SOME R23 C483)) (implies C477 (SOME R17 C497)) (implies C484 (SOME R17 C497)) (implies C485 (SOME R17 C497)) (implies C492 (SOME R17 C497)) (implies C500 (SOME R23 C483)) (implies C488 (SOME R23 C483)) (implies C496 (SOME R23 C488)) (implies C481 (SOME R23 C496)) (implies C489 (SOME R23 C496)) (implies C486 (SOME R23 C496)) (implies C490 (SOME R23 C488)) (implies C474 (SOME R21 C490)) (implies C472 (SOME R21 C474)) (implies C499 (SOME R23 C488)) (implies C476 (SOME R23 C490)) (implies C473 (SOME R23 C490)) (implies C498 (SOME R23 C490)) (implies C480 (SOME R23 C490)) (implies C495 (SOME R23 C490)) (implies C494 (SOME R23 C490)) (implies C491 (SOME R23 C490)) (implies C493 (SOME R23 C483)) (implies C471 (SOME R23 C483)) (implies C502 (SOME R23 C483)) (implies C497 (SOME R23 C502)) (implies C500 (SOME R23 C502)) (implies C481 (SOME R23 C502)) (implies C503 (SOME R23 C483)) (implies C489 (SOME R23 C503)) (implies C486 (SOME R23 C503)) (implies C490 (SOME R23 C503)) (implies C493 (SOME R23 C503)) (implies C504 (SOME R23 C483)) (implies C482 (SOME R23 C504)) (implies C502 (SOME R23 C504)) (implies C505 (SOME R23 C483)) (implies C497 (SOME R23 C505)) (implies C500 (SOME R23 C505)) (implies C481 (SOME R23 C505)) (implies C506 (SOME R23 C483)) (implies C505 (SOME R23 C506)) (implies C486 (SOME R23 C506)) (implies C489 (SOME R23 C506)) (implies C507 (SOME R23 C483)) (implies C497 (SOME R23 C507)) (implies C500 (SOME R23 C507)) (implies C488 (SOME R23 C507)) (implies C2696 (SOME R24 C469)) (implies C1437 (SOME R129 C1742)) (implies C1438 (SOME R129 C2693)) (implies C1440 (SOME R129 C2690)) (implies C1439 (SOME R129 C2691)) (implies C839 (SOME R91 C483)) (implies C839 (SOME R398 (AND C890 (SOME R202 C1083)))) (implies C483 (SOME R92 C795)) (implies C839 (SOME R34 (AND C795 (SOME R93 C483)))) (implies C483 (SOME R92 C803)) (implies (AND C803 (SOME R93 C483)) (SOME R35 C839)) (implies C469 (SOME R92 C801)) (implies (AND C801 (SOME R93 C469)) (SOME R35 C839)) (implies C740 (SOME R99 C794)) (implies C739 (SOME R99 C794)) (implies (AND C794 (SOME R98 C740)) (SOME R91 C497)) (implies (AND C794 (SOME R98 C739)) (SOME R91 C497)) (implies C497 (SOME R90 (AND C794 (SOME R98 C1385)))) (implies (AND C794 (SOME R98 C739) (SOME R91 C497)) (SOME R35 C839)) (implies (AND C794 (SOME R98 C740) (SOME R91 C497)) (SOME R35 C839)) (implies C501 (SOME R92 C800)) (implies C1463 (SOME R410 C62)) (implies C218 (SOME R410 C62)) (implies C2699 (SOME R112 (AND C718 (SOME R29 (AND C1705 (SOME R29 C505)))))) (implies C2699 (SOME R112 (AND C1705 (SOME R29 C505)))) (implies C1445 (SOME R110 C497)) (implies C1445 (SOME R112 (AND C718 (SOME R29 (AND C1705 (SOME R29 C497)))))) (implies C1445 (SOME R112 (AND C1705 (SOME R29 C497)))) (implies C1455 (SOME R110 (AND C25 (SOME R268 (AND C920 (SOME R202 C1181)))))) (implies C1454 (SOME R280 C82)) (implies C1454 (SOME R184 C95)) (implies C1430 (SOME R280 C82)) (implies C1430 (SOME R184 C95))
215,377
Common Lisp
.lisp
4,604
43.687228
99
0.731679
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
77e72e48e86bacd09be6554a2ef56338a023f9c1554981e0b2a78dec55c2e81a
12,583
[ -1 ]
12,584
galen-1a.lisp
lambdamikel_DLMAPS/src/prover/KBs/galen-1a.lisp
(define-primitive-role R1) (define-primitive-role R2) (define-primitive-role R3) (define-primitive-role R4) (define-primitive-role R5) (define-primitive-role R6) (define-primitive-role R7) (define-primitive-role R8) (define-primitive-role R9) (define-primitive-role R10) (define-primitive-role R11) (define-primitive-role R12) (define-primitive-role R13) (define-primitive-role R14) (define-primitive-role R15) (define-primitive-role R16) (define-primitive-role R17) (define-primitive-role R18) (define-primitive-role R19) (define-primitive-role R20) (define-primitive-role R21) (define-primitive-role R22) (define-primitive-role R23) (define-primitive-role R24) (define-primitive-role R25) (define-primitive-role R26) (define-primitive-role R27) (define-primitive-role R28) (define-primitive-role R29) (define-primitive-role R30) (define-primitive-role R31) (define-primitive-role R32) (define-primitive-role R33) (define-primitive-role R34) (define-primitive-role R35) (define-primitive-role R36) (define-primitive-role R37) (define-primitive-role R38) (define-primitive-role R39) (define-primitive-role R40) (define-primitive-role R41) (define-primitive-role R42) (define-primitive-role R43) (define-primitive-role R44) (define-primitive-role R45) (define-primitive-role R46) (define-primitive-role R47) (define-primitive-role R48) (define-primitive-role R49) (define-primitive-role R50) (define-primitive-role R51) (define-primitive-role R52) (define-primitive-role R53) (define-primitive-role R54) (define-primitive-role R55) (define-primitive-role R56) (define-primitive-role R57) (define-primitive-role R58) (define-primitive-role R59) (define-primitive-role R60) (define-primitive-role R61) (define-primitive-role R62) (define-primitive-role R63) (define-primitive-role R64) (define-primitive-role R65) (define-primitive-role R66) (define-primitive-role R67) (define-primitive-role R68) (define-primitive-role R69) (define-primitive-role R70) (define-primitive-role R71) (define-primitive-role R72) (define-primitive-role R73) (define-primitive-role R74) (define-primitive-role R75) (define-primitive-role R76) (define-primitive-role R77) (define-primitive-role R78) (define-primitive-role R79) (define-primitive-role R80) (define-primitive-role R81) (define-primitive-role R82) (define-primitive-role R83) (define-primitive-role R84) (define-primitive-role R85) (define-primitive-role R86) (define-primitive-role R87) (define-primitive-role R88) (define-primitive-role R89) (define-primitive-role R90) (define-primitive-role R91) (define-primitive-role R92) (define-primitive-role R93) (define-primitive-role R94) (define-primitive-role R95) (define-primitive-role R96) (define-primitive-role R97) (define-primitive-role R98) (define-primitive-role R99) (define-primitive-role R100) (define-primitive-role R101) (define-primitive-role R102) (define-primitive-role R103) (define-primitive-role R104) (define-primitive-role R105) (define-primitive-role R106) (define-primitive-role R107) (define-primitive-role R108) (define-primitive-role R109) (define-primitive-role R110) (define-primitive-role R111) (define-primitive-role R112) (define-primitive-role R113) (define-primitive-role R114) (define-primitive-role R115) (define-primitive-role R116) (define-primitive-role R117) (define-primitive-role R118) (define-primitive-role R119) (define-primitive-role R120) (define-primitive-role R121) (define-primitive-role R122) (define-primitive-role R123) (define-primitive-role R124) (define-primitive-role R125) (define-primitive-role R126) (define-primitive-role R127) (define-primitive-role R128) (define-primitive-role R129) (define-primitive-role R130) (define-primitive-role R131) (define-primitive-role R132) (define-primitive-role R133) (define-primitive-role R134) (define-primitive-role R135) (define-primitive-role R136) (define-primitive-role R137) (define-primitive-role R138) (define-primitive-role R139) (define-primitive-role R140) (define-primitive-role R141) (define-primitive-role R142) (define-primitive-role R143) (define-primitive-role R144) (define-primitive-role R145) (define-primitive-role R146) (define-primitive-role R147) (define-primitive-role R148) (define-primitive-role R149) (define-primitive-role R150) (define-primitive-role R151) (define-primitive-role R152) (define-primitive-role R153) (define-primitive-role R154) (define-primitive-role R155) (define-primitive-role R156) (define-primitive-role R157) (define-primitive-role R158) (define-primitive-role R159) (define-primitive-role R160) (define-primitive-role R161) (define-primitive-role R162) (define-primitive-role R163) (define-primitive-role R164) (define-primitive-role R165) (define-primitive-role R166) (define-primitive-role R167) (define-primitive-role R168) (define-primitive-role R169) (define-primitive-role R170) (define-primitive-role R171) (define-primitive-role R172) (define-primitive-role R173) (define-primitive-role R174) (define-primitive-role R175) (define-primitive-role R176) (define-primitive-role R177) (define-primitive-role R178) (define-primitive-role R179) (define-primitive-role R180) (define-primitive-role R181) (define-primitive-role R182) (define-primitive-role R183) (define-primitive-role R184) (define-primitive-role R185) (define-primitive-role R186) (define-primitive-role R187) (define-primitive-role R188) (define-primitive-role R189) (define-primitive-role R190) (define-primitive-role R191) (define-primitive-role R192) (define-primitive-role R193) (define-primitive-role R194) (define-primitive-role R195) (define-primitive-role R196) (define-primitive-role R197) (define-primitive-role R198) (define-primitive-role R199) (define-primitive-role R200) (define-primitive-role R201) (define-primitive-role R202) (define-primitive-role R203) (define-primitive-role R204) (define-primitive-role R205) (define-primitive-role R206) (define-primitive-role R207) (define-primitive-role R208) (define-primitive-role R209) (define-primitive-role R210) (define-primitive-role R211) (define-primitive-role R212) (define-primitive-role R213) (define-primitive-role R214) (define-primitive-role R215) (define-primitive-role R216) (define-primitive-role R217) (define-primitive-role R218) (define-primitive-role R219) (define-primitive-role R220) (define-primitive-role R221) (define-primitive-role R222) (define-primitive-role R223) (define-primitive-role R224) (define-primitive-role R225) (define-primitive-role R226) (define-primitive-role R227) (define-primitive-role R228) (define-primitive-role R229) (define-primitive-role R230) (define-primitive-role R231) (define-primitive-role R232) (define-primitive-role R233) (define-primitive-role R234) (define-primitive-role R235) (define-primitive-role R236) (define-primitive-role R237) (define-primitive-role R238) (define-primitive-role R239) (define-primitive-role R240) (define-primitive-role R241) (define-primitive-role R242) (define-primitive-role R243) (define-primitive-role R244) (define-primitive-role R245) (define-primitive-role R246) (define-primitive-role R247) (define-primitive-role R248) (define-primitive-role R249) (define-primitive-role R250) (define-primitive-role R251) (define-primitive-role R252) (define-primitive-role R253) (define-primitive-role R254) (define-primitive-role R255) (define-primitive-role R256) (define-primitive-role R257) (define-primitive-role R258) (define-primitive-role R259) (define-primitive-role R260) (define-primitive-role R261) (define-primitive-role R262) (define-primitive-role R263) (define-primitive-role R264) (define-primitive-role R265) (define-primitive-role R266) (define-primitive-role R267) (define-primitive-role R268) (define-primitive-role R269) (define-primitive-role R270) (define-primitive-role R271) (define-primitive-role R272) (define-primitive-role R273) (define-primitive-role R274) (define-primitive-role R275) (define-primitive-role R276) (define-primitive-role R277) (define-primitive-role R278) (define-primitive-role R279) (define-primitive-role R280) (define-primitive-role R281) (define-primitive-role R282) (define-primitive-role R283) (define-primitive-role R284) (define-primitive-role R285) (define-primitive-role R286) (define-primitive-role R287) (define-primitive-role R288) (define-primitive-role R289) (define-primitive-role R290) (define-primitive-role R291) (define-primitive-role R292) (define-primitive-role R293) (define-primitive-role R294) (define-primitive-role R295) (define-primitive-role R296) (define-primitive-role R297) (define-primitive-role R298) (define-primitive-role R299) (define-primitive-role R300) (define-primitive-role R301) (define-primitive-role R302) (define-primitive-role R303) (define-primitive-role R304) (define-primitive-role R305) (define-primitive-role R306) (define-primitive-role R307) (define-primitive-role R308) (define-primitive-role R309) (define-primitive-role R310) (define-primitive-role R311) (define-primitive-role R312) (define-primitive-role R313) (define-primitive-role R314) (define-primitive-role R315) (define-primitive-role R316) (define-primitive-role R317) (define-primitive-role R318) (define-primitive-role R319) (define-primitive-role R320) (define-primitive-role R321) (define-primitive-role R322) (define-primitive-role R323) (define-primitive-role R324) (define-primitive-role R325) (define-primitive-role R326) (define-primitive-role R327) (define-primitive-role R328) (define-primitive-role R329) (define-primitive-role R330) (define-primitive-role R331) (define-primitive-role R332) (define-primitive-role R333) (define-primitive-role R334) (define-primitive-role R335) (define-primitive-role R336) (define-primitive-role R337) (define-primitive-role R338) (define-primitive-role R339) (define-primitive-role R340) (define-primitive-role R341) (define-primitive-role R342) (define-primitive-role R343) (define-primitive-role R344) (define-primitive-role R345) (define-primitive-role R346) (define-primitive-role R347) (define-primitive-role R348) (define-primitive-role R349) (define-primitive-role R350) (define-primitive-role R351) (define-primitive-role R352) (define-primitive-role R353) (define-primitive-role R354) (define-primitive-role R355) (define-primitive-role R356) (define-primitive-role R357) (define-primitive-role R358) (define-primitive-role R359) (define-primitive-role R360) (define-primitive-role R361) (define-primitive-role R362) (define-primitive-role R363) (define-primitive-role R364) (define-primitive-role R365) (define-primitive-role R366) (define-primitive-role R367) (define-primitive-role R368) (define-primitive-role R369) (define-primitive-role R370) (define-primitive-role R371) (define-primitive-role R372) (define-primitive-role R373) (define-primitive-role R374) (define-primitive-role R375) (define-primitive-role R376) (define-primitive-role R377) (define-primitive-role R378) (define-primitive-role R379) (define-primitive-role R380) (define-primitive-role R381) (define-primitive-role R382) (define-primitive-role R383) (define-primitive-role R384) (define-primitive-role R385) (define-primitive-role R386) (define-primitive-role R387) (define-primitive-role R388) (define-primitive-role R389) (define-primitive-role R390) (define-primitive-role R391) (define-primitive-role R392) (define-primitive-role R393) (define-primitive-role R394) (define-primitive-role R395) (define-primitive-role R396) (define-primitive-role R397) (define-primitive-role R398) (define-primitive-role R399) (define-primitive-role R400) (define-primitive-role R401) (define-primitive-role R402) (define-primitive-role R403) (define-primitive-role R404) (define-primitive-role R405) (define-primitive-role R406) (define-primitive-role R407) (define-primitive-role R408) (define-primitive-role R409) (define-primitive-role R410) (define-primitive-role R411) (define-primitive-role R412) (define-primitive-role R413) (define-primitive-concept C1) (define-primitive-concept C2) (define-primitive-concept C3) (define-primitive-concept C4 C1) (define-primitive-concept C5 C4) (define-primitive-concept C6 C5) (define-primitive-concept C7 C5) (define-primitive-concept C8 C7) (define-primitive-concept C9 C5) (define-primitive-concept C10 C9) (define-primitive-concept C11 C10) (define-primitive-concept C12 C11) (define-primitive-concept C13 C12) (define-primitive-concept C14 C12) (define-primitive-concept C15 C9) (define-primitive-concept C16 C15) (define-primitive-concept C17 C16) (define-primitive-concept C18 C17) (define-primitive-concept C19 C18) (define-primitive-concept C20 (AND C4 (OR (ALL R390 (NOT C13)) (SOME R398 (AND C14 (SOME R202 C19)))))) (define-primitive-concept C21 C9) (define-primitive-concept C22 C21) (define-primitive-concept C23 C22) (define-primitive-concept C24 C23) (define-primitive-concept C25 C24) (define-primitive-concept C26 C23) (define-primitive-concept C27 C26) (define-primitive-concept C28 C24) (define-primitive-concept C29 C11) (define-primitive-concept C30 C16) (define-primitive-concept C31 C30) (define-primitive-concept C32 (AND C20 (OR (ALL R180 (NOT C25)) (SOME R178 C25)) (OR (ALL R184 (NOT C27)) (SOME R182 C27)) (OR (ALL R180 (NOT C28)) (ALL R366 (OR (NOT C29) (ALL R202 (NOT C31)))) (SOME R178 C25)))) (define-primitive-concept C33 (AND C4 (OR (ALL R404 (NOT C8)) (SOME R406 C8)) (OR (ALL R129 (NOT C32)) (ALL R180 (NOT C25)) (SOME R178 C25)) (OR (ALL R129 (NOT C32)) (ALL R184 (NOT C27)) (SOME R182 C27)))) (define-primitive-concept C34 C33) (define-primitive-concept C35 C34) (define-primitive-concept C36 C10) (define-primitive-concept C37 C36) (define-primitive-concept C38 C37) (define-primitive-concept C39 C33) (define-primitive-concept C40 C36) (define-primitive-concept C41 C40) (define-primitive-concept C42 C41) (define-primitive-concept C43 C15) (define-primitive-concept C44 C43) (define-primitive-concept C45 C44) (define-primitive-concept C46 C45) (define-primitive-concept C47 C46) (define-primitive-concept C48 C21) (define-primitive-concept C49 C48) (define-primitive-concept C50 C49) (define-primitive-concept C51 (AND C39 (OR (ALL R268 (OR (NOT C42) (ALL R202 (NOT C47)))) (SOME R280 C50)))) (define-primitive-concept C52 (AND C51 (SOME R280 C50))) (define-primitive-concept C53 (AND C52 (SOME R268 (AND C42 (SOME R202 C47))))) (define-primitive-concept C54 C53) (define-primitive-concept C55 C54) (define-primitive-concept C56 (AND C4 (OR (ALL R404 (NOT C8)) (SOME R406 C8)) (OR (ALL R129 (NOT C32)) (ALL R180 (NOT C25)) (SOME R178 C25)) (OR (ALL R129 (NOT C32)) (ALL R184 (NOT C27)) (SOME R182 C27)))) (define-primitive-concept C57 C49) (define-primitive-concept C58 C57) (define-primitive-concept C59 (AND C56 (SOME R280 C58))) (define-primitive-concept C60 (AND C59 (OR (ALL R129 (OR (NOT C32) (ALL R184 (NOT C27)))) (SOME R184 C27)) (OR (ALL R129 (OR (NOT C32) (ALL R180 (NOT C25)))) (SOME R180 C25)) (OR (ALL R180 (NOT C25)) (SOME R178 C25)) (OR (ALL R184 (NOT C27)) (SOME R182 C27)))) (define-primitive-concept C61 C60) (define-primitive-concept C62 C61) (define-primitive-concept C63 C10) (define-primitive-concept C64 C63) (define-primitive-concept C65 C15) (define-primitive-concept C66 C65) (define-primitive-concept C67 C66) (define-concept C68 (AND C62 (SOME R348 (AND C64 (SOME R202 C67)))))
15,655
Common Lisp
.lisp
493
29.894523
104
0.783736
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
bb2741e7fca15903229fbaebfc2a1410ad8d4ef24bd7aef8b9a72cbc2e431fa8
12,584
[ -1 ]
12,585
galen-1.lisp
lambdamikel_DLMAPS/src/prover/KBs/galen-1.lisp
(define-primitive-role R1) (define-primitive-role R2) (define-primitive-role R3) (define-primitive-role R4) (define-primitive-role R5) (define-primitive-role R6) (define-primitive-role R7) (define-primitive-role R8) (define-primitive-role R9) (define-primitive-role R10) (define-primitive-role R11) (define-primitive-role R12) (define-primitive-role R13) (define-primitive-role R14) (define-primitive-role R15) (define-primitive-role R16) (define-primitive-role R17) (define-primitive-role R18) (define-primitive-role R19) (define-primitive-role R20) (define-primitive-role R21) (define-primitive-role R22) (define-primitive-role R23) (define-primitive-role R24) (define-primitive-role R25) (define-primitive-role R26) (define-primitive-role R27) (define-primitive-role R28) (define-primitive-role R29) (define-primitive-role R30) (define-primitive-role R31) (define-primitive-role R32) (define-primitive-role R33) (define-primitive-role R34) (define-primitive-role R35) (define-primitive-role R36) (define-primitive-role R37) (define-primitive-role R38) (define-primitive-role R39) (define-primitive-role R40) (define-primitive-role R41) (define-primitive-role R42) (define-primitive-role R43) (define-primitive-role R44) (define-primitive-role R45) (define-primitive-role R46) (define-primitive-role R47) (define-primitive-role R48) (define-primitive-role R49) (define-primitive-role R50) (define-primitive-role R51) (define-primitive-role R52) (define-primitive-role R53) (define-primitive-role R54) (define-primitive-role R55) (define-primitive-role R56) (define-primitive-role R57) (define-primitive-role R58) (define-primitive-role R59) (define-primitive-role R60) (define-primitive-role R61) (define-primitive-role R62) (define-primitive-role R63) (define-primitive-role R64) (define-primitive-role R65) (define-primitive-role R66) (define-primitive-role R67) (define-primitive-role R68) (define-primitive-role R69) (define-primitive-role R70) (define-primitive-role R71) (define-primitive-role R72) (define-primitive-role R73) (define-primitive-role R74) (define-primitive-role R75) (define-primitive-role R76) (define-primitive-role R77) (define-primitive-role R78) (define-primitive-role R79) (define-primitive-role R80) (define-primitive-role R81) (define-primitive-role R82) (define-primitive-role R83) (define-primitive-role R84) (define-primitive-role R85) (define-primitive-role R86) (define-primitive-role R87) (define-primitive-role R88) (define-primitive-role R89) (define-primitive-role R90) (define-primitive-role R91) (define-primitive-role R92) (define-primitive-role R93) (define-primitive-role R94) (define-primitive-role R95) (define-primitive-role R96) (define-primitive-role R97) (define-primitive-role R98) (define-primitive-role R99) (define-primitive-role R100) (define-primitive-role R101) (define-primitive-role R102) (define-primitive-role R103) (define-primitive-role R104) (define-primitive-role R105) (define-primitive-role R106) (define-primitive-role R107) (define-primitive-role R108) (define-primitive-role R109) (define-primitive-role R110) (define-primitive-role R111) (define-primitive-role R112) (define-primitive-role R113) (define-primitive-role R114) (define-primitive-role R115) (define-primitive-role R116) (define-primitive-role R117) (define-primitive-role R118) (define-primitive-role R119) (define-primitive-role R120) (define-primitive-role R121) (define-primitive-role R122) (define-primitive-role R123) (define-primitive-role R124) (define-primitive-role R125) (define-primitive-role R126) (define-primitive-role R127) (define-primitive-role R128) (define-primitive-role R129) (define-primitive-role R130) (define-primitive-role R131) (define-primitive-role R132) (define-primitive-role R133) (define-primitive-role R134) (define-primitive-role R135) (define-primitive-role R136) (define-primitive-role R137) (define-primitive-role R138) (define-primitive-role R139) (define-primitive-role R140) (define-primitive-role R141) (define-primitive-role R142) (define-primitive-role R143) (define-primitive-role R144) (define-primitive-role R145) (define-primitive-role R146) (define-primitive-role R147) (define-primitive-role R148) (define-primitive-role R149) (define-primitive-role R150) (define-primitive-role R151) (define-primitive-role R152) (define-primitive-role R153) (define-primitive-role R154) (define-primitive-role R155) (define-primitive-role R156) (define-primitive-role R157) (define-primitive-role R158) (define-primitive-role R159) (define-primitive-role R160) (define-primitive-role R161) (define-primitive-role R162) (define-primitive-role R163) (define-primitive-role R164) (define-primitive-role R165) (define-primitive-role R166) (define-primitive-role R167) (define-primitive-role R168) (define-primitive-role R169) (define-primitive-role R170) (define-primitive-role R171) (define-primitive-role R172) (define-primitive-role R173) (define-primitive-role R174) (define-primitive-role R175) (define-primitive-role R176) (define-primitive-role R177) (define-primitive-role R178) (define-primitive-role R179) (define-primitive-role R180) (define-primitive-role R181) (define-primitive-role R182) (define-primitive-role R183) (define-primitive-role R184) (define-primitive-role R185) (define-primitive-role R186) (define-primitive-role R187) (define-primitive-role R188) (define-primitive-role R189) (define-primitive-role R190) (define-primitive-role R191) (define-primitive-role R192) (define-primitive-role R193) (define-primitive-role R194) (define-primitive-role R195) (define-primitive-role R196) (define-primitive-role R197) (define-primitive-role R198) (define-primitive-role R199) (define-primitive-role R200) (define-primitive-role R201) (define-primitive-role R202) (define-primitive-role R203) (define-primitive-role R204) (define-primitive-role R205) (define-primitive-role R206) (define-primitive-role R207) (define-primitive-role R208) (define-primitive-role R209) (define-primitive-role R210) (define-primitive-role R211) (define-primitive-role R212) (define-primitive-role R213) (define-primitive-role R214) (define-primitive-role R215) (define-primitive-role R216) (define-primitive-role R217) (define-primitive-role R218) (define-primitive-role R219) (define-primitive-role R220) (define-primitive-role R221) (define-primitive-role R222) (define-primitive-role R223) (define-primitive-role R224) (define-primitive-role R225) (define-primitive-role R226) (define-primitive-role R227) (define-primitive-role R228) (define-primitive-role R229) (define-primitive-role R230) (define-primitive-role R231) (define-primitive-role R232) (define-primitive-role R233) (define-primitive-role R234) (define-primitive-role R235) (define-primitive-role R236) (define-primitive-role R237) (define-primitive-role R238) (define-primitive-role R239) (define-primitive-role R240) (define-primitive-role R241) (define-primitive-role R242) (define-primitive-role R243) (define-primitive-role R244) (define-primitive-role R245) (define-primitive-role R246) (define-primitive-role R247) (define-primitive-role R248) (define-primitive-role R249) (define-primitive-role R250) (define-primitive-role R251) (define-primitive-role R252) (define-primitive-role R253) (define-primitive-role R254) (define-primitive-role R255) (define-primitive-role R256) (define-primitive-role R257) (define-primitive-role R258) (define-primitive-role R259) (define-primitive-role R260) (define-primitive-role R261) (define-primitive-role R262) (define-primitive-role R263) (define-primitive-role R264) (define-primitive-role R265) (define-primitive-role R266) (define-primitive-role R267) (define-primitive-role R268) (define-primitive-role R269) (define-primitive-role R270) (define-primitive-role R271) (define-primitive-role R272) (define-primitive-role R273) (define-primitive-role R274) (define-primitive-role R275) (define-primitive-role R276) (define-primitive-role R277) (define-primitive-role R278) (define-primitive-role R279) (define-primitive-role R280) (define-primitive-role R281) (define-primitive-role R282) (define-primitive-role R283) (define-primitive-role R284) (define-primitive-role R285) (define-primitive-role R286) (define-primitive-role R287) (define-primitive-role R288) (define-primitive-role R289) (define-primitive-role R290) (define-primitive-role R291) (define-primitive-role R292) (define-primitive-role R293) (define-primitive-role R294) (define-primitive-role R295) (define-primitive-role R296) (define-primitive-role R297) (define-primitive-role R298) (define-primitive-role R299) (define-primitive-role R300) (define-primitive-role R301) (define-primitive-role R302) (define-primitive-role R303) (define-primitive-role R304) (define-primitive-role R305) (define-primitive-role R306) (define-primitive-role R307) (define-primitive-role R308) (define-primitive-role R309) (define-primitive-role R310) (define-primitive-role R311) (define-primitive-role R312) (define-primitive-role R313) (define-primitive-role R314) (define-primitive-role R315) (define-primitive-role R316) (define-primitive-role R317) (define-primitive-role R318) (define-primitive-role R319) (define-primitive-role R320) (define-primitive-role R321) (define-primitive-role R322) (define-primitive-role R323) (define-primitive-role R324) (define-primitive-role R325) (define-primitive-role R326) (define-primitive-role R327) (define-primitive-role R328) (define-primitive-role R329) (define-primitive-role R330) (define-primitive-role R331) (define-primitive-role R332) (define-primitive-role R333) (define-primitive-role R334) (define-primitive-role R335) (define-primitive-role R336) (define-primitive-role R337) (define-primitive-role R338) (define-primitive-role R339) (define-primitive-role R340) (define-primitive-role R341) (define-primitive-role R342) (define-primitive-role R343) (define-primitive-role R344) (define-primitive-role R345) (define-primitive-role R346) (define-primitive-role R347) (define-primitive-role R348) (define-primitive-role R349) (define-primitive-role R350) (define-primitive-role R351) (define-primitive-role R352) (define-primitive-role R353) (define-primitive-role R354) (define-primitive-role R355) (define-primitive-role R356) (define-primitive-role R357) (define-primitive-role R358) (define-primitive-role R359) (define-primitive-role R360) (define-primitive-role R361) (define-primitive-role R362) (define-primitive-role R363) (define-primitive-role R364) (define-primitive-role R365) (define-primitive-role R366) (define-primitive-role R367) (define-primitive-role R368) (define-primitive-role R369) (define-primitive-role R370) (define-primitive-role R371) (define-primitive-role R372) (define-primitive-role R373) (define-primitive-role R374) (define-primitive-role R375) (define-primitive-role R376) (define-primitive-role R377) (define-primitive-role R378) (define-primitive-role R379) (define-primitive-role R380) (define-primitive-role R381) (define-primitive-role R382) (define-primitive-role R383) (define-primitive-role R384) (define-primitive-role R385) (define-primitive-role R386) (define-primitive-role R387) (define-primitive-role R388) (define-primitive-role R389) (define-primitive-role R390) (define-primitive-role R391) (define-primitive-role R392) (define-primitive-role R393) (define-primitive-role R394) (define-primitive-role R395) (define-primitive-role R396) (define-primitive-role R397) (define-primitive-role R398) (define-primitive-role R399) (define-primitive-role R400) (define-primitive-role R401) (define-primitive-role R402) (define-primitive-role R403) (define-primitive-role R404) (define-primitive-role R405) (define-primitive-role R406) (define-primitive-role R407) (define-primitive-role R408) (define-primitive-role R409) (define-primitive-role R410) (define-primitive-role R411) (define-primitive-role R412) (define-primitive-role R413) (define-primitive-concept C1) (define-primitive-concept C2) (define-primitive-concept C3) (define-primitive-concept C4 C1) (define-primitive-concept C5 C4) (define-primitive-concept C6 C5) (define-primitive-concept C7 C5) (define-primitive-concept C8 C7) (define-primitive-concept C9 C5) (define-primitive-concept C10 C9) (define-primitive-concept C11 C10) (define-primitive-concept C12 C11) (define-primitive-concept C13 C12) (define-primitive-concept C14 C12) (define-primitive-concept C15 C9) (define-primitive-concept C16 C15) (define-primitive-concept C17 C16) (define-primitive-concept C18 C17) (define-primitive-concept C19 C18) (define-primitive-concept C20 (AND C4 (OR (ALL R390 (NOT C13)) (SOME R398 (AND C14 (SOME R202 C19)))))) (define-primitive-concept C21 C9) (define-primitive-concept C22 C21) (define-primitive-concept C23 C22) (define-primitive-concept C24 C23) (define-primitive-concept C25 C24) (define-primitive-concept C26 C23) (define-primitive-concept C27 C26) (define-primitive-concept C28 C24) (define-primitive-concept C29 C11) (define-primitive-concept C30 C16) (define-primitive-concept C31 C30) (define-primitive-concept C32 (AND C20 (OR (ALL R180 (NOT C25)) (SOME R178 C25)) (OR (ALL R184 (NOT C27)) (SOME R182 C27)) (OR (ALL R180 (NOT C28)) (ALL R366 (OR (NOT C29) (ALL R202 (NOT C31)))) (SOME R178 C25)))) (define-primitive-concept C33 (AND C4 (OR (ALL R404 (NOT C8)) (SOME R406 C8)) (OR (ALL R129 (NOT C32)) (ALL R180 (NOT C25)) (SOME R178 C25)) (OR (ALL R129 (NOT C32)) (ALL R184 (NOT C27)) (SOME R182 C27)))) (define-primitive-concept C34 C33) (define-primitive-concept C35 C34) (define-primitive-concept C36 C10) (define-primitive-concept C37 C36) (define-primitive-concept C38 C37) (define-primitive-concept C39 C33) (define-primitive-concept C40 C36) (define-primitive-concept C41 C40) (define-primitive-concept C42 C41) (define-primitive-concept C43 C15) (define-primitive-concept C44 C43) (define-primitive-concept C45 C44) (define-primitive-concept C46 C45) (define-primitive-concept C47 C46) (define-primitive-concept C48 C21) (define-primitive-concept C49 C48) (define-primitive-concept C50 C49) (define-primitive-concept C51 (AND C39 (OR (ALL R268 (OR (NOT C42) (ALL R202 (NOT C47)))) (SOME R280 C50)))) (define-primitive-concept C52 (AND C51 (SOME R280 C50))) (define-primitive-concept C53 (AND C52 (SOME R268 (AND C42 (SOME R202 C47))))) (define-primitive-concept C54 C53) (define-primitive-concept C55 C54) (define-primitive-concept C56 (AND C4 (OR (ALL R404 (NOT C8)) (SOME R406 C8)) (OR (ALL R129 (NOT C32)) (ALL R180 (NOT C25)) (SOME R178 C25)) (OR (ALL R129 (NOT C32)) (ALL R184 (NOT C27)) (SOME R182 C27)))) (define-primitive-concept C57 C49) (define-primitive-concept C58 C57) (define-primitive-concept C59 (AND C56 (SOME R280 C58))) (define-primitive-concept C60 (AND C59 (OR (ALL R129 (OR (NOT C32) (ALL R184 (NOT C27)))) (SOME R184 C27)) (OR (ALL R129 (OR (NOT C32) (ALL R180 (NOT C25)))) (SOME R180 C25)) (OR (ALL R180 (NOT C25)) (SOME R178 C25)) (OR (ALL R184 (NOT C27)) (SOME R182 C27)))) (define-primitive-concept C61 C60) (define-primitive-concept C62 C61) (define-primitive-concept C63 C10) (define-primitive-concept C64 C63) (define-primitive-concept C65 C15) (define-primitive-concept C66 C65) (define-primitive-concept C67 C66) (define-concept C68 (AND C62 (SOME R348 (AND C64 (SOME R202 C67))))) (define-primitive-concept C69 C15) (define-primitive-concept C70 C69) (define-primitive-concept C71 C70) (define-primitive-concept C72 C71) (define-primitive-concept C73 C54) (define-primitive-concept C74 C54) (define-primitive-concept C75 C54) (define-primitive-concept C76 C71) (define-primitive-concept C77 C54) (define-primitive-concept C78 C54) (define-primitive-concept C79 C44) (define-primitive-concept C80 C79) (define-primitive-concept C81 C80) (define-primitive-concept C82 (AND C40 (OR (ALL R202 (NOT C81)) (ALL R271 (NOT C78)) (SOME R178 C25)))) (define-concept C83 (AND C78 (SOME R270 (AND C82 (SOME R202 C81))))) (define-primitive-concept C84 (AND C38 (OR (ALL R291 (OR (NOT C55) (ALL R47 (NOT C68)))) (ALL R204 (NOT C72)) (SOME R178 C25)) (OR (ALL R291 (OR (NOT C73) (ALL R47 (NOT C68)))) (ALL R204 (NOT C72)) (SOME R178 C25)) (OR (ALL R291 (OR (NOT C74) (ALL R47 (NOT C68)))) (ALL R204 (NOT C72)) (SOME R178 C25)) (OR (ALL R291 (OR (NOT C75) (ALL R47 (NOT C68)))) (ALL R204 (NOT C72)) (SOME R178 C25)) (OR (ALL R291 (OR (NOT C75) (ALL R47 (NOT C68)))) (ALL R204 (NOT C76)) (SOME R178 C25)) (OR (ALL R291 (OR (NOT C77) (ALL R47 (NOT C68)))) (ALL R204 (NOT C72)) (SOME R178 C25)) (OR (ALL R291 (OR (NOT C77) (ALL R47 (NOT C68)))) (ALL R204 (NOT C76)) (SOME R178 C25)) (OR (ALL R291 (OR (NOT C78) (ALL R47 (NOT C68)))) (ALL R204 (NOT C72)) (SOME R178 C25)) (OR (ALL R291 (OR (NOT C78) (ALL R47 (NOT C68)))) (ALL R204 (NOT C76)) (SOME R178 C25)) (OR (ALL R291 (OR (NOT C83) (ALL R47 (NOT C68)))) (ALL R204 (NOT C72)) (SOME R178 C25)))) (define-primitive-concept C85 C70) (define-primitive-concept C86 C85) (define-primitive-concept C87 (AND C85 C86)) (define-primitive-concept C88 (AND C85 C86)) (define-primitive-concept C89 (AND C40 (OR (ALL R212 (NOT C87)) (ALL R273 (NOT C78)) (SOME R178 C25)) (OR (ALL R212 (NOT C88)) (ALL R273 (NOT C78)) (SOME R178 C25)))) (define-concept C90 (AND C78 (SOME R272 (AND C89 (SOME R212 C88))))) (define-concept C91 (AND C84 (SOME R291 (AND C90 (SOME R47 C68))) (SOME R204 C72))) (define-concept C92 (AND C78 (SOME R272 (AND C89 (SOME R212 C87))))) (define-concept C93 (AND C84 (SOME R291 (AND C92 (SOME R47 C68))) (SOME R204 C72))) (define-concept C94 (AND C84 (SOME R291 (AND C83 (SOME R47 C68))) (SOME R204 C72))) (define-primitive-concept C95 C59) (define-primitive-concept C96 C95) (define-primitive-concept C97 C96) (define-primitive-concept C98 C97) (define-primitive-concept C99 C98) (define-primitive-concept C100 C27) (define-primitive-concept C101 (AND C32 (SOME R184 C27))) (define-primitive-concept C102 C5) (define-primitive-concept C103 C102) (define-primitive-concept C104 C103) (define-primitive-concept C105 C104) (define-primitive-concept C106 (AND C101 (SOME R180 C25) (SOME R412 C105))) (define-primitive-concept C107 C32) (define-primitive-concept C108 C48) (define-primitive-concept C109 C108) (define-primitive-concept C110 C109) (define-primitive-concept C111 C110) (define-primitive-concept C112 C111) (define-primitive-concept C113 C102) (define-primitive-concept C114 C113) (define-primitive-concept C115 C114) (define-primitive-concept C116 C47) (define-primitive-concept C117 C116) (define-primitive-concept C118 C117) (define-primitive-concept C119 C40) (define-primitive-concept C120 C119) (define-primitive-concept C121 C44) (define-primitive-concept C122 C121) (define-primitive-concept C123 C122) (define-primitive-concept C124 C43) (define-primitive-concept C125 C124) (define-primitive-concept C126 C125) (define-primitive-concept C127 C22) (define-primitive-concept C128 C127) (define-primitive-concept C129 C128) (define-primitive-concept C130 C122) (define-primitive-concept C131 C130) (define-primitive-concept C132 C131) (define-primitive-concept C133 C132) (define-primitive-concept C134 C130) (define-primitive-concept C135 (AND C51 (OR (ALL R129 (OR (NOT C32) (ALL R184 (NOT C27)))) (SOME R184 C27)) (OR (ALL R129 (OR (NOT C32) (ALL R180 (NOT C25)))) (SOME R180 C25)) (OR (ALL R180 (NOT C25)) (SOME R178 C25)) (OR (ALL R184 (NOT C27)) (SOME R182 C27)) (OR (ALL R232 (NOT C112)) (SOME R410 C115)) (OR (ALL R268 (OR (NOT C42) (ALL R202 (NOT C118)))) (SOME R284 (AND C120 (SOME R202 C123)))) (OR (ALL R232 (NOT C111)) (ALL R310 (NOT C126)) (SOME R410 C115)) (OR (ALL R278 (NOT C129)) (SOME R284 (AND C120 (SOME R202 C130)))) (OR (ALL R278 (NOT C129)) (ALL R284 (OR (NOT C120) (ALL R202 (NOT C133)))) (SOME R410 C114)) (OR (ALL R278 (NOT C129)) (ALL R284 (OR (NOT C120) (ALL R202 (NOT C134)))) (SOME R410 C114)))) (define-primitive-concept C136 (AND C135 (SOME R180 C25))) (define-primitive-concept C137 (AND C136 (SOME R280 C50) (OR (ALL R106 (OR (NOT C135) (ALL R410 (NOT C115)))) (SOME R410 C115)))) (define-primitive-concept C138 C137) (define-primitive-concept C139 (AND C107 (OR (ALL R128 (OR (NOT C135) (ALL R107 (NOT C138)))) (SOME R178 C25)))) (define-primitive-concept C140 (AND C4 (OR (ALL R404 (NOT C8)) (SOME R406 C8)) (SOME R90 C139))) (define-primitive-concept C141 (AND C140 C52)) (define-primitive-concept C142 (AND C106 (SOME R146 C141))) (define-primitive-concept C143 C96) (define-primitive-concept C144 (AND C63 (OR (ALL R353 (OR (NOT C99) (ALL R45 (NOT C68)))) (ALL R204 (NOT C72)) (SOME R182 C100)) (OR (ALL R353 (OR (NOT C99) (ALL R45 (NOT C68)))) (ALL R204 (NOT C72)) (SOME R142 C142)) (OR (ALL R353 (OR (NOT C143) (ALL R45 (NOT C68)))) (ALL R204 (NOT C72)) (SOME R178 C25)) (OR (ALL R353 (OR (NOT C143) (ALL R45 (NOT C68)))) (ALL R204 (NOT C76)) (SOME R178 C25)))) (define-concept C145 (AND C144 (SOME R353 (AND C143 (SOME R45 C68))))) (define-concept C146 (AND C145 (SOME R204 C76))) (define-primitive-concept C147 (AND C35 (OR (ALL R180 (NOT C25)) (SOME R178 C25)) (OR (ALL R184 (NOT C27)) (SOME R182 C27)) (OR (ALL R190 (NOT C91)) (SOME R178 C25)) (OR (ALL R190 (NOT C93)) (SOME R178 C25)) (OR (ALL R190 (NOT C94)) (ALL R190 (NOT C93)) (ALL R190 (NOT C146)) (SOME R178 C25)))) (define-primitive-concept C148 C35) (define-primitive-concept C149 C148) (define-primitive-concept C150 C148) (define-primitive-concept C151 C35) (define-primitive-concept C152 C35) (define-primitive-concept C153 C34) (define-primitive-concept C154 (AND C39 (SOME R282 (AND C119 (SOME R202 C123))))) (define-primitive-concept C155 (AND C39 (SOME R282 (AND C119 (SOME R202 C130))))) (define-primitive-concept C156 C26) (define-primitive-concept C157 (AND C135 (SOME R184 C156))) (define-primitive-concept C158 (AND C135 (OR (ALL R25 (OR (NOT C157) (ALL R232 (NOT C112)))) (SOME R232 C112)) (OR (ALL R25 (OR (NOT C157) (ALL R184 (NOT C156)))) (SOME R184 C156)))) (define-primitive-concept C159 (AND C135 (SOME R280 C50) (OR (ALL R25 (OR (NOT C157) (ALL R232 (NOT C112)))) (SOME R232 C112)) (OR (ALL R25 (OR (NOT C157) (ALL R184 (NOT C156)))) (SOME R184 C156)) (OR (ALL R25 (OR (NOT C157) (ALL R232 (NOT C109)))) (SOME R232 C109)))) (define-primitive-concept C160 (AND C51 (SOME R268 (AND C42 (SOME R202 C47))))) (define-primitive-concept C161 (AND C135 C160 (SOME R280 C50) (OR (ALL R51 (OR (NOT C135) (ALL R232 (NOT C112)))) (SOME R232 C112)) (OR (ALL R51 (OR (NOT C135) (ALL R184 (NOT C156)))) (SOME R184 C156)))) (define-primitive-concept C162 C20) (define-primitive-concept C163 C20) (define-primitive-concept C164 (AND C20 (OR (ALL R180 (NOT C25)) (SOME R178 C25)) (OR (ALL R184 (NOT C27)) (SOME R182 C27)))) (define-primitive-concept C165 (AND C20 (OR (ALL R180 (NOT C25)) (SOME R178 C25)) (OR (ALL R184 (NOT C27)) (SOME R182 C27)))) (define-primitive-concept C166 (AND C32 (SOME R180 C28))) (define-primitive-concept C167 C20) (define-primitive-concept C168 C167) (define-primitive-concept C169 C7) (define-primitive-concept C170 C169) (define-primitive-concept C171 C169) (define-primitive-concept C172 (AND C5 (OR (ALL R404 (NOT C8)) (SOME R406 C8)))) (define-primitive-concept C173 (AND C8 (OR (ALL R407 (OR (NOT C135) (ALL R180 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C60) (ALL R180 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C32) (ALL R180 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C147) (ALL R180 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C165) (ALL R180 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C164) (ALL R180 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (OR (NOT C33) (ALL R129 (NOT C32))) (ALL R180 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (OR (NOT C56) (ALL R129 (NOT C32))) (ALL R180 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (OR (NOT C20) (ALL R129 (NOT C32))) (ALL R180 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C135) (ALL R180 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C60) (ALL R180 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C32) (ALL R180 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C147) (ALL R180 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C165) (ALL R180 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C164) (ALL R180 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (OR (NOT C33) (ALL R129 (NOT C32))) (ALL R180 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (OR (NOT C56) (ALL R129 (NOT C32))) (ALL R180 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (OR (NOT C20) (ALL R129 (NOT C32))) (ALL R180 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C135) (ALL R184 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C60) (ALL R184 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C32) (ALL R184 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C147) (ALL R184 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C165) (ALL R184 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C164) (ALL R184 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (OR (NOT C33) (ALL R129 (NOT C32))) (ALL R184 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (OR (NOT C56) (ALL R129 (NOT C32))) (ALL R184 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (OR (NOT C20) (ALL R129 (NOT C32))) (ALL R184 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C135) (ALL R184 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C60) (ALL R184 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C32) (ALL R184 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C147) (ALL R184 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C165) (ALL R184 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C164) (ALL R184 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (OR (NOT C33) (ALL R129 (NOT C32))) (ALL R184 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (OR (NOT C56) (ALL R129 (NOT C32))) (ALL R184 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (OR (NOT C20) (ALL R129 (NOT C32))) (ALL R184 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C135) (ALL R184 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C60) (ALL R184 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C32) (ALL R184 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C147) (ALL R184 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C165) (ALL R184 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C164) (ALL R184 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (OR (NOT C33) (ALL R129 (NOT C32))) (ALL R184 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (OR (NOT C56) (ALL R129 (NOT C32))) (ALL R184 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (OR (NOT C20) (ALL R129 (NOT C32))) (ALL R184 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C135) (ALL R178 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C60) (ALL R178 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C32) (ALL R178 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C147) (ALL R178 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C165) (ALL R178 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C164) (ALL R178 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C33) (ALL R129 (NOT C32)) (ALL R178 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C56) (ALL R129 (NOT C32)) (ALL R178 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C20) (ALL R129 (NOT C32)) (ALL R178 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C172) (ALL R178 (NOT C25)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C135) (ALL R178 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C60) (ALL R178 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C32) (ALL R178 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C147) (ALL R178 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C165) (ALL R178 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C164) (ALL R178 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C33) (ALL R129 (NOT C32)) (ALL R178 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C56) (ALL R129 (NOT C32)) (ALL R178 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C20) (ALL R129 (NOT C32)) (ALL R178 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C172) (ALL R178 (NOT C25)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C135) (ALL R178 (NOT C28)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C60) (ALL R178 (NOT C28)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C32) (ALL R178 (NOT C28)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C147) (ALL R178 (NOT C28)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C165) (ALL R178 (NOT C28)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C164) (ALL R178 (NOT C28)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C33) (ALL R129 (NOT C32)) (ALL R178 (NOT C28)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C56) (ALL R129 (NOT C32)) (ALL R178 (NOT C28)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C20) (ALL R129 (NOT C32)) (ALL R178 (NOT C28)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C172) (ALL R178 (NOT C28)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C135) (ALL R182 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C60) (ALL R182 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C32) (ALL R182 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C147) (ALL R182 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C165) (ALL R182 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C164) (ALL R182 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C33) (ALL R129 (NOT C32)) (ALL R182 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C56) (ALL R129 (NOT C32)) (ALL R182 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C20) (ALL R129 (NOT C32)) (ALL R182 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C172) (ALL R182 (NOT C156)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C135) (ALL R182 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C60) (ALL R182 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C32) (ALL R182 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C147) (ALL R182 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C165) (ALL R182 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C164) (ALL R182 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C33) (ALL R129 (NOT C32)) (ALL R182 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C56) (ALL R129 (NOT C32)) (ALL R182 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C20) (ALL R129 (NOT C32)) (ALL R182 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C172) (ALL R182 (NOT C27)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C135) (ALL R182 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C60) (ALL R182 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C32) (ALL R182 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C147) (ALL R182 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C165) (ALL R182 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C164) (ALL R182 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C33) (ALL R129 (NOT C32)) (ALL R182 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C56) (ALL R129 (NOT C32)) (ALL R182 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C20) (ALL R129 (NOT C32)) (ALL R182 (NOT C27)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C172) (ALL R182 (NOT C27)))) (SOME R178 C28)))) (define-primitive-concept C174 (AND C8 (OR (ALL R407 (OR (NOT C135) (ALL R180 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C60) (ALL R180 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C32) (ALL R180 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C147) (ALL R180 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C165) (ALL R180 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C164) (ALL R180 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (OR (NOT C33) (ALL R129 (NOT C32))) (ALL R180 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (OR (NOT C56) (ALL R129 (NOT C32))) (ALL R180 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (OR (NOT C20) (ALL R129 (NOT C32))) (ALL R180 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C135) (ALL R184 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C60) (ALL R184 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C32) (ALL R184 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C147) (ALL R184 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C165) (ALL R184 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C164) (ALL R184 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (OR (NOT C33) (ALL R129 (NOT C32))) (ALL R184 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (OR (NOT C56) (ALL R129 (NOT C32))) (ALL R184 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (OR (NOT C20) (ALL R129 (NOT C32))) (ALL R184 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C135) (ALL R178 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C60) (ALL R178 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C32) (ALL R178 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C147) (ALL R178 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C165) (ALL R178 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C164) (ALL R178 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C33) (ALL R129 (NOT C32)) (ALL R178 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C56) (ALL R129 (NOT C32)) (ALL R178 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C20) (ALL R129 (NOT C32)) (ALL R178 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C172) (ALL R178 (NOT C25)))) (SOME R178 C25)) (OR (ALL R407 (OR (NOT C135) (ALL R178 (NOT C25)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C60) (ALL R178 (NOT C25)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C32) (ALL R178 (NOT C25)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C147) (ALL R178 (NOT C25)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C165) (ALL R178 (NOT C25)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C164) (ALL R178 (NOT C25)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C33) (ALL R129 (NOT C32)) (ALL R178 (NOT C25)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C56) (ALL R129 (NOT C32)) (ALL R178 (NOT C25)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C20) (ALL R129 (NOT C32)) (ALL R178 (NOT C25)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C172) (ALL R178 (NOT C25)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C135) (ALL R178 (NOT C28)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C60) (ALL R178 (NOT C28)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C32) (ALL R178 (NOT C28)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C147) (ALL R178 (NOT C28)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C165) (ALL R178 (NOT C28)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C164) (ALL R178 (NOT C28)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C33) (ALL R129 (NOT C32)) (ALL R178 (NOT C28)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C56) (ALL R129 (NOT C32)) (ALL R178 (NOT C28)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C20) (ALL R129 (NOT C32)) (ALL R178 (NOT C28)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C172) (ALL R178 (NOT C28)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C135) (ALL R178 (NOT C28)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C60) (ALL R178 (NOT C28)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C32) (ALL R178 (NOT C28)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C147) (ALL R178 (NOT C28)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C165) (ALL R178 (NOT C28)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C164) (ALL R178 (NOT C28)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C33) (ALL R129 (NOT C32)) (ALL R178 (NOT C28)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C56) (ALL R129 (NOT C32)) (ALL R178 (NOT C28)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C20) (ALL R129 (NOT C32)) (ALL R178 (NOT C28)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C172) (ALL R178 (NOT C28)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C135) (ALL R182 (NOT C156)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C60) (ALL R182 (NOT C156)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C32) (ALL R182 (NOT C156)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C147) (ALL R182 (NOT C156)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C165) (ALL R182 (NOT C156)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C164) (ALL R182 (NOT C156)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C33) (ALL R129 (NOT C32)) (ALL R182 (NOT C156)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C56) (ALL R129 (NOT C32)) (ALL R182 (NOT C156)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C20) (ALL R129 (NOT C32)) (ALL R182 (NOT C156)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C172) (ALL R182 (NOT C156)))) (SOME R182 C156)) (OR (ALL R407 (OR (NOT C135) (ALL R182 (NOT C156)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C60) (ALL R182 (NOT C156)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C32) (ALL R182 (NOT C156)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C147) (ALL R182 (NOT C156)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C165) (ALL R182 (NOT C156)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C164) (ALL R182 (NOT C156)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C33) (ALL R129 (NOT C32)) (ALL R182 (NOT C156)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C56) (ALL R129 (NOT C32)) (ALL R182 (NOT C156)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C20) (ALL R129 (NOT C32)) (ALL R182 (NOT C156)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C172) (ALL R182 (NOT C156)))) (SOME R178 C28)) (OR (ALL R407 (OR (NOT C135) (ALL R182 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C60) (ALL R182 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C32) (ALL R182 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C147) (ALL R182 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C165) (ALL R182 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C164) (ALL R182 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C33) (ALL R129 (NOT C32)) (ALL R182 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C56) (ALL R129 (NOT C32)) (ALL R182 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C20) (ALL R129 (NOT C32)) (ALL R182 (NOT C27)))) (SOME R182 C27)) (OR (ALL R407 (OR (NOT C172) (ALL R182 (NOT C27)))) (SOME R182 C27)))) (define-primitive-concept C175 C172) (define-primitive-concept C176 C172) (define-primitive-concept C177 C176) (define-primitive-concept C178 C115) (define-primitive-concept C179 C21) (define-primitive-concept C180 C179) (define-primitive-concept C181 C180) (define-primitive-concept C182 C180) (define-primitive-concept C183 C109) (define-primitive-concept C184 C108) (define-primitive-concept C185 C57) (define-primitive-concept C186 C21) (define-primitive-concept C187 C128) (define-primitive-concept C188 C27) (define-primitive-concept C189 C27) (define-primitive-concept C190 C21) (define-concept C191 (AND C4 (SOME R178 C25))) (define-concept C192 (AND C4 (SOME R182 C27))) (define-primitive-concept C193 C152) (define-primitive-concept C194 C152) (define-primitive-concept C195 C152) (define-primitive-concept C196 C152) (define-primitive-concept C197 C152) (define-primitive-concept C198 C152) (define-primitive-concept C199 C198) (define-primitive-concept C200 C198) (define-primitive-concept C201 C198) (define-primitive-concept C202 C198) (define-primitive-concept C203 C151) (define-primitive-concept C204 C151) (define-primitive-concept C205 C153) (define-primitive-concept C206 C153) (define-primitive-concept C207 C153) (define-primitive-concept C208 C153) (define-primitive-concept C209 C153) (define-primitive-concept C210 C153) (define-primitive-concept C211 C153) (define-primitive-concept C212 C153) (define-primitive-concept C213 C212) (define-primitive-concept C214 C153) (define-primitive-concept C215 C214) (define-primitive-concept C216 C214) (define-primitive-concept C217 C153) (define-primitive-concept C218 C153) (define-primitive-concept C219 C218) (define-primitive-concept C220 C218) (define-primitive-concept C221 C218) (define-primitive-concept C222 C5) (define-primitive-concept C223 C222) (define-primitive-concept C224 C223) (define-primitive-concept C225 C224) (define-primitive-concept C226 (AND C96 (SOME R166 C225))) (define-primitive-concept C227 C36) (define-primitive-concept C228 C227) (define-primitive-concept C229 C125) (define-primitive-concept C230 (AND C157 (SOME R278 C187) (OR (ALL R410 (NOT C115)) (ALL R232 (NOT C110)) (ALL R238 (OR (NOT C228) (ALL R202 (NOT C229)))) (SOME R410 C178)) (SOME R280 C50))) (define-primitive-concept C231 C107) (define-primitive-concept C232 (AND C230 (SOME R410 C178) (SOME R268 (AND C42 (SOME R202 C118))) (SOME R92 C231))) (define-primitive-concept C233 C159) (define-primitive-concept C234 (AND C233 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C235 (AND C234 C230)) (define-primitive-concept C236 (AND C235 (SOME R232 C184))) (define-primitive-concept C237 (AND C235 (SOME R232 C184) (SOME R17 C236))) (define-primitive-concept C238 (AND C235 (SOME R232 C184) (SOME R17 C236) (SOME R79 C237))) (define-primitive-concept C239 (AND C235 (SOME R232 C184) (SOME R69 C238))) (define-primitive-concept C240 (AND C235 (SOME R232 C184) (SOME R69 C239))) (define-primitive-concept C241 (AND C235 (SOME R232 C184) (SOME R69 C240))) (define-primitive-concept C242 (AND C235 (SOME R232 C184) (SOME R69 C241))) (define-primitive-concept C243 (AND C235 (SOME R232 C184) (SOME R69 C239))) (define-primitive-concept C244 (AND C235 (SOME R232 C184) (SOME R69 C239))) (define-primitive-concept C245 (AND C235 (SOME R232 C184) (SOME R69 C244))) (define-primitive-concept C246 (AND C235 (SOME R232 C184) (SOME R69 C244))) (define-primitive-concept C247 (AND C235 (SOME R232 C184) (SOME R69 C240))) (define-primitive-concept C248 (AND C235 (SOME R232 C184) (SOME R79 C247))) (define-primitive-concept C249 (AND C233 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C250 (AND C249 C230)) (define-primitive-concept C251 (AND C250 (SOME R232 C184))) (define-primitive-concept C252 C232) (define-primitive-concept C253 C107) (define-primitive-concept C254 (AND C232 (SOME R23 C252) (SOME R92 C253))) (define-primitive-concept C255 (AND C232 (SOME R23 C254))) (define-primitive-concept C256 (AND C232 (SOME R23 C254) (SOME R23 C255))) (define-primitive-concept C257 (AND C232 (SOME R23 C254))) (define-primitive-concept C258 (AND C232 (SOME R23 C254) (SOME R23 C257))) (define-primitive-concept C259 (AND C232 (SOME R23 C254))) (define-primitive-concept C260 C107) (define-primitive-concept C261 C96) (define-primitive-concept C262 C261) (define-primitive-concept C263 (AND C232 (SOME R71 C242) (SOME R71 C243) (SOME R71 C245) (SOME R71 C246) (SOME R71 C248) (SOME R71 C251) (SOME R23 C254) (SOME R23 C256) (SOME R23 C258) (SOME R23 C259) (SOME R90 (AND C260 (SOME R96 C262))))) (define-primitive-concept C264 (AND C157 (SOME R280 C50) (SOME R278 C129) (OR (ALL R410 (NOT C115)) (ALL R232 (NOT C112)) (ALL R310 (NOT C126)) (SOME R410 C178)))) (define-primitive-concept C265 (AND C264 (SOME R284 (AND C120 (SOME R202 C131))))) (define-primitive-concept C266 C264) (define-primitive-concept C267 (AND C265 C266 (SOME R232 C184))) (define-primitive-concept C268 C11) (define-primitive-concept C269 C224) (define-primitive-concept C270 (AND C96 (SOME R166 C269))) (define-primitive-concept C271 C96) (define-primitive-concept C272 (AND C270 C271)) (define-primitive-concept C273 (AND C53 (SOME R372 (AND C268 (SOME R173 (AND C174 (SOME R405 C272))))))) (define-primitive-concept C274 (AND C106 (SOME R410 C178))) (define-primitive-concept C275 C274) (define-concept C276 (AND C144 (SOME R353 (AND C99 (SOME R45 C68))))) (define-concept C277 (AND C276 (SOME R204 C72))) (define-primitive-concept C278 C166) (define-primitive-concept C279 (AND C278 (SOME R91 C254) (SOME R398 (AND C14 (SOME R202 C19))) (SOME R34 (AND C253 (SOME R93 C254))))) (define-primitive-concept C280 (AND C107 (OR (ALL R96 (NOT C226)) (ALL R100 (NOT C263)) (SOME R102 C267)) (OR (ALL R96 (NOT C99)) (ALL R102 (NOT C62)) (SOME R100 C53)) (OR (ALL R102 (NOT C62)) (ALL R100 (NOT C273)) (ALL R96 (NOT C99)) (ALL R366 (OR (NOT C29) (ALL R202 (NOT C31)))) (SOME R35 C275)) (OR (ALL R102 (NOT C62)) (ALL R100 (NOT C273)) (ALL R96 (NOT C99)) (ALL R366 (OR (NOT C29) (ALL R202 (NOT C31)))) (SOME R128 C277)) (OR (ALL R93 (NOT C254)) (SOME R35 C279)))) (define-primitive-concept C281 C280) (define-concept C282 (AND C281 (SOME R94 (AND C78 (SOME R47 C68))))) (define-primitive-concept C283 C12) (define-primitive-concept C284 C69) (define-primitive-concept C285 C284) (define-primitive-concept C286 C285) (define-primitive-concept C287 C6) (define-primitive-concept C288 C287) (define-primitive-concept C289 C288) (define-primitive-concept C290) (define-concept C291 (AND C286 (SOME R216 C290) (SOME R218 C289))) (define-primitive-concept C292 C11) (define-primitive-concept C293 C16) (define-primitive-concept C294 C293) (define-primitive-concept C295 C38) (define-primitive-concept C296 (AND C154 (OR (ALL R129 (OR (NOT C282) (ALL R386 (OR (NOT C283) (ALL R206 (NOT C291)))) (ALL R368 (OR (NOT C292) (ALL R202 (NOT C294)))))) (ALL R294 (OR (NOT C295) (ALL R204 (NOT C72)))) (SOME R178 C25)))) (define-primitive-concept C297 C159) (define-primitive-concept C298 (AND C155 C297)) (define-primitive-concept C299 C298) (define-primitive-concept C300 C298) (define-primitive-concept C301 C298) (define-primitive-concept C302 C155) (define-primitive-concept C303 C302) (define-primitive-concept C304 C302) (define-primitive-concept C305 C302) (define-primitive-concept C306 C302) (define-primitive-concept C307 C160) (define-primitive-concept C308 C307) (define-primitive-concept C309 C51) (define-primitive-concept C310 C309) (define-primitive-concept C311 C309) (define-primitive-concept C312 C309) (define-primitive-concept C313 (AND C161 C307)) (define-primitive-concept C314 C230) (define-primitive-concept C315 (AND C233 (SOME R284 (AND C120 (SOME R202 C130))))) (define-primitive-concept C316 C60) (define-primitive-concept C317 C316) (define-concept C318 (AND C315 (SOME R90 (AND C260 (SOME R96 C317))))) (define-primitive-concept C319 C11) (define-primitive-concept C320 C11) (define-primitive-concept C321 (AND C107 (SOME R184 C156) (SOME R180 C28) (OR (ALL R380 (OR (NOT C319) (ALL R212 (NOT C88)))) (SOME R382 (AND C320 (SOME R212 C88)))) (OR (ALL R382 (OR (NOT C320) (ALL R212 (NOT C88)))) (SOME R182 C100)) (OR (ALL R382 (OR (NOT C320) (ALL R212 (NOT C88)))) (SOME R178 C25)))) (define-primitive-concept C322 (AND C314 (OR (ALL R24 (NOT C318)) (SOME R268 (AND C42 (SOME R202 C117)))) (OR (ALL R95 (OR (NOT C321) (ALL R182 (NOT C100)))) (SOME R178 C25)))) (define-concept C323 (AND C322 (SOME R24 C318))) (define-primitive-concept C324 (AND C313 C308 (SOME R268 (AND C42 (SOME R202 C117))) (OR (ALL R51 (OR (NOT C157) (ALL R268 (OR (NOT C42) (ALL R202 (NOT C47)))) (ALL R178 (NOT C25)))) (SOME R178 C25)) (OR (ALL R51 (OR (NOT C322) (ALL R268 (OR (NOT C42) (ALL R202 (NOT C117)))))) (SOME R268 (AND C42 (SOME R202 C117)))) (OR (ALL R51 (NOT C323)) (SOME R52 C317)))) (define-concept C325 (AND C324 (SOME R51 (AND C135 (SOME R268 (AND C42 (SOME R202 C116))))))) (define-concept C326 (AND C324 (SOME R51 (AND C135 (SOME R268 (AND C42 (SOME R202 C117))))))) (define-primitive-concept C327 C314) (define-primitive-concept C328 C61) (define-primitive-concept C329 C328) (define-primitive-concept C330 C157) (define-primitive-concept C331 C330) (define-primitive-concept C332 C331) (define-primitive-concept C333 C332) (define-primitive-concept C334 (AND C332 (SOME R284 (AND C120 (SOME R202 C123))))) (define-primitive-concept C335 (AND C327 (SOME R284 (AND C120 (SOME R202 C123))) (SOME R268 (AND C42 (SOME R202 C118))) (SOME R232 C112) (SOME R22 C334))) (define-primitive-concept C336 C46) (define-primitive-concept C337 (AND C264 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C338 (AND C337 (SOME R232 C112) (SOME R410 C115))) (define-primitive-concept C339 C338) (define-primitive-concept C340 C264) (define-primitive-concept C341 (AND C340 (SOME R232 C184) (SOME R410 C178))) (define-primitive-concept C342 C125) (define-primitive-concept C343 C342) (define-primitive-concept C344 C342) (define-primitive-concept C345 (AND C340 (SOME R13 C341) (SOME R232 C112) (SOME R268 (AND C42 (SOME R202 C336))) (OR (ALL R320 (NOT C342)) (SOME R410 C115)) (OR (ALL R320 (NOT C343)) (ALL R310 (NOT C126)) (SOME R410 C178)) (OR (ALL R320 (NOT C344)) (ALL R310 (NOT C126)) (SOME R410 C178)))) (define-concept C346 (AND C345 (SOME R320 C344))) (define-primitive-concept C347 C126) (define-primitive-concept C348 (AND C250 (SOME R232 C184))) (define-primitive-concept C349 C126) (define-primitive-concept C350 (AND C250 (SOME R232 C112) (OR (ALL R310 (NOT C347)) (SOME R69 C348)) (OR (ALL R310 (NOT C349)) (SOME R69 C348)))) (define-primitive-concept C351 (AND C250 (SOME R232 C112) (SOME R69 C350))) (define-primitive-concept C352 (AND C250 (SOME R232 C112) (SOME R77 C351))) (define-primitive-concept C353 (AND C339 (SOME R17 C346) (SOME R71 C352) (SOME R71 C351))) (define-primitive-concept C354 C125) (define-primitive-concept C355 (AND C332 (SOME R232 C109) (OR (ALL R312 (NOT C354)) (SOME R232 C112)))) (define-primitive-concept C356 C354) (define-concept C357 (AND C355 (SOME R312 C356))) (define-primitive-concept C358 (AND C335 (SOME R25 C353) (SOME R18 C357))) (define-concept C359 (AND C333 (SOME R19 C358))) (define-primitive-concept C360 (AND C322 (SOME R24 C318) (SOME R232 C109))) (define-primitive-concept C361 C338) (define-primitive-concept C362 (AND C361 (SOME R17 C346))) (define-primitive-concept C363 C321) (define-primitive-concept C364 C321) (define-primitive-concept C365 (AND C360 (SOME R25 C362) (SOME R95 C363) (SOME R95 C364))) (define-concept C366 (AND C324 (SOME R51 C365))) (define-primitive-concept C367 (AND C158 (SOME R280 C50) (OR (ALL R17 (NOT C325)) (SOME R268 (AND C42 (SOME R202 C116)))) (OR (ALL R17 (NOT C326)) (SOME R268 (AND C42 (SOME R202 C117)))) (OR (ALL R284 (OR (NOT C120) (ALL R202 (NOT C130)))) (ALL R17 (NOT C327)) (ALL R90 (NOT C321)) (SOME R28 C329)) (OR (ALL R284 (OR (NOT C120) (ALL R202 (NOT C130)))) (ALL R17 (NOT C327)) (ALL R90 (NOT C321)) (ALL R19 (NOT C359)) (SOME R232 C112)) (OR (ALL R21 (NOT C366)) (SOME R232 C112)))) (define-concept C368 (AND C135 (SOME R278 C129))) (define-primitive-concept C369 (AND C157 (SOME R280 C50) (SOME R278 C129))) (define-primitive-concept C370 C338) (define-concept C371 (AND C345 (SOME R320 C343))) (define-primitive-concept C372 (AND C370 (SOME R17 C371))) (define-primitive-concept C373 (AND C369 (SOME R13 C372))) (define-primitive-concept C374 C125) (define-primitive-concept C375 C374) (define-primitive-concept C376 (AND C250 (SOME R69 C352))) (define-primitive-concept C377 (AND C250 (SOME R232 C112) (SOME R69 C352))) (define-primitive-concept C378 (AND C250 (SOME R232 C112) (SOME R69 C377))) (define-primitive-concept C379 (AND C370 (SOME R17 C346) (SOME R71 C376) (SOME R71 C378))) (define-primitive-concept C380 (AND C369 (SOME R13 C379))) (define-primitive-concept C381 (AND C158 (SOME R280 C50) (SOME R284 (AND C120 (SOME R202 C130))) (OR (ALL R13 (OR (NOT C368) (ALL R232 (NOT C109)))) (SOME R232 C109)) (OR (ALL R13 (NOT C373)) (SOME R314 C375)) (OR (ALL R13 (NOT C372)) (ALL R314 (NOT C375)) (SOME R278 C129)) (OR (ALL R13 (NOT C380)) (SOME R314 C375)))) (define-primitive-concept C382 (AND C157 (SOME R280 C50) (SOME R278 C129))) (define-primitive-concept C383 (AND C313 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C384 C383) (define-primitive-concept C385 (AND C313 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C386 C385) (define-primitive-concept C387 (AND C51 (SOME R280 C50))) (define-primitive-concept C388 C387) (define-primitive-concept C389 C387) (define-primitive-concept C390 (AND C51 (SOME R280 C50))) (define-primitive-concept C391 C390) (define-primitive-concept C392 C390) (define-primitive-concept C393 C391) (define-primitive-concept C394 C391) (define-primitive-concept C395 C392) (define-primitive-concept C396 C273) (define-primitive-concept C397 C396) (define-primitive-concept C398 C396) (define-primitive-concept C399 C396) (define-primitive-concept C400 C273) (define-primitive-concept C401 C273) (define-primitive-concept C402 C273) (define-primitive-concept C403 C273) (define-primitive-concept C404 C273) (define-primitive-concept C405 C273) (define-primitive-concept C406 C273) (define-primitive-concept C407 C53) (define-primitive-concept C408 C226) (define-primitive-concept C409 C408) (define-primitive-concept C410 C16) (define-primitive-concept C411 C410) (define-primitive-concept C412 C224) (define-primitive-concept C413 (AND C96 (SOME R166 C412))) (define-primitive-concept C414 C413) (define-primitive-concept C415 C410) (define-primitive-concept C416 (AND C141 (OR (ALL R131 (OR (NOT C409) (ALL R372 (OR (NOT C268) (ALL R202 (NOT C411)) (ALL R173 (OR (NOT C174) (ALL R405 (NOT C414)))))))) (ALL R90 (OR (NOT C260) (ALL R96 (NOT C414)))) (SOME R372 (AND C268 (SOME R202 C415) (SOME R173 (AND C174 (SOME R405 C409)))))))) (define-primitive-concept C417 C168) (define-primitive-concept C418 C223) (define-primitive-concept C419 C418) (define-concept C420 (AND C51 (SOME R166 C419))) (define-primitive-concept C421 C96) (define-primitive-concept C422 C97) (define-concept C423 (AND C95 (SOME R30 C421) (SOME R30 C422))) (define-concept C424 (AND C420 (SOME R29 C53) (SOME R30 C423))) (define-primitive-concept C425 C96) (define-primitive-concept C426 C425) (define-concept C427 (AND C420 (SOME R29 C53) (SOME R30 C426))) (define-primitive-concept C428 C30) (define-primitive-concept C429 (AND C417 (OR (ALL R94 (NOT C424)) (SOME R366 (AND C29 (SOME R202 C31)))) (OR (ALL R94 (NOT C427)) (SOME R366 (AND C29 (SOME R202 C428)))))) (define-concept C430 (AND C416 (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C428))))))) (define-concept C431 (AND C416 (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))))) (define-primitive-concept C432 (AND C407 (SOME R25 C416) (OR (ALL R95 (OR (NOT C429) (ALL R366 (OR (NOT C29) (ALL R202 (NOT C428)))))) (SOME R25 C430)) (OR (ALL R95 (OR (NOT C429) (ALL R366 (OR (NOT C29) (ALL R202 (NOT C31)))))) (SOME R25 C431)) (OR (ALL R95 (OR (NOT C429) (ALL R366 (OR (NOT C29) (ALL R202 (NOT C428)))))) (SOME R28 C427)) (OR (ALL R95 (OR (NOT C429) (ALL R366 (OR (NOT C29) (ALL R202 (NOT C31)))))) (SOME R28 C424)))) (define-primitive-concept C433 C407) (define-primitive-concept C434 C407) (define-primitive-concept C435 C52) (define-primitive-concept C436 C52) (define-primitive-concept C437 C52) (define-primitive-concept C438 C51) (define-primitive-concept C439 (AND C51 (SOME R280 C50))) (define-primitive-concept C440 (AND C439 (SOME R180 C25) (SOME R178 C25))) (define-primitive-concept C441 C56) (define-primitive-concept C442 C441) (define-primitive-concept C443 C441) (define-primitive-concept C444 C441) (define-primitive-concept C445 C164) (define-primitive-concept C446 C164) (define-primitive-concept C447 C164) (define-primitive-concept C448 C165) (define-primitive-concept C449 C165) (define-primitive-concept C450 C165) (define-primitive-concept C451 C165) (define-primitive-concept C452 C32) (define-primitive-concept C453 C167) (define-primitive-concept C454 C222) (define-primitive-concept C455 C287) (define-primitive-concept C456 C455) (define-primitive-concept C457 C455) (define-primitive-concept C458 C455) (define-primitive-concept C459 C455) (define-primitive-concept C460 C455) (define-primitive-concept C461 C455) (define-primitive-concept C462 C455) (define-primitive-concept C463 C455) (define-primitive-concept C464 C455) (define-primitive-concept C465 C455) (define-primitive-concept C466 C455) (define-primitive-concept C467 C287) (define-primitive-concept C468 C467) (define-primitive-concept C469 C467) (define-primitive-concept C470 C467) (define-primitive-concept C471 C467) (define-primitive-concept C472 C467) (define-primitive-concept C473 C467) (define-primitive-concept C474 C467) (define-primitive-concept C475 C467) (define-primitive-concept C476 C467) (define-primitive-concept C477 C287) (define-primitive-concept C478 C477) (define-primitive-concept C479 C287) (define-primitive-concept C480 C479) (define-primitive-concept C481 C479) (define-primitive-concept C482 C479) (define-primitive-concept C483 C479) (define-primitive-concept C484 C479) (define-primitive-concept C485 C479) (define-primitive-concept C486 C479) (define-primitive-concept C487 C479) (define-primitive-concept C488 C479) (define-primitive-concept C489 C287) (define-primitive-concept C490 C489) (define-primitive-concept C491 C489) (define-primitive-concept C492 C489) (define-primitive-concept C493 C288) (define-primitive-concept C494 C288) (define-primitive-concept C495 C288) (define-primitive-concept C496 C288) (define-primitive-concept C497 C288) (define-primitive-concept C498 C288) (define-primitive-concept C499 C288) (define-primitive-concept C500 C288) (define-primitive-concept C501 C288) (define-primitive-concept C502 C6) (define-primitive-concept C503 C502) (define-primitive-concept C504 C502) (define-primitive-concept C505 C504) (define-primitive-concept C506 C504) (define-primitive-concept C507 C504) (define-primitive-concept C508 C504) (define-primitive-concept C509 C502) (define-primitive-concept C510 C509) (define-primitive-concept C511 C509) (define-primitive-concept C512 C509) (define-primitive-concept C513 C509) (define-primitive-concept C514 C509) (define-primitive-concept C515 C509) (define-primitive-concept C516 C509) (define-primitive-concept C517 C509) (define-primitive-concept C518 C509) (define-primitive-concept C519 C509) (define-primitive-concept C520 C509) (define-primitive-concept C521 C509) (define-primitive-concept C522 C502) (define-primitive-concept C523 C502) (define-primitive-concept C524 C502) (define-primitive-concept C525 C502) (define-primitive-concept C526 C502) (define-primitive-concept C527 C502) (define-primitive-concept C528 C502) (define-primitive-concept C529 C141) (define-primitive-concept C530 C141) (define-primitive-concept C531 C141) (define-primitive-concept C532 C140) (define-primitive-concept C533 C532) (define-primitive-concept C534 C532) (define-primitive-concept C535 C140) (define-primitive-concept C536 (AND C140 C535)) (define-primitive-concept C537 C2) (define-primitive-concept C538 C537) (define-primitive-concept C539 C537) (define-primitive-concept C540 C537) (define-primitive-concept C541 C537) (define-primitive-concept C542 C537) (define-primitive-concept C543 C537) (define-primitive-concept C544 C537) (define-primitive-concept C545 C537) (define-primitive-concept C546 C537) (define-primitive-concept C547 C537) (define-primitive-concept C548 C537) (define-primitive-concept C549 C537) (define-primitive-concept C550 C537) (define-primitive-concept C551 C537) (define-primitive-concept C552 C537) (define-primitive-concept C553 C107) (define-primitive-concept C554 C61) (define-primitive-concept C555 C554) (define-primitive-concept C556 (AND C230 (SOME R410 C115) (SOME R28 C555))) (define-primitive-concept C557 C216) (define-primitive-concept C558 (AND C556 (SOME R25 C557) (SOME R268 (AND C42 (SOME R202 C118))) (SOME R92 C280))) (define-primitive-concept C559 (AND C556 (SOME R25 C557) (SOME R268 (AND C42 (SOME R202 C118))) (SOME R23 C558) (SOME R232 C112))) (define-primitive-concept C560 (AND C556 (SOME R25 C557) (SOME R268 (AND C42 (SOME R202 C118))) (SOME R23 C559))) (define-primitive-concept C561 (AND C233 (SOME R268 (AND C42 (SOME R202 C118))) (SOME R92 C553) (OR (ALL R25 (NOT C560)) (SOME R410 C115)))) (define-primitive-concept C562 C223) (define-primitive-concept C563 C562) (define-primitive-concept C564 (AND C561 C230 (SOME R166 C563))) (define-primitive-concept C565 (AND C233 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C566 (AND C565 C230)) (define-primitive-concept C567 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C568 (AND C567 C230)) (define-primitive-concept C569 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))) (SOME R284 (AND C120 (SOME R202 C123))))) (define-primitive-concept C570 (AND C569 C230)) (define-primitive-concept C571 (AND C315 C230)) (define-primitive-concept C572 C328) (define-primitive-concept C573 (AND C329 C572)) (define-primitive-concept C574 C354) (define-primitive-concept C575 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))) (SOME R232 C109) (OR (ALL R312 (NOT C354)) (SOME R232 C112)) (OR (ALL R27 (NOT C365)) (SOME R232 C109)) (SOME R30 C573) (OR (ALL R312 (NOT C356)) (ALL R27 (NOT C365)) (SOME R232 C112)) (OR (ALL R312 (NOT C574)) (ALL R27 (NOT C365)) (SOME R232 C112)))) (define-concept C576 (AND C575 (SOME R27 C365))) (define-concept C577 (AND C575 (SOME R312 C356) (SOME R27 C365))) (define-concept C578 (AND C575 (SOME R312 C574) (SOME R27 C365))) (define-primitive-concept C579 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))) (OR (ALL R19 (NOT C576)) (SOME R232 C109)) (OR (ALL R19 (NOT C576)) (SOME R314 C374)) (OR (ALL R314 (NOT C375)) (ALL R19 (NOT C577)) (SOME R232 C112)) (OR (ALL R314 (NOT C375)) (ALL R19 (NOT C578)) (SOME R232 C112)))) (define-concept C580 (AND C579 (SOME R314 C375) (SOME R19 C577))) (define-concept C581 (AND C579 (SOME R314 C375) (SOME R19 C578))) (define-primitive-concept C582 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))) (SOME R284 (AND C120 (SOME R202 C123))) (SOME R30 C572) (OR (ALL R60 (NOT C580)) (ALL R62 (NOT C581)) (SOME R232 C112)))) (define-primitive-concept C583 (AND C582 C230)) (define-primitive-concept C584 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))) (SOME R284 (AND C120 (SOME R202 C123))))) (define-primitive-concept C585 (AND C584 C230)) (define-primitive-concept C586 C227) (define-primitive-concept C587 C124) (define-primitive-concept C588 C587) (define-primitive-concept C589 C588) (define-primitive-concept C590 C327) (define-concept C591 (AND C367 (SOME R284 (AND C120 (SOME R202 C130))) (SOME R17 C327) (SOME R90 C321))) (define-primitive-concept C592 (AND C590 (SOME R18 C591) (SOME R232 C112) (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C593 (AND C233 (SOME R268 (AND C42 (SOME R202 C117))) (OR (ALL R242 (OR (NOT C586) (ALL R208 (NOT C589)) (ALL R174 (NOT C592)))) (SOME R232 C112)))) (define-primitive-concept C594 (AND C593 C230)) (define-primitive-concept C595 C585) (define-primitive-concept C596 C585) (define-primitive-concept C597 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))) (SOME R284 (AND C120 (SOME R202 C123))) (OR (ALL R60 (NOT C595)) (SOME R232 C112)) (OR (ALL R60 (NOT C596)) (SOME R232 C112)))) (define-primitive-concept C598 (AND C597 C230)) (define-primitive-concept C599 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C600 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C601 (AND C233 (SOME R284 (AND C120 (SOME R202 C130))))) (define-primitive-concept C602 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C603 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C604 C230) (define-primitive-concept C605 C230) (define-primitive-concept C606 (AND C604 C605 (SOME R268 (AND C42 (SOME R202 C336))) (SOME R232 C111))) (define-primitive-concept C607 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))) (OR (ALL R19 (NOT C606)) (SOME R232 C111)))) (define-primitive-concept C608 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))) (SOME R284 (AND C120 (SOME R202 C123))))) (define-primitive-concept C609 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))) (SOME R284 (AND C120 (SOME R202 C123))))) (define-primitive-concept C610 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C611 (AND C233 (SOME R284 (AND C120 (SOME R202 C130))))) (define-primitive-concept C612 (AND C233 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C613 (AND C233 (SOME R268 (AND C42 (SOME R202 C117))))) (define-primitive-concept C614 C233) (define-primitive-concept C615 C233) (define-primitive-concept C616 C369) (define-primitive-concept C617 C264) (define-primitive-concept C618 (AND C340 (SOME R13 C341) (SOME R232 C184))) (define-primitive-concept C619 C47) (define-primitive-concept C620 (AND C617 (SOME R284 (AND C120 (SOME R202 C130))) (SOME R13 C618) (SOME R232 C184) (SOME R268 (AND C42 (SOME R202 C619))))) (define-primitive-concept C621 (AND C369 (SOME R13 C620) (SOME R232 C110))) (define-primitive-concept C622 (AND C369 (SOME R13 C620) (SOME R232 C184))) (define-primitive-concept C623 C369) (define-primitive-concept C624 (AND C369 (SOME R17 C379))) (define-primitive-concept C625 (AND C369 (SOME R13 C373))) (define-primitive-concept C626 (AND C369 (SOME R13 C373))) (define-primitive-concept C627 (AND C369 (SOME R13 C353))) (define-primitive-concept C628 (AND C369 (SOME R17 C353) (SOME R71 C377))) (define-primitive-concept C629 C369) (define-primitive-concept C630 C369) (define-primitive-concept C631 C369) (define-primitive-concept C632 (AND C340 (SOME R13 C341))) (define-primitive-concept C633 (AND C340 (SOME R13 C341))) (define-primitive-concept C634 C340) (define-primitive-concept C635 C264) (define-primitive-concept C636 C635) (define-primitive-concept C637 C635) (define-primitive-concept C638 C635) (define-primitive-concept C639 C635) (define-primitive-concept C640 C635) (define-primitive-concept C641 (AND C232 (SOME R268 (AND C42 (SOME R202 C118))) (SOME R23 C254))) (define-primitive-concept C642 (AND C617 (SOME R232 C184) (SOME R13 C618))) (define-primitive-concept C643 (AND C265 (SOME R76 C641) (SOME R78 C642) (SOME R13 C642) (SOME R232 C184))) (define-primitive-concept C644 (AND C556 (SOME R25 C557) (SOME R268 (AND C42 (SOME R202 C118))) (SOME R23 C558) (SOME R232 C184) (SOME R410 C178))) (define-primitive-concept C645 (AND C556 (SOME R25 C557) (SOME R268 (AND C42 (SOME R202 C118))) (SOME R23 C644))) (define-primitive-concept C646 (AND C265 (SOME R232 C184) (SOME R79 C645))) (define-primitive-concept C647 C230) (define-primitive-concept C648 (AND C647 (SOME R328 C182))) (define-primitive-concept C649 (AND C648 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C650 (AND C265 (SOME R76 C649) (SOME R78 (AND C642 (SOME R330 C182))) (SOME R13 (AND C642 (SOME R330 C182))) (SOME R232 C184))) (define-primitive-concept C651 (AND C265 (SOME R232 C112))) (define-primitive-concept C652 (AND C265 (SOME R232 C112))) (define-primitive-concept C653 C264) (define-primitive-concept C654 (AND C653 (SOME R13 C618) (SOME R13 C371))) (define-primitive-concept C655 (AND C653 (SOME R232 C110) (SOME R17 C618) (SOME R17 C346) (SOME R410 C115))) (define-primitive-concept C656 (AND C653 (SOME R17 C371) (SOME R17 C618))) (define-primitive-concept C657 (AND C653 (SOME R232 C110) (SOME R17 C618) (SOME R17 C346) (SOME R410 C115))) (define-primitive-concept C658 (AND C653 (SOME R232 C110) (SOME R17 C618) (SOME R17 C346) (SOME R410 C115))) (define-primitive-concept C659 C266) (define-primitive-concept C660 C266) (define-primitive-concept C661 C266) (define-primitive-concept C662 C266) (define-primitive-concept C663 C266) (define-primitive-concept C664 C266) (define-primitive-concept C665 C266) (define-primitive-concept C666 C266) (define-primitive-concept C667 C266) (define-primitive-concept C668 C266) (define-primitive-concept C669 (AND C617 (SOME R268 (AND C42 (SOME R202 C47))) (SOME R232 C184) (SOME R13 C618))) (define-primitive-concept C670 (AND C617 (SOME R232 C112) (SOME R13 C669))) (define-primitive-concept C671 C617) (define-primitive-concept C672 (AND C617 (SOME R284 (AND C120 (SOME R202 C130))))) (define-primitive-concept C673 (AND C617 (SOME R284 (AND C120 (SOME R202 C130))))) (define-primitive-concept C674 C617) (define-primitive-concept C675 (AND C617 (SOME R13 C620))) (define-primitive-concept C676 (AND C617 (SOME R232 C112) (SOME R13 C670))) (define-primitive-concept C677 (AND C617 (SOME R284 (AND C120 (SOME R202 C130))))) (define-primitive-concept C678 (AND C617 (SOME R13 C618) (SOME R232 C112))) (define-primitive-concept C679 C617) (define-concept C680 (AND C557 (SOME R330 C182))) (define-primitive-concept C681 (AND C679 (SOME R328 C182) (SOME R25 C680))) (define-primitive-concept C682 (AND C681 (SOME R232 C184) (SOME R13 (AND C642 (SOME R330 C182))))) (define-primitive-concept C683 (AND C681 (SOME R232 C184) (SOME R13 C682))) (define-primitive-concept C684 (AND C681 (SOME R232 C184) (SOME R13 C682))) (define-primitive-concept C685 (AND C681 (SOME R232 C184) (SOME R13 C682))) (define-primitive-concept C686 C681) (define-primitive-concept C687 C686) (define-primitive-concept C688 C686) (define-concept C689 (AND C557 (SOME R330 C181))) (define-primitive-concept C690 (AND C679 (SOME R328 C181) (SOME R25 C689))) (define-primitive-concept C691 (AND C690 (SOME R232 C184) (SOME R13 (AND C642 (SOME R330 C181))))) (define-primitive-concept C692 (AND C690 (SOME R232 C184) (SOME R13 C691))) (define-primitive-concept C693 (AND C690 (SOME R232 C184) (SOME R13 C691))) (define-primitive-concept C694 (AND C361 (SOME R17 C346))) (define-primitive-concept C695 (AND C361 (SOME R17 C371))) (define-primitive-concept C696 (AND C361 (SOME R17 C371))) (define-primitive-concept C697 (AND C339 (SOME R17 C371))) (define-primitive-concept C698 (AND C339 (SOME R17 C371))) (define-primitive-concept C699 (AND C339 (SOME R17 C346))) (define-primitive-concept C700 (AND C337 (SOME R232 C109))) (define-primitive-concept C701 (AND C700 (SOME R17 C372) (SOME R410 C115) (OR (ALL R230 (NOT C537)) (ALL R310 (NOT C126)) (SOME R410 C178)) (OR (ALL R230 (NOT C537)) (ALL R310 (NOT C126)) (SOME R232 C112)))) (define-primitive-concept C702 (AND C700 (SOME R410 C115) (OR (ALL R230 (NOT C537)) (ALL R310 (NOT C126)) (SOME R410 C178)) (OR (ALL R230 (NOT C537)) (ALL R310 (NOT C126)) (SOME R232 C112)) (SOME R17 C379))) (define-primitive-concept C703 (AND C235 (SOME R232 C184) (SOME R69 C241))) (define-primitive-concept C704 (AND C235 (SOME R232 C184) (SOME R69 C703))) (define-primitive-concept C705 (AND C604 (SOME R268 (AND C42 (SOME R202 C118))) (SOME R71 C704) (SOME R71 C251))) (define-primitive-concept C706 C230) (define-primitive-concept C707 (AND C706 (SOME R268 (AND C42 (SOME R202 C619))) (SOME R53 C669) (SOME R30 C572))) (define-primitive-concept C708 (AND C604 (SOME R268 (AND C42 (SOME R202 C118))) (SOME R53 C707))) (define-primitive-concept C709 (AND C235 (SOME R232 C112) (SOME R69 C238))) (define-primitive-concept C710 (AND C235 (SOME R232 C112) (SOME R69 C709))) (define-primitive-concept C711 (AND C235 (SOME R232 C112) (SOME R69 C709))) (define-primitive-concept C712 (AND C235 (SOME R232 C112) (SOME R69 C709))) (define-primitive-concept C713 (AND C235 (SOME R232 C112) (SOME R69 C709))) (define-primitive-concept C714 (AND C235 (SOME R232 C112) (SOME R69 C709))) (define-primitive-concept C715 (AND C235 (SOME R232 C112) (SOME R69 C709))) (define-primitive-concept C716 (AND C235 (SOME R232 C112) (SOME R69 C709))) (define-primitive-concept C717 (AND C604 (SOME R268 (AND C42 (SOME R202 C336))) (SOME R25 C557) (SOME R232 C112) (SOME R24 C602) (SOME R24 C603) (SOME R28 C599) (SOME R28 C600) (SOME R28 C601) (SOME R71 C710) (SOME R71 C711) (SOME R71 C712) (SOME R71 C713) (SOME R71 C714) (SOME R71 C715) (SOME R71 C716))) (define-primitive-concept C718 (AND C604 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C719 (AND C235 (SOME R232 C184) (SOME R69 C241))) (define-primitive-concept C720 (AND C235 (SOME R232 C184) (SOME R69 C719))) (define-primitive-concept C721 (AND C250 (SOME R232 C184) (SOME R69 C348))) (define-primitive-concept C722 (AND C604 (SOME R268 (AND C42 (SOME R202 C336))) (SOME R71 C703) (SOME R71 C720) (SOME R71 C719) (SOME R71 C721))) (define-primitive-concept C723 (AND C235 (SOME R232 C184) (SOME R69 C244))) (define-primitive-concept C724 (AND C235 (SOME R232 C184) (SOME R69 C723))) (define-primitive-concept C725 (AND C235 (SOME R232 C184) (SOME R69 C724))) (define-primitive-concept C726 (AND C235 (SOME R232 C184) (SOME R69 C244))) (define-primitive-concept C727 (AND C235 (SOME R232 C184) (SOME R69 C238))) (define-primitive-concept C728 (AND C235 (SOME R232 C184) (SOME R69 C727))) (define-primitive-concept C729 (AND C235 (SOME R232 C184) (SOME R69 C247))) (define-primitive-concept C730 (AND C235 (SOME R232 C184) (SOME R69 C729))) (define-primitive-concept C731 (AND C235 (SOME R232 C184) (SOME R69 C247))) (define-primitive-concept C732 (AND C235 (SOME R232 C184) (SOME R69 C731))) (define-primitive-concept C733 (AND C604 (SOME R268 (AND C42 (SOME R202 C336))) (SOME R71 C725) (SOME R71 C726) (SOME R71 C723) (SOME R71 C728) (SOME R71 C730) (SOME R71 C732) (SOME R71 C731) (SOME R71 C729) (SOME R71 C251))) (define-primitive-concept C734 (AND C604 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C735 (AND C604 (SOME R268 (AND C42 (SOME R202 C336))) (SOME R71 C244) (SOME R71 C251))) (define-primitive-concept C736 (AND C235 (SOME R232 C184) (SOME R69 C727))) (define-primitive-concept C737 (AND C235 (SOME R232 C184) (SOME R69 C736))) (define-primitive-concept C738 (AND C235 (SOME R232 C184) (SOME R69 C737))) (define-primitive-concept C739 (AND C235 (SOME R232 C184) (SOME R69 C727))) (define-primitive-concept C740 (AND C235 (SOME R232 C184) (SOME R69 C739))) (define-primitive-concept C741 (AND C235 (SOME R232 C184) (SOME R69 C739))) (define-primitive-concept C742 (AND C235 (SOME R232 C184))) (define-primitive-concept C743 (AND C235 C742 (SOME R232 C184) (SOME R69 C739))) (define-primitive-concept C744 (AND C232 (SOME R23 C254) (SOME R23 C259))) (define-primitive-concept C745 (AND C232 (SOME R23 C254))) (define-primitive-concept C746 (AND C232 (SOME R71 C743) (SOME R71 C251) (SOME R23 C744) (SOME R23 C745))) (define-primitive-concept C747 (AND C232 (SOME R71 C740) (SOME R71 C741) (SOME R71 C251) (SOME R21 C746))) (define-primitive-concept C748 (AND C232 (SOME R71 C738) (SOME R21 C747))) (define-primitive-concept C749 (AND C232 (SOME R23 C746))) (define-primitive-concept C750 C232) (define-primitive-concept C751 (AND C232 (SOME R23 C746))) (define-primitive-concept C752 (AND C232 (SOME R17 C263))) (define-primitive-concept C753 C752) (define-primitive-concept C754 C752) (define-primitive-concept C755 (AND C232 (SOME R23 C746))) (define-primitive-concept C756 (AND C235 (SOME R232 C184))) (define-primitive-concept C757 (AND C235 (SOME R232 C184) (SOME R69 C727))) (define-primitive-concept C758 (AND C235 (SOME R232 C184) (SOME R69 C757))) (define-primitive-concept C759 (AND C235 C742 (SOME R232 C184) (SOME R69 C758))) (define-primitive-concept C760 (AND C232 (SOME R71 C759) (SOME R71 C251) (SOME R23 C744))) (define-primitive-concept C761 (AND C232 (SOME R71 C756) (SOME R71 C730) (SOME R71 C732) (SOME R71 C731) (SOME R71 C729) (SOME R71 C251) (SOME R23 C760) (SOME R23 C256) (SOME R23 C258))) (define-primitive-concept C762 (AND C232 (SOME R23 C252) (SOME R23 C255))) (define-primitive-concept C763 (AND C232 (SOME R17 C263))) (define-primitive-concept C764 (AND C232 (SOME R17 C263))) (define-primitive-concept C765 (AND C232 (SOME R23 C760) (SOME R23 C745) (SOME R23 C257))) (define-primitive-concept C766 C232) (define-primitive-concept C767 (AND C232 (SOME R23 C760) (SOME R23 C745) (SOME R23 C257))) (define-primitive-concept C768 (AND C232 (SOME R23 C746))) (define-primitive-concept C769 (AND C232 (SOME R17 C263))) (define-primitive-concept C770 (AND C235 (SOME R232 C184) (SOME R69 C238))) (define-primitive-concept C771 (AND C235 (SOME R232 C184) (SOME R69 C770))) (define-primitive-concept C772 (AND C232 (SOME R71 C771) (SOME R23 C254) (SOME R23 C745))) (define-primitive-concept C773 (AND C232 (SOME R23 C746))) (define-primitive-concept C774 (AND C232 (SOME R23 C746))) (define-primitive-concept C775 (AND C232 (SOME R23 C746))) (define-primitive-concept C776 (AND C232 C564 (SOME R23 C744))) (define-primitive-concept C777 (AND C232 C564 (SOME R23 C254) (SOME R23 C256) (SOME R23 C258) (SOME R23 C259))) (define-primitive-concept C778 (AND C232 C564 (SOME R23 C762) (SOME R92 C553))) (define-primitive-concept C779 C232) (define-primitive-concept C780 C232) (define-primitive-concept C781 (AND C556 (SOME R268 (AND C42 (SOME R202 C118))) (SOME R21 C559) (SOME R25 C717))) (define-primitive-concept C782 (AND C556 (SOME R268 (AND C42 (SOME R202 C118))) (SOME R23 C559) (SOME R25 C717))) (define-primitive-concept C783 (AND C556 (SOME R25 C557) (SOME R268 (AND C42 (SOME R202 C118))) (SOME R23 C559))) (define-primitive-concept C784 C328) (define-primitive-concept C785 C784) (define-concept C786 (AND C584 (SOME R30 C785))) (define-primitive-concept C787 C107) (define-primitive-concept C788 (AND C316 (SOME R348 (AND C64 (SOME R202 C67))) (OR (ALL R46 (NOT C53)) (SOME R180 C25)) (SOME R97 C787))) (define-concept C789 (AND C787 (SOME R96 C788))) (define-primitive-concept C790 (AND C107 (OR (ALL R96 (NOT C788)) (SOME R35 C789)))) (define-primitive-concept C791 C107) (define-primitive-concept C792 C121) (define-primitive-concept C793 C792) (define-concept C794 (AND C791 (SOME R128 (AND C135 (SOME R282 (AND C119 (SOME R208 C793))))))) (define-concept C795 (AND C794 (SOME R91 C786))) (define-primitive-concept C796 (AND C556 (SOME R25 C557) (SOME R268 (AND C42 (SOME R202 C118))) (SOME R23 C644) (SOME R24 C786) (SOME R92 (AND C790 (SOME R96 C788))) (SOME R90 C795))) (define-primitive-concept C797 (AND C556 (SOME R25 C557) (SOME R268 (AND C42 (SOME R202 C118))) (SOME R23 C644))) (define-primitive-concept C798 (AND C556 (SOME R284 (AND C120 (SOME R202 C130))) (SOME R17 C796))) (define-primitive-concept C799 (AND C556 (SOME R25 C557) (SOME R268 (AND C42 (SOME R202 C118))) (SOME R17 C796))) (define-primitive-concept C800 (AND C648 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C801 (AND C648 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C802 (AND C648 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C803 (AND C647 (SOME R328 C181))) (define-primitive-concept C804 (AND C803 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C805 (AND C803 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C806 (AND C803 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C807 C566) (define-primitive-concept C808 C566) (define-primitive-concept C809 C566) (define-primitive-concept C810 C566) (define-primitive-concept C811 (AND C566 C706)) (define-primitive-concept C812 C568) (define-primitive-concept C813 C812) (define-primitive-concept C814 C812) (define-primitive-concept C815 C568) (define-primitive-concept C816 C568) (define-primitive-concept C817 C44) (define-primitive-concept C818 C817) (define-primitive-concept C819 C818) (define-primitive-concept C820 (AND C568 (SOME R25 C689) (OR (ALL R107 (NOT C138)) (SOME R178 C25)) (OR (ALL R107 (NOT C138)) (SOME R272 (AND C89 (SOME R204 C819)))))) (define-primitive-concept C821 C568) (define-primitive-concept C822 C568) (define-primitive-concept C823 C568) (define-primitive-concept C824 C568) (define-primitive-concept C825 C314) (define-primitive-concept C826 (AND C825 (SOME R268 (AND C42 (SOME R202 C117))))) (define-primitive-concept C827 (AND C825 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C828 C825) (define-primitive-concept C829 (AND C825 (SOME R268 (AND C42 (SOME R202 C47))))) (define-primitive-concept C830 C825) (define-primitive-concept C831 (AND C825 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C832 (AND C825 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C833 (AND C825 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C834 (AND C825 (SOME R284 (AND C120 (SOME R202 C130))))) (define-primitive-concept C835 (AND C825 (SOME R284 (AND C120 (SOME R202 C130))))) (define-primitive-concept C836 (AND C825 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C837 (AND C825 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C838 (AND C360 (SOME R25 C695))) (define-primitive-concept C839 C360) (define-primitive-concept C840 (AND C360 (SOME R25 C694))) (define-primitive-concept C841 C360) (define-primitive-concept C842 (AND C360 (SOME R25 C657))) (define-primitive-concept C843 C360) (define-primitive-concept C844 C360) (define-primitive-concept C845 C360) (define-primitive-concept C846 C327) (define-primitive-concept C847 (AND C846 (SOME R25 C372))) (define-primitive-concept C848 (AND C846 (SOME R25 C372))) (define-primitive-concept C849 C846) (define-primitive-concept C850 (AND C846 (SOME R25 C696))) (define-primitive-concept C851 C850) (define-primitive-concept C852 C850) (define-primitive-concept C853 C850) (define-primitive-concept C854 C850) (define-primitive-concept C855 C850) (define-primitive-concept C856 C850) (define-primitive-concept C857 C850) (define-primitive-concept C858 C850) (define-primitive-concept C859 C846) (define-primitive-concept C860 C859) (define-primitive-concept C861 C859) (define-primitive-concept C862 C859) (define-primitive-concept C863 C859) (define-primitive-concept C864 C859) (define-primitive-concept C865 C859) (define-primitive-concept C866 C859) (define-primitive-concept C867 C590) (define-primitive-concept C868 (AND C335 (SOME R25 C697))) (define-primitive-concept C869 (AND C335 (SOME R25 C698))) (define-primitive-concept C870 (AND C335 (SOME R25 C698))) (define-primitive-concept C871 (AND C335 (SOME R25 C699))) (define-concept C872 (AND C355 (SOME R312 C574))) (define-primitive-concept C873 (AND C335 (SOME R25 C353) (SOME R18 C872))) (define-primitive-concept C874 C327) (define-primitive-concept C875 C874) (define-primitive-concept C876 C874) (define-primitive-concept C877 C874) (define-primitive-concept C878 C874) (define-primitive-concept C879 C874) (define-primitive-concept C880 C874) (define-primitive-concept C881 C874) (define-primitive-concept C882 C874) (define-primitive-concept C883 C874) (define-primitive-concept C884 C874) (define-primitive-concept C885 C327) (define-primitive-concept C886 C327) (define-primitive-concept C887 C886) (define-primitive-concept C888 C886) (define-primitive-concept C889 C886) (define-primitive-concept C890 C886) (define-primitive-concept C891 C886) (define-primitive-concept C892 C585) (define-primitive-concept C893 C585) (define-primitive-concept C894 C585) (define-primitive-concept C895 C585) (define-primitive-concept C896 C585) (define-primitive-concept C897 C585) (define-primitive-concept C898 C585) (define-primitive-concept C899 C585) (define-primitive-concept C900 C585) (define-primitive-concept C901 C585) (define-primitive-concept C902 C585) (define-primitive-concept C903 C585) (define-primitive-concept C904 C585) (define-primitive-concept C905 C585) (define-primitive-concept C906 C571) (define-primitive-concept C907 C571) (define-primitive-concept C908 C571) (define-primitive-concept C909 C571) (define-primitive-concept C910 (AND C230 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C911 C910) (define-primitive-concept C912 C910) (define-primitive-concept C913 (AND C230 (SOME R268 (AND C42 (SOME R202 C336))))) (define-primitive-concept C914 C913) (define-primitive-concept C915 C913) (define-primitive-concept C916 C913) (define-primitive-concept C917 (AND C332 (SOME R232 C109) (SOME R16 C591) (OR (ALL R312 (NOT C354)) (SOME R232 C112)))) (define-primitive-concept C918 (AND C332 (SOME R232 C109) (OR (ALL R312 (NOT C354)) (SOME R232 C112)))) (define-primitive-concept C919 C332) (define-concept C920 (AND C120 (SOME R202 C123))) (define-primitive-concept C921 (AND C332 (SOME R284 C920))) (define-concept C922 (AND C42 (SOME R202 C336))) (define-primitive-concept C923 (AND C332 (SOME R268 C922))) (define-primitive-concept C924 (AND C331 (SOME R284 (AND C120 (SOME R202 C130))))) (define-primitive-concept C925 C924) (define-primitive-concept C926 C924) (define-primitive-concept C927 C235) (define-primitive-concept C928 C235) (define-primitive-concept C929 C235) (define-primitive-concept C930 C929) (define-primitive-concept C931 C929) (define-primitive-concept C932 C235) (define-primitive-concept C933 C235) (define-primitive-concept C934 (AND C235 (SOME R232 C112) (SOME R69 C238))) (define-primitive-concept C935 (AND C235 (SOME R69 C934))) (define-primitive-concept C936 (AND C235 (SOME R232 C112) (SOME R69 C935))) (define-primitive-concept C937 C235) (define-primitive-concept C938 (AND C235 (SOME R232 C111) (OR (ALL R310 (NOT C349)) (SOME R69 C937)) (OR (ALL R310 (NOT C347)) (SOME R69 C937)))) (define-primitive-concept C939 C235) (define-primitive-concept C940 C235) (define-primitive-concept C941 (AND C235 (SOME R69 C934))) (define-primitive-concept C942 C235) (define-primitive-concept C943 C235) (define-primitive-concept C944 C235) (define-primitive-concept C945 C235) (define-primitive-concept C946 C250) (define-primitive-concept C947 C250) (define-primitive-concept C948 C250) (define-primitive-concept C949 C250) (define-primitive-concept C950 (AND C250 (SOME R232 C184))) (define-primitive-concept C951 (AND C250 (SOME R232 C112) (OR (ALL R310 (NOT C347)) (SOME R69 C950)) (OR (ALL R310 (NOT C349)) (SOME R69 C950)))) (define-primitive-concept C952 (AND C250 (SOME R232 C112) (SOME R69 C951))) (define-primitive-concept C953 (AND C250 (SOME R232 C112) (SOME R69 C952))) (define-primitive-concept C954 (AND C250 (SOME R232 C112) (SOME R69 C953))) (define-primitive-concept C955 C250) (define-primitive-concept C956 (AND C250 (SOME R232 C112) (SOME R69 C953))) (define-primitive-concept C957 (AND C250 (SOME R232 C112) (SOME R69 C350))) (define-primitive-concept C958 C250) (define-primitive-concept C959 C250) (define-primitive-concept C960 C250) (define-primitive-concept C961 C250) (define-primitive-concept C962 C250) (define-primitive-concept C963 C784) (define-concept C964 (AND C584 (SOME R30 C963))) (define-primitive-concept C965 (AND C706 (SOME R268 (AND C42 (SOME R202 C117))) (SOME R232 C111) (SOME R18 C964))) (define-primitive-concept C966 (AND C564 (SOME R25 C708))) (define-primitive-concept C967 (AND C706 C966)) (define-primitive-concept C968 (AND C706 (SOME R268 (AND C42 (SOME R202 C117))) (SOME R232 C111) (OR (ALL R310 (NOT C347)) (SOME R77 C967)) (OR (ALL R310 (NOT C349)) (SOME R79 C967)))) (define-primitive-concept C969 (AND C583 (SOME R232 C109) (OR (ALL R314 (NOT C374)) (SOME R232 C112)))) (define-concept C970 (AND C917 (SOME R19 C871) (SOME R312 C356))) (define-concept C971 (AND C917 (SOME R19 C871) (SOME R312 C574))) (define-concept C972 (AND C925 (SOME R19 (AND C161 (SOME R49 C970) (SOME R49 C971))))) (define-primitive-concept C973 C374) (define-primitive-concept C974 C10) (define-primitive-concept C975 C974) (define-primitive-concept C976 C284) (define-primitive-concept C977 C976) (define-primitive-concept C978 C977) (define-concept C979 (AND C919 (SOME R19 C359))) (define-primitive-concept C980 (AND C969 (SOME R314 C375) (SOME R60 (AND C367 (SOME R19 C972) (SOME R242 (AND C586 (SOME R202 C973))) (SOME R163 (AND C975 (SOME R202 C978))))) (SOME R62 (AND C367 (SOME R19 C979) (SOME R242 (AND C586 (SOME R202 C375))) (SOME R163 (AND C975 (SOME R202 C978))))))) (define-primitive-concept C981 (AND C969 (SOME R314 C973) (SOME R58 (AND C367 (SOME R19 C979) (SOME R242 (AND C586 (SOME R202 C973))) (SOME R163 (AND C975 (SOME R202 C978))))) (SOME R58 (AND C367 (SOME R19 C972) (SOME R242 (AND C586 (SOME R202 C375))) (SOME R163 (AND C975 (SOME R202 C978))))))) (define-primitive-concept C982 (AND C583 (SOME R232 C109))) (define-concept C983 (AND C918 (SOME R19 C871) (SOME R312 C356))) (define-primitive-concept C984 (AND C982 (SOME R60 (AND C334 (SOME R23 C871))) (SOME R62 C983) (SOME R312 C356))) (define-concept C985 (AND C923 (SOME R19 C873))) (define-concept C986 (AND C918 (SOME R19 C871) (SOME R312 C574))) (define-primitive-concept C987 (AND C982 (SOME R60 C985) (SOME R62 C986) (SOME R312 C574))) (define-primitive-concept C988 (AND C583 (SOME R60 C592) (SOME R62 (AND C919 (SOME R19 C358))))) (define-primitive-concept C989 C554) (define-primitive-concept C990 C554) (define-primitive-concept C991 C554) (define-primitive-concept C992 C554) (define-primitive-concept C993 C554) (define-primitive-concept C994 (AND C554 (SOME R29 C382))) (define-primitive-concept C995 C61) (define-primitive-concept C996 C328) (define-concept C997 (AND C135 (SOME R166 C419))) (define-primitive-concept C998 (AND C785 (SOME R29 (AND C997 (SOME R29 C232))))) (define-primitive-concept C999 C784) (define-primitive-concept C1000 C328) (define-primitive-concept C1001 C61) (define-primitive-concept C1002 C1001) (define-primitive-concept C1003 C1001) (define-primitive-concept C1004 C1001) (define-primitive-concept C1005 C1001) (define-primitive-concept C1006 C1001) (define-primitive-concept C1007 (AND C316 (SOME R348 (AND C64 (SOME R202 C67))) (SOME R97 C260))) (define-primitive-concept C1008 (AND C316 (SOME R97 C260))) (define-primitive-concept C1009 C316) (define-primitive-concept C1010 (AND C316 (SOME R348 (AND C64 (SOME R202 C67))))) (define-primitive-concept C1011 (AND C316 (SOME R348 (AND C64 (SOME R202 C67))) (SOME R97 (AND C260 (SOME R91 C812))))) (define-primitive-concept C1012 (AND C316 (SOME R348 (AND C64 (SOME R202 C67))) (SOME R97 (AND C260 (SOME R91 C821))))) (define-primitive-concept C1013 (AND C316 (SOME R348 (AND C64 (SOME R202 C67))))) (define-primitive-concept C1014 (AND C316 (SOME R348 (AND C64 (SOME R202 C67))))) (define-primitive-concept C1015 (AND C316 (SOME R348 (AND C64 (SOME R202 C67))) (SOME R97 (AND C260 (SOME R91 C670))))) (define-primitive-concept C1016 (AND C316 (SOME R348 (AND C64 (SOME R202 C67))))) (define-primitive-concept C1017 C20) (define-primitive-concept C1018 C445) (define-primitive-concept C1019 C107) (define-primitive-concept C1020 (AND C1018 C1019)) (define-primitive-concept C1021 C445) (define-primitive-concept C1022 C445) (define-primitive-concept C1023 C1022) (define-primitive-concept C1024 C1022) (define-primitive-concept C1025 C1022) (define-primitive-concept C1026 C1022) (define-primitive-concept C1027 C1026) (define-primitive-concept C1028 C1027) (define-primitive-concept C1029 C1027) (define-primitive-concept C1030 C1027) (define-primitive-concept C1031 C1026) (define-primitive-concept C1032 C1022) (define-primitive-concept C1033 C1025) (define-primitive-concept C1034 C223) (define-primitive-concept C1035 C1034) (define-concept C1036 (AND C788 (SOME R166 C1035))) (define-primitive-concept C1037 C387) (define-primitive-concept C1038 C1037) (define-primitive-concept C1039 C1033) (define-concept C1040 (AND C62 (SOME R166 C1035))) (define-primitive-concept C1041 (AND C1022 C1033 (OR (ALL R126 (NOT C788)) (SOME R126 C1036)) (OR (ALL R126 (NOT C788)) (ALL R152 (NOT C1038)) (SOME R34 (AND C1039 (SOME R94 (AND C788 (SOME R53 C796)))))) (OR (ALL R126 (NOT C62)) (SOME R126 C1040)))) (define-primitive-concept C1042 C1025) (define-primitive-concept C1043 (AND C1022 (OR (ALL R34 (OR (NOT C1041) (ALL R128 (NOT C1042)))) (SOME R128 C1042)))) (define-primitive-concept C1044 C1043) (define-primitive-concept C1045 C1044) (define-primitive-concept C1046 C387) (define-primitive-concept C1047 C1046) (define-primitive-concept C1048 (AND C1044 (OR (ALL R150 (NOT C1047)) (SOME R122 (AND C84 (SOME R291 (AND C54 (SOME R47 C68)))))))) (define-concept C1049 (AND C1041 (SOME R126 C788))) (define-primitive-concept C1050 (AND C1048 (OR (ALL R96 (NOT C1036)) (SOME R34 C1049)) (OR (ALL R96 (NOT C1036)) (SOME R122 (AND C8 (SOME R407 (AND C432 (SOME R47 C788)))))))) (define-concept C1051 (AND C1041 (SOME R126 C62))) (define-primitive-concept C1052 (AND C1044 (OR (ALL R34 (OR (NOT C1050) (ALL R94 (NOT C1040)))) (SOME R34 C1051)) (OR (ALL R34 (OR (NOT C1050) (ALL R94 (NOT C1040)))) (SOME R122 (AND C8 (SOME R407 (AND C432 (SOME R43 C62)))))))) (define-primitive-concept C1053 C1048) (define-primitive-concept C1054 C1048) (define-primitive-concept C1055 C1048) (define-primitive-concept C1056 C1048) (define-primitive-concept C1057 C1048) (define-primitive-concept C1058 C1043) (define-primitive-concept C1059 C1043) (define-primitive-concept C1060 C446) (define-primitive-concept C1061 C446) (define-primitive-concept C1062 C448) (define-primitive-concept C1063 C448) (define-primitive-concept C1064 C107) (define-primitive-concept C1065 C1019) (define-primitive-concept C1066 (AND C1065 (SOME R178 C25))) (define-primitive-concept C1067 C1065) (define-primitive-concept C1068 C1065) (define-primitive-concept C1069 (AND C1065 (SOME R178 C25))) (define-primitive-concept C1070 C107) (define-primitive-concept C1071 C107) (define-primitive-concept C1072 C231) (define-primitive-concept C1073 (AND C280 (SOME R182 C27) (SOME R178 C25))) (define-primitive-concept C1074 C280) (define-primitive-concept C1075 C364) (define-primitive-concept C1076 C364) (define-primitive-concept C1077 C364) (define-primitive-concept C1078 C364) (define-primitive-concept C1079 C321) (define-primitive-concept C1080 C1079) (define-primitive-concept C1081 C1079) (define-primitive-concept C1082 C107) (define-primitive-concept C1083 C452) (define-primitive-concept C1084 C452) (define-primitive-concept C1085 C452) (define-primitive-concept C1086 C452) (define-primitive-concept C1087 C166) (define-primitive-concept C1088 C1087) (define-primitive-concept C1089 (AND C1087 (SOME R91 C708))) (define-primitive-concept C1090 C1087) (define-primitive-concept C1091 C1087) (define-primitive-concept C1092 C166) (define-primitive-concept C1093 C1092) (define-primitive-concept C1094 C1092) (define-primitive-concept C1095 C1092) (define-primitive-concept C1096 (AND C1095 C101)) (define-primitive-concept C1097 C1096) (define-primitive-concept C1098 (AND C1096 (SOME R178 C25))) (define-primitive-concept C1099 C1096) (define-primitive-concept C1100 (AND C1096 (SOME R178 C25))) (define-primitive-concept C1101 (AND C1096 (SOME R178 C25))) (define-primitive-concept C1102 C1092) (define-primitive-concept C1103 C278) (define-primitive-concept C1104 C166) (define-primitive-concept C1105 C1104) (define-primitive-concept C1106 C66) (define-primitive-concept C1107 (AND C1104 (OR (ALL R96 (OR (NOT C62) (ALL R348 (OR (NOT C64) (ALL R202 (NOT C67)))))) (ALL R366 (OR (NOT C29) (ALL R202 (NOT C428)))) (SOME R128 (AND C62 (SOME R348 (AND C64 (SOME R202 C1106)))))))) (define-primitive-concept C1108 C450) (define-primitive-concept C1109 C1108) (define-primitive-concept C1110 C1108) (define-primitive-concept C1111 C1108) (define-primitive-concept C1112 C1108) (define-primitive-concept C1113 C1108) (define-primitive-concept C1114 C1108) (define-primitive-concept C1115 C1108) (define-primitive-concept C1116 C1115) (define-primitive-concept C1117 C1115) (define-primitive-concept C1118 C1115) (define-primitive-concept C1119 C1115) (define-primitive-concept C1120 C450) (define-primitive-concept C1121 C1120) (define-primitive-concept C1122 C1120) (define-primitive-concept C1123 C1120) (define-primitive-concept C1124 C1120) (define-primitive-concept C1125 C168) (define-primitive-concept C1126 (AND C168 (OR (ALL R91 (NOT C414)) (ALL R130 (OR (NOT C409) (ALL R372 (OR (NOT C268) (ALL R202 (NOT C411)) (ALL R173 (OR (NOT C174) (ALL R405 (NOT C414)))))))) (SOME R366 (AND C29 (SOME R202 C31)))))) (define-primitive-concept C1127 C417) (define-primitive-concept C1128 C417) (define-primitive-concept C1129 C11) (define-primitive-concept C1130 C11) (define-primitive-concept C1131 C11) (define-primitive-concept C1132 C11) (define-primitive-concept C1133 C11) (define-primitive-concept C1134 C1133) (define-primitive-concept C1135 C11) (define-primitive-concept C1136 C11) (define-primitive-concept C1137 C1136) (define-primitive-concept C1138 C12) (define-primitive-concept C1139 C12) (define-primitive-concept C1140 C12) (define-primitive-concept C1141 C12) (define-concept C1142 (AND C296 (SOME R129 (AND C282 (SOME R386 (AND C283 (SOME R206 C291))) (SOME R368 (AND C292 (SOME R202 C294))))))) (define-primitive-concept C1143 C285) (define-primitive-concept C1144 (AND C38 (OR (ALL R293 (NOT C1142)) (SOME R206 (AND C1143 (SOME R218 C470)))))) (define-primitive-concept C1145 C38) (define-primitive-concept C1146 C38) (define-primitive-concept C1147 C38) (define-primitive-concept C1148 C38) (define-primitive-concept C1149 C38) (define-primitive-concept C1150 C37) (define-primitive-concept C1151 C1150) (define-primitive-concept C1152 C227) (define-primitive-concept C1153 C227) (define-primitive-concept C1154 C227) (define-primitive-concept C1155 C227) (define-primitive-concept C1156 C36) (define-primitive-concept C1157 C40) (define-primitive-concept C1158 C41) (define-primitive-concept C1159 C40) (define-primitive-concept C1160 C36) (define-primitive-concept C1161 C63) (define-primitive-concept C1162 C1161) (define-primitive-concept C1163 C1162) (define-primitive-concept C1164 C1163) (define-primitive-concept C1165 C1164) (define-primitive-concept C1166 C1164) (define-primitive-concept C1167 C1163) (define-primitive-concept C1168 C1161) (define-primitive-concept C1169 C1168) (define-primitive-concept C1170 C63) (define-primitive-concept C1171 C10) (define-primitive-concept C1172 C1171) (define-primitive-concept C1173 C1171) (define-primitive-concept C1174 C1171) (define-primitive-concept C1175 C1171) (define-primitive-concept C1176 C1171) (define-primitive-concept C1177 C1171) (define-primitive-concept C1178 C1171) (define-primitive-concept C1179 C1171) (define-primitive-concept C1180 C1171) (define-primitive-concept C1181 C1171) (define-primitive-concept C1182 C1171) (define-primitive-concept C1183 C15) (define-primitive-concept C1184 C1183) (define-primitive-concept C1185 C1184) (define-primitive-concept C1186 C1184) (define-primitive-concept C1187 C1183) (define-primitive-concept C1188 C1187) (define-primitive-concept C1189 C1187) (define-primitive-concept C1190 C1183) (define-primitive-concept C1191 C1190) (define-primitive-concept C1192 C1191) (define-primitive-concept C1193 C1192) (define-primitive-concept C1194 C1192) (define-primitive-concept C1195 C1190) (define-primitive-concept C1196 C1195) (define-primitive-concept C1197 C1190) (define-primitive-concept C1198 C1197) (define-primitive-concept C1199 C1197) (define-primitive-concept C1200 C1197) (define-primitive-concept C1201 C1200) (define-primitive-concept C1202 C1201) (define-primitive-concept C1203 C1183) (define-primitive-concept C1204 C1203) (define-primitive-concept C1205 C1203) (define-primitive-concept C1206 C1203) (define-primitive-concept C1207 C1203) (define-primitive-concept C1208 C1203) (define-primitive-concept C1209 C1203) (define-primitive-concept C1210 C1183) (define-primitive-concept C1211 C1210) (define-primitive-concept C1212 C1211) (define-primitive-concept C1213 C1211) (define-primitive-concept C1214 C1210) (define-primitive-concept C1215 C1210) (define-primitive-concept C1216 C1215) (define-primitive-concept C1217 C1210) (define-primitive-concept C1218 C1183) (define-primitive-concept C1219 C1218) (define-primitive-concept C1220 C1218) (define-primitive-concept C1221 C1218) (define-primitive-concept C1222 C1183) (define-primitive-concept C1223 C1222) (define-primitive-concept C1224 C1223) (define-primitive-concept C1225 C1223) (define-primitive-concept C1226 C1223) (define-primitive-concept C1227 C1223) (define-primitive-concept C1228 C1223) (define-primitive-concept C1229 C1223) (define-primitive-concept C1230 C1223) (define-primitive-concept C1231 C1223) (define-primitive-concept C1232 C1222) (define-primitive-concept C1233 C1222) (define-primitive-concept C1234 C1222) (define-primitive-concept C1235 C1234) (define-primitive-concept C1236 C1234) (define-primitive-concept C1237 C1234) (define-primitive-concept C1238 C1234) (define-primitive-concept C1239 C1234) (define-primitive-concept C1240 C1234) (define-primitive-concept C1241 C1234) (define-primitive-concept C1242 C1234) (define-primitive-concept C1243 C1234) (define-primitive-concept C1244 C1222) (define-primitive-concept C1245 C1222) (define-primitive-concept C1246 C1222) (define-primitive-concept C1247 C71) (define-primitive-concept C1248 C71) (define-primitive-concept C1249 C85) (define-primitive-concept C1250 C70) (define-primitive-concept C1251 C1250) (define-primitive-concept C1252 C1250) (define-primitive-concept C1253 C1250) (define-primitive-concept C1254 C70) (define-primitive-concept C1255 C1254) (define-primitive-concept C1256 C1254) (define-primitive-concept C1257 C1254) (define-primitive-concept C1258 C285) (define-primitive-concept C1259 C285) (define-primitive-concept C1260 C285) (define-primitive-concept C1261 C285) (define-primitive-concept C1262 C285) (define-primitive-concept C1263 C285) (define-primitive-concept C1264 C285) (define-primitive-concept C1265 C285) (define-primitive-concept C1266 C285) (define-primitive-concept C1267 C285) (define-primitive-concept C1268 C285) (define-primitive-concept C1269 C284) (define-primitive-concept C1270 C976) (define-primitive-concept C1271 C976) (define-primitive-concept C1272 C977) (define-primitive-concept C1273 C977) (define-primitive-concept C1274 C69) (define-primitive-concept C1275 C1274) (define-primitive-concept C1276 C1274) (define-primitive-concept C1277 C1274) (define-primitive-concept C1278 C1274) (define-primitive-concept C1279 C1274) (define-primitive-concept C1280 C69) (define-primitive-concept C1281 C1280) (define-primitive-concept C1282 C1280) (define-primitive-concept C1283 C1280) (define-primitive-concept C1284 C17) (define-primitive-concept C1285 C1284) (define-primitive-concept C1286 C1284) (define-primitive-concept C1287 C17) (define-primitive-concept C1288 C1287) (define-primitive-concept C1289 C1287) (define-primitive-concept C1290 C1287) (define-primitive-concept C1291 C17) (define-primitive-concept C1292 C1291) (define-primitive-concept C1293 C1291) (define-primitive-concept C1294 C1291) (define-primitive-concept C1295 C1291) (define-primitive-concept C1296 C1291) (define-primitive-concept C1297 C18) (define-primitive-concept C1298 C18) (define-primitive-concept C1299 C18) (define-primitive-concept C1300 C17) (define-primitive-concept C1301 C1300) (define-primitive-concept C1302 C1300) (define-primitive-concept C1303 C1300) (define-primitive-concept C1304 C16) (define-primitive-concept C1305 C1304) (define-primitive-concept C1306 C1304) (define-primitive-concept C1307 C16) (define-primitive-concept C1308 C1307) (define-primitive-concept C1309 C1308) (define-primitive-concept C1310 C1308) (define-primitive-concept C1311 C1308) (define-primitive-concept C1312 C1308) (define-primitive-concept C1313 C16) (define-primitive-concept C1314 C1313) (define-primitive-concept C1315 C1313) (define-primitive-concept C1316 C16) (define-primitive-concept C1317 C1316) (define-primitive-concept C1318 C1317) (define-primitive-concept C1319 C1317) (define-primitive-concept C1320 C1317) (define-primitive-concept C1321 C293) (define-primitive-concept C1322 C16) (define-primitive-concept C1323 C1322) (define-primitive-concept C1324 C1323) (define-primitive-concept C1325 C1324) (define-primitive-concept C1326 C1323) (define-primitive-concept C1327 C1326) (define-primitive-concept C1328 C43) (define-primitive-concept C1329 C1328) (define-primitive-concept C1330 C1328) (define-primitive-concept C1331 C1328) (define-primitive-concept C1332 C44) (define-primitive-concept C1333 C1332) (define-primitive-concept C1334 C1332) (define-primitive-concept C1335 C792) (define-primitive-concept C1336 C123) (define-primitive-concept C1337 C123) (define-primitive-concept C1338 C123) (define-primitive-concept C1339 C123) (define-primitive-concept C1340 C123) (define-primitive-concept C1341 C1340) (define-primitive-concept C1342 C1340) (define-primitive-concept C1343 C123) (define-primitive-concept C1344 C130) (define-primitive-concept C1345 C132) (define-primitive-concept C1346 C130) (define-primitive-concept C1347 C1346) (define-primitive-concept C1348 C122) (define-primitive-concept C1349 C1348) (define-primitive-concept C1350 C1348) (define-primitive-concept C1351 C1350) (define-primitive-concept C1352 C1350) (define-primitive-concept C1353 C1350) (define-primitive-concept C1354 C1348) (define-primitive-concept C1355 C1354) (define-primitive-concept C1356 C1355) (define-primitive-concept C1357 C1348) (define-primitive-concept C1358 C1348) (define-primitive-concept C1359 C1348) (define-primitive-concept C1360 C1348) (define-primitive-concept C1361 C1360) (define-primitive-concept C1362 C818) (define-primitive-concept C1363 C817) (define-primitive-concept C1364 C1363) (define-primitive-concept C1365 C1363) (define-primitive-concept C1366 C116) (define-primitive-concept C1367 C45) (define-primitive-concept C1368 C1367) (define-primitive-concept C1369 C1367) (define-primitive-concept C1370 C1367) (define-primitive-concept C1371 C1367) (define-primitive-concept C1372 C1367) (define-primitive-concept C1373 C79) (define-primitive-concept C1374 C1373) (define-primitive-concept C1375 C1373) (define-primitive-concept C1376 C1373) (define-primitive-concept C1377 C1373) (define-primitive-concept C1378 C80) (define-primitive-concept C1379 C79) (define-primitive-concept C1380 C44) (define-primitive-concept C1381 C1380) (define-primitive-concept C1382 C1380) (define-primitive-concept C1383 C229) (define-primitive-concept C1384 C229) (define-primitive-concept C1385 C229) (define-primitive-concept C1386 C125) (define-primitive-concept C1387 C1386) (define-primitive-concept C1388 C1386) (define-primitive-concept C1389 C125) (define-primitive-concept C1390 C1389) (define-primitive-concept C1391 C1389) (define-primitive-concept C1392 C342) (define-primitive-concept C1393 C125) (define-primitive-concept C1394 C1393) (define-primitive-concept C1395 C1393) (define-primitive-concept C1396 (AND C349 C347)) (define-primitive-concept C1397 C587) (define-primitive-concept C1398 C1397) (define-primitive-concept C1399 C1397) (define-primitive-concept C1400 C587) (define-primitive-concept C1401 C1400) (define-primitive-concept C1402 C1400) (define-primitive-concept C1403 C587) (define-primitive-concept C1404 C1403) (define-primitive-concept C1405 C1403) (define-primitive-concept C1406 C587) (define-primitive-concept C1407 C1406) (define-primitive-concept C1408 C1406) (define-primitive-concept C1409 C588) (define-primitive-concept C1410 C587) (define-primitive-concept C1411 C1410) (define-primitive-concept C1412 C1410) (define-primitive-concept C1413 C66) (define-primitive-concept C1414 C66) (define-primitive-concept C1415 C66) (define-primitive-concept C1416 C65) (define-primitive-concept C1417 C1416) (define-primitive-concept C1418 C1417) (define-primitive-concept C1419 C1417) (define-primitive-concept C1420 C223) (define-primitive-concept C1421 C224) (define-primitive-concept C1422 C224) (define-primitive-concept C1423 C418) (define-primitive-concept C1424 C418) (define-primitive-concept C1425 C454) (define-primitive-concept C1426 C454) (define-primitive-concept C1427 C1426) (define-primitive-concept C1428 C454) (define-primitive-concept C1429 C454) (define-primitive-concept C1430 C454) (define-primitive-concept C1431 C1034) (define-primitive-concept C1432 C222) (define-concept C1433 (AND C141 (SOME R147 C142))) (define-primitive-concept C1434 (AND C1432 (SOME R171 C1433))) (define-primitive-concept C1435 C95) (define-primitive-concept C1436 C1435) (define-primitive-concept C1437 C1435) (define-primitive-concept C1438 C96) (define-primitive-concept C1439 (AND C1435 C1438)) (define-primitive-concept C1440 C1435) (define-primitive-concept C1441 C1435) (define-primitive-concept C1442 C1435) (define-primitive-concept C1443 C1435) (define-primitive-concept C1444 C1435) (define-primitive-concept C1445 C1435) (define-primitive-concept C1446 C1435) (define-primitive-concept C1447 (AND C1435 C1438)) (define-primitive-concept C1448 (AND C1435 C1438)) (define-primitive-concept C1449 (AND C1435 C1438)) (define-primitive-concept C1450 C1435) (define-primitive-concept C1451 C1435) (define-primitive-concept C1452 C1435) (define-primitive-concept C1453 C1435) (define-primitive-concept C1454 C1435) (define-primitive-concept C1455 C1435) (define-primitive-concept C1456 C1435) (define-primitive-concept C1457 C1435) (define-primitive-concept C1458 (AND C1435 C1438)) (define-primitive-concept C1459 (AND C1435 C1438)) (define-primitive-concept C1460 (AND C1435 C1438)) (define-primitive-concept C1461 C1435) (define-primitive-concept C1462 (AND C1435 C1438)) (define-primitive-concept C1463 C1435) (define-primitive-concept C1464 (AND C1435 C1438)) (define-primitive-concept C1465 (AND C1435 C1438)) (define-primitive-concept C1466 (AND C1435 C1438)) (define-primitive-concept C1467 C1435) (define-primitive-concept C1468 C1435) (define-primitive-concept C1469 C1435) (define-primitive-concept C1470 C1435) (define-primitive-concept C1471 C1435) (define-primitive-concept C1472 C1435) (define-primitive-concept C1473 C1435) (define-primitive-concept C1474 (AND C1435 C1438)) (define-primitive-concept C1475 (AND C1435 C1438)) (define-primitive-concept C1476 (AND C1435 C1438)) (define-primitive-concept C1477 (AND C1435 C1438)) (define-primitive-concept C1478 C96) (define-primitive-concept C1479 (AND C96 (SOME R348 (AND C64 (SOME R202 C67))))) (define-primitive-concept C1480 C96) (define-primitive-concept C1481 C96) (define-primitive-concept C1482 C96) (define-primitive-concept C1483 C1482) (define-primitive-concept C1484 C96) (define-primitive-concept C1485 C1484) (define-primitive-concept C1486 C96) (define-primitive-concept C1487 (AND C1484 C1486)) (define-primitive-concept C1488 C1484) (define-primitive-concept C1489 C1484) (define-primitive-concept C1490 C1484) (define-primitive-concept C1491 C1484) (define-primitive-concept C1492 C1491) (define-primitive-concept C1493 C97) (define-primitive-concept C1494 C421) (define-primitive-concept C1495 (AND C96 (SOME R166 C1422))) (define-primitive-concept C1496 C1495) (define-primitive-concept C1497 C1495) (define-primitive-concept C1498 C1495) (define-primitive-concept C1499 C1495) (define-primitive-concept C1500 C1495) (define-primitive-concept C1501 C1495) (define-primitive-concept C1502 C1495) (define-primitive-concept C1503 C1495) (define-primitive-concept C1504 C96) (define-primitive-concept C1505 C271) (define-primitive-concept C1506 C271) (define-primitive-concept C1507 C271) (define-primitive-concept C1508 C271) (define-primitive-concept C1509 C271) (define-primitive-concept C1510 C271) (define-primitive-concept C1511 C271) (define-primitive-concept C1512 C96) (define-primitive-concept C1513 C96) (define-primitive-concept C1514 C1513) (define-primitive-concept C1515 C226) (define-primitive-concept C1516 C1515) (define-primitive-concept C1517 C1515) (define-primitive-concept C1518 C226) (define-primitive-concept C1519 C1518) (define-primitive-concept C1520 C226) (define-primitive-concept C1521 C408) (define-primitive-concept C1522 C96) (define-primitive-concept C1523 C413) (define-primitive-concept C1524 C413) (define-primitive-concept C1525 C413) (define-primitive-concept C1526 C413) (define-primitive-concept C1527 C413) (define-primitive-concept C1528 C413) (define-primitive-concept C1529 C413) (define-primitive-concept C1530 C413) (define-primitive-concept C1531 C414) (define-primitive-concept C1532 C414) (define-primitive-concept C1533 C137) (define-primitive-concept C1534 C1533) (define-primitive-concept C1535 C1534) (define-primitive-concept C1536 (AND C1534 (SOME R274 (AND C1157 (SOME R202 C1381))))) (define-primitive-concept C1537 C1534) (define-primitive-concept C1538 C1534) (define-primitive-concept C1539 C1534) (define-primitive-concept C1540 C1534) (define-primitive-concept C1541 C1534) (define-primitive-concept C1542 C1534) (define-primitive-concept C1543 C1534) (define-primitive-concept C1544 C1533) (define-primitive-concept C1545 C1544) (define-primitive-concept C1546 C1544) (define-primitive-concept C1547 C1544) (define-primitive-concept C1548 C1547) (define-primitive-concept C1549 C137) (define-primitive-concept C1550 (AND C1549 (SOME R280 C50))) (define-primitive-concept C1551 (AND C1549 (SOME R284 (AND C120 (SOME R202 C130))))) (define-primitive-concept C1552 (AND C1549 (SOME R280 C50))) (define-primitive-concept C1553 (AND C1552 (SOME R280 C50) (SOME R184 C100))) (define-primitive-concept C1554 C137) (define-primitive-concept C1555 C1554) (define-primitive-concept C1556 C1555) (define-primitive-concept C1557 C137) (define-primitive-concept C1558 C137) (define-concept C1559 (AND C997 (SOME R29 C708))) (define-primitive-concept C1560 C1559) (define-primitive-concept C1561 (AND C1558 (OR (ALL R108 (NOT C964)) (ALL R396 (OR (NOT C1141) (ALL R202 (NOT C1288)))) (ALL R110 (NOT C1560)) (SOME R232 C110)))) (define-primitive-concept C1562 C137) (define-primitive-concept C1563 (AND C1562 (SOME R284 (AND C120 (SOME R202 C130))))) (define-primitive-concept C1564 C1563) (define-primitive-concept C1565 (AND C1563 (OR (ALL R108 (NOT C232)) (ALL R146 (NOT C1509)) (SOME R110 (AND C555 (SOME R29 (AND C997 (SOME R29 C258)))))) (OR (ALL R108 (NOT C232)) (ALL R146 (NOT C1509)) (SOME R110 (AND C997 (SOME R29 C258)))))) (define-primitive-concept C1566 C1562) (define-primitive-concept C1567 C137) (define-primitive-concept C1568 C1567) (define-primitive-concept C1569 C1568) (define-primitive-concept C1570 (AND C1566 C1569 (SOME R108 C263) (SOME R110 (AND C555 (SOME R29 (AND C997 (SOME R29 C263))))) (SOME R110 (AND C997 (SOME R29 C263))))) (define-primitive-concept C1571 C1566) (define-primitive-concept C1572 C1562) (define-primitive-concept C1573 C138) (define-primitive-concept C1574 (AND C137 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C1575 C1574) (define-primitive-concept C1576 C1574) (define-primitive-concept C1577 C1574) (define-primitive-concept C1578 (AND C1574 (SOME R280 C50) (SOME R184 C100))) (define-primitive-concept C1579 (AND C137 (SOME R108 (AND C157 (SOME R268 (AND C42 (SOME R202 C118))))))) (define-primitive-concept C1580 (AND C137 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C1581 C1580) (define-primitive-concept C1582 C137) (define-primitive-concept C1583 C1567) (define-primitive-concept C1584 C136) (define-primitive-concept C1585 (AND C1584 (SOME R268 (AND C42 (SOME R202 C118))))) (define-primitive-concept C1586 (AND C106 (SOME R410 C178))) (define-primitive-concept C1587 (AND C106 (SOME R128 C62))) (define-primitive-concept C1588 C106) (define-primitive-concept C1589 C274) (define-primitive-concept C1590 C274) (define-primitive-concept C1591 C274) (define-primitive-concept C1592 C274) (define-primitive-concept C1593 C387) (define-primitive-concept C1594 C1593) (define-primitive-concept C1595 C1593) (define-primitive-concept C1596 C1593) (define-primitive-concept C1597 C1593) (define-primitive-concept C1598 C387) (define-primitive-concept C1599 C1598) (define-primitive-concept C1600 C1598) (define-primitive-concept C1601 C1598) (define-primitive-concept C1602 C1598) (define-primitive-concept C1603 C1598) (define-primitive-concept C1604 C387) (define-primitive-concept C1605 C1604) (define-primitive-concept C1606 C1604) (define-primitive-concept C1607 C1604) (define-primitive-concept C1608 C1607) (define-primitive-concept C1609 C387) (define-primitive-concept C1610 C387) (define-primitive-concept C1611 C387) (define-primitive-concept C1612 C1611) (define-primitive-concept C1613 (AND C1611 (SOME R151 C1053))) (define-primitive-concept C1614 C1613) (define-primitive-concept C1615 C1613) (define-primitive-concept C1616 C1611) (define-primitive-concept C1617 C1611) (define-primitive-concept C1618 C1611) (define-primitive-concept C1619 C1611) (define-primitive-concept C1620 C1612) (define-primitive-concept C1621 C1612) (define-primitive-concept C1622 C1612) (define-primitive-concept C1623 C1612) (define-primitive-concept C1624 C1612) (define-primitive-concept C1625 C1624) (define-primitive-concept C1626 C1624) (define-primitive-concept C1627 C1624) (define-primitive-concept C1628 C1612) (define-primitive-concept C1629 C1612) (define-primitive-concept C1630 C1612) (define-primitive-concept C1631 C387) (define-primitive-concept C1632 C1631) (define-primitive-concept C1633 C1631) (define-primitive-concept C1634 C387) (define-primitive-concept C1635 (AND C1631 C1634)) (define-primitive-concept C1636 C1631) (define-primitive-concept C1637 C1631) (define-primitive-concept C1638 (AND C1631 C1634)) (define-primitive-concept C1639 C1631) (define-primitive-concept C1640 C1631) (define-primitive-concept C1641 C1037) (define-primitive-concept C1642 C1641) (define-primitive-concept C1643 C1641) (define-primitive-concept C1644 C1641) (define-primitive-concept C1645 C1641) (define-primitive-concept C1646 C1037) (define-primitive-concept C1647 C1037) (define-primitive-concept C1648 C1038) (define-primitive-concept C1649 C1038) (define-primitive-concept C1650 C1037) (define-primitive-concept C1651 C1634) (define-primitive-concept C1652 C1651) (define-primitive-concept C1653 C1651) (define-primitive-concept C1654 C1634) (define-primitive-concept C1655 C1654) (define-primitive-concept C1656 C1654) (define-primitive-concept C1657 C387) (define-primitive-concept C1658 C1657) (define-primitive-concept C1659 C1657) (define-primitive-concept C1660 C1659) (define-primitive-concept C1661 C1659) (define-primitive-concept C1662 C1657) (define-primitive-concept C1663 C1662) (define-primitive-concept C1664 C387) (define-primitive-concept C1665 C1046) (define-primitive-concept C1666 C1046) (define-primitive-concept C1667 C1046) (define-primitive-concept C1668 C1046) (define-primitive-concept C1669 C1046) (define-primitive-concept C1670 C1046) (define-primitive-concept C1671 C1046) (define-primitive-concept C1672 C1046) (define-primitive-concept C1673 C1046) (define-primitive-concept C1674 C1025) (define-primitive-concept C1675 C1674) (define-primitive-concept C1676 C1025) (define-primitive-concept C1677 C1676) (define-primitive-concept C1678 C1676) (define-primitive-concept C1679 C1676) (define-primitive-concept C1680 C1676) (define-primitive-concept C1681 C1676) (define-primitive-concept C1682 C1676) (define-primitive-concept C1683 C1676) (define-primitive-concept C1684 C1676) (define-primitive-concept C1685 C1676) (define-primitive-concept C1686 C1025) (define-primitive-concept C1687 (AND C1676 C1686)) (define-primitive-concept C1688 C1025) (define-primitive-concept C1689 C1688) (define-primitive-concept C1690 C1688) (define-primitive-concept C1691 C1688) (define-primitive-concept C1692 (AND C1688 C1686)) (define-primitive-concept C1693 C1688) (define-primitive-concept C1694 C1688) (define-primitive-concept C1695 C1688) (define-primitive-concept C1696 C1688) (define-primitive-concept C1697 C1688) (define-primitive-concept C1698 C1025) (define-primitive-concept C1699 C1698) (define-primitive-concept C1700 C1698) (define-primitive-concept C1701 C1698) (define-primitive-concept C1702 C1698) (define-primitive-concept C1703 C1698) (define-primitive-concept C1704 C1698) (define-primitive-concept C1705 C1698) (define-primitive-concept C1706 C1698) (define-primitive-concept C1707 C1033) (define-primitive-concept C1708 C1033) (define-primitive-concept C1709 C1033) (define-primitive-concept C1710 C1033) (define-primitive-concept C1711 C1033) (define-primitive-concept C1712 C1033) (define-primitive-concept C1713 C1033) (define-primitive-concept C1714 C1713) (define-primitive-concept C1715 C1713) (define-primitive-concept C1716 C1713) (define-primitive-concept C1717 C1713) (define-primitive-concept C1718 C1033) (define-primitive-concept C1719 C1033) (define-primitive-concept C1720 C1033) (define-primitive-concept C1721 C1025) (define-primitive-concept C1722 (AND C1033 C1721)) (define-primitive-concept C1723 C1025) (define-primitive-concept C1724 C1723) (define-primitive-concept C1725 C1723) (define-primitive-concept C1726 C1723) (define-primitive-concept C1727 C1723) (define-primitive-concept C1728 C1686) (define-primitive-concept C1729 C1686) (define-primitive-concept C1730 C1686) (define-primitive-concept C1731 C1686) (define-primitive-concept C1732 C1686) (define-primitive-concept C1733 (AND C1025 C1686)) (define-primitive-concept C1734 C1733) (define-primitive-concept C1735 C1733) (define-primitive-concept C1736 C1733) (define-primitive-concept C1737 C1025) (define-primitive-concept C1738 C1737) (define-primitive-concept C1739 C1737) (define-primitive-concept C1740 C1737) (define-primitive-concept C1741 C1737) (define-primitive-concept C1742 C1737) (define-primitive-concept C1743 C1737) (define-primitive-concept C1744 C1025) (define-primitive-concept C1745 C1744) (define-primitive-concept C1746 C1744) (define-concept C1747 (AND C561 (SOME R76 C968) (SOME R78 C965))) (define-primitive-concept C1748 (AND C585 (SOME R17 C964))) (define-primitive-concept C1749 (AND C1744 (OR (ALL R96 (NOT C1747)) (SOME R93 C1748)) (OR (ALL R93 (NOT C1748)) (ALL R366 (OR (NOT C29) (ALL R202 (NOT C31)))) (SOME R178 C25)))) (define-primitive-concept C1750 C1744) (define-primitive-concept C1751 C1744) (define-primitive-concept C1752 C1025) (define-primitive-concept C1753 C1752) (define-primitive-concept C1754 C1025) (define-primitive-concept C1755 C1754) (define-primitive-concept C1756 C1754) (define-primitive-concept C1757 C1754) (define-primitive-concept C1758 C1025) (define-primitive-concept C1759 C1758) (define-primitive-concept C1760 C1758) (define-primitive-concept C1761 C1721) (define-primitive-concept C1762 C1721) (define-primitive-concept C1763 C1721) (define-primitive-concept C1764 C1025) (define-primitive-concept C1765 C1764) (define-primitive-concept C1766 C1764) (define-primitive-concept C1767 (AND C1766 (OR (ALL R150 (NOT C1624)) (SOME R96 C322)))) (define-primitive-concept C1768 C1766) (define-primitive-concept C1769 C1766) (define-primitive-concept C1770 C1766) (define-primitive-concept C1771 C1766) (define-primitive-concept C1772 C1764) (define-primitive-concept C1773 C1764) (define-primitive-concept C1774 C1042) (define-primitive-concept C1775 C1042) (define-primitive-concept C1776 C1042) (define-primitive-concept C1777 C1776) (define-primitive-concept C1778 C1776) (define-concept C1779 (AND C191 (SOME R86 C761))) (define-concept C1780 (AND C191 (SOME R86 C232))) (define-concept C1781 (AND C191 (SOME R86 C762))) (define-concept C1782 (AND C191 (SOME R86 C263))) (define-concept C1783 (AND C191 (SOME R86 C606))) (define-concept C1784 (AND C191 (SOME R86 C717))) (define-concept C1785 (AND C191 (SOME R86 C722))) (define-concept C1786 (AND C191 (SOME R86 C708))) (define-concept C1787 (AND C191 (SOME R86 C708) (SOME R86 C606))) (define-concept C1788 (AND C142 (SOME R146 C416))) (define-concept C1789 (AND C142 (SOME R146 C529))) (define-concept C1790 (AND C135 (SOME R232 C184))) (define-concept C1791 (AND C135 (SOME R232 C110))) (define-concept C1792 (AND C135 (SOME R232 C112))) (define-concept C1793 (AND C135 (SOME R278 C187))) (define-primitive-concept C1794) (define-concept C1795 (AND C286 (SOME R216 C1794) (SOME R218 C289))) (define-primitive-concept C1796) (define-concept C1797 (AND C286 (SOME R216 C1796) (SOME R218 C289))) (define-primitive-concept C1798) (define-concept C1799 (AND C286 (SOME R216 C1798) (SOME R218 C289))) (define-primitive-concept C1800) (define-concept C1801 (AND C286 (SOME R216 C1800) (SOME R218 C289))) (define-primitive-concept C1802) (define-concept C1803 (AND C286 (SOME R216 C1802) (SOME R218 C497))) (define-primitive-concept C1804) (define-concept C1805 (AND C286 (SOME R216 C1804) (SOME R218 C497))) (define-primitive-concept C1806) (define-concept C1807 (AND C286 (SOME R216 C1806) (SOME R218 C497))) (define-primitive-concept C1808) (define-concept C1809 (AND C286 (SOME R216 C1808) (SOME R218 C497))) (define-concept C1810 (AND C286 (SOME R216 C290) (SOME R218 C498))) (define-concept C1811 (AND C64 (SOME R202 C67))) (define-concept C1812 (AND C64 (SOME R202 C1106))) (define-concept C1813 (AND C64 (SOME R202 C1413))) (define-concept C1814 (AND C59 (SOME R348 C1811))) (define-concept C1815 (AND C59 (SOME R348 C1812))) (define-concept C1816 (AND C59 (SOME R348 C1813))) (define-concept C1817 (AND C59 (SOME R166 C1420))) (define-concept C1818 (AND C95 (SOME R166 C412))) (define-concept C1819 (AND C95 (SOME R166 C269))) (define-concept C1820 (AND C95 (SOME R166 C1422))) (define-concept C1821 (AND C95 (SOME R166 C225))) (define-concept C1822 (AND C42 (SOME R202 C118))) (define-concept C1823 (AND C42 (SOME R202 C47))) (define-concept C1824 (AND C42 (SOME R202 C619))) (define-concept C1825 (AND C42 (SOME R202 C116))) (define-concept C1826 (AND C42 (SOME R202 C117))) (define-concept C1827 (AND C42 (SOME R202 C1366))) (define-concept C1828 (AND C51 (SOME R268 (AND C42 (SOME R202 C47))))) (define-concept C1829 (AND C51 (SOME R268 (AND C42 (SOME R202 C619))))) (define-concept C1830 (AND C51 (SOME R268 (AND C42 (SOME R202 C116))))) (define-concept C1831 (AND C51 (SOME R268 (AND C42 (SOME R202 C117))))) (define-concept C1832 (AND C51 (SOME R268 (AND C42 (SOME R202 C118))))) (define-concept C1833 (AND C135 (SOME R268 (AND C42 (SOME R202 C619))))) (define-concept C1834 (AND C135 (SOME R268 (AND C42 (SOME R202 C116))))) (define-concept C1835 (AND C135 (SOME R268 (AND C42 (SOME R202 C117))))) (define-concept C1836 (AND C135 (SOME R268 (AND C42 (SOME R202 C336))))) (define-concept C1837 (AND C135 (SOME R284 (AND C120 (SOME R202 C123))))) (define-concept C1838 (AND C51 (SOME R284 (AND C120 (SOME R202 C130))))) (define-concept C1839 (AND C135 (SOME R284 (AND C120 (SOME R202 C130))))) (define-concept C1840 (AND C324 (SOME R51 (AND C135 (SOME R268 (AND C42 (SOME R202 C118))))))) (define-concept C1841 (AND C324 (SOME R51 (AND C135 (SOME R268 (AND C42 (SOME R202 C1366))))))) (define-concept C1842 (AND C324 (SOME R51 (AND C135 (SOME R268 (AND C42 (SOME R202 C619))))))) (define-concept C1843 (AND C32 (SOME R128 C1567))) (define-concept C1844 (AND C59 (SOME R95 C260))) (define-concept C1845 (AND C791 (SOME R128 (AND C135 (SOME R282 (AND C119 (SOME R208 C1335))))))) (define-concept C1846 (AND C1843 (SOME R128 C1568))) (define-concept C1847 (AND C1843 (SOME R128 C1583))) (define-concept C1848 (AND C62 (SOME R129 C1587))) (define-concept C1849 (AND C1588 (SOME R128 C1561))) (define-concept C1850 (AND C32 (SOME R128 C1562))) (define-concept C1851 (AND C32 (SOME R128 C1566))) (define-concept C1852 (AND C135 (SOME R182 C27))) (define-concept C1853 (AND C135 (SOME R182 C100))) (define-concept C1854 (AND C135 (SOME R182 C188))) (define-concept C1855 (AND C135 (SOME R182 C189))) (define-concept C1856 (AND C135 (SOME R182 C156))) (define-concept C1857 (AND C135 (SOME R184 C27))) (define-concept C1858 (AND C135 (SOME R184 C100))) (define-concept C1859 (AND C135 (SOME R184 C188))) (define-concept C1860 (AND C135 (SOME R184 C189))) (define-concept C1861 (AND C135 (SOME R184 C156))) (define-concept C1862 (AND C135 (SOME R178 C25))) (define-concept C1863 (AND C135 (SOME R178 C28))) (define-concept C1864 (AND C135 (SOME R180 C25))) (define-concept C1865 (AND C135 (SOME R180 C28))) (define-concept C1866 (AND C584 (SOME R30 C999))) (define-concept C1867 (AND C206 (SOME R173 (AND C15 (SOME R129 C1043))))) (define-concept C1868 (AND C325 (SOME R178 C25))) (define-concept C1869 (AND C1549 (SOME R268 (AND C42 (SOME R202 C116))))) (define-concept C1870 (AND C324 (SOME R51 (AND C1549 (SOME R268 (AND C42 (SOME R202 C116))))))) (define-concept C1871 (AND C59 (SOME R53 C1869))) (define-concept C1872 (AND C997 (SOME R29 C1869))) (define-concept C1873 (AND C157 (SOME R268 (AND C42 (SOME R202 C47))) (SOME R178 C25))) (define-concept C1874 (AND C1868 (SOME R52 C1016))) (define-concept C1875 (AND C135 (SOME R29 (AND C135 (SOME R268 C1823))) (SOME R166 C419))) (define-concept C1876 (AND C135 (SOME R29 (AND C157 (SOME R268 C1823))) (SOME R166 C419))) (define-concept C1877 (AND C135 (SOME R30 C572))) (define-concept C1878 (AND C1548 (SOME R30 C329))) (define-concept C1879 (AND C1548 (SOME R30 C1002))) (define-concept C1880 (AND C315 (SOME R30 C572))) (define-concept C1881 (AND C60 (SOME R348 (AND C64 (SOME R202 C67))))) (define-concept C1882 (AND C367 (SOME R21 C326))) (define-concept C1883 (AND C367 (SOME R95 C1851))) (define-concept C1884 (AND C420 (SOME R29 C669))) (define-concept C1885 (AND C32 (SOME R178 C25))) (define-concept C1886 (AND C32 (SOME R180 C25))) (define-concept C1887 (AND C165 (SOME R178 C25))) (define-concept C1888 (AND C165 (SOME R180 C25))) (define-concept C1889 (AND C164 (SOME R178 C25))) (define-concept C1890 (AND C164 (SOME R180 C25))) (define-concept C1891 (AND C60 (SOME R178 C25))) (define-concept C1892 (AND C60 (SOME R180 C25))) (define-concept C1893 (AND C147 (SOME R178 C25))) (define-concept C1894 (AND C147 (SOME R180 C25))) (define-concept C1895 (AND C268 (SOME R202 C415))) (define-concept C1896 (AND C268 (SOME R202 C411))) (define-concept C1897 (AND C1130 (SOME R208 C1251))) (define-concept C1898 (AND C1130 (SOME R208 C1253))) (define-concept C1899 (AND C1130 (SOME R204 C72))) (define-concept C1900 (AND C1130 (SOME R204 C76))) (define-concept C1901 (AND C62 (SOME R348 (AND C64 (SOME R202 C1106))) (SOME R129 C1107))) (define-concept C1902 (AND C135 (SOME R30 C1901))) (define-concept C1903 (AND C536 (SOME R168 C1426))) (define-concept C1904 (AND C1903 (SOME R344 (AND C1181 (SOME R202 C1234))))) (define-concept C1905 (AND C536 (SOME R168 C1425))) (define-concept C1906 (AND C381 (SOME R13 C372) (SOME R314 C375))) (define-concept C1907 (AND C1906 (SOME R163 (AND C975 (SOME R202 C1271))))) (define-concept C1908 (AND C381 (SOME R13 C379) (SOME R314 C375))) (define-concept C1909 (AND C1908 (SOME R163 (AND C975 (SOME R202 C1271))))) (define-concept C1910 (AND C607 (SOME R19 C606))) (define-concept C1911 (AND C368 (SOME R284 (AND C120 (SOME R202 C133))))) (define-concept C1912 (AND C368 (SOME R284 (AND C120 (SOME R202 C134))))) (define-concept C1913 (AND C1912 (SOME R13 C678))) (define-concept C1914 (AND C1174 (SOME R204 C1248))) (define-concept C1915 (AND C1175 (SOME R204 C1248))) (define-concept C1916 (AND C1174 (SOME R204 C76))) (define-concept C1917 (AND C1174 (SOME R204 C72))) (define-concept C1918 (AND C1174 (SOME R204 C1247))) (define-concept C1919 (AND C1175 (SOME R204 C76))) (define-concept C1920 (AND C1175 (SOME R204 C72))) (define-concept C1921 (AND C1175 (SOME R204 C1247))) (define-concept C1922 (AND C1176 (SOME R204 C1248))) (define-concept C1923 (AND C1176 (SOME R204 C76))) (define-concept C1924 (AND C1176 (SOME R204 C72))) (define-concept C1925 (AND C1176 (SOME R204 C1247))) (define-concept C1926 (AND C1169 (SOME R204 C72))) (define-concept C1927 (AND C420 (SOME R29 C53))) (define-concept C1928 (AND C420 (SOME R29 C432))) (define-concept C1929 (AND C536 (SOME R168 C1428))) (define-concept C1930 (AND C1714 (SOME R94 C717))) (define-concept C1931 (AND C1726 (SOME R94 C717))) (define-concept C1932 (AND C96 (SOME R30 C143) (SOME R30 C99))) (define-concept C1933 (AND C1043 (SOME R122 C276))) (define-concept C1934 (AND C147 (SOME R190 C277))) (define-concept C1935 (AND C144 (SOME R353 (AND C1487 (SOME R45 C68))))) (define-concept C1936 (AND C1935 (SOME R204 C72))) (define-concept C1937 (AND C1043 (SOME R122 C1935))) (define-concept C1938 (AND C147 (SOME R190 C1936))) (define-concept C1939 (AND C144 (SOME R353 (AND C1483 (SOME R45 C68))))) (define-concept C1940 (AND C1939 (SOME R204 C72))) (define-concept C1941 (AND C1043 (SOME R122 C1939))) (define-concept C1942 (AND C144 (SOME R353 (AND C1932 (SOME R45 C68))))) (define-concept C1943 (AND C1942 (SOME R204 C72))) (define-concept C1944 (AND C1043 (SOME R122 C1942))) (define-concept C1945 (AND C144 (SOME R353 (AND C1494 (SOME R45 C68))))) (define-concept C1946 (AND C1945 (SOME R204 C72))) (define-concept C1947 (AND C1043 (SOME R122 C1945))) (define-concept C1948 (AND C147 (SOME R190 C1946))) (define-concept C1949 (AND C144 (SOME R353 (AND C1478 (SOME R45 C788))))) (define-concept C1950 (AND C1949 (SOME R204 C72))) (define-concept C1951 (AND C1043 (SOME R122 C1949))) (define-concept C1952 (AND C147 (SOME R190 C1950))) (define-concept C1953 (AND C144 (SOME R353 (AND C1456 (SOME R45 C68))))) (define-concept C1954 (AND C1953 (SOME R204 C72))) (define-concept C1955 (AND C1043 (SOME R122 C1953))) (define-concept C1956 (AND C147 (SOME R190 C1954))) (define-concept C1957 (AND C144 (SOME R353 (AND C1455 (SOME R45 C68))))) (define-concept C1958 (AND C1957 (SOME R204 C72))) (define-concept C1959 (AND C1043 (SOME R122 C1957))) (define-concept C1960 (AND C147 (SOME R190 C1958))) (define-concept C1961 (AND C144 (SOME R353 (AND C1447 (SOME R45 C68))))) (define-concept C1962 (AND C1961 (SOME R204 C72))) (define-concept C1963 (AND C1043 (SOME R122 C1961))) (define-concept C1964 (AND C147 (SOME R190 C1962))) (define-concept C1965 (AND C144 (SOME R353 (AND C1444 (SOME R45 C68))))) (define-concept C1966 (AND C1965 (SOME R204 C76))) (define-concept C1967 (AND C1043 (SOME R122 C1965))) (define-concept C1968 (AND C147 (SOME R190 C1966))) (define-concept C1969 (AND C84 (SOME R291 (AND C55 (SOME R47 C68))))) (define-concept C1970 (AND C1969 (SOME R204 C72))) (define-concept C1971 (AND C1043 (SOME R122 C1969))) (define-concept C1972 (AND C147 (SOME R190 C1970))) (define-concept C1973 (AND C84 (SOME R291 (AND C73 (SOME R47 C68))))) (define-concept C1974 (AND C1973 (SOME R204 C72))) (define-concept C1975 (AND C1043 (SOME R122 C1973))) (define-concept C1976 (AND C84 (SOME R291 (AND C74 (SOME R47 C68))))) (define-concept C1977 (AND C1976 (SOME R204 C72))) (define-concept C1978 (AND C1043 (SOME R122 C1976))) (define-concept C1979 (AND C147 (SOME R190 C1977))) (define-concept C1980 (AND C84 (SOME R291 (AND C75 (SOME R47 C68))))) (define-concept C1981 (AND C1980 (SOME R204 C72))) (define-concept C1982 (AND C1980 (SOME R204 C76))) (define-concept C1983 (AND C1043 (SOME R122 C1980))) (define-concept C1984 (AND C147 (SOME R190 C1981))) (define-concept C1985 (AND C147 (SOME R190 C1982))) (define-concept C1986 (AND C84 (SOME R291 (AND C77 (SOME R47 C68))))) (define-concept C1987 (AND C1986 (SOME R204 C72))) (define-concept C1988 (AND C1986 (SOME R204 C76))) (define-concept C1989 (AND C1043 (SOME R122 C1986))) (define-concept C1990 (AND C147 (SOME R190 C1987))) (define-concept C1991 (AND C147 (SOME R190 C1988))) (define-concept C1992 (AND C84 (SOME R291 (AND C78 (SOME R47 C68))))) (define-concept C1993 (AND C1992 (SOME R204 C72))) (define-concept C1994 (AND C1992 (SOME R204 C76))) (define-concept C1995 (AND C1043 (SOME R122 C1992))) (define-concept C1996 (AND C147 (SOME R190 C1993))) (define-concept C1997 (AND C145 (SOME R204 C72))) (define-concept C1998 (AND C1043 (SOME R122 C145))) (define-concept C1999 (AND C147 (SOME R190 C146))) (define-concept C2000 (AND C147 (SOME R190 C91))) (define-concept C2001 (AND C147 (SOME R190 C93))) (define-concept C2002 (AND C147 (SOME R190 C94) (SOME R190 C93) (SOME R190 C146))) (define-concept C2003 (AND C1043 (SOME R34 (AND C281 (SOME R94 (AND C78 (SOME R47 C68))) (SOME R386 (AND C283 (SOME R206 C291))))))) (define-concept C2004 (AND C1142 (SOME R294 (AND C295 (SOME R204 C72))))) (define-concept C2005 (AND C206 (SOME R173 (AND C43 (SOME R203 (AND C36 (SOME R201 C52))) (SOME R129 C1053))))) (define-concept C2006 (AND C1053 (SOME R152 C1614))) (define-concept C2007 (AND C1053 (SOME R152 C1615))) (define-concept C2008 (AND C1044 (SOME R122 (AND C268 (SOME R373 C416) (SOME R173 (AND C174 (SOME R405 C409))))))) (define-concept C2009 (AND C415 (SOME R203 (AND C268 (SOME R173 (AND C174 (SOME R405 C409))))))) (define-concept C2010 (AND C411 (SOME R203 (AND C268 (SOME R173 (AND C174 (SOME R405 C409))))))) (define-concept C2011 (AND C1049 (SOME R152 C1641))) (define-concept C2012 (AND C1036 (SOME R129 C2011))) (define-concept C2013 (AND C1049 (SOME R152 C1038))) (define-concept C2014 (AND C1049 (SOME R34 (AND C280 (SOME R94 C788) (SOME R102 C646))))) (define-concept C2015 (AND C1036 (SOME R129 C2014))) (define-concept C2016 (AND C1050 (SOME R96 C1036))) (define-concept C2017 (AND C2016 (SOME R128 (AND C173 (SOME R407 C416))))) (define-concept C2018 (AND C2016 (SOME R128 (AND C174 (SOME R407 C416))))) (define-concept C2019 (AND C1052 (SOME R34 C2016) (SOME R34 C2008))) (define-concept C2020 (AND C1051 (SOME R150 C1038) (SOME R94 C249))) (define-concept C2021 (AND C1051 (SOME R150 C1038) (SOME R94 C234))) (define-concept C2022 (AND C1052 (SOME R34 (AND C1050 (SOME R94 C1040))))) (define-concept C2023 (AND C2022 (SOME R128 (AND C173 (SOME R407 C416))))) (define-concept C2024 (AND C2022 (SOME R128 (AND C174 (SOME R407 C416))))) (define-concept C2025 (AND C1043 (SOME R122 (AND C29 (SOME R367 (AND C429 (SOME R94 C432))))))) (define-concept C2026 (AND C432 (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C428))))))) (define-concept C2027 (AND C432 (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))))) (define-concept C2028 (AND C432 (SOME R95 C429))) (define-concept C2029 (AND C416 (SOME R95 C429))) (define-concept C2030 (AND C206 (SOME R173 (AND C30 (SOME R129 C2025))))) (define-concept C2031 (AND C206 (SOME R173 (AND C428 (SOME R129 (AND C2025 (SOME R34 (AND C1053 (SOME R122 (AND C82 (SOME R271 C432))) (SOME R128 C1375))))))))) (define-concept C2032 (AND C206 (SOME R173 (AND C31 (SOME R129 (AND C2025 (SOME R34 (AND C1053 (SOME R122 (AND C82 (SOME R271 C432))) (SOME R128 C1374))))))))) (define-concept C2033 (AND C162 (SOME R128 (AND C416 (SOME R90 (AND C163 (SOME R368 (AND C292 (SOME R202 C1321))))))))) (define-concept C2034 (AND C162 (SOME R128 (AND C416 (SOME R332 (AND C1173 (SOME R202 C1186))))))) (define-concept C2035 (AND C409 (SOME R131 (AND C1126 (SOME R91 C414) (SOME R366 (AND C29 (SOME R202 C31))))))) (define-concept C2036 (AND C409 (SOME R131 (AND C1126 (SOME R91 C414) (SOME R366 (AND C29 (SOME R202 C428))))))) (define-concept C2037 (AND C409 (SOME R90 (AND C162 (SOME R128 (AND C416 (SOME R90 (AND C163 (SOME R368 (AND C292 (SOME R202 C1321))))))))))) (define-concept C2038 (AND C409 (SOME R90 (AND C162 (SOME R128 (AND C416 (SOME R332 (AND C1173 (SOME R202 C1186))))))))) (define-primitive-concept C2039 C409) (define-primitive-concept C2040 C409) (define-primitive-concept C2041 C409) (define-primitive-concept C2042 C409) (define-primitive-concept C2043 C409) (define-primitive-concept C2044 C409) (define-primitive-concept C2045 C409) (define-primitive-concept C2046 C409) (define-primitive-concept C2047 C409) (define-primitive-concept C2048 C409) (define-primitive-concept C2049 C409) (define-primitive-concept C2050 C409) (define-primitive-concept C2051 C409) (define-primitive-concept C2052 C409) (define-primitive-concept C2053 C409) (define-primitive-concept C2054 C2039) (define-primitive-concept C2055 C2039) (define-primitive-concept C2056 C2039) (define-primitive-concept C2057 C2055) (define-primitive-concept C2058 C2055) (define-primitive-concept C2059 C2055) (define-primitive-concept C2060 (AND C2055 (SOME R372 (AND C268 (SOME R202 C411) (SOME R173 (AND C174 (SOME R405 C414))))))) (define-primitive-concept C2061 C2055) (define-primitive-concept C2062 C2055) (define-primitive-concept C2063 C2055) (define-primitive-concept C2064 C2055) (define-primitive-concept C2065 C2056) (define-primitive-concept C2066 C2056) (define-primitive-concept C2067 C2056) (define-primitive-concept C2068 C2056) (define-primitive-concept C2069 C2056) (define-primitive-concept C2070 C2056) (define-primitive-concept C2071 C2040) (define-primitive-concept C2072 C2040) (define-primitive-concept C2073 C2040) (define-primitive-concept C2074 C2041) (define-primitive-concept C2075 C2041) (define-primitive-concept C2076 C2041) (define-primitive-concept C2077 C2041) (define-primitive-concept C2078 C2042) (define-primitive-concept C2079 C2042) (define-primitive-concept C2080 C2043) (define-primitive-concept C2081 C2043) (define-primitive-concept C2082 C2043) (define-primitive-concept C2083 C2043) (define-primitive-concept C2084 C2044) (define-primitive-concept C2085 C2044) (define-primitive-concept C2086 C2044) (define-primitive-concept C2087 C2045) (define-primitive-concept C2088 C2045) (define-primitive-concept C2089 C2046) (define-primitive-concept C2090 C2046) (define-primitive-concept C2091 C2046) (define-primitive-concept C2092 C2046) (define-primitive-concept C2093 C1521) (define-primitive-concept C2094 C1521) (define-primitive-concept C2095 C1521) (define-primitive-concept C2096 C1521) (define-primitive-concept C2097 C1521) (define-primitive-concept C2098 C1521) (define-concept C2099 (AND C415 (SOME R203 (AND C268 (SOME R173 (AND C174 (SOME R405 C2055))))))) (define-concept C2100 (AND C411 (SOME R203 (AND C268 (SOME R173 (AND C174 (SOME R405 C2055))))))) (define-concept C2101 (AND C415 (SOME R203 (AND C268 (SOME R173 (AND C174 (SOME R405 C2059))))))) (define-concept C2102 (AND C411 (SOME R203 (AND C268 (SOME R173 (AND C174 (SOME R405 C2059))))))) (define-concept C2103 (AND C415 (SOME R203 (AND C268 (SOME R173 (AND C174 (SOME R405 C2074))))))) (define-concept C2104 (AND C411 (SOME R203 (AND C268 (SOME R173 (AND C174 (SOME R405 C2074))))))) (define-concept C2105 (AND C415 (SOME R203 (AND C268 (SOME R173 (AND C174 (SOME R405 C2056))))))) (define-concept C2106 (AND C411 (SOME R203 (AND C268 (SOME R173 (AND C174 (SOME R405 C2056))))))) (define-concept C2107 (AND C1125 (SOME R360 (AND C1132 (SOME R202 C1310))))) (define-primitive-concept C2108 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1358))))) (SOME R282 (AND C119 (SOME R202 C1358))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C428))))) (SOME R90 C2107))) (define-concept C2109 (AND C1125 (SOME R360 (AND C1132 (SOME R202 C1312))))) (define-concept C2110 (AND C1125 (SOME R360 (AND C1132 (SOME R202 C1309))))) (define-primitive-concept C2111 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1358))))) (SOME R282 (AND C119 (SOME R202 C1358))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C428))))) (SOME R90 C2109) (SOME R90 C2110) (SOME R90 (AND C260 (SOME R96 C1524))))) (define-concept C2112 (AND C1125 (SOME R360 (AND C1132 (SOME R202 C1311))))) (define-primitive-concept C2113 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1358))))) (SOME R282 (AND C119 (SOME R202 C1358))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))) (SOME R90 C2112))) (define-primitive-concept C2114 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1358))))) (SOME R282 (AND C119 (SOME R202 C1358))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))))) (define-primitive-concept C2115 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1343))))) (SOME R282 (AND C119 (SOME R202 C1343))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))))) (define-primitive-concept C2116 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1358))) (SOME R276 (AND C1158 (SOME R202 C1371))))) (SOME R282 (AND C119 (SOME R202 C1358))) (SOME R276 (AND C1158 (SOME R202 C1371))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))))) (define-primitive-concept C2117 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1340))) (SOME R276 (AND C1158 (SOME R202 C1372))))) (SOME R282 (AND C119 (SOME R202 C1340))) (SOME R276 (AND C1158 (SOME R202 C1372))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))) (SOME R90 C2109))) (define-primitive-concept C2118 C416) (define-primitive-concept C2119 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1358))))) (SOME R282 (AND C119 (SOME R202 C1358))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C428))))) (SOME R90 C2112))) (define-primitive-concept C2120 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1358))))) (SOME R282 (AND C119 (SOME R202 C1358))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C428))))))) (define-primitive-concept C2121 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1358))))) (SOME R282 (AND C119 (SOME R202 C1358))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))) (SOME R90 C2110))) (define-primitive-concept C2122 C416) (define-primitive-concept C2123 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1358))))) (SOME R282 (AND C119 (SOME R202 C1358))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))))) (define-primitive-concept C2124 (AND C416 (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))))) (define-primitive-concept C2125 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1343))))) (SOME R282 (AND C119 (SOME R202 C1343))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))) (SOME R90 C2109))) (define-primitive-concept C2126 (AND C416 (SOME R24 (AND C432 (SOME R276 (AND C1158 (SOME R202 C1372))))) (SOME R276 (AND C1158 (SOME R202 C1372))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C428))))) (SOME R90 C2110))) (define-primitive-concept C2127 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1353))))) (SOME R282 (AND C119 (SOME R202 C1358))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))) (SOME R90 C2109))) (define-primitive-concept C2128 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1358))))) (SOME R282 (AND C119 (SOME R202 C1358))) (SOME R95 (AND C1127 (SOME R366 (AND C29 (SOME R202 C428))))) (SOME R90 C2109))) (define-primitive-concept C2129 (AND C416 (SOME R276 (AND C1158 (SOME R202 C1371))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))) (SOME R90 C2110))) (define-primitive-concept C2130 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1352))))) (SOME R282 (AND C119 (SOME R202 C1352))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))) (SOME R90 C2109))) (define-primitive-concept C2131 (AND C416 (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C428))))) (SOME R90 C2109))) (define-primitive-concept C2132 (AND C416 (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C428))))) (SOME R90 C2112))) (define-primitive-concept C2133 (AND C416 (SOME R24 (AND C432 (SOME R276 (AND C1158 (SOME R202 C1372))))) (SOME R276 (AND C1158 (SOME R202 C1372))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))) (SOME R90 C2109))) (define-primitive-concept C2134 C416) (define-primitive-concept C2135 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1351))))) (SOME R282 (AND C119 (SOME R202 C1351))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C428))))) (SOME R90 C2110))) (define-primitive-concept C2136 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1351))))) (SOME R282 (AND C119 (SOME R202 C1351))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C428))))) (SOME R90 C2110))) (define-primitive-concept C2137 (AND C416 (SOME R24 (AND C432 (SOME R282 (AND C119 (SOME R202 C1343))))) (SOME R282 (AND C119 (SOME R202 C1343))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))))) (define-primitive-concept C2138 C416) (define-primitive-concept C2139 (AND C416 (SOME R24 (AND C432 (SOME R276 (AND C1158 (SOME R202 C1372))) (SOME R282 (AND C119 (SOME R202 C1358))))) (SOME R276 (AND C1158 (SOME R202 C1372))) (SOME R282 (AND C119 (SOME R202 C1358))) (SOME R95 (AND C429 (SOME R366 (AND C29 (SOME R202 C31))))) (SOME R90 C2109))) (define-primitive-concept C2140 C2108) (define-primitive-concept C2141 C2111) (define-primitive-concept C2142 C2111) (define-primitive-concept C2143 C2113) (define-primitive-concept C2144 C2114) (define-primitive-concept C2145 C2115) (define-primitive-concept C2146 C2116) (define-primitive-concept C2147 C2116) (define-primitive-concept C2148 C2116) (define-primitive-concept C2149 C2117) (define-primitive-concept C2150 C2117) (define-primitive-concept C2151 C2117) (define-primitive-concept C2152 C2119) (define-primitive-concept C2153 C2119) (define-primitive-concept C2154 C2119) (define-primitive-concept C2155 C2119) (define-primitive-concept C2156 C2119) (define-primitive-concept C2157 C2119) (define-primitive-concept C2158 C2119) (define-primitive-concept C2159 C2119) (define-primitive-concept C2160 C2119) (define-primitive-concept C2161 C2119) (define-primitive-concept C2162 C2119) (define-primitive-concept C2163 C2119) (define-primitive-concept C2164 C2119) (define-primitive-concept C2165 C2119) (define-primitive-concept C2166 C2120) (define-primitive-concept C2167 C2120) (define-primitive-concept C2168 C2120) (define-primitive-concept C2169 C2121) (define-primitive-concept C2170 C2121) (define-primitive-concept C2171 C2121) (define-primitive-concept C2172 C2121) (define-primitive-concept C2173 C2121) (define-primitive-concept C2174 C2121) (define-primitive-concept C2175 C2121) (define-primitive-concept C2176 C2121) (define-primitive-concept C2177 C2121) (define-primitive-concept C2178 C2121) (define-primitive-concept C2179 C2169) (define-primitive-concept C2180 C2170) (define-primitive-concept C2181 C2170) (define-primitive-concept C2182 C2170) (define-primitive-concept C2183 C2170) (define-primitive-concept C2184 C2171) (define-primitive-concept C2185 C2172) (define-primitive-concept C2186 C2173) (define-primitive-concept C2187 C2173) (define-primitive-concept C2188 C2174) (define-primitive-concept C2189 C2175) (define-primitive-concept C2190 C2175) (define-primitive-concept C2191 C2175) (define-primitive-concept C2192 C2175) (define-primitive-concept C2193 C2175) (define-primitive-concept C2194 C2175) (define-primitive-concept C2195 C2175) (define-primitive-concept C2196 C2175) (define-primitive-concept C2197 C2175) (define-primitive-concept C2198 C2175) (define-primitive-concept C2199 C2175) (define-primitive-concept C2200 C2175) (define-primitive-concept C2201 C2175) (define-primitive-concept C2202 C2175) (define-primitive-concept C2203 C2175) (define-primitive-concept C2204 C2175) (define-primitive-concept C2205 C2175) (define-primitive-concept C2206 C2175) (define-primitive-concept C2207 C2175) (define-primitive-concept C2208 C2175) (define-primitive-concept C2209 C2175) (define-primitive-concept C2210 C2175) (define-primitive-concept C2211 C2175) (define-primitive-concept C2212 C2175) (define-primitive-concept C2213 C2175) (define-primitive-concept C2214 C2175) (define-primitive-concept C2215 C2175) (define-primitive-concept C2216 C2175) (define-primitive-concept C2217 C2175) (define-primitive-concept C2218 C2175) (define-primitive-concept C2219 C2175) (define-primitive-concept C2220 C2175) (define-primitive-concept C2221 C2175) (define-primitive-concept C2222 C2175) (define-primitive-concept C2223 C2175) (define-primitive-concept C2224 C2189) (define-primitive-concept C2225 C2190) (define-primitive-concept C2226 C2195) (define-primitive-concept C2227 C2176) (define-primitive-concept C2228 C2177) (define-primitive-concept C2229 C2177) (define-primitive-concept C2230 C2177) (define-primitive-concept C2231 C2177) (define-primitive-concept C2232 C2178) (define-primitive-concept C2233 C2178) (define-primitive-concept C2234 C2178) (define-primitive-concept C2235 C2122) (define-primitive-concept C2236 C2123) (define-primitive-concept C2237 C2123) (define-primitive-concept C2238 C2124) (define-primitive-concept C2239 C2125) (define-primitive-concept C2240 C2126) (define-primitive-concept C2241 C2127) (define-primitive-concept C2242 C2127) (define-primitive-concept C2243 C2128) (define-primitive-concept C2244 C2128) (define-primitive-concept C2245 C2128) (define-primitive-concept C2246 C2128) (define-primitive-concept C2247 C2128) (define-primitive-concept C2248 C2128) (define-primitive-concept C2249 C2128) (define-primitive-concept C2250 C2128) (define-primitive-concept C2251 C2130) (define-primitive-concept C2252 C2130) (define-primitive-concept C2253 C2131) (define-primitive-concept C2254 C2132) (define-primitive-concept C2255 C2133) (define-primitive-concept C2256 C2135) (define-primitive-concept C2257 C2135) (define-primitive-concept C2258 (AND C2136 (SOME R90 (AND C260 (SOME R96 C1524))) (SOME R90 (AND C260 (SOME R96 C1527))) (SOME R90 (AND C260 (SOME R96 C1529))))) (define-primitive-concept C2259 C2136) (define-primitive-concept C2260 C2136) (define-primitive-concept C2261 C2136) (define-primitive-concept C2262 C2136) (define-primitive-concept C2263 (AND C2136 (SOME R90 (AND C260 (SOME R96 C1524))))) (define-primitive-concept C2264 (AND C2136 (SOME R90 (AND C260 (SOME R96 C1524))))) (define-primitive-concept C2265 (AND C2136 (SOME R90 (AND C260 (SOME R96 C1524))))) (define-primitive-concept C2266 C2136) (define-primitive-concept C2267 C2137) (define-primitive-concept C2268 C2138) (define-primitive-concept C2269 C2139) (define-primitive-concept C2270 C2129) (define-primitive-concept C2271 C2129) (define-primitive-concept C2272 C2129) (define-primitive-concept C2273 C2129) (define-primitive-concept C2274 C2129) (define-primitive-concept C2275 C2129) (define-primitive-concept C2276 C2134) (define-primitive-concept C2277 C2134) (define-primitive-concept C2278 C2134) (define-primitive-concept C2279 C2134) (define-primitive-concept C2280 C2134) (define-primitive-concept C2281 C2118) (define-primitive-concept C2282 C2118) (define-primitive-concept C2283 (AND C531 (SOME R90 C2109))) (define-primitive-concept C2284 C2283) (define-primitive-concept C2285 C531) (define-primitive-concept C2286 C2285) (define-primitive-concept C2287 C2194) (define-primitive-concept C2288 C2202) (define-primitive-concept C2289 C2192) (define-primitive-concept C2290 C141) (define-primitive-concept C2291 C2290) (define-primitive-concept C2292 C2291) (define-primitive-concept C2293 C2291) (define-primitive-concept C2294 C2290) (define-primitive-concept C2295 C2294) (define-primitive-concept C2296 C2294) (define-primitive-concept C2297 C2294) (define-primitive-concept C2298 C2294) (define-primitive-concept C2299 C2294) (define-primitive-concept C2300 C2290) (define-primitive-concept C2301 C2300) (define-primitive-concept C2302 C2290) (define-primitive-concept C2303 C2302) (define-primitive-concept C2304 C2290) (define-primitive-concept C2305 C2290) (define-primitive-concept C2306 C2305) (define-primitive-concept C2307 C2305) (define-primitive-concept C2308 C2290) (define-primitive-concept C2309 C2290) (define-primitive-concept C2310 C2309) (define-primitive-concept C2311 C2309) (define-primitive-concept C2312 C2309) (define-primitive-concept C2313 C2290) (define-concept C2314 (AND C416 (SOME R282 (AND C119 (SOME R202 C1351))))) (define-concept C2315 (AND C416 (SOME R282 (AND C119 (SOME R202 C1358))))) (define-concept C2316 (AND C432 (SOME R276 (AND C1158 (SOME R202 C1372))))) (define-concept C2317 (AND C416 (SOME R276 (AND C1158 (SOME R202 C1372))))) (define-concept C2318 (AND C163 (SOME R128 C435))) (define-concept C2319 (AND C280 (SOME R94 C226) (SOME R100 C135))) (define-concept C2320 (AND C2319 (SOME R368 (AND C292 (SOME R202 C294))))) (define-concept C2321 (AND C2319 (SOME R368 (AND C292 (SOME R202 C294))) (SOME R398 (AND C14 (SOME R202 C1298))))) (define-concept C2322 (AND C2319 (SOME R368 (AND C292 (SOME R202 C294))) (SOME R398 (AND C14 (SOME R202 C19))))) (define-concept C2323 (AND C280 (SOME R96 C226) (SOME R100 C263))) (define-concept C2324 (AND C280 (SOME R96 C226) (SOME R100 C249))) (define-concept C2325 (AND C280 (SOME R96 C226) (SOME R100 C584))) (define-primitive-concept C2326 C273) (define-primitive-concept C2327 C1515) (define-primitive-concept C2328 C1515) (define-primitive-concept C2329 C1515) (define-primitive-concept C2330 C1515) (define-primitive-concept C2331 C1515) (define-primitive-concept C2332 C226) (define-primitive-concept C2333 C2332) (define-primitive-concept C2334 C2332) (define-primitive-concept C2335 C2332) (define-primitive-concept C2336 C2332) (define-primitive-concept C2337 C2332) (define-primitive-concept C2338 C2332) (define-primitive-concept C2339 C2332) (define-primitive-concept C2340 C2332) (define-primitive-concept C2341 C2332) (define-primitive-concept C2342 C2332) (define-primitive-concept C2343 C2332) (define-primitive-concept C2344 C2332) (define-primitive-concept C2345 C2332) (define-concept C2346 (AND C1149 (SOME R204 C72) (SOME R297 C341))) (define-concept C2347 (AND C1149 (SOME R210 C1255) (SOME R297 C341))) (define-concept C2348 (AND C1149 (SOME R210 C1257) (SOME R297 C341))) (define-concept C2349 (AND C280 (SOME R96 C99))) (define-concept C2350 (AND C280 (SOME R94 C59) (SOME R100 C273))) (define-concept C2351 (AND C280 (SOME R100 C273) (SOME R102 C62) (SOME R96 C99))) (define-concept C2352 (AND C1821 (SOME R133 C275))) (define-concept C2353 (AND C33 (SOME R133 C275))) (define-concept C2354 (AND C59 (SOME R133 C275))) (define-concept C2355 (AND C20 (SOME R133 C275))) (define-concept C2356 (AND C283 (SOME R387 C275))) (define-concept C2357 (AND C268 (SOME R173 (AND C174 (SOME R405 C272))))) (define-concept C2358 (AND C268 (SOME R173 (AND C174 (SOME R405 C272))) (SOME R202 C411))) (define-concept C2359 (AND C268 (SOME R173 (AND C174 (SOME R405 C272))) (SOME R202 C415))) (define-concept C2360 (AND C280 (SOME R102 C62) (SOME R100 C273) (SOME R96 C99) (SOME R366 (AND C29 (SOME R202 C31))) (SOME R134 (AND C273 (SOME R372 (AND C268 (SOME R173 (AND C174 (SOME R405 C272))) (SOME R202 C411))))))) (define-concept C2361 (AND C280 (SOME R102 C62) (SOME R100 C273) (SOME R96 C99) (SOME R366 (AND C29 (SOME R202 C31))) (SOME R134 (AND C272 (SOME R404 C173))))) (define-concept C2362 (AND C280 (SOME R102 C62) (SOME R100 C273) (SOME R96 C99) (SOME R366 (AND C29 (SOME R202 C31))))) (define-concept C2363 (AND C275 (SOME R34 (AND C280 (SOME R102 C62) (SOME R100 C273) (SOME R96 C99) (SOME R366 (AND C29 (SOME R202 C31))) (SOME R134 (AND C273 (SOME R372 (AND C268 (SOME R173 (AND C174 (SOME R405 C272))) (SOME R202 C411))))))))) (define-concept C2364 (AND C275 (SOME R34 (AND C280 (SOME R102 C62) (SOME R100 C273) (SOME R96 C99) (SOME R366 (AND C29 (SOME R202 C31))) (SOME R134 (AND C272 (SOME R404 C173))))))) (define-concept C2365 (AND C275 (SOME R364 (AND C1134 (SOME R202 C1320))))) (define-concept C2366 (AND C599 (SOME R29 C717))) (define-concept C2367 (AND C600 (SOME R29 C717))) (define-concept C2368 (AND C601 (SOME R29 C717))) (define-concept C2369 (AND C603 (SOME R25 C717))) (define-concept C2370 (AND C602 (SOME R25 C717))) (define-concept C2371 (AND C561 (SOME R25 C560))) (define-concept C2372 (AND C786 (SOME R25 C796))) (define-concept C2373 (AND C326 (SOME R51 C796))) (define-concept C2374 (AND C555 (SOME R29 (AND C997 (SOME R29 C796))))) (define-concept C2375 (AND C555 (SOME R29 (AND C997 (SOME R29 C560))))) (define-concept C2376 (AND C555 (SOME R29 (AND C997 (SOME R29 C645))))) (define-concept C2377 (AND C794 (SOME R91 C584))) (define-concept C2378 (AND C794 (SOME R91 C1866))) (define-concept C2379 (AND C794 (SOME R91 C964))) (define-concept C2380 (AND C788 (SOME R46 C432))) (define-concept C2381 (AND C788 (SOME R46 C78))) (define-concept C2382 (AND C788 (SOME R44 C1016))) (define-concept C2383 (AND C788 (SOME R44 C99))) (define-concept C2384 (AND C788 (SOME R44 C1510))) (define-concept C2385 (AND C1266 (SOME R203 (AND C1436 (SOME R350 C1418) (SOME R45 C788))))) (define-concept C2386 (AND C1266 (SOME R203 (AND C1436 (SOME R350 C1418) (SOME R45 (AND C59 (SOME R348 (AND C64 (SOME R202 C67))))))))) (define-concept C2387 (AND C280 (SOME R93 C558) (SOME R96 C788))) (define-concept C2388 (AND C2387 (SOME R100 C438) (SOME R102 C796))) (define-concept C2389 (AND C2378 (SOME R368 (AND C292 (SOME R202 C294))) (SOME R398 (AND C14 (SOME R202 C19))) (SOME R390 (AND C13 (SOME R204 C72))))) (define-concept C2390 (AND C2389 (SOME R136 C1926))) (define-concept C2391 (AND C440 (SOME R108 C558))) (define-concept C2392 (AND C440 (SOME R108 C560))) (define-concept C2393 (AND C440 (SOME R108 C796))) (define-concept C2394 (AND C174 (SOME R407 (AND C440 (SOME R108 C558))))) (define-concept C2395 (AND C1850 (SOME R108 C717))) (define-concept C2396 (AND C142 (SOME R135 C2395))) (define-concept C2397 (AND C2395 (SOME R134 C453))) (define-concept C2398 (AND C2395 (SOME R146 C1821))) (define-concept C2399 (AND C2396 (SOME R146 C416))) (define-concept C2400 (AND C2396 (SOME R146 C2128))) (define-concept C2401 (AND C1874 (SOME R108 C717))) (define-concept C2402 (AND C1850 (SOME R108 C782))) (define-concept C2403 (AND C1850 (SOME R108 C796))) (define-concept C2404 (AND C2403 (SOME R134 C142))) (define-concept C2405 (AND C2403 (SOME R134 C453))) (define-concept C2406 (AND C2403 (SOME R146 C1821))) (define-concept C2407 (AND C1850 (SOME R108 C798))) (define-concept C2408 (AND C1115 (SOME R194 C2388))) (define-concept C2409 (AND C2388 (SOME R368 (AND C292 (SOME R202 C1321))))) (define-concept C2410 (AND C2388 (SOME R370 (AND C1130 (SOME R212 C87))))) (define-concept C2411 (AND C2388 (SOME R370 (AND C1130 (SOME R212 C88))))) (define-concept C2412 (AND C2388 (SOME R390 (AND C13 (SOME R208 C1251))))) (define-concept C2413 (AND C795 (SOME R91 C2372) (SOME R368 (AND C292 (SOME R202 C1321))))) (define-concept C2414 (AND C2409 (SOME R136 (AND C1695 (SOME R96 C645))))) (define-concept C2415 (AND C147 (SOME R190 (AND C294 (SOME R203 (AND C292 (SOME R369 C2408))))) (SOME R190 (AND C174 (SOME R407 C2017))))) (define-concept C2416 (AND C139 (SOME R128 (AND C135 (SOME R107 C138))))) (define-concept C2417 (AND C820 (SOME R107 C138))) (define-concept C2418 (AND C139 (SOME R96 C820) (SOME R128 C2417))) (define-concept C2419 (AND C147 (SOME R190 (AND C294 (SOME R203 (AND C292 (SOME R369 C2414))))) (SOME R190 (AND C174 (SOME R407 C2417))))) (define-concept C2420 (AND C1479 (SOME R44 C1447) (SOME R44 C1453))) (define-concept C2421 (AND C1654 (SOME R129 (AND C1021 (SOME R154 C199))))) (define-concept C2422 (AND C329 (SOME R29 C591))) (define-concept C2423 (AND C329 (SOME R29 C135))) (define-concept C2424 (AND C324 (SOME R51 (AND C322 (SOME R268 (AND C42 (SOME R202 C117))))))) (define-concept C2425 (AND C1880 (SOME R25 C322) (SOME R48 C2424))) (define-concept C2426 (AND C1880 (SOME R25 C323) (SOME R48 C2424))) (define-concept C2427 (AND C582 (SOME R25 C322))) (define-concept C2428 (AND C1883 (SOME R19 C318) (SOME R163 (AND C975 (SOME R202 C1271))))) (define-concept C2429 (AND C1883 (SOME R19 C318) (SOME R163 (AND C975 (SOME R202 C977))))) (define-concept C2430 (AND C322 (SOME R95 C363))) (define-concept C2431 (AND C322 (SOME R95 C364))) (define-concept C2432 (AND C322 (SOME R95 (AND C321 (SOME R182 C100))))) (define-concept C2433 (AND C320 (SOME R383 (AND C321 (SOME R94 C322))))) (define-concept C2434 (AND C161 (SOME R107 C1025))) (define-concept C2435 (AND C2434 (SOME R52 (AND C62 (SOME R404 C173))))) (define-concept C2436 (AND C923 (SOME R19 C871))) (define-concept C2437 (AND C921 (SOME R19 C871))) (define-concept C2438 (AND C917 (SOME R19 C871))) (define-concept C2439 (AND C919 (SOME R63 C892) (SOME R19 C871))) (define-concept C2440 (AND C919 (SOME R63 C893) (SOME R19 C871))) (define-concept C2441 (AND C919 (SOME R63 C898) (SOME R19 C871))) (define-concept C2442 (AND C591 (SOME R19 C972))) (define-concept C2443 (AND C591 (SOME R19 C971))) (define-concept C2444 (AND C591 (SOME R19 C970))) (define-concept C2445 (AND C591 (SOME R24 C2443) (SOME R24 C2444) (SOME R24 C2442))) (define-concept C2446 (AND C921 (SOME R19 C873))) (define-concept C2447 (AND C923 (SOME R19 C868))) (define-concept C2448 (AND C921 (SOME R19 C868))) (define-concept C2449 (AND C918 (SOME R19 C868) (SOME R312 C356))) (define-concept C2450 (AND C918 (SOME R19 C868) (SOME R312 C574))) (define-concept C2451 (AND C917 (SOME R19 C868) (SOME R312 C356))) (define-concept C2452 (AND C917 (SOME R19 C868) (SOME R312 C574))) (define-concept C2453 (AND C923 (SOME R19 C869))) (define-concept C2454 (AND C921 (SOME R19 C869))) (define-concept C2455 (AND C919 (SOME R19 C869))) (define-concept C2456 (AND C923 (SOME R19 C870))) (define-concept C2457 (AND C921 (SOME R19 C870))) (define-concept C2458 (AND C917 (SOME R19 C358) (SOME R312 C356))) (define-concept C2459 (AND C917 (SOME R19 C358) (SOME R312 C574))) (define-concept C2460 (AND C918 (SOME R19 C358) (SOME R312 C356))) (define-concept C2461 (AND C918 (SOME R19 C358) (SOME R312 C574))) (define-concept C2462 (AND C597 (SOME R60 C595))) (define-concept C2463 (AND C597 (SOME R60 C596))) (define-concept C2464 (AND C582 (SOME R60 C2462) (SOME R62 C592))) (define-concept C2465 (AND C582 (SOME R60 C2463) (SOME R62 C592))) (define-concept C2466 (AND C582 (SOME R24 C2464) (SOME R24 C2465))) (define-concept C2467 (AND C919 (SOME R19 C358) (SOME R63 C988))) (define-concept C2468 (AND C591 (SOME R19 C359))) (define-concept C2469 (AND C591 (SOME R19 C592))) (define-concept C2470 (AND C322 (SOME R24 C2469) (SOME R24 C2442))) (define-concept C2471 (AND C593 (SOME R242 (AND C586 (SOME R208 C589) (SOME R174 C592))))) (define-concept C2472 (AND C575 (SOME R27 C322))) (define-concept C2473 (AND C582 (SOME R60 C580) (SOME R62 C581))) (define-concept C2474 (AND C1880 (SOME R25 C365) (SOME R48 C366))) (define-concept C2475 (AND C367 (SOME R21 C366))) (define-concept C2476 (AND C2475 (SOME R244 (AND C1154 (SOME R208 C1404) (SOME R174 C592))))) (define-concept C2477 (AND C365 (SOME R95 (AND C321 (SOME R382 (AND C320 (SOME R212 C88))))))) (define-concept C2478 (AND C320 (SOME R383 (AND C1078 (SOME R96 C365))))) (define-concept C2479 (AND C320 (SOME R383 (AND C1076 (SOME R96 C365))))) (define-concept C2480 (AND C320 (SOME R383 (AND C1075 (SOME R96 C365))))) (define-concept C2481 (AND C320 (SOME R383 (AND C1077 (SOME R96 C365))))) (define-concept C2482 (AND C320 (SOME R383 (AND C321 (SOME R96 C365))))) (define-concept C2483 (AND C1107 (SOME R96 C62))) (define-concept C2484 (AND C1031 (SOME R126 (AND C140 (SOME R338 C1178))) (SOME R128 (AND C140 (SOME R338 (AND C1178 (SOME R202 C1209))))))) (define-concept C2485 (AND C1031 (SOME R128 (AND C140 (SOME R338 (AND C1178 (SOME R202 C1204))))))) (define-concept C2486 (AND C1031 (SOME R128 (AND C140 (SOME R338 (AND C1178 (SOME R202 C1205))))))) (define-concept C2487 (AND C1031 (SOME R128 (AND C140 (SOME R338 (AND C1178 (SOME R202 C1207))))))) (define-concept C2488 (AND C1031 (SOME R128 (AND C140 (SOME R338 (AND C1178 (SOME R202 C1206))))))) (define-concept C2489 (AND C1031 (SOME R128 (AND C140 (SOME R338 (AND C1178 (SOME R202 C1208))))))) (define-concept C2490 (AND C1767 (SOME R150 C1612))) (define-concept C2491 (AND C1767 (SOME R150 C1624))) (define-concept C2492 (AND C1025 (SOME R34 C2490))) (define-concept C2493 (AND C1025 (SOME R34 C2491))) (define-concept C2494 (AND C1761 (SOME R94 C325))) (define-concept C2495 (AND C1766 (SOME R150 C1664))) (define-concept C2496 (AND C387 (SOME R151 C2493))) (define-primitive-concept C2497 (AND C235 (SOME R232 C184) (SOME R69 C238))) (define-primitive-concept C2498 (AND C235 (SOME R232 C184) (SOME R69 C238))) (define-primitive-concept C2499 (AND C235 (SOME R232 C184) (SOME R69 C723))) (define-primitive-concept C2500 (AND C235 (SOME R232 C184) (SOME R69 C727))) (define-primitive-concept C2501 (AND C235 (SOME R232 C184) (SOME R69 C727))) (define-primitive-concept C2502 (AND C235 (SOME R232 C184) (SOME R69 C736))) (define-primitive-concept C2503 (AND C235 C757 (SOME R232 C184))) (define-primitive-concept C2504 (AND C235 C757 (SOME R232 C184))) (define-primitive-concept C2505 (AND C235 (SOME R232 C184) (SOME R69 C770))) (define-primitive-concept C2506 (AND C235 (SOME R232 C184) (SOME R69 C2505))) (define-primitive-concept C2507 (AND C235 (SOME R232 C184) (SOME R79 C2505))) (define-primitive-concept C2508 (AND C235 (SOME R232 C184) (SOME R69 C770))) (define-primitive-concept C2509 (AND C235 (SOME R232 C184) (SOME R69 C770))) (define-primitive-concept C2510 (AND C235 (SOME R232 C112) (SOME R69 C709))) (define-primitive-concept C2511 (AND C235 (SOME R232 C112) (SOME R69 C709))) (define-primitive-concept C2512 (AND C250 (SOME R232 C184) (SOME R69 C950))) (define-primitive-concept C2513 (AND C250 (SOME R232 C112) (SOME R69 C951))) (define-primitive-concept C2514 (AND C250 (SOME R232 C112) (SOME R69 C951))) (define-primitive-concept C2515 (AND C250 (SOME R232 C112) (SOME R69 C956))) (define-primitive-concept C2516 (AND C250 (SOME R232 C112) (OR (ALL R310 (NOT C347)) (SOME R69 C348)) (OR (ALL R310 (NOT C349)) (SOME R69 C348)))) (define-primitive-concept C2517 (AND C250 (SOME R69 C377))) (define-primitive-concept C2518 (AND C250 (SOME R232 C112) (SOME R69 C352))) (define-primitive-concept C2519 (AND C250 (SOME R232 C112) (SOME R69 C377))) (define-primitive-concept C2520 (AND C250 (SOME R232 C112) (SOME R69 C377))) (define-concept C2521 (AND C1025 (SOME R94 C708))) (define-concept C2522 (AND C1679 (SOME R94 C561))) (define-concept C2523 (AND C1679 (SOME R94 C708))) (define-concept C2524 (AND C1064 (SOME R96 C68))) (define-primitive-concept C2525 C570) (define-concept C2526 (AND C965 (SOME R310 C349))) (define-concept C2527 (AND C968 (SOME R310 C349))) (define-concept C2528 (AND C966 (SOME R76 C2527) (SOME R78 C2526))) (define-concept C2529 (AND C966 (SOME R76 C2526) (SOME R78 C236))) (define-primitive-concept C2530 (AND C706 (SOME R268 (AND C42 (SOME R202 C117))) (SOME R17 C708) (SOME R25 C708) (SOME R16 C2526) (SOME R16 C2527) (SOME R16 C2528) (SOME R16 C2529) (SOME R24 C2526) (SOME R24 C2527))) (define-concept C2531 (AND C965 (SOME R310 C347))) (define-concept C2532 (AND C968 (SOME R310 C347))) (define-concept C2533 (AND C966 (SOME R76 C2532) (SOME R78 C2531))) (define-concept C2534 (AND C966 (SOME R76 C2531) (SOME R78 C937))) (define-primitive-concept C2535 (AND C706 (SOME R268 (AND C42 (SOME R202 C117))) (SOME R17 C708) (SOME R25 C708) (SOME R16 C2531) (SOME R16 C2532) (SOME R24 C2531) (SOME R24 C2532) (SOME R24 C2533) (SOME R24 C2534))) (define-primitive-concept C2536 (AND C598 (SOME R25 C708))) (define-primitive-concept C2537 (AND C966 C1596)) (define-primitive-concept C2538 C1589) (define-primitive-concept C2539 (AND C1850 (SOME R96 C707))) (define-primitive-concept C2540 C1850) (define-primitive-concept C2541 (AND C1850 (SOME R96 C989))) (define-primitive-concept C2542 C1850) (define-concept C2543 (AND C235 (SOME R232 C111))) (define-concept C2544 (AND C235 (SOME R232 C184))) (define-concept C2545 (AND C993 (SOME R29 C234))) (define-concept C2546 (AND C1910 (SOME R320 C343))) (define-concept C2547 (AND C1910 (SOME R320 C1392))) (define-concept C2548 (AND C1910 (SOME R320 C344))) (define-concept C2549 (AND C2546 (SOME R310 C347))) (define-concept C2550 (AND C2546 (SOME R310 C349))) (define-concept C2551 (AND C2547 (SOME R310 C347))) (define-concept C2552 (AND C2547 (SOME R310 C349))) (define-concept C2553 (AND C2548 (SOME R310 C347))) (define-concept C2554 (AND C2548 (SOME R310 C349))) (define-primitive-concept C2555 C1559) (define-primitive-concept C2556 C1559) (define-primitive-concept C2557 C1559) (define-primitive-concept C2558 C1559) (define-primitive-concept C2559 C1559) (define-primitive-concept C2560 C1559) (define-primitive-concept C2561 C1559) (define-primitive-concept C2562 C1559) (define-concept C2563 (AND C997 (SOME R29 C2526) (SOME R29 C2531))) (define-concept C2564 (AND C997 (SOME R29 C2527) (SOME R29 C2532))) (define-concept C2565 (AND C938 (SOME R310 C349))) (define-concept C2566 (AND C938 (SOME R310 C347))) (define-concept C2567 (AND C161 (SOME R49 C708) (SOME R49 C707))) (define-concept C2568 (AND C964 (SOME R92 C1074))) (define-concept C2569 (AND C2568 (SOME R19 C2563))) (define-concept C2570 (AND C2568 (SOME R19 C965))) (define-concept C2571 (AND C2568 (SOME R19 C2526))) (define-concept C2572 (AND C2568 (SOME R19 C2531))) (define-concept C2573 (AND C1074 (SOME R93 C964) (SOME R366 (AND C29 (SOME R202 C31))))) (define-concept C2574 (AND C1074 (SOME R93 C2571) (SOME R366 (AND C29 (SOME R202 C31))))) (define-concept C2575 (AND C1074 (SOME R93 C2572) (SOME R366 (AND C29 (SOME R202 C31))))) (define-concept C2576 (AND C997 (SOME R29 C234))) (define-concept C2577 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C191 (SOME R86 C606))))))) (define-concept C2578 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C191 (SOME R86 C708) (SOME R86 C606))))))) (define-concept C2579 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C191 (SOME R86 C708) (SOME R86 C606) (SOME R396 (AND C1141 (SOME R202 C1288))))))))) (define-concept C2580 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C191 (SOME R86 C708) (SOME R86 C606) (SOME R396 (AND C1141 (SOME R202 C1290))))))))) (define-concept C2581 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C191 (SOME R86 C708))))))) (define-concept C2582 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C1786 (SOME R133 C1783))))))) (define-concept C2583 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C1786 (SOME R133 C1783) (SOME R396 (AND C1141 (SOME R202 C1288))))))))) (define-concept C2584 (AND C1850 (SOME R94 C1910))) (define-concept C2585 (AND C1850 (SOME R96 C2550))) (define-concept C2586 (AND C1850 (SOME R96 C2552))) (define-concept C2587 (AND C1850 (SOME R96 C2554))) (define-concept C2588 (AND C1850 (SOME R96 C2549))) (define-concept C2589 (AND C1850 (SOME R96 C2551))) (define-concept C2590 (AND C1850 (SOME R96 C2553))) (define-concept C2591 (AND C1902 (SOME R108 (AND C234 (SOME R70 C606))))) (define-concept C2592 (AND C1561 (SOME R106 C606))) (define-concept C2593 (AND C1577 (SOME R76 C938) (SOME R78 C948))) (define-concept C2594 (AND C1089 (SOME R366 (AND C29 (SOME R202 C31))))) (define-concept C2595 (AND C147 (SOME R190 (AND C174 (SOME R407 C2594))))) (define-concept C2596 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C1089 (SOME R370 C1899))))))) (define-concept C2597 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C708 (SOME R272 (AND C89 (SOME R204 C819))))))))) (define-concept C2598 (AND C1575 (SOME R108 C708))) (define-concept C2599 (AND C1581 (SOME R108 C234))) (define-concept C2600 (AND C1581 (SOME R108 C938))) (define-concept C2601 (AND C1581 (SOME R108 C236))) (define-concept C2602 (AND C1581 (SOME R108 C708))) (define-concept C2603 (AND C1581 (SOME R108 C965))) (define-concept C2604 (AND C1581 (SOME R108 C968))) (define-concept C2605 (AND C1577 (SOME R108 C708))) (define-concept C2606 (AND C1843 (SOME R96 C964))) (define-concept C2607 (AND C1847 (SOME R96 C964))) (define-concept C2608 (AND C1025 (SOME R94 C966))) (define-concept C2609 (AND C1679 (SOME R94 C966))) (define-concept C2610 (AND C2594 (SOME R141 C2521))) (define-concept C2611 (AND C2594 (SOME R141 C2537))) (define-concept C2612 (AND C2594 (SOME R141 C2523))) (define-concept C2613 (AND C2594 (SOME R141 C2609))) (define-concept C2614 (AND C1845 (SOME R96 C708))) (define-concept C2615 (AND C1845 (SOME R96 C965))) (define-concept C2616 (AND C1845 (SOME R96 C968))) (define-concept C2617 (AND C1845 (SOME R96 C613))) (define-concept C2618 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C1748 (SOME R178 C25))))))) (define-concept C2619 (AND C1575 (SOME R108 C2536))) (define-concept C2620 (AND C1575 (SOME R108 C1748))) (define-concept C2621 (AND C1846 (SOME R96 C1748))) (define-concept C2622 (AND C1843 (SOME R94 C1748))) (define-concept C2623 (AND C1537 (SOME R108 C1748))) (define-concept C2624 (AND C1749 (SOME R93 C1748) (SOME R366 (AND C29 (SOME R202 C31))))) (define-concept C2625 (AND C1749 (SOME R93 C1748) (SOME R368 (AND C292 (SOME R202 C1321))))) (define-concept C2626 (AND C1849 (SOME R96 C1748) (SOME R396 (AND C1141 (SOME R202 C1288))))) (define-concept C2627 (AND C2539 (SOME R128 C1572))) (define-concept C2628 (AND C2539 (SOME R138 (AND C1760 (SOME R96 C708))))) (define-concept C2629 (AND C2539 (SOME R396 (AND C1141 (SOME R202 C1290))))) (define-concept C2630 (AND C2539 (SOME R396 (AND C1141 (SOME R202 C1288))))) (define-concept C2631 (AND C2541 (SOME R396 (AND C1141 (SOME R202 C1288))))) (define-concept C2632 (AND C2541 (SOME R396 (AND C1141 (SOME R202 C1289))))) (define-concept C2633 (AND C2541 (SOME R134 C142))) (define-concept C2634 (AND C2541 (SOME R134 (AND C142 (SOME R146 C416))))) (define-concept C2635 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C584 (SOME R178 C25))))))) (define-concept C2636 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C964 (SOME R178 C25))))))) (define-concept C2637 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C68 (SOME R53 C249) (SOME R354 (AND C1163 (SOME R204 C72))))))))) (define-concept C2638 (AND C1163 (SOME R355 (AND C68 (SOME R53 C249))) (SOME R204 C72))) (define-concept C2639 (AND C2594 (SOME R138 C2638))) (define-concept C2640 (AND C2594 (SOME R93 C2530))) (define-concept C2641 (AND C2594 (SOME R93 C2535))) (define-concept C2642 (AND C2641 (SOME R129 C2640))) (define-concept C2643 (AND C1786 (SOME R138 C1098))) (define-concept C2644 (AND C2567 (SOME R52 C62))) (define-concept C2645 (AND C147 (SOME R190 (AND C174 (SOME R407 C1589))))) (define-concept C2646 (AND C1589 (SOME R136 C1557))) (define-concept C2647 (AND C1589 (SOME R396 (AND C1141 (SOME R202 C1288))))) (define-concept C2648 (AND C1589 (SOME R396 (AND C1141 (SOME R202 C1290))))) (define-concept C2649 (AND C1589 (SOME R133 C191))) (define-concept C2650 (AND C1786 (SOME R134 C1589))) (define-concept C2651 (AND C1784 (SOME R134 C1589))) (define-concept C2652 (AND C191 (SOME R86 C717) (SOME R86 C708) (SOME R133 C1589))) (define-concept C2653 (AND C1786 (SOME R139 C1588))) (define-concept C2654 (AND C1786 (SOME R139 (AND C1588 (SOME R396 (AND C1141 (SOME R202 C1288))))))) (define-concept C2655 (AND C1786 (SOME R139 (AND C1588 (SOME R396 (AND C1141 (SOME R202 C1290))))))) (define-concept C2656 (AND C1558 (SOME R106 C964))) (define-concept C2657 (AND C1588 (SOME R96 C964))) (define-concept C2658 (AND C1561 (SOME R108 C964))) (define-concept C2659 (AND C1849 (SOME R96 C964))) (define-concept C2660 (AND C2658 (SOME R396 (AND C1141 (SOME R202 C1288))))) (define-concept C2661 (AND C2660 (SOME R110 C2561) (SOME R110 C2558))) (define-concept C2662 (AND C2660 (SOME R110 C2558) (SOME R110 C2563))) (define-concept C2663 (AND C2660 (SOME R110 C1560) (SOME R320 C343))) (define-concept C2664 (AND C1561 (SOME R110 (AND C989 (SOME R29 (AND C1559 (SOME R29 C2526))))))) (define-concept C2665 (AND C1588 (SOME R96 (AND C989 (SOME R29 (AND C1559 (SOME R29 C2526))))))) (define-concept C2666 (AND C2659 (SOME R392 (AND C1140 (SOME R202 C1301))))) (define-concept C2667 (AND C147 (SOME R190 (AND C174 (SOME R407 (AND C1885 (SOME R139 C2666))))))) (define-concept C2668 (AND C1117 (SOME R139 C2657) (SOME R194 C2657))) (define-concept C2669 (AND C1567 (SOME R110 C2545))) (define-concept C2670 (AND C1885 (SOME R128 C2669))) (define-concept C2671 (AND C2670 (SOME R94 C927))) (define-concept C2672 (AND C32 (SOME R128 C1576))) (define-concept C2673 (AND C32 (SOME R128 C1565))) (define-concept C2674 (AND C32 (SOME R128 C1564))) (define-concept C2675 (AND C32 (SOME R128 C1575))) (define-concept C2676 (AND C32 (SOME R128 C1563))) (define-concept C2677 (AND C191 (SOME R86 C255))) (define-concept C2678 (AND C1842 (SOME R51 C620))) (define-primitive-concept C2679 (AND C216 (SOME R24 C232))) (define-concept C2680 (AND C280 (SOME R93 C254))) (define-concept C2681 (AND C260 (SOME R96 C1008) (SOME R91 C263))) (define-concept C2682 (AND C1565 (SOME R108 C232) (SOME R146 C1509))) (define-concept C2683 (AND C32 (SOME R128 C1570))) (define-concept C2684 (AND C1566 (SOME R108 C762))) (define-concept C2685 (AND C32 (SOME R128 C2684))) (define-concept C2686 (AND C1566 (SOME R108 C263))) (define-concept C2687 (AND C2680 (SOME R368 (AND C292 (SOME R202 C1321))))) (define-concept C2688 (AND C1321 (SOME R203 (AND C292 (SOME R369 C2680))))) (define-concept C2689 (AND C135 (SOME R137 C2687))) (define-concept C2690 (AND C553 (SOME R93 C778) (SOME R368 (AND C292 (SOME R202 C1321))))) (define-concept C2691 (AND C553 (SOME R93 C778) (SOME R368 (AND C292 (SOME R202 C1321))) (SOME R178 C25))) (define-concept C2692 (AND C294 (SOME R203 (AND C292 (SOME R369 (AND C553 (SOME R93 C778))))))) (define-concept C2693 (AND C1321 (SOME R203 (AND C292 (SOME R369 (AND C553 (SOME R93 C778))))))) (define-concept C2694 (AND C175 (SOME R160 C1578))) (define-concept C2695 (AND C32 (SOME R128 C2694))) (define-concept C2696 (AND C175 (SOME R160 C1553))) (define-concept C2697 (AND C32 (SOME R128 C2696))) (define-concept C2698 (AND C32 (SOME R128 C1550))) (define-concept C2699 (AND C231 (SOME R178 C25))) (define-concept C2700 (AND C16 (SOME R203 (AND C11 (SOME R201 (AND C231 (SOME R178 C25))))))) (define-concept C2701 (AND C997 (SOME R29 C263))) (define-concept C2702 (AND C997 (SOME R29 C761))) (define-concept C2703 (AND C997 (SOME R29 C258))) (define-concept C2704 (AND C997 (SOME R29 C777))) (define-concept C2705 (AND C555 (SOME R29 (AND C997 (SOME R29 C263))))) (define-concept C2706 (AND C1565 (SOME R108 C263))) (define-concept C2707 (AND C1565 (SOME R108 C777))) (define-concept C2708 (AND C1564 (SOME R108 C263))) (define-concept C2709 (AND C1566 (SOME R108 C761))) (define-concept C2710 (AND C1566 (SOME R108 C258))) (define-concept C2711 (AND C1850 (SOME R128 C2686))) (define-concept C2712 (AND C1850 (SOME R128 C2709))) (define-concept C2713 (AND C1850 (SOME R128 C2710))) (define-concept C2714 (AND C2711 (SOME R396 (AND C1141 (SOME R202 C1288))))) (define-concept C2715 (AND C2711 (SOME R396 (AND C1141 (SOME R202 C1290))))) (define-concept C2716 (AND C138 (SOME R108 C555))) (define-concept C2717 (AND C138 (SOME R108 C2705))) (define-concept C2718 (AND C1568 (SOME R108 C555))) (define-concept C2719 (AND C1568 (SOME R108 C2705))) (define-concept C2720 (AND C1587 (SOME R108 C2701))) (define-concept C2721 (AND C1587 (SOME R108 C2702))) (define-concept C2722 (AND C1576 (SOME R108 C2701))) (define-concept C2723 (AND C1576 (SOME R108 C2704))) (define-concept C2724 (AND C2706 (SOME R396 (AND C1141 (SOME R202 C1288))))) (define-concept C2725 (AND C2706 (SOME R396 (AND C1141 (SOME R202 C1290))))) (define-concept C2726 (AND C2708 (SOME R396 (AND C1141 (SOME R202 C1288))))) (define-concept C2727 (AND C2711 (SOME R143 (AND C1103 (SOME R94 (AND C1486 (SOME R166 C1420))))))) (define-primitive-concept C2728 C2711)
213,723
Common Lisp
.lisp
3,987
44.454979
111
0.639885
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
51ac5656da39400b042de82d55cca240aad257b9eb87578eed5d5bb402d60106
12,585
[ -1 ]
12,586
timeout.lisp
lambdamikel_DLMAPS/src/prover/dl-benchmark-suite/timeout.lisp
;;;-*- Mode: Lisp; Package: COMMON-LISP-USER -*- (in-package :cl-user) (defmacro with-timeout ((seconds . timeout-forms) &body body) #+:ALLEGRO `(mp:with-timeout (,seconds . ,timeout-forms) ,@body) #+:MCL `(with-timeout-1 ,seconds #'(lambda () ,@timeout-forms) #'(lambda () ,@body))) (defmacro with-timeout ((seconds . timeout-forms) &body body) #+:ALLEGRO `(let ((timeout-fn #'(lambda () ,@timeout-forms))) (unwind-protect (restart-case (mp:with-timeout (,seconds . (funcall timeout-fn)) ,@body) (abort-execution () :report (lambda (stream) (format stream "Abort execution as timeout")) (funcall timeout-fn))))) #+:MCL `(with-timeout-1 ,seconds #'(lambda () ,@timeout-forms) #'(lambda () ,@body))) #+:MCL (defun with-timeout-1 (seconds timeout-fn body-fn) (let* ((tag 'tag-1) (current-process *current-process*) (timeout-process (process-run-function (format nil "Timeout ~D" (round seconds)) #'(lambda () (sleep (round seconds)) (process-interrupt current-process #'(lambda () (throw tag (funcall timeout-fn)))))))) (catch tag (unwind-protect (restart-case (funcall body-fn) (abort-execution () :report (lambda (stream) (format stream "Abort execution as timeout")) (funcall timeout-fn))) (process-kill timeout-process))))) #+:ALLEGRO (let ((elapsed-gc-time-user 0) (elapsed-gc-time-system 0) (elapsed-run-time-user 0) (elapsed-run-time-system 0) (elapsed-real-time 0) (used-cons-cells 0) (used-symbols 0) (used-other-bytes 0)) (defun set-time-vars (pelapsed-gc-time-user pelapsed-gc-time-system pelapsed-run-time-user pelapsed-run-time-system pelapsed-real-time pused-cons-cells pused-symbols pused-other-bytes) (setf elapsed-gc-time-user pelapsed-gc-time-user) (setf elapsed-gc-time-system pelapsed-gc-time-system) (setf elapsed-run-time-user pelapsed-run-time-user) (setf elapsed-run-time-system pelapsed-run-time-system) (setf elapsed-real-time pelapsed-real-time) (setf used-cons-cells pused-cons-cells) (setf used-symbols pused-symbols) (setf used-other-bytes pused-other-bytes)) (defun gctime () (+ elapsed-gc-time-user elapsed-gc-time-system)) (defun total-bytes-allocated () (+ (* 8 used-cons-cells) (* 64 used-symbols) used-other-bytes))) #+:MCL (defun total-bytes-allocated () (ccl::total-bytes-allocated)) (let (#+:mcl initial-gc-time #+:mcl initial-consed initial-real-time initial-run-time) #+:mcl (defun with-timed-form (thunk) (setf initial-gc-time (gctime)) (setf initial-consed (total-bytes-allocated)) (setf initial-real-time (get-internal-real-time)) (setf initial-run-time (get-internal-run-time)) (let* ((result (funcall thunk)) (elapsed-real-time (/ (- (get-internal-real-time) initial-real-time) internal-time-units-per-second)) (elapsed-run-time (/ (- (get-internal-run-time) initial-run-time) internal-time-units-per-second)) (elapsed-mf-time (max 0 (- elapsed-real-time elapsed-run-time))) (elapsed-gc-time (/ (- (gctime) initial-gc-time) internal-time-units-per-second)) (bytes-consed (- (total-bytes-allocated) initial-consed (if (fixnump initial-consed) 0 16)))) (values result elapsed-run-time elapsed-real-time elapsed-mf-time elapsed-gc-time bytes-consed))) #+:ALLEGRO (defun with-timed-form (thunk) (setf initial-real-time (get-internal-real-time)) (setf initial-run-time (get-internal-run-time)) (let* ((result (excl::time-a-funcall thunk #'set-time-vars)) (elapsed-real-time (/ (- (get-internal-real-time) initial-real-time) internal-time-units-per-second)) (elapsed-run-time (/ (- (get-internal-run-time) initial-run-time) internal-time-units-per-second)) (elapsed-mf-time (max 0 (- elapsed-real-time elapsed-run-time))) (elapsed-gc-time (/ (gctime) internal-time-units-per-second)) (bytes-consed (total-bytes-allocated))) (values result elapsed-run-time elapsed-real-time elapsed-mf-time elapsed-gc-time (abs bytes-consed)))) #+:mcl (defun timed-out-handler () (let* ((elapsed-real-time (/ (- (get-internal-real-time) initial-real-time) internal-time-units-per-second)) (elapsed-run-time (/ (- (get-internal-run-time) initial-run-time) internal-time-units-per-second)) (elapsed-mf-time (max 0 (- elapsed-real-time elapsed-run-time))) (elapsed-gc-time (/ (- (gctime) initial-gc-time) internal-time-units-per-second)) (bytes-consed (- (total-bytes-allocated) initial-consed (if (fixnump initial-consed) 0 16)))) (values '(?) elapsed-run-time elapsed-real-time elapsed-mf-time elapsed-gc-time bytes-consed))) #+:ALLEGRO (defun timed-out-handler () (let* ((elapsed-real-time (/ (- (get-internal-real-time) initial-real-time) internal-time-units-per-second)) (elapsed-run-time (/ (- (get-internal-run-time) initial-run-time) internal-time-units-per-second)) (elapsed-mf-time (max 0 (- elapsed-real-time elapsed-run-time))) (elapsed-gc-time (/ (gctime) internal-time-units-per-second)) (bytes-consed (total-bytes-allocated))) (values '(?) elapsed-run-time elapsed-real-time elapsed-mf-time elapsed-gc-time (abs bytes-consed)))))
6,349
Common Lisp
.lisp
134
35.291045
80
0.568564
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
5945f744d209b12351e02072c1249a0da71c7a36a94ef76f93e46c4f356f2b5f
12,586
[ -1 ]
12,587
fact-tests.lisp
lambdamikel_DLMAPS/src/prover/dl-benchmark-suite/fact-tests.lisp
;;;-*- Mode: Lisp; Package: CL-USER -*- (in-package "CL-USER") (setf (logical-pathname-translations "dl-test") (list (list "**;*.*.*" (concatenate 'string #+:mswindows (pathname-device (truename *load-pathname*)) #+:mswindows ":" (directory-namestring (truename *load-pathname*)) #+:mcl "**:*.*" #+:unix "**/*.*" #+:mswindows "**\\*.*")))) #+:MCL (load "dl-test:timeout") (load "dl-test:FaCT-1-11;FaCT") ;;; Initialise/set any required parameters: (reset-verbosity) ;;; Name of the DL system: (defconstant *system-name* "FaCT") ;;; Keywords from concept syntax which correspond to KRSS keywords ;;; top, bottom, and, or, not, some, all: (defconstant *concept-syntax* '(*top* *bottom* and or not some all nil nil nil)) ;;; KRSS style macros for Tbox and Abox definitions: ;;; Macro for primitive concept definitions: (defmacro define-primitive-concept (name &optional (definition nil)) `(defprimconcept ,name ,definition)) ;;; Macro for non-primitive concept definitions: (defmacro define-concept (name definition) `(defconcept ,name ,definition)) ;;; Macro for primitive role definitions: (defmacro define-primitive-role (name &key (parents nil) (transitive nil)) `(defprimrole ,name :parents ,(if (listp parents) parents (list parents)) :transitive ,transitive)) ;;; Macro for primitive attribute definitions: (defmacro define-primitive-attribute (name &key (parents nil)) `(defprimattribute ,name :parents ,parents)) ;;; Macro for instance assertions: (defmacro instance (name concept) (declare (ignore name concept))) ;;; Macro for relationship assertions: (defmacro related (name concept role) (declare (ignore name concept role))) ;;; Macro to query instantiation: (defmacro individual-instance? (name concept) (declare (ignore name concept))) ;;; Functions for interacting with Tbox and Abox ;;; Function to initialise KB: (defun *initialise-kb* (&optional (filename nil)) (declare (ignore filename)) (init-tkb)) ;;; Function to classify KB: (defun *classify-kb* () (classify-all-concepts)) ;;; Function to test the coherence of a concept in a classified KB: (defun *test-coherent* (concept) (satisfiable concept)) ;;; Function to test the coherence of a concept expression without ;;; reference to a KB: (defun *test-concept* (concept) (alc-concept-coherent concept)) (defun name-filter (concept) (let ((name (name concept))) (cond ((eq name '*top*) 'top) ((eq name '*bottom*) 'bottom) (t name)))) ;;; Function to return the direct subsumers of a concept: (defun *direct-supers* (concept) (let ((concept (cond ((eq concept 'top) '*top*) ((eq concept 'bottom) '*bottom*) (t concept)))) (mapcar #'name-filter (direct-supers concept)))) ;;; Function to return the direct subsumers of a concept: (defun *direct-subs* (concept) (let ((concept (cond ((eq concept 'top) '*top*) ((eq concept 'bottom) '*bottom*) (t concept)))) (mapcar #'name-filter (direct-subs concept)))) ;;; Function to initialise abox (defun *initialise-abox* ()) ;;; Function to perform abox inferences (if required): (defun *classify-akb* ()) ;;; Timeout for T98 KB tests: (defconstant *kb-timeout* 500) ;;; Timeout for T98 sat tests: (defconstant *sat-timeout* 100) ;;; Timeout for appn KB tests: (defconstant *appn-timeout* 10000) ;;; Timeout for T98 abox tests: (defconstant *abox-timeout* 500) ;;;********************************************************* ;;; Load the generic test code: (load "dl-test:dl-tests") ;;;********************************************************* ;;; Run the tests: (defun run-dl-tests () (kb-tests *t98-kb-files*) (sat-tests *t98-con-files*) (appn-tests *appn-kb-files*) (synth-kb-tests *synth-kb-files*) ;(rand-kb-tests *random-kb-files*) ;(abox-tests *t98-abox-files*) )
4,338
Common Lisp
.lisp
108
33.046296
80
0.600048
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
bbfbbf50ecdabd990c8f78c055cbf3371e714db84cfda6722259d30d09ae3d11
12,587
[ -1 ]
12,588
dl-tests.lisp
lambdamikel_DLMAPS/src/prover/dl-benchmark-suite/dl-tests.lisp
;;;-*- Mode: Lisp; Package: CL-USER -*- (in-package "CL-USER") (defun normalize (pathname) "ALC5-windows needs this #@!?. It cannot deal with underlines in logical pathnames." (string-downcase (namestring (translate-logical-pathname pathname)))) ;;; Directory for T98 KB data files: (defparameter *kb-data-dir* (normalize "dl-test:Data;T98-kb;")) ;;; Directory for T98 satisfiability test data files: (defparameter *sat-data-dir* (normalize "dl-test:Data;T98-sat;")) ;;; Directory for application KB data files: (defparameter *appn-data-dir* (normalize "dl-test:Data;Appn-kb;")) ;;; Directory for synthetic KB data files: (defparameter *synth-data-dir* (normalize "dl-test:Data;DFKI-synthetic;")) ;;; Directory for random KB data files: (defparameter *random-data-dir* (normalize "dl-test:Data;DFKI-random;")) ;;; Directory for T98 AKB data files: (defparameter *abox-data-dir* (normalize "dl-test:Data;T98-abox;")) ;;; Directory for results files: (defparameter *results-dir* (normalize "dl-test:Results;")) ;;; Directory for new DL AKB data files: (defparameter *new-abox-data-dir* (normalize "dl-test:Data;DL-abox;")) (defvar *if*) ;;; ;;; ;;; (defmacro myopen (name &rest args) `(open (normalize ,name) ,@args)) (defmacro myeval (expr) `(let ((expr (tools:change-package-of-description ,expr :prover nil nil))) (eval expr))) ;;; ;;; ;;; (defparameter *krss-syntax* '(top bottom and or not some all at-least at-most exactly)) (defparameter *syntax-map* (pairlis *krss-syntax* *concept-syntax*)) (defparameter *t98-kb-files* '( "k_branch" "k_d4" "k_dum" "k_grz" "k_lin" "k_path" "k_ph" "k_poly" "k_t4p")) (defparameter *t98-con-files* '("k_branch" "k_d4" "k_dum" "k_grz" "k_lin" "k_path" "k_ph" "k_poly" "k_t4p")) (defparameter *appn-kb-files* '("galen2" "galen1" "galen")) (defparameter *synth-kb-files* '( "hc14" "hc18" "hc112" "hc24" "hc28" "hc212" "hc34" "hc36" "hc38" "hc44" "hc48" "hc412" )) (defparameter *random-kb-files* '( "kris151" "kris301" "kris451" "kris601" "kris751" "kris901" "kris1051" "kris1201" "kris1351" "kris1501" "kris2001" "kris4001" "kris6001" "kris8001" "kris10001" "kris12001" "kris14001" "kris16001" "kris18001" "kris20001" "kris25001" "kris30001" "kris35001" "kris40001" "kris45001" "kris50001")) (defparameter *t98-abox-files* '("k_branch_n" "k_d4_n" "k_dum_n" "k_grz_n" "k_lin_n" "k_path_n" "k_ph_n" "k_poly_n" "k_t4p_n" )) (defparameter *hard-appn-kb-files* '("galen2" "galen1" "galen" "espr-gcis" "wisber-gcis" "ckb-gcis" "fss-gcis" "bike1" "bike2" "bike3" )) (defparameter *new-appn-kb-files* (append '("ckb-roles" "datamont-roles" "espr-roles" "fss-roles" ;"stereo-roles" "wisber-roles" "wines") *hard-appn-kb-files*)) (defmacro time-bound (seconds expression) `(with-timeout ((* 1.0 ,seconds) . ('*timed-out*)) ,expression)) (defun translate-concept-syntax (c) (cond ((listp c) (case (car c) ((and or) (cons (cdr (assoc (car c) *syntax-map*)) (mapcar #'translate-concept-syntax (cdr c)))) ((some all) (cons (cdr (assoc (car c) *syntax-map*)) (cons (second c) (mapcar #'translate-concept-syntax (cddr c))))) (not (list (cdr (assoc (car c) *syntax-map*)) (translate-concept-syntax (second c)))) (at-least (let ((trans (cdr (assoc (car c) *syntax-map*)))) (if (null trans) `(some ,(third c) *top*) (list trans (second c) (third c))))) (at-most (let ((trans (cdr (assoc (car c) *syntax-map*)))) (if (null trans) (if (zerop (second c)) `(all ,(third c) *bottom*) '*top*) (list trans (second c) (third c))))) (exactly (let ((trans (cdr (assoc (car c) *syntax-map*)))) (if (null trans) `(some ,(third c) *top*) (list trans (second c) (third c))))) (T (error "Concept ~S doesn't seem to be KRSS syntax" c)))) ((or (eq c 'top) (eq c 'bottom)) (cdr (assoc c *syntax-map*))) (T c))) (defun test-kb (kb &key (test t) (timeout *kb-timeout*) (filename nil)) (*initialise-kb* filename) (let ((c-count 0)) (dolist (s kb) (ecase (car s) ((DEFINE-PRIMITIVE-ROLE DEFINE-PRIMITIVE-ATTRIBUTE)) (DEFINE-PRIMITIVE-CONCEPT (incf c-count) (if (third s) (rplaca (cddr s) (translate-concept-syntax (third s))))) (DEFINE-CONCEPT (incf c-count) (rplaca (cddr s) (translate-concept-syntax (third s)))) (DEFINE-DISJOINT-PRIMITIVE-CONCEPT (incf c-count) (rplaca (cdddr s) (translate-concept-syntax (fourth s)))) (IMPLIES (rplaca (cdr s) (translate-concept-syntax (second s))) (rplaca (cddr s) (translate-concept-syntax (third s)))))) (let* ((start-time (get-internal-run-time)) (res (time-bound timeout (progn (dolist (s kb) (myeval s)) (*classify-kb*)))) (deltat (/ (- (get-internal-run-time) start-time) internal-time-units-per-second))) (if (eq res '*timed-out*) (values '*timed-out* c-count nil) (values deltat c-count (if test (*test-coherent* 'prover::test))))))) (defun run-kb-test (testfile &key (timeout *kb-timeout*) (prov nil) (start 1)) (let ((*if* (myopen testfile :direction :input)) (max-n 0) (test-n 0) (max-time 0) (correct T) (max-c 0)) (unwind-protect (progn (loop repeat (1- start) do (incf test-n) (read *if* nil nil)) (loop (let ((kb (read *if* nil nil))) (when (null kb) (return)) (incf test-n) (when (or (not *max-kb*) (< test-n *max-kb*)) (format t "Testing ~A KB ~D..." testfile test-n) (multiple-value-bind (deltat c-count coherent) (test-kb kb :timeout timeout) (when (and (not (eq deltat '*timed-out*)) (or (and prov coherent) (and (not prov) (not coherent)))) (format t "PROBLEMI!! - concept TEST should be ~A~%" (if prov "incoherent" "coherent")) (setf correct nil) (break) (return)) (if (eq deltat '*timed-out*) (progn (format t "TIMED OUT~%") (return)) (progn (format t "OK - test took ~,2Fs~%" deltat) (if (<= deltat *kb-timeout*) (progn (setf max-n test-n) (setf max-c c-count) (setf max-time deltat)) (return))))))) ;(break) )) (close *if*)) (values max-n max-c correct max-time))) ;;;************************************************************************** (defun test-con (con &key (timeout *sat-timeout*)) (setf con (translate-concept-syntax con)) (let* ((start-time (get-internal-run-time)) (res (time-bound timeout (*test-concept* con))) (deltat (/ (- (get-internal-run-time) start-time) internal-time-units-per-second))) (if (eq res '*timed-out*) (values '*timed-out* nil) (values deltat res)))) (defun run-sat-test (testfile &key (timeout *sat-timeout*) (prov nil) (start 1)) (declare (ignore timeout)) (let ((*if* (myopen testfile :direction :input)) (max-n 0) (test-n 0) (max-time 0) (correct T)) (unwind-protect (progn (loop repeat (1- start) do (incf test-n) (read *if* nil nil)) (loop (let ((con (read *if* nil nil))) (when (null con) (return)) (incf test-n) (format t "Testing ~A concept ~D..." testfile test-n) (multiple-value-bind (deltat coherent) (test-con con) (when (and (not (eq deltat '*timed-out*)) (or (and prov coherent) (and (not prov) (not coherent)))) (format t "PROBLEMI!! - concept ~S should be ~A~%" con (if prov "incoherent" "coherent")) (break) (setf correct nil) (return)) (if (eq deltat '*timed-out*) (progn (format t "TIMED OUT~%") (return)) (progn (format t "OK - test took ~,2Fs~%" deltat) (if (<= deltat *sat-timeout*) (progn (setf max-n test-n) (setf max-time deltat)) (return)))))))) (close *if*)) (values max-n correct max-time))) ;;;************************************************************************** (let (#+:mcl (ccl:*warn-if-redefine* nil) #+:allegro (excl:*redefinition-warnings* nil) ) (defun safe-set-xor-test (set-1 set-2) (cond ((symbolp set-1) (if (listp set-2) (member set-1 set-2) (eql set-1 set-2))) ((symbolp set-2) (if (listp set-1) (member set-2 set-1) (eql set-1 set-2))) (t (null (set-exclusive-or set-1 set-2))))) ) (defun check-classified-kb (testfile) (let ((*if* (myopen (concatenate 'string testfile ".tree") :direction :input))) (unwind-protect (loop (let ((s (read *if* nil nil))) (if (null s) (return (values T nil))) (let* ((first-s (if (consp (first s)) (first (first s)) (first s))) (supers (*direct-supers* first-s)) (subs (*direct-subs* first-s))) (if (or (set-exclusive-or supers (second s) :test #'safe-set-xor-test) (and (third s) (set-exclusive-or subs (third s) :test #'safe-set-xor-test))) (progn #+:MCL (break) (format t "~%*** Mismatch: Concept: ~S Supers: ~S Subs: ~S File: ~S~%" first-s supers subs s) (break) (return (values nil (first s)))))))) (close *if*)))) (defun run-appn-test (testfile &key (timeout *appn-timeout*) (check T)) (let ((*if* (myopen (concatenate 'string testfile ".tkb") :direction :input)) (kb nil)) (unwind-protect (progn (format t "Testing ~A..." testfile) (loop (let ((s (read *if* nil nil))) (when (null s) (return)) (setf kb (cons s kb))))) (close *if*)) (setf kb (nreverse kb)) (multiple-value-bind (deltat c-count coherent) (test-kb kb :test nil :timeout timeout :filename testfile) (if (not (eq deltat '*timed-out*)) (progn (format t "OK - test took ~,2Fs~%" deltat) ;(break) (if check (progn (format t " Testing concept hierarchy...") (multiple-value-bind (correct c-prob) (check-classified-kb testfile) (setf coherent correct) (if coherent (format t "OK~%") (progn (format t "PROBLEMI!! - classification errors for ~A~%" c-prob) (break) )) (values (format nil "~9,2F" deltat) c-count (if correct "Y" "N")))) (values (format nil "~9,2F" deltat) c-count "?"))) (progn (format t "TIMED OUT~%") (values (format nil ">~9,2F" timeout) c-count "?")))))) ;;;************************************************************************** (defun test-akb-correct (akb) (do ((q akb (cdr q)) (x nil (car q)) (correct T (myeval (car q)))) ((or (endp q) (not correct)) (if (not correct) (cdr x))))) #| (defun test-akb (akb retrieval &key (test t) (timeout *abox-timeout*)) (*initialise-abox*) (let ((i-count 0)) (dolist (s (first akb)) (case (car s) (INSTANCE (incf i-count) (rplaca (cddr s) (translate-concept-syntax (third s)))) (RELATED (rplaca (cddr s) (translate-concept-syntax (third s)))))) (let* ((start-time (get-internal-run-time)) (res (time-bound timeout (progn (dolist (s (first akb)) (eval s)) (*classify-akb*)))) (deltat (/ (- (get-internal-run-time) start-time) internal-time-units-per-second))) (if (eq res '*timed-out*) (values '*timed-out* i-count nil) (values deltat i-count (if test (test-akb-correct retrieval))))))) (defun test-akb (akb retrieval &key (test t) (timeout *abox-timeout*)) (*initialise-abox*) (let ((i-count 0)) (dolist (s akb) (case (car s) (INSTANCE (incf i-count) (rplaca (cddr s) (translate-concept-syntax (third s)))) (RELATED (rplaca (cddr s) (translate-concept-syntax (third s)))))) (let* ((start-time (get-internal-run-time)) (res (time-bound timeout (progn (dolist (s akb) (eval s)) (*classify-akb*)))) (deltat (/ (- (get-internal-run-time) start-time) internal-time-units-per-second))) (if (eq res '*timed-out*) (values '*timed-out* i-count nil) (values deltat i-count (if test (test-akb-correct retrieval))))))) |# (defun test-akb (akb retrieval &key (test t) (timeout *abox-timeout*)) (*initialise-abox*) (let ((i-count 0) (inds nil)) (dolist (s akb) (case (car s) (INSTANCE (unless (member (second s) inds) (incf i-count) (push (second s) inds)) (rplaca (cddr s) (translate-concept-syntax (third s)))) (RELATED (unless (member (third s) inds) (incf i-count) (push (third s) inds)) (rplaca (cdddr s) (translate-concept-syntax (fourth s)))))) (let* ((start-time (get-internal-run-time)) correct (res (time-bound timeout (progn (dolist (s akb) (myeval s)) (prog1 (*classify-akb*) (setf correct (test-akb-correct retrieval)))))) (deltat (/ (- (get-internal-run-time) start-time) internal-time-units-per-second))) (if (eq res '*timed-out*) (values '*timed-out* i-count nil) (values deltat i-count (if test correct)))))) #| (defun run-abox-test (testfile &key (timeout *abox-timeout*) (prov nil)) (let ((*if* (myopen testfile :direction :input)) (max-n 0) (test-n 0) (correct T) (max-c 0) (time 0)) (unwind-protect (loop (let ((kb (read *if* nil nil))) (when (null kb) (return)) (incf test-n) (format t "Testing ~A A-KB ~D..." testfile test-n) (multiple-value-bind (deltat c-count coherent) (test-kb (first kb) :timeout timeout) (when (and (not (eq deltat '*timed-out*)) (or (and prov coherent) (and (not prov) (not coherent)))) (format t "PROBLEMI!! - concept TEST should be ~A~%" (if prov "incoherent" "coherent")) (setf correct nil) (return)) (if (not (eq deltat '*timed-out*)) (progn (format t "~%Classified KB OK - took ~,2Fs~%" deltat) (multiple-value-bind (abox-deltat i-count i-error) (test-akb (cdr kb) :timeout timeout) (declare (ignore i-count)) (when (and (not (eq abox-deltat '*timed-out*)) i-error) (format t "PROBLEMI!! - ~A should be instance of ~A~%" (first i-error) (second i-error)) (break) (setf correct nil) (return)) (if (eq abox-deltat '*timed-out*) (progn (format t "TIMED OUT~%") (return)) (progn (format t "Abox OK - test took ~,2Fs~%" abox-deltat) (if (<= abox-deltat *abox-timeout*) (progn (setf max-n test-n) (setf max-c c-count) (setf time abox-deltat)) (return)))))) (return))))) (close *if*)) (values max-n max-c correct time))) |# (defun run-abox-test (testfile &key (timeout *abox-timeout*) (prov nil) (start 1)) (let ((*if* (myopen testfile :direction :input)) (max-n 0) (test-n 0) (correct T) (max-c 0) (time 0) (max-n-i-count 0)) (unwind-protect (loop for (tbox abox retrieval) in (read *if* nil nil) until (null tbox) do (incf test-n) when (and (>= test-n start) (or (not *max-kb*) (< test-n *max-kb*))) do (format t "Testing ~A A-KB ~D..." testfile test-n) (multiple-value-bind (deltat c-count coherent) (test-kb tbox :timeout timeout) (when (and (not (eq deltat '*timed-out*)) (or (and prov coherent) (and (not prov) (not coherent)))) (format t "PROBLEMI!! - concept TEST should be ~A~%" (if prov "incoherent" "coherent")) (break) (setf correct nil) (return)) (if (not (eq deltat '*timed-out*)) (progn (format t "~%Classified KB OK - took ~,2Fs~%" deltat) (multiple-value-bind (abox-deltat i-count i-error) (test-akb abox retrieval :timeout timeout) (when (and (not (eq abox-deltat '*timed-out*)) i-error) (format t "PROBLEMI!! - ~A should be instance of ~A~%" (first i-error) (second i-error)) (break) (setf correct nil) (return)) (if (eq abox-deltat '*timed-out*) (progn (format t "TIMED OUT~%") (return)) (progn (format t "Abox OK - test took ~,2Fs~%" abox-deltat) (if (<= abox-deltat *abox-timeout*) (progn (setf max-n test-n) (setf max-n-i-count i-count) (setf max-c c-count) (setf time abox-deltat)) (return)))))) (return)))) (close *if*)) (values max-n max-c max-n-i-count correct time))) ;;;************************************************************************** (defconstant tex-special-chars '(#\_)) (defun tex-string (s) (if (= (length s) 0) s (if (member (elt s 0) tex-special-chars) (concatenate 'string (list #\\ (elt s 0)) (tex-string (subseq s 1))) (concatenate 'string (list (elt s 0)) (tex-string (subseq s 1)))))) (defun kb-tests (test-files &key (system *system-name*) (timeout *kb-timeout*) (start-p 1) (start-n start-p)) (let* ((tex-filename (concatenate 'string *results-dir* system "_t98_kb_res.tex")) (txt-filename (concatenate 'string *results-dir* system "_t98_kb_res.txt")) (mode (if (or (not (probe-file txt-filename)) (eql start-p 1)) ':supersede ':append)) (res-tex (myopen tex-filename :direction :output :if-exists mode)) (res-txt (myopen txt-filename :direction :output :if-exists mode))) (unwind-protect (dolist (f test-files) (multiple-value-bind (r-p c-c-p c-p time-p) (run-kb-test (concatenate 'string *kb-data-dir* f "_p.tkb") :timeout timeout :prov T :start start-p) (multiple-value-bind (r-n c-c-n c-n time-n) (run-kb-test (concatenate 'string *kb-data-dir* f "_n.tkb") :timeout timeout :prov nil :start start-n) (format res-tex "~A & " (tex-string f)) (format res-tex "~A & ~:D & ~A & ~,2Fs & " r-p c-c-p (if c-p "Y" "N") time-p) (format res-tex "~A & ~:D & ~A & ~,2Fs \\\\~%" r-n c-c-n (if c-n "Y" "N") time-n) (format res-txt "~20A ~5D ~5D ~A ~6,2Fs ~5D ~5D ~A ~6,2Fs~%" f r-p c-c-p (if c-p "Y" "N") time-p r-n c-c-n (if c-n "Y" "N") time-n)))) (close res-tex) (close res-txt)))) (defun sat-tests (test-files &key (system *system-name*) (timeout *sat-timeout*) (start-p 1) (start-n start-p)) (let* ((tex-filename (concatenate 'string *results-dir* system "_t98_sat_res.tex")) (txt-filename (concatenate 'string *results-dir* system "_t98_sat_res.txt")) (mode (if (or (not (probe-file txt-filename)) (eql start-p 1)) ':supersede ':append)) (res-tex (myopen tex-filename :direction :output :if-exists mode)) (res-txt (myopen txt-filename :direction :output :if-exists mode))) (unwind-protect (dolist (f test-files) (multiple-value-bind (r-p c-p time-p) (run-sat-test (concatenate 'string *sat-data-dir* f "_p.alc") :timeout timeout :prov T :start start-p) (multiple-value-bind (r-n c-n time-n) (run-sat-test (concatenate 'string *sat-data-dir* f "_n.alc") :timeout timeout :prov nil :start start-n) (format res-tex "~A & " (tex-string f)) (format res-tex "~A & ~A & ~,2Fs & " r-p (if c-p "Y" "N") time-p) (format res-tex "~A & ~A & ~,2Fs \\\\~%" r-n (if c-n "Y" "N") time-n) (format res-txt "~20A ~5D ~A ~6,2Fs ~5D ~A ~6,2Fs~%" f r-p (if c-p "Y" "N") time-p r-n (if c-n "Y" "N") time-n)))) (close res-tex) (close res-txt)))) (defun appn-tests (test-files &key (system *system-name*) (timeout *appn-timeout*)) (let ((res-tex (myopen (concatenate 'string *results-dir* system "_appn_kb_res.tex") :direction :output :if-exists :supersede)) (res-txt (myopen (concatenate 'string *results-dir* system "_appn_kb_res.txt") :direction :output :if-exists :supersede))) (unwind-protect (dolist (f test-files) (multiple-value-bind (r-p c-c c-p) (run-appn-test (concatenate 'string *appn-data-dir* f) :timeout timeout) (format res-tex "~A & " (tex-string f)) (format res-tex "~:D & ~A & ~A \\\\~%" c-c r-p c-p) (format res-txt "~20A ~5D ~A ~A~%" f c-c r-p c-p))) (close res-tex) (close res-txt)))) (defun synth-kb-tests (test-files &key (system *system-name*) (timeout *appn-timeout*)) (let ((res-tex (myopen (concatenate 'string *results-dir* system "_synth_kb_res.tex") :direction :output :if-exists :supersede)) (res-txt (myopen (concatenate 'string *results-dir* system "_synth_kb_res.txt") :direction :output :if-exists :supersede))) (unwind-protect (dolist (f test-files) (multiple-value-bind (r-p c-c c-p) (run-appn-test (concatenate 'string *synth-data-dir* f) :timeout timeout) (format res-tex "~A & " (tex-string f)) (format res-tex "~:D & ~A & ~A \\\\~%" c-c r-p c-p) (format res-txt "~8A ~5D ~A ~A~%" f c-c r-p c-p))) (close res-tex) (close res-txt)))) (defun rand-kb-tests (test-files &key (system *system-name*) (timeout *appn-timeout*)) (let ((res-tex (myopen (concatenate 'string *results-dir* system "_rand_kb_res.tex") :direction :output :if-exists :supersede)) (res-txt (myopen (concatenate 'string *results-dir* system "_rand_kb_res.txt") :direction :output :if-exists :supersede))) (unwind-protect (dolist (f test-files) (multiple-value-bind (r-p c-c c-p) (run-appn-test (concatenate 'string *random-data-dir* f) :timeout timeout) (format res-tex "~A & " (tex-string f)) (format res-tex "~:D & ~A & ~A \\\\~%" c-c r-p c-p) (format res-txt "~12A ~5D ~A ~A~%" f c-c r-p c-p))) (close res-tex) (close res-txt)))) (defun abox-tests (test-files &key (system *system-name*) (timeout *abox-timeout*) (abox-data-dir *abox-data-dir*) (start 1)) (let ((res-tex (myopen (concatenate 'string *results-dir* system "_t98_abox_res.tex") :direction :output :if-exists :supersede)) (res-txt (myopen (concatenate 'string *results-dir* system "_t98_abox_res.txt") :direction :output :if-exists :supersede))) (unwind-protect (dolist (f test-files) (multiple-value-bind (r-p c-c inds c-p time-p) (run-abox-test (concatenate 'string abox-data-dir f ".akb") :timeout timeout :start start) (format res-tex "~A & " (tex-string f)) (format res-tex "~:D & ~A & ~A & ~,2Fs \\\\~%" c-c r-p (if c-p "Y" "N") time-p) (format res-txt "~20A ~5D ~5D ~3D ~A ~10,2Fs~%" f c-c inds r-p (if c-p "Y" "N") time-p))) (close res-tex) (close res-txt))))
26,851
Common Lisp
.lisp
624
30.741987
87
0.490421
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
1269c71eb9cb7113313d704de3ce24d4e67cbf7e00eafb0fd2311579046bbf8d
12,588
[ -1 ]
12,589
dlmaps-tests.lisp
lambdamikel_DLMAPS/src/prover/dl-benchmark-suite/dlmaps-tests.lisp
;;-*- Mode: Lisp; Package: CL-USER -*- (in-package "CL-USER") ;;; setze prover::*debug-node* bei Klassfikationsfehlern auf den Knoten-Namen, ;;; um gezielte Debug-Informationen zu erhalten *nur* fuer diesen Knoten! (defconstant +args+ (list :debug-p nil :cache-models-p t :use-cached-models-p t :subtableau-caching-p t :semantic-branching-p t :use-unsat-cache-p t :maintain-prover-state-p t :delete-nodes-p nil :reuse-nodes-p nil :non-determinism-p nil)) ;;; ;;; ;;; (defconstant +top-symbol+ 'prover::top) (defconstant +bottom-symbol+ 'prover::bottom) ;;; Initialise/set any required parameters: (prover::init-tbox 'dl-test) ;;; Name of the DL system: (defparameter *system-name* "DLMAPS") ;;; Keywords from concept syntax which correspond to KRSS keywords ;;; top, bottom, and, or, not, some, all: ;(defparameter *concept-syntax* '(*top* *bottom* and or not some all nil nil nil)) (defparameter *concept-syntax* '(*top* *bottom* and or not some all at-least at-most exactly)) ;; (defparameter *concept-syntax* '(*top* *bottom* and or not some all nil nil nil)) ;;; KRSS style macros for Tbox and Abox definitions: #| ;;; Macro for primitive concept definitions: (defmacro define-primitive-concept (name &optional (definition nil)) `(define-primitive-concept ,name ,definition)) ;;; Macro for non-primitive concept definitions: (defmacro define-concept (name definition) `(defconcept ,name ,definition)) ;;; Macro for primitive role definitions: (defmacro define-primitive-role (name) `(defprimrole ,name)) ;;; Macro for instance assertions: (defmacro prover:instance (name concept)) ;;; Macro for relationship assertions: (defmacro related (name concept role)) ;;; Macro to query instantiation: (defmacro individual-instance? (name concept)) |# ;;; Function to initialise KB: (defun *initialise-kb* (&optional (filename nil)) (declare (ignorable filename)) (prover::init-tbox 'dl-test)) ;;; Function to classify KB: (defun *classify-kb* () (apply #'prover::classify 'dl-test +args+)) #| (defun *classify-kb* () nil) |# ;;; Function to test the coherence of a concept in a classified KB: (defun *test-coherent* (concept) (apply #'prover::concept-satisfiable-p concept +args+)) ;;; Function to test the coherence of a concept expression without ;;; reference to a KB: (defun *test-concept* (concept) (prover::delete-all-tboxes) (let ((concept (tools:change-package-of-description concept :prover nil nil))) (apply #'prover::concept-satisfiable-p concept :tbox nil +args+))) ;;; Function to return the direct subsumers of a concept: (defun *direct-supers* (concept) (let ((concept (tools:change-package-of-description concept :prover nil nil))) (apply #'prover::classify prover::*cur-tbox* +args+) (tools:change-package-of-description (mapcar #'prover::unparse (mapcar #'first (mapcar #'prover::sort-concepts (mapcar #'(lambda (x) (mapcar #'prover::parse-concept (ensure-list x))) (prover::parents concept)))))))) ;;; Function to return the direct subsumees of a concept: (defun *direct-subs* (concept) (let ((concept (tools:change-package-of-description concept :prover nil nil))) (apply #'prover::classify prover::*cur-tbox* +args+) (tools:change-package-of-description (mapcar #'prover::unparse (mapcar #'first (mapcar #'prover::sort-concepts (mapcar #'(lambda (x) (mapcar #'prover::parse-concept (ensure-list x))) (prover::children concept)))))))) ;;; Function to initialise abox (defun *initialise-abox* () (prover::init-abox 'dl-test-abox)) ;;; Function to perform abox inferences (if required): (defun *classify-akb* () ;(realize-abox 'dl-test-abox) ;(apply #'prover::abox-consistent-p 'dl-test-abox +args+) ) (defun brace-reader (stream char) (declare (ignore char)) (loop for ch = (read-char stream) until (eq ch #\})) (read stream)) (set-macro-character #\{ #'brace-reader) ;;; Timeout for T98 KB tests: (defparameter *kb-timeout* 500) ;;; Timeout for T98 sat tests: (defparameter *sat-timeout* 100) ;;; Timeout for appn KB tests: (defparameter *appn-timeout* 10000) ;;; Timeout for T98 abox tests: (defparameter *abox-timeout* 500) ;;;********************************************************* ;;; Load the test code: ;(load "dl-test:dl-tests") ;;;********************************************************* ;;; Run the tests: (defparameter *max-kb* 2) ; sonst stack-overflow (defun run-dl-tests () (prover::reset-statistics) (prover::delete-all-tboxes) (racer::delete-all-tboxes) #| (kb-tests *t98-kb-files*) ; OK (abox-tests *t98-abox-files* :abox-data-dir *new-abox-data-dir*) ; OK (synth-kb-tests *synth-kb-files*) ; OK (appn-tests *appn-kb-files*) ; OK (sat-tests *t98-con-files*) ; OK (kb-tests *t98-kb-files*) ; OK |# (rand-kb-tests *random-kb-files*) ; verwenden at-least / at-most! )
5,506
Common Lisp
.lisp
132
34.621212
94
0.61537
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
d43e9f07f744daf1b96db9a5c9f1d9f227c69d845eec442d28be11b20d46f669
12,589
[ -1 ]
12,590
race-tests.lisp
lambdamikel_DLMAPS/src/prover/dl-benchmark-suite/race-tests.lisp
;;;-*- Mode: Lisp; Package: CL-USER -*- (in-package "CL-USER") (setf (logical-pathname-translations "dl-test") (list (list "**;*.*" (concatenate 'string #+:mswindows (pathname-device (truename *load-pathname*)) #+:mswindows ":" (directory-namestring (truename *load-pathname*)) #+:mcl "**:*.*" #+:unix "**/*.*" #+:mswindows "**\\*.*")) (list "*.*" (concatenate 'string #+:mswindows (pathname-device (truename *load-pathname*)) #+:mswindows ":" (directory-namestring (truename *load-pathname*)) "*.*")))) #+:mcl(load "dl-test:timeout") (load "dl-test:race-1-1;load-race") ;;; Initialise/set any required parameters: (init-tbox 'dl-test) ;;; Name of the DL system: (defparameter *system-name* (format nil "R-~A" *dl-prover-version*)) ;;; Keywords from concept syntax which correspond to KRSS keywords ;;; top, bottom, and, or, not, some, all: ;(defparameter *concept-syntax* '(*top* *bottom* and or not some all nil nil nil)) (defparameter *concept-syntax* '(*top* *bottom* and or not some all at-least at-most exactly)) ;;; KRSS style macros for Tbox and Abox definitions: #| ;;; Macro for primitive concept definitions: (defmacro define-primitive-concept (name &optional (definition nil)) `(defprimconcept ,name ,definition)) ;;; Macro for non-primitive concept definitions: (defmacro define-concept (name definition) `(defconcept ,name ,definition)) ;;; Macro for primitive role definitions: (defmacro define-primitive-role (name) `(defprimrole ,name)) ;;; Macro for instance assertions: (defmacro instance (name concept)) ;;; Macro for relationship assertions: (defmacro related (name concept role)) ;;; Macro to query instantiation: (defmacro individual-instance? (name concept)) |# ;;; Functions for interacting with Tbox and Abox ;;; Function to initialise KB: (defun *initialise-kb* (&optional (filename nil)) (init-tbox 'dl-test) (when filename (setf (tbox-name (find-tbox 'dl-test)) (intern (string-upcase (pathname-name filename)))))) ;;; Function to classify KB: (defun *classify-kb* () (classify-tbox 'dl-test)) ;;; Function to test the coherence of a concept in a classified KB: (defun *test-coherent* (concept) (concept-satisfiable-p concept 'dl-test)) ;;; Function to test the coherence of a concept expression without ;;; reference to a KB: (defun *test-concept* (concept) (concept-satisfiable-p concept nil)) ;;; Function to return the direct subsumers of a concept: (defun *direct-supers* (concept) (mapcar #'(lambda (name-set) (remove +top-symbol+ name-set)) (atomic-concept-parents concept 'dl-test))) ;;; Function to return the direct subsumees of a concept: (defun *direct-subs* (concept) (mapcar #'(lambda (name-set) (remove +bottom-symbol+ name-set)) (atomic-concept-children concept 'dl-test))) ;;; Function to initialise abox (defun *initialise-abox* () (init-abox 'dl-test-abox 'dl-test)) ;;; Function to perform abox inferences (if required): (defun *classify-akb* () (realize-abox 'dl-test-abox)) (defun brace-reader (stream char) (declare (ignore char)) (loop for ch = (read-char stream) until (eq ch #\})) (read stream)) (set-macro-character #\{ #'brace-reader) ;;; Timeout for T98 KB tests: (defparameter *kb-timeout* 500) ;;; Timeout for T98 sat tests: (defparameter *sat-timeout* 100) ;;; Timeout for appn KB tests: (defparameter *appn-timeout* 10000) ;;; Timeout for T98 abox tests: (defparameter *abox-timeout* 500) ;;;********************************************************* ;;; Load the test code: (load "dl-test:dl-tests") ;;;********************************************************* ;;; Run the tests: (defun run-dl-tests () (abox-tests *t98-abox-files*) (synth-kb-tests *synth-kb-files*) (appn-tests *new-appn-kb-files*) (rand-kb-tests *random-kb-files*) (sat-tests *t98-con-files*) (kb-tests *t98-kb-files*) (abox-tests *t98-abox-files* :abox-data-dir *new-abox-data-dir*))
4,580
Common Lisp
.lisp
115
32.182609
94
0.590693
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
aa08bef243b0ef23b39e4f86615c94df6e4180ab94352c96d444ebab184ebd63
12,590
[ -1 ]
12,591
bug.lisp
lambdamikel_DLMAPS/src/prover/dl-benchmark-suite/data/dfki-random/bug.lisp
(define-primitive-role r1) (define-primitive-role r2) (define-primitive-role r3) (define-primitive-role r4) (define-primitive-role r5) (define-primitive-role r6) (define-primitive-role r7) (define-primitive-role r8) (define-primitive-role r9) (define-primitive-role r10) (define-primitive-concept c1 (and (at-least 1 r8) (at-most 8 r2))) (define-concept c4 (and c2 (at-least 2 r8))) (define-concept c9 (and c2 c1 (at-most 5 r2))) (define-primitive-concept c25 (and c5 c12 (at-least 5 r8))) (define-primitive-concept c36 (and c9 (at-least 3 r3))) (define-primitive-concept c57 (and c25 c36 (at-least 2 r2) (at-most 8 r10)))
717
Common Lisp
.lisp
29
20.482759
29
0.668135
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
d6ccb1ea79605e941b7d0a67420be41a1851bcf1cf599195a103d53b11729b8a
12,591
[ -1 ]
12,592
tancs-tests.lisp
lambdamikel_DLMAPS/src/prover/dl-benchmark-suite/TANCS99-tests/tancs-tests.lisp
;;; -*- Mode: LISP; Package: CL-USER; Base: 10; Syntax: Ansi-common-lisp -*- (in-package cl-user) (eval-when (:compile-toplevel :laod-toplevel :execute) (defparameter *prover* (cond ((boundp '*reasoner*) (pushnew :fact *features*) *reasoner*) ((boundp '*dl-prover-name*) (pushnew :race *features*) *dl-prover-name*) (t (error "Cannot determine prover."))))) #+:fact (defparameter *fact-logic* 'k) #+:fact (defun *test-concept* (concept) (alc-concept-coherent concept :logic *fact-logic*)) #+:race (defun *test-concept* (concept) (satisfiable concept 'tancs)) ;;; ====================================================================== (when *load-pathname* (setf (logical-pathname-translations "tancs") (list (list "tancs;**;*.*" (concatenate 'string (directory-namestring *load-pathname*) #+:ALLEGRO "**/*.*" #+:MCL "**:*.*"))))) (defparameter *default-timeout* 600) ; in seconds ;;; ====================================================================== ;;; The parser has been developed based on the infix reader ;;; provided by Mark Kantrowitz. (defparameter *infix-readtable* (copy-readtable nil)) (defparameter *normal-readtable* (copy-readtable nil)) (defun infix-reader (stream subchar arg) (declare (ignore arg subchar)) (let ((*readtable* *infix-readtable*) (*normal-readtable* *readtable*)) (read-char stream) ; get rid of opening left parenthesis (read-infix stream))) (set-dispatch-macro-character #\# #\I #'infix-reader *readtable*) ; was #\# #\$ (set-dispatch-macro-character #\# #\I #'infix-reader *infix-readtable*) (defmacro infix-error (format-string &rest args) `(error ,format-string ,@args)) (defun read-infix (stream) (let* ((result (gather-superiors '\) stream)) ; %infix-end-token% (next-token (read-token stream))) (unless (same-token-p next-token '\)) ; %infix-end-token% (infix-error "Infix expression ends with ~S." next-token)) result)) (defun read-regular (stream) (let ((*readtable* *normal-readtable*)) (read stream t nil t))) ;;; ******************************** ;;; Reader Code ******************** ;;; ******************************** (defun same-operator-p (x y) (same-token-p x y)) (defun same-token-p (x y) (and (symbolp x) (symbolp y) (string-equal (symbol-name x) (symbol-name y)))) ;;; Peeking Token Reader (defvar *peeked-token* nil) (defun read-token (stream) (let ((result (if *peeked-token* (pop *peeked-token*) (read stream nil nil)))) (if (and (characterp result) (or (char= result #\Newline) (char= result #\Return))) (read-token stream) result))) (defun peek-token (stream) (unless *peeked-token* (push (read stream nil nil) *peeked-token*)) (car *peeked-token*)) ;;; Hack to work around + and - being terminating macro characters, ;;; so 1e-3 doesn't normally work correctly. (defun fancy-number-format-p (left operator stream) (when (and (symbolp left) (find operator '(+ -) :test #'same-operator-p)) (let* ((name (symbol-name left)) (length (length name))) (when (and (valid-numberp (subseq name 0 (1- length))) ;; Exponent, Single, Double, Float, or Long (find (subseq name (1- length)) '("e" "s" "d" "f" "l") :test #'string-equal)) (read-token stream) (let ((right (peek-token stream))) (cond ((integerp right) ;; it is one of the fancy numbers, so return it (read-token stream) (let ((*readtable* *normal-readtable*)) (read-from-string (format nil "~A~A~A" left operator right)))) (t ;; it isn't one of the fancy numbers, so unread the token (push operator *peeked-token*) ;; and return nil nil))))))) (defun valid-numberp (string) (let ((saw-dot nil)) (dolist (char (coerce string 'list) t) (cond ((char= char #\.) (if saw-dot (return nil) (setq saw-dot t))) ((not (find char "01234567890" :test #'char=)) (return nil)))))) ;;; Gobbles an expression from the stream. (defun gather-superiors (previous-operator stream) "Gathers an expression whose operators all exceed the precedence of the operator to the left." (let ((left (get-first-token stream))) (loop (setq left (post-process-expression left)) (let ((peeked-token (peek-token stream))) (let ((fancy-p (fancy-number-format-p left peeked-token stream))) (when fancy-p ;; i.e., we've got a number like 1e-3 or 1e+3 or 1f-1 (setq left fancy-p peeked-token (peek-token stream)))) (unless (or (operator-lessp previous-operator peeked-token) (and (same-operator-p peeked-token previous-operator) (operator-right-associative-p previous-operator))) ;; The loop should continue when the peeked operator is ;; either superior in precedence to the previous operator, ;; or the same operator and right-associative. (return left))) (setq left (get-next-token stream left))))) (defun get-first-token (stream) (let ((token (read-token stream))) (if (token-operator-p token) ;; It's an operator in a prefix context. (apply-token-prefix-operator token stream) ;; It's a regular token token))) (defun apply-token-prefix-operator (token stream) (let ((operator (get-token-prefix-operator token))) (if operator (funcall operator stream) (infix-error "Not a prefix operator: ~S" token)))) (defun get-next-token (stream left) (let ((token (read-token stream))) (apply-token-infix-operator token left stream))) (defun apply-token-infix-operator (token left stream) (let ((operator (get-token-infix-operator token))) (if operator (funcall operator stream left) (infix-error "Not an infix operator: ~S" token)))) ;;; Fix to read-delimited-list so that it works with tokens, not ;;; characters. (defun infix-read-delimited-list (end-token delimiter-token stream) (do ((next-token (peek-token stream) (peek-token stream)) (list nil)) ((same-token-p next-token end-token) ;; We've hit the end. Remove the end-token from the stream. (read-token stream) ;; and return the list of tokens. ;; Note that this does the right thing with [] and (). (nreverse list)) ;; Ignore the delimiters. (when (same-token-p next-token delimiter-token) (read-token stream)) ;; Gather the expression until the next delimiter. (push (gather-superiors delimiter-token stream) list))) ;;; ******************************** ;;; Precedence ********************* ;;; ******************************** (defparameter *operator-ordering* '(( \( \: ) ( box pos ) ( ~ ) ( / ) ( & ) ( |\|| ) ( => <= ) ( <=> <~> ) ( \, \.) ; do not delete! Needed for reading! ( \) ) ( %infix-end-token% )) ; end of infix expression "Ordered list of operators of equal precedence.") (defun operator-lessp (op1 op2) (dolist (ops *operator-ordering* nil) (cond ((find op1 ops :test #'same-token-p) (return nil)) ((find op2 ops :test #'same-token-p) (return t))))) (defparameter *right-associative-operators* '(\.)) (defun operator-right-associative-p (operator) (find operator *right-associative-operators*)) ;;; ******************************** ;;; Define Operators *************** ;;; ******************************** (defvar *token-operators* nil) (defvar *token-prefix-operator-table* (make-hash-table)) (defvar *token-infix-operator-table* (make-hash-table)) (defun token-operator-p (token) (find token *token-operators*)) (defun get-token-prefix-operator (token) (gethash token *token-prefix-operator-table*)) (defun get-token-infix-operator (token) (gethash token *token-infix-operator-table*)) (eval-when (compile load eval) (defmacro define-token-operator (operator-name &key (prefix nil prefix-p) (infix nil infix-p)) `(progn (pushnew ',operator-name *token-operators*) ,(when prefix-p `(setf (gethash ',operator-name *token-prefix-operator-table*) #'(lambda (stream) ,@(cond ((and (consp prefix) (eq (car prefix) 'infix-error)) ;; To avoid ugly compiler warnings. `((declare (ignore stream)) ,prefix)) (t (list prefix)))))) ,(when infix-p `(setf (gethash ',operator-name *token-infix-operator-table*) #'(lambda (stream left) ,@(cond ((and (consp infix) (eq (car infix) 'infix-error)) ;; To avoid ugly compiler warnings. `((declare (ignore stream left)) ,infix)) (t (list infix))))))))) ;;; Readtable definitions for characters, so that the right token is returned. (eval-when (compile load eval) (defmacro define-character-tokenization (char function) `(set-macro-character ,char ,function nil *infix-readtable*))) ;;; ******************************** ;;; Operator Definitions *********** ;;; ******************************** (define-character-tokenization #\& #'(lambda (stream char) (declare (ignore char stream)) '&)) (define-token-operator & :infix `(and ,left ,(gather-superiors '& stream))) (define-character-tokenization #\| #'(lambda (stream char) (declare (ignore char stream)) '\|)) (define-token-operator \| :infix `(or ,left ,(gather-superiors '\| stream))) (define-character-tokenization #\: #'(lambda (stream char) (declare (ignore char stream)) '\:)) (defun convert-role (role-number) (intern (format nil "R~D" role-number))) (define-token-operator box :prefix (let ((role (gather-superiors '\: stream)) (concept (cond ((same-token-p (peek-token stream) '\:) (read-token stream) (gather-superiors 'box stream)) (t (infix-error "Missing formula in box term."))))) `(all ,(convert-role role) ,concept))) (define-token-operator pos :prefix (let ((role (gather-superiors '\: stream)) (concept (cond ((same-token-p (peek-token stream) '\:) (read-token stream) (gather-superiors 'pos stream)) (t (infix-error "Missing formula in pos term."))))) `(some ,(convert-role role) ,concept))) (define-character-tokenization #\~ #'(lambda (stream char) (declare (ignore stream char)) '\~)) (define-token-operator \~ :prefix `(not ,(gather-superiors '\~ stream))) (define-character-tokenization #\( #'(lambda (stream char) (declare (ignore stream char)) '\()) (define-token-operator \( :infix `(,left ,@(infix-read-delimited-list '\) '\, stream)) :prefix (let ((list (infix-read-delimited-list '\) '\, stream))) (if (null (rest list)) ;; only one element in list. works correctly if list is NIL (first list) ;; several elements in list `(progn ,@list)))) (define-character-tokenization #\) #'(lambda (stream char) (declare (ignore stream char)) '\))) (define-token-operator \) :prefix (infix-error "Incomplete expression.") :infix (infix-error "Extra close parenthesis.")) (define-character-tokenization #\, #'(lambda (stream char) (declare (ignore stream char)) '\,)) (define-token-operator \, :infix `(,left ,(gather-superiors '\, stream))) (define-character-tokenization #\% #'(lambda (stream char) (declare (ignore char)) (do ((char (peek-char nil stream t nil t) (peek-char nil stream t nil t))) ((or (char= char #\newline) (char= char #\return) ;; was #\$ ; (char= char #\)) ) ;; Gobble characters until the end of the line or the ;; end of the input. (cond ((or (char= char #\newline) (char= char #\return)) (read-char stream) (read stream t nil t)) (t ;; i.e., return %infix-end-token% (read stream t nil t)))) (read-char stream)))) (define-character-tokenization #\< #'(lambda (stream char) (declare (ignore char)) (cond ((char= (peek-char nil stream t nil t) #\=) (read-char stream t nil t) (if (char= (peek-char nil stream t nil t) #\>) (progn (read-char stream t nil t) '<=>) '<=)) ((char= (peek-char nil stream t nil t) #\~) (read-char stream t nil t) (read-char stream t nil t) '<~>)))) (define-token-operator => :infix `(implication ,left ,(gather-superiors '=> stream))) (define-token-operator <= :infix `(reverse-implication ,left ,(gather-superiors '=> stream))) (define-token-operator <=> :infix `(equivalence ,left ,(gather-superiors '=> stream))) (define-token-operator <~> :infix `(tilde-equivalence ,left ,(gather-superiors '=> stream))) (define-token-operator input_formula :prefix (cond ((same-token-p (peek-token stream) '\() (read-token stream) `(input-formula ,@(infix-read-delimited-list '\) '\, stream))) (t (error "not expected.")))) (define-token-operator inputformula :prefix (cond ((same-token-p (peek-token stream) '\() (read-token stream) `(input-formula ,@(infix-read-delimited-list '\) '\, stream))) (t (error "not expected.")))) (define-token-operator true :prefix (progn stream '*top*)) (define-token-operator false :prefix (progn stream '*bottom*)) (define-character-tokenization #\. #'(lambda (stream char) (declare (ignore stream char)) '\.)) (define-token-operator \. :infix `(,left .,(gather-superiors '\. stream))) ;;; ******************************** ;;; Syntactic Modifications ******** ;;; ******************************** ;;; Post processes the expression to remove some unsightliness caused ;;; by the way infix processes the input. Note that it is also required ;;; for correctness in the a<b<=c case. (defun post-process-expression (expression) (if (and (consp expression) (= (length expression) 3)) (destructuring-bind (operator left right) expression (cond ((and (consp left) (same-operator-p (first left) operator) (find operator '(\| \& begin) :test #'same-operator-p)) ;; Flatten the expression if possible (cond #|((and (eq operator '-) (= (length left) 2)) ;; -a-b --> (+ (- a) (- b)). `(+ ,left (- ,right))) ((and (eq operator '/) (= (length left) 2)) ;; ditto with / `(/ (* ,(second left) ,right)))|# (t ;; merges a+b+c as (+ a b c). (append left (list right))))) (t expression))) expression)) (defun parse (string &optional (verbose nil)) (let* (;(*package* (find-package 'pdl)) (*readtable* *infix-readtable*) (result (read-from-string (format nil "#I(~A )" string)))) (when verbose (print result)) result)) (defun parse-file (filename) (let ((*readtable* *infix-readtable*) (*peeked-token* nil)) (with-open-file (stream filename :direction :input) (gather-superiors '\. stream)))) ;;; ====================================================================== (defun get-parameters (x) (values (read-from-string (subseq x (+ 2 (search "-K" x)) (search "-C" x))) (read-from-string (subseq x (+ 2 (search "-C" x)) (search "-V" x))) (read-from-string (subseq x (+ 2 (search "-V" x)) (search "-D" x))) (read-from-string (subseq x (+ 2 (search "-D" x)) (search "." x :from-end t))) (read-from-string (subseq x (+ 1 (search "." x :from-end t)) (length x))))) (defvar *clauses*) (defvar *vars*) (defvar *depth*) (defvar *ln-runtime*) (defun term-satisfiable (term stream timeout-secs) (multiple-value-bind (result elapsed-run-time elapsed-real-time elapsed-mf-time elapsed-gc-time bytes-consed) (with-timeout (timeout-secs (timed-out-handler)) ;; returns '(?) !!!?? (with-timed-form #'(lambda () (*test-concept* term)))) (declare (ignore elapsed-real-time elapsed-mf-time elapsed-gc-time)) (setf elapsed-run-time (max 0.0001 elapsed-run-time)) (incf *ln-runtime* (log elapsed-run-time)) (format stream "~&i -clauses ~D -vars ~D -depth ~D ~0,2F ~A" *clauses* *vars* *depth* elapsed-run-time (if (eq result 't) "S" (if (eq result 'nil) "U" "?"))) (values result elapsed-run-time bytes-consed))) (defun less-p (a b) (labels ((encode (k c v d i) (+ i (* 100 d) (* 1000 v) (* 10000 c) (* 100000 k)))) (< (multiple-value-call #'encode (get-parameters (namestring a))) (multiple-value-call #'encode (get-parameters (namestring b)))))) (defun bench (p dir stream reference-file) (print p *trace-output*) (format stream "% Prover ~A" *prover*) (format stream "~%% Settings") (format stream "~%% Timeout ~D" *default-timeout*) (format stream "~%p ~A" p) (let* ((files (sort (remove-if-not #'(lambda (file) (search "p-" (namestring file))) (directory dir)) #'less-p)) (ln-runtime 0) (n-instances nil)) (unless files (warn "No files found.")) (loop for file in files do (print file *trace-output*) (let* ((input-formulas (parse-file file)) (last-formula (first (last input-formulas))) (hypotheses nil) (axioms nil) #+:race (tbox (init-tbox 'tancs)) ) (loop for input-formula in input-formulas unless (eq input-formula last-formula) do (destructuring-bind (input-formula name type formula) input-formula (declare (ignore input-formula name)) (ecase type (hypothesis (push formula hypotheses)) (axiom (push formula axioms))))) (setf axioms (nreverse axioms)) #+:fact (unless (null axioms) (error "Axioms are not supported in this version.")) #+:race (loop for axiom in axioms do (case (first axiom) (implication (add-concept-axiom tbox (second axiom) (third axiom) :inclusion-p t)) (equivalence (add-concept-axiom tbox (second axiom) (third axiom) :inclusion-p t) (add-concept-axiom tbox (third axiom) (second axiom) :inclusion-p t)) (otherwise (add-concept-axiom tbox '*top* axiom :inclusion-p t)))) (multiple-value-bind (k c v d i) (get-parameters (namestring file)) (when (= i 1) (cond ((not (null n-instances)) (format reference-file "~0,2F" (exp (/ ln-runtime n-instances))) (setf n-instances 0) (setf ln-runtime 0)) (t (setf n-instances 0))) (format reference-file "~&r p-~A-K~D-C~D-V~D-D~D " p k c v d)) (incf n-instances) (let ((*depth* d) (*clauses* c) (*vars* v) (*ln-runtime* 0) #+:race (*auto-classify* :lazy) (encode-axioms-start (get-internal-run-time))) #+:race (ensure-knowledge-base-state ':tbox-prepared tbox) (let ((preencode-time (- (get-internal-run-time) encode-axioms-start))) (when (> preencode-time 0.0) (incf ln-runtime (log preencode-time)))) (case (and (consp (fourth last-formula)) (first (fourth last-formula))) (equivalence (term-satisfiable `(and (or (not ,(second (fourth last-formula))) ,(third (fourth last-formula))) (or (not ,(third (fourth last-formula))) ,(second (fourth last-formula)))) stream *default-timeout*)) (otherwise (term-satisfiable `(and (not ,(fourth last-formula)) .,hypotheses) stream *default-timeout*))) (incf ln-runtime *ln-runtime*))))) (when files (format reference-file "~0,2F" (exp (/ ln-runtime n-instances)))))) ;;; ====================================================================== (defun tancs-bound-cnf (filename reference-file) (with-open-file (stream filename :direction :output :if-exists :supersede) (bench "bound-cnf" "tancs:tancs;bound-cnf;*.*" stream reference-file))) (defun tancs-bound-cnf-modk (filename reference-file) (with-open-file (stream filename :direction :output :if-exists :supersede) (bench "bound-modK" "tancs:tancs;bound-cnf-modK;*.*" stream reference-file))) (defun tancs-unbound-qbf (filename reference-file) (with-open-file (stream filename :direction :output :if-exists :supersede) (bench "unbound-qbf" "tancs:tancs;unbound-qbf;*.*" stream reference-file))) (defun tancs-unbound-qbf-modk (filename reference-file) (with-open-file (stream filename :direction :output :if-exists :supersede) (bench "unbound-qbf-modK" "tancs:tancs;unbound-qbf-modK;*.*" stream reference-file))) (defun tancs-bound-cnf-modS4 (filename reference-file) (let (#+:race (*encode-roles-as-transitive* t) #+:race (*encode-roles-as-reflexive* t) #+:fact (*fact-logic* 's4)) (with-open-file (stream filename :direction :output :if-exists :supersede) (bench "bound-cnf-modS4" "tancs:tancs;bound-cnf-modS4;*.*" stream reference-file)))) (defun tancs-unbound-qbf-modS4 (filename reference-file) (let (#+:race (*encode-roles-as-transitive* t) #+:race (*encode-roles-as-reflexive* t) #+:fact (*fact-logic* 's4)) (with-open-file (stream filename :direction :output :if-exists :supersede) (bench "unbound-qbf-modS4" "tancs:tancs;unbound-qbf-modS4;*.*" stream reference-file)))) (defun tancs-persat (filename reference-file) (with-open-file (stream filename :direction :output :if-exists :supersede) (bench "persat" "tancs:tancs;persat;*.*" stream reference-file))) (defun tancs-persat-modK (filename reference-file) (let (#+:race (*encode-roles-as-transitive* t) #+:race (*encode-roles-as-reflexive* t) #+:fact (*fact-logic* 's4)) (with-open-file (stream filename :direction :output :if-exists :supersede) (bench "persat-modK" "tancs:tancs;persat-modK;*.*" stream reference-file)))) (defun tancs-persat-modS4 (filename reference-file) (let (#+:race (*encode-roles-as-transitive* t) #+:race (*encode-roles-as-reflexive* t) #+:fact (*fact-logic* 's4)) (with-open-file (stream filename :direction :output :if-exists :supersede) (bench "persat-modS4" "tancs:tancs;persat-modS4;*.*" stream reference-file)))) (defun run-tancs-tests () (with-open-file (reference-file "tancs:tancs;tancs.result" :direction :output :if-exists :supersede) (format reference-file "%Prover ~A" *prover*) (format reference-file "~%%Settings") (format reference-file "~%%Timeout ~A" *default-timeout*) (tancs-bound-cnf "tancs:tancs;bound-cnf.result" reference-file))) (tancs-bound-cnf-modk "tancs:tancs;bound-cnf-modk.result" reference-file) (tancs-unbound-qbf "tancs:tancs;unbound-qbf.result" reference-file) (tancs-unbound-qbf-modk "tancs:tancs;unbound-qbf-modk.result" reference-file) (tancs-unbound-qbf-modS4 "tancs:tancs;unbound-qbf-modS4.result" reference-file) (tancs-bound-cnf-modS4 "tancs:tancs;bound-cnf-modS4.result" reference-file) #+:race (tancs-persat "tancs:tancs;persat.result" reference-file) #+:race (tancs-persat-modK "tancs:tancs;persat-modK.result" reference-file) #+:race (tancs-persat-modS4 "tancs:tancs;persat-modS4.result" reference-file) 'done))
24,970
Common Lisp
.lisp
608
33.032895
94
0.573372
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
5305596576854d378246cac918e58f90edd7f62da37f0dfb76df1546fc96e0e4
12,592
[ -1 ]
12,593
FaCT.lisp
lambdamikel_DLMAPS/src/prover/dl-benchmark-suite/FaCT-1-11/FaCT.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; ;;; FaCT description logic classifier ;;; ;;; COPYRIGHT (C) IAN R. HORROCKS and THE UNIVERSITY OF MANCHESTER, 1997 ;;; ;;; ;;; ;;; This program is free software; you can redistribute it and/or ;;; ;;; modify it under the terms of the GNU General Public License ;;; ;;; as published by the Free Software Foundation; either version 2 ;;; ;;; of the License, or (at your option) any later version. ;;; ;;; ;;; ;;; This program is distributed in the hope that it will be useful, ;;; ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; ;;; GNU General Public License for more details. ;;; ;;; ;;; ;;; You should have received a copy of the GNU General Public License ;;; ;;; along with this program; if not, write to the Free Software ;;; ;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ;;; ;;; 02111-1307, USA. ;;; ;;; ;;; ;;; Enquiries about FaCT should be directed to: ;;; ;;; ;;; ;;; email: [email protected] ;;; ;;; www: http://www.cs.man.ac.uk/~horrocks ;;; ;;; smail: Ian Horrocks, Department of Computer Science, Oxford Road, ;;; ;;; Manchester 467M13 9PL, United Kingdom ;;; ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package "CL-USER") (defconstant *reasoner* "FaCT") (defconstant *version-number* "1.11") #| (export '(grail-define-relation grail-redefine-relation grail-define-implication grail-define-concept grail-define-primconcept load-kb reset-kb clear-kb dump-taxonomy export-kb set-verbosity reset-verbosity set-debug reset-debug set-features reset-features features set-profiling reset-profiling alc-concept-coherent alc-test defconcept-f defconcept defprimconcept-f defprimconcept defprimrole-f defprimrole defprimattribute-f defprimattribute implies-f implies disjoint-f disjoint load-tkb classify-tkb init-tkb direct-supers all-supers direct-subs all-subs equivalences satisfiable subsumes equivalent-concepts disjoint-concepts add-concept-f add-concept classify-concept get-concept get-role get-all-concepts get-all-roles classified-tkb? what-is? is-primitive? is-concept? is-role? is-feature? name description)) |# #| (eval-when (compile) (PROCLAIM '(OPTIMIZE (SAFETY 0) ; Run time error checking level (SPEED 3) ; Speed of the compiled code (COMPILATION-SPEED 0) ; Speed of compilation (SPACE 0) ; Space of both intermidiate files and object #+(or ALLEGRO LISPWORKS) (DEBUG 0) )) #-LISPWORKS (proclaim '(inline grail-concept-definition grail-concept-primitive system-concept-parents system-concept-children system-concept-synonym system-concept-definition system-concept-primitive system-concept-mark1 system-concept-visited system-concept-model system-concept-classified system-concept-asserted-supers system-concept-grail-name role-parents role-ancestors role-functional role-f-ancestors role-transfered-by role-transfers role-grail-name role-grail-inv-name role-processed constraints-c constraints-props constraints-all-rc constraints-all-r+c constraints-r-y constraints-f-y constraints-or-clauses constraints-bcp-cand constraints-some-fc-ux constraints-some-rc-ux constraints-c-def-ux constraints-parent c-grail-name-f r-functional-f r-inverse-f r-ancestors-f neg-con-f)) (proclaim '(inline queue-contents make-queue enqueue dequeue front empty-queue-p queue-nconc push-queue pop-queue pos-lit pos-lit-p))) |# ;;; ************** DATA STRUCTURES ************** (defstruct (grail-concept (:print-function (lambda (c s k) (declare (ignore k)) (format s "c[~A]" (grail-concept-name c))))) "structure for a grail concept node" (definition nil) (primitive nil) (name nil)) (defstruct (system-concept (:print-function (lambda (c s k) (declare (ignore k)) (format s "c[~A]" (case (system-concept-grail-name c) (:top '*TOP*) (:bottom '*BOTTOM*) (T (system-concept-grail-name c))))))) "structure for a system concept node" (parents nil) (children nil) (synonym nil) (definition nil) (primitive nil) (mark1 nil) (visited nil) (model nil) (classified 0) (asserted-supers nil) (grail-name nil)) (defstruct (role (:print-function (lambda (r s k) (declare (ignore k)) (format s "r[~A]" (role-grail-name r))))) "structure for a role" (parents nil) (ancestors nil) (functional nil) (f-ancestors nil) (transfered-by nil) (transfers nil) (grail-name nil) (grail-inv-name nil) (processed nil)) (defstruct constraints "structure of a costraint system for a single individual" (c nil) (props nil) (all-rc nil) (all-r+c nil) (r-y nil) (f-y nil) (or-clauses nil) (bcp-cand nil) (some-fc-ux nil) (some-rc-ux nil) (c-def-ux nil) (parent nil)) ;;; ************** GLOBAL CONSTANTS ************** ;;;(defconstant *max-n-concepts* 20000 "Maximum number of system concepts") (defconstant *max-n-concepts* 100000 "Maximum number of system concepts") (defconstant *max-n-roles* 10000 "Maximum number of roles") (defconstant *TOP* 0 "System name of top concept") (defconstant *BOTTOM* 1 "System name of bottom concept") ;;; ************** GLOBAL VARIABLES ************** (defvar *c-definitions* nil "List of defined GRAIL concepts") (defvar *grail-concept-table* (make-hash-table :size *max-n-concepts*) "Maps GRAIL concept names to system concept names (fixnums)") (defvar *system-concept-array* (make-array `(,(+ *max-n-concepts* *max-n-concepts*)) :element-type 'system-concept :adjustable nil :fill-pointer nil :displaced-to nil) "Maps system concept names (fixnums) to definitions etc. (inc. GRAIL names if applicable)") (defvar *next-available-concept* 2 "Value of the next undefined system concept name (a fixnum)") (defvar *concept-definition-table* (make-hash-table :test #'equal :size *max-n-concepts*) "Maps GRAIL concept names and system concept definitions to system concept names (fixnums)") (defvar *kb-file-names* nil "List of kb files loaded since last clear-kb") (defvar *relations* (make-hash-table :size *max-n-roles*) "Maps role names to data structures") (defvar *r-definitions* nil "List of defined role names") (defvar *transitive-roles* nil "Set to T (NIL) if there are (are not) transitive roles in KB") (defvar *implications* nil "List of unprocessed implication axioms") (defvar *grail-universal-constraints* nil "List of unencoded universal axioms (GCIs)") (defvar *universal-constraint* nil "Encoded universal axiom - conjunction of all non-absorbed GCIs") (defparameter *clash-level* nil "Dependency set returned after a clash") (defparameter *or-level* 0 "Current branching level (used to form dependency sets)") ;;; Variables controlling classifier features (defparameter *transitivity* T "When T (NIL) enables (disables) transitive roles; default=T") (defparameter *concept-eqn* T "When T (NIL) enables (disables) concept equations; default=T") (defparameter *subset-s-equivalent* T "When T (NIL) enables (disables) enhanced subset blocking strategy; default=T") (defparameter *backjumping* T "When T (NIL) enables (disables) dependency directed backtracking; default=T") (defparameter *obvious-subs* T "When T (NIL) enables (disables) detection of obvious subsumption relations; default=T") (defparameter *top-level-caching* T "When T (NIL) enables (disables) top-level caching in subsumption tests; default=T") (defparameter *full-caching* T "When T (NIL) enables (disables) caching in satisfiability tests; default=T") (defparameter *blocking* T "When T (NIL) enables (disables) blocking - essential for trans roles & cycles; default=T") (defparameter *taxonomic-encoding* T "When T (NIL) enables (disables) concept encoding optimisation; default=T") (defparameter *gci-absorption* T "When T (NIL) enables (disables) GCI absorbtion optimisation; default=T") (defparameter *cyclical-definitions* T "When T (NIL) enables (disables) cyclical definitions for primitive concepts; default=T") (defparameter *auto-configure* T "When T (NIL) enables (disables) auto-confuguration of features; default=T") (defparameter *moms-heuristic* 0 "Selects the search heuristic: 0 = Oldest+JW, 1 = MOMS, 2 = Dependencies+JW; default=0") (defparameter *prefer-pos-lits* T "When T (NIL) MOMS heuristic prefers positive (negative) literals; default=T") ; NOTE value restrictions are always neg-lits (defparameter *minimise-clashes* T "When T (NIL) branch first on (negation of) highest priority literal; default=NIL") ; NOTE pos-lit minimises clashes, neg-lit maximises pruning (defparameter *sort-lists* T "When T (NIL) sorts successor list into oldest dependency order, otherwise reverses it; default=T") ;;; Features applicable to KSAT tests (defparameter *auto-install-primitives* T "When T (NIL) enables (disables) auto-installation of primitive concepts & roles; default=T") (defparameter *auto-install-classify* T "When T (NIL) enables (disables) classification of auto-installed concepts; default=T") (defparameter *auto-install-transitive* nil "When T (NIL) auto-installed roles are (are not) transitive => modal K4 (modal K); default=NIL") (defparameter *encode-reflexive* nil "When T (NIL) encoded concepts are (are not) reflexive => modal KT/S4 (modal K); default=NIL") ;;; Variables controlling debugging features (defparameter *debugging* nil "When T (NIL) enables (disables) debugging features; default=NIL") (defparameter *tsd* 0 "Caching recursion counter used in debugging output") (defparameter *already-backtracking* nil "Backtracking flag used for debugging") ;;; Variables controlling verbosity features (defparameter *verbosity* '(:rc-counts :test-counts :cache-counts :warnings :synonyms :reclassifying) "List of enabled verbosity features") ;;; Variables controlling profiling features (defparameter *profiling* 0 "Profiling level (0=disabled); default=0") (defparameter *profile-file* nil "When T (NIL) profiling output is written to file (console); default=NIL") (defparameter *profile-fname* "profile.out" "Name of profiling output file; default=profile.out") ;;; Variables used to gather profiling data (defparameter *start-time* 0) (defparameter *run-time* 0) (defparameter *model-size* 0) (defparameter *max-model-size* 0) (defparameter *model-depth* 0) (defparameter *max-model-depth* 0) (defparameter *search-space* 0) (defparameter *cache-accesses* 0) (defparameter *cache-hits* 0) (defparameter *caching-sat-tests* 0) (defparameter *total-sat-tests* 0) (defparameter *total-subs-tests* 0) (defparameter *cycle* nil) ;;; for KSAT tests (defparameter *total-model-size* 0) (defparameter *variable-assignments* 0) ;;; ************** DATA STRUCTURE ACCESSING ************** ;;; Macro to access *SYSTEM-CONCEPT-ARRAY* (defmacro s-concept (c) `(aref *system-concept-array* ,c)) ;;; Macros to access SYSTEM-CONCEPT structures in *SYSTEM-CONCEPT-ARRAY* (defmacro c-parents (c) `(system-concept-parents (s-concept ,c))) (defmacro c-children (c) `(system-concept-children (s-concept ,c))) (defmacro c-synonym (c) `(system-concept-synonym (s-concept ,c))) (defmacro c-definition (c) `(system-concept-definition (s-concept ,c))) (defmacro c-primitive (c) `(system-concept-primitive (s-concept ,c))) (defmacro c-mark1 (c) `(system-concept-mark1 (s-concept ,c))) (defmacro c-visited (c) `(system-concept-visited (s-concept ,c))) (defmacro c-model (c) `(system-concept-model (s-concept ,c))) (defmacro c-classified (c) `(system-concept-classified (s-concept ,c))) (defmacro c-asserted-supers (c) `(system-concept-asserted-supers (s-concept ,c))) (defmacro c-grail-name (c) `(system-concept-grail-name (s-concept ,c))) ;;; Functions to access SYSTEM-CONCEPT structures in *SYSTEM-CONCEPT-ARRAY* (defun c-grail-name-f (c) (system-concept-grail-name (s-concept c))) ;;; Macro to access *GRAIL-CONCEPT-TABLE* (defmacro g-concept (c) `(gethash ,c *grail-concept-table*)) ;;; Macros to access GRAIL-CONCEPT structures in *GRAIL-CONCEPT-TABLE* (defmacro g-definition (c) `(grail-concept-definition (g-concept ,c))) (defmacro g-primitive (c) `(grail-concept-primitive (g-concept ,c))) ;;; Macro to access *CONCEPT-DEFINITION-TABLE* (defmacro system-name (c) `(gethash ,c *concept-definition-table*)) ;;; Macro to access *RELATIONS* hash-table (defmacro r-defined (r) `(gethash ,r *relations*)) ;;; Macros to access ROLE structures in *RELATIONS* hash-table (defmacro r-parents (r) `(role-parents (gethash ,r *relations*))) (defmacro r-ancestors (r) `(role-ancestors (gethash ,r *relations*))) (defmacro r-f-ancestors (r) `(role-f-ancestors (gethash ,r *relations*))) (defmacro r-trans-across (r) `(role-transfered-by (gethash ,r *relations*))) (defmacro r-transfers (r) `(role-transfers (gethash ,r *relations*))) (defmacro r-inverse (r) `(role-grail-inv-name (gethash ,r *relations*))) (defmacro r-functional (r) `(role-functional (gethash ,r *relations*))) (defmacro r-processed (r) `(role-processed (gethash ,r *relations*))) ;;; Functions to access ROLE structures in *RELATIONS* hash-table (defun r-functional-f (r) (role-functional (gethash r *relations*))) (defun r-inverse-f (r) (role-grail-inv-name (gethash r *relations*))) (defun r-ancestors-f (r) (role-ancestors (gethash r *relations*))) (defun r-processed-f (r) (role-processed (gethash r *relations*))) ;;; Macros to access (CONSTRAINT.DEPENDENCY-LIST) structures (defmacro constraint (c-l) `(first ,c-l)) (defmacro level (c-l) `(second ,c-l)) ;;; Macro to negate concepts - flips zeroth bit (defmacro neg-con (c) `(logxor ,c 1)) ;;; Function to negate concepts - flips zeroth bit (defun neg-con-f (c) (logxor c 1)) ;;; ************** QUEUE IMPLEMENTATION FUNCTIONS ************** ;;; A queue is a (last . contents) pair (defun queue-contents (q) (cdr q)) (defun make-queue () "Build a new queue with no elements." (let ((q (cons nil nil))) (setf (car q) q))) (defun enqueue (item q) "insert item at the end of the queue." (setf (car q) (setf (rest (car q)) (cons item nil))) q) (defun dequeue (q) "Remove an item from the front of the queue." (pop (cdr q)) (if (null (cdr q)) (setf (car q) q)) q) (defun front (q) (first (queue-contents q))) (defun empty-queue-p (q) (null (queue-contents q))) (defun queue-nconc (q list) "add the elements of LIST to the end of the queue." (setf (car q) (last (setf (rest (car q)) list)))) (defun push-queue (item q) "insert item at the end of the queue." (rplaca q (cdr (rplacd (car q) (cons item nil)))) item) (defun pop-queue (q) "Remove an item from the front of the queue & return the item." (prog1 (pop (cdr q)) (if (null (cdr q)) (rplaca q q)))) ;;; ************** GRAIL ERROR HANDLER ************** (defun error-handler (&optional (f nil) (c nil) (s nil)) (if f (format t "~&!!ERROR!! in function ~S.~%" f) (format t "~&!!ERROR!!~%")) (cond ((eq c :bad-concept-defn) (format t "Concept definition:~% ~S~%is badly formed.~%" s)) ((eq c :bad-role-defn) (format t "Relation definition:~% ~S~%is badly formed.~%" s)) ((eq c :bad-concept-expansion) (format t "Problem expanding concept.~%")) ((eq c :undefined-concept) (format t "Concept:~% ~S~%is undefined.~%" s)) ((eq c :bad-relation-expansion) (format t "Problem expanding relation.~%")) ((eq c :undefined-relation) (format t "Relation:~% ~S~%is undefined.~%" s)) ((eq c :concept-redefinition) (format t "Concept: ~S is already defined.~%" s)) ((eq c :relation-redefinition) (format t "Relation: ~S is already defined.~%" s)) ((eq c :bad-name) (format t "Unacceptable concept/relation name: ~S~%" s)) ((eq c :non-primitive-r) (format t "Tried to define non-primitive relation: ~S~%" s)) ((eq c :is-is-primitive) (format t "Can only be one of :is :is-primitive: ~S~%" s)) ((eq c :implication) (format t "Can't find primitive in implication antecedant ~S~%" s)) ((eq c :recursive-definition) (format t "Recursive definition ~S~%" s)) (T (format t "Unspecified error~%"))) (break)) ;;; ************** CONCEPT ENCODING ************** (defun decode-concept (c) (if (atom c) (if (c-grail-name c) (c-grail-name c) (if (c-definition c) (decode-concept (c-definition c)) (decode-concept (list :not (neg-con c))))) (case (car c) ((:and :or) (cons (car c) (mapcar #'decode-concept (cdr c)))) ((:some :all) (list (car c) (second c) (decode-concept (third c)))) (:not (list (car c) (decode-concept (second c)))) (T (error "~&BAD CONCEPT DEFINITION - ~s~%" c))))) (defun flatten (d &optional and-or) (if (listp d) (case (car d) ((:and :or) (cond ((null and-or) (let ((d-flat (delete-duplicates (mapcan #'(lambda (x) (flatten x (car d))) (cdr d)) :test #'equal))) (if (eql (length d-flat) 1) (car d-flat) (cons (car d) d-flat)))) ((eq (car d) and-or) (mapcan #'(lambda (x) (flatten x and-or)) (cdr d))) (T (list (flatten d))))) ((:some :all) (if and-or (list (list (car d) (second d) (flatten (third d)))) (list (car d) (second d) (flatten (third d))))) (:not (if and-or (list (list :not (flatten (second d)))) (list :not (flatten (second d))))) (T)) (if and-or (list d) d))) (defun neg-normal (s) (cond ;; C => C ((atom s) s) ((eq (car s) :not) (cond ;; (:not :top) => :bottom ((eq (cadr s) :top) :bottom) ;; (:not :bottom) => :top ((eq (cadr s) :bottom) :top) ((listp (cadr s)) (cond ;; (:not (:and C D)) => (:or (:not C) (:not D)) ((eq (caadr s) :and) (cons :or (mapcar #'(lambda (x) (neg-normal (list :not x))) (cdadr s)))) ;; (:not (:or C D)) => (:and (:not C) (:not D)) ((eq (caadr s) :or) (cons :and (mapcar #'(lambda (x) (neg-normal (list :not x))) (cdadr s)))) ;; (:not (:not C)) => c ((eq (caadr s) :not) (neg-normal (cadadr s))) ;; (:not (:all R C)) => (:some R (:not C)) ((eq (caadr s) :all) (list :some (neg-normal (cadadr s)) (neg-normal (list :not (car (cddadr s)))))) ;; (:not (:some R C)) => (:all R (:not C)) ((eq (caadr s) :some) (list :all (neg-normal (cadadr s)) (neg-normal (list :not (car (cddadr s)))))) (T (error-handler 'neg-normal :bad-concept-defn s)))) ;; (:not C) => (:not C) (T s))) ;; if it doesn't start with a not neg-normal each component element (T (mapcar #'(lambda (x) (neg-normal x)) s)))) (defun neg-definition (d) (case (car d) (:and (cons :or (mapcar #'neg-con-f (cdr d)))) (:or (cons :and (mapcar #'neg-con-f (cdr d)))) (:some (list :all (second d) (neg-con (third d)))) (:all (list :some (second d) (neg-con (third d)))) (T (error "~&BAD CONCEPT TERM - ~S~%" d)))) (defun make-new-concept (c) (let ((n *next-available-concept*)) (setf (s-concept n) (make-system-concept :definition (when (listp c) c) :synonym n)) (setf (s-concept (1+ n)) (make-system-concept :definition (when (listp c) (neg-definition c)) :synonym (1+ n))) (when (and (listp c) (eq (car c) :and)) (setf (c-asserted-supers n) (cdr c)) (dolist (c-sup (cdr c)) (push (neg-con n) (c-asserted-supers (neg-con c-sup))))) (incf *next-available-concept* 2) n)) (defun install-concept (c) (let ((name (system-name c))) (if name name (setf (system-name c) (make-new-concept c))))) (defun encode-and (l) (let ((e-l)) (dolist (c (cdr l)) (let ((e-c (encode-concept-term c))) (cond ((or (eql e-c *BOTTOM*) (member (neg-con e-c) e-l)) (return-from encode-and *BOTTOM*)) ((eql e-c *TOP*)) (T (pushnew e-c e-l))))) (cond ((cdr e-l) (install-concept (cons :and (sort e-l #'<)))) (e-l (car e-l)) (T *TOP*)))) (defun encode-or (l) (let ((e-l)) (dolist (c (cdr l)) (let ((e-c (neg-con (encode-concept-term c)))) (cond ((or (eql e-c *BOTTOM*) (member (neg-con e-c) e-l)) (return-from encode-or *BOTTOM*)) ((eql e-c *TOP*)) (T (pushnew e-c e-l))))) (cond ((cdr e-l) (install-concept (cons :and (sort e-l #'<)))) (e-l (car e-l)) (T *TOP*)))) (defun encode-concept-term (c) (if (atom c) (let ((s-n (system-name c))) (if s-n s-n (if *auto-install-primitives* (if (and *auto-install-classify* (not (numberp c))) (progn (if (not (g-concept c)) (grail-define-primconcept c)) ;;; (install-concept c) (encode-grail-concept c) (setf s-n (system-name c))) (progn (setf s-n (install-concept c)) (setf (c-primitive s-n) T) (setf (c-grail-name s-n) c) s-n)) (error "TRIED TO ENCODE UNDEFINED CONCEPT - ~S" c)))) (case (car c) (:and (if *taxonomic-encoding* (encode-and c) (make-new-concept (cons :and (mapcar #'encode-concept-term (cdr c)))))) (:or (neg-con (if *taxonomic-encoding* (encode-or c) (make-new-concept (cons :and (mapcar #'(lambda (c1) (neg-con (encode-concept-term c1))) (cdr c))))))) (:some (let ((ec (encode-concept-term (third c)))) (unless (r-defined (second c)) (if *auto-install-primitives* (progn (defprimrole-f (second c) :transitive *auto-install-transitive*) (process-role (second c))) (error "TRIED TO ENCODE TERM WITH UNDEFINED ROLE - ~S" c))) (if (and *taxonomic-encoding* (eql ec *BOTTOM*)) *BOTTOM* (if *taxonomic-encoding* (if *encode-reflexive* (neg-con (install-concept (list :and (neg-con ec) (neg-con (install-concept (list :some (second c) ec)))))) (install-concept (list :some (second c) ec))) (if *encode-reflexive* (neg-con (make-new-concept (list :and (neg-con ec) (neg-con (make-new-concept (list :some (second c) ec)))))) (make-new-concept (list :some (second c) ec))))))) (:all (let ((ec (neg-con (encode-concept-term (third c))))) (unless (r-defined (second c)) (if *auto-install-primitives* (progn (defprimrole-f (second c) :transitive *auto-install-transitive*) (process-role (second c))) (error "TRIED TO ENCODE TERM WITH UNDEFINED ROLE - ~S" c))) (if (and *taxonomic-encoding* (eql ec *BOTTOM*)) *TOP* (if *taxonomic-encoding* (if *encode-reflexive* (install-concept (list :and (neg-con ec) (neg-con (install-concept (list :some (second c) ec))))) (neg-con (install-concept (list :some (second c) ec)))) (if *encode-reflexive* (make-new-concept (list :and (neg-con ec) (neg-con (make-new-concept (list :some (second c) ec))))) (neg-con (make-new-concept (list :some (second c) ec)))))))) (:not (neg-con (encode-concept-term (second c)))) (T (error "BAD CONCEPT TERM - ~S" c))))) (defun encode-grail-concept (c) ;;; do nothing if its already encoded or if it isn't a defined GRAIL concept - in this ;;; latter case encode-concept-term will install it as a primitive or signal and error ;;; depending on the setting of *auto-install-primitives* (unless (or (system-name c) (not (or (numberp c) (g-concept c)))) (verbosity '(:classify-1 :classify-2) "c") ;;; numbers are treated as atomic primitives (if (numberp c) (let ((s-n (install-concept c))) (setf (c-primitive s-n) t) (setf (c-grail-name s-n) c)) (let ((g-d (g-definition c))) (if (g-primitive c) ;;; install c first in case its defn is cyclical (let ((s-n (install-concept c))) ;;; recursively encode all concepts c refers to (map nil #'encode-grail-concept (directly-refers-to g-d)) (let ((c-d (when g-d (encode-concept-term g-d)))) (cond ((and c-d (eql c-d *BOTTOM*)) (verbosity :warnings "~&!!WARNING!! ~A is INCOHERENT~%" c) (setf (system-name c) *BOTTOM*) (setf (c-definition s-n) *BOTTOM*) (setf (c-synonym s-n) *BOTTOM*) (setf (c-definition (neg-con s-n)) *TOP*) (setf (c-synonym (neg-con s-n)) *TOP*)) (T (setf (c-definition s-n) c-d) (setf (c-primitive s-n) t) (setf (c-classified s-n) 1) (when c-d (setf (c-asserted-supers s-n) (list c-d))) (setf (c-grail-name s-n) c))))) (progn ;;; recursively encode all concepts c refers to (map nil #'encode-grail-concept (directly-refers-to g-d)) (let ((c-d (encode-concept-term g-d))) (when (eql c-d *BOTTOM*) (verbosity :warnings "~&!!WARNING!! ~A is INCOHERENT~%" c)) (setf (system-name c) c-d) (when (zerop (c-classified c-d)) (setf (c-classified c-d) 1)) (if (c-grail-name c-d) (when (not (eq c (c-grail-name c-d))) (verbosity :synonyms "~&!!NOTE!! ~A is a SYNONYM for ~A~%" c (c-grail-name c-d))) (setf (c-grail-name c-d) c))))))))) (defun encode-all-concepts () (verbosity '(:classify-1 :classify-2) "~&~%Encoding concept terms: ") (map nil #'encode-grail-concept *c-definitions*) (when *grail-universal-constraints* (let ((e-u-c (encode-concept-term *grail-universal-constraints*))) (unless (eql e-u-c *TOP*) (if *universal-constraint* (if (or (eql e-u-c *BOTTOM*) (eql *universal-constraint* *BOTTOM*) (eql e-u-c (neg-con *universal-constraint*))) (setf *universal-constraint* *BOTTOM*) (install-concept (cons :and (sort (list e-u-c *universal-constraint*) #'<)))) (setf *universal-constraint* e-u-c)))) (setf *grail-universal-constraints* nil))) ;;; ************** GRAIL interface ************** (defun directly-refers-to (c) (if (atom c) (unless (null c) (list c)) (case (car c) ((:and :or) (mapcan #'directly-refers-to (cdr c))) ((:some :all) (directly-refers-to (third c))) (:not (directly-refers-to (second c))) (T (error "~&BAD CONCEPT DEFINITION - ~S~%" C))))) (defun refers-to (c1 c2 expand-primitives &optional (visited (gensym))) (cond ((or (null c1) (numberp c1)) nil) ((atom c1) (unless (eq (get c1 'visited) visited) (setf (get c1 'visited) visited) (or (eql c1 c2) (and (g-concept c1) (or expand-primitives (not (g-primitive c1))) (refers-to (g-definition c1) c2 expand-primitives visited))))) (T (case (car c1) ((:and :or) (some #'(lambda (c) (refers-to c c2 expand-primitives visited)) (cdr c1))) ((:some :all) (refers-to (caddr c1) c2 expand-primitives visited)) (:not (refers-to (cadr c1) c2 expand-primitives visited)) (T (error-handler 'refers-to :bad-concept-defn c1)))))) (defun grail-define-relation (r i-r p func i-func) (unless (verbosity :classify-2 "~&~A~%" r) (verbosity :classify-1 (if func "A" "R"))) (cond ((numberp r) (error-handler 'grail-define-relation :bad-name r)) ((r-defined r) (error-handler 'grail-define-relation :relation-redefinition r)) (T (setf *r-definitions* (nconc *r-definitions* (list r))) (setf (gethash r *relations*) (make-role :grail-name r :grail-inv-name i-r :parents p :functional func)) (unless (eql r i-r) (setf (gethash i-r *relations*) (make-role :grail-name i-r :grail-inv-name r :functional i-func))))) (car (multiple-value-list (gethash r *relations*)))) (defun grail-redefine-relation (r &key (parents nil) (transitive-across nil)) (verbosity :classify-1 "+") (cond ((r-defined r) (let ((r-defn (gethash r *relations*))) (when parents (setf (role-parents r-defn) (nunion parents (role-parents r-defn)))) (when transitive-across (setf *transitive-roles* T) (setf (role-transfered-by r-defn) (nunion transitive-across (role-transfered-by r-defn)))))) (T (error-handler 'grail-define-relation :undefined-relation r))) (car (multiple-value-list (gethash r *relations*)))) (defun grail-define-implication (d i) (verbosity '(:classify-1 :classify-2) "I") (setf *implications* (nconc *implications* `((,d .,i)))) d) (defun grail-define-concept (n d) (cond ((numberp n) (error-handler 'grail-define-concept :bad-name n)) ((g-concept n) (error-handler 'grail-define-concept :concept-redefinition n)) ;;; convert cyclical definitions into GCIs + primitive ((refers-to d n (not *cyclical-definitions*)) (verbosity :notes "~&!NOTE! cyclical concept ~S - definition converted to GCIs.~%" n) (grail-define-implication n d) (grail-define-implication d n) (grail-define-primconcept n)) (T (unless (verbosity :classify-2 "~&~A~%" n) (verbosity :classify-1 "C")) (setf *c-definitions* (nconc *c-definitions* (list n))) (setf (g-concept n) (make-grail-concept :definition (flatten (neg-normal d)) :name n))))) (defun grail-define-primconcept (n &optional (d nil)) (cond ((numberp n) (error-handler 'grail-define-primconcept :bad-name n)) ((g-concept n) (error-handler 'grail-define-primconcept :concept-redefinition n)) (T (unless (verbosity :classify-2 "~&~A~%" n) (verbosity :classify-1 "P")) (when (refers-to d n (not *cyclical-definitions*)) (if *cyclical-definitions* (verbosity :notes "~&!NOTE! cyclical primitive concept ~S~%" n) (progn (verbosity :notes "~&!NOTE! cyclical concept ~S - definition converted to GCI.~%" n) (grail-define-implication n d) (setf d nil)))) (setf *c-definitions* (nconc *c-definitions* (list n))) (setf (g-concept n) (make-grail-concept :definition (when d (flatten (neg-normal d))) :primitive T :name n))))) ;;; ************** ROLE & GCI PRE-PROCESSING ************** ;;; IN-FaCT stuff (defvar *double-blocking* nil) (defun inv-r (r) (let ((pnr (symbol-name r))) (if (and (> (length pnr) 3) (equal (subseq pnr 0 3) "*I*")) (intern (subseq pnr 3)) (intern (format nil "*I*~A" pnr))))) (defun abs-r (r) (let ((pnr (symbol-name r))) (if (and (> (length pnr) 3) (equal (subseq pnr 0 3) "*I*")) (intern (subseq pnr 3)) r))) (defun r-check-installed (r) (if (not (r-defined (abs-r r))) (if *auto-install-primitives* (defprimrole-f (abs-r r)) (error "UNDEFINED ROLE - ~S" r)) T)) (defun r-make-symetrical (r) (setf (r-parents r) (union (r-parents r) (mapcar #'r-inverse-f (r-parents (r-inverse r))))) (mapc #'r-check-installed (r-parents r)) (setf (r-parents (r-inverse r)) (mapcar #'r-inverse-f (r-parents r)))) (defun r-get-ancestors (r &optional (a (list r))) (dolist (r1 (r-parents r) a) (if (not (member r1 a)) (setf a (r-get-ancestors r1 (cons r1 a)))))) (defun r-get-equivalents (r) (mapcan #'(lambda (r1) (if (member r (r-get-ancestors r1)) (list r1))) (r-get-ancestors r))) (defun r-check-functional (r) (when (and (not (r-functional r)) (some #'r-functional-f (r-ancestors r))) (verbosity :warnings "~&!!WARNING!! role ~S has attribute ancestor ~S - fixed.~%" r (car (member-if #'r-functional-f (r-ancestors r)))) (setf (role-functional r) T))) (defun r-check-non-functional (r) ;;; For iFaCT, only leaves can be functional (if (string= *reasoner* "iFaCT") (let ((r-equivalents (r-get-equivalents r))) (dolist (r1 (r-ancestors r)) (when (and (r-functional r1) (not (member r1 r-equivalents))) (verbosity :warnings "~&!!WARNING!! role ~S has attribute ancestor ~S - fixed.~%" r r1) (setf (r-functional r1) nil)))))) (defun r-check-transitive (r) ;;; For iFaCT, only leaves can be functional (when (and (r-functional r) (r-trans-across r)) (verbosity :warnings "~&!!WARNING!! attribute ~S is transitive - fixed.~%" r) (setf (r-trans-across r) nil) (setf (r-trans-across (r-inverse r)) nil))) (defun process-role (r) (setf (r-ancestors r) (r-get-ancestors r)) (setf (r-ancestors (r-inverse r)) (mapcar #'r-inverse-f (r-ancestors r))) ;;; force role to be functional if it has a functional ancestor (r-check-functional r) (r-check-functional (r-inverse r)) ;;; force role to be non-functional if it isn't a leaf (iFaCT only) (r-check-non-functional r) (r-check-non-functional (r-inverse r)) ;;; force functional roles to be non-transitive (r-check-transitive r) (r-check-transitive (r-inverse r)) ;;; add r to (r-transfers r1) for every r1 in (r-trans-across r) (dolist (r1 (r-trans-across r)) (pushnew r (r-transfers r1))) (dolist (r1 (r-trans-across (r-inverse r))) (pushnew r (r-transfers (r-inverse r1)))) ;;; set f-ancestors for role (when (r-functional r) (setf (r-f-ancestors r) (delete-if-not #'r-functional-f (copy-list (r-ancestors r))))) (when (r-functional (r-inverse r)) (setf (r-f-ancestors (r-inverse r)) (delete-if-not #'r-functional-f (copy-list (r-ancestors (r-inverse r)))))) (setf (r-processed r) T)) (defun classify-all-roles () (verbosity '(:classify-1 :classify-2) "~&~%Pre-processing roles: ") (mapc #'R-MAKE-SYMETRICAL *r-definitions*) (mapc #'process-role *r-definitions*)) (defun reclassify-all-roles () (dolist (r *r-definitions*) (setf (r-processed r) nil)) (classify-all-roles)) (defun get-index-p (d i) (let ((x-d (list (list :not d) i)) (p :top) c) (when *gci-absorption* (loop (setf c (car (member-if #'(lambda (x) (and (listp x) (eq (first x) :not) (atom (second x)) (g-primitive (second x)))) x-d))) (when c (setf p (second c)) (setf x-d (delete c x-d)) (return)) (setf c nil) (setf x-d (mapcan #'(lambda (x) (cond (c (list x)) ((and (listp x) (eq (first x) :not) (atom (second x)) (not (g-primitive (second x))) (listp (g-definition (second x))) (eq (car (g-definition (second x))) :and)) (setf c (cdr (neg-normal (list :not (g-definition (second x)))))) nil) ((and (listp x) (eq (first x) :not) (atom (second x)) (not (g-primitive (second x))) (atom (g-definition (second x)))) (setf c (list (list :not (g-definition (second x))))) nil) ((and (atom x) (not (g-primitive x)) (listp (g-definition x)) (eq (car (g-definition x)) :or)) (setf c (cdr (g-definition x))) nil) ((and (atom x) (not (g-primitive x)) (atom (g-definition x))) (setf c (list (g-definition x))) nil) ((and (listp x) (eq (first x) :not) (listp (second x)) (eq (first (second x)) :and)) (setf c (cdr (neg-normal (list :not (second x))))) nil) ((and (listp x) (eq (first x) :or)) (setf c (cdr x)) nil) (T (list x)))) x-d)) (if c (setf x-d (append c x-d)) (return))) (when (eq p :top) (verbosity :notes "~&!!NOTE!! GCI: ~S => ~S~%cannot be absorbed into primitive definition.~%" d i))) (if (cdr x-d) (values p (cons :or x-d)) (values p (car x-d))))) (defun reclassify-implication (d i) (let ((d-enc (encode-concept-term d)) (i-enc (encode-concept-term i))) (cond ;;; if i is an atomic primitive try to convert a primitive to a non-primitive. ((and (atom i) (g-primitive i) *gci-absorption* (g-definition i) (eql (encode-concept-term (g-definition i)) d-enc) (not (eql d :top)) (not (eql d :bottom)) (not (refers-to d i (not *cyclical-definitions*)))) (verbosity '(:classify-1 :classify-2) "x") (setf (g-primitive i) nil) ;;; Changing definition of i so remove mapping to encoded concept (setf (system-name i) nil)) ;;; if d is an atomic primitive add i to its definition. ((and (atom d) (g-primitive d) *gci-absorption* (not (eql d :top)) (not (eql d :bottom)) (or *cyclical-definitions* (not (refers-to i d T)))) (verbosity '(:classify-1 :classify-2) "p") (setf (g-definition d) (flatten (neg-normal (if (g-definition d) `(:and ,(g-definition d) ,i) i)))) ;;; Changing definition of d so remove mapping to encoded concept (setf (system-name d) nil)) (T (multiple-value-bind (p c) (get-index-p d i) (if (or (eq p :top) (and (not *cyclical-definitions*) (refers-to c p T))) (progn (verbosity '(:classify-1 :classify-2) "i") (when (not (eq p :top)) (verbosity :notes "~&!NOTE! cyclical implication ~S -> ~S not absorbed into primitive definition~%" d i)) (setf *grail-universal-constraints* (if *grail-universal-constraints* `(:and ,*grail-universal-constraints* ,c) c))) (progn (verbosity '(:classify-1 :classify-2) "p") ;;; Changing definition of p so remove mapping to encoded concept (setf (system-name p) nil) (setf (g-definition p) (flatten (neg-normal (if (g-definition p) `(:and ,(g-definition p) ,c) c))))))))))) (defun reclassify-all-implications () (when *implications* (verbosity '(:classify-1 :classify-2) "~&~%Pre-processing General Inclusion Axioms: ") ;;; Need to re-do all encoding when definitions change (reset-kb) (let (rhp) (dolist (i *implications*) (if (and (atom (rest i)) (not (atom (first i)))) (pushnew (rest i) rhp) (reclassify-implication (first i) (rest i)))) (dolist (c rhp) (reclassify-implication (flatten (neg-normal (cons :or (mapcan #'(lambda (i) (if (eql c (rest i)) (list (first i)))) *implications*)))) c))) (setf *grail-universal-constraints* (flatten (neg-normal *grail-universal-constraints*))) (setf *implications* nil) ;;; Need to re-do all encoding when definitions change (reset-kb))) ;;; ************** CLASSIFICATION ************** (defun c-insert-node (n) (let ((p (c-parents n)) (c (c-children n))) (dolist (x p) (setf (c-children x ) (cons n (set-difference (c-children x) c)))) (dolist (x c) (setf (c-parents x) (cons n (set-difference (c-parents x) p))))) n) (defun mark-all-ancestors (c v) (setf c (c-synonym c)) (unless (eq (c-mark1 c) v) (setf (c-mark1 c) v) (dolist (p (c-parents c)) (mark-all-ancestors p v)))) (defun mark-all-descendants (c v) (setf c (c-synonym c)) (unless (eq (c-mark1 c) v) (setf (c-mark1 c) v) (dolist (p (c-children c)) (mark-all-descendants p v))) v) (defun simple-top-subs (y c subsumer non-subsumer) "Returns T if y subsumes c" (cond ((eq (c-mark1 y) non-subsumer) nil) ((eq (c-mark1 y) subsumer)) ((every #'(lambda (p) (simple-top-subs p c subsumer non-subsumer)) (c-parents y)) (cond ((test-subsumes y c) (setf (c-mark1 y) subsumer)) (T (setf (c-mark1 y) non-subsumer) nil))))) (defun direct-parents (root concept &optional (subsumer (gensym)) (non-subsumer (gensym)) (visited (gensym))) (setf (c-visited root) visited) (let ((s-c (remove-if-not #'(lambda (c) (simple-top-subs c concept subsumer non-subsumer)) (c-children root)))) (cond ((null s-c) (list root)) (T (mapcan #'(lambda (c) (unless (eq (c-visited c) visited) (direct-parents c concept subsumer non-subsumer visited))) s-c))))) (defun mps-recurse (c possible-subsumee &optional (visited (gensym)) (new-p-s (gensym))) (cond ((or (eq (c-mark1 c) visited) (eq (c-mark1 c) new-p-s))) ;;; just return - we've been here before ((eq (c-mark1 c) possible-subsumee) ;;; a node which is a descendant of all so far ;;; ...mark it and all its descendants with the new possible-subsumee marker (mark-all-descendants c new-p-s)) (T ;;; any other node not yet visited on this traversal (setf (c-mark1 c) visited) ;;; recursively search list of children (dolist (c-c (c-children c)) (mps-recurse c-c possible-subsumee visited new-p-s)))) new-p-s) (defun mark-possible-subsumees (c-list) (let ((possible-subsumee (gensym))) ;;; ...mark all descendants of 1st concept in list as possible subsumees (dolist (c (c-children (car c-list))) (mark-all-descendants c possible-subsumee)) (dolist (c (cdr c-list) possible-subsumee) (setf possible-subsumee (mps-recurse c possible-subsumee))))) (defun unmark-possible-subsumees (c possible-subsumee) ;;; when c is marked as a possible subsumee (when (eq (c-mark1 c) possible-subsumee) ;;; ...clear marker to nil (setf (c-mark1 c) nil) ;;; ...recursively unmark all parents (dolist (p (c-parents c)) (unmark-possible-subsumees p possible-subsumee)))) (defun direct-children (p-list concept) (let ((search-q (enqueue *BOTTOM* (make-queue))) child-list (possible-subsumee (mark-possible-subsumees p-list)) (marked-subsumee (gensym)) (visited-subsumee (gensym))) ;;; start searching through q (loop ;;; terminate when q is empty and return list of children (when (empty-queue-p search-q) (return child-list)) ;;; examine concept on top of q (let* ((c (pop-queue search-q)) s-c) ;;; unless it has parents which are subsumees ... (unless ;;; loop through list of parents (dolist (p (c-parents c) s-c) (cond ;;; if its a marked subsumee ((eq (c-mark1 p) marked-subsumee) ;;; ...unless its already been visited (unless (eq (c-visited p) visited-subsumee) ;;; ...mark it as visited (setf (c-visited p) visited-subsumee) ;;; ...add it to the back of the search queue (enqueue p search-q)) ;;; ...set s-c flag to show subsumee parents were found (setf s-c T)) ;;; if its marked as a possible subsumee ((eq (c-mark1 p) possible-subsumee) ;;; need to do a subsumption test (cond ;;; if it is a subsumee... ((test-subsumes concept p) ;;; ...mark all descendants as subsumees (mark-all-descendants p marked-subsumee) ;;; ...mark it as a visited subsumee (setf (c-visited p) visited-subsumee) ;;; ...add it to the back of the search queue (enqueue p search-q) ;;; ...set s-c flag to show subsumee parents were found (setf s-c T)) ;;; if its not a subsumee... (T ;;; ...unmark all ancestors as possible subsumees (unmark-possible-subsumees p possible-subsumee)))) ;;; if its outside the range of possible subsumees do nothing (T))) ;;; ...(unless it has parents which are subsumees) ;;; push it onto the list of children (push c child-list)))))) (defun classify-con (c &key (install T)) (let ((subsumer (gensym)) (start-time (get-internal-run-time)) (start-sat *total-sat-tests*) (start-sub *total-subs-tests*)) (when (> *profiling* 0) (if *profile-file* (format *profile-file* "(~S (" (c-grail-name c)) (format T "~&Classify - ~S" (c-grail-name c)))) (map nil #'(lambda (c2) (mark-all-ancestors c2 subsumer)) (c-asserted-supers c)) (setf (c-parents c) (direct-parents *TOP* c subsumer)) (cond ;;; check if c is coherent ((eql (car (c-parents c)) *BOTTOM*) (verbosity :warnings "~&!!WARNING!! ~A is INCOHERENT~%" (decode-concept c)) (setf (system-name (c-grail-name c)) *BOTTOM*) (setf (c-synonym c) *BOTTOM*) (setf (c-primitive c) nil) (setf (c-definition c) *BOTTOM*) (setf (c-asserted-supers c) (list *BOTTOM*)) (setf (c-parents c) nil) ;;; If there is a *universal-constraint* we have to be careful not to clear its ;;; definition when we discover that (not *universal-constraint*) = *BOTTOM* (unless (eql (neg-con c) *universal-constraint*) (setf (c-synonym (neg-con c)) *TOP*) (setf (c-primitive (neg-con c)) nil) (setf (c-definition (neg-con c)) *TOP*) (setf (c-asserted-supers (neg-con c)) nil) (setf (c-parents (neg-con c)) nil))) ;;; check if c is a synonym ((and (= (length (c-parents c)) 1) (test-subsumes c (car (c-parents c)))) (let ((s-c (car (c-parents c)))) (unless (verbosity :synonyms "~&!!NOTE!! ~A is a SYNONYM for ~A~%" (c-grail-name c) (c-grail-name s-c)) (unless (verbosity :classify-2 "~&~A-S~%" (c-grail-name c)) (verbosity :classify-1 "S"))) (setf (system-name (c-grail-name c)) s-c) ; (setf (c-synonym c) s-c) ;;; (setf (c-definition c) s-c) ; (setf (c-asserted-supers c) (list s-c)) ; (setf (c-parents c) nil) ; (setf (c-synonym (neg-con c)) (neg-con s-c)) ;;; (setf (c-definition (neg-con c)) (neg-con s-c)) ; (setf (c-asserted-supers (neg-con c)) (list (neg-con s-c))) ; (setf (c-parents (neg-con c)) nil) )) (T (unless (verbosity :classify-2 (if (c-primitive c) "~&~A-P~%" "~&~A-C~%") (c-grail-name c)) (verbosity :classify-1 (if (c-primitive c) "P" "C"))) (setf (c-children c) (direct-children (c-parents c) c)) (when install (c-insert-node c)))) (when (> *profiling* 0) (if *profile-file* (format *profile-file* ")~%~,3F ~D ~D)~%" (/ (- (get-internal-run-time) start-time) internal-time-units-per-second) (- *total-subs-tests* start-sub) (- *total-sat-tests* start-sat)) (format T "~&~10F ~6D ~6D" (/ (- (get-internal-run-time) start-time) internal-time-units-per-second) (- *total-subs-tests* start-sub) (- *total-sat-tests* start-sat)))))) (defun ordered-classify-concept (c &optional subs) (when (member c subs) (return-from ordered-classify-concept)) (unless (eql (c-classified c) 2) (dolist (c1 (c-asserted-supers c)) (ordered-classify-concept c1 (cons c subs))) (when (eql (c-classified c) 1) (classify-con c) (setf (c-classified c) 2)))) (defun auto-configure () (when *auto-configure* (when (and *transitivity* (not *transitive-roles*)) (setf *transitivity* nil) (verbosity :notes "~&!NOTE! transitivity switched OFF (no transitive roles)~%")) ; (when (and *concept-eqn* (not *universal-constraint*)) ; (setf *concept-eqn* nil) ; (verbosity :notes "~&!NOTE! GCI constraints switched OFF (no GCIs)~%")) ; (when (and *blocking* (not *transitivity*) (not *concept-eqn*)) ; (setf *blocking* nil) ; (verbosity :notes ; "~&!NOTE! blocking switched OFF (no transitive roles or GCIs)~%")) )) (defun classify-all-concepts () (when (> *profiling* 0) (profile-open)) (progv '(*transitivity* *concept-eqn* *blocking*) `(,*transitivity* ,*concept-eqn* ,*blocking*) (setf *search-space* 0) (setf *total-sat-tests* 0) (setf *total-subs-tests* 0) (setf *cache-accesses* 0) (setf *cache-hits* 0) (setf *caching-sat-tests* 0) (auto-configure) (if (> *profiling* 0) (features *profile-file*) (when (verbosity :features "") (features))) (verbosity :reclassifying "~&~%CLASSIFYING KNOWLEDGE BASE:~%") (let ((start-time (get-internal-run-time)) r-t i-t e-t1 e-t2) (classify-all-roles) (setf r-t (get-internal-run-time)) ; (encode-all-concepts) (setf e-t1 (get-internal-run-time)) (reclassify-all-implications) (setf i-t (get-internal-run-time)) (encode-all-concepts) (setf e-t2 (get-internal-run-time)) (when (> *profiling* 0) (format (if *profile-file* *profile-file* T) "~&; process roles = ~F; process GCIs = ~F; encode concepts = ~F~%" (/ (- r-t start-time) internal-time-units-per-second) (/ (- i-t e-t1) internal-time-units-per-second) (/ (+ (- e-t1 r-t) (- e-t2 i-t)) internal-time-units-per-second)))) (verbosity '(:classify-1 :classify-2) "~&~%Classifying concepts: ") (dolist (c *c-definitions*) (ordered-classify-concept (system-name c)))) (when (> *profiling* 0) (profile-close)) (verbosity :rc-counts "~&~%~D roles.~%~D concepts.~%" (length *r-definitions*) (length *c-definitions*)) (verbosity :test-counts "~&~%~D subsumption tests.~%~D satisfiability tests.~%" *total-subs-tests* *total-sat-tests*) (verbosity :cache-counts "~&~%~D cache hits (~,1F%).~%~D cache misses (~,1F%).~%~D caching satisfiability tests~%" *cache-hits* (if (zerop *cache-accesses*) 0 (/ (* 100 *cache-hits*) *cache-accesses*)) (- *cache-accesses* *cache-hits*) (if (zerop *cache-accesses*) 0 (/ (* 100 (- *cache-accesses* *cache-hits*)) *cache-accesses*)) *caching-sat-tests*) ;;; (values) ;;; return T if KB is consistent, NIL otherwise (if (test-sat *TOP*) T nil)) (defun reclassify-all-concepts () (reset-kb) (classify-all-concepts)) ;;; ************** KB MANAGEMENT ************** (defun reset-kb () "Re-initialise hierarchy, encoding and caching" (setf *next-available-concept* 2) (setf (s-concept *TOP*) (make-system-concept :children `(,*BOTTOM*) :classified 2 :synonym *TOP* :grail-name :top)) (setf (s-concept *BOTTOM*) (make-system-concept :parents `(,*TOP*) :classified 2 :synonym *BOTTOM* :grail-name :bottom)) (setf (g-concept :TOP) (make-grail-concept :name '*TOP* :definition '*TOP* :primitive T)) (setf (g-concept :BOTTOM) (make-grail-concept :name '*BOTTOM* :definition '*BOTTOM* :primitive T)) (clrhash *concept-definition-table*) ;;; Map GRAIL built in names for top and bottom concepts (setf (system-name :top) *TOP*) (setf (system-name :bottom) *BOTTOM*) (setf *tsd* 0)) (defun clear-kb () "Initialise KB to contain only *TOP* and *BOTTOM*" (setf *kb-file-names* nil) (clrhash *grail-concept-table*) (setf *c-definitions* nil) (setf *next-available-concept* 2) (setf (s-concept *TOP*) (make-system-concept :children `(,*BOTTOM*) :classified 2 :synonym *TOP* :grail-name :top)) (setf (s-concept *BOTTOM*) (make-system-concept :parents `(,*TOP*) :classified 2 :synonym *BOTTOM* :grail-name :bottom)) (setf (g-concept :TOP) (make-grail-concept :name '*TOP* :definition '*TOP* :primitive T)) (setf (g-concept :BOTTOM) (make-grail-concept :name '*BOTTOM* :definition '*BOTTOM* :primitive T)) (clrhash *concept-definition-table*) ;;; Map GRAIL built in names for top and bottom concepts (setf (system-name :top) *TOP*) (setf (system-name :bottom) *BOTTOM*) (clrhash *relations*) (setf *r-definitions* nil) (setf *transitive-roles* nil) (setf *universal-constraint* nil) (setf *grail-universal-constraints* nil) (setf *implications* nil) (values)) (defun list-kb () (format t "~&CONCEPTS: ~S~%RELATIONS: ~S~%" *c-definitions* *r-definitions*) (values)) (defun load-kb (&optional (i-fname "galen-core.lisp")) (clear-kb) (push (namestring (probe-file i-fname)) *kb-file-names*) (load i-fname)) (defun grail-name-list (l) (mapcar #'(lambda (c) (if (c-grail-name c) (c-grail-name c) (error "~&!!ERROR!! No grail name - ~S~%" c))) l)) (defun dump-taxonomy (&optional (o-fname "taxonomy.dump") &key (features t)) (let ((o-f (open o-fname :direction :output :if-exists :supersede))) (when features (features o-f)) (print (list :top (grail-name-list (c-parents *TOP*)) (grail-name-list (c-children *TOP*))) o-f) (dolist (d *c-definitions*) (let ((d-s (system-name d))) (when (or (c-parents d-s) (c-children d-s)) (print (list d (grail-name-list (c-parents d-s)) (grail-name-list (c-children d-s))) o-f)))) (print (list :bottom (grail-name-list (c-parents *BOTTOM*)) (grail-name-list (c-children *BOTTOM*))) o-f) (terpri o-f) (close o-f))) (defun dump-roles (&optional (o-fname "roles.dump") &key (features nil)) (let ((o-f (open o-fname :direction :output :if-exists :supersede))) (when features (features o-f)) (dolist (r *r-definitions*) (print (list r (r-parents r) (r-ancestors r) (r-functional r) (r-trans-across r) (r-transfers r) (r-inverse r)) o-f) (let ((i-r (r-inverse r))) (print (list i-r (r-parents i-r) (r-ancestors i-r) (r-functional i-r) (r-trans-across i-r) (r-transfers i-r) (r-inverse i-r)) o-f))) (close o-f))) (defparameter *synonyms* nil) (defparameter *scramble* nil) (defparameter *scnum* 0) (defparameter *cname-hash* (make-hash-table)) (defparameter *srnum* 0) (defparameter *rname-hash* (make-hash-table)) (defparameter *w-hash* (make-hash-table)) (defun scramble-con (c) (unless *synonyms* (setf c (if (system-name c) (c-grail-name (system-name c)) c))) (if *scramble* (or (gethash c *cname-hash*) (setf (gethash c *cname-hash*) (intern (format nil "C~S" (incf *scnum*))))) c)) (defun scramble-role (r) (if *scramble* (or (gethash r *rname-hash*) (setf (gethash r *rname-hash*) (intern (format nil "R~S" (incf *srnum*))))) r)) (defun transitive-disjunction (s-a r c &optional expanded) (cond ((member r expanded) nil) (T (let ((x-r (delete nil (mapcar #'(lambda (s) (let ((t-d (transitive-disjunction s-a s c (cons r expanded)))) (when t-d (list s-a (scramble-role r) t-d)))) (r-trans-across r))))) (if x-r (list* (if (eq s-a 'some) 'or 'and) (list s-a (scramble-role r) c) x-r) (list s-a (scramble-role r) c)))))) (defun kris-concept (c &optional (refinement nil)) (cond ((listp c) (case (car c) ((:and and) (cons 'and (mapcar #'(lambda (x) (kris-concept x refinement)) (cdr c)))) ((:or or) (cons 'or (mapcar #'(lambda (x) (kris-concept x refinement)) (cdr c)))) ((:some some) (if refinement (transitive-disjunction 'some (second c) (kris-concept (third c) refinement)) (list 'some (scramble-role (second c)) (kris-concept (third c) refinement)))) ((:all all) (if refinement (transitive-disjunction 'all (second c) (kris-concept (third c) refinement)) (list 'all (scramble-role (second c)) (kris-concept (third c) refinement)))) ((:not not) (list 'not (kris-concept (second c) refinement))) (t (error "UN-TRANSLATABLE CONCEPT - ~S" c)))) (T (case c (:top '*TOP*) (:bottom '*BOTTOM*) (t (scramble-con c)))))) (defun export-kris-role (r o-f alc trans) (format o-f "(defprim~A ~S" (if (and (r-functional r) (not alc)) "attribute" "role") (scramble-role r)) (if trans (if (member r (r-trans-across r)) (format o-f " :parents ~S :transitive T)~%" (mapcar #'scramble-role (r-parents r))) (format o-f " :parents ~S)~%" (mapcar #'scramble-role (r-parents r)))) (format o-f ")~%"))) (defun ordered-export-concept (c o-f r w &optional subs numbers) (if (atom c) (progn (when (numberp c) (unless (or (not numbers) (eq (gethash c *w-hash*) w)) (setf (gethash c *w-hash*) w) (format o-f "(defprimconcept ~S)~%" (scramble-con c))) (return-from ordered-export-concept)) (when (member c subs) (verbosity :warnings "~&!!WARNING!! cyclical definition: ~S~%" c) (return-from ordered-export-concept)) (when (and (not (eq (c-grail-name (system-name c)) c)) (not *synonyms*)) (format T "~&!!NOTE!! ~S is a synonym for ~S - Discarded.~%" c (c-grail-name (system-name c))) (ordered-export-concept (c-grail-name (system-name c)) o-f r w subs numbers) (return-from ordered-export-concept)) (unless (eq (gethash c *w-hash*) w) (let ((d (g-definition c))) (when d (push c subs) (if (atom d) (ordered-export-concept d o-f r w subs numbers) (case (car d) ((:and :or) (dolist (cr (cdr d)) (ordered-export-concept cr o-f r w subs numbers))) ((:some :all) (ordered-export-concept (third d) o-f r w subs numbers)) (:not (ordered-export-concept (second d) o-f r w subs numbers)) (T (error "BAD CONCEPT - ~S" d)))))) (setf (gethash c *w-hash*) w) (format o-f "(def~Aconcept ~S" (if (g-primitive c) "prim" "") (scramble-con c)) (when (g-definition c) (format o-f " ~S" (kris-concept (g-definition c) r))) (format o-f ")~%"))) (case (car c) ((:and :or) (dolist (cr (cdr c)) (ordered-export-concept cr o-f r w subs numbers))) ((:some :all) (ordered-export-concept (third c) o-f r w subs numbers)) (:not (ordered-export-concept (second c) o-f r w subs numbers)) (T (error "BAD CONCEPT - ~S" c))))) (defun export-implication (a c o-f r) (format o-f "(implies ~S ~S)~%" (kris-concept (flatten a) r) (kris-concept (flatten c) r))) (defun export-kris-kb (fname &key alc cycles transitivity refinement synonyms gci scramble numbers) (let ((o-f (open (if fname fname "kris.tbox") :direction :output :if-exists :supersede)) (save-cd *cyclical-definitions*) (save-ps *print-circle*) (written (gensym))) (setf *print-circle* nil) (setf *cyclical-definitions* cycles) (setf *scramble* scramble) (setf *synonyms* synonyms) (clrhash *w-hash*) (when scramble (setf *scnum* 0) (clrhash *cname-hash*) (setf *srnum* 0) (clrhash *rname-hash*)) (reclassify-all-roles) (unless gci (reclassify-all-implications)) (encode-all-concepts) (dolist (r *r-definitions*) (export-kris-role r o-f alc transitivity) (unless (eq r (r-inverse r)) (export-kris-role (r-inverse r) o-f alc transitivity))) (dolist (c *c-definitions*) (ordered-export-concept c o-f refinement written nil numbers)) (when gci (dolist (i *implications*) (export-implication (car i) (cdr i) o-f refinement))) (setf *cyclical-definitions* save-cd) (setf *print-circle* save-ps) (close o-f))) (defun loom-concept (c &key alc) (cond ((listp c) (case (car c) ((:and and) (cons :and (mapcar #'(lambda (c) (loom-concept c :alc alc)) (cdr c)))) ((:or or) (cons :or (mapcar #'(lambda (c) (loom-concept c :alc alc)) (cdr c)))) ((:some some) (if (and (r-functional (second c)) (not alc)) (list :the (second c) (loom-concept (third c) :alc alc)) (list :some (second c) (loom-concept (third c) :alc alc)))) ((:all all) (list :all (second c) (loom-concept (third c) :alc alc))) ((:not not) (list :not (loom-concept (second c) :alc alc))) (t (error "UN-TRANSLATABLE CONCEPT - ~S" c)))) (T (case c (:top 'Thing) (:bottom '*BOTTOM*) (t c))))) (defun export-loom-kb (fname &key alc) (let ((o-f (open (if fname fname "loom.tbox") :direction :output :if-exists :supersede)) (cycles *cyclical-definitions*)) (setf *cyclical-definitions* nil) (reclassify-all-roles) (reclassify-all-implications) (encode-all-concepts) (dolist (r *r-definitions*) (let ((i-r (r-inverse r))) (format o-f "(defrelation ~S)~%" r) (unless (eq r i-r) (format o-f "(defrelation ~S)~%" i-r)))) (dolist (c *c-definitions*) (if (not (eq (c-grail-name (system-name c)) c)) (format T "~&!!NOTE!! ~S is a synonym for ~S - Discarded.~%" c (c-grail-name (system-name c))) (format o-f "(defconcept ~S ~A)~%" c (if (g-primitive c) (if (g-definition c) (format nil ":is-primitive ~S" (loom-concept (g-definition c) :alc alc)) "") (format nil ":is ~S" (loom-concept (g-definition c) :alc alc)))))) (setf *cyclical-definitions* cycles) (close o-f))) (defmacro export-kb (fname &key (system 'kris) (alc nil)) `(case ',system (kris (export-kris-kb ,fname :alc ,alc)) (fact (export-kris-kb ,fname :cycles T :transitivity T :synonyms T :gci T)) (loom (export-loom-kb ,fname :alc ,alc)) (T (format t "~&!!ERROR!! Unknown system \"~S\".~%" ,system)))) ;;; ************** SUBSUMPTION TESTING ************** (defun add-all-r+c (c-s r c ddb-label) "Propogates transitive (ALL R C) constraints" (let ((r-c (list r c))) (cond ;;; if r-c already in all-r+c do nothing ((member r-c (constraints-all-r+c c-s) :test #'equal :key #'first)) (T ;;; add new r+c constraint (push (list r-c ddb-label) (constraints-all-r+c c-s)))))) (defun expand-all-rc (c-s r c ddb-label trans p-list) "expands x:(:all R C) + xRy constraints" (and ;;; add regular value restriction y:C (add-constraint c-s c ddb-label) (if *transitivity* ;;; if triggered by x:(:all+ R C) add y:(:all+ R C) (if trans (add-all-r+c c-s r c ddb-label) ;;; otherwise, add y:(:all+ S C) for each S s.t. S is transitive, R subsumes S, ;;; and S subsumes P, where P is the role connecting x and y (every #'(lambda (s) (if (and (r-trans-across s) (member r (r-ancestors s))) (add-all-r+c c-s s c ddb-label) T)) p-list)) T))) (defun add-constraint (c-s concept level) "Add a new constraint (concept level) to S; return nil if there is a clash." (dbg :addc-entry "~& ADD-C ~S ~S" concept level) (cond ;;; if concept is an atom... ((atom concept) (add-literal c-s concept level)) ;;; if concept = (:and c1 ... cn)... ((eq (car concept) :and) (every #'(lambda (c) ;;; add c constraints for every c in the :and list (add-constraint c-s c level)) ;;; constraint is the :and list of concepts (cdr concept))) ;;; if concept = (:or c1 ... cn)... ((eq (car concept) :or) ;;; add or clause (add-or-clause c-s (cdr concept) level)) ;;; if concept = (:all r c)... ((eq (car concept) :all) ;;; expand :all constraint (push (list (cdr concept) level) (constraints-all-rc c-s))) ;;; otherwise (T ;;; its and ERROR - a bad concept expression (error-handler 'add-constraint :bad-concept-expansion)))) (defun add-xry (c-s r y-c-s level) "Add xry to x-r-y - check all-rc constraints and any partial expansions." ;;; build a new r-y constraint (let* ((r-a (r-ancestors r))) (and ;;; check if any (:all s c) constraints are triggered - s in ancestors of r. (every #'(lambda (s-c) (if (member (first (constraint s-c)) r-a) (expand-all-rc y-c-s (first (constraint s-c)) (second (constraint s-c)) (union level (level s-c)) nil r-a) t)) (constraints-all-rc c-s)) ;;; check if any (:all s+ c) constraints are triggered - s in ancestors of r. (every #'(lambda (s-c) (if (member (first (constraint s-c)) r-a) (expand-all-rc y-c-s (first (constraint s-c)) (second (constraint s-c)) (union level (level s-c)) t r-a) t)) (constraints-all-r+c c-s))))) (defun set-equal (s1 s2 &key (test #'eql)) "returns T if the two sets s1 and s2 are equal" (and (= (length s1) (length s2)) (every #'(lambda (e) (member (first e) s2 :test test :key #'first)) s1))) (defun s-equivalent (x-c y-c) "True if x and y are s-equivalent" (if *subset-s-equivalent* (and (subsetp (constraints-c x-c) (constraints-c y-c)) (subsetp (constraints-all-r+c x-c) (constraints-all-r+c y-c) :test #'equal :key #'first) (setf *cycle* T)) (and (endp (set-exclusive-or (constraints-c x-c) (constraints-c y-c))) (set-equal (constraints-all-r+c x-c) (constraints-all-r+c y-c) :test #'equal) (setf *cycle* T)))) (defun find-s-equivalent (c-s) "Finds and returns an s-equivalent variable to x if one exists" ;;; can switch off if blocking is not required - e.g. for alc (when *blocking* (let ((s-equiv (do ((y-c-s (constraints-parent c-s) (constraints-parent y-c-s))) ((or (null y-c-s) (s-equivalent c-s y-c-s)) y-c-s)))) (when s-equiv (dbg :sat-sequiv "~& S-equivalent ~S = ~S" c-s s-equiv)) s-equiv))) (defun not-fully-solved (c-s) (some #'(lambda (c) (plusp (car c))) (constraints-or-clauses c-s))) (defun not-expanded (c-s) "returns T if the constraint system c-s is not expanded" ;;; return logical or of the unexpanded constraint lists (or (constraints-some-fc-ux c-s) (constraints-some-rc-ux c-s) (constraints-c-def-ux c-s) (not-fully-solved c-s))) (defun needs-expanding (c-s) (and (not-expanded c-s) (not (find-s-equivalent c-s)) (not (mergable-constraints c-s)))) (defun sorted-successors (s-list) (if *sort-lists* (stable-sort (reverse s-list) #'(lambda (x y) (< (if (cdr x) (reduce #'max (cdr x)) -1) (if (cdr y) (reduce #'max (cdr y)) -1)))) (reverse s-list))) (defun expand-f-roles (c-s) "Expand (:some f C) constraints on c-s; return nil if there was a clash" ;;; only adds one node at a time to model size (when (and (constraints-some-fc-ux c-s) (> (incf *model-size*) *max-model-size*)) (setf *max-model-size* *model-size*)) ;;; loop through fc-ux list until empty - reverse it so as to process oldest first (do ((f-list (sorted-successors (constraints-some-fc-ux c-s)) (cdr f-list))) ;;; return c-s if we got through the whole list without a clash ((endp f-list) c-s) ;;; when list entry is non-nil - might be nil if absorbed into previous f (when (car f-list) ;;; initialise dependency set, set of f-ancestors and new constraints set ;;; (car f-list) is: ((R C) . d-set) (let ((d-set (cdar f-list)) (f-set (r-f-ancestors (caaar f-list))) (y-cs (make-constraints :parent c-s))) ;;; unless constraining concept is added ok, return nil - clash (unless (and (add-constraint y-cs (cadaar f-list) d-set) ;;; add the universal constraint due to GCIs (if *universal-constraint* (add-constraint y-cs *universal-constraint* nil) T) (add-xry c-s (caaar f-list) y-cs d-set)) (return-from expand-f-roles nil)) ;;; look for other f-roles which need to be absorbed into this one (do ((not-changed nil)) ;;; exit when no more found (not-changed) ;;; set not-changed to true - it is set back to nil if an f-role is absorbed in next loop (setf not-changed T) ;;; loop through the rest of the f-list (do ((f-l (cdr f-list) (cdr f-l))) ((endp f-l)) ;;; when list entry is non-nil - might be nil if absorbed into previous f (when (car f-l) ;;; when the f has some f-ancestor which is in f-set (when (intersection (r-f-ancestors (caaar f-l)) f-set) ;;; diff := ancestors of f not already in f-set (let ((diff (set-difference (r-f-ancestors (caaar f-l)) f-set))) ;;; if there were any new f-ancestors (when diff ;;; not-changed:=nil - need to check list again (setf not-changed nil) ;;; add new f-ancestors onto f-set (setf f-set (nconc diff f-set))) ;;; dependency set is union of all d-sets (setf d-set (union d-set (cdar f-l))) ;;; unless constraining concept is added ok, return nil - clash (unless (and (add-constraint y-cs (cadaar f-l) d-set) (add-xry c-s (caaar f-l) y-cs d-set)) (return-from expand-f-roles nil)) ;;; set list entry to nil to show this f-role has been dealt with (rplaca f-l nil)))))) ;;; when y-cs needs expanding (when (needs-expanding y-cs) ;;; unless resulting constraint system is satisfiable return nil (unless (sat y-cs) (return-from expand-f-roles nil))))))) (defun expand-r-roles (c-s) "Expand (:some R C) constraints on c-s; return nil if there was a clash" ;;; list of already expanded constraint systems to check for duplicate expansions (let (r-c-list) ;;; loop through rc-ux list until empty - reverse it so as to process oldest first (dolist (r-c (sorted-successors (constraints-some-rc-ux c-s)) c-s) (let ((r (caar r-c)) (c (cadar r-c))) (when (notany #'(lambda (r-cs) (and (member r (r-ancestors (car r-cs))) (member c (constraints-c (cdr r-cs))))) r-c-list) (let ((y-cs (make-constraints :parent c-s)) (d-set (cdr r-c))) ;;; increment model-size and set max size (when (> (incf *model-size*) *max-model-size*) (setf *max-model-size* *model-size*)) ;;; unless constraining concept is added ok, return nil - clash (unless (and (add-constraint y-cs c d-set) ;;; add the universal constraint due to GCIs (if *universal-constraint* (add-constraint y-cs *universal-constraint* nil) T) (add-xry c-s r y-cs d-set)) (return-from expand-r-roles nil)) ;;; when y-cs needs expanding (when (needs-expanding y-cs) ;;; unless its expanded ok return nil (unless (sat y-cs) (return-from expand-r-roles nil))) ;;; add r-cs to list (push (cons r y-cs) r-c-list))))))) (defun sat (c-s) "Returns T if constraint system is satisfiable, nil otherwise" (unless (expand-defined-concepts c-s) (return-from sat nil)) (if (not-fully-solved c-s) (add-ux-or-constraints c-s) ;;; preserve model depth and size (progv '(*model-depth* *model-size*) `(,*model-depth* ,*model-size*) (when (and (or (constraints-some-rc-ux c-s) (constraints-some-fc-ux c-s)) (> (incf *model-depth*) *max-model-depth*)) (setf *max-model-depth* *model-depth*)) (and (expand-f-roles c-s) (expand-r-roles c-s))))) (defun full-sat (c-s) (and ;;; add the universal constraint due to GCIs (if *universal-constraint* (add-constraint c-s *universal-constraint* nil) T) (sat c-s))) (defun simple-sat (c-s) (progv '(*universal-constraint*) `(nil) (sat c-s))) (defun test-sat (exp) (dbg :test-sat "~&Test sat: ~S~%" (decode-concept exp)) (incf *total-sat-tests*) (let ((c-s (make-constraints)) sat-result recursive-run-time mmd mms (s-s *search-space*) (c-a *cache-accesses*) (c-h *cache-hits*)) (setq *search-space* 0 *cache-accesses* 0 *cache-hits* 0) ;;; set *or-level* to 0 using progv so we can handle recursive calls to test-sat (progv '(*or-level* *model-size* *max-model-size* *model-depth* *max-model-depth* *start-time* *cycle*) `(0 1 1 1 1 ,(get-internal-run-time) nil) (setf recursive-run-time *start-time*) (setf sat-result (and (add-constraint c-s exp nil) (if *concept-eqn* (full-sat c-s) (simple-sat c-s)))) (when (> *profiling* 2) ;;; time taken by this test EXCLUDING any recursive caching tests (setf *run-time* (- (get-internal-run-time) *start-time*)) (profile-out exp (not (null sat-result)))) (setf mmd *max-model-depth*) (setf mms *max-model-size*) ;;; time taken by this test INCLUDING any recursive caching tests (setf recursive-run-time (+ *run-time* (- *start-time* recursive-run-time)))) (setf *max-model-size* (max *max-model-size* (+ *model-size* mms))) (setf *max-model-depth* (max *max-model-depth* (+ *model-depth* mmd))) (incf *search-space* s-s) (incf *cache-accesses* c-a) (incf *cache-hits* c-h) (incf *start-time* recursive-run-time) sat-result)) (defun test-and-cache (c) "Check if c has a model and, if so, store relevant details in c-model" (dbg :test-and-cache "~&~ATest&cache ~S" (make-string *tsd* :initial-element #\Space) c) ;;; set model to *BOTTOM* (no model) to prevent infinite recursive calls (setf (c-model c) *BOTTOM*) ;;; NOTE *tsd* is a recursion depth counter for debugging (incf *tsd*) ;;; calls test-sat to return model of c (let ((c-s (test-sat c))) (decf *tsd*) ;;; if c is satisfiable (if c-s ;;; keep a note of relevant parts of top node of model (setf (c-model c) (make-constraints ;;; keep a note of all x:C constraints :c (constraints-c c-s) ;;; keep a note of all Rs in all R.C constraints :all-rc (delete-duplicates (mapcar #'caar (constraints-all-rc c-s))) ;;; keep a note of all Rs in xRy constraints :r-y (delete-duplicates (nconc (mapcar #'caar (constraints-some-rc-ux c-s)) (mapcar #'caar (constraints-some-fc-ux c-s)))) ;;; keep a note of all fs in xfy constraints :f-y (when (constraints-some-fc-ux c-s) (delete-duplicates (apply #'append (mapcar #'(lambda (a) (r-f-ancestors (caar a))) (constraints-some-fc-ux c-s))))))) ;;; otherwise if c isn't satisfiable (progn (dbg :test-and-cache-incoherent "~&~AINCOHERENT ~S" (make-string *tsd* :initial-element #\Space) c) (verbosity :notes "~&!!NOTE!! ~A is INCOHERENT~%" (decode-concept c)) ;;; set c to a synonym for :bottom and NOT c to a synonym for :top (when (c-grail-name c) (setf (system-name (c-grail-name c)) *BOTTOM*)) (setf (c-synonym c) *BOTTOM*) (setf (c-asserted-supers c) (list *BOTTOM*)) (setf (c-definition c) *BOTTOM*) (setf (c-primitive c) nil) (when (c-grail-name (neg-con c)) (setf (system-name (c-grail-name (neg-con c))) *TOP*)) ;;; If there is a *universal-constraint* we have to be careful not to clear its ;;; definition when we discover that (not *universal-constraint*) = *BOTTOM* (unless (eql (neg-con c) *universal-constraint*) (setf (c-synonym (neg-con c)) *TOP*) (setf (c-asserted-supers c) nil) (setf (c-definition (neg-con c)) *TOP*) (setf (c-primitive (neg-con c)) nil)) ;;; return nil nil)))) (defun get-cached-model (c) (cond ; ((eql c *TOP*) T) ((eql c *BOTTOM*) nil) (T (let ((m (c-model c))) (if m (unless (eql m *BOTTOM*) m) (test-and-cache c)))))) (defun notany-member (l1 l2) (notany #'(lambda (c) (member c l2)) l1)) (defun notany-neg-member (l1 l2) (notany #'(lambda (c) (member (neg-con c) l2)) l1)) (defun mergable (c1 c2) (let ((mc1 (get-cached-model c1)) (mc2 (get-cached-model c2))) (and mc1 mc2 (notany-neg-member (constraints-c mc1) (constraints-c mc2)) (every #'(lambda (r) (notany-member (r-ancestors r) (constraints-all-rc mc2))) (constraints-r-y mc1)) (every #'(lambda (r) (notany-member (r-ancestors r) (constraints-all-rc mc1))) (constraints-r-y mc2)) (notany-member (constraints-f-y mc1) (constraints-f-y mc2))))) (defun no-possible-clash (c1 all-r+c c-list) (let ((mc1 (get-cached-model c1))) (when mc1 (let ((r-y-mc1 (constraints-r-y mc1)) (all-rc-mc1 (constraints-all-rc mc1))) (and (every #'(lambda (r) (notany #'(lambda (s) (member s all-r+c :key #'caar)) (r-ancestors r))) r-y-mc1) (every #'(lambda (c2) (let* ((mc2 (get-cached-model c2))) (and mc2 (let ((r-y-mc2 (constraints-r-y mc2)) (all-rc-mc2 (constraints-all-rc mc2))) (and (notany-neg-member (constraints-c mc1) (constraints-c mc2)) (every #'(lambda (r) (notany-member (r-ancestors r) all-rc-mc2)) r-y-mc1) (every #'(lambda (r) (notany-member (r-ancestors r) all-rc-mc1)) r-y-mc2) (notany-member (constraints-f-y mc1) (constraints-f-y mc2))))))) c-list)))))) (defun mergable-constraints (c-s) "Check if models of constraints in c-s can be merged" (when *full-caching* (let ((s-t *total-sat-tests*) (c-s-t *caching-sat-tests*) (all-r+c (constraints-all-r+c c-s))) (incf *cache-accesses*) (dbg :cache-merging "~&Merge ~S? - " (constraints-c c-s)) (cond ((do ((c-list (constraints-c c-s) (cdr c-list)) (res T (no-possible-clash (car c-list) all-r+c (cdr c-list)))) ((or (endp c-list) (not res)) res)) (dbg :cache-merging "YES~%") (setf *caching-sat-tests* (+ c-s-t (- *total-sat-tests* s-t))) (incf *cache-hits*)) (T (dbg :cache-merging "NO~%") (setf *caching-sat-tests* (+ c-s-t (- *total-sat-tests* s-t))) nil))))) (defun obvious-non-subs (c1 c2) ;;; Spots obvious non-subsumptions via easily satisfiable cases of (C2 & not(C1)). (when (and *top-level-caching* (or ;;; One such case is if C1 is :bottom and C2 has a model... (and (eql c1 *BOTTOM*) (get-cached-model c2)) ;;; another case is if C2 is :top and (:not C1) has a model (i.e. C1/=top) (and (eql c2 *TOP*) (get-cached-model (neg-con c1))) ;;; another case is if c2 and (:not c1) both have models & are mergeable (mergable c2 (neg-con c1)))) (dbg :found-obvious-non-subs "~&OBVIOUS NON-SUBSUMPTION - not(~S > ~S)" c1 c2) T)) (defun obvious-subs (c1 c2) ;;; obvious subsumption if c1=top or c2=bottom ;;; or (:not c1)=incoherent (i.e. c1=top) or c2=incoherent (i.e. c2=bottom) (when *obvious-subs* (or (eql c1 *TOP*) (eql c2 *BOTTOM*) (not (get-cached-model (neg-con c1))) (not (get-cached-model c2))))) (defun test-subsumes (c1 c2) (incf *total-subs-tests*) (dbg :subs-entry-1 "~& ~S > ~S ?" c1 c2) (dbg :subs-entry-2 ".") (when (> *profiling* 1) (if *profile-file* (format *profile-file* "~%(~S ~S (" (decode-concept c1) (decode-concept c2)) (format T "~&Subsumption test - ~S > ~S ?" (decode-concept c1) (decode-concept c2)))) ;;; c1 > c2 if c2 and not c1 is not satisfiable. If c1 is :bottom and c2 has a model - ;;; so c2 is known to be coherent - can just return nil (let ((subs-result (if (obvious-subs c1 c2) T (unless (obvious-non-subs c1 c2) (setq *model-size* 1 *max-model-size* 1 *model-depth* 1 *max-model-depth* 1) (not (test-sat `(:and ,c2 ,(neg-con c1)))))))) (when (and (> *profiling* 1) *profile-file*) (format *profile-file* "))")) subs-result)) (defun expand-defined-concepts (c-s) "Expand defined concepts in c-s" ;;; expand all defined concepts ;;; need outer loop because new ones might be added by inner loop (loop ;;; get local copy of unexpanded defined concepts lisp (let ((def-ux (constraints-c-def-ux c-s))) ;;; clear the list in c-s (setf (constraints-c-def-ux c-s) nil) ;;; return nil unless all the definitions are added OK (unless (every #'(lambda (constraint) (add-constraint c-s (c-definition (first constraint)) (second constraint))) def-ux) (return nil))) ;;; exit loop with T if no more to be processed (when (endp (constraints-c-def-ux c-s)) (return T)))) ;;; ************** POSIT code ************** (defun pos-lit (p) (logxor (logior p 1) 1)) (defun pos-lit-p (p) (zerop (logand p 1))) (defun shift-left (i dist) (dpb i (byte 16 dist) 0)) (defun alpha (pos-p neg-p) (+ (shift-left (* pos-p neg-p) 16) pos-p neg-p)) (defun jw-weight (clause-len max-len) (shift-left 1 (- max-len clause-len))) (defun dependencies (lit-list) "Return a dependency set from lit-list" ;;; d-set is the union of all the d-sets from propositions corresponding to literals in lit-list (let ((d-set (fifth (second (car lit-list))))) (dolist (lit (cdr lit-list) d-set) (setf d-set (union d-set (fifth (second lit))))))) (defun add-or-clause (c-s clause d-set) "Add disjunctive clause to constraint system" ;;; initialise open-literal-count, list of literals in clause and list of new ;;; proposition entries (let ((o-l-c 0) lit-list new-props) ;;; loop through literals in clause (dolist (lit clause) ;;; set p=proposition (positive literal); p-entry=corresponding entry in (constraints-props c-s) (let* ((p (pos-lit lit)) (p-entry (car (member p (constraints-props c-s) :key #'first)))) ;;; if an entry in (constraints-props c-s) was found (if p-entry (progn ;;; if lit already satisfied bomb out with T (when (eql lit (fourth p-entry)) (return-from add-or-clause T)) ;;; if lit is open then increment open literal count (unless (fourth p-entry) ;;; increment open literal count (incf o-l-c)) ;;; add list (literal p-entry) to lit-list (push (list lit p-entry) lit-list)) ;;; if there isn't an existing p-entry, make a new one ;;; p-entry = (proposition pos-lits neg-lits theta ddb-set) where: ;;; proposition = name of proposition (a positive literal) ;;; pos-lits = list of clauses containing positive proposition ;;; neg-lits = list of clauses containing negative proposition ;;; theta = +p, -p or nil if p is open ;;; d-set = dependency set; should be nil if theta is nil (let ((new-p (list p nil nil nil nil))) ;;; add new-p to list of new propositions - don't add directly to (constraints-props c-s) because ;;; clause may be satisfied already (push new-p new-props) ;;; add list (literal new-p) to lit-list (push (list lit new-p) lit-list) ;;; increment open literal count (incf o-l-c))))) ;;; if there are no open literals then its a clash (when (zerop o-l-c) ;;; set *clash-set* to union of d-sets from clause and all its literals (setf *clash-level* (union d-set (dependencies lit-list))) ;;; return nil (return-from add-or-clause nil)) ;;; add new-props to (constraints-props c-s) (setf (constraints-props c-s) (nconc new-props (constraints-props c-s))) ;;; build new clause record = (olc lits d-set) where: ;;; olc = number of open literals or -1 if clause satisfied ;;; lits = list of (lit p-entry) pairs for each literal in the clause ;;; d-set = dependency set (let ((clause-rec (list o-l-c lit-list d-set))) ;;; for each literal in lit-list (dolist (p lit-list) ;;; add clause-rec to pos-lit or neg-lit lists in p-entry (if (pos-lit-p (car p)) (push clause-rec (second (second p))) (push clause-rec (third (second p))))) ;;; add clause record to (constraints-or-clauses c-s) (push clause-rec (constraints-or-clauses c-s)) ;;; if open lit count is 1, add clause record to bcp candidates list (when (eql o-l-c 1) (push clause-rec (constraints-bcp-cand c-s))))) ;;; return T - clause was added without causing a clash T) (defun extend-prop (c-s p-entry lit d-set) "Extend the solution by setting truth value of p-entry to lit" ;;; set proposition truth val to lit (setf (fourth p-entry) lit) ;;; set proposition dependency set to d-set (setf (fifth p-entry) d-set) ;;; when lit is *BOTTOM* set *clash-level* and bomb out (when (eql lit *BOTTOM*) (setf *clash-level* d-set) (return-from extend-prop nil)) ;;; add lit to constraints-c list for use in blocking etc (push lit (constraints-c c-s)) ;;; if lit is a synonym (if (/= lit (c-synonym lit)) ;;; unless synonym literal is added OK (unless (add-literal c-s (c-synonym lit) d-set) ;;; bomb out returning nil (clash) (return-from extend-prop nil)) ;;; otherwise get the literals definition (let ((c-def (c-definition lit))) ;;; and when it has a definition add it to some-rc-ux or c-def-ux for future expansion (when c-def (if (and (listp c-def) (eq (car c-def) :some)) (if (r-functional (second c-def)) (push (cons (cdr c-def) d-set) (constraints-some-fc-ux c-s)) (push (cons (cdr c-def) d-set) (constraints-some-rc-ux c-s))) (push (list lit d-set) (constraints-c-def-ux c-s)))))) ;;; if its a positive literal (if (pos-lit-p lit) (progn ;;; for each clause in neg-lits list (dolist (clause (third p-entry)) ;;; decrement open literals count (decf (car clause)) ;;; if open literals count is zero, its a clash (when (zerop (car clause)) ;;; set *clash-set* to union of d-sets from clause and all its literals (setf *clash-level* (union (third clause) (dependencies (second clause)))) ;;; return nil (return-from extend-prop nil)) ;;; if open literals count is one, clause is a candidate for BCP (when (eql (car clause) 1) (push clause (constraints-bcp-cand c-s)))) ;;; for each clause in pos-lits list, set open literals count to -1 = satisfied (dolist (clause (second p-entry)) (setf (car clause) -1))) ;;; if its a negative literal (progn ;;; for each clause in pos-lits list (dolist (clause (second p-entry)) ;;; decrement open literals count (decf (car clause)) ;;; if open literals count is zero, its a clash (when (zerop (car clause)) ;;; set *clash-set* to union of d-sets from clause and all its literals (setf *clash-level* (union (third clause) (dependencies (second clause)))) ;;; return nil (return-from extend-prop nil)) ;;; if open literals count is one, clause is a candidate for BCP (when (eql (car clause) 1) (push clause (constraints-bcp-cand c-s)))) ;;; for each clause in neg-lits list, set open literals count to -1 = satisfied (dolist (clause (third p-entry)) (setf (car clause) -1)))) ;;; return T - there was no clash T) (defun add-literal (c-s lit d-set) "Add literal to constraint system" ;;; p-entry := proposition record in constraints-props (let ((p-entry (car (member (pos-lit lit) (constraints-props c-s) :key #'first)))) ;;; if there was an entry (if p-entry ;;; the fourth item in the entry is its truth-val = lit, not lit or nil (let ((truth-val (fourth p-entry))) ;;; if lit=truth-val nothing to be done - return T (when (eql lit truth-val) (return-from add-literal T)) ;;; if truth val is non-nil it must be not lit -> clash: set ddb set & return nil (when truth-val (setf *clash-level* (union d-set (fifth p-entry))) (return-from add-literal nil)) ;;; return the result of calling call extend-prop to assign truth value (and (extend-prop c-s p-entry lit d-set) ;;; followed by b-c-p (b-c-p c-s))) ;;; if there was no p-entry, make a new one (let ((new-p (list (pos-lit lit) nil nil nil nil))) ;;; add it to constraints-props (push new-p (constraints-props c-s)) ;;; and set its truth value (extend-prop c-s new-p lit d-set))))) (defun b-c-p (c-s) "Expand disjunctions with only one open literal" ;;; loop until candidates stack is empty or there is a clash (loop ;;; return T when candidates stack is empty (when (endp (constraints-bcp-cand c-s)) (return-from b-c-p T)) ;;; pop next candidate off the stack - its a clause record = (olc lits d-set) (let ((candidate (pop (constraints-bcp-cand c-s)))) ;;; when olc still = 1 (when (eql (car candidate) 1) ;;; look through lits list to find open lit - fourth elt in p-entry is nil (let ((lit (find-if #'(lambda (l) (not (fourth (second l)))) (second candidate)))) ;;; its an error if we didn't find it (unless lit (error "~&!!ERROR!! - open literal not found in BCP~%")) ;;; extend c-s by setting literal in p-entry; dependencies = union of d-sets from other lits (unless (extend-prop c-s (second lit) (first lit) (union (third candidate) (dependencies (second candidate)))) ;;; return nil if extend-prop caused a clash (return-from b-c-p nil))))))) (defun pure-lit-candidates (c-s) "Return sorted list of propositions which appear in binary clauses and their priorities" (let (candidates (max-priority -1)) ;;; loop through propositions list and return candidates (dolist (prop (constraints-props c-s) candidates) ;;; only consider open propositions (when (and (not (fourth prop)) (or (endp (second prop)) (endp (third prop)))) (let ((pos-clauses (length (second prop))) (neg-clauses (length (third prop)))) (let ((priority (max pos-clauses neg-clauses))) (when (>= priority max-priority) (when (> priority max-priority) (setf max-priority priority) (setf candidates nil))) ;;; add to candidates a list of (prop pos-occurences neg-occurences priority) (push (list prop pos-clauses neg-clauses) candidates))))))) (defun mom-candidates (c-s) "Return sorted list of propositions which appear in binary clauses and their priorities" (let (candidates (max-priority -1)) ;;; loop through propositions list and return candidates (dolist (prop (constraints-props c-s) candidates) ;;; only consider open propositions (when (not (fourth prop)) (let ((pos-bin 0) (neg-bin 0)) ;;; count the number of times the proposition appears positively in binary clauses (dolist (clause (second prop)) (when (eql (car clause) 2) (incf pos-bin))) ;;; count the number of times the proposition appears negatively in binary clauses (dolist (clause (third prop)) (when (eql (car clause) 2) (incf neg-bin))) ;;; unless both are zero (unless (and (zerop pos-bin) (zerop neg-bin)) (let ((priority (alpha pos-bin neg-bin))) (when (>= priority max-priority) (when (> priority max-priority) (setf max-priority priority) (setf candidates nil))) ;;; add to candidates a list of (prop pos-occurences neg-occurences priority) (push (list prop pos-bin neg-bin) candidates)))))))) (defun clause-lengths (c-s) "Return a dotted pair (min-clause-len . max-clause-len)" (let ((min-len most-positive-fixnum) (max-len 0)) (dolist (clause (constraints-or-clauses c-s)) (let ((c-len (car clause))) (when (plusp c-len) (when (> c-len max-len) (setf max-len c-len)) (when (< c-len min-len) (setf min-len c-len))))) (cons min-len max-len))) (defun prop-jw-weights (p max-clause-len) "Return a dotted pair (pos-jw-weight . neg-jw-weight) for proposition p" (let ((pos-wt 0) (neg-wt 0)) ;;; calculate weights from clauses where the proposition appears positively (dolist (clause (second p)) (incf pos-wt (jw-weight (car clause) max-clause-len))) ;;; calculate weights from clauses where the proposition appears negatively (dolist (clause (third p)) (incf neg-wt (jw-weight (car clause) max-clause-len))) (cons pos-wt neg-wt))) (defun jw-candidates (c-s) "Return sorted list of propositions and their Jereslow & Wang priorities" (let ((max-clause-len (cdr (clause-lengths c-s))) candidates (max-priority -1)) ;;; loop through propositions list (dolist (prop (constraints-props c-s) candidates) ;;; only consider open propositions (when (not (fourth prop)) ;;; calculate j&w weights (let* ((jww (prop-jw-weights prop max-clause-len)) (priority (alpha (car jww) (cdr jww)))) (when (>= priority max-priority) (when (> priority max-priority) (setf max-priority priority) (setf candidates nil))) ;;; add to candidates a list of (prop pos-wt neg-wt priority) (push (list prop (car jww) (cdr jww)) candidates)))))) (defun full-moms-heuristic (c-s) (let ((candidates (mom-candidates c-s))) ;;; if candidates from binary clauses were found (if candidates ;;; if there is more than one candidate (with the same priority) (if (cdr candidates) (let (final-candidate (max-priority -1) (max-clause-len (cdr (clause-lengths c-s)))) ;;; loop through candidates and return final-candidate (dolist (c candidates final-candidate) ;;; evaluate Jereslow & Wang positive and negative weightings for candidate and its total priority (let* ((jww (prop-jw-weights (car c) max-clause-len)) (priority (alpha (car jww) (cdr jww)))) ;;; when the priority is >= the max-priority (when (>= priority max-priority) ;;; if the priority = max-priority (if (= priority max-priority) ;;; if positive occurences outnumber negative occurences (if (> (car jww) (cdr jww)) ;;; and when positive literals are preferred (when *prefer-pos-lits* ;;; set the final candidate to the new candidate (setf final-candidate (list (car c) (car jww) (cdr jww)))) ;;; if positive occurences didn't outnumber negative occurences, ;;; and positive literals are not prefered (unless *prefer-pos-lits* ;;; set the final candidate to the new candidate (setf final-candidate (list (car c) (car jww) (cdr jww))))) ;;; when priority > max-priority, set the max-priority and the final candidate (progn (setf max-priority priority) (setf final-candidate (list (car c) (car jww) (cdr jww))))))))) ;;; return first member of original candidates list if there was only one candidate (car candidates)) ;;; if there were no mom candidates use J & W on all propositions (progn (setf candidates (jw-candidates c-s)) ;;; if there are any candidates (if candidates ;;; if there is more than one candidate (if (cdr candidates) ;;; look for a candidate where... (let ((pos-cand (find-if #'(lambda (c) ;;; positive literals are preferred and positive weight is greater than negative (or (and *prefer-pos-lits* (> (second c) (third c))) ;;; or positive literals are nnot preferred and negative weight is greater than positive (and (not *prefer-pos-lits*) (> (second c) (third c))))) candidates))) ;;; if one was found return it, otherwise just return first candidate (if pos-cand pos-cand (car candidates))) ;;; if there was only one candidate return it (car candidates)) ;;; otherwise its an error (error "~&!!ERROR!! no candidate for SAT expansion~%")))))) (defun max-clash (clash-list) (if clash-list (reduce #'max clash-list) 0)) (defun select-disjunction (c-s) (if (= 2 *moms-heuristic*) (let ((max-dep most-positive-fixnum) oldest) (dolist (dj (constraints-or-clauses c-s) oldest) (when (plusp (first dj)) (let ((md (if (third dj) (max (third dj)) -1))) (cond ((< md max-dep) (setf oldest (second dj)) (setf max-dep md)) ((= md max-dep) (dolist (c (second dj)) (unless (member c oldest) (setf oldest (cons c oldest)))))))))) (second (car (member-if #'(lambda (c) (plusp (car c))) (constraints-or-clauses c-s)))))) (defun simple-moms-heuristic (c-s) (let* ((uxc (select-disjunction c-s)) (max-clause-len (cdr (clause-lengths c-s))) candidate (max-priority -1)) (dolist (c uxc candidate) (when (not (fourth (second c))) (let* ((jww (prop-jw-weights (second c) max-clause-len)) (priority (alpha (car jww) (cdr jww)))) (when (> priority max-priority) (setf max-priority priority) (setf candidate (list (second c) (car jww) (cdr jww))))))))) (defun add-ux-or-constraints (c-s) "Expand disjunction clauses by assigning truth values to their propositions" ;;; Chose a candidate proposition according to some heuristic (let ((candidate (if (= 1 *moms-heuristic*) (full-moms-heuristic c-s) (simple-moms-heuristic c-s)))) ;;; prop:=p-entry in constraints-props list (let ((prop (car candidate)) ;;; split-lit:=litteral to add; add -ve first if pos-weight>neg-weight (split-lit (if (> (second candidate) (third candidate)) (if *minimise-clashes* (caar candidate) (neg-con (caar candidate))) (if *minimise-clashes* (neg-con (caar candidate)) (caar candidate))))) ;;; For debugging purpouses:- (setf *already-backtracking* nil) (dbg :split-lit "~A~A/~A " (if (pos-lit-p split-lit) "+" "-") (pos-lit split-lit) *model-depth*) ;;; save the constraint system state (let* ((saved-cs (save-c-s c-s)) ;;; res is true if adding split-lit to c-s is OK and the resulting c-s was satisfiable ;;; note that dependency level *or-level* is incremented (res (and (extend-prop c-s prop split-lit (list (incf *or-level*))) (b-c-p c-s) (sat c-s)))) (debug-if :backtrack (and (not res) *backjumping* (not *already-backtracking*) (< (max-clash *clash-level*) *or-level*)) "BT ~A->~A;" *or-level* (max-clash *clash-level*)) (setf *already-backtracking* T) ;;; unless we already have a solution or we can backjump (unless (or res (and *backjumping* (< (max-clash *clash-level*) *or-level*))) ;;; restore the constraint system state (restore-c-s c-s saved-cs) ;;; save the dependency set from the first clash (let ((first-clash *clash-level*)) (dbg :split-lit "<~A~A/~A " (if (pos-lit-p split-lit) "-" "+") (pos-lit split-lit) *model-depth*) (incf *search-space*) ;;; res is true if adding (not split-lit) to c-s is OK and the resulting c-s was satisfiable (setf res (and (extend-prop c-s prop (neg-con split-lit) (list *or-level*)) (b-c-p c-s) (sat c-s))) ;;; unless we have a solution *clash-level*:=union of two clash dependency sets - current level (unless (or res (and *backjumping* (< (max-clash *clash-level*) *or-level*))) (setf *clash-level* (remove *or-level* (union first-clash *clash-level*)))))) ;;; decrement dependency level (decf *or-level*) ;;; return res res)))) (defun save-c-s (c-s) "Save the state of the constraint system" (let ((y (copy-constraints c-s))) (setf (constraints-props y) (cons (constraints-props y) (mapcar #'copy-list (constraints-props c-s)))) (setf (constraints-or-clauses y) (cons (constraints-or-clauses y) (mapcar #'car (constraints-or-clauses c-s)))) y)) (defun restore-c-s (c-s saved-c-s) (setf (constraints-c c-s) (constraints-c saved-c-s)) (setf (constraints-all-rc c-s) (constraints-all-rc saved-c-s)) (setf (constraints-all-r+c c-s) (constraints-all-r+c saved-c-s)) (setf (constraints-bcp-cand c-s) (constraints-bcp-cand saved-c-s)) (setf (constraints-some-fc-ux c-s) (constraints-some-fc-ux saved-c-s)) (setf (constraints-some-rc-ux c-s) (constraints-some-rc-ux saved-c-s)) (setf (constraints-c-def-ux c-s) (constraints-c-def-ux saved-c-s)) (setf (constraints-props c-s) (car (constraints-props saved-c-s))) (map nil #'(lambda (p1 p2) (setf (second p1) (second p2)) (setf (third p1) (third p2)) (setf (fourth p1) (fourth p2)) (setf (fifth p1) (fifth p2))) (constraints-props c-s) (cdr (constraints-props saved-c-s))) (setf (constraints-or-clauses c-s) (car (constraints-or-clauses saved-c-s))) (map nil #'(lambda (p1 p2) (setf (first p1) p2)) (constraints-or-clauses c-s) (cdr (constraints-or-clauses saved-c-s)))) ;;; ************** VERBOSITY DEBUGGING & PROFILING ************** (defmacro verbosity (level f-string &rest v-list) `(when (and *verbosity* (if (listp ,level) (some #'(lambda (l) (member l *verbosity*)) ,level) (member ,level *verbosity*))) ,(nconc `(funcall #'format T ,f-string) v-list) (force-output) T)) (defun set-verbosity (&rest l) (dolist (li l *verbosity*) (pushnew li *verbosity*))) (defun reset-verbosity (&rest l) (if l (dolist (li l *verbosity*) (setf *verbosity* (delete li *verbosity*))) (setf *verbosity* nil))) (defmacro dbg (level f-string &rest v-list) `(when (and *debugging* (member ,level *debugging*)) ,(nconc `(funcall #'format T ,f-string) v-list) (force-output))) (defmacro debug-if (level cond f-string &rest v-list) `(when (and *debugging* (member ,level *debugging*) ,cond) ,(nconc `(funcall #'format T ,f-string) v-list) (force-output))) (defun set-debug (&rest l) (dolist (li l *debugging*) (pushnew li *debugging*))) (defun reset-debug (&rest l) (if l (dolist (li l *debugging*) (setf *debugging* (delete li *debugging*))) (setf *debugging* nil))) (defun feature-list (l val) (dolist (f l) (case f (:transitivity (setf *transitivity* val)) (:concept-eqn (setf *concept-eqn* val)) (:subset-s-equivalent (setf *subset-s-equivalent* val)) (:backjumping (setf *backjumping* val)) (:obvious-subs (setf *obvious-subs* val)) (:top-level-caching (setf *top-level-caching* val)) (:full-caching (setf *full-caching* val)) (:blocking (setf *blocking* val)) (:taxonomic-encoding (setf *taxonomic-encoding* val)) (:gci-absorption (setf *gci-absorption* val)) (:cyclical-definitions (setf *cyclical-definitions* val)) (:auto-configure (setf *auto-configure* val)) (:moms-heuristic (setf *moms-heuristic* val)) (:prefer-pos-lits (setf *prefer-pos-lits* val)) (:minimise-clashes (setf *minimise-clashes* val)) (:auto-install-primitives (setf *auto-install-primitives* val)) (:auto-install-transitive (setf *auto-install-transitive* val)) (T (verbosity :warnings "~&!!WARNING!! unknown feature - ~S~%" f)))) (mapcan #'(lambda (f) (when (cdr f) (list (car f)))) `((:transitivity . ,*transitivity*) (:concept-eqn . ,*concept-eqn*) (:subset-s-equivalent . ,*subset-s-equivalent*) (:backjumping . ,*backjumping*) (:obvious-subs . ,*obvious-subs*) (:top-level-caching . ,*top-level-caching*) (:full-caching . ,*full-caching*) (:blocking . ,*blocking*) (:taxonomic-encoding . ,*taxonomic-encoding*) (:gci-absorption . ,*gci-absorption*) (:cyclical-definitions . ,*cyclical-definitions*) (:auto-configure . ,*auto-configure*) (:moms-heuristic . ,*moms-heuristic*) (:prefer-pos-lits . ,*prefer-pos-lits*) (:minimise-clashes . ,*minimise-clashes*) (:auto-install-primitives . ,*auto-install-primitives*) (:auto-install-transitive . ,*auto-install-transitive*)))) (defun set-features (&rest l) (feature-list l T)) (defun reset-features (&rest l) (feature-list l nil)) (defun set-profiling (&key (file "profile.out") (level 1)) (setf *profiling* level) (setf *profile-file* (not (null file))) (setf *profile-fname* file) (if (> level 0) (format T "~&Profiling level ~1D => ~A~%" level (if file file "*TERMINAL-IO*")) (format T "~&Profiling OFF~%")) (values)) (defun reset-profiling () (setf *profiling* 0) (format T "~&Profiling OFF~%") (values)) (defun todays-date () (multiple-value-bind (sec min hour date month year day bst zone) (get-decoded-time) (declare (ignore day)) (format nil "~2,'0D:~2,'0D:~2,'0D ~A ~D/~D/~D" (+ hour zone) min sec (if bst "BST" "GMT") date month year))) (defun features (&optional (f t)) (format f "~&;FaCT version ~A ~A~%" *version-number* (todays-date)) (format f "; ~A ~A ~A ~A~%" (lisp-implementation-type) (lisp-implementation-version) (if (machine-type) (machine-type) "386") (software-type)) (format f "; Loaded TBox files:~%") (map nil #'(lambda (n) (format f "; ~A~%" n)) (reverse *kb-file-names*)) (format f ";Features and optimisations:~%") (format f "; Transitivity: ~A~%" (if *transitivity* "ON" "OFF")) (format f "; Concept Inclusions: ~A~%" (if *concept-eqn* "ON" "OFF")) (format f "; Blocking ~A~%" (if *blocking* "ON" "OFF")) (when *blocking* (format f "; Subset S-equivalence: ~A~%" (if *subset-s-equivalent* "ON" "OFF"))) (format f "; Encoding & Normalisation: ~A~%" (if *taxonomic-encoding* "ON" "OFF")) (format f "; GCI absorption: ~A~%" (if *gci-absorption* "ON" "OFF")) (format f "; Backjumping: ~A~%" (if *backjumping* "ON" "OFF")) (format f "; Obvious Subsumption Detection: ~A~%" (if *obvious-subs* "ON" "OFF")) (format f "; Use caching in subsumption tests: ~A~%" (if *top-level-caching* "ON" "OFF")) (format f "; Use caching in satisfiability tests: ~A~%" (if *full-caching* "ON" "OFF")) (format f "; SAT branch to minimise clashes: ~A~%" (if *minimise-clashes* "ON" "OFF")) (format f "; Branching heuristic: ~A~%" (case *moms-heuristic* (0 "OLDEST+JW") (1 "MOMS") (2 "DEPENDENCIES+JW"))) (when (= *moms-heuristic* 1) (format f "; MOMS heuristic prefers positive lits: ~A~%" (if *prefer-pos-lits* "ON" "OFF"))) (format f "; Cyclical primitive definitions: ~A~%" (if *cyclical-definitions* "ON" "OFF")) (format f "; Profiling: ~A~%" (if *profiling* (if *profile-file* (format nil "Level ~1D => ~A" *profiling* *profile-fname*) "ON") "OFF")) (format f "~%")) (defun profile-open () (setf *profile-file* (when *profile-fname* (open *profile-fname* :direction :output :if-exists :supersede)))) (defun profile-close () (when *profile-fname* (close *profile-file*) (setf *profile-file* nil))) (defun profile-hdr () (unless *profile-file* (format T "~& search m-size m-depth c-access c-hit") (format T " run-time sat cyc"))) (defun profile-out (exp sat-result) (cond (*profile-file* (format *profile-file* "~%(~S ~S ~S ~S ~S ~S ~F ~S ~S)" exp *search-space* *max-model-size* *max-model-depth* *cache-accesses* *cache-hits* (/ *run-time* internal-time-units-per-second) sat-result *cycle*)) (T (format T "~&Satisfiable - ~A ?" (decode-concept exp)) (profile-hdr) (format T "~&~10@S~10@S~10@S~10@S~10@S~10F~4@S~4@S" *search-space* *max-model-size* *max-model-depth* *cache-accesses* *cache-hits* (/ *run-time* internal-time-units-per-second) sat-result *cycle*)))) ;;; ************** KSAT INTERFACE ************** (defun translate-role (r) (if (listp r) (if (and (string= *reasoner* "iFaCT") (= (length r) 2) (member (first r) '(inverse inv :inverse :inv))) (inv-r (translate-role (second r))) (error "UN-TRANSLATABLE ROLE - ~S" r)) r)) (defun translate-concept (c) (cond ((listp c) (rplaca c (case (car c) ((and :and) :and) ((or :or) :or) ((not :not) :not) ((some :some) :some) ((all :all) :all) (t (error "UN-TRANSLATABLE CONCEPT - ~S" c)))) (case (car c) ((:and :or) (do ((l (cdr c) (cdr l))) ((endp l)) (rplaca l (translate-concept (car l))))) ((:some :all) (rplaca (cddr c) (translate-concept (caddr c)))) (T (rplaca (cdr c) (translate-concept (cadr c))))) c) (T (case c (*TOP* :top) (*BOTTOM* :bottom) (t c))))) (defun alc-concept-coherent (c &key (k4 nil) (logic 'k)) (unless (member logic '(k kt k4 s4)) (error "Logic must be K, KT, K4 or S4 - ~A not supported~%" logic)) (when (and k4 (not logic)) (setf logic 'k4)) (clear-kb) (setf *search-space* 0) ; backtracking search space (setf *max-model-size* 1) ; max model size (progv '(*encode-reflexive* *auto-install-transitive* *transitivity* *auto-install-primitives* *blocking* *concept-eqn* *full-caching* *profiling* *verbosity*) `(,(not (null (member logic '(kt s4)))) ;;; reflexive ,(not (null (member logic '(k4 s4)))) ;;; transitive ,(not (null (member logic '(k4 s4)))) ;;; transitive T ;;; auto install ,(not (null (member logic '(k4 s4)))) ;;; blocking nil ;;; concept eqn ,(if *auto-configure* nil *full-caching*) ,(if *auto-configure* 0 *profiling*) ,(if *auto-configure* nil *verbosity*)) (let* ((encoded-concept (encode-concept-term (translate-concept c))) (start-time (get-internal-run-time))) (cond ((eql encoded-concept *BOTTOM*) (setf *run-time* 0) (setf *variable-assignments* 0) (setf *total-model-size* 0) (values nil *run-time* *variable-assignments* *total-model-size*)) (T (let ((res (test-sat encoded-concept))) (setf *run-time* (/ (- (get-internal-run-time) start-time) internal-time-units-per-second)) (setf *variable-assignments* *search-space*) (setf *total-model-size* *max-model-size*) (values (when res T) *run-time* *variable-assignments* *total-model-size*))))))) (defun load-ksat-concept (&optional fname) (declare (special con)) (progv '(con) '(nil) (unless fname (princ "Concept File? ") (setf fname (read))) (unless (stringp fname) (setf fname (string-downcase (symbol-name fname)))) (load (probe-file (concatenate 'string "~/lisp/ksat/Grail/Data/" fname))) con)) (defun alc-test (&key (c nil) (k4 nil)) (when (or (null c) (stringp c)) (setf c (load-ksat-concept c))) (let* ((st (get-internal-run-time)) (res (alc-concept-coherent c :k4 k4)) (et (get-internal-run-time))) (format T "~&~A ~10,2F ~10D ~10D ~10,2F~%" (if res "S" "U") (/ (- et st) internal-time-units-per-second) *variable-assignments* *total-model-size* *run-time*))) ;;; ************** KRIS INTERFACE ************** (defun defconcept-f (n d) (grail-define-concept n (translate-concept d))) (defmacro defconcept (n d) `(grail-define-concept ',n ',(translate-concept d))) (defun defprimconcept-f (n &optional d) (grail-define-primconcept n (when d (translate-concept d)))) (defmacro defprimconcept (n &optional d) `(grail-define-primconcept ',n ',(when d (translate-concept d)))) (defun defprimrole-f (r &key (parents nil) (supers nil) (transitive nil)) (setf parents (union parents supers)) (when (and parents (not (listp parents))) (error "~&!!ERROR!! BAD :PARENTS LIST - ~S~%" parents)) (grail-define-relation r r ; (intern (format nil "I*~A" r)) parents nil nil) (when (eq transitive T) (grail-redefine-relation r :transitive-across `(,r))) (car (multiple-value-list (r-defined r)))) (defmacro defprimrole (r &key (parents nil) (supers nil) (transitive nil)) `(defprimrole-f ',r :parents ',parents :supers ',supers :transitive ,transitive)) (defun defprimattribute-f (r &key (parents nil) (supers nil)) (setf parents (union parents supers)) (when (and parents (not (listp parents))) (error "~&!!ERROR!! BAD :PARENTS LIST - ~S~%" parents)) (grail-define-relation r r ; (intern (format nil "I*~A" r)) parents T T)) (defmacro defprimattribute (r &key (parents nil) (supers nil)) `(defprimattribute-f ',r :parents ',parents :supers ',supers)) (defun implies-f (a c) (grail-define-implication (translate-concept a) (translate-concept c)) (kris-concept a)) (defmacro implies (a c) `(implies-f ',a ',c)) (defun disjoint-f (&rest c-list) (do ((d-list (mapcar #'translate-concept c-list) (cdr d-list))) ((endp (cdr d-list))) (grail-define-implication (first d-list) (list :not (cons :or (cdr d-list)))))) (defmacro disjoint (&rest c-list) `(apply #'disjoint-f ',c-list)) (defun load-tkb (filename &key (verbose t) (overwrite nil)) (progv '(*verbosity*) '((:warnings)) (when verbose (set-verbosity :classify-1)) (when overwrite (clear-kb)) (let ((f (probe-file filename))) (if f (progn (push (namestring f) *kb-file-names*) (load f)) (progn (verbosity :warnings "~&!!WARNING!! file not found - ~S~%" filename) nil))))) (defun classify-tkb (&key (mode :nothing)) (progv '(*verbosity*) '((:warnings :synonyms)) (case mode (:stars (set-verbosity :classify-1)) (:names (set-verbosity :classify-2)) (:count (set-verbosity :test-counts)) (T)) (classify-all-concepts))) (defun init-tkb () (clear-kb)) (defun direct-supers (concept) (when (typep concept 'grail-concept) (setf concept (grail-concept-name concept))) (setf concept (translate-concept concept)) (when (system-name concept) (mapcar #'(lambda (c) (g-concept (c-grail-name c))) (c-parents (system-name concept))))) (defun all-supers (concept) (when (typep concept 'grail-concept) (setf concept (grail-concept-name concept))) (setf concept (translate-concept concept)) (when (system-name concept) (let (a (m (gensym))) (mark-all-ancestors (system-name concept) m) (setf (c-mark1 (system-name concept)) nil) (dotimes (c *next-available-concept* a) (when (eq (c-mark1 c) m) (push (g-concept (c-grail-name c)) a)))))) (defun direct-subs (concept) (when (typep concept 'grail-concept) (setf concept (grail-concept-name concept))) (setf concept (translate-concept concept)) (when (system-name concept) (mapcar #'(lambda (c) (g-concept (c-grail-name c))) (c-children (system-name concept))))) (defun all-subs (concept) (when (typep concept 'grail-concept) (setf concept (grail-concept-name concept))) (setf concept (translate-concept concept)) (when (system-name concept) (let (a (m (gensym))) (mark-all-descendants (system-name concept) m) (setf (c-mark1 (system-name concept)) nil) (dotimes (c *next-available-concept* a) (when (eq (c-mark1 c) m) (push (g-concept (c-grail-name c)) a)))))) (defun equivalences (concept) (when (typep concept 'grail-concept) (setf concept (grail-concept-name concept))) (setf concept (translate-concept concept)) (when (system-name concept) (let ((s-n (system-name concept))) (delete (g-concept concept) (mapcan #'(lambda (c) (when (eql (system-name c) s-n) (list (g-concept c)))) (list* :top :bottom *c-definitions*)))))) (defun satisfiable (concept) (progv '(*auto-install-primitives*) '(T) (when (test-sat (encode-concept-term (translate-concept concept))) T))) (defun subsumes (c1 c2) (progv '(*auto-install-primitives*) '(T) (unless (test-sat (encode-concept-term (translate-concept `(and ,c2 (not ,c1))))) T))) (defun equivalent-concepts (c1 c2) (and (subsumes c1 c2) (subsumes c2 c1))) (defun disjoint-concepts (c1 c2) (not (satisfiable `(and ,c1 ,c2)))) (defun add-concept-f (c-name definition &key (primitive nil)) (if (eq primitive t) (defprimconcept-f c-name definition) (defconcept-f c-name definition)) (classify-tkb) (car (multiple-value-list (g-concept c-name)))) (defmacro add-concept (c-name definition &key (primitive nil)) `(add-concept-f ',c-name ',definition :primitive ,primitive)) (defun classify-concept (concept) (let ((e-c (encode-concept-term (translate-concept concept)))) (unless (eql (c-classified e-c) 2) (classify-con e-c :install nil)) (when (c-synonym e-c) (setf e-c (c-synonym e-c))) (if (eql (c-classified e-c) 2) (values (mapcar #'(lambda (c) (g-concept (c-grail-name c))) (c-parents e-c)) (mapcar #'(lambda (c) (g-concept (c-grail-name c))) (c-children e-c)) (delete (g-concept concept) (mapcan #'(lambda (c) (when (eql (system-name c) e-c) (list (g-concept c)))) (list* :top :bottom *c-definitions*)))) (values (mapcar #'(lambda (c) (g-concept (c-grail-name c))) (c-parents e-c)) (mapcar #'(lambda (c) (g-concept (c-grail-name c))) (c-children e-c)) nil)))) (defun get-concept (name) (setf name (translate-concept name)) (car (multiple-value-list (g-concept name)))) (defun get-role (name) (car (multiple-value-list (r-defined name)))) (defun get-all-concepts () (mapcar #'get-concept (list* :top :bottom *c-definitions*))) (defun get-all-roles () (mapcar #'get-role *r-definitions*)) (defun classified-tkb? () "Return T if the TBox is fully processed and classified; NIL otherwise." (when (and ;;; every role has been pre-processed (every #'r-processed-f *r-definitions*) ;;; there are no unprocessed implications (endp *implications*) ;;; there are no unencoded universal constraints (endp *grail-universal-constraints*) ;;; every defined concept is encoded and classified (every #'(lambda (c) ;;; concept is encoded - it has a system name (and (system-name c) ;;; concept is classified - c-classified=2 (= (c-classified (system-name c)) 2))) *c-definitions*)) T)) (defun what-is? (obj) (typecase obj (grail-concept (if (grail-concept-primitive obj) 'primitive 'concept)) (role (if (role-functional obj) 'feature 'role)))) (defun is-primitive? (c) (and (typep c 'grail-concept) (grail-concept-primitive c))) (defun is-concept? (c) (and (typep c 'grail-concept) (not (grail-concept-primitive c)))) (defun is-role? (r) (and (typep r 'role) (not (role-functional r)))) (defun is-feature? (r) (and (typep r 'role) (role-functional r))) (defun name (obj) (typecase obj (grail-concept (grail-concept-name obj)) (role (role-grail-name obj)))) (defun description (obj) (typecase obj (grail-concept (let ((d (grail-concept-definition obj))) (if (grail-concept-primitive obj) (if d (kris-concept (flatten (list :and (intern (format nil "~A*" (grail-concept-name obj))) d))) (car (multiple-value-list (intern (format nil "~A*" (grail-concept-name obj)))))) (kris-concept d)))) (role (let (d) (when (role-transfered-by obj) (push t d) (push :transitive d)) (when (role-parents obj) (push (role-parents obj) d) (push :supers d)) (push (role-grail-name obj) d))))) ;;; ************** USER INTERFACE ************** (defun display-concept (c) (if (g-concept c) (let* ((s-n (system-name c))) (unless (eq (c-grail-name s-n) c) (format t "~&!!NOTE!! ~S is a SYNONYM for ~S.~%" c (c-grail-name s-n))) (format t "~A - ~S:~%" (if (c-primitive s-n) "PRIMITIVE-CONCEPT" "NON-PRIMITIVE-CONCEPT") (c-grail-name s-n)) (format t " DEFINITION: ~S~%" (c-definition s-n)) (format t " PARENTS: ~S~%" (c-parents s-n)) (format t " CHILDREN: ~S~%" (c-children s-n))) (format t "~&!!WARNING!! ~S is UNDEFINED.~%" c)) (values)) (defun display-role (r) (cond ((not (member r *r-definitions*)) (format t "~S is UNDEFINED~%" r)) (T (format t "PRIMITIVE-ROLE - ~S:~%" r) (when (r-parents r) (format t " DEFINITION: ~S~%" (cons 'and (r-parents r)))) (when (r-trans-across r) (format t " TRANSITIVE-ACROSS: ~S~%" (r-trans-across r))))) (values)) ;;; ***************** GNU STUFF **************** (defconstant gnu-warranty " NO WARRANTY BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. See the accompanying GNU general public license for further details. ") (defconstant gnu-conditions " You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) See the accompanying GNU general public license for further details. ") (defconstant gnu-copyright "Copyright (C) 1997 and 1998, Ian R. Horrocks and the University of Manchester. FaCT comes with ABSOLUTELY NO WARRANTY; for details type `(warranty)'. This is free software, and you are welcome to redistribute it under certain conditions; for details type `(conditions)'. ") (defun warranty () "display GNU (lack of) warranty information" (princ gnu-warranty) (values)) (defun conditions () "display GNU redistribution conditions" (princ gnu-conditions) (values)) (defun copyright () "display GNU copyright declaration" (format T "~&FaCT description logic classifier v~A~%" *version-number*) (princ gnu-copyright) (values)) ;;; ************** INITIALISATION ************** (eval-when (load eval) (copyright) (clear-kb) (setf *print-circle* t))
120,222
Common Lisp
.lisp
2,901
37.192003
102
0.636156
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
1057930cd7d0cf0f397d7c175ebcd3c9b536d3d26c9c1bf39be27643b1cbb174
12,593
[ -1 ]
12,594
load-race.lisp
lambdamikel_DLMAPS/src/prover/dl-benchmark-suite/race-1-1/load-race.lisp
#+(AND :LINUX :ALLEGRO-V5.0) (load "dl-test:race-1-1;race-1-1-acl5-linux;load-race") #+(AND :LINUX :ALLEGRO-V5.0.1) (load "dl-test:race-1-1;race-1-1-acl501-linux;load-race") #+(AND :UNIX (NOT :LINUX) :ALLEGRO-VERSION>= (not (version>= 5)) (version>= 4)) (load "dl-test:race-1-1;race-1-1-acl4-solaris;load-race") #+(AND :UNIX (NOT :LINUX) :ALLEGRO-VERSION>= (version>= 5)) (load "dl-test:race-1-1;race-1-1-acl5-solaris;load-race")
433
Common Lisp
.lisp
8
52.75
79
0.672986
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
d8ec8017c08b07c2e03cb5ae9863b4f59a263add2d85d921c8ed77c0fa2e5584
12,594
[ -1 ]
12,595
load-race.lisp
lambdamikel_DLMAPS/src/prover/dl-benchmark-suite/race-1-1/race-1-1-acl501-linux/load-race.lisp
;;;-*- Mode: Lisp; Package: COMMON-LISP-USER -*- ;;; This is the RACE Loader for ACL / LINUX Version (in-package :cl-user) (let ((excl::*redefinition-warnings* nil)) (let ((*enable-package-locked-errors* nil)) (defun excl::check-for-duplicate-definitions-in-file (fspec type when &optional icsp) (declare (ignore fspec type when icsp))))) (let* ((load-pathname (concatenate 'string (directory-namestring (translate-logical-pathname *load-pathname*)))) (example-directory (format nil "~Aexamples/**/*.*" load-pathname)) (race-directory (format nil "~A**/*.*" load-pathname))) (setf (logical-pathname-translations "race") `(("**;*.*" ,race-directory) ("examples;**;*.*" ,example-directory)))) (defun load-race () (load "race:race-1-1-0.fasl" :verbose t)) (load-race)
849
Common Lisp
.lisp
22
33.772727
73
0.644689
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
1ce28394222e6b07a457b8ff701be53e087838919fb21176e28eeb2cdbb88222
12,595
[ -1 ]
12,597
load-race.lisp
lambdamikel_DLMAPS/src/prover/dl-benchmark-suite/race-1-1/race-1-1-acl5-solaris/load-race.lisp
;;;-*- Mode: Lisp; Package: COMMON-LISP-USER -*- (in-package :cl-user) (let ((excl::*redefinition-warnings* nil)) (let ((*enable-package-locked-errors* nil)) (defun excl::check-for-duplicate-definitions-in-file (fspec type when &optional icsp) (declare (ignore fspec type when icsp))))) (let* ((load-pathname (concatenate 'string (directory-namestring (translate-logical-pathname *load-pathname*)))) (example-directory (format nil "~Aexamples/*.*" load-pathname)) (race-directory (format nil "~A/*.*" load-pathname))) (setf (logical-pathname-translations "race") `(("*.*" ,race-directory) ("examples;*.*" ,example-directory)))) (defun load-race () (load "race:race-1-1-0.fasl" :verbose t)) (load-race)
813
Common Lisp
.lisp
20
34.1
90
0.626276
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
9472c37c519b1c08c075907a52c7afd7af337d463c14f6af68d370bed2f6de43
12,597
[ -1 ]
12,599
compiler44.lisp
lambdamikel_DLMAPS/src/query/compiler44.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) ;;; ;;; ;;; (defconstant +continuation-marker+ 'cont-123) (defgeneric evaluate-tester (query continuation &rest args &key &allow-other-keys)) (defgeneric evaluate-enumerator (query continuation &rest args &key &allow-other-keys)) (defgeneric evaluate-from-bound-enumerator (query continuation &rest args &key &allow-other-keys)) (defgeneric evaluate-to-bound-enumerator (query continuation &rest args &key &allow-other-keys)) ;;; ;;; ;;; (defgeneric compile-query (query &rest args)) (defgeneric compile-subquery (query remaining-conjuncts &rest args)) ;;; ;;; ;;; #+:midelora (defun same-abox-individual-p (a b) (if (and a b (is-midelora-substrate-p *running-substrate*)) (eq (prover::find-node *running-substrate* a) (prover::find-node *running-substrate* b)) (eq a b))) #-:midelora (defun same-abox-individual-p (a b) (eq a b)) (defun same-role-p (a b) (equal a b)) (defun same-concept-p (a b) (equal a b)) (defun same-constraint-p (a b) (equal a b)) (defun same-individual-p (a b) (eq a b)) ;;; ;;; ;;; (defmethod individual-exists-p ((ind abox-individual)) (dl-prover-individual-exists-p *running-substrate* (individual ind))) (defmethod individual-exists-p ((ind substrate-individual)) (individual ind)) ;;; ;;; ;;; (defmethod bind-voi ((voi query-individual) bind-to continuation &key &allow-other-keys) (declare (ignorable bind-to continuation)) (nrql-error "Runtime error: Can't bind individual ~A" voi)) (defmethod get-binding-code ((voi substrate-variable) cand-name body &key (una-p *use-unique-name-assumption-p*)) ;;; fuer Compiler (let* ((cor-voi (corresponding-voi voi)) (name (textual-description voi)) (cor-name (when cor-voi (textual-description cor-voi))) (una-voi-p (una-voi-p voi)) (una-cor-voi-p (when cor-voi (una-voi-p cor-voi)))) `(let* ((,name ,cand-name) ,@(when cor-name `((,cor-name (when ,name (get-associated-abox-individual *running-substrate* ,name)))))) (when (and ,name (=> (and ,una-p ,una-voi-p) (not (marked-p ,name))) ,@(when cor-name `(,cor-name (dl-individual-p *running-substrate* ,cor-name) (=> (and ,una-p ,una-cor-voi-p) (not (member ,cor-name *candidates* :test #'same-abox-individual-p)))))) (unless ,name (nrql-error "Runtime error: Can't bind ~A to ~A" ,voi ,name)) (setf (bound-to ,voi) ,name) ,@(when cor-name `((setf (bound-to ,cor-voi) ,cor-name))) ,@(when una-voi-p `((mark ,name))) ,@(when body `((unwind-protect (let ((*candidates* ,(if (and cor-name una-cor-voi-p) `(cons ,cor-name *candidates*) '*candidates*))) ,body) ,@(when una-voi-p `((unmark ,name))) (setf (bound-to ,voi) nil) ,@(when cor-name `((setf (bound-to ,cor-voi) nil)))))))))) (defmethod bind-voi ((voi substrate-variable) bind-to continuation &key (una-p *use-unique-name-assumption-p*)) ;;; fuer Runtime (unless bind-to (nrql-error "Runtime error: Can't bind ~A to ~A" voi bind-to)) (let* ((cor-voi (corresponding-voi voi)) (una-voi-p (una-voi-p voi)) (una-cor-voi-p (when cor-voi (una-voi-p cor-voi))) (cor-bind-to (when cor-voi (get-associated-abox-individual *running-substrate* bind-to)))) (when (and (=> (and una-p una-voi-p) (not (marked-p bind-to))) (=> cor-voi (and (dl-individual-p *running-substrate* cor-bind-to) (=> (and una-p una-cor-voi-p) (not (member cor-bind-to *candidates* :test #'same-abox-individual-p)))))) (setf (bound-to voi) bind-to) (when cor-voi (setf (bound-to cor-voi) cor-bind-to)) (when continuation (when una-voi-p (mark bind-to)) (unwind-protect (let ((*candidates* (if (and cor-voi una-cor-voi-p) (cons cor-bind-to *candidates*) *candidates*))) (apply continuation nil)) (when una-voi-p (unmark bind-to)) (setf (bound-to voi) nil) (when cor-voi (setf (bound-to cor-voi) nil))))))) (defmethod carefully-bind-voi ((voi substrate-variable) bind-to continuation &key (una-p *use-unique-name-assumption-p*)) ;;; fuer Runtime (let* ((bound-to (bound-to voi)) (cor-voi (corresponding-voi voi)) (cor-bound-to (when cor-voi (bound-to cor-voi))) (cor-bind-to (when cor-voi (get-associated-abox-individual *running-substrate* bind-to)))) (if bound-to (when (same-individual-p bound-to bind-to) (if cor-bound-to (when (same-abox-individual-p cor-bound-to cor-bind-to) (apply continuation nil)) (apply continuation nil))) (bind-voi voi bind-to continuation :una-p una-p)))) #| (defmethod get-code-carefully-bind-voi ((voi substrate-variable) bind-to body &key (una-p *use-unique-name-assumption-p*)) `(let* ((bound-to (bound-to ,voi)) (cor-voi (corresponding-voi ,voi)) (cor-bound-to (when cor-voi (bound-to cor-voi))) (cor-bind-to (when cor-voi (get-associated-abox-individual *running-substrate* ,bind-to)))) (if bound-to (when (same-individual-p bound-to ,bind-to) (if cor-bound-to (when (same-abox-individual-p cor-bound-to cor-bind-to) ,body) (progn ,body))) ,(get-binding-code voi bind-to body :una-p una-p)))) |# ;;; ;;; ;;; (defmethod get-binding-code ((voi abox-variable) cand-name body &key (una-p *use-unique-name-assumption-p*)) ;;; fuer Compiler (let* ((cor-voi (corresponding-voi voi)) (name (textual-description voi)) (cor-name (when cor-voi (textual-description cor-voi))) (una-voi-p (una-voi-p voi)) (una-cor-voi-p (when cor-voi (una-voi-p cor-voi)))) `(let* ((,name ,cand-name) ,@(when cor-name `((,cor-name (when ,name (get-associated-substrate-node *running-substrate* ,name)))))) (when (and ,name (=> (and ,una-p ,una-voi-p) (not (member ,name *candidates* :test #'same-abox-individual-p))) ,@(when cor-name `(,cor-name (=> (and ,una-p ,una-cor-voi-p) (not (marked-p ,cor-name)))))) (unless ,name (nrql-error "Runtime error: Can't bind ~A to ~A" ,voi ,name)) (setf (bound-to ,voi) ,name) ,@(when cor-name `((setf (bound-to ,cor-voi) ,cor-name) ,@(when (and una-cor-voi-p body) `((mark ,cor-name))))) ,@(when body `((unwind-protect (let ((*candidates* ,(if una-voi-p `(cons ,name *candidates*) '*candidates*))) ,body) ,@(when cor-name `((setf (bound-to ,cor-voi) nil) ,@(when una-cor-voi-p `((unmark ,cor-name) )))) (setf (bound-to ,voi) nil)))))))) (defmethod bind-voi ((voi abox-variable) bind-to continuation &key (una-p *use-unique-name-assumption-p*)) ;;; fuer Runtime (unless bind-to (nrql-error "Runtime error: Can't bind ~A to ~A" voi bind-to)) (let* ((cor-voi (corresponding-voi voi)) (una-voi-p (una-voi-p voi)) (una-cor-voi-p (when cor-voi (una-voi-p cor-voi))) (cor-bind-to (when cor-voi (get-associated-substrate-node *running-substrate* bind-to)))) (declare (ignorable una-cor-voi-p)) (when (and (=> (and una-p una-cor-voi-p) (not (marked-p cor-bind-to))) (=> (and una-p una-voi-p) (not (member bind-to *candidates* :test #'same-abox-individual-p)))) (setf (bound-to voi) bind-to) (when cor-voi (setf (bound-to cor-voi) cor-bind-to)) (when una-cor-voi-p (mark cor-bind-to)) (when continuation (unwind-protect (let ((*candidates* (if una-voi-p (cons bind-to *candidates*) *candidates*))) (apply continuation nil)) (when una-cor-voi-p (unmark cor-bind-to)) (setf (bound-to voi) nil) (when cor-voi (setf (bound-to cor-voi) nil))))))) (defmethod carefully-bind-voi ((voi abox-variable) bind-to continuation &key (una-p *use-unique-name-assumption-p*)) ;;; fuer Runtime (let* ((bound-to (bound-to voi)) (cor-voi (corresponding-voi voi)) (cor-bound-to (when cor-voi (bound-to cor-voi))) (cor-bind-to (when cor-voi (get-associated-substrate-node *running-substrate* bind-to)))) (if bound-to (when (same-abox-individual-p bound-to bind-to) (if cor-bound-to (when (same-individual-p cor-bound-to cor-bind-to) (apply continuation nil)) (apply continuation nil))) (bind-voi voi bind-to continuation :una-p una-p)))) #| (defmethod get-code-carefully-bind-voi ((voi abox-variable) bind-to body &key (una-p *use-unique-name-assumption-p*)) `(let* ((bound-to (bound-to ,voi)) (cor-voi (corresponding-voi ,voi)) (cor-bound-to (when cor-voi (bound-to cor-voi))) (cor-bind-to (when cor-voi (get-associated-substrate-node *running-substrate* ,bind-to)))) (if bound-to (when (same-abox-individual-p bound-to ,bind-to) (if cor-bound-to (when (same-individual-p cor-bound-to cor-bind-to) ,body) (progn ,body))) ,(get-binding-code voi bind-to body :una-p una-p)))) |# ;;; ;;; ;;; (defmacro with-disabled-cache-entries ((query) &rest body) (let ((superset (gensym)) (exact (gensym)) (subset (gensym))) `(with-slots (superset-cache-reference subset-cache-reference exact-cache-reference) ,query (let ((,superset superset-cache-reference) (,subset subset-cache-reference) (,exact exact-cache-reference)) (setf superset-cache-reference nil subset-cache-reference nil exact-cache-reference nil) (unwind-protect (progn ,@body) (setf superset-cache-reference ,superset subset-cache-reference ,subset exact-cache-reference ,exact)))))) (defmacro with-superset-cache-as-exact-cache ((query) &rest body) (let ((var (gensym))) `(with-slots (superset-cache-reference exact-cache-reference) ,query (let ((,var exact-cache-reference)) (setf exact-cache-reference superset-cache-reference) (unwind-protect (progn ,@body) (setf exact-cache-reference ,var)))))) (defmacro with-subset-cache-as-exact-cache ((query) &rest body) (let ((var (gensym))) `(with-slots (subset-cache-reference exact-cache-reference) ,query (let ((,var exact-cache-reference)) (setf exact-cache-reference subset-cache-reference) (unwind-protect (progn ,@body) (setf exact-cache-reference ,var)))))) ;;; ;;; ;;; ;;; Ende erreicht: Tuple registrieren etc. ;;; (defun get-object-name (ind) (if (symbolp ind) (symbol-name ind) (name ind))) (defmethod query-fn ((query null)) #'(lambda () (with-slots (result-bindings last-result-bindings-item result-bindings-hash result-vois counter how-many abort-search-p answer-pattern counter bindings-found-p) *running-query* (setf bindings-found-p t) ;;; wichtig fuer Queries ohne Answer-Pattern! -> Antwort "t" (when (and (is-rule-p *running-query*) (not answer-pattern)) (register-bindings *running-substrate* *running-query* nil nil)) (unless answer-pattern (throw 'query-execution 'done)) (let* ((result-binding (mapcar #'bound-to result-vois)) (already-present-p (if (not *exclude-permutations-p*) (gethash result-binding result-bindings-hash) (let ((new-binding (copy-list (sort result-binding #'string-lessp :key #'get-object-name)))) (gethash new-binding result-bindings-hash))))) (unless already-present-p (let ((new-binding (get-tuple-for-pattern answer-pattern))) (setf (gethash result-binding result-bindings-hash) t) (incf counter) (register-bindings *running-substrate* *running-query* answer-pattern new-binding) (if (not last-result-bindings-item) (progn (setf result-bindings (list new-binding)) (setf last-result-bindings-item (last result-bindings))) (progn (setf (cdr last-result-bindings-item) (list new-binding)) (setf last-result-bindings-item (cdr last-result-bindings-item)))) (when (and how-many (= counter how-many)) (setf abort-search-p t) (throw 'query-execution 'done)))))))) ;;; ;;; fuer den Compiler ;;; (defmethod compile-query :before ((query query) &rest args) (declare (ignorable args)) (dolist (voi (vois (parser query))) (unless (is-query-individual-p voi) (setf (bound-to voi) nil)))) #| (defmethod compile-query ((query nrql-query) &rest args) (when (two-phase-processing-p query) (to-be-implemented 'compile-query)) (apply #'compile-subquery query nil args) query) |# (defmethod compile-query ((query nrql-query) &rest args) (let* ((body (apply #'compile-subquery query nil args)) (body `(let* ((query ,query) (tir-p (told-information-reasoning-p query))) (when (or tir-p (two-phase-processing-p query)) (let ((*told-information-reasoning-p* t)) (setf (slot-value query 'told-information-reasoning-p) t) ,body)) (unless tir-p (note-phase-two-starts query) (wait-for-request-or-abort query) (let ((*told-information-reasoning-p* nil)) (setf (slot-value query 'told-information-reasoning-p) nil) ,body)))) (function `(lambda () ,body))) (declare (ignorable function)) ;; (pprint function) (setf (slot-value query 'source) body) #-:only-runtime-evaluation ;;; Compiler must not see eval / compile (setf (slot-value query 'query-fn) (if *compile-queries-p* (compile nil function) (eval function))) query)) (defmethod compile-query ((query query) &rest args) (apply #'compile-subquery query nil args) query) ;;; ;;; Runtime ;;; (defmethod evaluate-query :before ((query query)) (declare (ignorable args)) (dolist (voi (vois (parser query))) (unless (is-query-individual-p voi) (setf (bound-to voi) nil)))) (defmethod evaluate-query ((query query)) (evaluate-subquery query nil)) (defmethod evaluate-query ((query nrql-query)) (let ((tir-p (told-information-reasoning-p query))) (when (or tir-p (two-phase-processing-p query)) (let ((*told-information-reasoning-p* t)) (setf (slot-value query 'told-information-reasoning-p) t) (evaluate-subquery query nil))) (unless tir-p (note-phase-two-starts query) (wait-for-request-or-abort query) (let ((*told-information-reasoning-p* nil)) (setf (slot-value query 'told-information-reasoning-p) nil) (evaluate-subquery query nil))))) ;;; ;;; ;;; (defmethod compile-subquery :around ((query query) remaining-conjuncts &rest args) (declare (ignorable args)) (let* ((body (if (not (is-active-p query)) `(progn ,(format nil "COMMENT: SKIP ~A" query) ,+continuation-marker+) (let ((x (call-next-method))) ;; (pprint x) x))) (body (if (tree-find body +continuation-marker+) (let ((continuation (if (is-active-p query) (with-vois-marked-as-bound (slot-value query 'vois) (compile-subquery (first remaining-conjuncts) (rest remaining-conjuncts))) (compile-subquery (first remaining-conjuncts) (rest remaining-conjuncts))))) (tree-map #'(lambda (x) (if (eq x +continuation-marker+) `(progn ,@(when (and (cache-bindings-p query) ;; QUERY IST IN DNF!!! ;; weil SUBQUERY, kann es keine ;; OR-QUERY SEIN! ;; NUR AND ODER ATOM! (not (is-and-query-p query))) ;; BINDINGS VOM ATOM-KONJUNKT CACHEN `(,(get-cache-binding-code query))) ,@(when (last-conjunct-p query) (let ((query (subquery-of query))) (when (cache-bindings-p query) `(,(get-cache-binding-code query))))) ,(if *compile-inline-p* continuation `(let ((*previous-conjunct* ,query)) (funcall (query-fn ,(first remaining-conjuncts)))))) x)) body)) body)) (function `(lambda () ,body))) (declare (ignorable function)) (setf (slot-value query 'source) body) #-:only-runtime-evaluation ;;; Compiler must not see eval / compile (setf (slot-value query 'query-fn) (if *compile-queries-p* (compile nil function) (eval function))) #+:only-runtime-evaluation (nrql-error "Compiler error: Can't compile queries, since :only-runtime-evaluation is on *features*") body)) (defmacro continuation-marker () `(let ((*previous-conjunct* query)) (setf (slot-value query 'bindings-found-p) t) (cache-binding-if-required query) (evaluate-subquery (first remaining-conjuncts) (rest remaining-conjuncts)))) (defmacro continuation () `#'(lambda (&rest args) (declare (ignorable args)) (continuation-marker))) ;;; ;;; ;;; (defun cache-binding-if-required (query) (when (and (cache-bindings-p query) (not (is-and-query-p query))) (cache-binding query)) (when (and (is-atomic-query-p query) (last-conjunct-p query)) (let ((query (subquery-of query))) (when (cache-bindings-p query) (cache-binding query))))) ;;; ;;; ;;; (defmethod evaluate-subquery :around ((query query) remaining-conjuncts) (declare (ignorable remaining-conjuncts)) (if (not (is-active-p query)) (progn (continuation-marker)) (call-next-method))) ;;; ;;; ;;; (defmethod compile-subquery ((query null) (remaining-conjuncts null) &rest args) (declare (ignorable remaining-conjuncts args)) `(funcall (query-fn nil))) (defmethod evaluate-subquery ((query null) (remaining-conjuncts null)) (declare (ignorable remaining-conjuncts)) (funcall (query-fn nil))) ;;; ;;; ;;; (defmethod compile-subquery ((query true-query) remaining-conjuncts &rest args) (declare (ignorable remaining-conjuncts args)) (continuation-marker)) (defmethod evaluate-subquery ((query true-query) remaining-conjuncts) (declare (ignorable remaining-conjuncts)) (continuation-marker)) ;;; ;;; ;;; (defmethod compile-subquery ((query false-query) remaining-conjuncts &rest args) (declare (ignorable remaining-conjuncts args)) nil) (defmethod evaluate-subquery ((query false-query) remaining-conjuncts) (declare (ignorable remaining-conjuncts)) nil) ;;; ;;; ;;; (defmethod compile-subquery ((query and-query) remaining-conjuncts &rest args) (let* ((first (first (subqueries query))) (rest (append (rest (subqueries query)) remaining-conjuncts))) (with-slots (exact-cache-reference superset-cache-reference subset-cache-reference) query (labels ((do-it (bindings &optional check-p) (with-vois-marked-as-bound (all-vois query) `(abortable-dolist (binding ,bindings) (when (or ,(not check-p) (=> ,subset-cache-reference (not (gethash binding (bindings-hash ,subset-cache-reference))))) (loop as voi in ',(all-vois query) as val in binding do (bind-voi voi val nil)) ,(apply #'compile-subquery first rest args)))))) (cond (exact-cache-reference (deactivate-all-subqueries query) (do-it `(bindings ,exact-cache-reference))) ((or superset-cache-reference subset-cache-reference) `(progn ,@(with-subset-cache-as-exact-cache (query) (when exact-cache-reference (deactivate-all-subqueries query) (prog1 (list (do-it `(bindings ,exact-cache-reference))) (activate-all-subqueries query)))) ,(if superset-cache-reference (do-it `(bindings ,superset-cache-reference) t) (apply #'compile-subquery first rest args)))) (t (apply #'compile-subquery first rest args))))))) (defmethod evaluate-subquery ((query and-query) remaining-conjuncts) (let* ((first (first (subqueries query))) (rest (append (rest (subqueries query)) remaining-conjuncts))) (with-slots (exact-cache-reference superset-cache-reference subset-cache-reference) query (labels ((do-it (bindings &optional check-p) (with-saved-bindings (all-vois query) (abortable-dolist (binding bindings) (when (or (not check-p) (=> subset-cache-reference (not (gethash binding (bindings-hash subset-cache-reference))))) (loop as voi in (all-vois query) as val in binding do (bind-voi voi val nil)) (evaluate-subquery first rest)))))) (cond (exact-cache-reference (deactivate-all-subqueries query) (do-it (bindings exact-cache-reference))) ((or subset-cache-reference superset-cache-reference) (with-subset-cache-as-exact-cache (query) (when exact-cache-reference (deactivate-all-subqueries query) (do-it (bindings exact-cache-reference)) (activate-all-subqueries query))) (if superset-cache-reference (do-it (bindings superset-cache-reference) t) (evaluate-subquery first rest))) (t (evaluate-subquery first rest))))))) ;;; ;;; ;;; (defmethod compile-subquery ((query query-reference) remaining-conjuncts &rest args) (declare (ignorable args remaining-conjuncts)) (with-vois-marked-as-bound (result-vois query) `(let ((all-inds nil) (all-nodes nil)) (labels ((continue () (progn ,(apply #'compile-subquery (first remaining-conjuncts) (rest remaining-conjuncts) args))) (bind-vois-to (vois vals) ;; (princ vois) (let ((voi (first vois)) (val (first vals))) (when (and voi val) (if (and (cdr vois) (cdr vals)) (carefully-bind-voi voi val #'(lambda () (bind-vois-to (rest vois) (rest vals)))) (carefully-bind-voi voi val #'(lambda () (continue))))))) (neg-bind-vois-to (vois all-vois) ;; (princ vois) (let ((voi (first vois))) (when voi (dolist (val (if (is-abox-voi-p voi) (or all-inds (setf all-inds (dl-prover-all-individuals ,(substrate query)))) (or all-nodes (setf all-nodes (get-nodes ,(substrate query)))))) (if (cdr vois) (carefully-bind-voi voi val #'(lambda () (neg-bind-vois-to (rest vois) all-vois))) (carefully-bind-voi voi val #'(lambda (&rest args) (declare (ignorable args)) (let* ((result-binding (mapcar #'bound-to all-vois)) (already-present-p (gethash result-binding (result-bindings-hash ,(referenced-query query))))) (unless already-present-p (continue))))))))))) ,(cond ((result-vois query) (cond ((negated-p query) `(cond ((not (tuple-at-a-time-p ,(referenced-query query))) (neg-bind-vois-to (result-vois ,query) (result-vois ,query))) (t ;; hier habe ich keine Chance - das kann nicht ;; iterativ beantwortet werden! (get-answer ,(referenced-query query)) (neg-bind-vois-to (result-vois ,query) (result-vois ,query) )))) (t `(cond ((not (tuple-at-a-time-p ,(referenced-query query))) (abortable-dolist (binding (result-bindings ,(referenced-query query))) (bind-vois-to (result-vois ,query) binding))) (t (loop (let ((binding (get-next-tuple ,(referenced-query query)))) (cond ((consp binding) (bind-vois-to (result-vois ,query) (mapcar #'second binding)) (return)) ((eq binding :warning-expensive-phase-two-starts) ;; noch ein Durchlauf! ) (t (return)))))))))) (t `(progn (when (tuple-at-a-time-p ,(referenced-query query)) (get-next-tuple ,(referenced-query query))) ,(if (negated-p query) `(when (not (bindings-found-p ,(referenced-query query))) (continue)) `(when (bindings-found-p ,(referenced-query query)) (continue)))))))))) (defmethod evaluate-subquery ((query query-reference) remaining-conjuncts) (declare (ignorable remaining-conjuncts)) (let ((all-inds nil) (all-nodes nil)) (labels ((bind-vois-to (vois vals) ;; (princ vois) (let ((voi (first vois)) (val (first vals))) (when (and voi val) (if (and (cdr vois) (cdr vals)) (carefully-bind-voi voi val #'(lambda () (bind-vois-to (rest vois) (rest vals)))) (carefully-bind-voi voi val (continuation)))))) (neg-bind-vois-to (vois all-vois) ;; (princ vois) (let ((voi (first vois))) (when voi (dolist (val (if (is-abox-voi-p voi) (or all-inds (setf all-inds (dl-prover-all-individuals (substrate query)))) (or all-nodes (setf all-nodes (get-nodes (substrate query)))))) (if (cdr vois) (carefully-bind-voi voi val #'(lambda () (neg-bind-vois-to (rest vois) all-vois))) (carefully-bind-voi voi val #'(lambda (&rest args) (declare (ignorable args)) (let* ((result-binding (mapcar #'bound-to all-vois)) (already-present-p (gethash result-binding (result-bindings-hash (referenced-query query))))) (unless already-present-p (funcall (continuation)))))))))))) (cond ((result-vois query) (cond ((negated-p query) (cond ((not (tuple-at-a-time-p (referenced-query query))) (neg-bind-vois-to (result-vois query) (result-vois query))) (t ;; hier habe ich keine Chance - das kann nicht ;; iterativ beantwortet werden! (get-answer (referenced-query query)) (neg-bind-vois-to (result-vois query) (result-vois query) )))) (t (cond ((not (tuple-at-a-time-p (referenced-query query))) (abortable-dolist (binding (result-bindings (referenced-query query))) (bind-vois-to (result-vois query) binding))) (t (loop (let ((binding (get-next-tuple (referenced-query query)))) (cond ((consp binding) (bind-vois-to (result-vois query) (mapcar #'second binding)) (return)) ((eq binding :warning-expensive-phase-two-starts) ;; noch ein Durchlauf! ) (t (return)))))))))) (t (when (tuple-at-a-time-p (referenced-query query)) (get-next-tuple (referenced-query query))) (if (negated-p query) (when (not (bindings-found-p (referenced-query query))) (funcall (continuation))) (when (bindings-found-p (referenced-query query)) (funcall (continuation))))))))) ;;; ;;; ;;; (defmethod compile-subquery ((query or-query) remaining-conjuncts &rest args) (when (or (exact-cache-reference query) (superset-cache-reference query) (subset-cache-reference query)) (to-be-implemented 'use-cache-for-or)) `(progn ,@(mapcar #'(lambda (disjunct) (let ((code (apply #'compile-subquery disjunct remaining-conjuncts args))) (if *compile-inline-p* code `(funcall (query-fn ,disjunct))))) (subqueries query)) ,@(when (cache-bindings-p query) `(,(get-cache-binding-code query))))) (defmethod evaluate-subquery ((query or-query) remaining-conjuncts) (when (or (exact-cache-reference query) (superset-cache-reference query) (subset-cache-reference query)) (to-be-implemented 'use-cache-for-or)) (dolist (disjunct (subqueries query)) (evaluate-subquery disjunct remaining-conjuncts)) (when (cache-bindings-p query) (cache-binding query))) ;;; ;;; spezielle atomare Queries ;;; (defmethod compile-subquery ((query top-query) remaining-conjuncts &rest args) (declare (ignorable args remaining-conjuncts)) ;;; bisher gibt es nur unaere Top-Queries (let ((voi (voi query)) (substrate (substrate query))) (if (bound-to voi) `(progn ,+continuation-marker+) `(abortable-dolist (cand ,(if (is-abox-voi-p voi) `(dl-prover-all-individuals ,substrate) `(get-nodes ,substrate))) ,(get-binding-code voi 'cand +continuation-marker+))))) (defmethod evaluate-subquery ((query top-query) remaining-conjuncts) (let ((voi (voi query)) (substrate (substrate query))) (if (bound-to voi) (continuation-marker) (abortable-dolist (cand (if (is-abox-voi-p voi) (dl-prover-all-individuals substrate) (get-nodes substrate))) (bind-voi voi cand (continuation)))))) (defmethod compile-subquery ((query bottom-query) remaining-conjuncts &rest args) (declare (ignorable args remaining-conjuncts)) nil) (defmethod evaluate-subquery ((query bottom-query) remaining-conjuncts) (declare (ignorable remaining-conjuncts)) nil) ;;; ;;; ;;; (defmethod compile-subquery ((query unary-query) remaining-conjuncts &rest args) (declare (ignorable args remaining-conjuncts)) (if (bound-to (voi query)) (get-tester-code query +continuation-marker+) `(catch 'abort-enumerator ,(get-enumerator-code query (get-binding-code (voi query) 'cand +continuation-marker+) :var 'cand)))) (defmethod evaluate-subquery ((query unary-query) remaining-conjuncts) (if (bound-to (voi query)) (evaluate-tester query (continuation)) (catch 'abort-enumerator (evaluate-enumerator query #'(lambda (&rest args &key var (una-p *use-unique-name-assumption-p*) &allow-other-keys) (declare (ignorable args)) (bind-voi (voi query) var (continuation) :una-p una-p)))))) (defmethod compile-subquery ((query binary-query) remaining-conjuncts &rest args) (declare (ignorable args remaining-conjuncts)) (if (bound-to (voi-from query)) (if (bound-to (voi-to query)) (get-tester-code query +continuation-marker+) `(catch 'abort-enumerator ,(get-from-bound-enumerator-code query (get-binding-code (voi-to query) 'cand-to +continuation-marker+) :to 'cand-to))) (if (bound-to (voi-to query)) `(catch 'abort-enumerator ,(get-to-bound-enumerator-code query (get-binding-code (voi-from query) 'cand-from +continuation-marker+) :from 'cand-from)) ;;; beide unbound (if (eq (voi-from query) (voi-to query)) `(catch 'abort-enumerator ,(get-enumerator-code query (get-binding-code (voi-from query) 'cand-from +continuation-marker+) :from 'cand-from :to 'cand-to)) `(catch 'abort-enumerator ,(get-enumerator-code query (get-binding-code (voi-from query) 'cand-from (get-binding-code (voi-to query) 'cand-to +continuation-marker+)) :from 'cand-from :to 'cand-to)))))) ;;; wichtig: f. same-as muss ueberladen werden, ;;; wegen UNA-VOI-p! (defmethod compile-subquery ((query same-as-query) remaining-conjuncts &rest args) (declare (ignorable args remaining-conjuncts)) (if (bound-to (voi-from query)) (if (bound-to (voi-to query)) (get-tester-code query +continuation-marker+) (get-from-bound-enumerator-code query (get-binding-code (voi-to query) 'cand-to +continuation-marker+ :una-p nil) :to 'cand-to)) (if (bound-to (voi-to query)) (get-to-bound-enumerator-code query (get-binding-code (voi-from query) 'cand-from +continuation-marker+ :una-p nil) :from 'cand-from) ;;; beide unbound (nrql-error "Bad same-as query conjunct detected: ~A" query)))) (defmethod evaluate-subquery ((query binary-query) remaining-conjuncts) (if (bound-to (voi-from query)) (if (bound-to (voi-to query)) (evaluate-tester query (continuation)) (catch 'abort-enumerator (evaluate-from-bound-enumerator query #'(lambda (&rest args &key to (una-p *use-unique-name-assumption-p*) &allow-other-keys) (declare (ignorable args)) (bind-voi (voi-to query) to (continuation) :una-p una-p))))) (if (bound-to (voi-to query)) (catch 'abort-enumerator (evaluate-to-bound-enumerator query #'(lambda (&rest args &key from (una-p *use-unique-name-assumption-p*) &allow-other-keys) (declare (ignorable args)) (bind-voi (voi-from query) from (continuation) :una-p una-p)))) (if (eq (voi-from query) (voi-to query)) (catch 'abort-enumerator (evaluate-enumerator query #'(lambda (&rest args &key from to (una-p *use-unique-name-assumption-p*) &allow-other-keys) (declare (ignorable args)) ;;; der Compiler macht das an der entsp. Stelle ;;; im Enumerator-Code!!! *nicht* vergessen! (when (same-individual-p from to) (bind-voi (voi-from query) from (continuation) :una-p una-p))))) (catch 'abort-enumerator (evaluate-enumerator query #'(lambda (&rest args &key from to (una-p *use-unique-name-assumption-p*) &allow-other-keys) (declare (ignorable args)) (bind-voi (voi-from query) from #'(lambda (&rest args &key &allow-other-keys) (declare (ignorable args)) (bind-voi (voi-to query) to (continuation) :una-p una-p)) :una-p una-p)))))))) ;;; ;;; AROUND-METHODEN - CACHE-Beruecksichtigung ;;; (defmethod get-tester-code :around ((query query) body &rest args) (with-slots (exact-cache-reference subset-cache-reference superset-cache-reference) query (cond (exact-cache-reference (apply #'get-code-check-if-cache-member-p query :exact body args)) ((or superset-cache-reference subset-cache-reference) `(progn ,(with-subset-cache-as-exact-cache (query) (when exact-cache-reference (apply #'get-code-check-if-cache-member-p query :exact body args))) ,(if superset-cache-reference (apply #'get-code-check-if-cache-member-p query :superset body args) (call-next-method)))) (t (call-next-method))))) (defmethod evaluate-tester :around ((query query) continuation &rest args &key &allow-other-keys) (declare (ignorable args)) (with-slots (exact-cache-reference subset-cache-reference superset-cache-reference) query (cond (exact-cache-reference (check-if-cache-member-p query :exact continuation)) ((or superset-cache-reference subset-cache-reference) (with-subset-cache-as-exact-cache (query) (when exact-cache-reference (check-if-cache-member-p query :exact continuation))) (if superset-cache-reference (check-if-cache-member-p query :superset continuation) (call-next-method))) (t (call-next-method))))) (defmethod get-enumerator-code :around ((query query) body &rest args &key &allow-other-keys) (declare (ignorable args)) (with-slots (exact-cache-reference subset-cache-reference superset-cache-reference) query (cond (exact-cache-reference (apply #'get-code-return-cache-members query :exact body args)) ((or superset-cache-reference subset-cache-reference) `(progn ,(with-subset-cache-as-exact-cache (query) (when exact-cache-reference (apply #'get-code-return-cache-members query :exact body args))) ,(if superset-cache-reference (apply #'get-code-return-cache-members query :superset body args) (call-next-method)))) (t (call-next-method))))) (defmethod evaluate-enumerator :around ((query query) continuation &rest args &key &allow-other-keys) (declare (ignorable args)) (with-slots (exact-cache-reference subset-cache-reference superset-cache-reference) query (cond (exact-cache-reference (return-cache-members query :exact continuation)) ((or superset-cache-reference subset-cache-reference) (with-subset-cache-as-exact-cache (query) (when exact-cache-reference (return-cache-members query :exact continuation))) (if superset-cache-reference (return-cache-members query :superset continuation) (call-next-method))) (t (call-next-method))))) (defmethod get-from-bound-enumerator-code :around ((query query) body &rest args &key &allow-other-keys) (with-slots (exact-cache-reference subset-cache-reference superset-cache-reference) query (cond (exact-cache-reference (apply #'get-code-return-cache-members-from-bound query :exact body args)) ((or superset-cache-reference subset-cache-reference) `(progn ,(with-subset-cache-as-exact-cache (query) (when exact-cache-reference (apply #'get-code-return-cache-members-from-bound query :exact body args))) ,(if superset-cache-reference (apply #'get-code-return-cache-members-from-bound query :superset body args) (call-next-method)))) (t (call-next-method))))) (defmethod evaluate-from-bound-enumerator :around ((query query) continuation &rest args &key &allow-other-keys) (declare (ignorable args)) (with-slots (exact-cache-reference subset-cache-reference superset-cache-reference) query (cond (exact-cache-reference (return-cache-members-from-bound query :exact continuation)) ((or superset-cache-reference subset-cache-reference) (with-subset-cache-as-exact-cache (query) (when exact-cache-reference (return-cache-members-from-bound query :exact continuation))) (if superset-cache-reference (return-cache-members-from-bound query :superset continuation) (call-next-method))) (t (call-next-method))))) (defmethod get-to-bound-enumerator-code :around ((query query) body &rest args &key &allow-other-keys) (with-slots (exact-cache-reference subset-cache-reference superset-cache-reference) query (cond (exact-cache-reference (apply #'get-code-return-cache-members-to-bound query :exact body args)) ((or superset-cache-reference subset-cache-reference) `(progn ,(with-subset-cache-as-exact-cache (query) (apply #'get-code-return-cache-members-to-bound query :exact body args)) ,(if superset-cache-reference (apply #'get-code-return-cache-members-to-bound query :superset body args) (call-next-method)))) (t (call-next-method))))) (defmethod evaluate-to-bound-enumerator :around ((query query) continuation &rest args &key &allow-other-keys) (declare (ignorable args)) (with-slots (exact-cache-reference subset-cache-reference superset-cache-reference) query (cond (exact-cache-reference (return-cache-members-to-bound query :exact continuation)) ((or superset-cache-reference subset-cache-reference) (with-subset-cache-as-exact-cache (query) (when exact-cache-reference (return-cache-members-to-bound query :exact continuation))) (if superset-cache-reference (return-cache-members-to-bound query :superset continuation) (call-next-method))) (t (call-next-method))))) ;;; ;;; Substrate Queries ;;; Achtung: dieser Code ist generisch, aber nicht maximal effizient, da ;;; er die Methode "matches-p" (s. "runtime.lisp") zum Abgleich waerend der Laufzeit ;;; verwendet! Fuer maximale Effizienz sollte "compile-subquery" ueberladen werde, z.B. fuer ;;; "simple-node-query" und dann statt matches "equal" direkt eincodiert werden, ;;; wodurch dann auf "matches-p" verzichtet werden kann ;;; #+:dlmaps (defquery-code (substrate-node-query) (:tester (:compiler (body &rest args &key var &allow-other-keys) (declare (ignorable args)) (with-slots (negated-p voi) query `(,(if negated-p 'unless 'when) (matches-p ,query ,(or var `(bound-to ,voi))) ,body))) (:runtime (continuation &rest args &key var &allow-other-keys) ;;; Achtung: nur bei den Testern koennen per key ;;; zu ueberpruefende Vars angebeben werden! ;;; gilt nur fuer Runtime! (with-slots (negated-p voi) query (let ((var (or var (bound-to voi)))) (if negated-p (unless (matches-p query var ) (apply continuation :var var args)) (when (matches-p query var) (apply continuation :var var args))))))) (:enumerator (:compiler (body &rest args &key var &allow-other-keys) (declare (ignorable args)) (unless var (nrql-error "Compiler error: No var given")) (with-slots (negated-p substrate) query (if negated-p `(abortable-dolist (,var (get-nodes ,substrate)) (unless (matches-p ,query ,var) ,body)) `(abortable-dolist (,var (retrieve-matching-objects ,substrate ,query)) ,body)))) (:runtime (continuation &rest args &key &allow-other-keys) ;; Achtung - hier kann man *keine* Vars uebergeben! (with-slots (negated-p substrate) query (if negated-p (abortable-dolist (var (get-nodes substrate)) (unless (matches-p query var) (apply continuation :var var args))) (abortable-dolist (var (retrieve-matching-objects substrate query)) (apply continuation :var var args))))))) #+:dlmaps (defquery-code (substrate-edge-query) (:tester (:compiler (body &rest args &key from to &allow-other-keys) (declare (ignorable args)) (with-slots (negated-p substrate voi-from voi-to) query `(,(if negated-p 'unless 'when) (some #'(lambda (edge) (matches-p ,query edge)) (get-edges-between ,substrate ,(or from `(bound-to ,voi-from)) ,(or to `(bound-to ,voi-to)))) ,body))) (:runtime (continuation &rest args &key from to &allow-other-keys) (with-slots (negated-p substrate voi-from voi-to) query (let ((from (or from (bound-to voi-from))) (to (or to (bound-to voi-to)))) (if negated-p (unless (some #'(lambda (edge) (matches-p query edge)) (get-edges-between substrate from to)) (apply continuation :from from :to to args)) (when (some #'(lambda (edge) (matches-p query edge)) (get-edges-between substrate from to)) (apply continuation :from from :to to args))))))) (:from-bound-enumerator (:compiler (body &rest args &key to &allow-other-keys) (declare (ignorable args)) (unless to (nrql-error "Compiler error: No var given")) (with-slots (negated-p substrate voi-from) query (if negated-p `(abortable-dolist (,to (get-nodes ,substrate)) (unless (some #'(lambda (edge) (matches-p ,query edge)) (get-edges-between ,substrate (bound-to ,voi-from) ,to)) ,body)) `(abortable-dolist (edge (outgoing (bound-to ,voi-from))) (let ((,to (to edge))) (declare (ignorable ,to)) (when (matches-p ,query edge) ,body)))))) (:runtime (continuation &rest args &key &allow-other-keys) (with-slots (negated-p substrate voi-from) query (if negated-p (abortable-dolist (var (get-nodes substrate)) (unless (some #'(lambda (edge) (matches-p query edge)) (get-edges-between substrate (bound-to voi-from) var)) (apply continuation :to var args))) (abortable-dolist (edge (outgoing (bound-to voi-from))) (when (matches-p query edge) (apply continuation :to (to edge) args))))))) (:to-bound-enumerator (:compiler (body &rest args &key from &allow-other-keys) (declare (ignorable args)) (unless from (nrql-error "Compiler error: No var given")) (with-slots (negated-p substrate voi-to) query (if (negated-p query) `(abortable-dolist (,from (get-nodes ,substrate)) (unless (some #'(lambda (edge) (matches-p ,query edge)) (get-edges-between ,substrate ,from (bound-to ,voi-to))) ,body)) `(abortable-dolist (edge (incoming (bound-to ,voi-to))) (let ((,from (from edge))) (declare (ignorable ,from)) (when (matches-p ,query edge) ,body)))))) (:runtime (continuation &rest args &key &allow-other-keys) (with-slots (negated-p substrate voi-to) query (if negated-p (abortable-dolist (var (get-nodes substrate)) (unless (some #'(lambda (edge) (matches-p query edge)) (get-edges-between substrate var (bound-to voi-to))) (apply continuation :from var args))) (abortable-dolist (edge (incoming (bound-to voi-to))) (when (matches-p query edge) (apply continuation :from (from edge) args))))))) (:enumerator (:compiler (body &rest args &key from to &allow-other-keys) (declare (ignorable args)) (unless (and from to) (nrql-error "Compiler error: No vars given")) (with-slots (negated-p substrate) query (if negated-p (if (eq (voi-from query) (voi-to query)) `(abortable-dolist (,from (get-nodes ,substrate)) (unless (some #'(lambda (edge) (matches-p ,query edge)) (get-edges-between ,substrate ,from ,from)) ,body)) `(abortable-dolist (,from (get-nodes ,substrate)) (abortable-dolist (,to (get-nodes ,substrate)) (unless (some #'(lambda (edge) (matches-p ,query edge)) (get-edges-between ,substrate ,from ,to)) ,body)))) (if (eq (voi-from query) (voi-to query)) `(abortable-dolist (,from (get-nodes ,substrate)) (when (some #'(lambda (edge) (matches-p ,query edge)) (get-edges-between ,substrate ,from ,from)) ,body)) `(abortable-dolist (edge (retrieve-matching-objects ,substrate ,query)) (let ((,from (from edge)) (,to (to edge))) (declare (ignorable ,from ,to)) ,body)))))) (:runtime (continuation &rest args &key &allow-other-keys) (with-slots (negated-p substrate) query (if negated-p (if (eq (voi-from query) (voi-to query)) (abortable-dolist (from (get-nodes substrate)) (unless (some #'(lambda (edge) (matches-p query edge)) (get-edges-between substrate from from)) (apply continuation :from from :to from args))) (abortable-dolist (from (get-nodes substrate)) (abortable-dolist (to (get-nodes substrate)) (unless (some #'(lambda (edge) (matches-p query edge)) (get-edges-between substrate from to)) (apply continuation :from from :to to args))))) (if (eq (voi-from query) (voi-to query)) (abortable-dolist (from (get-nodes substrate)) (when (some #'(lambda (edge) (matches-p query edge)) (get-edges-between substrate from from)) (apply continuation :from from :to from args))) (abortable-dolist (edge (retrieve-matching-objects substrate query)) (apply continuation :from (from edge) :to (to edge) args)))))))) ;;; ;;; ABOX Queries (Racer + MiDeLoRa) ;;; (defquery-code (instance-retrieval-query) (:tester (:compiler (body &rest args &key var &allow-other-keys) (apply #'get-code-dl-prover-check-individual-instance-p (or var `(bound-to ,(voi query))) (dl-concept query) body :query query :negated-p (negated-p query) args)) (:runtime (continuation &rest args &key var &allow-other-keys) (apply #'evaluate-dl-prover-check-individual-instance-p (or var (bound-to (voi query))) (dl-concept query) continuation :query query :negated-p (negated-p query) args))) (:enumerator (:compiler (body &rest args &key var &allow-other-keys) (unless var (nrql-error "Compiler error: No var given")) (apply #'get-code-dl-prover-retrieve-concept-instances (dl-concept query) body :query query :negated-p (negated-p query) args)) (:runtime (continuation &rest args &key &allow-other-keys) (apply #'evaluate-dl-prover-retrieve-concept-instances (dl-concept query) continuation :query query :negated-p (negated-p query) args)))) (defquery-code (has-known-successor-retrieval-query) (:tester (:compiler (body &rest args &key var &allow-other-keys) (apply #'get-code-dl-prover-check-has-known-successor-p (or var `(bound-to ,(voi query))) (dl-role query) body :query query :negated-p (negated-p query) args)) (:runtime (continuation &rest args &key var &allow-other-keys) (apply #'evaluate-dl-prover-check-has-known-successor-p (or var (bound-to (voi query))) (dl-role query) continuation :query query :negated-p (negated-p query) args))) (:enumerator (:compiler (body &rest args &key var &allow-other-keys) (unless var (nrql-error "Compiler error: No var given")) (apply #'get-code-dl-prover-retrieve-has-known-successor-instances (dl-role query) body :query query :negated-p (negated-p query) args)) (:runtime (continuation &rest args &key &allow-other-keys) (apply #'evaluate-dl-prover-retrieve-has-known-successor-instances (dl-role query) continuation :query query :negated-p (negated-p query) args)))) (defquery-code (edge-retrieval-query) (:tester (:compiler (body &rest args &key from to &allow-other-keys) (apply #'get-code-dl-prover-check-individuals-related-p (or from `(bound-to ,(voi-from query))) (or to `(bound-to ,(voi-to query))) (dl-role query) body :query query :negated-p (negated-p query) args)) (:runtime (continuation &rest args &key from to &allow-other-keys) (apply #'evaluate-dl-prover-check-individuals-related-p (or from (bound-to (voi-from query))) (or to (bound-to (voi-to query))) (dl-role query) continuation :query query :negated-p (negated-p query) args))) (:from-bound-enumerator (:compiler (body &rest args &key to &allow-other-keys) (unless to (nrql-error "Compiler error: No var given")) (apply #'get-code-dl-prover-retrieve-individual-fillers `(bound-to ,(voi-from query)) (dl-role query) body :query query :negated-p (negated-p query) :to to args)) (:runtime (continuation &rest args &key &allow-other-keys) (apply #'evaluate-dl-prover-retrieve-individual-fillers (bound-to (voi-from query)) (dl-role query) continuation :query query :negated-p (negated-p query) args))) (:to-bound-enumerator (:compiler (body &rest args &key from &allow-other-keys) (unless from (nrql-error "Compiler error: No var given")) (apply #'get-code-dl-prover-retrieve-individual-fillers `(bound-to ,(voi-to query)) (dl-role query) body :query query :inverse-p t ;;; wichtig! :negated-p (negated-p query) :to from ;;; wichtig! args)) (:runtime (continuation &rest args &key &allow-other-keys) (apply #'evaluate-dl-prover-retrieve-individual-fillers (bound-to (voi-to query)) (dl-role query) continuation :query query :inverse-p t :negated-p (negated-p query) args))) (:enumerator (:compiler (body &rest args &key from to &allow-other-keys) (declare (ignorable args)) (let ((body (if (eq (voi-from query) (voi-to query)) `(when (same-individual-p ,from ,to) ,body) body))) (apply #'get-code-dl-prover-retrieve-related-individuals (dl-role query) body :query query :negated-p (negated-p query) args))) (:runtime (continuation &rest args &key &allow-other-keys) (apply #'evaluate-dl-prover-retrieve-related-individuals (dl-role query) continuation :query query :negated-p (negated-p query) args)))) ;;; ;;; momentan nur f. Racer ;;; (defquery-code (racer-cd-edge-retrieval-query) (:tester (:compiler (body &rest args &key from to &allow-other-keys) (apply #'get-code-racer-check-individuals-cd-related-p (or from `(bound-to ,(voi-from query))) (or to `(bound-to ,(voi-to query))) (from-attribute query) (to-attribute query) (constraint query) body :query query :negated-p (negated-p query) args)) (:runtime (continuation &rest args &key from to &allow-other-keys) (apply #'evaluate-racer-check-individuals-cd-related-p (or from (bound-to (voi-from query))) (or to (bound-to (voi-to query))) (from-attribute query) (to-attribute query) (constraint query) continuation :query query :negated-p (negated-p query) args))) (:from-bound-enumerator (:compiler (body &rest args &key to &allow-other-keys) (unless to (nrql-error "Compiler error: No var given")) (with-slots (negated-p substrate) query (if (not negated-p) (apply #'get-code-dl-prover-check-individual-instance-p `(bound-to ,(voi-from query)) `(an ,(from-attribute query)) (apply #'get-code-dl-prover-retrieve-concept-instances `(an ,(to-attribute query)) (apply #'get-tester-code query body :to to args) :var to :query query args) :query query args) `(abortable-dolist (,to (dl-prover-all-individuals ,substrate)) ,(apply #'get-tester-code query body :to to args))))) (:runtime (continuation &rest args &key &allow-other-keys) (with-slots (negated-p substrate) query (if (not negated-p) (apply #'evaluate-dl-prover-check-individual-instance-p (bound-to (voi-from query)) `(an ,(from-attribute query)) #'(lambda (&rest args) (apply #'evaluate-dl-prover-retrieve-concept-instances `(an ,(to-attribute query)) #'(lambda (&rest args &key var &allow-other-keys) (apply #'evaluate-tester query continuation :to var args)) :query query args)) :query query args) (abortable-dolist (to (dl-prover-all-individuals substrate)) (apply #'evaluate-tester query continuation :to to args )))))) (:to-bound-enumerator (:compiler (body &rest args &key from &allow-other-keys) (unless from (nrql-error "Compiler error: No var given")) (with-slots (negated-p substrate) query (if (not negated-p) (apply #'get-code-dl-prover-check-individual-instance-p `(bound-to ,(voi-to query)) `(an ,(to-attribute query)) (apply #'get-code-dl-prover-retrieve-concept-instances `(an ,(from-attribute query)) (apply #'get-tester-code query body :from from args) :var from :query query args) :query query args) `(abortable-dolist (,from (dl-prover-all-individuals ,substrate)) ,(apply #'get-tester-code query body :from from args))))) (:runtime (continuation &rest args &key &allow-other-keys) (with-slots (negated-p substrate) query (if (not negated-p) (apply #'evaluate-dl-prover-check-individual-instance-p (bound-to (voi-to query)) `(an ,(to-attribute query)) #'(lambda (&rest args) (apply #'evaluate-dl-prover-retrieve-concept-instances `(an ,(from-attribute query)) #'(lambda (&rest args &key var &allow-other-keys) (apply #'evaluate-tester query continuation :from var args)) :query query args)) :query query args) (abortable-dolist (from (dl-prover-all-individuals substrate)) (apply #'evaluate-tester query continuation :from from args )))))) (:enumerator (:compiler (body &rest args &key from to &allow-other-keys) (unless (and from to) (nrql-error "Compiler error: No vars given")) (with-slots (negated-p substrate) query (if (not negated-p) (if (eq (voi-from query) (voi-to query)) (apply #'get-code-dl-prover-retrieve-concept-instances `(and (an ,(from-attribute query)) (an ,(to-attribute query))) (apply #'get-tester-code query body :from from :to from args) :var from :query query args) (apply #'get-code-dl-prover-retrieve-concept-instances `(an ,(from-attribute query)) (apply #'get-code-dl-prover-retrieve-concept-instances `(an ,(to-attribute query)) (apply #'get-tester-code query body args) :var to :query query args) :var from :query query args)) (if (eq (voi-from query) (voi-to query)) `(abortable-dolist (,from (dl-prover-all-individuals ,substrate)) ,(apply #'get-tester-code query body :from from :to from args)) `(abortable-dolist (,from (dl-prover-all-individuals ,substrate)) (abortable-dolist (,to (dl-prover-all-individuals ,substrate)) ,(apply #'get-tester-code query body :from from :to to args))))))) (:runtime (continuation &rest args &key &allow-other-keys) (let ((from (voi-from query)) (to (voi-to query))) (with-slots (negated-p substrate) query (if (not negated-p) (if (eq from to) (apply #'evaluate-dl-prover-retrieve-concept-instances `(and (an ,(from-attribute query)) (an ,(to-attribute query))) #'(lambda (&rest args &key var &allow-other-keys) (apply #'evaluate-tester query continuation :from var :to var args)) :query query args) (apply #'evaluate-dl-prover-retrieve-concept-instances `(an ,(from-attribute query)) #'(lambda (&rest args &key var &allow-other-keys) (let ((from var)) (apply #'evaluate-dl-prover-retrieve-concept-instances `(an ,(to-attribute query)) #'(lambda (&rest args &key var &allow-other-keys) (let ((to var)) (apply #'evaluate-tester query continuation :from from :to to args))) :query query args))) :query query args)) (if (eq from to) (abortable-dolist (from (dl-prover-all-individuals substrate)) (apply #'evaluate-tester query continuation :from from :to from args)) (abortable-dolist (from (dl-prover-all-individuals substrate)) (abortable-dolist (to (dl-prover-all-individuals substrate)) (apply #'evaluate-tester query continuation :from from :to to args)))))))))) ;;; ;;; ;;; (defquery-code (same-as-query) (:tester (:compiler (body &rest args &key &allow-other-keys) (declare (ignorable args)) (let ((from1 (voi-from query)) (to1 (voi-to query)) (negated-p (negated-p query))) (if negated-p `(when (and (=> ,(is-abox-voi-p from1) (not (same-abox-individual-p (bound-to ,from1) (bound-to ,to1)))) (=> ,(is-substrate-voi-p from1) (not (same-individual-p (bound-to ,from1) (bound-to ,to1))))) ,body) `(when (and (=> ,(is-abox-voi-p from1) (same-abox-individual-p (bound-to ,from1) (bound-to ,to1))) (=> ,(is-substrate-voi-p from1) (same-individual-p (bound-to ,from1) (bound-to ,to1)))) ,body)))) (:runtime (continuation &rest args &key &allow-other-keys) (let ((from1 (voi-from query)) (to1 (voi-to query)) (negated-p (negated-p query))) (if negated-p (when (and (=> (is-abox-voi-p from1) (not (same-abox-individual-p (bound-to from1) (bound-to to1)))) (=> (is-substrate-voi-p from1) (not (same-individual-p (bound-to from1) (bound-to to1))))) (apply continuation args)) (when (and (=> (is-abox-voi-p from1) (same-abox-individual-p (bound-to from1) (bound-to to1))) (=> (is-substrate-voi-p from1) (same-individual-p (bound-to from1) (bound-to to1)))) (apply continuation args)))))) (:from-bound-enumerator ;;; (same-as $?x $?y), (same-as {$}?x i), ;;; (same-as i {$}?x) gibt es nicht! (s. syntactic-rewriting) (:compiler (body &rest args &key to &allow-other-keys) (declare (ignorable args)) (let ((from (voi-from query))) (if (negated-p query) `(abortable-dolist (,to ,(if (is-abox-voi-p from) `(dl-prover-all-individuals *running-substrate*) `(get-nodes *running-substrate*))) (when (and (=> ,(is-abox-voi-p from) (not (same-abox-individual-p (bound-to ,from) ,to))) (=> ,(is-substrate-voi-p from) (not (same-individual-p (bound-to ,from) ,to)))) ,body)) `(let ((,to (bound-to ,from))) ,body)))) (:runtime (continuation &rest args &key &allow-other-keys) (let ((from (voi-from query))) (if (negated-p query) (abortable-dolist (cand (if (is-abox-voi-p from) (dl-prover-all-individuals *running-substrate*) (get-nodes *running-substrate*))) (when (and (=> (is-abox-voi-p from) (not (same-abox-individual-p (bound-to from) cand))) (=> (is-substrate-voi-p from) (not (same-individual-p (bound-to from) cand)))) (apply continuation :una-p nil :to cand args))) (let ((cand (bound-to from))) (apply continuation :una-p nil :to cand args)))))) (:to-bound-enumerator ;;; (same-as $?x $?y), (same-as {$}?x i) (:compiler (body &rest args &key from &allow-other-keys) (declare (ignorable args)) (let ((to (voi-to query))) (if (negated-p query) `(abortable-dolist (,from ,(if (is-abox-voi-p to) `(dl-prover-all-individuals *running-substrate*) `(get-nodes *running-substrate*))) (when (and (=> ,(is-abox-voi-p to) (not (same-abox-individual-p (bound-to ,to) ,from))) (=> ,(is-substrate-voi-p to) (not (same-individual-p (bound-to ,to) ,from)))) ,body)) (if (is-abox-individual-p to) `(when (individual-exists-p ,to) (abortable-dolist (,from ,(if (is-abox-voi-p to) `(dl-prover-all-individuals *running-substrate*) `(get-nodes *running-substrate*))) (when (and (=> ,(is-abox-voi-p to) (same-abox-individual-p (bound-to ,to) ,from)) (=> ,(is-substrate-voi-p to) (same-individual-p (bound-to ,to) ,from))) ,body))) `(let ((,from (bound-to ,to))) ,body))))) (:runtime (continuation &rest args &key &allow-other-keys) (let ((to (voi-to query))) (if (negated-p query) (abortable-dolist (cand (if (is-abox-voi-p to) (dl-prover-all-individuals *running-substrate*) (get-nodes *running-substrate*))) (when (and (=> (is-abox-voi-p to) (not (same-abox-individual-p (bound-to to) cand))) (=> (is-substrate-voi-p to) (not (same-individual-p (bound-to to) cand)))) (apply continuation :una-p nil :from cand args))) (if (is-abox-individual-p (voi-to query)) (when (individual-exists-p to) (abortable-dolist (cand (if (is-abox-voi-p to) (dl-prover-all-individuals *running-substrate*) (get-nodes *running-substrate*))) (when (and (=> (is-abox-voi-p to) (same-abox-individual-p (bound-to to) cand)) (=> (is-substrate-voi-p to) (same-individual-p (bound-to to) cand))) (apply continuation :una-p nil :from cand args)))) (let ((cand (bound-to to))) (apply continuation :una-p nil :from cand args))))))) ;;; :enumerator ;;; gibt es nicht, weil durch syntactic-rewriting sichergestellt wird, dass ;;; (same-as $?x $?y) -> (and (top $?x) (same-as $?x $?y) (top $?y)) vorliegt ;;; das funktioniert auch bei ausgeschaltetem Optimizer, und der Optimizer sichert ;;; zu, dass die Reihenfolgen nicht umgedreht werden. )
82,815
Common Lisp
.lisp
1,761
30.032936
125
0.495755
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
4c2b08b24b413303a5ca3cc9e2c6bfc6f58b99e1c6e178cb40c82e96d465bcef
12,599
[ -1 ]
12,600
repository15.lisp
lambdamikel_DLMAPS/src/query/repository15.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) ;;; ;;; ;;; (defpersistentclass qbox (dag) ((time-stamp :reader time-stamp :initform 0))) ;;; ;;; ;;; (defmethod clear-repository ((substrate substrate)) (setf (slot-value substrate 'qbox) nil) 'okay-repository-cleared) (defmethod show-qbox ((substrate substrate) &optional definitions-p) (when (qbox substrate) (show-qbox (qbox substrate) definitions-p))) (defmethod show-qbox ((qbox qbox) &optional definitions-p) (visualize-dag qbox ;;; :view :textually :printer (if definitions-p 'dag-node-name 'show-node-name))) (defmethod show-node-name ((x null)) nil) (defmethod show-node-name ((x query)) (if (equivalents x) (format nil "~A:~A = ~A" (time-stamp x) (or (iterator-id x) (format nil "SUBQUERY-~A-OF-~A" (subquery-id x) (iterator-id (top-level-query x)))) ;;; wichtig, nur so kann man sehen, ;;; ob eine Subsumptionsbeziehung dazu ;;; verwendet wurde, Kandidaten zu ;;; enumerierten! Zeitliche Reihenfolge! (mapcar #'(lambda (x) (format nil "~A" (or (iterator-id x) (format nil "SUBQUERY-~A-OF-~A" (subquery-id x) (iterator-id (top-level-query x)))) ;(time-stamp x) )) (equivalents x))) (format nil "~A:~A" (time-stamp x) (or (iterator-id x) (format nil "SUBQUERY ~A OF ~A" (subquery-id x) (iterator-id (top-level-query x))))))) ;;; ;;; ;;; (defmethod make-qbox ((substrate substrate)) (let* ((top (make-instance 'master-top-query :name 'master-top-query :iterator-id 'master-top-query :time-stamp 0 :dont-initialize-p t)) (bottom (make-instance 'master-bottom-query :name 'master-bottom-query :iterator-id 'master-bottom-query :time-stamp 0 :dont-initialize-p t)) (qbox (make-dag :type 'qbox :name (format nil "QBox for Substrate ~A" (name substrate))))) (insert-dag-node qbox top) (setf (dag-node-parents bottom) (list top)) (insert-dag-node qbox bottom) qbox)) ;;; ;;; ;;; (defmethod get-qbox ((query query)) (qbox (substrate query))) (defmethod get-qbox ((substrate substrate)) (qbox substrate)) ;;; ;;; ;;; (defmethod delete-dag-node :before ((dag qbox) (query query)) (dolist (equivalent-query (equivalents query)) (setf (slot-value equivalent-query 'equivalents) (delete query (slot-value equivalent-query 'equivalents))))) ;;; ;;; ;;; (defmethod remove-outdated-qbox-nodes ((substrate substrate)) (remove-outdated-qbox-nodes (qbox substrate))) (defmethod remove-outdated-qbox-nodes ((qbox qbox)) (dolist (query (dag-nodes qbox)) (when (or (not (valid-qbox-entry-p query)) (not (query-accurate-p query))) (delete-dag-node qbox query)))) ;;; ;;; ;;; (defmethod classify ((query query)) (let ((substrate (substrate query)) (qbox (get-qbox query))) (unless qbox (setf qbox (make-qbox substrate)) (setf (slot-value (substrate query) 'qbox) qbox)) (unless (dag-node-parents query) (remove-outdated-qbox-nodes qbox) (setf (slot-value query 'time-stamp) (time-stamp qbox)) (let ((*warnings-p* nil)) (let ((parents (compute-node-parents query qbox)) (children (compute-node-children query qbox))) (when *debug-p* (format t "~%~% ~A -> Parents: ~A Children: ~A~%" query parents children)) (if (and (set-equal parents children) parents (not (cdr parents)) (not (cdr children))) (let ((equi-node (car parents))) (unless (eq equi-node query) (setf (slot-value query 'equivalents) (list equi-node)) (pushnew query (slot-value equi-node 'equivalents)))) (setf (dag-node-parents query) parents (dag-node-children query) children)))))) 'classified) ;;; ;;; ;;; (defmethod compute-node-parents ((query query) (qbox qbox) &rest args) (declare (ignorable args)) (labels ((mark-all-descendants (node) (mark-dag-node node) (mapc #'mark-all-descendants (dag-node-children node))) (do-it (nodes) (when nodes (let ((current (first nodes)) (nodes (rest nodes))) (if (dag-node-marked-p current) (do-it nodes) (if (query-entails-p query current :enforce-same-arity-p t) (progn (do-it (append nodes (dag-node-children current)))) (progn (mark-all-descendants current) (do-it nodes)))))))) (if *syntactic-repository-p* (or (remove-if-not #'(lambda (q) ;;; syntaktischer Cache-Hit (tree-equal (original-query q) (original-query query))) (dag-nodes qbox)) (list (dag-top qbox))) (when (dag-nodes qbox) (unmark-all-dag-nodes qbox) (do-it (list (dag-top qbox))) (remove-duplicates (remove-if-not #'(lambda (q) (and (not (dag-node-marked-p q)) (every #'(lambda (child) (dag-node-marked-p child)) (dag-node-children q)))) (dag-nodes qbox))))))) (defmethod compute-node-children ((query query) (qbox qbox) &rest args) (declare (ignorable args)) (labels ((mark-all-ancestors (query) (mark-dag-node query) (mapc #'mark-all-ancestors (dag-node-parents query))) (unmark-relevant-dag-nodes (dag val) (dolist (query (dag-nodes dag)) (if (and (dag-node-marked-p query) (= (dag-node-marked-p query) val)) (unmark-dag-node query) (mark-dag-node query)))) (mark-all-descendants (query val) (let ((node-val (dag-node-marked-p query))) (when (or (and (not node-val) (= val 1)) (and node-val (= node-val (1- val)))) (mark-dag-node query val)) (mapc #'(lambda (x) (mark-all-descendants x val)) (dag-node-children query)))) (do-it (nodes) (when nodes (let ((current (first nodes)) (nodes (rest nodes))) (if (dag-node-marked-p current) ;;; richtig! s. unmark-relevant-... -> toggelt die markierung! (do-it nodes) (if (query-entails-p current query :enforce-same-arity-p t) (progn (do-it (if (dag-node-parents current) (append nodes (dag-node-parents current)) nodes))) (progn (mark-all-ancestors current) (do-it nodes)))))))) (if *syntactic-repository-p* (or (remove-if-not #'(lambda (q) ;;; syntaktischer Cache-Hit (tree-equal (original-query q) (original-query query))) (dag-nodes qbox)) (list (dag-bottom qbox))) (when (dag-nodes qbox) (unmark-all-dag-nodes qbox) (let* ((parents (dag-node-parents query)) (n (length parents))) (when parents (mark-all-descendants (first parents) 1) (loop as parent in (rest parents) as i from 2 by 1 do (mark-all-descendants parent i)) (unmark-relevant-dag-nodes qbox n)) (when (dag-node-marked-p (dag-bottom qbox)) (nrql-error "Query repository: internal error")) (do-it (list (dag-bottom qbox)))) (remove-duplicates (remove-if-not #'(lambda (q) (and (not (dag-node-marked-p q)) (every #'(lambda (parent) (dag-node-marked-p parent)) (dag-node-parents q)))) (dag-nodes qbox))))))) ;;; ;;; ;;; (defmethod unregister-query ((query query)) (if (in-dag query) (delete-dag-node (in-dag query) query) (dolist (equivalent-query (equivalents query)) (setf (slot-value equivalent-query 'equivalents) (delete query (slot-value equivalent-query 'equivalents)))))) (defmethod register-query ((query query)) (let* ((query-stamp (time-stamp query)) (qbox-stamp (when (get-qbox query) (time-stamp (get-qbox query))))) (labels ((register (query) (let ((equivalents (equivalents query)) (parents (dag-node-parents query)) (children (dag-node-children query)) (qbox (get-qbox query))) (incf (slot-value qbox 'time-stamp)) (setf (slot-value query 'time-stamp) (time-stamp qbox)) (when *debug-p* (format t "REGISTER ~A: ~A ~A ~A~%" query equivalents parents children)) (unless equivalents ;;; es wird immer nur der erste Knoten einer Aequivalenzklasse registriert! (insert-dag-node qbox query))))) (cond ((or (not qbox-stamp) (not query-stamp)) (when *debug-p* (format t "*** Classify ~A~%" query)) (classify query) (register query)) ((and qbox-stamp query-stamp (not (= qbox-stamp query-stamp))) (let ((qbox (get-qbox query))) (delete-dag-node qbox query) (when *debug-p* (format t "*** RE-Classify ~A~%" query)) (classify query) (register query))) (t (when *debug-p* (format t "**** REGISTER ~A~%" query)) (unless (in-dag query) (register query)))))))
11,901
Common Lisp
.lisp
277
26.635379
105
0.476071
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
6a32b23ff356f19442af0ff3ec1369e608416de01f4a5a613544a59920ccef87
12,600
[ -1 ]
12,601
nrql-server-case.lisp
lambdamikel_DLMAPS/src/query/nrql-server-case.lisp
(in-package cl-user) ;;; ;;;-------------------------------------------- ;;; Automatically Generated nRQL Server Case ;;; Version: 1.9.1 ;;;-------------------------------------------- ;;; (defun process-nrql-request (expr stream n state output-string-stream) (case (first expr) ((xml-output) (process-racer-expr (second expr) nil n state output-string-stream) (let ((expr2 (if *last-error* (lisp-to-xml (format nil "~a" *last-error*) stream :newlines-p nil :ascii-p nil :indentation-p nil :top-level-attributes (format nil "id=\"~d\" type=\"error\"" n)) (lisp-to-xml (list (format nil "~s" *last-answer*) *last-answer*) stream :newlines-p nil :ascii-p t :indentation-p nil :top-level-attributes (format nil "id=\"~d\" type=\"answer\"" n))))) (answer expr state stream n expr2 output-string-stream))) ((xml-native-output) (process-racer-expr (second expr) nil n state output-string-stream) (let ((expr2 (if *last-error* (lisp-to-xml (format nil "~a" *last-error*) stream :newlines-p nil :ascii-p nil :indentation-p nil :top-level-attributes (format nil "id=\"~d\" type=\"error\"" n)) (lisp-to-xml (format nil "~s" *last-answer*) stream :newlines-p nil :ascii-p t :indentation-p nil :top-level-attributes (format nil "id=\"~d\" type=\"answer\"" n))))) (answer expr state stream n expr2 output-string-stream))) ((del-rcc-edge) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'del-rcc-edge1) (rest expr))) output-string-stream))) ((del-rcc-node) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'del-rcc-node1) (rest expr))) output-string-stream))) ((rcc-edge-label) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'rcc-edge-label1) (rest expr))) output-string-stream))) ((rcc-node-label) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'rcc-node-label1) (rest expr))) output-string-stream))) ((rcc-edge) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'rcc-edge1) (rest expr))) output-string-stream))) ((rcc-node) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'rcc-node1) (rest expr))) output-string-stream))) ((rcc-related) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'rcc-related1) (rest expr))) output-string-stream))) ((rcc-instance) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'rcc-instance1) (rest expr))) output-string-stream))) ((rcc-consistent?) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'rcc-consistent-p) (rest expr))) output-string-stream))) ((in-rcc-box) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'set-rcc-box) (rest expr))) output-string-stream))) ((in-mirror-data-box) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'set-mirror-data-box) (rest expr))) output-string-stream))) ((description-implies?) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'thematic-substrate::implies-p) (rest expr))) output-string-stream))) ((edge-label) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'thematic-substrate::edge-label1) (rest expr))) output-string-stream))) ((node-label) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'thematic-substrate::node-label1) (rest expr))) output-string-stream))) ((del-data-edge) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'thematic-substrate::del-data-edge1) (rest expr))) output-string-stream))) ((del-data-node) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'thematic-substrate::del-data-node1) (rest expr))) output-string-stream))) ((data-edge) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'thematic-substrate::data-edge1) (rest expr))) output-string-stream))) ((data-node) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'thematic-substrate::data-node1) (rest expr))) output-string-stream))) ((in-data-box) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'set-data-box) (rest expr))) output-string-stream))) ((undefquery) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'undefine-query) (rest expr))) output-string-stream))) ((def-and-exec-query) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'define-and-execute-query) (rest expr))) output-string-stream))) ((def-and-prep-query) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'define-and-prepare-query) (rest expr))) output-string-stream))) ((defquery) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'define-query) (rest expr))) output-string-stream))) ((preprule) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'racer-prepare-rule) (rest expr))) output-string-stream))) ((firerule) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'racer-apply-rule) (rest expr))) output-string-stream))) ((prepare-abox-rule) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'racer-prepare-rule) (rest expr))) output-string-stream))) ((prepare-tbox-query) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'racer-prepare-tbox-query) (rest expr))) output-string-stream))) ((prepare-abox-query) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'racer-prepare-query) (rest expr))) output-string-stream))) ((apply-abox-rule) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'racer-apply-rule) (rest expr))) output-string-stream))) ((tbox-retrieve) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'racer-answer-tbox-query) (rest expr))) output-string-stream))) ((retrieve-under-premise) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'racer-answer-query-under-premise) (rest expr))) output-string-stream))) ((retrieve) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function 'racer-answer-query) (rest expr))) output-string-stream))) ((with-nrql-settings) (let ((*server-timeout* nil)) (apply (symbol-function 'thematic-substrate::eval-nrql-settings) (lambda () (loop for expr1 in (cddr expr) do (process-racer-expr expr1 stream n state output-string-stream))) (second expr)))) ((describe-rule describe-query get-dag-of-qbox-for-abox show-qbox-for-abox get-nodes-in-qbox-for-abox get-nodes-in-current-qbox get-dag-of-current-qbox query-equivalents query-descendants query-children query-ancestors query-parents query-equivalent-p query-entails-p classify-query query-tautological-p query-inconsistent-p query-consistent-p abort-rule abort-query original-rule-body original-query-body rule-body query-body original-rule-head original-query-head rule-head query-head rule-accurate-p query-accurate-p get-answer get-all-remaining-sets-of-rule-consequences get-all-remaining-tuples get-next-n-remaining-sets-of-rule-consequences get-next-n-remaining-tuples describe-rule-status describe-query-status rule-inactive-p rule-processed-p query-inactive-p query-processed-p active-expensive-rule-p active-expensive-query-p cheap-rule-p cheap-query-p rule-active-p query-active-p rule-waiting-p query-waiting-p execute-applicable-rules unapplicable-rules applicable-rules add-chosen-sets-of-rule-consequences choose-current-set-of-rule-consequences rule-applicable-p rule-prepared-p query-prepared-p reexecute-rule reexecute-query reprepare-rule reprepare-query execute-rule execute-query rule-ready-p query-ready-p next-set-of-rule-consequences-available-p next-tuple-available-p get-current-set-of-rule-consequences get-next-set-of-rule-consequences get-current-tuple get-next-tuple delete-rule delete-query store-substrate-for-current-abox restore-all-substrates restore-substrate store-all-substrates store-substrate-for-abox get-nrql-version del-rcc-edge1 del-rcc-node1 rcc-edge-label1 rcc-node-label1 rcc-edge1 rcc-node1 rcc-related1 rcc-instance1 rcc-consistent-p create-rcc-edge create-rcc-node set-rcc-box set-mirror-data-box description-implies-p set-data-box get-data-edge-label get-data-node-label delete-data-edge delete-data-node create-data-edge create-data-node get-process-pool-size get-maximum-size-of-process-pool get-initial-size-of-process-pool set-maximum-size-of-process-pool set-initial-size-of-process-pool set-rewrite-defined-concepts set-nrql-mode show-current-qbox get-abox-of-current-qbox disable-query-realization enable-query-realization optimizer-dont-use-cardinality-heuristics optimizer-use-cardinality-heuristics disable-query-optimization enable-query-optimization disable-query-repository enable-query-repository dont-report-tautological-queries report-tautological-queries dont-report-inconsistent-queries report-inconsistent-queries describe-query-processing-mode describe-current-substrate include-permutations exclude-permutations dont-add-rule-consequences-automatically add-rule-consequences-automatically process-set-at-a-time process-tuple-at-a-time get-max-no-of-tuples-bound set-max-no-of-tuples-bound dont-check-abox-consistency-before-querying check-abox-consistency-before-querying enable-lazy-tuple-computation enable-eager-tuple-computation restore-standard-settings dont-add-role-assertions-for-datatype-properties add-role-assertions-for-datatype-properties disable-told-information-querying enable-told-information-querying disable-nrql-warnings enable-nrql-warnings disable-kb-has-changed-warning-tokens enable-kb-has-changed-warning-tokens disable-phase-two-starts-warning-tokens enable-phase-two-starts-warning-tokens disable-two-phase-query-processing-mode enable-two-phase-query-processing-mode disable-abox-mirroring enable-very-smart-abox-mirroring enable-smart-abox-mirroring enable-abox-mirroring disable-sql-data-substrate-mirroring enable-sql-data-substrate-mirroring disable-data-substrate-mirroring enable-data-substrate-mirroring wait-for-rules-to-terminate wait-for-queries-to-terminate describe-all-rules describe-all-queries get-all-answers get-answer-size run-all-rules reexecute-all-rules execute-all-rules run-all-queries reexecute-all-queries execute-all-queries abort-all-rules abort-all-queries terminated-rules inactive-rules processed-rules terminated-queries inactive-queries processed-queries waiting-expensive-rules waiting-cheap-rules waiting-rules waiting-expensive-queries waiting-cheap-queries waiting-queries running-expensive-rules running-cheap-rules running-rules running-expensive-queries running-cheap-queries running-queries active-expensive-rules active-cheap-rules active-rules active-expensive-queries active-cheap-queries active-queries prepared-rules ready-rules prepared-queries ready-queries expensive-rules cheap-rules inaccurate-rules accurate-rules all-rules expensive-queries cheap-queries inaccurate-queries accurate-queries all-queries describe-all-definitions describe-definition delete-all-definitions undefine-query define-and-prepare-query define-and-execute-query define-query racer-prepare-tbox-query racer-answer-tbox-query racer-prepare-rule racer-apply-rule prepare-nrql-engine racer-prepare-query racer-answer-query-under-premise racer-answer-query full-reset reset-nrql-engine reset-all-substrates delete-all-rules delete-all-queries) (let* ((saved-timeout *server-timeout*) (*server-timeout* nil)) (answer expr state stream n (let ((*server-timeout* saved-timeout)) (apply (symbol-function (first expr)) (rest expr))) output-string-stream))) (otherwise (error "Illegal operator in ~A" expr))))
24,656
Common Lisp
.lisp
629
21.675676
77
0.448325
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
c12632de6dfa35ea6130d5fa145839865de03397933911d00bdda672699aff4f
12,601
[ -1 ]
12,602
macros7.lisp
lambdamikel_DLMAPS/src/query/macros7.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) (defmacro check-for-abort () `(when (abort-search-p *running-query*) (throw 'query-execution 'abort))) (defmacro abortable-dolist ((var list) &body body) `(dolist (,var ,list) (check-for-abort) ,@body)) (defmacro with-timeout1 ((timeout &body timeoutforms) &body body) `(if ,timeout (with-timeout (,timeout ,@timeoutforms) ,@body) (progn ,@body))) (defmacro with-vois-marked-as-bound (refs &rest body) (let ((ref (gensym "VOI")) (memo (gensym "MEMO"))) `(let ((,memo nil)) (unwind-protect (progn (dolist (,ref ,refs) (unless (bound-to ,ref) (push ,ref ,memo) (setf (bound-to ,ref) t) (let ((,ref (corresponding-voi ,ref))) (when (and ,ref (not (bound-to ,ref))) (push ,ref ,memo) (setf (bound-to ,ref) t))))) ,@body) (dolist (,ref ,memo) (setf (bound-to ,ref) nil)))))) (defmacro with-saved-bindings (refs &rest body) (let ((memo (gensym))) `(let ((,memo nil)) (unwind-protect (progn (dolist (ref ,refs) (push (list ref (bound-to ref)) ,memo) (let ((cor-ref (corresponding-voi ref))) (when cor-ref (push (list cor-ref (bound-to cor-ref)) ,memo)))) ,@body) (dolist (entry ,memo) (setf (bound-to (first entry)) (second entry))))))) (defmacro defquery-code ((type) &rest body) (let* ((tester-code (rest (assoc :tester body))) (tester-compiler-code (rest (assoc :compiler tester-code))) (tester-runtime-code (rest (assoc :runtime tester-code))) (enumerator-code (rest (assoc :enumerator body))) (enumerator-compiler-code (rest (assoc :compiler enumerator-code))) (enumerator-runtime-code (rest (assoc :runtime enumerator-code))) (from-bound-enumerator-code (rest (assoc :from-bound-enumerator body))) (from-bound-enumerator-compiler-code (rest (assoc :compiler from-bound-enumerator-code))) (from-bound-enumerator-runtime-code (rest (assoc :runtime from-bound-enumerator-code))) (to-bound-enumerator-code (rest (assoc :to-bound-enumerator body))) (to-bound-enumerator-compiler-code (rest (assoc :compiler to-bound-enumerator-code))) (to-bound-enumerator-runtime-code (rest (assoc :runtime to-bound-enumerator-code)))) `(progn ,@(when tester-compiler-code `((defmethod get-tester-code ((query ,type) ,@(first tester-compiler-code)) ,@(rest tester-compiler-code)))) ,@(when tester-runtime-code `((defmethod evaluate-tester ((query ,type) ,@(first tester-runtime-code)) ,@(rest tester-runtime-code)))) ,@(when enumerator-compiler-code `((defmethod get-enumerator-code ((query ,type) ,@(first enumerator-compiler-code)) ,@(rest enumerator-compiler-code)))) ,@(when enumerator-runtime-code `((defmethod evaluate-enumerator ((query ,type) ,@(first enumerator-runtime-code)) ,@(rest enumerator-runtime-code)))) ,@(when from-bound-enumerator-compiler-code `((defmethod get-from-bound-enumerator-code ((query ,type) ,@(first from-bound-enumerator-compiler-code)) ,@(rest from-bound-enumerator-compiler-code)))) ,@(when from-bound-enumerator-runtime-code `((defmethod evaluate-from-bound-enumerator ((query ,type) ,@(first from-bound-enumerator-runtime-code)) ,@(rest from-bound-enumerator-runtime-code)))) ,@(when to-bound-enumerator-compiler-code `((defmethod get-to-bound-enumerator-code ((query ,type) ,@(first to-bound-enumerator-compiler-code)) ,@(rest to-bound-enumerator-compiler-code)))) ,@(when to-bound-enumerator-runtime-code `((defmethod evaluate-to-bound-enumerator ((query ,type) ,@(first to-bound-enumerator-runtime-code)) ,@(rest to-bound-enumerator-runtime-code))))))) ;;: ;;; ;;; (defvar *nrql-functions* nil) (defvar *nrql-macros* nil) (defvar *nrql-methods* nil) (defvar *nrql-with-macros* nil) (defun is-with-macro-p (x) (search "WITH-" (symbol-name x))) (defmacro nrql-defun (name lambda-list &body body) `(progn (pushnew (list ',name ',lambda-list) *nrql-functions* :test #'equal) (defun ,name ,lambda-list ,@body))) (defmacro nrql-defmacro ((name &key nrql-function)) (if (is-with-macro-p name) `(progn (pushnew (list ',name ',nrql-function) *nrql-with-macros* :test #'equal) (defmacro ,name ((&rest args) &body body) (let ((fn ',nrql-function)) `(apply (symbol-function ',fn) (lambda () ,@body) ',args)))) `(progn (pushnew (list ',name ',nrql-function) *nrql-macros* :test #'equal) (defmacro ,name (&rest args) (let ((fn ',nrql-function)) `(apply (symbol-function ',fn) ',args)))))) (defmacro nrql-defmethod (name lambda-list &body body) `(progn (pushnew (list ',name ',lambda-list) *nrql-methods* :test #'equal) (defmethod ,name ,lambda-list ,@body))) ;;; ;;; ;;; #+:midelora (defmacro midelora-defun (name lambda-list &body body) `(progn (defun ,name ,lambda-list ,@body))) #+:midelora (defmacro midelora-defmacro ((name &key nrql-function)) (if (is-with-macro-p name) `(progn (defmacro ,name ((&rest args) &body body) (let ((fn ',nrql-function)) `(apply (symbol-function ',fn) (lambda () ,@body) ',args)))) `(progn (defmacro ,name (&rest args) (let ((fn ',nrql-function)) `(apply (symbol-function ',fn) ',args)))))) #+:midelora (defmacro midelora-defmethod (name lambda-list &body body) `(progn (defmethod ,name ,lambda-list ,@body))) ;;; ;;; ;;; #+:racer-server (defmacro save-racer-state (query) `(setf (slot-value ,query 'state-of-racer-specials) (mapcar #'(lambda (special) (if (boundp special) (symbol-value special) :racer-special-is-unbound)) racer::+racer-specials+))) #+:lracer (defmacro save-racer-state (query) (declare (ignorable query)) t) ;;; ;;; ;;; #+:racer-server (defmacro with-racer-state ((query) &body body) `(let* ((state (state-of-racer-specials ,query)) ,@(mapcar #'(lambda (special) (list special '(pop state))) racer::+racer-specials+)) (dolist (special racer::+racer-specials+) (when (eq special :racer-special-is-unbound) (makunbound special))) ,@body)) #+:lracer (defmacro with-racer-state ((query) &body body) (declare (ignorable query)) `(progn ,@body)) ;;; ;;; ;;; #-:midelora (defmacro with-dl-prover-state ((query) &body body) `(with-racer-state (,query) ,@body)) #+:midelora (defmacro with-dl-prover-state ((query) &body body) (declare (ignore query)) `(progn ,@body)) #-:midelora (defmacro save-dl-prover-state (query) `(save-racer-state ,query)) #+:midelora (defmacro save-dl-prover-state (query) (declare (ignore query)) t) ;;; ;;; with-racer-timeout ist die "globale" Timeout-Klammer ;;; für die nRQL-API-Funktionen ;;; ;;; die einzelnen zeitintensiven (prepare-substrate1, answer-query, ...) ;;; setzen entsprechende "with-timeout-cleanup"-Forms ;;; auf dann entsp. "Aufraeumarbeiten" auszuführen ;;; #+:racer-server (defmacro with-racer-timeout (&body body) `(if *server-timeout* (with-timeout (*server-timeout* :timeout) (let ((*timeout* nil) (*server-timeout* nil)) ,@body)) (let ((*timeout* nil) (*server-timeout* nil)) ,@body))) #-:racer-server (defmacro with-racer-timeout (&body body) `(progn ,@body)) ;;; ;;; ;;; #+(or :dlmaps :lracer) (defmacro with-timeout ((&rest args) &rest body) (declare (ignorable args)) `(progn ,@body)) #+(or :dlmaps :lracer) (defmacro without-timeout (&rest body) `(progn ,@body)) #+:dlmaps (defmacro without-signature-checks (&rest body) `(progn ,@body)) #+(or :dlmaps :lracer) (defmacro with-timeout-cleanup (form &rest cleanup-forms) `(restart-case ,form (abort-execution () ,@cleanup-forms (invoke-restart 'continue-from-timeout))))
9,083
Common Lisp
.lisp
252
27.761905
116
0.577826
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
940e22c0e19f002cd1d43aab7b1abadb641193511407ea82c6820c6cabcd8232
12,602
[ -1 ]
12,603
defined-queries9.lisp
lambdamikel_DLMAPS/src/query/defined-queries9.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) (defun delete-all-dboxes () (setf *all-dboxes* nil)) (defpersistentclass defined-query () ((name :reader name :initarg :name) (head :reader head :initarg :head) (body :reader body :initarg :body) (query :reader query :initarg :query))) (defpersistentclass dbox () ((name-to-def-hash :accessor name-to-def-hash :initform (mht :size 30)) (for-tbox :accessor for-tbox :initarg :for-tbox))) ;;; ;;; ;;; (defun create-dbox (&optional (tbox (current-tbox))) (let ((dbox (make-instance 'dbox :for-tbox tbox))) (push dbox *all-dboxes*) dbox)) (defun find-dbox (for-tbox &key (error-p t)) (let ((for-tbox (or for-tbox *nrql-tbox* (current-tbox)))) (or (find for-tbox *all-dboxes* :key #'for-tbox) (when error-p (nrql-error "Can't find DBOX for TBox ~A" for-tbox))))) (defmethod register-defined-query ((def defined-query) (dbox dbox)) (setf (gethash (name def) (name-to-def-hash dbox)) def)) (defmethod delete-defined-query ((def defined-query) (dbox dbox)) (remhash (name def) (name-to-def-hash dbox))) (defmethod all-names-of-defined-queries ((dbox dbox)) (loop as name being the hash-key of (name-to-def-hash dbox) collect name)) ;;; ;;; ;;; (defmethod delete-all-definitions1 ((dbox dbox)) (clrhash (name-to-def-hash dbox))) ;;; ;;; ;;; (defmethod get-definition1 ((substrate substrate) name &key (error-p t)) (declare (ignorable name)) (when error-p (nrql-error "No definitions possible for substrate ~A!" substrate)) nil) (defmethod get-definition1 ((substrate racer-substrate) name &key (error-p t)) (get-definition1 (dbox substrate) name :error-p error-p)) (defmethod get-definition1 ((dbox dbox) name &key (error-p t)) (or (gethash name (name-to-def-hash dbox)) (when error-p (nrql-error "Can't find definition of query ~A in DBox for TBox ~A!" name (for-tbox dbox))))) ;;; ;;; ;;; (defmethod describe-definition1 ((substrate racer-substrate) name) (describe-definition1 (dbox substrate) name)) (defmethod describe-definition1 ((dbox dbox) name) (let ((def (get-definition1 dbox name))) `(defquery ,(name def) ,(head def) ,(body def)))) ;;; ;;; ;;; (defmethod check-for-name-clash ((substrate racer-substrate) name args &key warn-p) (let ((def (get-definition1 substrate name))) (when def (when (and (not (cdr args)) ; (?x C) ? (find name (all-atomic-concepts (tbox substrate)) :key #'ensure-list :test #'member)) (when warn-p (nrql-warning "Concept ~A exists in TBox ~A. Assuming you are referring to the concept ~A!" name (tbox substrate) name)) (return-from check-for-name-clash t)) (when (and (not (cddr args)) ; (?x ?y R) ? (find name (dl-prover-all-roles substrate))) (when warn-p (nrql-warning "Role ~A exists in TBox ~A. Assuming you are referring to the role ~A!" name (tbox substrate) name)) (return-from check-for-name-clash t))))) ;;; ;;; ;;; (defmethod get-variable-substituted-query ((substrate racer-substrate) name args) (let ((def (get-definition1 substrate name))) (when def (check-for-name-clash substrate name args) (substitute-vois-in (body def) (mapcar #'(lambda (old new) (list old new)) (head def) args))))) ;;; ;;; ;;; (defmethod describe-all-definitions1 ((dbox dbox)) (loop as name being the hash-key of (name-to-def-hash dbox) collect (describe-definition1 dbox name))) ;;; ;;; ;;; (defun define-query1 (name head body &rest args &key keep-p (tbox (or *nrql-tbox* (current-tbox))) &allow-other-keys) (let ((dbox (or (find-dbox tbox :error-p nil) (create-dbox tbox)))) (if (get-definition1 dbox name :error-p nil) (nrql-error "Query named ~A already exists!" name) (if keep-p (let ((query (apply #'racer-prepare-query head body args))) (register-defined-query (make-instance 'defined-query :name name :head head :body body :query query) dbox) query) (let ((*use-repository-p* nil) (*put-into-repository-p* nil) (*report-tautological-queries-p* nil) (*report-inconsistent-queries-p* nil) (*optimize-p* nil) (*generate-code-p* nil) (*rewrite-semantically-p* nil) (*rewrite-to-dnf-p* nil)) (let ((query (apply #'racer-prepare-query head body args))) (register-defined-query (make-instance 'defined-query :name name :head head :body body :query query) dbox) (delete-query (first query)) name)))))) ;;; ;;; ;;; (defun undefine-query1 (name &key (tbox (or *nrql-tbox* (current-tbox)))) (let ((dbox (find-dbox tbox :error-p nil))) (when dbox (delete-defined-query (get-definition1 dbox name :error-p t) dbox) (all-names-of-defined-queries dbox))))
5,824
Common Lisp
.lisp
149
29.134228
102
0.560007
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
069368dd3177f9015024dd846bd299b7b13fa9ebb10153a365ff1ff46c1d6b0a
12,603
[ -1 ]
12,604
projection-test.lisp
lambdamikel_DLMAPS/src/query/projection-test.lisp
(in-package :cl-user) (full-reset) (instance a1 a) (instance a2 a) (instance a3 a) (instance b1 b) (instance b2 c) (related a1 b1 r) (related a2 b2 r) (process-tuple-at-a-time) (enable-lazy-tuple-computation) (pprint (retrieve (?x) (and (?x a) (?x ?y r) (?y b)))) (pprint (retrieve (?xx) (and (?y top) (project-to (?xx) (and (?xx a) (?xx ?yy r) (?yy b)))))) (pprint (retrieve () (and (?y top) (not (project-to () (and (?xx a) (?xx ?yy r) (?yy bottom) ))))) ) (pprint (retrieve () (and (?y top) (and (?xx a) (?xx ?yy r) (?yy b))))) (pprint (retrieve (?x) (not (and (?x a) (?x ?y r) (?y b))))) (pprint (retrieve (?x) (not (project-to (?x) (and (?x a) (?x ?y r) (?y b)))))) (pprint (retrieve (?x) (and (project-to (?x) (and (?x a) (?x ?y r) (?y b))) (?x c) (?y d))))
783
Common Lisp
.lisp
18
41.5
100
0.556894
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
b4d98cbdb1881ef9a826ba339081e500bc811195ffc54360371399d613731485
12,604
[ -1 ]
12,605
rcc-substrate7.lisp
lambdamikel_DLMAPS/src/query/rcc-substrate7.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :thematic-substrate) ;;; ;;; ;;; (defvar *rcc-type* :rcc5) (defpersistentclass rcc-substrate (data-substrate) ((rbox :reader rbox) (rcc-type :reader rcc-type) (edge-consistent-p :initform :dont-known) (saved-edge-consistent-p) (minimal-label-computed-p :initform nil))) (defmethod initialize-instance :after ((substrate rcc-substrate) &rest initargs) (declare (ignorable initargs)) (with-slots (rbox rcc-type) substrate (setf rcc-type *rcc-type*) (setf rbox (case *rcc-type* (:rcc1 +rcc1-rolebox+) (:rcc2 +rcc2-rolebox+) (:rcc3 +rcc3-rolebox+) (:rcc5 +rcc5-rolebox+) (:rcc8 +rcc8-rolebox+))))) ;;; ;;; ;;; (defpersistentclass nrql-rcc-query-parser (nrql-data-query-parser) nil) (defmethod get-parser-class-for-substrate ((substrate rcc-substrate)) 'nrql-rcc-query-parser) ;;; ;;; ;;; (defpersistentclass rcc-substrate-query (nrql-query) nil) (defpersistentclass rcc-substrate-node-query (data-substrate-node-query rcc-substrate-query) nil) (defpersistentclass rcc-substrate-edge-query (data-substrate-edge-query rcc-substrate-query) nil) ;;; ;;; ;;; (defmethod initialize-description :after ((query rcc-substrate-edge-query)) (with-slots (textual-description) query (setf textual-description (mapcar #'to-keyword (ensure-list textual-description))))) ;;; ;;; ;;; (defmethod make-dispatcher ((parser nrql-rcc-query-parser) sym) (case sym (substrate-simple-and-node-query (make-instance 'rcc-substrate-node-query :dont-initialize-p t)) (substrate-simple-or-edge-query (make-instance 'rcc-substrate-edge-query :dont-initialize-p t)) (otherwise (call-next-method)))) ;;; ;;; ;;; (defmethod valid-node-or-description-p ((parser nrql-rcc-query-parser) expr) (declare (ignorable expr)) nil) (defmethod valid-edge-and-description-p ((parser nrql-rcc-query-parser) expr) (declare (ignorable expr)) nil) (defmethod valid-edge-or-description-p ((parser nrql-rcc-query-parser) expr) (subsetp (ensure-list expr) (roles (rbox (substrate parser))))) ;;; ;;; ;;; (defmethod loop-over-all-successors1 ((substrate rcc-substrate) from fn &optional descr) (let ((succs nil)) (loop-over-successors (substrate from descr) (to) (progn (push to succs) (funcall fn to))) (loop-over-nodes (substrate to) (unless (member to succs) (when (related-p substrate from to descr) (funcall fn to)))))) (defmethod loop-over-all-predecessors1 ((substrate rcc-substrate) to fn &optional descr) (let ((preds nil)) (loop-over-predecessors (substrate to descr) (from) (progn (push from preds) (funcall fn from))) (loop-over-nodes (substrate from) (unless (member from preds) (when (related-p substrate from to descr) (funcall fn from)))))) ;;; ;;; ;;; (defun make-intersection-description (descr) (reduce #'(lambda (x y) (intersection x y :test #'equalp)) descr)) (defmethod node-instance :before ((substrate rcc-substrate) name &key &allow-other-keys) (declare (ignorable name)) (with-slots (minimal-label-computed-p data-nodes edge-consistent-p) substrate (when edge-consistent-p ; also :unkown oder T! (setf minimal-label-computed-p nil edge-consistent-p :unknown)))) (defmethod nodes-related ((substrate rcc-substrate) from to description &key &allow-other-keys) (with-slots (data-edges data-nodes minimal-label-computed-p edge-consistent-p) substrate (let ((description (ensure-list description))) (when (or (not (every #'keywordp description)) (not (subsetp description (roles (rbox substrate))))) (nrql-error "~S is not a valid ~A relationship!" description (rcc-type substrate))) (labels ((relate (from to description) (when edge-consistent-p ; also :unkown oder T! (setf edge-consistent-p :unknown)) (setf minimal-label-computed-p nil) (unless (node-p substrate from) (node-instance substrate from)) (unless (node-p substrate to) (node-instance substrate to)) (push to (node-info-successors (gethash from data-nodes))) (push from (node-info-predecessors (gethash to data-nodes))) (let* ((key (list from to)) (info (gethash key data-edges)) (new-descr (make-intersection-description (if info (list (edge-info-type info) description) (if (eq from to) (list (reflexive-roles (rbox substrate)) description) (list description)))))) (unless new-descr (setf edge-consistent-p nil)) (if info (setf (edge-info-type info) new-descr) (setf (gethash key data-edges) (list new-descr new-descr))) new-descr))) (relate from to description))))) ;;; ;;; ;;; (defmethod delete-node :after ((substrate rcc-substrate) name &rest args) (declare (ignorable name args)) (with-slots (edge-consistent-p minimal-label-computed-p) substrate (setf minimal-label-computed-p nil edge-consistent-p :unknown))) (defmethod delete-edge :after ((substrate rcc-substrate) from to &rest args) (declare (ignorable from to args)) (with-slots (edge-consistent-p minimal-label-computed-p) substrate (setf minimal-label-computed-p nil edge-consistent-p :unknown))) ;;; ;;; ;;; (defmethod get-edge-between ((substrate rcc-substrate) from to) (with-slots (data-edges) substrate (multiple-value-bind (fromto found1p) (gethash (list from to) data-edges) (if found1p (values fromto t) (if (eq from to) (values (copy-tree (list (reflexive-roles (rbox substrate)) nil)) nil) (multiple-value-bind (tofrom found2p) (gethash (list to from) data-edges) (if found2p (values (list (inv-role (rbox substrate) (first tofrom)) (inv-role (rbox substrate) (second tofrom))) t) (values (copy-tree (list (roles (rbox substrate)) nil)) nil)))))))) ;;; ;;; ;;; (defmethod compute-minimal-label ((substrate rcc-substrate)) (let* ((iter t) (rbox (rbox substrate)) (consistent-p t) (nodes (get-nodes substrate))) (with-slots (edge-consistent-p minimal-label-computed-p) substrate (unless minimal-label-computed-p (block loop (loop while iter do (setf iter nil) (mapl #'(lambda (nodes1) (let ((from (first nodes1))) (mapl #'(lambda (nodes2) (let* ((to (first nodes2))) (multiple-value-bind (from-to foundp) (get-edge-between substrate from to) (declare (ignorable foundp)) (dolist (over nodes) (multiple-value-bind (from-over foundp) (get-edge-between substrate from over) (declare (ignorable foundp)) (multiple-value-bind (over-to foundp) (get-edge-between substrate over to) (declare (ignorable foundp)) ; (format t "~A ~A ~A ~%" from over to) (let ((comp (lookup rbox (edge-info-type from-over) (edge-info-type over-to)))) (unless (implies-p (list (edge-info-type from-to)) (list comp)) (setf iter t) (let ((res (intersection (edge-info-type from-to) comp))) (nodes-related substrate from to res) (unless res (setf consistent-p nil) (return-from loop))))))))))) nodes1))) nodes))) (setf edge-consistent-p consistent-p) (when consistent-p (setf minimal-label-computed-p t)) substrate)))) ;;; ;;; ;;; (defmethod related-p ((substrate rcc-substrate) from to &optional descr) (compute-minimal-label substrate) (multiple-value-bind (edge foundp) (get-edge-between substrate from to) (declare (ignorable foundp)) (let ((type (edge-info-type edge))) (or (implies-p (list type) descr) #| (let* ((roles (roles (rbox substrate))) (descr (if (is-query-p descr) (textual-description descr) (ensure-list descr))) (diff (set-difference roles descr))) (save-state substrate) (nodes-related substrate from to diff) (prog1 (not (consistent-p substrate)) (restore-state substrate))) |# )))) ;;; ;;; ;;; (defmethod consistent-p ((substrate rcc-substrate)) (compute-minimal-label substrate) (slot-value substrate 'edge-consistent-p)) ;;; ;;; API ;;; (defmethod save-state :after ((substrate rcc-substrate)) (setf (slot-value substrate 'saved-edge-consistent-p) (slot-value substrate 'edge-consistent-p))) (defmethod restore-state :after ((substrate rcc-substrate)) (setf (slot-value substrate 'edge-consistent-p) (slot-value substrate 'saved-edge-consistent-p))) ;;; ;;; ;;; (defmethod reset-substrate :after ((substrate rcc-substrate) &key &allow-other-keys) (setf (slot-value substrate 'edge-consistent-p) :unknown)) (nrql-defun set-rcc-box (name &optional (rcc-type :rcc8)) (setf *type-of-substrate* 'rcc-substrate) (let ((*rcc-type* rcc-type)) (set-data-box name)) name) (nrql-defmacro (in-rcc-box :nrql-function set-rcc-box)) ;;; ;;; ;;; (nrql-defun create-rcc-node (&rest args) (apply #'create-data-node args)) (nrql-defun create-rcc-edge (&rest args) (apply #'create-data-edge args)) (nrql-defun rcc-consistent-p (&optional abox type-of-substrate) (with-data-box (abox type-of-substrate) (consistent-p *cur-substrate*))) (nrql-defmacro (rcc-consistent? :nrql-function rcc-consistent-p)) ;;; ;;; ;;; (nrql-defun rcc-instance1 (&rest args) (apply #'data-node1 args)) (nrql-defmacro (rcc-instance :nrql-function rcc-instance1)) (nrql-defun rcc-related1 (&rest args) (apply #'data-edge1 args)) (nrql-defmacro (rcc-related :nrql-function rcc-related1)) (nrql-defun rcc-node1 (&rest args) (apply #'data-node1 args)) (nrql-defmacro (rcc-node :nrql-function rcc-node1)) (nrql-defun rcc-edge1 (&rest args) (apply #'data-edge1 args)) (nrql-defmacro (rcc-edge :nrql-function rcc-edge1)) ;;; ;;; ;;; (nrql-defun rcc-node-label1 (&rest args) (apply #'node-label1 args)) (nrql-defmacro (rcc-node-label :nrql-function rcc-node-label1)) (nrql-defun rcc-edge-label1 (&rest args) (apply #'edge-label1 args)) (nrql-defmacro (rcc-edge-label :nrql-function rcc-edge-label1)) ;;; ;;; ;;; (nrql-defun del-rcc-node1 (&rest args) (apply #'del-data-node1 args)) (nrql-defun del-rcc-edge1 (&rest args) (apply #'del-data-edge1 args)) (nrql-defmacro (del-rcc-node :nrql-function del-rcc-node1)) (nrql-defmacro (del-rcc-edge :nrql-function del-rcc-edge1))
13,578
Common Lisp
.lisp
311
29.601286
97
0.548857
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
69f715bbd592dca7fa8d1c8550976eb7ddff18b8efb66867800522656c0ab253
12,605
[ -1 ]
12,606
query-clustering.lisp
lambdamikel_DLMAPS/src/query/query-clustering.lisp
;;; -*- Mode: Lisp; Syntax: Ansi-Common-Lisp; Package: THEMATIC-SUBSTRATE; Base: 10 -*- (in-package :THEMATIC-SUBSTRATE) ;;; ;;; ;;; (defmethod and-query-available-p :around ((qa query) (qb query)) (and (eq (type-of qa) (type-of qb)) (equal (vois qa) (vois qb)) (<=> (negated-p qa) (negated-p qb)) (call-next-method))) (defmethod or-query-available-p :around ((qa query) (qb query)) (and (eq (type-of qa) (type-of qb)) (equal (vois qa) (vois qb)) (<=> (negated-p qa) (negated-p qb)) (call-next-method))) ;;; ;;; Around-Method needs to be relaxed for TOP-Query ;;; (defmethod and-query-available-p :around ((a top-query) (b query)) (and (not (is-same-as-query-p b)) (equal (vois a) (vois b)))) (defmethod or-query-available-p :around ((a top-query) (b query)) (and (not (is-same-as-query-p b)) (equal (vois a) (vois b)))) (defmethod and-query-available-p :around ((a query) (b top-query)) (and (not (is-same-as-query-p a)) (equal (vois a) (vois b)))) (defmethod or-query-available-p :around ((a query) (b top-query)) (and (not (is-same-as-query-p a)) (equal (vois a) (vois b)))) ;;; ;;; ;;; (defmethod and-query-available-p :around ((a bottom-query) (b query)) (equal (vois a) (vois b))) (defmethod or-query-available-p :around ((a bottom-query) (b query)) (equal (vois a) (vois b))) (defmethod and-query-available-p :around ((a query) (b bottom-query)) (equal (vois a) (vois b))) (defmethod or-query-available-p :around ((a query) (b bottom-query)) (equal (vois a) (vois b))) ;;; ;;; ;;; (defmethod and-query-available-p ((a query) (b query)) nil) (defmethod or-query-available-p ((a query) (b query)) nil) ;;; ;;; ;;; (defmethod and-query-available-p ((a same-as-query) (b top-query)) nil) (defmethod and-query-available-p ((a same-as-query) (b bottom-query)) nil) (defmethod and-query-available-p ((b top-query) (a same-as-query)) nil) (defmethod and-query-available-p ((b bottom-query) (a same-as-query)) nil) ;;; ;;; ;;; (defmethod or-query-available-p ((a same-as-query) (b top-query)) nil) (defmethod or-query-available-p ((a same-as-query) (b bottom-query)) nil) (defmethod or-query-available-p ((b top-query) (a same-as-query)) nil) (defmethod or-query-available-p ((b bottom-query) (a same-as-query)) nil) ;;; ;;; ;;; (defmethod and-query-available-p ((a simple-conjunctive-description-query) (b simple-conjunctive-description-query)) t) (defmethod or-query-available-p ((a simple-disjunctive-description-query) (b simple-disjunctive-description-query)) t) ;;; ;;; ;;; (defmethod and-query-available-p ((a substrate-racer-node-query) (b substrate-racer-node-query)) t) (defmethod or-query-available-p ((a substrate-racer-node-query) (b substrate-racer-node-query)) t) (defmethod and-query-available-p ((a instance-retrieval-query) (b instance-retrieval-query)) t) (defmethod or-query-available-p ((a instance-retrieval-query) (b instance-retrieval-query)) t) ;;; ;;; ;;; (defmethod make-and-query :before ((query query) &rest args) (unless (every #'(lambda (x) (<=> (negated-p x) (negated-p query))) args) (nrql-error "Semantic rewriting error: bad queries ~A" (cons query args)))) (defmethod make-and-query :before ((query binary-query) &rest args) (unless (every #'(lambda (x) (<=> (inverse-p x) (inverse-p query))) args) (nrql-error "Semantic rewriting error: bad queries ~A" (cons query args)))) (defmethod make-and-query ((query query) &rest args) (if args (make-and-description query :negated-p (negated-p query) :descriptions args :vois (vois query) :all-vois (all-vois query) :parser (parser query)) query)) (defmethod make-or-query :before ((query query) &rest args) (unless (every #'(lambda (x) (<=> (negated-p x) (negated-p query))) args) (nrql-error "Semantic rewriting error: bad queries ~A" (cons query args)))) (defmethod make-or-query :before ((query binary-query) &rest args) (unless (every #'(lambda (x) (<=> (inverse-p x) (inverse-p query))) args) (nrql-error "Semantic rewriting error: bad queries ~A" (cons query args)))) (defmethod make-or-query ((query query) &rest args) (if args (make-or-description query :negated-p (negated-p query) :descriptions args :vois (vois query) :all-vois (all-vois query) :parser (parser query)) query)) ;;; ;;; ;;; (defmethod make-and-description ((descr substrate-racer-node-query) &rest args &key descriptions &allow-other-keys) (apply #'make-description (type-of descr) `(:racer (and ,@(mapcar #'racer-concept (cons descr descriptions)))) args)) (defmethod make-or-description ((descr substrate-racer-node-query) &rest args &key descriptions &allow-other-keys) (apply #'make-description (type-of descr) `(:racer (or ,@(mapcar #'racer-concept (cons descr descriptions)))) args)) ;;; ;;; ;;; (defmethod note-inconsistent ((query query)) (with-slots (query-satisfiable query-tautological) query (setf query-satisfiable nil query-tautological nil))) ;;; ;;; Generische Methoden: ;;; (defmethod semantically-rewrite-query ((query atomic-query) (parser simple-parser) &key reasoning-p &allow-other-keys) (if reasoning-p (progn ;;; diese Berechnungen werden gecached! ;;; nur der Seiteneffekte wegen! ;(query-tautological-p query) (query-inconsistent-p query) query) query)) (defmethod semantically-rewrite-query ((query and-query) (parser simple-parser) &key reasoning-p (combine-conjunctive-atoms-p t) &allow-other-keys) (let* ((subqueries (mapcar #'(lambda (sq) (semantically-rewrite-query sq parser :reasoning-p reasoning-p)) (subqueries query))) (atomic-subqueries (remove-if #'is-complex-query-p subqueries)) (complex-subqueries (set-difference subqueries atomic-subqueries)) (clusters nil)) (cond ((and reasoning-p (some #'query-inconsistent-p atomic-subqueries)) (note-inconsistent query) query) ((not (cdr subqueries)) ;;; wird ja evtl. dann wieder aggregiert! (make-top-level-query (first subqueries)) (first subqueries)) (combine-conjunctive-atoms-p (loop while atomic-subqueries do (let* ((qa (first atomic-subqueries)) (cluster (cons qa (remove-if-not #'(lambda (qb) (and-query-available-p qa qb)) (rest atomic-subqueries))))) (setf atomic-subqueries (set-difference atomic-subqueries cluster)) (push cluster clusters))) (when (every #'(lambda (cluster) (not (cdr cluster))) clusters) ;;; ;;; alle Cluster singulaer -> keine (?x C) (?x D) -> (?x (and C D))-Zusammenfassungen moeglich ;;; (return-from semantically-rewrite-query (make-description (type-of query) nil :subqueries subqueries :parser parser))) ;;; ;;; Cluster zusammenfassen ;;; (let ((new-atoms (mapcar #'(lambda (cluster) (if (cdr cluster) (apply #'make-and-query cluster) (first cluster))) clusters))) (when reasoning-p (dolist (atom new-atoms) ;(query-tautological-p atom) (query-inconsistent-p atom))) (cond ((and reasoning-p (some #'query-inconsistent-p new-atoms)) (note-inconsistent query) query) (t (let ((new-subqueries (append complex-subqueries new-atoms))) (if (cdr new-subqueries) (make-description (type-of query) nil :subqueries new-subqueries :parser parser) (progn (make-top-level-query (first new-subqueries)) (first new-subqueries)))))))) (t query)))) (defmethod semantically-rewrite-query ((query or-query) (parser simple-parser) &key reasoning-p (combine-disjunctive-atoms-p nil) &allow-other-keys) (let* ((subqueries (mapcar #'(lambda (sq) (semantically-rewrite-query sq parser :reasoning-p reasoning-p)) (subqueries query))) (subqueries (if reasoning-p (remove-if #'query-inconsistent-p subqueries) subqueries)) (atomic-subqueries (remove-if #'is-complex-query-p subqueries)) (complex-subqueries (set-difference subqueries atomic-subqueries)) (clusters nil)) (cond ((not subqueries) (note-inconsistent query) query) ((not (cdr subqueries)) (make-top-level-query (first subqueries)) (first subqueries)) (combine-disjunctive-atoms-p (loop while atomic-subqueries do (let* ((qa (first atomic-subqueries)) (cluster (cons qa (remove-if-not #'(lambda (qb) (or-query-available-p qa qb)) (rest atomic-subqueries))))) (setf atomic-subqueries (set-difference atomic-subqueries cluster)) (push cluster clusters))) ;; (princ clusters) (terpri) (when (every #'(lambda (cluster) (not (cdr cluster))) clusters) ;;; ;;; alle Cluster singulaer -> keine (?x C) (?x D) -> (?x (and C D))-Zusammenfassungen moeglich ;;; ;; (princ "***") (return-from semantically-rewrite-query (make-description (type-of query) nil :subqueries subqueries :parser parser))) ;;; ;;; Cluster zusammenfassen ;;; (let* ((new-atoms (mapcar #'(lambda (cluster) (if (cdr cluster) (apply #'make-or-query cluster) (first cluster))) clusters)) (new-subqueries (append new-atoms complex-subqueries))) (if (cdr new-subqueries) (make-description (type-of query) nil :subqueries new-subqueries :parser parser) (progn (make-top-level-query (first new-subqueries)) (first new-subqueries))))) (t (make-description (type-of query) nil :subqueries subqueries ; sind ja evtl. neu! :parser parser)))))
13,121
Common Lisp
.lisp
308
27.584416
117
0.50024
lambdamikel/DLMAPS
8
0
0
GPL-3.0
9/19/2024, 11:26:57 AM (Europe/Amsterdam)
d6032e129e9e586666c56e65fc34ffd8d52c80f79da248c21df171778a20e109
12,606
[ -1 ]