• 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
            • Schemalg-implementation
              • Schemalg-event-generation
              • Schemalg-fn
              • Schemalg-macro-definition
              • Schemalg-input-processing
                • Schemalg-process-inputs
                • Schemalg-process-schema-inputs
                • Schemalg-process-divconq-list-0-1-2-inputs
                • Schemalg-process-divconq-oset-0-1-inputs
                • Schemalg-process-divconq-list-0-1-inputs
                • Schemalg-process-algo-name
                • Schemalg-process-oset-input
                • Schemalg-process-list-input
                • Schemalg-check-allowed-input
                • Schemalg-process-tail-output
                  • Schemalg-process-cdr-output
                  • Schemalg-process-spec-2-name
                  • Schemalg-process-spec-1-name
                  • Schemalg-process-spec-0-name
                  • Schemalg-process-equal-algo-name
                  • Schemalg-process-fvar-2-name
                  • Schemalg-process-fvar-1-name
                  • Schemalg-process-fvar-0-name
                  • Schemalg-process-schema
                  • Schemalg-process-algo-name-aux
                  • *schemalg-schemas*
              • Schemalg-divconq-oset-0-1
              • Schemalg-divconq-list-0-1
            • 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
    • Schemalg-input-processing

    Schemalg-process-tail-output

    Process the :tail-output input.

    Signature
    (schemalg-process-tail-output tail-output tail-output? 
                                  schema old x-x1...xn ctx state) 
     
      → 
    (mv erp y state)
    Arguments
    tail-output? — Guard (booleanp tail-output?).
    schema — Guard (keywordp schema).
    old — Guard (symbolp old).
    x-x1...xn — Guard (symbol-listp x-x1...xn).
    Returns
    y — Type (symbolp y).

    Definitions and Theorems

    Function: schemalg-process-tail-output

    (defun schemalg-process-tail-output
           (tail-output tail-output?
                        schema old x-x1...xn ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (booleanp tail-output?)
                                 (keywordp schema)
                                 (symbolp old)
                                 (symbol-listp x-x1...xn))))
     (let ((__function__ 'schemalg-process-tail-output))
      (declare (ignorable __function__))
      (b*
       ((schemas-allowed (list :divconq-oset-0-1))
        ((when (and tail-output?
                    (not (member-eq schema schemas-allowed))))
         (er-soft+
          ctx t nil
          "The :TAIL-OUTPUT input can be present only if ~
                       the :SCHEMA input is ~v0, but that input is ~x1 instead."
          schemas-allowed schema))
        (y (if (eq tail-output :auto)
               (intern-in-package-of-symbol "TAIL-OUTPUT" old)
             tail-output))
        ((er &)
         (ensure-value-is-legal-variable-name$
              y "The :TAIL-OUTPUT input" t nil))
        ((er &)
         (ensure-value-is-not-in-list$
              y x-x1...xn
              (msg "one of bound variables ~x0 of ~x1"
                   x-x1...xn old)
              "The :TAIL-OUTPUT input" t nil)))
       (value y))))

    Theorem: symbolp-of-schemalg-process-tail-output.y

    (defthm symbolp-of-schemalg-process-tail-output.y
      (b*
       (((mv ?erp ?y acl2::?state)
         (schemalg-process-tail-output tail-output tail-output?
                                       schema old x-x1...xn ctx state)))
       (symbolp y))
      :rule-classes :rewrite)