/usr/share/cafeobj-1.5/lib/bool.cafe is in cafeobj 1.5.7-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | ** -*- Mode:CafeOBJ -*-
** system: Chaos
** module: library
** file: bool.mod
**
** Copyright (c) 2000-2017, Toshimi Sawada. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
** are met:
**
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
**
** * Redistributions in binary form must reproduce the above
** copyright notice, this list of conditions and the following
** disclaimer in the documentation and/or other materials
** provided with the distribution.
**
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
** OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
** GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
** -------------------------------------------------------------
** save switch 'include BOOL'
lispq
(setq *include-bool-save* *include-bool*)
set include BOOL off
require base_bool
--
-- NOTE: You may need to modify `setup-BOOL' if you change
-- the definition of module BOOL
--
lispq
(when (fboundp 'setup-bool) (fmakunbound 'setup-bool))
lispq
(defun setup-bool ()
(unless *bootstrapping-bool*
(setf *bootstrapping-bool* t)
(unless (modexp-is-error (eval-modexp "BOOL"))
(with-output-chaos-error ('more-than-one-bool)
(format t "You cann not define BOOL module more than once in a session.")))
(if (and *user-bool* (not (equal "" *user-bool*)))
(cafeobj-input *user-bool*)
(cafeobj-input "sys_bool"))
(setq *BOOL-module* (eval-modexp "BOOL"))
(with-in-module (*bool-module*)
(let* ((and-op-info (find-operator '("_" "and" "_") 2 *bool-module*))
(and-meth (lowest-method* (car (opinfo-methods and-op-info)))))
(setq *bool-and* and-meth))
(let* ((or-op-info (find-operator '("_" "or" "_") 2 *bool-module*))
(or-meth (lowest-method* (car (opinfo-methods or-op-info)))))
(setq *bool-or* or-meth))
(let* ((not-op-info (find-operator '("not" "_") 1 *bool-module*))
(not-meth (lowest-method* (car (opinfo-methods not-op-info)))))
(setq *bool-not* not-meth))
(let* ((xor-op-info (find-operator '("_" "xor" "_") 2 *bool-module*))
(xor-meth (lowest-method* (car (opinfo-methods xor-op-info)))))
(setq *bool-xor* xor-meth))
(let* ((imp-op-info (find-operator '("_" "implies" "_") 2 *bool-module*))
(imp-meth (lowest-method* (car (opinfo-methods imp-op-info)))))
(setq *bool-imply* imp-meth))
(let* ((and-also (find-operator '("_" "and-also" "_") 2 *bool-module*))
(and-also-meth (lowest-method* (car (opinfo-methods and-also)))))
(setq *bool-and-also* and-also-meth))
(let* ((or-else (find-operator '("_" "or-else" "_") 2 *bool-module*))
(or-else-meth (lowest-method* (car (opinfo-methods or-else)))))
(setq *bool-or-else* or-else-meth))
(let* ((iff (find-operator '("_" "iff" "_") 2 *bool-module*))
(iff-meth (lowest-method* (car (opinfo-methods iff)))))
(setq *bool-iff* iff-meth))
(setq *m-and-op* *bool-and-also*)
(setq *m-or-op* *bool-or-else*))))
** setting up
lispq
(setup-bool)
lispq
(unless *bootstrapping-bool*
(setup-tram-bool-modules)
(init-builtin-universal)
)
** recover switch 'incude BOOL'
-- evq (setq *include-bool* *include-bool-save*)
set include BOOL on
**
protect BOOL
provide bool
**
eof
|