-
Notifications
You must be signed in to change notification settings - Fork 1
TODO list
gogokefakefa edited this page Dec 5, 2016
·
1 revision
Initially, we are "commenting out" the while-loop inside of the collect() function of the garbage collector. It is natural to do that, because the last atomic block (addOrigins();mark();) is enough to achieve the safety condition of the garbage collector (i.e. that no reachable from the roots node is left unmarked).
In terms of atomicity we initially assume that the whole collect function:
collect() {
atomic
marked ← {root1, . . . , rootR}
pending ← ∪(x∈marked fields(x))
log ← ε
mark()
sweep()
}
The current plan is to gradually relax the atomicity scope and then prove the correctness of the algorithm with in the presence of the currently omitted while loop.
- State the invariant for the while loop in the mark() function.
- Write down the mark function in Coq.
- Prove collect.
collect() {
atomic
marked ← {root1, . . . , rootR}
pending ← ∪(x∈marked fields(x))
log ← ε
atomic
addOrigins()
mark()
sweep()
]
- Prove the new collect.