• 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
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Compilation-database
            • Printer
            • Output-files
            • Abstract-syntax-operations
            • Implementation-environments
              • Ienv
                • Ienvp
                • Ienv-fix
                • Make-ienv
                • Ienv->short-bytes
                  • Ienv->llong-bytes
                  • Ienv-equiv
                  • Ienv->long-bytes
                  • Ienv->int-bytes
                  • Ienv->plain-char-signedp
                  • Change-ienv
                  • Ienv->version
                • Ldm-ienv
                • Ienv-ushort-rangep
                • Ienv-ulong-rangep
                • Ienv-ullong-rangep
                • Ienv-uchar-rangep
                • Ienv-sshort-rangep
                • Ienv-slong-rangep
                • Ienv-sllong-rangep
                • Ienv-sint-rangep
                • Ienv-schar-rangep
                • Ienv-uint-rangep
                • Ienv-char-rangep
                • Ienv->uchar-max
                • Ienv->schar-min
                • Ienv->schar-max
                • Ienv->ushort-max
                • Ienv->ulong-max
                • Ienv->ullong-max
                • Ienv->sshort-max
                • Ienv->slong-max
                • Ienv->sllong-max
                • Ienv->uint-max
                • Ienv->sint-max
                • Ienv->sshort-min
                • Ienv->slong-min
                • Ienv->sllong-min
                • Ienv->sint-min
                • Ienv->char-min
                • Ienv->char-max
                • Ienv->std
                • Ienv->gcc
                • Ienv-default
              • Abstract-syntax
              • Concrete-syntax
              • Disambiguation
              • Validation
              • Gcc-builtins
              • Preprocessing
              • Parsing
            • Atc
            • 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
    • Ienv

    Ienv->short-bytes

    Get the short-bytes field from a ienv.

    Signature
    (ienv->short-bytes x) → short-bytes
    Arguments
    x — Guard (ienvp x).
    Returns
    short-bytes — Type (posp short-bytes).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: ienv->short-bytes$inline

    (defun ienv->short-bytes$inline (x)
      (declare (xargs :guard (ienvp x)))
      (declare (xargs :guard t))
      (mbe :logic
           (b* ((x (and t x))
                (version (c::version-fix (cdr (std::da-nth 0 x))))
                (short-bytes (pos-fix (cdr (std::da-nth 1 x))))
                (int-bytes (pos-fix (cdr (std::da-nth 2 x))))
                (long-bytes (pos-fix (cdr (std::da-nth 3 x))))
                (llong-bytes (pos-fix (cdr (std::da-nth 4 x))))
                (plain-char-signedp (bool-fix (cdr (std::da-nth 5 x)))))
             (if (and (<= short-bytes int-bytes)
                      (<= int-bytes long-bytes)
                      (<= long-bytes llong-bytes)
                      (<= 2 short-bytes)
                      (<= 2 int-bytes)
                      (<= 4 long-bytes)
                      (<= 8 llong-bytes))
                 short-bytes
               2))
           :exec (cdr (std::da-nth 1 x))))

    Theorem: posp-of-ienv->short-bytes

    (defthm posp-of-ienv->short-bytes
      (b* ((short-bytes (ienv->short-bytes$inline x)))
        (posp short-bytes))
      :rule-classes :rewrite)

    Theorem: ienv->short-bytes$inline-of-ienv-fix-x

    (defthm ienv->short-bytes$inline-of-ienv-fix-x
      (equal (ienv->short-bytes$inline (ienv-fix x))
             (ienv->short-bytes$inline x)))

    Theorem: ienv->short-bytes$inline-ienv-equiv-congruence-on-x

    (defthm ienv->short-bytes$inline-ienv-equiv-congruence-on-x
      (implies (ienv-equiv x x-equiv)
               (equal (ienv->short-bytes$inline x)
                      (ienv->short-bytes$inline x-equiv)))
      :rule-classes :congruence)