Source executions with preserved shared state or streams #
Stmt.NoSharedWrites excludes stores and stream operations. Expressions may
still read memory, so this condition does not assert that returned values are
independent of the heap. Calls are admitted provided every function body in the
program satisfies the same condition.
Stmt.NoIOWrites instead permits memory stores and preserves only the two
streams. A function can therefore return an updated heap without changing its
input or output stream.
Induction on the actual finite execution covers recursive and mutually recursive calls without assuming their termination. The resulting local frame combines shared-state preservation with the existing static register-frame theorem. At a function boundary, restoring caller locals then recovers the whole entry state. No instruction count or proposed time budget occurs in these results.
A sufficient condition for retaining both streams while permitting actual heap stores. Calls also require the condition on their program's bodies.
Equations
- Ram.Stmt.skip.NoIOWrites = True
- (Ram.Stmt.assign dst value).NoIOWrites = True
- (Ram.Stmt.store address value).NoIOWrites = True
- (Ram.Stmt.call dsts fn args).NoIOWrites = True
- (first.seq second).NoIOWrites = (first.NoIOWrites ∧ second.NoIOWrites)
- (Ram.Stmt.ite condition yes no).NoIOWrites = (yes.NoIOWrites ∧ no.NoIOWrites)
- (Ram.Stmt.while condition body).NoIOWrites = body.NoIOWrites
- (Ram.Stmt.read dst).NoIOWrites = False
- (Ram.Stmt.write value).NoIOWrites = False
Instances For
Actual finite execution of a stream-free statement preserves its input and output, independently of changes to shared memory or local registers.
Function return keeps the callee's actual heap while retaining both streams when all executed bodies contain no stream operations.