• 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
            • Atc-implementation
              • Atc-abstract-syntax
              • Atc-pretty-printer
              • Atc-event-and-code-generation
                • Atc-symbolic-computation-states
                • Atc-symbolic-execution-rules
                • Atc-gen-ext-declon-lists
                • Atc-function-and-loop-generation
                  • Atc-gen-cfun-correct-thm
                  • Atc-typed-formals
                  • Atc-gen-outer-bindings-and-hyps
                  • Atc-gen-fundef
                  • Atc-gen-exec-stmt-while-for-loop
                  • Atc-gen-context-preamble
                  • Atc-gen-pop-frame-thm
                  • Atc-gen-loop-correct-thm
                  • Atc-gen-loop-body-correct-thm
                  • Atc-gen-init-scope-thms
                  • Atc-gen-fun-correct-thm
                  • Atc-gen-fn-result-thm
                  • Atc-gen-loop
                  • Atc-gen-loop-test-correct-thm
                  • Atc-check-guard-conjunct
                  • Atc-find-affected
                  • Atc-gen-cfun-final-compustate
                  • Atc-gen-init-inscope-auto
                  • Atc-gen-init-inscope-static
                  • Atc-gen-push-init-thm
                  • Atc-gen-loop-measure-fn
                  • Atc-gen-fun-endstate
                  • Atc-gen-loop-termination-thm
                  • Atc-gen-formal-thm
                  • Atc-gen-loop-final-compustate
                  • Atc-gen-loop-measure-thm
                  • Atc-gen-object-disjoint-hyps
                  • Atc-loop-body-term-subst
                  • Atc-gen-omap-update-formals
                  • Atc-gen-loop-tthm-formula
                  • Atc-gen-init-inscope
                  • Atc-gen-fn-def*
                  • Atc-gen-param-declon-list
                  • Atc-formal-affectablep
                  • Atc-gen-cfun-fun-env-thm
                  • Atc-gen-add-var-formals
                  • Atc-gen-cfun-fun-env-thm-name
                  • Atc-gen-fn-guard
                  • Atc-filter-exec-fun-args
                  • Atc-gen-context-preamble-aux-aux
                  • Atc-typed-formals-to-extobjs
                  • Atc-formal-affectable-listp
                • Atc-statement-generation
                • Atc-gen-fileset
                • Atc-gen-everything
                • Atc-gen-obj-declon
                • Atc-gen-fileset-event
                • Atc-tag-tables
                • Atc-expression-generation
                • Atc-generation-contexts
                • Atc-gen-wf-thm
                • Term-checkers-atc
                • Atc-variable-tables
                • Term-checkers-common
                • Atc-gen-init-fun-env-thm
                • Atc-gen-appconds
                • Read-write-variables
                • Atc-gen-thm-assert-events
                • Test*
                • Atc-gen-prog-const
                • Atc-gen-expr-bool
                • Atc-theorem-generation
                • Atc-tag-generation
                • Atc-gen-expr-pure
                • Atc-function-tables
                • Atc-object-tables
              • Fty-pseudo-term-utilities
              • Atc-term-recognizers
              • Atc-input-processing
              • Atc-shallow-embedding
              • Atc-process-inputs-and-gen-everything
              • Atc-table
              • Atc-fn
              • Atc-pretty-printing-options
              • Atc-types
              • Atc-macro-definition
            • Atc-tutorial
            • Pure-expression-execution
          • 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
  • Atc-event-and-code-generation

Atc-function-and-loop-generation

Generation of C functions and loops.

Subtopics

Atc-gen-cfun-correct-thm
Generate the correctness theorem for a C function.
Atc-typed-formals
Calculate the C types of the formal parameters of a target function.
Atc-gen-outer-bindings-and-hyps
Generate the outer bindings, pointer hypotheses, pointer substitutions, and lemma instantiation, for a correctness theorem.
Atc-gen-fundef
Generate a C function definition from a non-recursive ACL2 function, with accompanying theorems.
Atc-gen-exec-stmt-while-for-loop
Generate a version of exec-stmt-while specialized to the loop represented by fn.
Atc-gen-context-preamble
Generate a context preamble from the formals of a function.
Atc-gen-pop-frame-thm
Generate the theorem about popping the frame at the end of a function execution.
Atc-gen-loop-correct-thm
Generate the correctness theorem for a C loop.
Atc-gen-loop-body-correct-thm
Generate the correctness theorem for the body of a loop.
Atc-gen-init-scope-thms
Generate the theorems about the initial scope of a function execution.
Atc-gen-fun-correct-thm
Generate the correctness theorem for a C function.
Atc-gen-fn-result-thm
Generate the theorem about the result(s) of fn.
Atc-gen-loop
Generate a C loop from a recursive ACL2 function, with accompanying theorems.
Atc-gen-loop-test-correct-thm
Generate the correctness theorem for the test of a loop.
Atc-check-guard-conjunct
C type and argument derived from a guard conjunct, if any.
Atc-find-affected
Find the variables affected by a term.
Atc-gen-cfun-final-compustate
Generate a term representing the final computation state after the execution of a C function.
Atc-gen-init-inscope-auto
Generate the automatic storage scope of the initial symbol tale for a C function.
Atc-gen-init-inscope-static
Generate the static storage scope of the initial symbol table for a C function.
Atc-gen-push-init-thm
Generate the theorem about the initial computation state of a function execution.
Atc-gen-loop-measure-fn
Generate a measure function for a recursive target function.
Atc-gen-fun-endstate
Generate a term representing the ending computation state after the execution of a C function.
Atc-gen-loop-termination-thm
Generate the version of the termination theorem tailored to the limits and measure function.
Atc-gen-formal-thm
Generate the theorem about a formal parameter of a target function.
Atc-gen-loop-final-compustate
Generate a term representing the final computation state after the execution of a C loop.
Atc-gen-loop-measure-thm
Generate type prescription theorem asserting that the measure of the recursive function fn yields a natural number.
Atc-gen-object-disjoint-hyps
Generate hypotheses saying that the pointers designate disjoint objects.
Atc-loop-body-term-subst
In a term that represents the body of a loop, replace each recursive call with a term that returns the affected variables.
Atc-gen-omap-update-formals
Generate a term that is an omap::update nest for the formals of a function.
Atc-gen-loop-tthm-formula
Generate the formula for the loop termination theorem.
Atc-gen-init-inscope
Generate the initial symbol table for a C function.
Atc-gen-fn-def*
Generate a local theorem that defines fn using if*.
Atc-gen-param-declon-list
Generate a list of C parameter declarations from a list of ACL2 formal parameters.
Atc-formal-affectablep
Check if a formal parameter is a affectable.
Atc-gen-cfun-fun-env-thm
Generate the theorem saying that looking up a certain C function in the function environment yields the information for that function.
Atc-gen-add-var-formals
Generate a term that is an add-var nest for the formals of a function.
Atc-gen-cfun-fun-env-thm-name
Generate the name of the theorem saying that looking up a certain C function in the function environment yields the information for that function.
Atc-gen-fn-guard
Generate a local function for the guard of fn.
Atc-filter-exec-fun-args
Filter external objects out of the formals, for passing to exec-fun.
Atc-gen-context-preamble-aux-aux
Atc-typed-formals-to-extobjs
List of the formals of a function that represent external objects.
Atc-formal-affectable-listp
Lift atc-formal-affectablep to lists.