• 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
        • 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
  • Kestrel-books
  • Projects

C

An ACL2 library for C.

This library contains:

  • A formalization of (a subset of) the C language. This is a deep embedding of C in ACL2.
  • A representation of (a subset of) the C language constructs in ACL2. This is a shallow embedding of C in ACL2.
  • A proof-generating C code generator for ACL2. This recognizes, and translates to C, the shallowly embedded ACL2 representation of C constructs, and generates proofs based on the deep embedding.
  • A tool-oriented syntax of C.

The library is work in progress.

This library is based on:

  • ISO/IEC 9899:2024, i.e. the C23 standard.
  • ISO/IEC 9899:2018, i.e. the C17 standard.
  • The GCC Manual for the current development.

In the documentation of this library, these source are referenced as `[C23]', `[C17]', and `[GCC]; sections are referenced by appending their designations separated by colon, e.g. `[C17:6.2.6]' references Section 6.2.6 of [C17]; paragraphs are referenced by further appending their numbers separated by slash, e.g. `[C17:6.2.5/2]' references Paragraph 2 of Section 6.2.5 of [C17]. These square-bracketed references may be used as nouns or parenthetically. In the case of [GCC], we also give URL links, which, given their form, may be useful to locate documentation that has moved or otherwise changed, given that [GCC] is a live document; an example is [GCC:6], which currently refers to Section 6, titled `Extensions to the C Language Family', and whose URL includes C-Extensions.html.

Although GCC provides extensions to the ISO/IEC standard, they are sufficiently prevalent and important that we need to take them into account for our library of C to be of practical use. But in the documentation of this ACL2 library, we always clearly distinguish between standard C and GCC extensions.

Subtopics

Syntax-for-tools
A syntax of C for use by tools.
Atc
ATC (ACL2 To C), a proof-generating C code generator for ACL2.
Language
A formal model of (a subset of) the C language.
Representation
A representation of C in ACL2.
Transformation-tools
Transformation tools for C.
Insertion-sort
A generic insert sort based on ACL2's total order of values.
Pack
Build a symbol in the "C" package from a list of atoms.