• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
        • Syntax-for-tools
        • Atc
        • Language
          • Abstract-syntax
            • Tyspecseq
            • Expr
            • Binop
            • Fileset
            • Obj-declor
            • Ident
            • Iconst
            • Obj-adeclor
            • Const
            • Fundef
            • Unop
            • File
              • File-fix
              • File-equiv
              • Make-file
              • File->declons
              • Change-file
              • Filep
            • Tag-declon
            • Fun-declor
            • Obj-declon
            • Iconst-length
            • Abstract-syntax-operations
            • Label
            • Struct-declon
            • Initer
            • Ext-declon
            • Fun-adeclor
            • Expr-option
            • Iconst-base
            • Initer-option
            • Iconst-option
            • Tyspecseq-option
            • Stmt-option
            • Scspecseq
            • Param-declon
            • Obj-declon-option
            • File-option
            • Tyname
            • Transunit
            • Fun-declon
            • Transunit-result
            • Param-declon-list
            • Struct-declon-list
            • Expr-list
            • Tyspecseq-list
            • Ident-set
            • Ident-list
            • Ext-declon-list
            • Unop-list
            • Tyname-list
            • Fundef-list
            • Fun-declon-list
            • Binop-list
            • Stmt-fixtypes
            • Expr-fixtypes
          • Integer-ranges
          • Implementation-environments
          • Dynamic-semantics
          • Static-semantics
          • Grammar
          • Integer-formats
          • Types
          • Portable-ascii-identifiers
          • Values
          • Integer-operations
          • Computation-states
          • Object-designators
          • Operations
          • Errors
          • Tag-environments
          • Function-environments
          • Character-sets
          • Flexible-array-member-removal
          • Arithmetic-operations
          • Pointer-operations
          • Bytes
          • Keywords
          • Real-operations
          • Array-operations
          • Scalar-operations
          • Structure-operations
        • Representation
        • Transformation-tools
        • Insertion-sort
        • Pack
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Bigmems
      • Builtins
      • Execloader
      • Aleo
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Abstract-syntax

File

Fixtype of files.

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

Fields
declons — ext-declon-list

The grammar in [C17] does not quite define files in the form we want here. The closest things are preprocessing files [C17:6.10/1] and translation units [C17:6.9/1]. However, the grammar rule for preprocessing files describes their content before preprocessing [C17:5.1.1.1/1] [C17:5.1.1.2/3], and the grammar rule for translation units describes their contents after preprocessing (which may involve copying contents of included files). As discussed in abstract-syntax, currently this abstract syntax captures construct both before and after preprocessing (although this will change, as explained in abstract-syntax).

We define a file as consisting of a list of external declarations. This is actually the same as a translation unit (see transunit), but we plan to extend and change this soon. We put the list into a one-field product fixtype so that in the future it may be easier to extend this fixtype.

Note that here by `file' we mean the content of a file, not the file as a full entity of the file system, which also includes a name and possibly other information. We plan to formalize this additional information separately.

Subtopics

File-fix
Fixing function for file structures.
File-equiv
Basic equivalence relation for file structures.
Make-file
Basic constructor macro for file structures.
File->declons
Get the declons field from a file.
Change-file
Modifying constructor for file structures.
Filep
Recognizer for file structures.