| x0 = 1 ' + 3 ' + 3 ' + 2 ' ⊦ 〈build_rec#(0; x0, to)〉 〈to0 := to ; if ¬ is_empty(x0) then to0 := fail〉 to0 = some(Node(Leaf, Node(Node(Leaf, Leaf), Leaf))) |
⊦
x0 = 1 ' + 3 ' + 3 ' + 2 ' ⊦ 〈x := x0, d := 0〉 〈if is_empty(x) then to0 := fail else let h = head(x) in if h < d then to0 := fail else if h = d then { x := pop(x) ; to0 := some(Leaf) } else let to2 = fail, to1 = fail in { build_rec#(d + 1; x, to2) ; if to2 = fail then to0 := fail else { build_rec#(d + 1; x, to1) ; if to1 = fail then to0 := fail else to0 := some(Node(to2 .t, to1 .t)) } }〉 〈to1 := to0 ; if ¬ is_empty(x) then to1 := fail〉 to1 = some(Node(Leaf, Node(Node(Leaf, Leaf), Leaf)))
[[CONCRETESIMPRULES : ()]]