• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • 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
            • Parse-expressions
            • Parse-udps
            • Parse-statements
            • Parse-property
            • Vl-genelements
            • Parse-paramdecls
            • Parse-blockitems
            • Parse-utils
            • Parse-insts
            • Parse-functions
            • Parse-assignments
            • Parse-clocking
            • Parse-strengths
            • Vl-parse-genvar-declaration
            • Vl-parse
            • Parse-netdecls
            • Parse-asserts
            • Vl-maybe-parse-lifetime
            • Parse-dpi-import-export
              • Vl-warn-about-deprecated-dpi
              • Vl-parse-dpi-import
              • Vl-parse-dpi-export
              • Vl-parse-very-optional-tf-port-list
              • Vl-parse-optional-dpi-function-import-property
                • Vl-parse-c-identifier
                • Vl-parse-dpi-spec-string
                • Vl-interpret-dpi-spec-token
                • Vl-is-dpi-spec-string?
                • Vl-dpi-spec-token-p
              • Parse-ports
              • Parse-timeunits
              • Seq
              • Parse-packages
              • Parse-eventctrl
            • 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-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
    • Parse-dpi-import-export

    Vl-parse-optional-dpi-function-import-property

    Parses dpi_function_import_property.

    Signature
    (vl-parse-optional-dpi-function-import-property 
         &key (tokstream 'tokstream) 
         (config 'config)) 
     
      → 
    (mv errmsg? value new-tokstream)
    Arguments
    config — Guard (vl-loadconfig-p config).

    SystemVerilog-2012:

    dpi_function_import_property ::= 'context' | 'pure'

    Definitions and Theorems

    Function: vl-parse-optional-dpi-function-import-property-fn

    (defun vl-parse-optional-dpi-function-import-property-fn
           (tokstream config)
      (declare (xargs :stobjs (tokstream)))
      (declare (xargs :guard (vl-loadconfig-p config)))
      (declare (ignorable config))
      (let
        ((__function__ 'vl-parse-optional-dpi-function-import-property))
        (declare (ignorable __function__))
        (seq tokstream
             (when (vl-is-some-token? '(:vl-kwd-context :vl-kwd-pure))
                   (prop := (vl-match)))
             (return (and prop
                          (case (vl-token->type prop)
                                (:vl-kwd-context :vl-dpi-context)
                                (:vl-kwd-pure :vl-dpi-pure)))))))

    Theorem: vl-parse-optional-dpi-function-import-property-never-fails

    (defthm vl-parse-optional-dpi-function-import-property-never-fails
      (not (mv-nth 0
                   (vl-parse-optional-dpi-function-import-property))))

    Theorem: vl-parse-optional-dpi-function-import-property-result

    (defthm vl-parse-optional-dpi-function-import-property-result
     (implies
      (and
         (not (mv-nth 0
                      (vl-parse-optional-dpi-function-import-property)))
         (and t))
      (vl-dpiprop-p
           (mv-nth 1
                   (vl-parse-optional-dpi-function-import-property)))))

    Theorem: vl-parse-optional-dpi-function-import-property-count-strong-on-value

    (defthm
     vl-parse-optional-dpi-function-import-property-count-strong-on-value
     (and
      (<=
         (vl-tokstream-measure
              :tokstream
              (mv-nth 2
                      (vl-parse-optional-dpi-function-import-property)))
         (vl-tokstream-measure))
      (implies
       (mv-nth 1
               (vl-parse-optional-dpi-function-import-property))
       (<
         (vl-tokstream-measure
              :tokstream
              (mv-nth 2
                      (vl-parse-optional-dpi-function-import-property)))
         (vl-tokstream-measure))))
     :rule-classes ((:rewrite) (:linear)))