• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
          • 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-process-old
                  • Isodata-fresh-defiso-name-with-*s-suffix
                  • Isodata-process-newp-of-new-name
                  • Isodata-process-undefined
                  • Isodata-symbol-isomap-alist-stobjp
                  • Isodata-pos-isomap-alist-stobjp
                  • Isodata-isomap-listp
                • Isodata-macro-definition
            • Simplify-defun
            • 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
          • Error-checking
          • Fty-extensions
          • Isar
          • Kestrel-utilities
          • Set
          • C
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Isodata-input-processing

    Isodata-process-arg/res-list

    Process an arg/res-list component of the isomaps input.

    Signature
    (isodata-process-arg/res-list arg/res-list k old$ ctx state) 
      → 
    (mv erp result state)
    Arguments
    arg/res-list — The arg/res-listk component of isomaps.
    k — The k in arg/res-listk.
        Guard (posp k).
    old$ — Guard (symbolp old$).
    Returns
    result — A tuple (args ress) satisfying (typed-tuplep symbol-listp pos-listp result).

    If the processing is successful, the args result is the list of arguments of old in arg/res-list, and the ress result is the list of 1-based indices of results of old in arg/res-list.

    Definitions and Theorems

    Function: isodata-process-arg/res-list-aux

    (defun isodata-process-arg/res-list-aux
           (arg/res-list x1...xn
                         m err-msg-preamble old$ ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (symbol-listp arg/res-list)
                                 (symbol-listp x1...xn)
                                 (posp m)
                                 (msgp err-msg-preamble)
                                 (symbolp old$))))
     (declare
       (xargs :guard (not (member-eq old$ acl2::*stobjs-out-invalid*))))
     (let ((__function__ 'isodata-process-arg/res-list-aux))
       (declare (ignorable __function__))
       (b* (((when (endp arg/res-list))
             (value (list nil nil)))
            (arg/res (car arg/res-list))
            ((when (member-eq arg/res x1...xn))
             (b* (((er (list args ress))
                   (isodata-process-arg/res-list-aux
                        (cdr arg/res-list)
                        x1...xn
                        m err-msg-preamble old$ ctx state)))
               (value (list (cons arg/res args) ress))))
            ((er j)
             (isodata-process-res arg/res
                                  m err-msg-preamble old$ ctx state))
            ((er (list args ress))
             (isodata-process-arg/res-list-aux
                  (cdr arg/res-list)
                  x1...xn
                  m err-msg-preamble old$ ctx state)))
         (value (list args (cons j ress))))))

    Function: isodata-process-arg/res-list

    (defun isodata-process-arg/res-list (arg/res-list k old$ ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (posp k) (symbolp old$))))
     (let ((__function__ 'isodata-process-arg/res-list))
      (declare (ignorable __function__))
      (b*
       ((wrld (w state))
        (x1...xn (formals old$ wrld))
        (stobjs-out (acl2::stobjs-out+ old$ wrld))
        (m (len stobjs-out))
        (err-msg-part
         (if
          (= m 1)
          (msg
           "must be either a formal argument of ~x0, ~
                                   or the keyword :RESULT, ~
                                   or the keyword :RESULT1."
           old$)
          (msg
           "must be either a formal argument of ~x0, ~
                                 or a keyword :RESULTj where j is ~
                                 a positive integer not exceeding ~
                                 the number of results ~x1 of ~x0."
           old$ m))))
       (if
        (and (atom arg/res-list)
             (not (null arg/res-list)))
        (if (member-eq arg/res-list x1...xn)
            (value (list (list arg/res-list) nil))
         (b*
          ((err-msg-preamble
            (msg
             "Since the ~n0 ARG/RES-LIST component ~
                                           of the second input ~
                                           is a non-NIL atom, it ~@1"
             (list k)
             err-msg-part))
           ((er j)
            (isodata-process-res arg/res-list
                                 m err-msg-preamble old$ ctx state)))
          (value (list nil (list j)))))
        (b*
         (((er &)
           (ensure-value-is-symbol-list$
            arg/res-list
            (msg
             "Since the ~n0 ARG/RES component of the second input ~
                              is not an atom, it"
             (list k))
            t nil))
          ((er &)
           (ensure-list-has-no-duplicates$
            arg/res-list
            (msg
             "The list ~x0 that is ~
                              the ~n1 ARG/RES-LIST component of the second input"
             arg/res-list (list k))
            t nil))
          (err-msg-preamble
           (msg
            "Each element ~
                                       of the ~n0 ARG/RES-LIST component ~
                                       of the second input ~
                                       ~@1"
            (list k)
            err-msg-part)))
         (isodata-process-arg/res-list-aux
              arg/res-list x1...xn
              m err-msg-preamble old$ ctx state))))))