• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
        • Syntax-for-tools
        • Atc
        • Language
        • Transformation-tools
          • Simpadd0
            • Simpadd0-implementation
              • Simpadd0-event-generation
              • Simpadd0-process-inputs-and-gen-everything
              • Simpadd0-fn
              • Simpadd0-input-processing
                • Simpadd0-process-inputs
                • Simpadd0-macro-definition
              • Simpadd0-expr-option
              • Simpadd0-structdeclor-list
              • Simpadd0-structdecl-list
              • Simpadd0-spec/qual-list
              • Simpadd0-param-declon-list
              • Simpadd0-initdeclor-list
              • Simpadd0-dirabsdeclor-option
              • Simpadd0-dirabsdeclor
              • Simpadd0-desiniter-list
              • Simpadd0-absdeclor-option
              • Simpadd0-struni-spec
              • Simpadd0-structdeclor
              • Simpadd0-structdecl
              • Simpadd0-statassert
              • Simpadd0-spec/qual
              • Simpadd0-param-declor
              • Simpadd0-param-declon
              • Simpadd0-member-designor
              • Simpadd0-initer-option
              • Simpadd0-initdeclor
              • Simpadd0-genassoc-list
              • Simpadd0-genassoc
              • Simpadd0-expr
              • Simpadd0-enumspec
              • Simpadd0-enumer-list
              • Simpadd0-dirdeclor
              • Simpadd0-desiniter
              • Simpadd0-designor-list
              • Simpadd0-designor
              • Simpadd0-declor-option
              • Simpadd0-decl-spec-list
              • Simpadd0-decl-spec
              • Simpadd0-decl-list
              • Simpadd0-const-expr-option
              • Simpadd0-const-expr
              • Simpadd0-block-item-list
              • Simpadd0-align-spec
              • Simpadd0-absdeclor
              • Simpadd0-type-spec
              • Simpadd0-tyname
              • Simpadd0-stmt
              • Simpadd0-label
              • Simpadd0-initer
              • Simpadd0-expr-list
              • Simpadd0-enumer
              • Simpadd0-declor
              • Simpadd0-decl
              • Simpadd0-block-item
            • Splitgso
            • Constant-propagation
            • Specialize
            • Split-fn
            • Split-fn-when
            • Copy-fn
            • Split-all-gso
            • Rename
            • Utilities
          • Representation
          • Insertion-sort
          • Pack
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Riscv
        • Ethereum
        • Taspi
        • Bitcoin
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • 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
    • Simpadd0-input-processing

    Simpadd0-process-inputs

    Process all the inputs.

    Signature
    (simpadd0-process-inputs const-old const-new wrld) 
      → 
    (mv erp code-old const-new$)
    Arguments
    wrld — Guard (plist-worldp wrld).
    Returns
    code-old — Type (code-ensemblep code-old).
    const-new$ — Type (symbolp const-new$).

    Definitions and Theorems

    Function: simpadd0-process-inputs

    (defun simpadd0-process-inputs (const-old const-new wrld)
     (declare (xargs :guard (plist-worldp wrld)))
     (let ((__function__ 'simpadd0-process-inputs))
      (declare (ignorable __function__))
      (b*
       (((reterr) (irr-code-ensemble) nil)
        ((unless (symbolp const-old))
         (reterr
          (msg
           "The first input must be a symbol, ~
                          but it is ~x0 instead."
           const-old)))
        ((unless (symbolp const-new))
         (reterr
          (msg
           "The second input must be a symbol, ~
                          but it is ~x0 instead."
           const-new)))
        ((unless (constant-symbolp const-old wrld))
         (reterr
          (msg
           "The first input, ~x0, must be a named constant, ~
                          but it is not."
           const-old)))
        (code-old (constant-value const-old wrld))
        ((unless (code-ensemblep code-old))
         (reterr
          (msg
           "The value of the constant ~x0 ~
                          must be a code ensemble, ~
                          but it is ~x1 instead."
           const-old code-old)))
        ((unless (code-ensemble-unambp code-old))
         (reterr
          (msg
           "The code ensemble ~x0 ~
                          that is the value of the constant ~x1 ~
                          must be unambiguous, ~
                          but it is not."
           code-old const-old)))
        ((unless (code-ensemble-annop code-old))
         (reterr
          (msg
           "The code ensemble ~x0 ~
                          that is the value of the constant ~x1 ~
                          must contains validation information, ~
                          but it does not."
           code-old const-old))))
       (retok code-old const-new))))

    Theorem: code-ensemblep-of-simpadd0-process-inputs.code-old

    (defthm code-ensemblep-of-simpadd0-process-inputs.code-old
      (b* (((mv acl2::?erp ?code-old ?const-new$)
            (simpadd0-process-inputs const-old const-new wrld)))
        (code-ensemblep code-old))
      :rule-classes :rewrite)

    Theorem: symbolp-of-simpadd0-process-inputs.const-new$

    (defthm symbolp-of-simpadd0-process-inputs.const-new$
      (b* (((mv acl2::?erp ?code-old ?const-new$)
            (simpadd0-process-inputs const-old const-new wrld)))
        (symbolp const-new$))
      :rule-classes :rewrite)

    Theorem: code-ensemble-unambp-of-simpadd0-process-inputs

    (defthm code-ensemble-unambp-of-simpadd0-process-inputs
      (b* (((mv acl2::?erp ?code-old ?const-new$)
            (simpadd0-process-inputs const-old const-new wrld)))
        (implies (not erp)
                 (code-ensemble-unambp code-old))))

    Theorem: code-ensemble-annop-of-simpadd0-process-inputs

    (defthm code-ensemble-annop-of-simpadd0-process-inputs
      (b* (((mv acl2::?erp ?code-old ?const-new$)
            (simpadd0-process-inputs const-old const-new wrld)))
        (implies (not erp)
                 (code-ensemble-annop code-old))))