• 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
          • Atc
          • Language
          • Representation
          • Transformation-tools
            • Simpadd0
            • Deftrans
            • Splitgso
            • Constant-propagation
              • Value-to-expr
              • Const-prop-eval-impure-binop-expr
              • Env
              • Const-prop-eval-pure-binop-expr
              • Const-prop-filepath-transunit-map
              • Const-prop-eval-unop-expr
              • Const-prop-transunit-ensemble
              • Const-prop-fundef
              • Value-result-to-option
              • Const-prop-extdecl-list
              • Const-prop-extdecl
              • Zero-valuep
              • Iconst-to-value
              • Const-to-value
              • Expr-to-ident
              • Const-prop-transunit
              • Pure-binopp
              • Const-prop-initdeclor-list
              • Const-prop-initdeclor
              • Const-prop-structdeclor-list
              • Const-prop-structdecl-list
              • Const-prop-param-declon-list
              • Const-prop-initer-option
              • Const-prop-initer
              • Const-prop-expr-option
              • Const-prop-dirabsdeclor-option
              • Const-prop-dirabsdeclor
              • Const-prop-const-expr-option
              • Const-prop-absdeclor-option
              • Const-prop-type-spec
              • Const-prop-strunispec
              • Const-prop-structdeclor
              • Const-prop-structdecl
              • Const-prop-statassert
              • Const-prop-spec/qual-list
              • Const-prop-spec/qual
              • Const-prop-param-declor
              • Const-prop-param-declon
              • Const-prop-member-designor
              • Const-prop-genassoc-list
              • Const-prop-genassoc
              • Const-prop-expr-list
              • Const-prop-expr
              • Const-prop-enumspec
              • Const-prop-enumer-list
              • Const-prop-dirdeclor
              • Const-prop-desiniter-list
              • Const-prop-desiniter
              • Const-prop-designor-list
              • Const-prop-designor
              • Const-prop-declor-option
              • Const-prop-decl-spec-list
              • Const-prop-decl-spec
              • Const-prop-decl-list
              • Const-prop-block-item-list
              • Const-prop-align-spec
              • Const-prop-absdeclor
              • Const-prop-tyname
              • Const-prop-stmt
              • Const-prop-label
              • Const-prop-enumer
              • Const-prop-declor
              • Const-prop-decl
              • Const-prop-const-expr
              • Const-prop-block-item
            • Split-fn
            • Copy-fn
            • Specialize
            • Split-all-gso
            • Rename
            • Utilities
          • 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
  • Transformation-tools

Constant-propagation

A C-to-C transformation to propagate constants.

This is a very preliminary transformation to propogate constants at the function level.

The transformation currently only folds integer constants.

Subtopics

Value-to-expr
Convert a c::value to an c$::expr.
Const-prop-eval-impure-binop-expr
Propogate a constant through an impure c$::binop.
Env
A C environment mapping identifiers to values.
Const-prop-eval-pure-binop-expr
Propogate a constant through a pure c$::binop.
Const-prop-filepath-transunit-map
Const-prop-eval-unop-expr
Propogate a constant through a c$::unop.
Const-prop-transunit-ensemble
Transform a translation unit ensemble.
Const-prop-fundef
Value-result-to-option
Convert a c::value-result to a c::value-option.
Const-prop-extdecl-list
Const-prop-extdecl
Zero-valuep
Recognize c::values which count as zero for the purpose of
Iconst-to-value
Convert an iconst to a c::value-option.
Const-to-value
Convert a c$::const to a c::value-option.
Expr-to-ident
Convert an c$::expr to an ident-option.
Const-prop-transunit
Pure-binopp
Recognizer pure c$::binops.
Const-prop-initdeclor-list
Propagate a constant through a c$::initdeclor-list.
Const-prop-initdeclor
Propagate a constant through a initdeclor.
Const-prop-structdeclor-list
Propagate a constant through a c$::structdeclor-list.
Const-prop-structdecl-list
Propagate a constant through a c$::structdecl-list.
Const-prop-param-declon-list
Propagate a constant through a c$::param-declon-list.
Const-prop-initer-option
Propagate a constant through a c$::initer-option.
Const-prop-initer
Propagate a constant through a c$::initer.
Const-prop-expr-option
Propagate a constant through a c$::expr-option.
Const-prop-dirabsdeclor-option
Propagate a constant through a c$::dirabsdeclor-option.
Const-prop-dirabsdeclor
Propagate a constant through a c$::dirabsdeclor.
Const-prop-const-expr-option
Propagate a constant through a c$::const-expr-option.
Const-prop-absdeclor-option
Propagate a constant through a c$::absdeclor-option.
Const-prop-type-spec
Propagate a constant through a c$::type-spec.
Const-prop-strunispec
Propagate a constant through a strunispec.
Const-prop-structdeclor
Propagate a constant through a structdeclor.
Const-prop-structdecl
Propagate a constant through a c$::structdecl.
Const-prop-statassert
Propagate a constant through a statassert.
Const-prop-spec/qual-list
Propagate a constant through a c$::spec/qual-list.
Const-prop-spec/qual
Propagate a constant through a c$::spec/qual.
Const-prop-param-declor
Propagate a constant through a c$::param-declor.
Const-prop-param-declon
Propagate a constant through a param-declon.
Const-prop-member-designor
Propagate a constant through a c$::member-designor.
Const-prop-genassoc-list
Propagate a constant through a c$::genassoc-list.
Const-prop-genassoc
Propagate a constant through a c$::genassoc.
Const-prop-expr-list
Propagate a constant through a c$::expr-list.
Const-prop-expr
Propogate a constant through an impure c$::expr.
Const-prop-enumspec
Propagate a constant through a enumspec.
Const-prop-enumer-list
Propagate a constant through a c$::enumer-list.
Const-prop-dirdeclor
Propagate a constant through a dirdeclor.
Const-prop-desiniter-list
Propagate a constant through a c$::desiniter-list.
Const-prop-desiniter
Propagate a constant through a desiniter.
Const-prop-designor-list
Propagate a constant through a c$::designor-list.
Const-prop-designor
Propagate a constant through a c$::designor.
Const-prop-declor-option
Propagate a constant through a c$::declor-option.
Const-prop-decl-spec-list
Propagate a constant through a c$::decl-spec-list.
Const-prop-decl-spec
Propagate a constant through a c$::decl-spec.
Const-prop-decl-list
Propagate a constant through a c$::decl-list.
Const-prop-block-item-list
Propagate a constant through a c$::block-item-list.
Const-prop-align-spec
Propagate a constant through a c$::align-spec.
Const-prop-absdeclor
Propagate a constant through a absdeclor.
Const-prop-tyname
Propagate a constant through a tyname.
Const-prop-stmt
Propagate a constant through a c$::stmt.
Const-prop-label
Propagate a constant through a c$::label.
Const-prop-enumer
Propagate a constant through a enumer.
Const-prop-declor
Propagate a constant through a declor.
Const-prop-decl
Propagate a constant through a decl.
Const-prop-const-expr
Propagate a constant through a const-expr.
Const-prop-block-item
Propagate a constant through a c$::block-item.