• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
        • Syntax-for-tools
          • Formalized-subset
          • Mapping-to-language-definition
          • Input-files
          • Compilation-database
          • Printer
          • Output-files
          • Abstract-syntax-operations
          • Implementation-environments
          • Abstract-syntax
          • Concrete-syntax
          • Disambiguation
            • Disambiguator
              • Dimb-exprs/decls/stmts
              • Dimb-make/adjust-expr-cast
              • Dimb-make/adjust-expr-binary
              • Dimb-params-to-names
              • Dimb-fundef
              • Dimb-cast/call-to-call
              • Dimb-transunit
              • Dimb-dirdeclor
              • Dimb-transunit-ensemble
              • Dimb-make/adjust-expr-unary
              • Dimb-expr
              • Dimb-amb-declor/absdeclor
              • Dimb-cast/call-to-cast
              • Dimb-cast/addsub-to-cast
              • Dimb-cast/addsub-to-addsub
              • Dimb-add-ident
              • Dimb-kind
              • Dimb-amb-expr/tyname
              • Dimb-ext-declon-list
                • Dimb-ext-declon
                • Dimb-cast/logand-to-logand
                • Dimb-cast/and-to-cast
                • Dimb-cast/mul-to-cast
                • Dimb-cast/logand-to-cast
                • Dimb-cast/mul-to-mul
                • Dimb-cast/and-to-and
                • Dimb-declor
                • Dimb-kind-option
                • Dimb-type-spec
                • Dimb-add-ident-objfun-file-scope
                • Dimb-make/adjust-expr-label-addr
                • Dimb-param-declor
                • Dimb-lookup-ident
                • Dimb-decl-spec
                • Dimb-add-idents-objfun
                • Dimb-add-ident-objfun
                • Dimb-param-declon
                • Dimb-amb-declon/stmt
                • Dimb-table
                • Dimb-pop-scope
                • Dimb-init-declor
                • Dimb-stmt
                • Dimb-push-scope
                • Dimb-comp-stmt
                • Dimb-declor-option
                • Dimb-enum-spec
                • Dimb-declon
                • Dimb-struct-declor
                • Dimb-scope
                • Dimb-init-declor-list
                • Dimb-decl-spec-list
                • Dimb-absdeclor
                • Dimb-dirabsdeclor
                • Dimb-align-spec
                • Dimb-struni-spec
                • Dimb-init-table
                • Dimb-spec/qual-list
                • Dimb-spec/qual
                • Irr-dimb-table
                • Irr-dimb-kind
                • Dimb-param-declon-list
                • Dimb-enumer-list
                • Dimb-enumer
                • Dimb-dirabsdeclor-option
                • Dimb-block-item
                • Dimb-struct-declor-list
                • Dimb-struct-declon-list
                • Dimb-struct-declon
                • Dimb-statassert
                • Dimb-label
                • Dimb-desiniter-list
                • Dimb-desiniter
                • Dimb-declon-list
                • Dimb-const-expr-option
                • Dimb-absdeclor-option
                • Dimb-member-designor
                • Dimb-initer-option
                • Dimb-genassoc-list
                • Dimb-genassoc
                • Dimb-expr-option
                • Dimb-expr-list
                • Dimb-designor-list
                • Dimb-designor
                • Dimb-const-expr
                • Dimb-block-item-list
                • Dimb-tyname
                • Dimb-initer
              • Unambiguity
            • Validation
            • Gcc-builtins
            • Preprocessing
            • Parsing
          • Atc
          • Transformation-tools
          • Language
          • Representation
          • Insertion-sort
          • Pack
        • Proof-checker-array
        • Soft
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Ethereum
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Disambiguator

    Dimb-ext-declon-list

    Disambiguate a list of external declarations.

    Signature
    (dimb-ext-declon-list edecls table gcc) 
      → 
    (mv erp new-edecls new-table)
    Arguments
    edecls — Guard (ext-declon-listp edecls).
    table — Guard (dimb-tablep table).
    gcc — Guard (booleanp gcc).
    Returns
    erp — Type (maybe-msgp erp).
    new-edecls — Type (ext-declon-listp new-edecls).
    new-table — Type (dimb-tablep new-table).

    Definitions and Theorems

    Function: dimb-ext-declon-list

    (defun dimb-ext-declon-list (edecls table gcc)
      (declare (xargs :guard (and (ext-declon-listp edecls)
                                  (dimb-tablep table)
                                  (booleanp gcc))))
      (let ((__function__ 'dimb-ext-declon-list))
        (declare (ignorable __function__))
        (b* (((reterr) nil (irr-dimb-table))
             ((when (endp edecls))
              (retok nil (dimb-table-fix table)))
             ((erp new-edecl table)
              (dimb-ext-declon (car edecls)
                               table gcc))
             ((erp new-edecls table)
              (dimb-ext-declon-list (cdr edecls)
                                    table gcc)))
          (retok (cons new-edecl new-edecls)
                 table))))

    Theorem: maybe-msgp-of-dimb-ext-declon-list.erp

    (defthm maybe-msgp-of-dimb-ext-declon-list.erp
      (b* (((mv acl2::?erp ?new-edecls ?new-table)
            (dimb-ext-declon-list edecls table gcc)))
        (maybe-msgp erp))
      :rule-classes :rewrite)

    Theorem: ext-declon-listp-of-dimb-ext-declon-list.new-edecls

    (defthm ext-declon-listp-of-dimb-ext-declon-list.new-edecls
      (b* (((mv acl2::?erp ?new-edecls ?new-table)
            (dimb-ext-declon-list edecls table gcc)))
        (ext-declon-listp new-edecls))
      :rule-classes :rewrite)

    Theorem: dimb-tablep-of-dimb-ext-declon-list.new-table

    (defthm dimb-tablep-of-dimb-ext-declon-list.new-table
      (b* (((mv acl2::?erp ?new-edecls ?new-table)
            (dimb-ext-declon-list edecls table gcc)))
        (dimb-tablep new-table))
      :rule-classes :rewrite)

    Theorem: ext-declon-list-unambp-of-dimb-ext-declon-list

    (defthm ext-declon-list-unambp-of-dimb-ext-declon-list
      (b* (((mv acl2::?erp ?new-edecls ?new-table)
            (dimb-ext-declon-list edecls table gcc)))
        (implies (not erp)
                 (ext-declon-list-unambp new-edecls))))

    Theorem: dimb-ext-declon-list-of-ext-declon-list-fix-edecls

    (defthm dimb-ext-declon-list-of-ext-declon-list-fix-edecls
      (equal (dimb-ext-declon-list (ext-declon-list-fix edecls)
                                   table gcc)
             (dimb-ext-declon-list edecls table gcc)))

    Theorem: dimb-ext-declon-list-ext-declon-list-equiv-congruence-on-edecls

    (defthm
        dimb-ext-declon-list-ext-declon-list-equiv-congruence-on-edecls
      (implies (ext-declon-list-equiv edecls edecls-equiv)
               (equal (dimb-ext-declon-list edecls table gcc)
                      (dimb-ext-declon-list edecls-equiv table gcc)))
      :rule-classes :congruence)

    Theorem: dimb-ext-declon-list-of-dimb-table-fix-table

    (defthm dimb-ext-declon-list-of-dimb-table-fix-table
      (equal (dimb-ext-declon-list edecls (dimb-table-fix table)
                                   gcc)
             (dimb-ext-declon-list edecls table gcc)))

    Theorem: dimb-ext-declon-list-dimb-table-equiv-congruence-on-table

    (defthm dimb-ext-declon-list-dimb-table-equiv-congruence-on-table
      (implies (dimb-table-equiv table table-equiv)
               (equal (dimb-ext-declon-list edecls table gcc)
                      (dimb-ext-declon-list edecls table-equiv gcc)))
      :rule-classes :congruence)

    Theorem: dimb-ext-declon-list-of-bool-fix-gcc

    (defthm dimb-ext-declon-list-of-bool-fix-gcc
      (equal (dimb-ext-declon-list edecls table (bool-fix gcc))
             (dimb-ext-declon-list edecls table gcc)))

    Theorem: dimb-ext-declon-list-iff-congruence-on-gcc

    (defthm dimb-ext-declon-list-iff-congruence-on-gcc
      (implies (iff gcc gcc-equiv)
               (equal (dimb-ext-declon-list edecls table gcc)
                      (dimb-ext-declon-list edecls table gcc-equiv)))
      :rule-classes :congruence)