• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
        • Soft
        • C
          • Syntax-for-tools
            • Disambiguator
            • Abstract-syntax
            • Parser
            • Validator
            • Printer
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Defpred
            • Output-files
            • Abstract-syntax-operations
            • Validation-information
            • 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
              • Ushort-rangep
              • Ullong-rangep
              • Sshort-rangep
              • Sllong-rangep
              • Ulong-rangep
              • Uint-rangep
              • Slong-rangep
              • Sint-rangep
              • Ushort-max
              • Ulong-max
              • Ullong-max
              • Uint-max
              • Uchar-rangep
              • Sshort-min
              • Sllong-min
              • Schar-rangep
              • Char-min
              • Char-max
              • Sshort-max
              • Slong-min
              • Slong-max
              • Sllong-max
              • Sint-min
              • Sint-max
              • Uchar-max
              • Schar-min
              • Schar-max
              • Ienv-default
            • Concrete-syntax
            • Unambiguity
            • Ascii-identifiers
            • Preprocessing
            • Abstraction-mapping
          • Atc
          • Language
          • Representation
          • Transformation-tools
          • Insertion-sort
          • Pack
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
        • Number-theory
        • Lists-light
        • Axe
        • Builtins
        • Solidity
        • Helpers
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Axe
      • Execloader
    • Math
    • Testing-utilities
  • Implementation-environments

Ienv

Fixtype of implementation environments.

This is a product type introduced by fty::defprod.

Fields
short-bytes — posp
int-bytes — posp
long-bytes — posp
llong-bytes — posp
plain-char-signedp — booleanp
Additional Requirements

The following invariant is enforced on the fields:

(and (<= short-bytes int-bytes) 
     (<= int-bytes long-bytes) 
     (<= long-bytes llong-bytes) 
     (<= 2 short-bytes) 
     (<= 4 int-bytes) 
     (<= 8 long-bytes) 
     (<= 8 llong-bytes)) 

For now we only need to capture certain characteristics of the integer types. We assume that bytes are 8 bits, that signed integers use two's complement, and that there are no padding bits or trap representations. Therefore, the characteristics of the integer types are mainly defined by four numbers, i.e. the numbers of bytes of (signed and unsigned) short, int, long, and long long. These correspond to the integer formats of our C formalization: see that topic for more information, also on the allowed ranges and relative constraints. We also need a flag saying whether the plain char type has the same range as signed char or not [C17:6.2.5/15]; if the flag is false, it has the same range as unsigned char.

Subtopics

Ienvp
Recognizer for ienv structures.
Ienv-fix
Fixing function for ienv structures.
Make-ienv
Basic constructor macro for ienv structures.
Ienv->short-bytes
Get the short-bytes field from a ienv.
Ienv->llong-bytes
Get the llong-bytes field from a ienv.
Ienv-equiv
Basic equivalence relation for ienv structures.
Ienv->long-bytes
Get the long-bytes field from a ienv.
Ienv->int-bytes
Get the int-bytes field from a ienv.
Ienv->plain-char-signedp
Get the plain-char-signedp field from a ienv.
Change-ienv
Modifying constructor for ienv structures.