This file is indexed.

/usr/share/acl2-7.2dfsg/books/make-event/macros.lisp is in acl2-books-source 7.2dfsg-3.

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
; Copyright (C) 2013, Regents of the University of Texas
; Written by Matt Kaufmann
; License: A 3-clause BSD license.  See the LICENSE file distributed with ACL2.

; Here are some tests involving macros.  See macros-include.lisp for expected
; expansion results.  Each form below is labeled with its position [p] in the
; resulting expansion-alist.

(in-package "ACL2")

; [1]
(defmacro my-mac (x) x)

; [2]
(my-mac (make-event '(defun foo (x) x)))
; [3]
(my-mac (make-event '(defun foo (x) x)
                    :check-expansion t))

; The following fails during the include-book pass of certification because no
; expansion occurs (and my-mac is local):
; (my-mac (make-event '(defun foo (x) x) :check-expansion (defun foo (x) x)))

; Note that the final event stored has a filled-in :check-expansion field but
; stores the original event in the first argument of record-expansion.
; [4]
(encapsulate
 ((local-fn (x) t))
 (local (defun local-fn (x) x))
 (my-mac (make-event '(defun foo2 (x) x)
                     :check-expansion t)))

; The following encapsulate's expansion eliminates make-event from its
; sub-event, because the :check-expansion field is (by default) nil.
; [5]
(encapsulate
 ()
 (my-mac (make-event '(defun foo3 (x) x))))

; [6]
(set-enforce-redundancy t)

; Redundant with (identical to) command 3, and thus has identical expansion.
; [7]
(encapsulate
 ((local-fn (x) t))
 (local (defun local-fn (x) x))
 (my-mac (make-event '(defun foo2 (x) x)
                     :check-expansion t)))

; As above, just for emphasis:
; Redundant with (identical to) command 3, and thus has identical expansion.
; [8]
(encapsulate
 ((local-fn (x) t))
 (local (defun local-fn (x) x))
 (my-mac (make-event '(defun foo2 (x) x)
                     :check-expansion t)))

; Needed for definition of must-fail, used below:
; [9]
(include-book "misc/eval" :dir :system)

; Not redundant with command 3 (my-mac call is missing).
; [10]
(must-fail
 (encapsulate
  ((local-fn (x) t))
  (local (defun local-fn (x) x))
  (make-event '(defun foo2 (x) x)
              :check-expansion t)))

; Not redundant with command 3 (different :check-expansion).
; [11]
(must-fail
 (encapsulate
  ((local-fn (x) t))
  (local (defun local-fn (x) x))
  (my-mac (make-event '(defun foo2 (x) x)
                      :check-expansion
                      (defun foo2 (x) x)))))