• 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
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • Interfacing-tools
        • Io
        • Defttag
        • Sys-call
        • Save-exec
        • Quicklisp
        • Std/io
        • Oslib
        • Bridge
        • Clex
        • Tshell
        • Unsound-eval
        • Hacker
          • In-raw-mode
          • Progn+subsume-ttags
          • Ensure-program-only
          • Progn+touchable
          • Ensure-special-raw-definition-flag
          • Progn=touchable
          • Progn+redef
          • Ensure-program-only-flag
          • Defun-bridge
            • Assert-program-mode
            • Assert-no-special-raw-definition
            • With-redef-allowed
            • With-raw-mode
            • With-touchable
          • ACL2s-interface
          • Startup-banner
          • Command-line
      • Interfacing-tools
        • Io
        • Defttag
        • Sys-call
        • Save-exec
        • Quicklisp
        • Std/io
        • Oslib
        • Bridge
        • Clex
        • Tshell
        • Unsound-eval
        • Hacker
          • In-raw-mode
          • Progn+subsume-ttags
          • Ensure-program-only
          • Progn+touchable
          • Ensure-special-raw-definition-flag
          • Progn=touchable
          • Progn+redef
          • Ensure-program-only-flag
          • Defun-bridge
            • Assert-program-mode
            • Assert-no-special-raw-definition
            • With-redef-allowed
            • With-raw-mode
            • With-touchable
          • ACL2s-interface
          • Startup-banner
          • Command-line
        • Hardware-verification
        • Software-verification
        • Math
        • Testing-utilities
      • Hacker

      Defun-bridge

      Define a function with a different low-level definition.

      General Form: 
      (defun-bridge name (formals) 
        [:doc doc-string] 
        [:loop-declare loop-decls] 
        :loop loop-body 
        [:raw-declare raw-decls] 
        :raw raw-body) 
      

      This is much like executing

      (defun name (formals) 
        doc-string 
        (declare (xargs :mode :program)) 
        loop-decls 
        loop-body) 
      

      in ACL2 and then

      (defun name (formals) 
        raw-decls 
        raw-body) 
      

      in raw Lisp, except that extra checks and bookkeeping make it safer than that. An active ttag is required to use this form (See defttag), because it can easily corrupt ACL2 or render it unsound.