Abstract a
(abs-struct-declaration tree) → structdef
Function:
(defun abs-struct-declaration (tree) (declare (xargs :guard (abnf::treep tree))) (let ((__function__ 'abs-struct-declaration)) (declare (ignorable __function__)) (b* (((okf (abnf::tree-list-tuple5 sub)) (abnf::check-tree-nonleaf-5 tree "struct-declaration")) ((okf tree) (abnf::check-tree-list-1 sub.1st)) ((okf &) (abnf::check-tree-schars tree "struct")) ((okf tree) (abnf::check-tree-list-1 sub.2nd)) ((okf name) (abs-identifier tree)) ((okf tree) (abnf::check-tree-list-1 sub.3rd)) ((okf &) (abnf::check-tree-schars tree "{")) ((okf tree) (abnf::check-tree-list-1 sub.4th)) ((okf compdecls) (abs-struct-component-declarations tree)) ((okf tree) (abnf::check-tree-list-1 sub.5th)) ((okf &) (abnf::check-tree-schars tree "}"))) (make-structdecl :name name :components compdecls :recordp nil))))
Theorem:
(defthm structdecl-resultp-of-abs-struct-declaration (b* ((structdef (abs-struct-declaration tree))) (structdecl-resultp structdef)) :rule-classes :rewrite)
Theorem:
(defthm abs-struct-declaration-of-tree-fix-tree (equal (abs-struct-declaration (abnf::tree-fix tree)) (abs-struct-declaration tree)))
Theorem:
(defthm abs-struct-declaration-tree-equiv-congruence-on-tree (implies (abnf::tree-equiv tree tree-equiv) (equal (abs-struct-declaration tree) (abs-struct-declaration tree-equiv))) :rule-classes :congruence)