• 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
          • Transformation-tools
            • Simpadd0
              • Simpadd0-dirdeclor
                • Simpadd0-implementation
                • Simpadd0-declor
                • Simpadd0-init-declor
                • Simpadd0-init-declor-list
                • Simpadd0-declon
                • Simpadd0-comp-stmt
                • Simpadd0-param-declor
                • Simpadd0-param-declon-list
                • Simpadd0-param-declon
                • Simpadd0-expr-option
                • Simpadd0-struct-declor-list
                • Simpadd0-struct-declon-list
                • Simpadd0-dirabsdeclor-option
                • Simpadd0-desiniter-list
                • Simpadd0-struni-spec
                • Simpadd0-struct-declor
                • Simpadd0-struct-declon
                • Simpadd0-statassert
                • Simpadd0-spec/qual-list
                • Simpadd0-spec/qual
                • Simpadd0-genassoc-list
                • Simpadd0-dirabsdeclor
                • Simpadd0-desiniter
                • Simpadd0-designor-list
                • Simpadd0-decl-spec-list
                • Simpadd0-const-expr-option
                • Simpadd0-align-spec
                • Simpadd0-absdeclor-option
                • Simpadd0-type-spec
                • Simpadd0-tyname
                • Simpadd0-member-designor
                • Simpadd0-initer-option
                • Simpadd0-initer
                • Simpadd0-genassoc
                • Simpadd0-expr-list
                • Simpadd0-enumer-list
                • Simpadd0-enumer
                • Simpadd0-enum-spec
                • Simpadd0-designor
                • Simpadd0-declor-option
                • Simpadd0-declon-list
                • Simpadd0-decl-spec
                • Simpadd0-const-expr
                • Simpadd0-block-item-list
                • Simpadd0-block-item
                • Simpadd0-absdeclor
                • Simpadd0-stmt
                • Simpadd0-label
                • Simpadd0-expr
              • Proof-generation
              • Split-gso
              • Wrap-fn
              • Constant-propagation
              • Specialize
              • Split-fn
              • Split-fn-when
              • Split-all-gso
              • Copy-fn
              • Variables-in-computation-states
              • Rename
              • Utilities
              • Proof-generation-theorems
              • Input-processing
            • 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
    • Simpadd0
    • Simpadd0-exprs/decls/stmts

    Simpadd0-dirdeclor

    Transform a direct declarator.

    Signature
    (simpadd0-dirdeclor dirdeclor fundefp gin) 
      → 
    (mv new-dirdeclor new-fundefp gout)
    Arguments
    dirdeclor — Guard (dirdeclorp dirdeclor).
    fundefp — Guard (booleanp fundefp).
    gin — Guard (ginp gin).
    Returns
    new-dirdeclor — Type (dirdeclorp new-dirdeclor).
    new-fundefp — Type (booleanp new-fundefp).
    gout — Type (goutp gout).

    The fundefp flag is set iff the direct declarator is (part of) the one of a function definition whose parameters have not been transformed yet; this function is only called by simpadd0-declor (see how the callers of simpadd0-declor set fundefp), and recursively by itself.

    The fundefp flag is just threaded through most recursively calls. For the :function-params kind of direct declarator, if fundefp is t, then the variable-type map resulting from transforming the parameter declarations is return as part of the gout of this ACL2 function, so that the extended map is available for the function's body. Additionally, in this case the fundefp result is nil, because the parameters of the function definition have been transformed and the variable-type map has been extended for the body. If instead the input fundefp is nil, the variable-type map resulting from the parameters is discarded and not returned as part of the gout.

    In the :function-names case, there is no extension of the variable-type map, but we set the fundefp output to nil.