Ordered list of the numbers of scopes in the call stack frames.
(compustate-scopes-numbers compst) → ns
Each frame in the call stack has a number of scopes. This function returns these numbers, in the same order as the frames in the stack.
Function:
(defun compustate-scopes-numbers-aux (frames) (declare (xargs :guard (frame-listp frames))) (let ((__function__ 'compustate-scopes-numbers-aux)) (declare (ignorable __function__)) (cond ((endp frames) nil) (t (cons (len (frame->scopes (car frames))) (compustate-scopes-numbers-aux (cdr frames)))))))
Theorem:
(defthm pos-listp-of-compustate-scopes-numbers-aux (b* ((ns (compustate-scopes-numbers-aux frames))) (pos-listp ns)) :rule-classes :rewrite)
Theorem:
(defthm len-of-compustate-scopes-numbers-aux (b* ((?ns (compustate-scopes-numbers-aux frames))) (equal (len ns) (len frames))))
Theorem:
(defthm consp-of-compustate-scopes-numbers-aux (b* ((?ns (compustate-scopes-numbers-aux frames))) (equal (consp ns) (consp frames))))
Theorem:
(defthm car-of-compustate-scopes-numbers-aux (b* ((?ns (compustate-scopes-numbers-aux frames))) (implies (> (len frames) 0) (equal (car ns) (len (frame->scopes (car frames)))))))
Theorem:
(defthm compustate-scopes-numbers-aux-of-append (equal (compustate-scopes-numbers-aux (append frames1 frames2)) (append (compustate-scopes-numbers-aux frames1) (compustate-scopes-numbers-aux frames2))))
Theorem:
(defthm compustate-scopes-numbers-aux-of-rev (equal (compustate-scopes-numbers-aux (rev frames)) (rev (compustate-scopes-numbers-aux frames))))
Theorem:
(defthm compustate-scopes-numbers-aux-of-update-nth (implies (< (nfix i) (len frames)) (equal (compustate-scopes-numbers-aux (update-nth i frame frames)) (update-nth i (len (frame->scopes frame)) (compustate-scopes-numbers-aux frames)))))
Theorem:
(defthm update-nth-of-nth-and-compustate-scopes-numbers-aux (implies (< (nfix i) (len (compustate->frames compst))) (equal (update-nth i (len (frame->scopes (nth i (compustate->frames compst)))) (compustate-scopes-numbers-aux (compustate->frames compst))) (compustate-scopes-numbers-aux (compustate->frames compst)))))
Theorem:
(defthm compustate-scopes-numbers-aux-of-frame-list-fix-frames (equal (compustate-scopes-numbers-aux (frame-list-fix frames)) (compustate-scopes-numbers-aux frames)))
Theorem:
(defthm compustate-scopes-numbers-aux-frame-list-equiv-congruence-on-frames (implies (frame-list-equiv frames frames-equiv) (equal (compustate-scopes-numbers-aux frames) (compustate-scopes-numbers-aux frames-equiv))) :rule-classes :congruence)
Function:
(defun compustate-scopes-numbers (compst) (declare (xargs :guard (compustatep compst))) (let ((__function__ 'compustate-scopes-numbers)) (declare (ignorable __function__)) (compustate-scopes-numbers-aux (compustate->frames compst))))
Theorem:
(defthm pos-listp-of-compustate-scopes-numbers (b* ((ns (compustate-scopes-numbers compst))) (pos-listp ns)) :rule-classes :rewrite)
Theorem:
(defthm len-of-compustate-scopes-numbers (b* ((?ns (compustate-scopes-numbers compst))) (equal (len ns) (len (compustate->frames compst)))))
Theorem:
(defthm consp-of-compustate-scopes-numbers (implies (> (compustate-frames-number compst) 0) (b* ((?ns (compustate-scopes-numbers compst))) (consp ns))) :rule-classes :type-prescription)
Theorem:
(defthm posp-of-car-of-compustate-scopes-numbers (implies (> (compustate-frames-number compst) 0) (b* ((?ns (compustate-scopes-numbers compst))) (posp (car ns)))) :rule-classes :type-prescription)
Theorem:
(defthm car-of-compustate-scopes-numbers-lower-bound (implies (> (compustate-frames-number compst) 0) (b* ((?ns (compustate-scopes-numbers compst))) (> (car ns) 0))) :rule-classes :linear)
Theorem:
(defthm car-of-compustate-scopes-numbers (b* ((?ns (compustate-scopes-numbers compst))) (implies (> (compustate-frames-number compst) 0) (equal (car ns) (len (frame->scopes (car (compustate->frames compst))))))))
Theorem:
(defthm compustate-scopes-numbers-of-push-frame (equal (compustate-scopes-numbers (push-frame frame compst)) (cons (len (frame->scopes frame)) (compustate-scopes-numbers compst))))
Theorem:
(defthm compustate-scopes-numbers-of-pop-frame (equal (compustate-scopes-numbers (pop-frame compst)) (cdr (compustate-scopes-numbers compst))))
Theorem:
(defthm compustate-scopes-numbers-of-compustate-fix-compst (equal (compustate-scopes-numbers (compustate-fix compst)) (compustate-scopes-numbers compst)))
Theorem:
(defthm compustate-scopes-numbers-compustate-equiv-congruence-on-compst (implies (compustate-equiv compst compst-equiv) (equal (compustate-scopes-numbers compst) (compustate-scopes-numbers compst-equiv))) :rule-classes :congruence)