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