• 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
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
          • Syntax-for-tools
          • Atc
            • Atc-implementation
              • Atc-abstract-syntax
              • Atc-pretty-printer
              • Atc-event-and-code-generation
              • Fty-pseudo-term-utilities
              • Atc-term-recognizers
                • Atc-stmt-noncval-termp
                • Atc-pure-c-valued-termp
                  • Atc-c-valued-termp
                  • Atc-boolean-termp
                  • *atc-op-type1-type2-fns*
                  • *atc-type1-from-type2-fns*
                  • *atc-type-base-const-fns*
                  • *atc-op-type-fns*
                  • *atc-boolean-from-type-fns*
                • Atc-input-processing
                • Atc-shallow-embedding
                • Atc-process-inputs-and-gen-everything
                • Atc-table
                • Atc-fn
                • Atc-pretty-printing-options
                • Atc-types
                • Atc-macro-definition
              • Atc-tutorial
            • Transformation-tools
            • Language
            • Representation
            • Insertion-sort
            • Pack
          • 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
    • Atc-term-recognizers

    Atc-pure-c-valued-termp

    Recognize pure expression terms returning C values terms.

    Signature
    (atc-pure-c-valued-termp term) → yes/no
    Arguments
    term — Guard (pseudo-termp term).
    Returns
    yes/no — Type (booleanp yes/no).

    We just check that the term is either a variable or a call of one of the functions listed in the user documentation for pure expression terms returning C values.

    Definitions and Theorems

    Function: atc-pure-c-valued-termp

    (defun atc-pure-c-valued-termp (term)
      (declare (xargs :guard (pseudo-termp term)))
      (let ((__function__ 'atc-pure-c-valued-termp))
        (declare (ignorable __function__))
        (b* (((when (variablep term)) t))
          (case-match term
            ((fn . &)
             (if (or (member-eq fn *atc-type-base-const-fns*)
                     (member-eq fn *atc-op-type-fns*)
                     (member-eq fn *atc-op-type1-type2-fns*)
                     (member-eq fn *atc-type1-from-type2-fns*)
                     (eq fn 'uchar-array-read-sint)
                     (eq fn 'sint-from-boolean)
                     (eq fn 'condexpr))
                 t
               nil))
            (& nil)))))

    Theorem: booleanp-of-atc-pure-c-valued-termp

    (defthm booleanp-of-atc-pure-c-valued-termp
      (b* ((yes/no (atc-pure-c-valued-termp term)))
        (booleanp yes/no))
      :rule-classes :rewrite)