• 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
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Compilation-database
            • Printer
            • Output-files
            • Abstract-syntax-operations
            • Implementation-environments
            • Abstract-syntax
            • Concrete-syntax
            • Disambiguation
            • Validation
              • Validator
                • Valid-exprs/decls/stmts
                • Valid-stmt
                • Valid-expr
                • Valid-dirdeclor
                • Valid-binary
                • Valid-type-spec
                • Valid-transunit
                • Valid-stor-spec-list
                • Valid-prototype-args
                • Valid-fundef
                • Valid-unary
                • Valid-init-declor
                • Valid-stringlit-list
                • Valid-type-spec-list-residual
                • Valid-transunit-ensemble
                • Valid-cond
                • Valid-lookup-ord
                • Valid-c-char
                • Valid-funcall
                • Valid-iconst
                • Valid-add-ord-objfuns-file-scope
                  • Valid-initer
                  • Valid-declor
                  • Valid-add-ord
                  • Valid-arrsub
                  • Valid-update-ext
                  • Valid-ext-declon-list
                  • Valid-ext-declon
                  • Valid-univ-char-name
                  • Valid-memberp
                  • Valid-add-ord-file-scope
                  • Valid-var
                  • Valid-s-char
                  • Valid-decl-spec
                  • Valid-cconst
                  • Valid-cast
                  • Valid-sizeof/alignof
                  • Valid-stringlit
                  • Valid-spec/qual
                  • Valid-oct-escape
                  • Valid-get-fresh-uid
                  • Valid-param-declon
                  • Valid-struct-declon
                  • Valid-struct-declor
                  • Valid-has-internalp
                  • Valid-escape
                  • Valid-enum-const
                  • Valid-gensel
                  • Valid-const
                  • Valid-desiniter-list
                  • Valid-designor
                  • Valid-param-declor
                  • Valid-dec/oct/hex-const
                  • Valid-s-char-list
                  • Valid-decl-spec-list
                  • Valid-c-char-list
                  • Valid-member
                  • Valid-init-table
                  • Valid-lookup-ord-file-scope
                  • Valid-comp-stmt
                  • Valid-spec/qual-list
                  • Valid-lookup-ext
                  • Valid-designor-list
                  • Valid-fconst
                  • Valid-block-item
                  • Valid-struct-declor-list
                  • Valid-genassoc-list
                  • Valid-align-spec
                  • Valid-enumer
                  • Valid-declon
                  • Valid-simple-escape
                  • Valid-enum-spec
                  • Valid-dirabsdeclor
                  • Valid-declor-option
                  • Valid-pop-scope
                  • Valid-initer-option
                  • Valid-expr-list
                  • Valid-block-item-list
                  • Valid-absdeclor
                  • Valid-struct-declon-list
                  • Valid-push-scope
                  • Valid-label
                  • Valid-genassoc
                  • Valid-tyname
                  • Valid-struni-spec
                  • Valid-dirabsdeclor-option
                  • Valid-const-expr
                  • Valid-init-declor-list
                  • Valid-absdeclor-option
                  • Valid-param-declon-list
                  • Valid-desiniter
                  • Valid-const-expr-option
                  • Valid-table-num-scopes
                  • Valid-expr-option
                  • Valid-statassert
                  • Valid-enumer-list
                  • Valid-member-designor
                  • Valid-declon-list
                  • Valid-empty-scope
                • Validation-information
              • Gcc-builtins
              • Preprocessing
              • Parsing
            • Atc
            • 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
    • Validator

    Valid-add-ord-objfuns-file-scope

    Add a list of ordinary identifiers corresponding to objects or functions to the file scope of a validation table.

    Signature
    (valid-add-ord-objfuns-file-scope 
         idents type linkage defstatus table) 
     
      → 
    new-table
    Arguments
    idents — Guard (ident-listp idents).
    type — Guard (typep type).
    linkage — Guard (linkagep linkage).
    defstatus — Guard (valid-defstatusp defstatus).
    table — Guard (valid-tablep table).
    Returns
    new-table — Type (valid-tablep new-table).

    See valid-add-ord-file-scope.

    Definitions and Theorems

    Function: valid-add-ord-objfuns-file-scope

    (defun valid-add-ord-objfuns-file-scope
           (idents type linkage defstatus table)
      (declare (xargs :guard (and (ident-listp idents)
                                  (typep type)
                                  (linkagep linkage)
                                  (valid-defstatusp defstatus)
                                  (valid-tablep table))))
      (b* (((when (endp idents))
            (valid-table-fix table))
           ((mv uid table)
            (valid-get-fresh-uid (first idents)
                                 linkage table)))
        (valid-add-ord-objfuns-file-scope
             (rest idents)
             type linkage defstatus
             (valid-add-ord-file-scope
                  (first idents)
                  (make-valid-ord-info-objfun :type type
                                              :linkage linkage
                                              :defstatus defstatus
                                              :uid uid)
                  table))))

    Theorem: valid-tablep-of-valid-add-ord-objfuns-file-scope

    (defthm valid-tablep-of-valid-add-ord-objfuns-file-scope
      (b* ((new-table (valid-add-ord-objfuns-file-scope
                           idents type linkage defstatus table)))
        (valid-tablep new-table))
      :rule-classes :rewrite)

    Theorem: valid-add-ord-objfuns-file-scope-of-ident-list-fix-idents

    (defthm valid-add-ord-objfuns-file-scope-of-ident-list-fix-idents
     (equal
         (valid-add-ord-objfuns-file-scope (ident-list-fix idents)
                                           type linkage defstatus table)
         (valid-add-ord-objfuns-file-scope
              idents type linkage defstatus table)))

    Theorem: valid-add-ord-objfuns-file-scope-ident-list-equiv-congruence-on-idents

    (defthm
     valid-add-ord-objfuns-file-scope-ident-list-equiv-congruence-on-idents
     (implies
      (ident-list-equiv idents idents-equiv)
      (equal
       (valid-add-ord-objfuns-file-scope
            idents type linkage defstatus table)
       (valid-add-ord-objfuns-file-scope idents-equiv
                                         type linkage defstatus table)))
     :rule-classes :congruence)

    Theorem: valid-add-ord-objfuns-file-scope-of-type-fix-type

    (defthm valid-add-ord-objfuns-file-scope-of-type-fix-type
      (equal (valid-add-ord-objfuns-file-scope idents (type-fix type)
                                               linkage defstatus table)
             (valid-add-ord-objfuns-file-scope
                  idents type linkage defstatus table)))

    Theorem: valid-add-ord-objfuns-file-scope-type-equiv-congruence-on-type

    (defthm
         valid-add-ord-objfuns-file-scope-type-equiv-congruence-on-type
      (implies (type-equiv type type-equiv)
               (equal (valid-add-ord-objfuns-file-scope
                           idents type linkage defstatus table)
                      (valid-add-ord-objfuns-file-scope
                           idents
                           type-equiv linkage defstatus table)))
      :rule-classes :congruence)

    Theorem: valid-add-ord-objfuns-file-scope-of-linkage-fix-linkage

    (defthm valid-add-ord-objfuns-file-scope-of-linkage-fix-linkage
      (equal (valid-add-ord-objfuns-file-scope
                  idents type (linkage-fix linkage)
                  defstatus table)
             (valid-add-ord-objfuns-file-scope
                  idents type linkage defstatus table)))

    Theorem: valid-add-ord-objfuns-file-scope-linkage-equiv-congruence-on-linkage

    (defthm
     valid-add-ord-objfuns-file-scope-linkage-equiv-congruence-on-linkage
     (implies (linkage-equiv linkage linkage-equiv)
              (equal (valid-add-ord-objfuns-file-scope
                          idents type linkage defstatus table)
                     (valid-add-ord-objfuns-file-scope
                          idents
                          type linkage-equiv defstatus table)))
     :rule-classes :congruence)

    Theorem: valid-add-ord-objfuns-file-scope-of-valid-defstatus-fix-defstatus

    (defthm
      valid-add-ord-objfuns-file-scope-of-valid-defstatus-fix-defstatus
      (equal (valid-add-ord-objfuns-file-scope
                  idents type
                  linkage (valid-defstatus-fix defstatus)
                  table)
             (valid-add-ord-objfuns-file-scope
                  idents type linkage defstatus table)))

    Theorem: valid-add-ord-objfuns-file-scope-valid-defstatus-equiv-congruence-on-defstatus

    (defthm
     valid-add-ord-objfuns-file-scope-valid-defstatus-equiv-congruence-on-defstatus
     (implies (valid-defstatus-equiv defstatus defstatus-equiv)
              (equal (valid-add-ord-objfuns-file-scope
                          idents type linkage defstatus table)
                     (valid-add-ord-objfuns-file-scope
                          idents
                          type linkage defstatus-equiv table)))
     :rule-classes :congruence)

    Theorem: valid-add-ord-objfuns-file-scope-of-valid-table-fix-table

    (defthm valid-add-ord-objfuns-file-scope-of-valid-table-fix-table
      (equal (valid-add-ord-objfuns-file-scope
                  idents type linkage
                  defstatus (valid-table-fix table))
             (valid-add-ord-objfuns-file-scope
                  idents type linkage defstatus table)))

    Theorem: valid-add-ord-objfuns-file-scope-valid-table-equiv-congruence-on-table

    (defthm
     valid-add-ord-objfuns-file-scope-valid-table-equiv-congruence-on-table
     (implies (valid-table-equiv table table-equiv)
              (equal (valid-add-ord-objfuns-file-scope
                          idents type linkage defstatus table)
                     (valid-add-ord-objfuns-file-scope
                          idents
                          type linkage defstatus table-equiv)))
     :rule-classes :congruence)