Struct graph induced by a list of top-level declarations.
(topdecl-list-struct-graph decls) → graph
We take the union of all the graphs for the declarations. Note that, for lists of top-level declarations in files that pass type-checking, the names of the structs introduced by the declarations are unique, and thus there is no shadowing in the graph alist.
Function:
(defun topdecl-list-struct-graph (decls) (declare (xargs :guard (topdecl-listp decls))) (let ((__function__ 'topdecl-list-struct-graph)) (declare (ignorable __function__)) (cond ((endp decls) nil) (t (append (topdecl-struct-graph (car decls)) (topdecl-list-struct-graph (cdr decls)))))))
Theorem:
(defthm alistp-of-topdecl-list-struct-graph (b* ((graph (topdecl-list-struct-graph decls))) (alistp graph)) :rule-classes :rewrite)
Theorem:
(defthm topdecl-list-struct-graph-of-topdecl-list-fix-decls (equal (topdecl-list-struct-graph (topdecl-list-fix decls)) (topdecl-list-struct-graph decls)))
Theorem:
(defthm topdecl-list-struct-graph-topdecl-list-equiv-congruence-on-decls (implies (topdecl-list-equiv decls decls-equiv) (equal (topdecl-list-struct-graph decls) (topdecl-list-struct-graph decls-equiv))) :rule-classes :congruence)