Definition getBlocks (V:list val) (b: block): bool :=
in_dec eq_block b
(fold_right (fun v L => match v with Vptr b' z => b'::L | _ => L end) nil V).

Lemma getBlocksD: forall v V b,
getBlocks (v:: V) b =
match v with
Vptr b' _  => orb (eq_block b' b) (getBlocks V b)
| _ => getBlocks V b
end.