Check if a variable is found in automatic storage.
(var-autop var compst) → yes/no
This checks whether the variable is in the scopes of the top frame. Thus, it only looks in the currently accessible (by variable names) automatic storage; it does not look in other frames.
This predicate serves to establish, when negated, that a variable is found in static storage, and not in automatic storage. Rules for this process are given later.
Function:
(defun var-autop (var compst) (declare (xargs :guard (and (identp var) (compustatep compst)))) (declare (xargs :guard (> (compustate-frames-number compst) 0))) (let ((__function__ 'var-autop)) (declare (ignorable __function__)) (var-in-scopes-p var (frame->scopes (top-frame compst)))))
Theorem:
(defthm booleanp-of-var-autop (b* ((yes/no (var-autop var compst))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm var-autop-of-ident-fix-var (equal (var-autop (ident-fix var) compst) (var-autop var compst)))
Theorem:
(defthm var-autop-ident-equiv-congruence-on-var (implies (ident-equiv var var-equiv) (equal (var-autop var compst) (var-autop var-equiv compst))) :rule-classes :congruence)
Theorem:
(defthm var-autop-of-compustate-fix-compst (equal (var-autop var (compustate-fix compst)) (var-autop var compst)))
Theorem:
(defthm var-autop-compustate-equiv-congruence-on-compst (implies (compustate-equiv compst compst-equiv) (equal (var-autop var compst) (var-autop var compst-equiv))) :rule-classes :congruence)