• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Hons-and-memoization
      • Events
      • History
        • Pl
        • Command
        • Puff
        • Pc
        • Ld-history
        • Oops
        • Extend-pe-table
        • Ubt
        • Puff*
        • Ubi
        • Undo
        • Make-termination-theorem
        • Pe
          • Origin
          • Command-descriptor
          • Gthm
          • Reset-prehistory
          • Formula
          • Pr
          • Pcb
          • Ubu
          • Disable-ubt
          • Pl2
          • Enter-boot-strap-mode
          • Pbt
          • Reset-kill-ring
          • Ubt!
          • U
          • Tthm
          • Pf
          • Ubu!
          • Pr!
          • Pcs
          • Pcb!
          • Get-command-sequence
          • Exit-boot-strap-mode
          • Ubu?
          • Ubt?
          • Ep-
          • Ubt-prehistory
          • Tau-database
          • Ep
          • Pe!
        • Parallelism
        • Programming
        • Start-here
        • Real
        • Debugging
        • Miscellaneous
        • Output-controls
        • Macros
        • Interfacing-tools
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Pe

    Origin

    Returns a summary of where a logical-name originates from.

    Examples:

    (include-book "system/origin" :dir :system)
    
    ;; built-in names get a return value of :built-in
    (origin 'consp)    --> (value :built-in)
    (origin 'car-cons) --> (value :built-in)
    
    ;; include-book path is reported for events included from other books
    (origin 'xdoc::save) --> (value ("/home/jared/acl2/books/system/origin.lisp"
                                     "/home/jared/acl2/books/xdoc/top.lisp"))
    
    (origin 'lnfix) --> (value ("/home/jared/acl2/books/system/origin.lisp"
                                "/home/jared/acl2/books/xdoc/top.lisp"
                                "/home/jared/acl2/books/xdoc/base.lisp"))
    
    ;; some definitions are from the current session, e.g.:
    (defun f (x) x)
    (origin 'f)     --> (value :TOP-LEVEL)
    
    ;; bad names
    (mv-let (er val state)               ;; ((:er ("Not a logical name: ~x0"
            (origin 'not-defined-thing)  ;;        (#0 . NOT-DEFINED-THING))
     (mv (list :er er :val val)          ;;   :val nil)
         state))                         ;;  <state>)