• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Lexer
          • Vl-loadstate
          • Parser
          • Vl-load-merge-descriptions
          • Scope-of-defines
          • Vl-load-file
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-loadresult
            • Vl-loadresult-fix
              • Vl-loadresult-equiv
              • Make-vl-loadresult
              • Vl-loadresult->filemap
              • Vl-loadresult->design
              • Vl-loadresult->defines
              • Change-vl-loadresult
              • Vl-loadresult-p
            • Vl-read-file
            • Vl-find-basename/extension
            • Vl-find-file
            • Vl-read-files
            • Extended-characters
            • Vl-load
            • Vl-load-main
            • Vl-load-description
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-load-descriptions
            • Vl-load-files
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-descriptionlist
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-loadresult

    Vl-loadresult-fix

    Fixing function for vl-loadresult structures.

    Signature
    (vl-loadresult-fix x) → new-x
    Arguments
    x — Guard (vl-loadresult-p x).
    Returns
    new-x — Type (vl-loadresult-p new-x).

    Definitions and Theorems

    Function: vl-loadresult-fix$inline

    (defun vl-loadresult-fix$inline (x)
     (declare (xargs :guard (vl-loadresult-p x)))
     (let ((__function__ 'vl-loadresult-fix))
      (declare (ignorable __function__))
      (mbe
          :logic
          (b* ((design (vl-design-fix (cdr (std::da-nth 0 (cdr x)))))
               (filemap (vl-filemap-fix (cdr (std::da-nth 1 (cdr x)))))
               (defines (vl-defines-fix (cdr (std::da-nth 2 (cdr x))))
    ))
            (cons :vl-loadresult (list (cons 'design design)
                                       (cons 'filemap filemap)
                                       (cons 'defines defines))))
          :exec x)))

    Theorem: vl-loadresult-p-of-vl-loadresult-fix

    (defthm vl-loadresult-p-of-vl-loadresult-fix
      (b* ((new-x (vl-loadresult-fix$inline x)))
        (vl-loadresult-p new-x))
      :rule-classes :rewrite)

    Theorem: vl-loadresult-fix-when-vl-loadresult-p

    (defthm vl-loadresult-fix-when-vl-loadresult-p
      (implies (vl-loadresult-p x)
               (equal (vl-loadresult-fix x) x)))

    Function: vl-loadresult-equiv$inline

    (defun vl-loadresult-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (vl-loadresult-p acl2::x)
                                  (vl-loadresult-p acl2::y))))
      (equal (vl-loadresult-fix acl2::x)
             (vl-loadresult-fix acl2::y)))

    Theorem: vl-loadresult-equiv-is-an-equivalence

    (defthm vl-loadresult-equiv-is-an-equivalence
      (and (booleanp (vl-loadresult-equiv x y))
           (vl-loadresult-equiv x x)
           (implies (vl-loadresult-equiv x y)
                    (vl-loadresult-equiv y x))
           (implies (and (vl-loadresult-equiv x y)
                         (vl-loadresult-equiv y z))
                    (vl-loadresult-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: vl-loadresult-equiv-implies-equal-vl-loadresult-fix-1

    (defthm vl-loadresult-equiv-implies-equal-vl-loadresult-fix-1
      (implies (vl-loadresult-equiv acl2::x x-equiv)
               (equal (vl-loadresult-fix acl2::x)
                      (vl-loadresult-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: vl-loadresult-fix-under-vl-loadresult-equiv

    (defthm vl-loadresult-fix-under-vl-loadresult-equiv
      (vl-loadresult-equiv (vl-loadresult-fix acl2::x)
                           acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-vl-loadresult-fix-1-forward-to-vl-loadresult-equiv

    (defthm equal-of-vl-loadresult-fix-1-forward-to-vl-loadresult-equiv
      (implies (equal (vl-loadresult-fix acl2::x)
                      acl2::y)
               (vl-loadresult-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-vl-loadresult-fix-2-forward-to-vl-loadresult-equiv

    (defthm equal-of-vl-loadresult-fix-2-forward-to-vl-loadresult-equiv
      (implies (equal acl2::x (vl-loadresult-fix acl2::y))
               (vl-loadresult-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: vl-loadresult-equiv-of-vl-loadresult-fix-1-forward

    (defthm vl-loadresult-equiv-of-vl-loadresult-fix-1-forward
      (implies (vl-loadresult-equiv (vl-loadresult-fix acl2::x)
                                    acl2::y)
               (vl-loadresult-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: vl-loadresult-equiv-of-vl-loadresult-fix-2-forward

    (defthm vl-loadresult-equiv-of-vl-loadresult-fix-2-forward
      (implies (vl-loadresult-equiv acl2::x (vl-loadresult-fix acl2::y))
               (vl-loadresult-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)