• 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
            • Gcc-builtins
            • Preprocessing
              • Preprocessor
                • Preprocessor-states
                  • Ppstate
                  • Plexeme
                  • Pnumber
                  • Macro-info
                  • Macro-add
                  • Init-ppstate
                  • Plexeme-token/newline-p
                  • Newline
                  • Plexeme-option
                  • Macro-info-option
                  • Macro-table
                  • Plexeme+span
                  • Update-ppstate->lexemes-unread
                  • Update-ppstate->lexemes-read
                  • Update-ppstate->lexemes-length
                  • Update-ppstate->chars-unread
                  • Update-ppstate->chars-read
                  • Update-ppstate->version
                  • Update-ppstate->position
                  • Update-ppstate->macros
                    • Update-ppstate->chars-length
                    • Macro-lookup
                    • Update-ppstate->bytes
                    • Update-ppstate->size
                    • Plexeme-token/space-p
                    • Plexeme-tokenp
                    • Ppstate->gcc
                    • Plexeme-list-token/space-p
                    • Ppstate->size
                    • Ppstate->lexemes-unread
                    • Ppstate->lexemes-read
                    • Ppstate->lexemes-length
                    • Ppstate->chars-unread
                    • Ppstate->bytes
                    • Plexeme-list-token/newline-p
                    • Plexeme-list-not-token/newline-p
                    • Ident-macroinfo-alist
                    • Update-ppstate->lexeme
                    • Update-ppstate->char
                    • Ppstate->version
                    • Ppstate->macros
                    • Ppstate->chars-read
                    • Ppstate->chars-length
                    • Plexeme-list-tokenp
                    • Plexeme-list-not-tokenp
                    • Macro-table-init
                    • Ppstate->lexeme
                    • Ppstate->char
                    • Ppstate-fix
                    • Plexeme+span-list
                    • Plexeme-list
                    • Irr-pnumber
                    • Irr-plexeme
                    • Irr-macro-table
                    • Ppstate->position
                  • Pread-token/newline
                  • Pread-token
                  • Preprocessor-lexer
                  • Pproc-files
                  • Preprocessor-printer
                  • Pproc-file
                  • Filepath-plexeme-list-alist-to-filepath-filedata-map
                  • Filepath-plexeme-list-alist
                  • Preprocessor-reader
                  • Preprocessor-messages
                • External-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
    • Preprocessor-states

    Update-ppstate->macros

    Signature
    (update-ppstate->macros macros ppstate) → ppstate
    Arguments
    macros — Guard (macro-tablep macros).
    Returns
    ppstate — Type (ppstatep ppstate).

    Definitions and Theorems

    Function: update-ppstate->macros

    (defun update-ppstate->macros (macros ppstate)
      (declare (xargs :stobjs (ppstate)))
      (declare (xargs :guard (macro-tablep macros)))
      (b* ((ppstate (ppstate-fix ppstate)))
        (raw-update-ppstate->macros (macro-table-fix macros)
                                    ppstate)))

    Theorem: ppstatep-of-update-ppstate->macros

    (defthm ppstatep-of-update-ppstate->macros
      (b* ((ppstate (update-ppstate->macros macros ppstate)))
        (ppstatep ppstate))
      :rule-classes :rewrite)

    Theorem: update-ppstate->macros-of-macro-table-fix-macros

    (defthm update-ppstate->macros-of-macro-table-fix-macros
      (equal (update-ppstate->macros (macro-table-fix macros)
                                     ppstate)
             (update-ppstate->macros macros ppstate)))

    Theorem: update-ppstate->macros-macro-table-equiv-congruence-on-macros

    (defthm
          update-ppstate->macros-macro-table-equiv-congruence-on-macros
      (implies (macro-table-equiv macros macros-equiv)
               (equal (update-ppstate->macros macros ppstate)
                      (update-ppstate->macros macros-equiv ppstate)))
      :rule-classes :congruence)

    Theorem: update-ppstate->macros-of-ppstate-fix-ppstate

    (defthm update-ppstate->macros-of-ppstate-fix-ppstate
      (equal (update-ppstate->macros macros (ppstate-fix ppstate))
             (update-ppstate->macros macros ppstate)))

    Theorem: update-ppstate->macros-ppstate-equiv-congruence-on-ppstate

    (defthm update-ppstate->macros-ppstate-equiv-congruence-on-ppstate
      (implies (ppstate-equiv ppstate ppstate-equiv)
               (equal (update-ppstate->macros macros ppstate)
                      (update-ppstate->macros macros ppstate-equiv)))
      :rule-classes :congruence)