• 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
          • Transformation-tools
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
              • Integer-format-templates
              • Ienv
              • Integer-formats
              • Ienv-ushort-rangep
              • Ienv-ulong-rangep
              • Ienv-ullong-rangep
              • Ienv-uint-rangep
              • Ienv-uchar-rangep
              • Ienv-sshort-rangep
              • Ienv-slong-rangep
              • Ienv-sllong-rangep
              • Ienv-sint-rangep
              • Ienv-schar-rangep
              • Ienv-char-rangep
              • Ienv->schar-min
              • Ienv->schar-max
              • Ienv->char-size
              • Ienv->char-min
              • Ienv->char-max
              • Ienv->uchar-max
              • Ienv->short-bit-size
              • Ienv->long-bit-size
              • Ienv->llong-bit-size
              • Ienv->int-bit-size
              • Ienv->short-byte-size
              • Ienv->long-byte-size
              • Ienv->llong-byte-size
              • Ienv->int-byte-size
              • Versions
              • Ienv->ushort-max
              • Ienv->ullong-max
              • Ienv->sshort-min
              • Ienv->sllong-min
              • Ienv->sllong-max
              • Ienv->bool-byte-size
              • Ienv->bool-bit-size
              • Ienv->ulong-max
              • Ienv->uint-max
              • Ienv->sshort-max
              • Ienv->slong-min
              • Ienv->slong-max
              • Ienv->sint-min
              • Ienv->sint-max
              • Schar-formats
              • Char-formats
              • Uchar-formats
              • Signed-formats
              • Bool-formats
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Types
            • Integer-formats-definitions
            • Computation-states
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Object-designators
            • Operations
            • Errors
            • Tag-environments
            • Function-environments
            • Character-sets
            • Flexible-array-member-removal
            • Arithmetic-operations
            • Pointer-operations
            • Real-operations
            • Array-operations
            • Scalar-operations
            • Structure-operations
          • 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
  • Language

Implementation-environments

Implementation environments for C.

Some aspects of the syntax and semantics of C are implementation-dependent. [C17:5] introduces the notion of translation and execution environments, which specify those aspects. In our formalization, we introduce a notion of implementation environment, which puts together the translation and execution environments in [C17]. That is, an implementation environment specifies the implementation-dependent aspects of C. We prefer to formalize one (implementation) environment, instead of two (translation and execution) environments, because the latter two share several aspects (e.g. integer sizes), and therefore it seems simpler to have one notion.

We start by capturing some aspects of the C implementation environment. More will be added in the future.

Initially, our formalization of implementation environments is not used in other parts of the C formalization; furthermore, it captures notions already captured elsewhere, such as the integer formats. But we plan to update the rest of the formalization to use this, also removing those then-redundant parts.

Subtopics

Integer-format-templates
Templates for formats of integer objects.
Ienv
Fixtype of implementation environments.
Integer-formats
Formats of integer objects.
Ienv-ushort-rangep
Check if an ACl2 integer is in the range of (i.e. representable in) type unsigned short.
Ienv-ulong-rangep
Check if an ACl2 integer is in the range of (i.e. representable in) type unsigned long.
Ienv-ullong-rangep
Check if an ACl2 integer is in the range of (i.e. representable in) type unsigned long long.
Ienv-uint-rangep
Check if an ACl2 integer is in the range of (i.e. representable in) type unsigned int.
Ienv-uchar-rangep
Check if an ACl2 integer is in the range of (i.e. representable in) type unsigned char.
Ienv-sshort-rangep
Check if an ACl2 integer is in the range of (i.e. representable in) type signed short.
Ienv-slong-rangep
Check if an ACl2 integer is in the range of (i.e. representable in) type signed long.
Ienv-sllong-rangep
Check if an ACl2 integer is in the range of (i.e. representable in) type signed long long.
Ienv-sint-rangep
Check if an ACl2 integer is in the range of (i.e. representable in) type signed int.
Ienv-schar-rangep
Check if an ACl2 integer is in the range of (i.e. representable in) type signed char.
Ienv-char-rangep
Check if an ACl2 integer is in the range of (i.e. representable in) type char.
Ienv->schar-min
The ACL2 integer value of SCHAR_MIN [C17:5.2.4.2.1/1].
Ienv->schar-max
The ACL2 integer value of SCHAR_MAX [C17:5.2.4.2.1/1].
Ienv->char-size
The ACL2 integer value of CHAR_BIT [C17:5.2.4.2.1/1].
Ienv->char-min
The ACL2 integer value of CHAR_MIN [C17:5.2.4.2.1/1].
Ienv->char-max
The ACL2 integer value of CHAR_MAX [C17:5.2.4.2.1/1].
Ienv->uchar-max
The ACL2 integer value of UCHAR_MAX [C17:5.2.4.2.1/1].
Ienv->short-bit-size
Number of bits of unsigned and signed short objects.
Ienv->long-bit-size
Number of bits of unsigned and signed long objects.
Ienv->llong-bit-size
Number of bits of unsigned and signed long long objects.
Ienv->int-bit-size
Number of bits of unsigned and signed int objects.
Ienv->short-byte-size
Number of bytes of unsigned and signed short objects.
Ienv->long-byte-size
Number of bytes of unsigned and signed long objects.
Ienv->llong-byte-size
Number of bytes of unsigned and signed long long objects.
Ienv->int-byte-size
Number of bytes of unsigned and signed int objects.
Versions
Versions of C.
Ienv->ushort-max
The ACL2 integer value of USHRT_MAX [C17:5.2.4.2.1].
Ienv->ullong-max
The ACL2 integer value of ULLONG_MAX [C17:5.2.4.2.1].
Ienv->sshort-min
The ACL2 integer value of SHRT_MIN [C17:5.2.4.2.1].
Ienv->sllong-min
The ACL2 integer value of LLONG_MIN [C17:5.2.4.2.1].
Ienv->sllong-max
The ACL2 integer value of LLONG_MAX [C17:5.2.4.2.1].
Ienv->bool-byte-size
Number of bytes of _Bool objects.
Ienv->bool-bit-size
Number of bits of _Bool objects.
Ienv->ulong-max
The ACL2 integer value of ULONG_MAX [C17:5.2.4.2.1].
Ienv->uint-max
The ACL2 integer value of UINT_MAX [C17:5.2.4.2.1].
Ienv->sshort-max
The ACL2 integer value of SHRT_MAX [C17:5.2.4.2.1].
Ienv->slong-min
The ACL2 integer value of LONG_MIN [C17:5.2.4.2.1].
Ienv->slong-max
The ACL2 integer value of LONG_MAX [C17:5.2.4.2.1].
Ienv->sint-min
The ACL2 integer value of INT_MIN [C17:5.2.4.2.1].
Ienv->sint-max
The ACL2 integer value of INT_MAX [C17:5.2.4.2.1].
Schar-formats
Formats of signed char objects.
Char-formats
Formats of (plain) char objects.
Uchar-formats
Formats of unsigned char objects.
Signed-formats
Formats of signed integers.
Bool-formats
Formats of _Bool objects.