File: package.lsp

package info (click to toggle)
acl2 8.6%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,138,276 kB
  • sloc: lisp: 17,818,294; java: 125,359; python: 28,122; javascript: 23,458; cpp: 18,851; ansic: 11,569; perl: 7,678; xml: 5,591; sh: 3,978; makefile: 3,840; ruby: 2,633; yacc: 1,126; ml: 763; awk: 295; csh: 233; lex: 197; php: 178; tcl: 49; asm: 23; haskell: 17
file content (603 lines) | stat: -rw-r--r-- 14,261 bytes parent folder | download | duplicates (2)
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
(acl2::in-package "ACL2")

; The following comment line tells the build system that if *acl2-exports*
; changes, then every book that uses this file should be recertified:
; (depends-on "build/acl2-exports.certdep" :dir :system)

(include-book "data-structures/portcullis" :dir :system)
(include-book "coi/symbol-fns/portcullis" :dir :system)

; Put any symbols we want exported to other packages here. This allows
; us to export symbols in the ACL2S package, such as functions defined
; in utilities.lisp to DEFDATA, CGEN, etc.
(defpkg "ACL2S-SHARED"
  (append
   '(pkgp
     fix-sym
     gen-sym-pkg
     eqlable-2-alistp
     make-symbl
     rquotep
     rfquotep
     unrquote-lst
     rquote-listp
     unrquote-lst
     def-const
     cw?
     ecw
     ecw?
     ; => I really want this to be undefined since we define it to
     ; mean implies
     _ ;range
     comment
     get-alist
     )
   (union-eq *acl2-exports*
             *common-lisp-symbols-from-main-lisp-package*)))

#!ACL2S-SHARED
(defconst *acl2s-shared-exports* 
  (append
   '(pkgp
     fix-sym
     gen-sym-pkg
     eqlable-2-alistp
     make-symbl
     rquotep
     rfquotep
     unrquote-lst
     rquote-listp
     unrquote-lst
     def-const
     cw?
     ecw
     ecw?
     => ;sig
     _ ;range
     comment
     get-alist
     )
   (union-eq *acl2-exports*
             *common-lisp-symbols-from-main-lisp-package*)))

(defpkg "DEFDATA"
  (append 
   '(value legal-constantp er-let* b* legal-variablep
     legal-variable-or-constant-namep
     macroexpand1 trans-eval simple-translate-and-eval
     f-boundp-global f-get-global f-put-global
     |1+F| |1-F| +f -f
     defxdoc current-acl2-world e/d unsigned-byte-p
     fquotep ffn-symb flambdap fargs
     template-subst
     with-time-limit

     error warning warning! observation prove
     proof-builder event history summary proof-tree
     form

     ;more acl2 exports
     aconsp
     
     mget g mset s wf-keyp recordp good-map msets msets-macro

     ;; fix-pkg ; Matt K. mod: now in acl2::*acl2-exports*
     fix-sym
     fix-intern$
     fix-intern-in-pkg-of-sym
     pack-to-string
     gen-sym-sym-fn
     gen-sym-sym
     packn1
     
     defdata-subtype defdata-disjoint defdata-equal
     defdatas-subtype defdatas-disjoint defdatas-equal

     defdata-subtype-strict defdata-disjoint-strict defdata-equal-strict
     defdatas-subtype-strict defdatas-disjoint-strict defdatas-equal-strict

     defdata-alias
     defdata defdata-attach ;long names -- just put them as ACL2 symbols.

     stage
     ;community books
     u::defloop def-ruleset

     )
   
   acl2s-shared::*acl2s-shared-exports*))

#!DEFDATA
(defconst *defdata-exports* 
  '(is-subtype 
    is-disjoint 
    
    
    ;; misc exports: (n-x and finxlst-x added by harshrc)
    oneof anyof
    split switch
    
    listof alistof enum range record map
    _ ;for range

    ;; function/macro exports:
    register-data-constructor 
    register-combinator
    register-type

    defdata-subtype defdata-disjoint defdata-equal
    defdatas-subtype defdatas-disjoint defdatas-equal

    defdata-subtype-strict defdata-disjoint-strict defdata-equal-strict
    defdatas-subtype-strict defdatas-disjoint-strict defdatas-equal-strict
    
    defdata
    defdata-attach
    sig =>
    
    defdata-alias
    stage
    defdata-defaults-table

    infinite
    
    type-of-pred-aux
    type-of-pred
    enum-of-type
    trans1-cmp
    base-val-of-type
    type-of-type
    pred-of-type
    defdata-domain-size-fn
    defdata-domain-size
    defdata-base-val-of-type-fn
    defdata-base-val-of-type
    ))


(defpkg "CGEN"
  (union-eq
   '(value legal-constantp legal-variablep er-let* b* 
     legal-variable-or-constant-namep
     macroexpand1 trans-eval simple-translate-and-eval
     assert-event legal-variable-or-constant-namep
     f-boundp-global f-get-global f-put-global
     |1+F| |1-F| +f -f
     defxdoc current-acl2-world e/d 
     unsigned-byte-p
     defrec 
     variablep fquotep ffn-symb flambdap fargs

     error warning warning! observation prove
     proof-builder event history summary proof-tree
     form

     test? ;for acl2s-hooks query categorization
     
     acl2s-defaults acl2s-defaults-table
     with-time-limit     
     
     ; from community books
     u::defloop template-subst
     mget g mset s wf-keyp recordp good-map msets msets-macro

     stage

;; ;verbosity control 
;;      system-debug-flag inhibit-output-flag normal-output-flag
;;      verbose-flag verbose-stats-flag debug-flag

     )
   (union-eq
    defdata::*defdata-exports*
    (set-difference-eq
     acl2s-shared::*acl2s-shared-exports*
; Matt K. mod 12/20/2015: Avoid name conflict with macros defined in
; cgen/utilities.lisp.
     '(acl2::access acl2::change)))))

#!CGEN
(defconst *cgen-exports*
  '(;cgen
     ;API export
     test? prove/cgen
     stopping-condition
     define-rule
     set-cgen-guard-checking
     ))

(defpkg "ACL2S-INTERFACE-INTERNAL" *common-lisp-symbols-from-main-lisp-package*)

#!ACL2S-INTERFACE-INTERNAL
(acl2::defconst acl2::*acl2s-interface-exports*
  '( ;API export
    acl2s-compute
    acl2s-query
    acl2s-event
    acl2s-interface
    itest?-query
    ))

(defconst *ccg-exports*
  '(set-termination-method 
    get-termination-method
    set-ccg-time-limit get-ccg-time-limit
    set-ccg-print-proofs get-ccg-print-proofs
    set-ccg-inhibit-output-lst get-ccg-inhibit-output-lst
    set-ccg-hierarchy))


(defpkg "ACL2S"
  (union-eq
   '(defxdoc e/d er-let* b* value
      aconsp 
      mget g mset s wf-keyp recordp good-map msets msets-macro
      legal-variable-or-constant-namep
      legal-constantp
      legal-variablep
      legal-variable-or-constant-namep
      xdoc
      get-tau-runes
      arglist
      bash
      simp
      bash-term-to-dnf
      ?
      simp-pairs
      term
      dumb-negate-lit
      dumb-negate-lit-lst
      untranslate-lst
      all-vars-in-untranslated-term
      *nil*
      *t*
      variablep
      fn-symb
      fcons-term*
      fquotep
      ffn-symb
      fargn
      fcons-term*
      lambda$
      apply$
      collect$
      hints
      lemmas
      flatten
      impliez
      v

      _  ;range

      d< ; ordinals, orderings
      l<
      <<
      lexp
      o-p
      o^
      o+
      o<
      o*
      o+
      o-infp
      e0-ord-<
      e0-ordinalp
      llist
      llist-macro
      omega-term
      omega
      o-max
      natpart
      limitp
      olen
      ob+
      o-
      count1
      count2
      ob*
      ob^ 

      tshell-ensure
      tshell-call
      tshell-start
      tshell-run-background
      
      enable*
      disable*
      e/d*
      add-to-ruleset
      def-ruleset 
      def-ruleset!
      expand-ruleset
      get-ruleset
      ruleset
    
      test? ;for acl2s-hooks query categorization
      acl2s-defaults acl2s-defaults-table

      def-pattern-match-constructor
      pattern-match
      patbind-match
      patbind-when
      patbind-assocs
      patbind-the
      patbind-nths
      patbind-nths*
      patbind-fun
      patbind-ret
      patbind-wmv
      patbind-run-when
      
      clear-memo-table

      induction-machine
      
      begin-book
      rev ;why do we need to add this??
      with-time-limit
      rules
      warnings
      errors
      hint-events
      redundant
      splitter-rules
      system-attachments
      steps
      
;community books
      u::defloop def-ruleset
      must-fail ;from std/testing/eval
      must-succeed
      must-prove
      must-not-prove
      symbol-package-name-safe

      cons-size
      acl2s-size
      
      error warning warning! observation prove
      proof-builder event history summary proof-tree
      stage
      form
      formals

      defdata::get1
      defdata::cw?
      defdata::extract-keywords
      defdata::type-metadata-table 
      defdata::type-alias-table 
      defdata::pred-alias-table 
      defdata::deffilter
      defdata::remove1-assoc-eq-lst
      defdata::sym-aalistp
      defdata::sym-aalist
      
      read-run-time
      trans-eval
      cgen
      tests-and-calls

      ;; fix-pkg ; Matt K. mod: now in acl2::*acl2-exports*
      fix-sym
      fix-intern$
      fix-intern-in-pkg-of-sym
      pack-to-string
      gen-sym-sym-fn
      gen-sym-sym
      packn1
      
      flg
      sort
      guard-checking-on
      current-flg
      raw-mode-p

      acl2s
      acl2-sedan
      alist-keys
      alist-vals
      repeat
      
      )
   (union-eq
    (union-eq 
     *ccg-exports*
     ;;*ccg-valid-output-names*
     '(query basics performance build/refine size-change
      counter-example ccg ccg-xargs 
      *ccg-valid-output-names*))
    (union-eq
     defdata::*defdata-exports*
     (union-eq
      cgen::*cgen-exports*
      (union-eq
       acl2s-shared::*acl2s-shared-exports*
       *acl2s-interface-exports*))))))

#!ACL2S
(defconst *acl2s-exports*
  (union-eq
   defdata::*defdata-exports*
   (union-eq
    cgen::*cgen-exports*
    (union-eq
     acl2s-shared::*acl2s-shared-exports*
     '(acl2s-defaults
       acl2s-defaults-table
       ccg
       cgen
       stage
      
;defunc defaults
       defunc
       definec
       defintrange
       defnatrange
       set-defunc-termination-strictp set-defunc-function-contract-strictp set-defunc-body-contracts-strictp set-defunc-timeout
       get-defunc-timeout get-defunc-termination-strictp get-defunc-function-contract-strictp get-defunc-body-contracts-strictp
       )))))


(defpkg "ACL2S B" ; beginner
  (union-eq '(t nil 
              ;if ; see macro below
              equal
              
              ; + * unary-- unary-/ < ; see definitions below
              numerator denominator
              rationalp integerp

              consp cons ; car cdr

              cond ; macro: explain
              list ; macro: explain

              lambda
              let let* ; macro: explain

              quote

              symbolp symbol-name symbol-package-name
              ;stringp
              ;charp

              acl2s::check=

              and or iff implies not booleanp 
              ;+ * 
              / posp negp natp <= > >= zp - atom 
              ; true-listp 
              endp 
              ;caar cadr cdar cddr 
              ;caaar caadr cadar caddr cdaar cdadr cddar cdddr
              ;caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr
              ;cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr
              
              must-fail ;from std/testing/eval
              must-succeed
              must-prove
              must-not-prove
              symbol-package-name-safe
              with-time-limit
              
              stage
              form
     
              trace* trace$

              defthm thm defconst in-package defun table

              declare
              xargs
              acl2s::allp
              error warning warning! observation prove
              proof-builder event history summary proof-tree
              )
            (set-difference-eq
             (union-eq
              #!ACL2S
              '(nat string pos rational integer boolean all neg
                    acl2-number true-list char symbol)
              acl2s::*acl2s-exports*)
             #!ACL2'(if first rest second third fourth unary-- unary-/
              < + * len append app rev in remove-dups nth nthrest listp)
             )))


(defpkg "ACL2S BB" ; bare bones
  (union-eq '(t nil 
              ;if ; see macro below
              equal

              defun acl2s::defunc acl2s::definec;for function definitions
              acl2s::defintrange acl2s::defnatrange
              
              ; + * unary-- unary-/ < ;see definitions below
              numerator denominator
              rationalp integerp
              
              consp cons  

              cond ; macro: explain
              list ; harshrc [21st Aug 2012] commented out to allow (defdata list ...) below

              lambda
              let let* ; macro: explain

              quote

              symbolp symbol-name symbol-package-name
              ;stringp
              ;charp

              error warning warning! observation prove
              proof-builder event history summary proof-tree

              acl2s::check=
              
              with-time-limit
              stage
              form
              trace*
              )
            '()))


(defpkg "ACL2S T" ; Theorem Proving Beginner 
  (union-eq '(t nil 
              ;if ; see macro below
              equal

              
              ; + * unary-- unary-/ < ; see definitions below
              numerator denominator
              rationalp integerp

              cons car cdr consp 
              ;first  rest
              ;second third fourth fifth

              cond ; macro: explain
              list ; macro: explain

              lambda
              let let* ; macro: explain

              quote

              symbolp symbol-name symbol-package-name
              stringp
              charp

              error warning warning! observation prove
              proof-builder event history summary proof-tree

              acl2s::check=

              and or iff implies not booleanp 
              ; + * 
              / posp natp <= > >= zp - atom 
              true-listp endp 
              caar cadr cdar cddr 
              caaar caadr cadar caddr cdaar cdadr cddar cdddr
              caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr
              cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr
              
              stage
              form
              trace* trace$
              with-time-limit

              defthm thm defconst in-package defun table
              
              )
            (set-difference-eq
             (union-eq
              #!ACL2S
              '(nat string pos rational integer boolean all neg
                    acl2-number true-list char symbol)
              acl2s::*acl2s-exports*)
             #!ACL2'(if first rest second third fourth fifth unary-- unary-/
              < + * len append app rev in remove-dups nth nthcdr
              string-len)
             )))