Predicate that makes a statement about a program's location in the memory
(program-at prog-addr bytes x86) → *
We use
Function:
(defun program-at (prog-addr bytes x86) (declare (xargs :stobjs (x86))) (declare (xargs :guard (and (canonical-address-p prog-addr) (canonical-address-p (+ -1 (len bytes) prog-addr)) (byte-listp bytes)) :non-executable t)) (prog2$ (acl2::throw-nonexec-error 'program-at (list prog-addr bytes x86)) (let ((__function__ 'program-at)) (declare (ignorable __function__)) (b* (((mv flg bytes-read ?x86) (rb (len bytes) prog-addr :x x86))) (and (equal flg nil) (equal bytes-read (combine-n-bytes 0 (len bytes) bytes)))))))
Theorem:
(defthm program-at-xw-in-app-view (implies (and (app-view x86) (not (equal fld :mem)) (not (equal fld :app-view))) (equal (program-at addr bytes (xw fld index value x86)) (program-at addr bytes x86))))