Simple way to build a vl-defines-p that
(vl-make-initial-defines x) → defs
Function:
(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:
(defthm vl-defines-p-of-vl-make-initial-defines (b* ((defs (vl-make-initial-defines x))) (vl-defines-p defs)) :rule-classes :rewrite)
Theorem:
(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:
(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)