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