• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
      • Apt
      • Std/util
        • Defprojection
        • Deflist
        • Defaggregate
        • Define
        • Defmapping
          • Defsurj
          • Defiso
          • Defmapping-implementation
            • Defmapping-event-generation
            • Defmapping-check-redundancy
            • Defmapping-table
            • Defmapping-fn
              • Defmapping-input-processing
              • Defmapping-macro-definition
            • Definj
          • Defenum
          • Add-io-pairs
          • Defalist
          • Defmapappend
          • Returns-specifiers
          • Defarbrec
          • Defines
          • Define-sk
          • Error-value-tuples
          • Defmax-nat
          • Defmin-int
          • Deftutorial
          • Extended-formals
          • Defrule
          • Defval
          • Defsurj
          • Defiso
          • Defconstrained-recognizer
          • Deffixer
          • Defmvtypes
          • Defconsts
          • Defthm-unsigned-byte-p
          • Support
          • Defthm-signed-byte-p
          • Defthm-natp
          • Defund-sk
          • Defmacro+
          • Defsum
          • Defthm-commutative
          • Definj
          • Defirrelevant
          • Defredundant
        • Defdata
        • Defrstobj
        • Seq
        • Match-tree
        • Defrstobj
        • With-supporters
        • Def-partial-measure
        • Template-subst
        • Soft
        • Defthm-domain
        • Event-macros
        • Def-universal-equiv
        • Def-saved-obligs
        • With-supporters-after
        • Definec
        • Sig
        • Outer-local
        • Data-structures
      • ACL2
        • Theories
        • Rule-classes
        • Proof-builder
        • Recursion-and-induction
        • Hons-and-memoization
        • Events
        • Parallelism
        • History
        • Programming
        • Operational-semantics
        • Real
        • Start-here
        • Miscellaneous
        • Output-controls
        • Bdd
        • Macros
          • Make-event
          • Defmacro
          • Untranslate-patterns
          • Tc
          • Trans*
          • Macro-aliases-table
          • Macro-args
          • Defabbrev
          • User-defined-functions-table
          • Trans
          • Untranslate-for-execution
          • Macro-libraries
            • B*
            • Defunc
            • Fty
            • Apt
            • Std/util
              • Defprojection
              • Deflist
              • Defaggregate
              • Define
              • Defmapping
                • Defsurj
                • Defiso
                • Defmapping-implementation
                  • Defmapping-event-generation
                  • Defmapping-check-redundancy
                  • Defmapping-table
                  • Defmapping-fn
                    • Defmapping-input-processing
                    • Defmapping-macro-definition
                  • Definj
                • Defenum
                • Add-io-pairs
                • Defalist
                • Defmapappend
                • Returns-specifiers
                • Defarbrec
                • Defines
                • Define-sk
                • Error-value-tuples
                • Defmax-nat
                • Defmin-int
                • Deftutorial
                • Extended-formals
                • Defrule
                • Defval
                • Defsurj
                • Defiso
                • Defconstrained-recognizer
                • Deffixer
                • Defmvtypes
                • Defconsts
                • Defthm-unsigned-byte-p
                • Support
                • Defthm-signed-byte-p
                • Defthm-natp
                • Defund-sk
                • Defmacro+
                • Defsum
                • Defthm-commutative
                • Definj
                • Defirrelevant
                • Defredundant
              • Defdata
              • Defrstobj
              • Seq
              • Match-tree
              • Defrstobj
              • With-supporters
              • Def-partial-measure
              • Template-subst
              • Soft
              • Defthm-domain
              • Event-macros
              • Def-universal-equiv
              • Def-saved-obligs
              • With-supporters-after
              • Definec
              • Sig
              • Outer-local
              • Data-structures
            • Add-macro-fn
            • Check-vars-not-free
            • Safe-mode
            • Trans1
            • Defmacro-untouchable
            • Set-duplicate-keys-action
            • Add-macro-alias
            • Magic-macroexpand
            • Defmacroq
            • Trans!
            • Remove-macro-fn
            • Remove-macro-alias
            • Add-binop
            • Untrans-table
            • Trans*-
            • Remove-binop
            • Tcp
            • Tca
          • Installation
          • Mailing-lists
        • Interfacing-tools
        • Hardware-verification
        • Software-verification
        • Math
        • Testing-utilities
      • Defmapping-implementation

      Defmapping-fn

      Check redundancy, process the inputs, and generate the event to submit.

      Signature
      (defmapping-fn name 
                     doma domb alpha beta beta-of-alpha-thm 
                     alpha-of-beta-thm guard-thms 
                     unconditional thm-names thm-enable 
                     hints print show-only call ctx state) 
       
        → 
      (mv erp event state)
      Arguments
      call — Guard (pseudo-event-formp call).
      Returns
      event — A pseudo-event-formp.

      Definitions and Theorems

      Function: defmapping-fn

      (defun defmapping-fn (name doma domb alpha beta beta-of-alpha-thm
                                 alpha-of-beta-thm guard-thms
                                 unconditional thm-names thm-enable
                                 hints print show-only call ctx state)
        (declare (xargs :stobjs (state)))
        (declare (xargs :guard (pseudo-event-formp call)))
        (let ((__function__ 'defmapping-fn))
          (declare (ignorable __function__))
          (b* (((er redundant?)
                (defmapping-check-redundancy
                     name print show-only call ctx state))
               ((when redundant?)
                (value '(value-triple :invisible)))
               ((er (list doma$ domb$ alpha$
                          beta$ thm-names$ thm-enable$ hints$))
                (defmapping-process-inputs
                     name
                     doma domb alpha beta beta-of-alpha-thm
                     alpha-of-beta-thm guard-thms
                     unconditional thm-names thm-enable
                     hints print show-only ctx state)))
            (defmapping-gen-everything name doma$ domb$ alpha$ beta$
                                       beta-of-alpha-thm alpha-of-beta-thm
                                       guard-thms unconditional
                                       thm-names$ thm-enable$ hints$
                                       print show-only call ctx state))))