Abstract a
(abs-record-declaration tree) → recdef
Note that a record declaration is just a special kind of struct declaration.
Function:
(defun abs-record-declaration (tree) (declare (xargs :guard (abnf::treep tree))) (let ((__function__ 'abs-record-declaration)) (declare (ignorable __function__)) (b* (((okf (abnf::tree-list-tuple5 sub)) (abnf::check-tree-nonleaf-5 tree "record-declaration")) ((okf tree) (abnf::check-tree-list-1 sub.1st)) ((okf &) (abnf::check-tree-schars tree "record")) ((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 t))))
Theorem:
(defthm structdecl-resultp-of-abs-record-declaration (b* ((recdef (abs-record-declaration tree))) (structdecl-resultp recdef)) :rule-classes :rewrite)
Theorem:
(defthm abs-record-declaration-of-tree-fix-tree (equal (abs-record-declaration (abnf::tree-fix tree)) (abs-record-declaration tree)))
Theorem:
(defthm abs-record-declaration-tree-equiv-congruence-on-tree (implies (abnf::tree-equiv tree tree-equiv) (equal (abs-record-declaration tree) (abs-record-declaration tree-equiv))) :rule-classes :congruence)