• 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
        • Atc
        • Transformation-tools
          • Simpadd0
          • 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
            • Process-const-old
              • Process-const-new
          • 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
    • Input-processing

    Process-const-old

    Process the :const-old input of a transformation.

    Signature
    (process-const-old const-old suppliedp wrld) 
      → 
    (mv erp code-old)
    Arguments
    suppliedp — Guard (booleanp suppliedp).
    wrld — Guard (plist-worldp wrld).
    Returns
    code-old — Type (code-ensemblep code-old).

    We check that the input was supplied and that it is a constant symbol whose value is an unambiguous annotate code ensemble. We return the code ensemble if successful.

    Definitions and Theorems

    Function: process-const-old

    (defun process-const-old (const-old suppliedp wrld)
     (declare (xargs :guard (and (booleanp suppliedp)
                                 (plist-worldp wrld))))
     (let ((__function__ 'process-const-old))
      (declare (ignorable __function__))
      (b*
       (((reterr) (irr-code-ensemble))
        ((unless suppliedp)
         (reterr (msg "The :CONST-OLD input must be supplied.")))
        ((unless (symbolp const-old))
         (reterr
          (msg
           "The :CONST-OLD must be a symbol, ~
                          but it is ~x0 instead."
           const-old)))
        ((unless (constant-symbolp const-old wrld))
         (reterr
          (msg
           "The :CONST-OLD 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))))

    Theorem: code-ensemblep-of-process-const-old.code-old

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

    Theorem: code-ensemble-unambp-of-process-const-old

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

    Theorem: code-ensemble-annop-of-process-const-old

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