• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
        • Defun
        • Verify-guards
        • Table
        • Mutual-recursion
        • Memoize
        • Make-event
        • Include-book
        • Encapsulate
        • Defun-sk
        • Defttag
        • Defstobj
        • Defpkg
        • Defattach
        • Defabsstobj
        • Defchoose
        • Progn
        • Verify-termination
        • Redundant-events
        • Defmacro
          • Prohibition-of-loop$-and-lambda$
          • Ignored-attachment
          • Defmac
          • Defmacro-untouchable
          • Defmacro+
            • Defmacro+-implementation
              • Defmacro+-extract-parents/short/long
              • Defmacro+-fn
                • Defmacro+-macro-definition
            • Defmacroq
          • Defconst
          • Skip-proofs
          • In-theory
          • Embedded-event-form
          • Value-triple
          • Comp
          • Local
          • Defthm
          • Progn!
          • Defevaluator
          • Theory-invariant
          • Assert-event
          • Defun-inline
          • Project-dir-alist
          • Partial-encapsulate
          • Define-trusted-clause-processor
          • Defproxy
          • Defexec
          • Defun-nx
          • Defthmg
          • Defpun
          • Defabbrev
          • Set-table-guard
          • Name
          • Defrec
          • Add-custom-keyword-hint
          • Regenerate-tau-database
          • Defcong
          • Deftheory
          • Defaxiom
          • Deftheory-static
          • Defund
          • Evisc-table
          • Verify-guards+
          • Logical-name
          • Profile
          • Defequiv
          • Defmacro-untouchable
          • Add-global-stobj
          • Defthmr
          • Defstub
          • Defrefinement
          • Deflabel
          • In-arithmetic-theory
          • Unmemoize
          • Defabsstobj-missing-events
          • Defthmd
          • Fake-event
          • Set-body
          • Defun-notinline
          • Functions-after
          • Macros-after
          • Dump-events
          • Defund-nx
          • Defun$
          • Remove-global-stobj
          • Remove-custom-keyword-hint
          • Dft
          • Defthy
          • Defund-notinline
          • Defnd
          • Defn
          • Defund-inline
          • Defmacro-last
        • Parallelism
        • History
        • Programming
        • Operational-semantics
        • Real
        • Start-here
        • Debugging
        • Miscellaneous
        • Output-controls
        • Macros
        • Interfacing-tools
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Defmacro+-implementation

    Defmacro+-fn

    Event generated by defmacro+.

    Definitions and Theorems

    Function: defmacro+-fn

    (defun defmacro+-fn (name args rest)
     (declare (xargs :guard (and (symbolp name) (true-listp rest))))
     (if
      (symbolp name)
      (mv-let (alist rest)
              (defmacro+-find-parents/short/long rest)
       (let ((parents-pair (assoc-eq :parents alist))
             (short-pair (assoc-eq :short alist))
             (long-pair (assoc-eq :long alist))
             (name-ref (concatenate 'string
                                    (symbol-package-name name)
                                    "::" (symbol-name name))))
        (cons
         'defsection
         (cons
          name
          (append
           (and parents-pair
                (list :parents (cdr parents-pair)))
           (append
            (and short-pair
                 (list :short (cdr short-pair)))
            (append
             (if long-pair
              (list
               :long (cons 'concatenate
                           (cons ''string
                                 (cons (cdr long-pair)
                                       (cons '"@(def "
                                             (cons name-ref '(")")))))))
              (list :long (cons 'concatenate
                                (cons ''string
                                      (cons '"@(def "
                                            (cons name-ref '(")")))))))
             (cons (cons 'defmacro
                         (cons name (cons args rest)))
                   'nil))))))))
      (er hard? 'defmacro+
          "The first argument ~x0 must be a symbol."
          name)))