;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\207" [require cider-client nrepl-client clojure-mode easymenu cl] 2) #@36 Error if there is no NREPL buffer. (defalias 'tawny-mode-check-for-nrepl-buffer #[0 "\300 ?\205 \301\302!\207" [cider-connected-p error "No nREPL buffer exists. Please use `cider-jack-in'"] 2 (#$ . 230)]) #@125 Select the current reasoner. REASONER is the name of the reasoner, and must be one of hermit, elk or jfact. (fn REASONER) (defalias 'tawny-mode-select-reasoner #[257 "\300 \210\211\301\232\203 \302\303!\207\304\305\306\"!\207" [tawny-mode-check-for-nrepl-buffer "" message "You must choose a reasoner" tawny-mode-nrepl-reasoner-eval-string format "(do (require 'tawny.emacs)(tawny.emacs/set-reasoner :%s))"] 5 (#$ . 443) (byte-code "\300\301\302\303\304$C\207" [completing-read "Select reasoner: " ("hermit" "elk" "jfact") nil t] 5)]) #@60 Prints a message describing coherency of current ontology. (defalias 'tawny-mode-is-coherent #[0 "\300 \210\301\302\303\304 \"!\207" [tawny-mode-check-for-nrepl-buffer tawny-mode-nrepl-reasoner-eval-string format "(do (require 'tawny.emacs)(tawny.emacs/is-coherent \"%s\"))" cider-current-ns] 4 (#$ . 988) nil]) #@62 Prints a message describing consistency of current ontology. (defalias 'tawny-mode-is-consistent #[0 "\300 \210\301\302\303\304 \"!\207" [tawny-mode-check-for-nrepl-buffer tawny-mode-nrepl-reasoner-eval-string format "(do (require 'tawny.emacs)(tawny.emacs/is-consistent \"%s\"))" cider-current-ns] 4 (#$ . 1306) nil]) #@92 Prints random prolong (lexical pronounceable string) ID generated by the Identitaslibrary. (defalias 'tawny-mode-identitas #[0 "\300 \210\301\302\303\304 \"\305\306 !\"\207" [tawny-mode-check-for-nrepl-buffer cider-nrepl-request:eval format "(do (require 'tawny.emacs)(tawny.emacs/identitas \"%s\"))" cider-current-ns tawny-mode-make-into-buffer-response-handler point-marker] 4 (#$ . 1631) nil]) #@75 Return a messaging response handler into the current BUFFER. (fn MARKER) (defalias 'tawny-mode-make-into-buffer-response-handler #[257 "\300\301!\211\211L\266\302\303!\304\305\306\307\310D\311D\312FE\313\314\315%\207" [make-symbol "--m--" nrepl-make-response-handler marker-buffer lambda (&rest --cl-rest--) apply function #[771 "\212\300J!q\210Jb\210\211\301\302Oc)\207" [marker-buffer 1 -1] 6 "\n\n(fn G0 BUFFER VALUE)"] quote --cl-rest-- #[514 "\300\207" [nil] 3 "\n\n(fn BUFFER VALUE)"] #[514 "\300\207" [nil] 3 "\n\n(fn BUFFER VALUE)"] #[257 "\300\207" [nil] 2 "\n\n(fn BUFFER)"]] 10 (#$ . 2034)]) #@67 Prints a message describing unsatisfiability of current ontology. (defalias 'tawny-mode-unsatisfiable #[0 "\300 \210\301 \210\302\303\304\305 \"\306p\307\"\"\207" [tawny-mode-check-for-nrepl-buffer tawny-mode-display-classes-clear cider-nrepl-request:eval format "(do (require 'tawny.emacs)(tawny.emacs/get-unsatisfiable \"%s\"))" cider-current-ns tawny-mode-class-list-response-handler "Unsatisfiable classes for"] 5 (#$ . 2651) nil]) #@38 A buffer for interaction with tawny. (defvar tawny-interaction-buffer (get-buffer-create "*tawny-interaction*") (#$ . 3093)) #@169 Add message to `tawny-interaction-buffer'. Argument STRING is a format string. Optional argument VALUES are the values for the format string. (fn STRING &rest VALUES) (defalias 'tawny-message #[385 "\301\302#\212q\210db\210\302\303\304 #c\210)\305!\207" [tawny-interaction-buffer apply format "%s: %s\n" current-time-string message] 7 (#$ . 3225)]) #@38 Eval STRING in clojure. (fn STRING) (defalias 'tawny-mode-nrepl-reasoner-eval-string #[257 "\300\301p!\"\207" [cider-nrepl-request:eval tawny-mode-make-reasoner-response-handler] 5 (#$ . 3586)]) #@62 Return a messaging response handler for BUFFER. (fn BUFFER) (defalias 'tawny-mode-make-reasoner-response-handler #[257 "\300\301\302\303\304%\207" [nrepl-make-response-handler #[514 "\300\301#\207" [tawny-message "For %s: %s"] 6 "\n\n(fn BUFFER VALUE)"] #[514 "\300\301#\207" [tawny-message "Output: %s %s"] 6 "\n\n(fn BUFFER VALUE)"] #[514 "\300\301#\207" [tawny-message "Error: %s %s"] 6 "\n\n(fn BUFFER VALUE)"] #[257 "\300\207" [nil] 2 "\n\n(fn BUFFER)"]] 7 (#$ . 3789)]) #@32 Name of the Class list buffer. (defvar tawny-mode-class-list-buffer "*tawny-classes*" (#$ . 4279)) #@30 Clear the class list buffer. (defalias 'tawny-mode-display-classes-clear #[0 "\301\302!!\205\212q\210\303 )\207" [tawny-mode-class-list-buffer buffer-live-p get-buffer erase-buffer] 3 (#$ . 4384)]) #@161 Display a list of classes. Argument MESSAGE is a message. Argument BUFFER is the buffer. Argument CLASSES is the list of classes. (fn MESSAGE BUFFER CLASSES) (defalias 'tawny-mode-display-classes #[771 "\212\301!q\210\302\303\304!$c\210)\305!\207" [tawny-mode-class-list-buffer get-buffer-create format "%s %s:\n%s" tawny-de-escape display-buffer] 9 (#$ . 4593)]) #@135 Return a response handler which display classes. Argument BUFFER is the buffer. Argument MESSAGE is the message. (fn BUFFER MESSAGE) (defalias 'tawny-mode-class-list-response-handler #[514 "\300\301\302\"\303\304\305%\207" [nrepl-make-response-handler make-closure #[514 "\301\300#\207" [V0 tawny-mode-display-classes] 6 "\n\n(fn BUFFER VALUE)"] #[514 "\300\301#\207" [tawny-message "Output: %s %s"] 6 "\n\n(fn BUFFER VALUE)"] #[514 "\300\301#\207" [tawny-message "Error: %s %s"] 6 "\n\n(fn BUFFER VALUE)"] #[257 "\300\301\"\207" [tawny-message "Complete: %s"] 4 "\n\n(fn BUFFER)"]] 8 (#$ . 4971)]) #@57 Save the current namespace and open the file if needed. (defalias 'tawny-mode-save #[0 "\300 \210\301\302\303\304 \"\305p!\"\207" [tawny-mode-check-for-nrepl-buffer cider-nrepl-request:eval format "(do (require 'tawny.emacs)\n(tawny.emacs/save-namespace-ontology \"%s\"))" cider-current-ns tawny-mode-save-handler] 4 (#$ . 5586) nil]) #@67 Open the ontology BUFFER after Clojure has saved it. (fn BUFFER) (defalias 'tawny-mode-save-handler #[257 "\300\301\302\303\304%\207" [nrepl-make-response-handler #[128 "\300\207" [nil] 2 "\n\n(fn &rest VALUE)"] #[128 "\300\207" [nil] 2 "\n\n(fn &rest STDOUT)"] #[128 "\300\207" [nil] 2 "\n\n(fn &rest STERR)"] #[128 "\300 \301P\302!\211\203\303!\207r\304!q\210\305\306!\210\303p!)\207" [clojure-project-dir "o.omn" find-buffer-visiting display-buffer find-file auto-revert-mode 1] 5 "\n\n(fn &rest DONE)"]] 7 (#$ . 5927)]) #@54 Opens a window with docstring for QUERY. (fn QUERY) (defalias 'tawny-doc #[257 "\300\301\302\"\207" [cider-read-symbol-name "Term: " tawny-doc-handler] 4 (#$ . 6464) "P"]) #@87 Return a documentation popup. Argument SYMBOL is the symbol to document. (fn SYMBOL) (defalias 'tawny-doc-handler #[257 "\301\302\303 #\304\305\"\306\307!\"\207" [cider-doc-buffer format "(do (require 'tawny.repl)(tawny.repl/print-doc %s/%s))" cider-current-ns cider-popup-buffer t cider-nrepl-request:eval cider-popup-eval-out-handler] 7 (#$ . 6643)]) #@51 Remove escape sequences from STRING. (fn STRING) (defalias 'tawny-de-escape #[257 "\300\301\302\300\303\304##\207" [replace-regexp-in-string "\\\\n" "\n" "\\\"" ""] 8 (#$ . 7007)]) #@54 Show the inferred superclasses of CLASS. (fn CLASS) (defalias 'tawny-mode-inferred-superclasses #[257 "\300\301\302\"\207" [cider-read-symbol-name "Class:" tawny-mode--inferred-superclasses-1] 4 (#$ . 7197) "P"]) #@99 Support function for `tawny-mode-inferred-superclasses'. Argument CLASS is the class. (fn CLASS) (defalias 'tawny-mode--inferred-superclasses-1 #[257 "\300 \210\301 \210\302\303\304\305 \306\307\310\"#\311p\312\"\"\207" [tawny-mode-check-for-nrepl-buffer tawny-mode-display-classes-clear cider-nrepl-request:eval format "(do (require 'tawny.emacs)(tawny.emacs/get-inferred-superclasses \"%s\" \"%s\"))" cider-current-ns thing-at-point symbol t tawny-mode-class-list-response-handler "Inferred superclasses for"] 8 (#$ . 7417)]) #@52 Show the inferred subclasses of CLASS. (fn CLASS) (defalias 'tawny-mode-inferred-subclasses #[257 "\300\301\302\"\207" [cider-read-symbol-name "Class:" tawny-mode--inferred-subclasses-1] 4 (#$ . 7952) "P"]) #@97 Support function for `tawny-mode-inferred-subclasses'. Argument CLASS is the class. (fn CLASS) (defalias 'tawny-mode--inferred-subclasses-1 #[257 "\300 \210\301 \210\302\303\304\305 \306\307\310\"#\311p\312\"\"\207" [tawny-mode-check-for-nrepl-buffer tawny-mode-display-classes-clear cider-nrepl-request:eval format "(do (require 'tawny.emacs)(tawny.emacs/get-inferred-subclasses \"%s\" \"%s\"))" cider-current-ns thing-at-point symbol t tawny-mode-class-list-response-handler "Inferred subclasses for"] 8 (#$ . 8166) nil]) (defvar tawny-mode-protege-entity-last nil) #@39 Track the entity at point in Protege. (defalias 'tawny-mode-protege-entity #[0 "\302=\205.\303\304\305!!\306\307\"\211A@\206\211@\310\311\312 # \232?\205,\313\314p!\"\266\204\207" [major-mode tawny-mode-protege-entity-last clojure-mode substring-no-properties thing-at-point symbol split-string "/" format "(try (require 'tawny.protege-nrepl)(eval '(tawny.protege-nrepl/display-maybe \"%s\" \"%s\"))(catch Exception exp :not-protege))" cider-current-ns cider-nrepl-request:eval tawny-mode-nrepl-protege-display-handler] 8 (#$ . 8741) nil]) #@137 Return a response handler for Protege. This is null, as everything happens by side effect. Argument BUFFER is the buffer. (fn BUFFER) (defalias 'tawny-mode-nrepl-protege-display-handler #[257 "\300\301\302\303\304%\207" [nrepl-make-response-handler #[128 "\300\207" [nil] 2 "\n\n(fn &rest VALUE)"] #[128 "\300\207" [nil] 2 "\n\n(fn &rest STDOUT)"] #[128 "\300\207" [nil] 2 "\n\n(fn &rest STDERR)"] #[128 "\300\207" [nil] 2 "\n\n(fn &rest DONE)"]] 7 (#$ . 9299)]) (defvar tawny-mode-protege-track-timer "Timer for protege tracking. " nil) #@39 Function which appears to do nothing. (defalias 'tawny-mode-protege-entity-idle #[0 "\300 \207" [tawny-mode-protege-entity] 1 (#$ . 9846)]) #@41 Toggle tracking of entities in protege. (defalias 'tawny-mode-protege-track-toggle #[0 "\203\f\301!\210\302\202\303\304\305\306#\211\207" [tawny-mode-protege-track-timer cancel-timer nil run-with-idle-timer 0.5 t tawny-mode-protege-entity-idle] 4 (#$ . 9992) nil]) (defvar tawy-mode-menu-map nil) (defvar tawny-mode-map (byte-code "\300 \301\302!\210\303\304\305\306$\210\307\310\311#\210\307\312\313#\210\307\314\315#\210\307\316\317#\210\307\320\321#\210\307\322\323#\210\307\324\325#\210\207" [make-sparse-keymap (lambda (def-tmp-var) (defvar tawny-mode-menu-map def-tmp-var #1="`tawny-minor-mode' menu")) nil easy-menu-do-define tawny-mode-menu-map #1# ("Tawny" ["Save" tawny-mode-save :help "Save current ontology and open in Emacs"] ["Coherent" tawny-mode-is-coherent :help "Check ontology in current buffer for coherency"] ["Consistency" tawny-mode-is-consistent :help "Check ontology in current buffer for consistency"] ["Unsatisfiable" tawny-mode-unsatisfiable :help "Display Unsatisfiable Classes"] ["Inferred Superclasses" tawny-mode-inferred-superclasses :help "Display Inferred Superclasses"] ["Inferred Subclasses" tawny-mode-inferred-subclasses :help "Display Inferred Superclasses"] ("Reasoner" ["Hermit" (tawny-mode-select-reasoner "hermit")] ["Elk" (tawny-mode-select-reasoner "elk")]) ("Protege" ["Display Entity" tawny-mode-protege-entity :help "Display Entity in Protege (assumes use of protege-nrepl)"] ["Activate Ontology" tawny-mode-protege-ontology :help "Activate Ontology "] ["Track Entity" tawny-mode-protege-track-toggle :help "Track the nearest entity to the cursor in Protege" :active t :style radio :selected tawny-mode-protege-track-timer] ["Do Not Track Entity" tawny-mode-protege-track-toggle :help "Do not track the nearest entity to the cursor in Protege" :active t :style radio :selected (not tawny-mode-protege-track-timer)]) ["Display Documentation" tawny-doc :help "Display documentation for entity at point"]) define-key ".s" tawny-mode-save ".p" tawny-mode-inferred-superclasses ".b" tawny-mode-inferred-subclasses ".c" tawny-mode-is-coherent ".v" tawny-mode-is-consistent ".u" tawny-mode-unsatisfiable ".d" tawny-doc] 6)) #@89 Non-nil if Tawny mode is enabled. Use the command `tawny-mode' to change this variable. (defvar tawny-mode nil (#$ . 12185)) (make-variable-buffer-local 'tawny-mode) #@585 Interact with an ontology in tawny-owl. This is a minor mode. If called interactively, toggle the `Tawny mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `tawny-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'tawny-mode #[256 "\302 \303=\203 ?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300 \"\2031\300 B\311!\210\312\313\203?\314\202@\315\"\210\316\317!\203b\302 \203T\211\302 \232\203b\320\321\203^\322\202_\323\324#\210\210\325 \210\207" [tawny-mode local-minor-modes current-message toggle 1 nil t boundp delq goto-address-prog-mode run-hooks tawny-mode-hook tawny-mode-on-hook tawny-mode-off-hook called-interactively-p any message "Tawny mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 6 (#$ . 12358) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar tawny-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\313\310\211%\207" [tawny-mode-map tawny-mode-hook variable-documentation put "Hook run after entering or leaving `tawny-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode tawny-mode " Tawny"] 6) (defvar tawny-mode-block nil) #@35 Enable tawny based on heuristics. (defalias 'tawny-mode-maybe-enable #[0 "\212eb\210?\205\301\302d\303#\205\304\305!)\207" [tawny-mode-block re-search-forward "\\_<\\(def\\(?:\\(?:annotationpropert\\|o\\(?:ntolog\\|propert\\)\\)y\\)\\|tawny\\.owl\\)\\_>" t tawny-mode 1] 4 (#$ . 14107) nil]) (provide 'tawny-mode)