-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.lisp
145 lines (135 loc) · 6.53 KB
/
package.lisp
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
;; OSCAR-loader
(eval-when (:compile-toplevel :load-toplevel :execute)
(unless (find-package "OSCAR")
(make-package "OSCAR" :use '("COMMON-LISP" #+MCL "CCL"))))
(in-package "OSCAR")
(defvar *version* "OSCAR_3.31")
(princ "Loading ") (princ *version*) (terpri)
(proclaim
'(special *act-executors* *altered-nodes* *answered-discount*
*auxiliary-backwards-rules* *auxiliary-forwards-rules*
*auxiliary-forwards-rules* *backwards-logical-reasons* *backwards-reasons* *backwards-rules*
*backwards-substantive-reasons* *base-interest* *base-priority* *blocked-conclusions*
*cancelled-c-lists* *comparison-log* *concluded-interest-priority* *d-trace*
*dependent-interests* *dependent-nodes* *desires* *direct-reductio-interests*
*display-inference-queue* *display?* *environmental-input* *executable-operations*
*forwards-logical-reasons* *forwards-reasons* *forwards-rules* *forwards-substantive-reasons*
*independent-reductio-suppositions* *inference-graph* *inference-number* *inference-number*
*inference-queue* *inherited-non-reductio-suppositions* *interest-links* *interest-map*
*interest-number* *interest-record* *interest-scheme-number* *interest-schemes* *interests*
*link-number* *log-on* *non-reductio-supposition-nodes* *optative-dispositions* *pause* *percepts*
*permanent-ultimate-epistemic-interests* *premises* *priority-interests* *prob-compiler-loaded*
*problem-number* *problems* *problems-loaded* *processed-conclusions* *processed-desires*
*q&i-modules* *query-number* *queue-number* *reasoning-log* *reductio-discount*
*reductio-interest* *reductio-supposition-nodes* *skolem-free-suppositions* *skolem-multiplier*
*start-trace* *support-link-number* *support-links* *test-log* *time-limit* *tools-loaded*
*trees-loaded* *ultimate-epistemic-interests* *unused-suppositions* *proofs?*
*use-logic* *use-reductio* *version* ei adjunction is-desire is-inference is-percept oscar-pathname reductio
*deleted-arguments* *relevant-nodes* *open-position-for-assignment-tree-window*
*flash-affected-nodes* *flash-defeatees* *flash-defeaters* *flash-ancestors*
*flash-consequences* *flash-support-link-bases* *flash-support-links* *deductive-only*
*flash-relevant-nodes* *graph-ancestors* *graph-relevant-nodes* *menu-dialog*
*message* *start-display* *cycle* *assignment-tree-window* *assignment-tree-subview*
*monitor-assignment-tree* *assignment-tree-window-size* *assignment-tree-dialog*
*graphics-initialized* *graphics-on* *graph-log* *graphics-pause* *nodes-displayed*
*og-nodes* *og* *graph-interests* *speak* *d-node-number* *discrimination-net*
*top-d-node* *operators* *quantifier-number* *conditional-node* *disjunction-node*
*undercutter-node* *conjunctive-undercutter-node* *ip-number* *is-number* *display-box*
*quantifier-discount* *package-name* *display-button* *trace-button* *constructed-plans*
*constructed-goals* *constructed-desires* *plan-number* *goal-number*
*fixed-ultimate-epistemic-interests* *temporal-decay* *temporal-projection* *causal-implication*
*new-links* *used-nodes* *used-interests* *unprocessed-nodes* *unprocessed-interests*
*interests-used-in-proof* *temporal-decay-minimum* *instantiated-premise-number*
*strictly-relevant-nodes* *not-strictly-relevant-nodes* ug))
(defvar *package-name* (package-name *package*))
(defvar *temporal-projection* nil)
(defvar *causal-implication* nil)
(defvar *temporal-decay* .9999)
(defvar *temporal-decay-minimum* (/ (log .5) (log *temporal-decay*)))
(defvar *pause* nil)
(defvar *time-limit* 5)
(defvar *syntax-loaded* nil)
(defvar *prob-compiler-loaded* nil)
(defvar *problems-loaded* nil)
(defvar *tools-loaded* nil)
(defvar *premises* nil)
(defvar *ultimate-epistemic-interests* nil)
(defvar *permanent-ultimate-epistemic-interests* nil)
(defvar *fixed-ultimate-epistemic-interests* nil)
(defvar *forwards-rules* nil)
(defvar *backwards-rules* nil)
(defvar *auxiliary-forwards-rules* nil)
(defvar *auxiliary-backwards-rules* nil)
(defvar *optative-dispositions* nil)
(defvar *doxastic-optative-dispositions* nil)
(defvar *trees-loaded* nil)
(defvar *display-inference-queue* nil)
(defvar *display?* nil)
(defvar *trace* nil)
(defvar *d-trace* nil)
(defvar *start-trace* nil)
(defvar *start-display* nil)
(defvar *proofs?* nil)
(defvar *use-logic* t)
(defvar *use-reductio* t)
(defvar *log-on* nil)
(defvar *priority-interests* nil)
(defvar *blocked-conclusions* nil)
(defvar *answered-discount* .5)
(defvar *base-priority* .1)
(defvar *reductio-interest* .23)
(defvar *reductio-discount* .23)
(defvar *quantifier-discount* .95)
(defvar *EI-adjustment* 2.5)
(defvar *skolem-multiplier* 10)
(defvar *concluded-interest-priority* .001)
(defvar *forwards-substantive-reasons* nil)
(defvar *backwards-substantive-reasons* nil)
(defvar *environmental-input* nil)
(defvar *executable-operations* nil)
(defvar *assignment-tree-dialog* nil)
(defvar *assignment-tree-subview* nil)
(defvar *monitor-assignment-tree* nil)
(defvar *deductive-only* nil)
(defvar *affected-nodes* nil)
(defvar *graphics-on* nil)
(defvar *graph-log* nil)
(defvar *graphics-pause* nil)
;; Universal comment reader, learn from James Anderson (the author of cl-xml)
;; In CMUCL the solution is: (compile-file "foo.lisp" :external-format '(:utf8 :cr))
(defun |universal-comment-reader| (stream char)
(declare (ignore char))
(loop (case (read-char stream nil nil)
((#\return #\linefeed nil) (return))
(t )))
(values))
(set-macro-character #\; '|universal-comment-reader|)
;; Logical pathname translations, learn from CL-HTTP source code
(eval-when (:load-toplevel :execute)
(let* ((defaults #+asdf (asdf:component-pathname (asdf:find-system :oscar))
#-asdf *load-truename*)
(home (make-pathname :name :wild :type :wild
:directory (append (pathname-directory defaults)
'(:wild-inferiors))
:host (pathname-host defaults)
:defaults defaults
:version :newest)))
(setf (logical-pathname-translations "OSCAR")
`(("**;*.*.NEWEST" ,home)
("**;*.*" ,home)))))
#+ignore
(progn
;; Basic rules and problems
(load #p"OSCAR:rules.lisp")
(load #p"OSCAR:combined-problems.lisp")
;; Perception, Time and Causation
(load #p"OSCAR:perception-causes.lisp")
(load #p"OSCAR:pc-examples.lisp")
;; Planning rules and problems
(load #p"OSCAR:non-linear-planner.lisp")
(load #p"OSCAR:planning-problems.lisp")
;; Deontic rules and problems
(load #p"OSCAR:deontic-rules.lisp")
(load #p"OSCAR:deontic-problems.lisp")
(load #p"OSCAR:prob-flat-tire.lisp")
)