• 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
          • Preprocessor
          • Vl-loadconfig
          • Vl-loadstate
          • Lexer
          • Parser
          • Vl-load-merge-descriptions
          • Vl-find-basename/extension
          • Vl-load-file
          • Vl-loadresult
          • Scope-of-defines
          • Vl-find-file
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-read-file
          • Vl-includeskips-report-gather
          • Vl-load-main
          • Extended-characters
            • Vl-location
            • Vl-echar-p
              • Make-vl-echar-fast
              • Vl-echar->char
              • Vl-echar
              • Vl-echar->loc
              • Vl-echarpack-p
                • Vl-echarpack
                • Vl-echarpack->code
                • Vl-echarpack->col
                • Vl-echarpack->line
              • Vl-echarlist->chars
              • Vl-echarlist-from-chars
              • Vl-echarlist-from-str
              • Vl-echarlist-unsigned-value
              • Vl-change-echarlist-locations
              • Vl-echar-digit-value
              • Vl-echarlist->string
            • Vl-load
            • Vl-load-description
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-preprocess-debug
            • Vl-write-preprocessor-debug-file
            • Vl-read-file-report-gather
            • Vl-load-descriptions
            • Vl-load-files
            • Translate-off
            • Vl-load-read-file-hook
            • Vl-read-file-report
            • Vl-loadstate-pad
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-loadstate->warnings
            • Vl-iskips-report
            • Vl-descriptionlist
          • Warnings
          • Getting-started
          • Utilities
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-echarpack-p

    Vl-echarpack->line

    Signature
    (vl-echarpack->line x) → line
    Arguments
    x — Guard (vl-echarpack-p x).
    Returns
    line — Type (posp line), given the guard.

    Definitions and Theorems

    Function: vl-echarpack->line$inline

    (defun vl-echarpack->line$inline (x)
      (declare (xargs :guard (vl-echarpack-p x)))
      (let ((__function__ 'vl-echarpack->line))
        (declare (ignorable __function__))
        (if (consp x)
            (the (integer 0 *) (caar x))
          (the (unsigned-byte 30)
               (ash (the (unsigned-byte 60) x) -30)))))

    Theorem: posp-of-vl-echarpack->line

    (defthm posp-of-vl-echarpack->line
      (implies (and (force (vl-echarpack-p x)))
               (b* ((line (vl-echarpack->line$inline x)))
                 (posp line)))
      :rule-classes :type-prescription)

    Theorem: vl-echarpack->line-of-vl-echarpack

    (defthm vl-echarpack->line-of-vl-echarpack
      (implies (and (force (unsigned-byte-p 8 code))
                    (force (natp line))
                    (force (natp col)))
               (equal (vl-echarpack->line (vl-echarpack code line col))
                      line)))