Debian Codegraph @

comlib/globals.lisp

raw
1 ;;;-*- Mode:LISP; Package:CHAOS; Base:10; Syntax:Common-lisp -*-
2 ;;;
3 ;;; Copyright (c) 2000-2018, Toshimi Sawada. All rights reserved.
4 ;;;
5 ;;; Redistribution and use in source and binary forms, with or without
6 ;;; modification, are permitted provided that the following conditions
7 ;;; are met:
8 ;;;
9 ;;; * Redistributions of source code must retain the above copyright
10 ;;; notice, this list of conditions and the following disclaimer.
11 ;;;
12 ;;; * Redistributions in binary form must reproduce the above
13 ;;; copyright notice, this list of conditions and the following
14 ;;; disclaimer in the documentation and/or other materials
15 ;;; provided with the distribution.
16 ;;;
17 ;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
18 ;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 ;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 ;;; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
21 ;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 ;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
23 ;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 ;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 ;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 ;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 ;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 ;;;
29 (in-package :chaos)
30 #|==============================================================================
31 System: CHAOS
32 Module: comlib
33 File: globals.lisp
34 ==============================================================================|#
35 #-:chaos-debug
36 (declaim (optimize (speed 3) (safety 0) #-GCL (debug 0)))
37 #+:chaos-debug
38 (declaim (optimize (speed 1) (safety 3) #-GCL (debug 3)))
39
40 ;;; == DESCRIPTION =============================================================
41 ;;; This file gathers the declaration of global/special variables of CHAOS
42 ;;; system.
43 ;;;
44
45 ;;;********************
46 ;;; RUNTIME ENVIRONMENT_________________________________________________________
47 ;;;********************
48 ;;;
49 ;;; In Chaos, all of the works are done in a `context'.
50 ;;; A context is a dag of modules with importation relation as arrows,
51 ;;; the top node (module) is called `current module'.
52 ;;;
53 ;;; The current module and its some frequently accessed informations are
54 ;;; bound to global variables providing run time environment.
55 ;;;
56 ;;; *current-module* : the current-module
57 ;;; *current-sort-order* : transitive closure of sort relations of
58 ;;; current-mdoule.
59 ;;; *current-opinfo-table* : operator information table of the current-module.
60 ;;; *current-ext-rule-table* : extented rules for A, and AC
61 ;;;
62
63 (declaim (special *current-module* ; the module currently the target of
64 ; operations.
65 *current-sort-order* ; closure of sort relations of current
66 ; module.
67 *current-opinfo-table* ; operator information table of the
68 ; current module.
69 *current-ext-rule-table*
70 *top-level-definition-in-progress*
71 *on-preparing-for-parsing* ; parsing preparation in progress
72 ))
73
74 (defvar *top-level-definition-in-progress* nil)
75
76 ;;; *open-module* bounds the 'opening' module.
77 ;;;
78 (declaim (special *open-module* ; the module crrently opened.
79 *last-before-open* ; the module which was *last* before the
80 ; currently opened module.
81 ))
82
83 (defvar *current-module* nil)
84 (defvar *current-sort-order* nil)
85 (defvar *current-opinfo-table* nil)
86 (defvar *current-ext-rule-table* nil)
87 (defvar *open-module* nil)
88 (defvar *last-before-open* nil)
89
90 ;;; Feature for require & provide
91 ;;;
92 (defvar *chaos-features* nil)
93
94 ;;; Some top level flags & variables.--------------------------------------------
95
96 (declaim (special *chaos-verbose* *chaos-quiet* *chaos-input-source*))
97 (defvar *chaos-verbose* nil)
98 (defvar *chaos-quiet* nil)
99 (defvar *chaos-input-source* nil) ; binds a file name when processing
100 ; input from the file.
101 (declaim (special *chaos-input-level*)
102 (type fixnum
103 *chaos-input-level*
104 *chaos-input-nesting-limit*))
105
106 (defvar *chaos-input-level* 0)
107 (defvar *chaos-input-nesting-limit* 10)
108
109 (declaim (special *auto-context-change*))
110 (defvar *auto-context-change* nil)
111
112 (defvar *system-prelude-dir* nil)
113 (defvar *system-lib-dir* nil)
114 (defvar *system-ex-dir* nil)
115
116 ;;; ***********************************
117 ;;; CONTROLL FLAGS OF REWRITING PROCESS_________________________________________
118 ;;; ***********************************
119
120 (declaim (special *trace-level*))
121 (declaim (type (integer 0 256) *trace-level*))
122 (defvar *trace-level* 0)
123 (declaim (special *self*))
124 (defvar *self* nil)
125 (defvar $$cond nil)
126 (defvar $$trace-rewrite nil) ; flag, non-nil -> trace.
127 (defvar $$trace-rewrite-whole nil) ; flag, non-nil -> trace whole.
128 (defvar $$trace-proof nil) ; flag, non-nil -> trace CITP proof.
129 ;;; *proof-tree* binds current proof tree structure
130 (defvar *proof-tree* nil)
131 (defvar *next-default-proof-node* nil)
132 (defvar *citp-verbose* nil)
133 (defvar *citp-normalize-instance* t)
134
135 (defvar *rewrite-stepping* nil) ; flag, non-nil -> under stepping.
136 (declaim (type fixnum *rewrite-count-limit*))
137 (defvar *rewrite-count-limit* most-positive-fixnum)
138 ; flag, non-nil(integer) -> limitation
139 ; for rewriting steps.
140 (defvar *rewrite-stop-pattern* nil) ; flag, non-nil(term) -> stop rewriting
141 ; iff matches to the pattern.
142 (defvar *steps-to-be-done* nil) ; remaining steps before stop
143 (defvar $$mod 'void)
144 ;;;
145 (defvar *old-context* nil)
146 (declaim (special *old-context*))
147 (declaim (special *allow-$$term*))
148 (defvar *allow-$$term* t)
149 (defvar $$term 'void) ; current target term, destructively
150 ; modified
151 (defvar $$subterm nil) ; subterm of $$term selected
152 (defvar $$term-context nil) ; context module of $$term
153 (defvar $$selection-stack nil)
154 (defvar $$action-stack nil)
155 ;;;
156 (defvar $$norm 'void)
157 (defvar $$show-red nil)
158 (defvar *perform-on-demand-reduction* t)
159 (declaim (special *rewrite-exec-mode*))
160 (defvar *rewrite-exec-mode* nil)
161 (declaim (special *cexec-target*))
162 (defvar *cexec-target* nil)
163 (declaim (special *rewrite-exec-condition*))
164 (defvar *rewrite-exec-condition* nil)
165 (declaim (special *rewrite-semantic-reduce*)
166 (type (or null (not null)) *rewrite-semantic-reduce))
167 (defvar *rewrite-semantic-reduce* nil)
168 (declaim (special *beh-rewrite*)
169 (type (or null (not null)) *beh-rewrite*))
170 (defvar *beh-rewrite* nil)
171 (declaim (type fixnum *rule-count*)
172 (special *rule-count*))
173 (defvar *rule-count* 0)
174 (defvar *show-stats* t)
175 (defvar *try-try* nil)
176 (defvar *reduce-conditions* nil)
177 (declaim (type fixnum $$trials))
178 (defvar $$trials 1)
179 (declaim (type fixnum $$matches)
180 (special $$matches))
181 (defvar $$matches 0)
182 (defvar *on-reduction* t)
183 (defvar *reduce-builtin-eager* nil)
184 (declaim (type fixnum *condition-trial-limit*))
185 (defparameter .condition-trial-limit-default.
186 #+GCL 240
187 #-GCL 5500)
188 (defvar *condition-trial-limit* .condition-trial-limit-default.)
189
190 ;;; MEL support
191 (defvar *mel-sort* nil)
192 (defvar *mel-always* nil)
193 ;;; (defvar *mel-reduce* nil)
194
195 ;;; :=
196 (defvar *m-pattern-subst* nil)
197
198 ;; memoization
199 (defvar *memo-rewrite* t) ; use memo mechanism
200 (defvar *clean-memo-in-normalize* t)
201 (defvar *always-memo* nil)
202 (declaim (special *term-memo-hash-hit*)
203 (type fixnum *hash-hit*))
204 (defvar *term-memo-hash-hit* 0)
205 (declaim (special .hash-size.)
206 (type fixnum .hash-size.))
207 (defvar .hash-size. 0)
208 (defvar *allow-illegal-beh-axiom* t)
209
210 ;;;*********************
211 ;;; REGULARIZING CONTROL_______________________________________________________
212 ;;;*********************
213 (declaim (special *regularize-signature*))
214 (defvar *regularize-signature* nil)
215 (defvar *check-regularity* nil)
216
217 ;;;********************
218 ;;; COMPATIBILITY CHECK________________________________________________________
219 ;;;********************
220 (declaim (special *check-compatibility*))
221 (defvar *check-compatibility* nil)
222
223 ;;;***************
224 ;;; SENSIBLE CHECK_____________________________________________________________
225 ;;;***************
226 (declaim (special *check-sensibleness*))
227 (defvar *check-sensibleness* nil)
228
229 ;;;**********
230 ;;; COHERENCY__________________________________________________________________
231 ;;;**********
232 (declaim (special *check-rwl-coherency*))
233 (defvar *check-rwl-coherency* nil)
234
235 ;;;**************************
236 ;;; BUILTIN OVERLOADING CHECK__________________________________________________
237 ;;;**************************
238 (declaim (special *builtin-overloading-check*))
239 (defvar *builtin-overloading-check* t)
240
241 ;;; Flags for printer control._________________________________________________
242 ;;;***************************
243
244 (declaim (special *print-indent*))
245 (declaim (type fixnum
246 *chaos-print-level*
247 *print-line-limit*
248 *chaos-print-length*
249 *print-indent* *print-indent-increment*))
250 (defvar *module-all-rules-every* nil)
251 (defvar *fancy-print* t)
252 (defvar *print-term-struct* nil)
253 (defvar *print-xmode* :normal)
254 (defvar *show-mode* :cafeobj) ; one of :chaos or :cafeobj
255 (defvar *print-indent* 0)
256 (defparameter *print-indent-increment* 1)
257 (defvar *print-explicit* nil) ;if t then give more detail on sorts, etc.
258 (defvar *print-abbrev-mod* nil) ; abbreviate module names
259 (defvar *print-abbrev-num* 0)
260 (defvar *print-abbrev-table* nil)
261 (defvar *print-abbrev-quals* nil)
262 (defvar *print-with-sort* nil)
263 (defvar *print-operator-table* nil)
264 (defvar *print-flag-module-values* nil)
265 (defvar *print-indent-contin* nil)
266 (defvar *print-line-limit* 2000)
267 (defvar *print-mode* nil)
268 (defvar *print-all-eqns* nil)
269 (defvar *print-exec-rule* nil)
270 (defvar *print-every-exec-finding* nil)
271 (defvar *print-ignore-mods* nil)
272 (defvar *chaos-print-level* 5)
273 (defvar *chaos-print-length* 100)
274 (defvar *chaos-print-errors* nil)
275 (defvar *chaos-input-quiet* nil)
276 (defvar *print-variables* nil)
277 (defvar *grind-bool-term* nil)
278 (declaim (special .file-col.)
279 (type fixnum .file-col.))
280 (defvar .file-col. 0)
281 (declaim (type (or null fixnum) *term-print-depth*))
282 (defvar *term-print-depth* nil)
283 (defvar *show-tree-horizontal* nil)
284
285 ;;; CafeOBJ variables
286 (defvar *cafeobj-batch* nil)
287 (defvar *cafeobj-input-quiet* nil)
288 (defvar $)
289 (defvar -cafeobj-load-time- nil)
290 (defvar *cafeobj-standard-prelude-path* nil)
291
292 ;;; NOT USED
293 ;;; GRAMMAR
294 ;;;
295 ;;; *GRM.CURRENT* is a grammar to which the following operations are to be applied.
296 ;;; define.grm-rule
297 ;;; grm.clear-rule
298 ;;; set by 'in.grammar' operation.
299 ;;;
300 ;;;(defvar *grm.current* nil)
301
302 ;;; *CHAOS.CURRENT-GRAMMAR* is a list of grammar with which the `grm.parse' works.
303 ;;; set by 'use.grammar' operation. (see "term-parser.lisp")
304 ;;;
305 ;;; (defvar *chaos.current-grammar* nil)
306
307 ;;; ERROR TAGS ----------------------------------------------------------------
308 ;;; (defvar *module-not-found-error* 'Module-Not-found)
309 ;;; (defvar *sort-not-found-error* 'sort-not-found)
310 ;;; (defvar *operator-not-found-error* 'operator-not-found)
311 ;;;
312
313 ;;;=============================================================================
314 ;;; BUILTIN SORTS
315 ;;;=============================================================================
316 ;; NAMES of Builtin sort.
317 (defconstant $name-sort '|*Sort*|)
318 (defconstant $name-gen-sort '|_ GeneralSort _|)
319 (defconstant $name-bi-sort '|*BuiltinSort*|)
320 (defconstant $name-identifier '|*Identifier*|)
321 (defconstant $name-cosmos '|*Cosmos*|)
322 (defconstant $name-universal '|*Universal*|)
323 (defconstant $name-huniversal '|*HUniversal*|)
324 (defconstant $name-term '|*Term*|)
325 (defconstant $name-bottom '|_ Bottom _|)
326 (defconstant $name-hbottom '|_ HBottom _|)
327 (defconstant $name-record '|_ Record _|)
328 (defconstant $name-class '|_ Class _|)
329 (defconstant $name-and-sort '|_ ^-Sort _|)
330 (defconstant $name-or-sort '|_ \|-Sort _|)
331 (defconstant $name-err-sort '|_ ?-Sort _|)
332 (defconstant $name-operator '|*Operator*|)
333 (defconstant $name-optheory '|*OpTheory*|)
334 (defconstant $name-module '|*Module*|)
335 (defconstant $name-signature '|*Signature*|)
336 (defconstant $name-axiomset '|*AxiomSet*|)
337 (defconstant $name-trs '|*Trs*|)
338 (defconstant $name-axiom '|*Axiom*|)
339 (defconstant $name-chaos-object '|*ChaosObject*|)
340 (defconstant $name-chaos-expr '|*CafeExpr*|)
341 (defconstant $name-term-type '|*TermType*|)
342 (defconstant $name-chaos-list '|*CafeList*|)
343 (defconstant $name-void '|*Void*|)
344 (defconstant $name-import '|*Import*|)
345 (defconstant $name-subst '|*Substitution*|)
346 (defconstant $name-parameter '|*Parameter*|)
347
348 ;;; builtin sorts
349 (defvar *cosmos* 'void) ; the whole
350 (defvar *chaos-object* 'void)
351 (defvar *chaos-expr-sort* 'void)
352 (defvar *term-sort* 'void)
353 (defvar *universal-sort* 'void) ; visible universe
354 (defvar *huniversal-sort* 'void) ; hidden universe
355 (defvar *bottom-sort* 'void) ; visible bottom sort
356 (defvar *hbottom-sort* 'void) ; hidden bottom sort
357 (defvar *sort-sort* 'void)
358 (defvar *general-sort* 'void)
359 (defvar *builtin-sort* 'void)
360 (defvar *identifier-sort* 'void)
361 (defvar *id-sort* 'void)
362 (defvar *qid-sort* 'void)
363 (defvar *syntax-err-sort* 'void)
364 (defvar *type-err-sort* 'void)
365 (defvar *op-err-sort* 'void)
366 (defvar *and-sort* 'void)
367 (defvar *or-sort* 'void)
368 (defvar *err-sort* 'void)
369 (defvar *sort-error* 'none)
370 (defvar *record-sort* 'void)
371 (defvar *class-sort* 'void)
372 (defvar *operator-sort* 'void)
373 (defvar *optheory-sort* 'void)
374 (defvar *module-sort* 'void)
375 (defvar *import-sort* 'void)
376 (defvar *signature-sort* 'void)
377 (defvar *axiomset-sort* 'void)
378 (defvar *trs-sort* 'void)
379 (defvar *variable-sort* 'void)
380 (defvar *appl-form-sort* 'void)
381 (defvar *pvariable-sort* 'void)
382 (defvar *lisp-term-sort* 'void)
383 (defvar *slisp-term-sort* 'void)
384 (defvar *glisp-term-sort* 'void)
385 (defvar *bconst-term-sort* 'void)
386 (defvar *modexpr-sort* 'void)
387 (defvar *chaos-list-sort* 'void)
388 (defvar *chaos-void-sort* 'void)
389 (defvar *bool-sort* 'void)
390 (defvar *sort-id-sort* 'void)
391 (defvar *string-sort* 'void)
392 (defvar *chaos-value-sort* 'void)
393 (defvar *character-sort* 'void)
394 (defvar *axiom-sort* 'void)
395 (defvar *object-identifier-sort* 'void)
396 (defvar *object-sort* 'void)
397 (defvar *record-instance-sort* 'void)
398 (defvar *class-id-sort* 'void)
399 (defvar *record-id-sort* 'void)
400 (defvar *attribute-id-sort* 'void)
401 (defvar *attribute-sort* 'void)
402 (defvar *attribute-list-sort* 'void)
403 (defvar *attr-value-sort* 'void)
404 (defvar *message-sort* 'void)
405 (defvar *configuration-sort* 'void)
406 (defvar *acz-configuration-sort* 'void)
407 (defvar *subst-sort* 'void)
408 (defvar *sort_builtin* 'void)
409 (defvar *parameter-sort* 'void)
410 (defvar *condition-sort* 'void)
411 (defvar sup-universal-sort-name nil)
412 (defvar sup-huniversal-sort-name nil)
413
414 ;;;=============================================================================
415 ;;; Builtin modules & operations.
416 ;;; Operations in some builtin modules.
417 ;;;=============================================================================
418
419 (defvar *system-standard-prelude* nil)
420 (defvar *system-soft-wired* nil)
421 (defvar *kernel-hard-wired-builtin-modules* nil)
422
423 ;;; *SYSTEM-MODULE*
424 (defvar *system-module* nil)
425
426 ;;; *CHAOS-MODULE*
427 ;;; bounds built in module CHAOS.
428 (defvar *chaos-meta* nil)
429 (defvar *chaos-module* nil)
430 (defvar *chaos-object-module* nil)
431 (defvar *builtin-metalevel-sort* (make-hash-table))
432 ;;;
433 (defvar *string-not-found* nil)
434
435 ;;; *CHAOS-SORT-ORDER* holds the transitive closure of sort relations between
436 ;;; builtin sorts. This is a value of slot 'sort-order' of builtin module
437 ;;; CHAOS (buoud to global *chaos-module*).
438 ;;;
439 (defvar *chaos-sort-order* 'void)
440
441 ;;; *PARSER-SORT-ORDER*
442 (defvar *parser-sort-order* 'void)
443
444 ;;; HARD-WIRED CHAOS MODULE
445 (defvar *system-object-module* nil)
446 (defvar *identifier-module* nil)
447 (defvar *universal-module* nil)
448 (defvar *parser-module* nil)
449 (defvar *qid-module* nil)
450 (defvar *id-module* nil)
451 (defvar .int-module. nil)
452
453 ;;; Some operators & methods of CHAOS module.
454 ;;; these are used for representing builtin constant and ill-formed terms
455 ;;; at parsing time.
456 ;;;
457 (defvar *builtin-method* nil)
458 (defvar *builtin-op* nil)
459 (defvar *partial-op* nil)
460 (defvar *void-op* nil)
461 (defvar *partial-method* nil)
462 (defvar *void-method* nil)
463 (defvar *type-err-op* nil)
464 (defvar *type-err-method* nil)
465 (defvar *op-err-op* nil)
466 (defvar *op-err-method* nil)
467 (defvar *op-term* nil)
468
469 ;;; TRUTH, BOOL & IDENTICAL Module
470 ;;;-----------------------------------------------------------------------------
471 (defvar *TRUTH-VALUE-module* 'void)
472 (defvar *TRUTH-module* 'void)
473 (defvar *BOOL-module* 'void)
474 (defvar *IDENTICAL-module* nil)
475 (defvar *EQL-module* nil)
476 (defvar *bootstrapping-bool* nil)
477 ;;; basic operations in TRUTH & BOOL
478 ;;;-----------------------------------------------------------------------------
479 (defvar *bool-true* 'void)
480 (defvar *bool-true-meth* 'void)
481 (defvar *bool-false* 'void)
482 (defvar *bool-false-meth* 'void)
483 (defvar *bool-and* 'void)
484 (defvar *bool-or* 'void)
485 (defvar *bool-not* 'void)
486 (defvar *sort-membership* 'void)
487 (defvar *bool-if* 'void)
488 (defvar *bool-imply* 'void)
489 (defvar *bool-xor* 'void)
490 (defvar *bool-equal* 'void)
491 (defvar *bool-match* 'void)
492 (defvar *beh-equal* 'void)
493 (defvar *bool-nonequal* 'void)
494 (defvar *beh-eq-pred* 'void)
495 (defvar *bool-and-also* 'void)
496 (defvar *bool-or-else* 'void)
497 (defvar *bool-iff* 'void)
498 (defvar *bool-cond-op* 'void)
499 (defvar *eql-op* 'void)
500 (defvar *m-and-op* nil)
501 (defvar *m-or-op* nil)
502
503 ;;; RWL
504 ;;;-----------------------------------------------------------------------------
505 (defvar *rwl-module* 'void)
506 (defvar *rwl-nat-star-sort* 'void)
507 (defvar *rwl-predicate* 'void)
508 (defvar *rwl-predicate2* 'void)
509
510 ;;; search command related
511 (defvar .rwl-sch-context. nil)
512 (defvar .rwl-context-stack. nil)
513 (declaim (type fixnum .rwl-states-so-far.))
514 (defvar .rwl-states-so-far. 0)
515 (defvar *rwl-search-no-state-report* nil)
516
517 ;;; basic operations in IDENTICAL.
518 ;;;-----------------------------------------------------------------------------
519 (defvar *identical* 'void)
520 (defvar *nonidentical* 'void)
521
522 ;;; constructors for record, object, attribute list.
523 ;;;-----------------------------------------------------------------------------
524 (defvar *attribute-constructor* nil)
525 (defvar *attribute-list-constructor* nil)
526 (defvar *attribute-list-aux-variable* nil)
527 (defvar *object-reference-method* nil)
528 (defvar *object-constructor-method* nil)
529 (defvar *object-constructor-op* nil)
530 (defvar *record-constructor-method* nil)
531 (defvar *record-constructor-op* nil)
532 (defvar *void-object* nil)
533 (defvar *void-record* nil)
534
535 ;;; ***************
536 ;;; READER & PARSER_____________________________________________________________
537 ;;; ***************
538
539 (declaim (special *parse-variables*
540 *fill-rc-attribute*
541 *lhs-attrid-vars*
542 *parsing-axiom-lhs*
543 *parse-lhs-attr-vars*)) ; binds variables during a parsing
544 ; process.
545 (declaim (special *reader-schema-env* ; current schema.
546 *reader-input* ; current token sequence.
547 ))
548
549 (declaim (special *macroexpand*)) ; expand macro if t
550
551 (defvar *fill-rc-attribute* nil) ; a flag, t if requires generalizing the
552 ; pattern of record/object terms.
553
554 (defvar *parsing-axiom-lhs* nil)
555 (defvar *parse-lhs-attr-vars* nil)
556 (defvar *lhs-attrid-vars* nil)
557 ;;;
558 (defparameter .lisp-start-symbol. #\#)
559 (defvar *parse-variables* nil)
560 (defconstant parser-min-precedence 0)
561 (defconstant parser-max-precedence 127)
562 (defvar *reader-schema-env* nil)
563 (defvar *reader-current-schema* nil)
564 (defvar *reader-current-context* nil)
565 (defvar *reader-starting-position* nil)
566 (defvar *builtin-ast-dict* (make-hash-table :test #'equal))
567 ;;;
568 (defvar *parse-normalize* nil)
569 ;;; if t, expand macros at parsing time.
570 ;;;
571 (defvar *macroexpand* t)
572
573 ;;; *********
574 ;;; MISC VARS___________________________________________________________________
575 ;;; *********
576
577 ;;; *INCLUDE-BOOL*
578 (defvar *include-bool* t)
579 (defvar *include-bool-save*)
580 ;;; *INCLUDE-RWTL"
581 (defvar *include-rwl* t)
582 ;;; *INCLUDE-FOPL*
583 (defvar *include-fopl* t)
584 ;;;
585 (defvar *compile-lisp-rhs* t)
586 (defvar *running-with-tk* nil)
587 (defvar *sub-prompt* nil)
588 (defvar *no-prompt* nil)
589 (defvar *consider-object* nil)
590 (defvar *auto-reconstruct* nil)
591
592 ;;; *SAVE-DEFINITION*
593 (defvar *save-definition* t)
594
595 ;;; *MODMORPH-NEW-MODULE*
596 (declaim (special *modmorph-new-module*))
597 (defvar *modmorph-new-module* nil)
598
599 ;;; TIMEZOE
600 (defvar *time-zone* -9)
601
602 ;;; if true, top level command interpreter accept terms in current context
603 ;;; and evaluate (reduce) it.
604 (defvar *allow-general-term-input* t)
605
606 ;;; LIBRARY PATH
607 (defvar *chaos-libpath* nil)
608 ;;;
609 (declaim (special *beh-proof-in-progress*))
610 (defvar *beh-proof-in-progress* nil)
611
612 ;;; USER DEFINED BOOL
613 (defvar *user-bool* nil)
614
615 ;;; TRAM
616 (defvar *tram-path* "tram")
617 (defvar *tram-options* "")
618 (defvar *tram-builtin-modules*)
619 (defvar *tram-bool-modules*)
620
621 ;;; EXEC
622 (declaim (type fixnum *cexec-limit*))
623 (defvar *cexec-limit* most-positive-fixnum)
624 (declaim (type (or null (not null)) *cexec-trace* *cexec-normalize*))
625 (defvar *cexec-trace* nil)
626 (defvar *cexec-normalize* t)
627 (defvar *cexec-find-all-solutions* t)
628
629 ;;; BUTILTIN
630 (defvar *compile-builtin-axiom* nil)
631 (defvar *bi-universal-operators* nil)
632
633 ;;; OPEN/CLOSE WORLD -- not used.
634 ;;; (declaim (special *closed-world*))
635 ;; (defvar *closed-world* nil)
636
637 ;;; ALLOW-UNIVERSAL-SORT
638 ;;; t iff user refers to universal sorts,
639 ;;; i.e., Universal, HUniversal, and Cosmos
640 ;;;
641 (defvar *allow-universal-sort* nil)
642
643 ;;; AUTOLOAD
644 (defvar *autoload-alist* nil)
645
646 ;;; PARSER SETTINGS
647 (defvar *select-ambig-term* nil)
648
649 ;;; if true accept system's congruency proof of operator =*=
650 (defvar *accept-system-proof* nil)
651
652 ;;; find command control
653 (defvar *find-all-rules* nil)
654
655 ;;; DEVELOPMENT MODE
656 (defvar *development-mode* nil)
657
658 ;;; NO ID COMPLETION
659 (defvar *no-id-completion* nil)
660
661 ;;; DEBUG FLAGS
662 (defvar *rewrite-debug* nil)
663 (defvar *on-term-hash-debug* nil)
664 (defvar *on-axiom-debug* nil)
665 (defvar *beh-debug* nil)
666 (defvar *gen-rule-debug* nil)
667 (defvar *on-change-debug* nil)
668 (defvar *on-operator-debug* nil)
669 (defvar *on-sort-debug* nil)
670 (defvar *on-trs-debug* nil)
671 (defvar *on-import-debug* nil)
672 (defvar *on-modexp-debug* nil)
673 (defvar *on-view-debug* nil)
674 (defvar *match-debug* nil)
675 (defvar *module-dep-debug* nil)
676 (defvar *term-debug* nil)
677 (defvar *on-parse-debug* nil)
678 (defvar *regularize-debug* nil)
679 (defvar *on-tram-debug* nil)
680 (defvar *mel-debug* nil)
681 (defvar *check-import-mode* nil)
682 (defvar *cexec-debug* nil)
683 (defvar *debug-meta* nil)
684 (defvar *debug-citp* nil)
685 (defvar *debug-print* nil)
686 (defvar *debug-bterm* nil)
687 ;;;
688 ;;; ** TO DO for other platforms
689 #+SBCL
690 (proclaim '(SB-EXT:DISABLE-PACKAGE-LOCKS 'SB-INT:TOPLEVEL-CATCHER))
691
692 (defvar *top-level-tag*
693 #+KCL si::*quit-tag*
694 #+CMU 'common-lisp::top-level-catcher
695 #+EXCL 'top-level::top-level-break-loop
696 #+(or LUCID :CCL) '(*quit-tag*)
697 #+CLISP 'system::debug
698 #+SBCL 'SB-INT:TOPLEVEL-CATCHER)
699
700 ;;; EOF