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