• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Vwsim
      • Fgl
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
          • Scopestack
          • Hid-tools
          • Filtering-by-name
          • Vl-interface-mocktype
          • Stripping-functions
          • Genblob
          • Expr-tools
          • Hierarchy
          • Extract-vl-types
          • Range-tools
            • Vl-range-resolved-p
              • Vl-maybe-range-size
              • Vl-maybe-range-resolved-p
              • Vl-selwidth
              • Vl-range-size
              • Vl-maybe-range-msbidx
              • Vl-maybe-range-lsbidx
              • Vl-maybe-range-lowidx
              • Vl-range-msbidx
              • Vl-range-lsbidx
              • Vl-range-low-idx
              • Vl-maybe-range-revp
              • Vl-range-revp
            • Finding-by-name
            • Stmt-tools
            • Modnamespace
            • Flat-warnings
            • Reordering-by-name
            • Datatype-tools
            • Syscalls
            • Allexprs
            • Lvalues
            • Port-tools
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Range-tools

    Vl-range-resolved-p

    Determine if a range's indices have been resolved to constants.

    Signature
    (vl-range-resolved-p x) → *
    Arguments
    x — Guard (vl-range-p x).

    Historically we required x.msb >= x.lsb, but now we try to handle both cases.

    Definitions and Theorems

    Function: vl-range-resolved-p

    (defun vl-range-resolved-p (x)
           (declare (xargs :guard (vl-range-p x)))
           (let ((__function__ 'vl-range-resolved-p))
                (declare (ignorable __function__))
                (b* (((vl-range x) x))
                    (and (vl-expr-resolved-p x.msb)
                         (vl-expr-resolved-p x.lsb)))))

    Theorem: vl-expr-resolved-p-of-vl-range->msb-when-vl-range-resolved-p

    (defthm vl-expr-resolved-p-of-vl-range->msb-when-vl-range-resolved-p
            (implies (vl-range-resolved-p x)
                     (vl-expr-resolved-p (vl-range->msb x))))

    Theorem: vl-expr-resolved-p-of-vl-range->lsb-when-vl-range-resolved-p

    (defthm vl-expr-resolved-p-of-vl-range->lsb-when-vl-range-resolved-p
            (implies (vl-range-resolved-p x)
                     (vl-expr-resolved-p (vl-range->lsb x))))

    Theorem: vl-range-resolved-p-of-vl-range-fix-x

    (defthm vl-range-resolved-p-of-vl-range-fix-x
            (equal (vl-range-resolved-p (vl-range-fix x))
                   (vl-range-resolved-p x)))

    Theorem: vl-range-resolved-p-vl-range-equiv-congruence-on-x

    (defthm vl-range-resolved-p-vl-range-equiv-congruence-on-x
            (implies (vl-range-equiv x x-equiv)
                     (equal (vl-range-resolved-p x)
                            (vl-range-resolved-p x-equiv)))
            :rule-classes :congruence)