• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • 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
        • Make-event
        • Defmacro
        • Untranslate-patterns
        • Tc
        • Trans*
        • Macro-aliases-table
        • Macro-args
        • Defabbrev
        • User-defined-functions-table
        • Trans
        • Untranslate-for-execution
        • Add-macro-fn
        • Check-vars-not-free
        • Safe-mode
        • Macro-libraries
          • B*
          • Defunc
          • Fty
          • Apt
            • Simplify-defun
            • Isodata
              • Isodata-implementation
                • Isodata-event-generation
                • Isodata-fn
                • Isodata-input-processing
                  • Isodata-symbol-isomap-alistp
                  • Isodata-isomapp
                  • Isodata-pos-isomap-alistp
                  • Isodata-process-iso
                  • Isodata-process-inputs
                  • Isodata-process-arg/res-list-iso
                  • Isodata-process-isomaps
                  • Isodata-fresh-defiso-thm-names
                  • Isodata-process-arg/res-list
                  • Isodata-process-arg/res-list-iso-list
                  • Isodata-process-res
                    • Isodata-fresh-defiso-name-with-*s-suffix
                    • Isodata-process-newp-of-new-name
                    • Isodata-process-isomaps-ress
                    • Isodata-process-isomaps-args
                    • Isodata-process-arg/res-list-iso-add-ress
                    • Isodata-process-arg/res-list-iso-add-args
                    • Isodata-process-old
                    • Isodata-process-undefined
                    • Isodata-process-arg/res-list-aux
                    • Isodata-isomap-listp
                    • Isodata-fresh-defiso-name-with-*s-suffix-aux
                  • Isodata-macro-definition
              • Tailrec
              • Schemalg
              • Restrict
              • Expdata
              • Casesplit
              • Simplify-term
              • Simplify-defun-sk
              • Parteval
              • Solve
              • Wrap-output
              • Propagate-iso
              • Simplify
              • Finite-difference
              • Drop-irrelevant-params
              • Copy-function
              • Lift-iso
              • Rename-params
              • Utilities
              • Simplify-term-programmatic
              • Simplify-defun-sk-programmatic
              • Simplify-defun-programmatic
              • Simplify-defun+
              • Common-options
              • Common-concepts
            • Std/util
            • 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
          • 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
        • Mailing-lists
        • Interfacing-tools
      • Macro-libraries
        • B*
        • Defunc
        • Fty
        • Apt
          • Simplify-defun
          • Isodata
            • Isodata-implementation
              • Isodata-event-generation
              • Isodata-fn
              • Isodata-input-processing
                • Isodata-symbol-isomap-alistp
                • Isodata-isomapp
                • Isodata-pos-isomap-alistp
                • Isodata-process-iso
                • Isodata-process-inputs
                • Isodata-process-arg/res-list-iso
                • Isodata-process-isomaps
                • Isodata-fresh-defiso-thm-names
                • Isodata-process-arg/res-list
                • Isodata-process-arg/res-list-iso-list
                • Isodata-process-res
                  • Isodata-fresh-defiso-name-with-*s-suffix
                  • Isodata-process-newp-of-new-name
                  • Isodata-process-isomaps-ress
                  • Isodata-process-isomaps-args
                  • Isodata-process-arg/res-list-iso-add-ress
                  • Isodata-process-arg/res-list-iso-add-args
                  • Isodata-process-old
                  • Isodata-process-undefined
                  • Isodata-process-arg/res-list-aux
                  • Isodata-isomap-listp
                  • Isodata-fresh-defiso-name-with-*s-suffix-aux
                • Isodata-macro-definition
            • Tailrec
            • Schemalg
            • Restrict
            • Expdata
            • Casesplit
            • Simplify-term
            • Simplify-defun-sk
            • Parteval
            • Solve
            • Wrap-output
            • Propagate-iso
            • Simplify
            • Finite-difference
            • Drop-irrelevant-params
            • Copy-function
            • Lift-iso
            • Rename-params
            • Utilities
            • Simplify-term-programmatic
            • Simplify-defun-sk-programmatic
            • Simplify-defun-programmatic
            • Simplify-defun+
            • Common-options
            • Common-concepts
          • Std/util
          • 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
        • Interfacing-tools
        • Hardware-verification
        • Software-verification
        • Math
        • Testing-utilities
      • Isodata-input-processing

      Isodata-process-res

      Process a result specification in the isomap input.

      Signature
      (isodata-process-res res m err-msg-preamble ctx state) 
        → 
      (mv erp j state)
      Arguments
      m — Guard (posp m).
      err-msg-preamble — Guard (msgp err-msg-preamble).
      Returns
      j — Type (posp j).

      Recall that m is the number of results of old.

      We check that the result specification is a keyword :resultj, where j is a positive integer not exceeding m. We return j, if successful.

      If m is 1, we also accept the keyword :result, treating it the same as :result1.

      Definitions and Theorems

      Function: isodata-process-res

      (defun isodata-process-res (res m err-msg-preamble ctx state)
        (declare (xargs :stobjs (state)))
        (declare (xargs :guard (and (posp m) (msgp err-msg-preamble))))
        (let ((__function__ 'isodata-process-res))
          (declare (ignorable __function__))
          (b* ((err-msg (msg "~@0 But ~x1 is none of those."
                             err-msg-preamble res))
               ((unless (keywordp res))
                (er-soft+ ctx t 1 "~@0" err-msg))
               ((when (and (= m 1) (eq res :result)))
                (value 1))
               (name (symbol-name res))
               ((unless (and (> (length name) 6)
                             (equal (subseq name 0 6) "RESULT")))
                (er-soft+ ctx t 1 "~@0" err-msg))
               (j (str::strval (subseq name 6 (length name))))
               ((unless j)
                (er-soft+ ctx t 1 "~@0" err-msg))
               ((unless (and (<= 1 j) (<= j m)))
                (er-soft+ ctx t 1 "~@0" err-msg)))
            (value j))))

      Theorem: posp-of-isodata-process-res.j

      (defthm posp-of-isodata-process-res.j
        (b* (((mv ?erp ?j acl2::?state)
              (isodata-process-res res m err-msg-preamble ctx state)))
          (posp j))
        :rule-classes :rewrite)