• Top
    • Documentation
      • Xdoc
        • Undocumented
        • Save
        • Defsection
        • Markup
        • Preprocessor
        • Terminal
        • Emacs-links
        • Defxdoc
        • Katex-integration
        • Constructors
        • Entities
        • Save-rendered
        • Add-resource-directory
        • Defxdoc+
        • Testing
        • Order-subtopics
        • Save-rendered-event
        • Archive-matching-topics
        • Missing-parents
          • Atc-apconvert-rules
            • Atc-object-designator-rules
            • Missing-parents-test
            • Enable-meta-rules
            • Disable-meta-rules
            • Create-case-match-macro
          • Archive-xdoc
          • Xdoc-extend
          • Set-default-parents
          • Defpointer
          • Defxdoc-raw
          • Xdoc-tests
          • Xdoc-prepend
          • Defsection-progn
          • Gen-xdoc-for-file
        • ACL2-doc
        • Pointers
        • Doc
        • Documentation-copyright
        • Args
        • ACL2-doc-summary
        • Finding-documentation
        • Broken-link
      • Books
      • Recursion-and-induction
      • Boolean-reasoning
      • Debugging
      • Projects
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Missing-parents

    Atc-apconvert-rules

    Rules about apconvert-expr-value.

    These leave most expression values unchanged, but they convert integer arrays with object designators to pointers.

    Definitions and Theorems

    Theorem: apconvert-expr-value-when-not-value-array

    (defthm apconvert-expr-value-when-not-value-array
      (implies (not (value-case x :array))
               (equal (apconvert-expr-value (expr-value x objdes))
                      (expr-value x objdes))))

    Theorem: apconvert-expr-value-when-uchar-arrayp

    (defthm apconvert-expr-value-when-uchar-arrayp
      (implies (and (uchar-arrayp x)
                    (objdesignp objdes))
               (equal (apconvert-expr-value (expr-value x objdes))
                      (expr-value (value-pointer (pointer-valid objdes)
                                                 (type-uchar))
                                  nil))))

    Theorem: apconvert-expr-value-when-schar-arrayp

    (defthm apconvert-expr-value-when-schar-arrayp
      (implies (and (schar-arrayp x)
                    (objdesignp objdes))
               (equal (apconvert-expr-value (expr-value x objdes))
                      (expr-value (value-pointer (pointer-valid objdes)
                                                 (type-schar))
                                  nil))))

    Theorem: apconvert-expr-value-when-ushort-arrayp

    (defthm apconvert-expr-value-when-ushort-arrayp
      (implies (and (ushort-arrayp x)
                    (objdesignp objdes))
               (equal (apconvert-expr-value (expr-value x objdes))
                      (expr-value (value-pointer (pointer-valid objdes)
                                                 (type-ushort))
                                  nil))))

    Theorem: apconvert-expr-value-when-sshort-arrayp

    (defthm apconvert-expr-value-when-sshort-arrayp
      (implies (and (sshort-arrayp x)
                    (objdesignp objdes))
               (equal (apconvert-expr-value (expr-value x objdes))
                      (expr-value (value-pointer (pointer-valid objdes)
                                                 (type-sshort))
                                  nil))))

    Theorem: apconvert-expr-value-when-uint-arrayp

    (defthm apconvert-expr-value-when-uint-arrayp
      (implies (and (uint-arrayp x)
                    (objdesignp objdes))
               (equal (apconvert-expr-value (expr-value x objdes))
                      (expr-value (value-pointer (pointer-valid objdes)
                                                 (type-uint))
                                  nil))))

    Theorem: apconvert-expr-value-when-sint-arrayp

    (defthm apconvert-expr-value-when-sint-arrayp
      (implies (and (sint-arrayp x)
                    (objdesignp objdes))
               (equal (apconvert-expr-value (expr-value x objdes))
                      (expr-value (value-pointer (pointer-valid objdes)
                                                 (type-sint))
                                  nil))))

    Theorem: apconvert-expr-value-when-ulong-arrayp

    (defthm apconvert-expr-value-when-ulong-arrayp
      (implies (and (ulong-arrayp x)
                    (objdesignp objdes))
               (equal (apconvert-expr-value (expr-value x objdes))
                      (expr-value (value-pointer (pointer-valid objdes)
                                                 (type-ulong))
                                  nil))))

    Theorem: apconvert-expr-value-when-slong-arrayp

    (defthm apconvert-expr-value-when-slong-arrayp
      (implies (and (slong-arrayp x)
                    (objdesignp objdes))
               (equal (apconvert-expr-value (expr-value x objdes))
                      (expr-value (value-pointer (pointer-valid objdes)
                                                 (type-slong))
                                  nil))))

    Theorem: apconvert-expr-value-when-ullong-arrayp

    (defthm apconvert-expr-value-when-ullong-arrayp
      (implies (and (ullong-arrayp x)
                    (objdesignp objdes))
               (equal (apconvert-expr-value (expr-value x objdes))
                      (expr-value (value-pointer (pointer-valid objdes)
                                                 (type-ullong))
                                  nil))))

    Theorem: apconvert-expr-value-when-sllong-arrayp

    (defthm apconvert-expr-value-when-sllong-arrayp
      (implies (and (sllong-arrayp x)
                    (objdesignp objdes))
               (equal (apconvert-expr-value (expr-value x objdes))
                      (expr-value (value-pointer (pointer-valid objdes)
                                                 (type-sllong))
                                  nil))))

    Theorem: apconvert-expr-value-when-not-value-array-alt

    (defthm apconvert-expr-value-when-not-value-array-alt
      (implies (not (equal (value-kind (expr-value->value eval))
                           :array))
               (equal (apconvert-expr-value eval)
                      (expr-value-fix eval))))