Generate the initial symbol table for a C function.
(atc-gen-init-inscope fn fn-guard typed-formals prec-tags compst-var context names-to-avoid wrld) → (mv inscope events names-to-avoid)
The initial symbol table consists of a scope for static storage and a scope for automatic storage.
Function:
(defun atc-gen-init-inscope (fn fn-guard typed-formals prec-tags compst-var context names-to-avoid wrld) (declare (xargs :guard (and (symbolp fn) (symbolp fn-guard) (atc-symbol-varinfo-alistp typed-formals) (atc-string-taginfo-alistp prec-tags) (symbolp compst-var) (atc-contextp context) (symbol-listp names-to-avoid) (plist-worldp wrld)))) (let ((__function__ 'atc-gen-init-inscope)) (declare (ignorable __function__)) (b* (((mv scope-static events-static names-to-avoid) (atc-gen-init-inscope-static fn fn-guard typed-formals prec-tags compst-var context names-to-avoid wrld)) ((mv scope-auto events-auto names-to-avoid) (atc-gen-init-inscope-auto fn fn-guard typed-formals prec-tags compst-var context names-to-avoid wrld))) (mv (list scope-auto scope-static) (append events-static events-auto) names-to-avoid))))
Theorem:
(defthm atc-symbol-varinfo-alist-listp-of-atc-gen-init-inscope.inscope (implies (atc-symbol-varinfo-alistp typed-formals) (b* (((mv ?inscope ?events ?names-to-avoid) (atc-gen-init-inscope fn fn-guard typed-formals prec-tags compst-var context names-to-avoid wrld))) (atc-symbol-varinfo-alist-listp inscope))) :rule-classes :rewrite)
Theorem:
(defthm pseudo-event-form-listp-of-atc-gen-init-inscope.events (b* (((mv ?inscope ?events ?names-to-avoid) (atc-gen-init-inscope fn fn-guard typed-formals prec-tags compst-var context names-to-avoid wrld))) (pseudo-event-form-listp events)) :rule-classes :rewrite)
Theorem:
(defthm symbol-listp-of-atc-gen-init-inscope.names-to-avoid (implies (symbol-listp names-to-avoid) (b* (((mv ?inscope ?events ?names-to-avoid) (atc-gen-init-inscope fn fn-guard typed-formals prec-tags compst-var context names-to-avoid wrld))) (symbol-listp names-to-avoid))) :rule-classes :rewrite)