• 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
              • 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
    • Implementation-environments

    Ienv->std

    Numeric version of the C standard (regardless of GCC extensions).

    Signature
    (ienv->std ienv) → number
    Arguments
    ienv — Guard (ienvp ienv).
    Returns
    number — Type (posp number).

    Definitions and Theorems

    Function: ienv->std

    (defun ienv->std (ienv)
      (declare (xargs :guard (ienvp ienv)))
      (b* (((ienv ienv) ienv))
        (cond ((c::version-std-c17p ienv.version) 17)
              ((c::version-std-c23p ienv.version)
               23))))

    Theorem: posp-of-ienv->std

    (defthm posp-of-ienv->std
      (b* ((number (ienv->std ienv)))
        (posp number))
      :rule-classes :rewrite)

    Theorem: ienv->std-of-ienv-fix-ienv

    (defthm ienv->std-of-ienv-fix-ienv
      (equal (ienv->std (ienv-fix ienv))
             (ienv->std ienv)))

    Theorem: ienv->std-ienv-equiv-congruence-on-ienv

    (defthm ienv->std-ienv-equiv-congruence-on-ienv
      (implies (ienv-equiv ienv ienv-equiv)
               (equal (ienv->std ienv)
                      (ienv->std ienv-equiv)))
      :rule-classes :congruence)