• 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
          • Simplify-defun
          • Tailrec
          • Schemalg
          • Restrict
          • Expdata
          • Casesplit
          • Simplify-term
          • Simplify-defun-sk
          • Parteval
            • Parteval-implementation
              • Parteval-event-generation
                • Parteval-gen-everything
                • Parteval-gen-new-fn
                • Parteval-gen-old-to-new-thm-instances
                • Parteval-gen-old-to-new-thm
                • Parteval-gen-new-fn-verify-guards
                • Parteval-gen-new-fn-body
                • Parteval-transform-rec-args
                  • Parteval-transform-rec-calls-in-term
                  • Parteval-gen-static-equalities
                • Parteval-fn
                • Parteval-input-processing
                • Parteval-macro-definition
            • 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
    • Parteval-event-generation

    Parteval-transform-rec-args

    Transform the arguments of a recursive call of old.

    Signature
    (parteval-transform-rec-args rec-args yj...ym rem-formals) 
      → 
    new-rec-args
    Arguments
    rec-args — Arguments of a recursive call of old.
        Guard (pseudo-term-listp rec-args).
    yj...ym — Guard (symbol-listp yj...ym).
    rem-formals — Formals that haven't been removed yet.
        Guard (symbol-listp rem-formals).
    Returns
    new-rec-args — A pseudo-term-listp.

    This applies to case 2 in the reference documentation. Each call of old is replaced with a call of new with the static arguments removed. This code performs the removal of these arguments.

    Definitions and Theorems

    Function: parteval-transform-rec-args

    (defun parteval-transform-rec-args (rec-args yj...ym rem-formals)
     (declare (xargs :guard (and (pseudo-term-listp rec-args)
                                 (symbol-listp yj...ym)
                                 (symbol-listp rem-formals))))
     (let ((__function__ 'parteval-transform-rec-args))
      (declare (ignorable __function__))
      (cond
       ((endp yj...ym) rec-args)
       (t
         (b* ((yj (car yj...ym))
              (pos (position-eq yj rem-formals))
              (rec-args (append (take pos rec-args)
                                (nthcdr (1+ pos) rec-args))))
           (parteval-transform-rec-args rec-args (cdr yj...ym)
                                        (remove-eq yj rem-formals)))))))