• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
          • Scopestack
          • Hid-tools
          • Filtering-by-name
          • Vl-interface-mocktype
          • Stripping-functions
          • Genblob
          • Expr-tools
          • Extract-vl-types
          • Hierarchy
          • Range-tools
          • Finding-by-name
          • Stmt-tools
          • Modnamespace
          • Flat-warnings
          • Reordering-by-name
          • Datatype-tools
          • Syscalls
            • Vl-syscall->returninfo
            • Vl-unary-syscall-p
            • Vl-typearg-syscall-p
            • Vl-0ary-syscall-p
            • Vl-*ary-syscall-p
            • Vl-$random-expr-p
            • Vl-simple-id-name
              • Vl-unary-syscall->arg
            • Allexprs
            • Lvalues
            • Port-tools
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Syscalls

    Vl-simple-id-name

    If x is a simple name with no scoping, return the name, otherwise nil.

    Signature
    (vl-simple-id-name x) → name
    Arguments
    x — Guard (vl-scopeexpr-p x).
    Returns
    name — Type (maybe-stringp name).

    Definitions and Theorems

    Function: vl-simple-id-name

    (defun vl-simple-id-name (x)
      (declare (xargs :guard (vl-scopeexpr-p x)))
      (let ((__function__ 'vl-simple-id-name))
        (declare (ignorable __function__))
        (vl-scopeexpr-case x
                           :end (vl-hidexpr-case x.hid
                                                 :end x.hid.name
                                                 :otherwise nil)
                           :otherwise nil)))

    Theorem: maybe-stringp-of-vl-simple-id-name

    (defthm maybe-stringp-of-vl-simple-id-name
      (b* ((name (vl-simple-id-name x)))
        (maybe-stringp name))
      :rule-classes :type-prescription)

    Theorem: stringp-of-vl-simple-id-name

    (defthm stringp-of-vl-simple-id-name
      (b* ((?name (vl-simple-id-name x)))
        (iff (stringp name) name)))

    Theorem: vl-simple-id-name-of-vl-scopeexpr-fix-x

    (defthm vl-simple-id-name-of-vl-scopeexpr-fix-x
      (equal (vl-simple-id-name (vl-scopeexpr-fix x))
             (vl-simple-id-name x)))

    Theorem: vl-simple-id-name-vl-scopeexpr-equiv-congruence-on-x

    (defthm vl-simple-id-name-vl-scopeexpr-equiv-congruence-on-x
      (implies (vl-scopeexpr-equiv x x-equiv)
               (equal (vl-simple-id-name x)
                      (vl-simple-id-name x-equiv)))
      :rule-classes :congruence)