Abstract a
(abs-variable-declaration tree) → var
Function:
(defun abs-variable-declaration (tree) (declare (xargs :guard (abnf::treep tree))) (let ((__function__ 'abs-variable-declaration)) (declare (ignorable __function__)) (b* (((okf (abnf::tree-list-tuple7 sub)) (abnf::check-tree-nonleaf-7 tree "variable-declaration")) ((okf tree) (abnf::check-tree-list-1 sub.1st)) ((okf &) (abnf::check-tree-schars tree "let")) ((okf tree) (abnf::check-tree-list-1 sub.2nd)) ((okf id) (abs-identifier tree)) ((okf tree) (abnf::check-tree-list-1 sub.3rd)) ((okf &) (abnf::check-tree-ichars tree ":")) ((okf tree) (abnf::check-tree-list-1 sub.4th)) ((okf type) (abs-type tree)) ((okf tree) (abnf::check-tree-list-1 sub.5th)) ((okf &) (abnf::check-tree-ichars tree "=")) ((okf tree) (abnf::check-tree-list-1 sub.6th)) ((okf expr) (abs-expression tree)) ((okf tree) (abnf::check-tree-list-1 sub.7th)) ((okf &) (abnf::check-tree-ichars tree ";"))) (make-vardecl :name id :type type :init expr))))
Theorem:
(defthm vardecl-resultp-of-abs-variable-declaration (b* ((var (abs-variable-declaration tree))) (vardecl-resultp var)) :rule-classes :rewrite)
Theorem:
(defthm abs-variable-declaration-of-tree-fix-tree (equal (abs-variable-declaration (abnf::tree-fix tree)) (abs-variable-declaration tree)))
Theorem:
(defthm abs-variable-declaration-tree-equiv-congruence-on-tree (implies (abnf::tree-equiv tree tree-equiv) (equal (abs-variable-declaration tree) (abs-variable-declaration tree-equiv))) :rule-classes :congruence)