• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
          • Preprocessor
            • Vl-iframe-p
            • Preprocessor-ifdef-minutia
            • Vl-preprocess-loop
            • Vl-read-until-end-of-define
            • Vl-expand-define
            • Vl-read-include
            • Vl-process-ifdef
            • Vl-substitute-into-macro-text
            • Vl-preprocess
            • Vl-define
            • Vl-process-define
            • Vl-process-undef
            • Preprocessor-include-minutia
            • Vl-split-define-text
            • Vl-read-timescale
            • Vl-line-up-define-formals-and-actuals
            • Vl-process-else
            • Vl-process-endif
            • Vl-istack-p
            • Vl-is-compiler-directive-p
            • Vl-check-remaining-formals-all-have-defaults
            • Vl-safe-previous-n
            • Vl-safe-next-n
            • Vl-defines
              • Vl-defines-fix
              • Vl-defines-p
                • Vl-defines-p-basics
                • Vl-delete-define
                • Vl-find-define
                • Vl-make-initial-defines
                • Vl-defines-equiv
              • *vl-preprocess-clock*
            • Vl-loadconfig
            • Lexer
            • Vl-loadstate
            • Parser
            • Vl-load-merge-descriptions
            • Scope-of-defines
            • Vl-load-file
            • Vl-flush-out-descriptions
            • Vl-description
            • Vl-loadresult
            • Vl-read-file
            • Vl-find-basename/extension
            • Vl-find-file
            • Vl-read-files
            • Extended-characters
            • Vl-load
            • Vl-load-main
            • Vl-load-description
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-load-descriptions
            • Vl-load-files
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-descriptionlist
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-defines-p

    Vl-make-initial-defines

    Simple way to build a vl-defines-p that `defines a list of names to 1.

    Signature
    (vl-make-initial-defines x) → defs
    Arguments
    x — Guard (string-listp x).
    Returns
    defs — Type (vl-defines-p defs).

    Definitions and Theorems

    Function: vl-make-initial-defines

    (defun vl-make-initial-defines (x)
      (declare (xargs :guard (string-listp x)))
      (let ((__function__ 'vl-make-initial-defines))
        (declare (ignorable __function__))
        (if (atom x)
            nil
          (cons (make-vl-define :name (car x)
                                :formals nil
                                :body "1"
                                :loc *vl-fakeloc*)
                (vl-make-initial-defines (cdr x))))))

    Theorem: vl-defines-p-of-vl-make-initial-defines

    (defthm vl-defines-p-of-vl-make-initial-defines
      (b* ((defs (vl-make-initial-defines x)))
        (vl-defines-p defs))
      :rule-classes :rewrite)

    Theorem: vl-make-initial-defines-of-string-list-fix-x

    (defthm vl-make-initial-defines-of-string-list-fix-x
      (equal (vl-make-initial-defines (string-list-fix x))
             (vl-make-initial-defines x)))

    Theorem: vl-make-initial-defines-string-list-equiv-congruence-on-x

    (defthm vl-make-initial-defines-string-list-equiv-congruence-on-x
      (implies (str::string-list-equiv x x-equiv)
               (equal (vl-make-initial-defines x)
                      (vl-make-initial-defines x-equiv)))
      :rule-classes :congruence)