text"The refinement relationship to abstract B-trees."
text"The idea is: a refines the given node of degree k where the first leaf node of the subtree of a is r and the forward pointer in the last leaf node is z"
find_theorems list_assn find_theorems id_assn
fun bplustree_assn :: "nat ==> ('a::heap) bplustree ==> 'a btnode ref ==> 'a btnode ref option ==> 'a btnode ref option ==> assn"where "bplustree_assn k (Leaf xs) a r z = (∃A xsi fwd. a ↦r Btleaf xsi fwd * is_pfa (2*k) xs xsi * ↑(fwd = z) * ↑(r = Some a) )" | "bplustree_assn k (Node ts t) a r z = (∃A tsi ti tsi' tsi'' rs. a ↦r Btnode tsi ti * bplustree_assn k t ti (last (r#rs)) (last (rs@[z])) * is_pfa (2*k) tsi' tsi * ↑(length tsi' = length rs) * ↑(tsi'' = zip (zip (map fst tsi') (zip (butlast (r#rs)) (butlast (rs@[z])))) (map snd tsi')) * list_assn ((λ t (ti,r',z'). bplustree_assn k t (the ti) r' z') ×a id_assn) ts tsi'' )"
text"With the current definition of deletion, we would also need to directly reason on nodes and not only on references to them."
fun btnode_assn :: "nat ==> ('a::heap) bplustree ==> 'a btnode ==> 'a btnode ref option ==> 'a btnode ref option ==> assn"where "btnode_assn k (Leaf xs) (Btleaf xsi zi) r z = (∃A xsi zi. is_pfa (2*k) xs xsi * ↑(zi = z) )" | "btnode_assn k (Node ts t) (Btnode tsi ti) r z = (∃A tsi' tsi'' rs. bplustree_assn k t ti (last (r#rs)) (last (rs@[z])) * is_pfa (2*k) tsi' tsi * ↑(length tsi' = length rs) * ↑(tsi'' = zip (zip (map fst tsi') (zip (butlast (r#rs)) (butlast (rs@[z])))) (map snd tsi')) * list_assn ((λ t (ti,r',z'). bplustree_assn k t (the ti) r' z') ×a id_assn) ts tsi'' )" | "btnode_assn _ _ _ _ _ = false"
abbreviation"blist_assn k ts tsi'' ≡ list_assn ((λ t (ti,r',z'). bplustree_assn k t (the ti) r' z') ×a id_assn) ts tsi'' "
end
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.2Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.