* Experiment binary_search
** Original
File "bench/check-ce/petiot2018/binary_search.mlw", line 12, characters 19-44:
Sub-goal Loop invariant init of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 13, characters 45-54:
Sub-goal Loop invariant init of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 14, characters 50-58:
Sub-goal Loop invariant init of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 16, characters 12-31:
Sub-goal Precondition of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 17, characters 7-11:
Sub-goal Index in array bounds of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 15, characters 14-21:
Sub-goal Loop variant decrease of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 12, characters 19-44:
Sub-goal Loop invariant preservation of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 13, characters 45-54:
Sub-goal Loop invariant preservation of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 14, characters 50-58:
Sub-goal Loop invariant preservation of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 15, characters 14-21:
Sub-goal Loop variant decrease of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 12, characters 19-44:
Sub-goal Loop invariant preservation of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 13, characters 45-54:
Sub-goal Loop invariant preservation of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 14, characters 50-58:
Sub-goal Loop invariant preservation of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 6, characters 15-43:
Sub-goal Postcondition of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 7, characters 45-54:
Sub-goal Postcondition of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/binary_search.mlw", line 8, characters 50-58:
Sub-goal Postcondition of goal binary_search'vc.
Prover result is: Valid.

** binary_search-B1
bin/why3 prove --library=bench/check-ce/petiot2018 bench/check-ce/petiot2018/experiments/binary_search-B1.mlw --apply-transform=split_vc --prover=Alt-Ergo,2.5.2,counterexamples --timelimit=15 --check-ce --rac-prover=Alt-Ergo,2.5.2 --sub-goal=:15@loop variant decrease --stepslimit=10000
File "bench/check-ce/petiot2018/experiments/binary_search-B1.mlw", line 15, characters 10-23:
Sub-goal Loop variant decrease of goal binary_search'vc.
Prover result is: Step limit exceeded.
The program does not comply to the verification goal, for example during the
  following execution:
File binary_search-B1.mlw:
  Line 3:
    Execution of main function `binary_search` with env:
      div = fun (arg_04:int) (arg_11:int) -> 0
      t = {length1= 1; elts1= fun (x:int) -> if x = 0 then 2 else 0}
      x = 0
      zero = 0
      one = 1
  Line 9:
    Normal execution of function `int_ref` with args:
      i = (-1)
File lib.mlw:
  Line 12:
    Normal execution of function `int_ref'mk` with args:
      contents = (-1)
File binary_search-B1.mlw:
  Line 10:
    Normal execution of function `length` with args:
      arg = {length1= 1; elts1= fun (x:int) -> if x = 0 then 2 else 0}
    Normal execution of function `(-)` with args:
      x = 1
      y = 1
File int.mlw:
  Line 23:
    Normal execution of function `(-_)` with args:
      _ = 1
    Normal execution of function `(+)` with args:
      _ = 1
      _ = (-1)
File binary_search-B1.mlw:
  Line 10:
    Normal execution of function `int_ref` with args:
      i = 0
File lib.mlw:
  Line 12:
    Normal execution of function `int_ref'mk` with args:
      contents = 0
File binary_search-B1.mlw:
  Line 11:
    Normal execution of function `(!)` with args:
      r = {contents= 0}
File lib.mlw:
  Line 23:
    Normal execution of function `contents` with args:
      arg = {contents= 0}
File binary_search-B1.mlw:
  Line 11:
    Normal execution of function `(!)` with args:
      r = {contents= (-1)}
File lib.mlw:
  Line 23:
    Normal execution of function `contents` with args:
      arg = {contents= (-1)}
File binary_search-B1.mlw:
  Line 11:
    Normal execution of function `(<)` with args:
      _ = (-1)
      _ = 0
    Normal iteration of loop
  Line 16:
    Normal execution of function `(!)` with args:
      r = {contents= 0}
File lib.mlw:
  Line 23:
    Normal execution of function `contents` with args:
      arg = {contents= 0}
File binary_search-B1.mlw:
  Line 16:
    Normal execution of function `(!)` with args:
      r = {contents= (-1)}
File lib.mlw:
  Line 23:
    Normal execution of function `contents` with args:
      arg = {contents= (-1)}
File binary_search-B1.mlw:
  Line 16:
    Normal execution of function `(+)` with args:
      _ = (-1)
      _ = 0
    Normal execution of function `(+)` with args:
      _ = (-1)
      _ = 1
    Normal execution of function `div` with args:
      x = 0
      y = 2
  Line 17:
    Normal execution of function `([])` with args:
      a = {length1= 1; elts1= fun (x:int) -> if x = 0 then 2 else 0}
      i = 0
File lib.mlw:
  Line 43:
    Normal execution of function `elts` with args:
      arg = {length1= 1; elts1= fun (x:int) -> if x = 0 then 2 else 0}
    Normal execution of function `(@)` with args:
      u = fun (x:int) -> if x = 0 then 2 else 0
      u = 0
File binary_search-B1.mlw:
  Line 17:
    Normal execution of function `(>)` with args:
      x = 2
      y = 0
  Line 18:
    Normal execution of function `(-)` with args:
      x = 0
      y = 1
File int.mlw:
  Line 23:
    Normal execution of function `(-_)` with args:
      _ = 1
    Normal execution of function `(+)` with args:
      _ = 0
      _ = (-1)
File binary_search-B1.mlw:
  Line 18:
    Normal execution of function `(:=)` with args:
      r = {contents= 0}
      i = (-1)
  Line 15:
    Property failure at loop variant decrease with:
      t = {length1= 1; elts1= fun (x:int) -> if x = 0 then 2 else 0}
      r = {contents= (-1)}
      r = {contents= 0}
      t = {length1= 1; elts1= fun (x:int) -> if x = 0 then 2 else 0}

File "bench/check-ce/petiot2018/experiments/binary_search-B1.mlw", line 15, characters 10-23:
Sub-goal Loop variant decrease of goal binary_search'vc.
Prover result is: Step limit exceeded.
The program does not comply to the verification goal, for example during the
  following execution:
File binary_search-B1.mlw:
  Line 3:
    Execution of main function `binary_search` with env:
      div = fun (arg_08:int) (arg_12:int) -> 0
      t = {length1= 1; elts1= fun (x:int) -> if x = 0 then (- 1) else 0}
      x = 0
      zero = 0
      one = 1
  Line 9:
    Normal execution of function `int_ref` with args:
      i = (-1)
File lib.mlw:
  Line 12:
    Normal execution of function `int_ref'mk` with args:
      contents = (-1)
File binary_search-B1.mlw:
  Line 10:
    Normal execution of function `length` with args:
      arg = {length1= 1; elts1= fun (x:int) -> if x = 0 then (- 1) else 0}
    Normal execution of function `(-)` with args:
      x = 1
      y = 1
File int.mlw:
  Line 23:
    Normal execution of function `(-_)` with args:
      _ = 1
    Normal execution of function `(+)` with args:
      _ = 1
      _ = (-1)
File binary_search-B1.mlw:
  Line 10:
    Normal execution of function `int_ref` with args:
      i = 0
File lib.mlw:
  Line 12:
    Normal execution of function `int_ref'mk` with args:
      contents = 0
File binary_search-B1.mlw:
  Line 11:
    Normal execution of function `(!)` with args:
      r = {contents= 0}
File lib.mlw:
  Line 23:
    Normal execution of function `contents` with args:
      arg = {contents= 0}
File binary_search-B1.mlw:
  Line 11:
    Normal execution of function `(!)` with args:
      r = {contents= (-1)}
File lib.mlw:
  Line 23:
    Normal execution of function `contents` with args:
      arg = {contents= (-1)}
File binary_search-B1.mlw:
  Line 11:
    Normal execution of function `(<)` with args:
      _ = (-1)
      _ = 0
    Normal iteration of loop
  Line 16:
    Normal execution of function `(!)` with args:
      r = {contents= 0}
File lib.mlw:
  Line 23:
    Normal execution of function `contents` with args:
      arg = {contents= 0}
File binary_search-B1.mlw:
  Line 16:
    Normal execution of function `(!)` with args:
      r = {contents= (-1)}
File lib.mlw:
  Line 23:
    Normal execution of function `contents` with args:
      arg = {contents= (-1)}
File binary_search-B1.mlw:
  Line 16:
    Normal execution of function `(+)` with args:
      _ = (-1)
      _ = 0
    Normal execution of function `(+)` with args:
      _ = (-1)
      _ = 1
    Normal execution of function `div` with args:
      x = 0
      y = 2
  Line 17:
    Normal execution of function `([])` with args:
      a = {length1= 1; elts1= fun (x:int) -> if x = 0 then (- 1) else 0}
      i = 0
File lib.mlw:
  Line 43:
    Normal execution of function `elts` with args:
      arg = {length1= 1; elts1= fun (x:int) -> if x = 0 then (- 1) else 0}
    Normal execution of function `(@)` with args:
      u = fun (x:int) -> if x = 0 then (- 1) else 0
      u = 0
File binary_search-B1.mlw:
  Line 17:
    Normal execution of function `(>)` with args:
      x = (- 1)
      y = 0
  Line 19:
    Normal execution of function `(:=)` with args:
      r = {contents= (-1)}
      i = 0
  Line 15:
    Property failure at loop variant decrease with:
      t = {length1= 1; elts1= fun (x:int) -> if x = 0 then (- 1) else 0}
      r = {contents= 0}
      r = {contents= 0}
      t = {length1= 1; elts1= fun (x:int) -> if x = 0 then (- 1) else 0}

** binary_search-B2
bin/why3 prove --library=bench/check-ce/petiot2018 bench/check-ce/petiot2018/experiments/binary_search-B2.mlw --apply-transform=split_vc --prover=Alt-Ergo,2.5.2,counterexamples --timelimit=15 --check-ce --rac-prover=Alt-Ergo,2.5.2 --sub-goal=:15@loop variant decrease --stepslimit=10000
File "bench/check-ce/petiot2018/experiments/binary_search-B2.mlw", line 15, characters 14-21:
Sub-goal Loop variant decrease of goal binary_search'vc.
Prover result is: Valid.

File "bench/check-ce/petiot2018/experiments/binary_search-B2.mlw", line 15, characters 14-21:
Sub-goal Loop variant decrease of goal binary_search'vc.
Prover result is: Step limit exceeded.
The following counterexample model could not be verified
  (abstract RAC terminated because missing value for return value of call to int_ref at "bench/check-ce/petiot2018/experiments/binary_search-B2.mlw", line 9, characters 10-22):
File int.mlw:
  Line 193:
    div : int -> int -> int = fun arg_07 arg_11 -> -2
File binary_search-B2.mlw:
  Line 3:
    t : int_array = {length = 1; elts = [|-2 => -1; _ => 0|]}
    x : int = 0
  Line 9:
    l : int = -1
  Line 10:
    r : int = 0
  Line 11:
    [before iteration] l : int = -1
    [before iteration] r : int = 0
  Line 15:
    [current iteration] l : int = -1
    [current iteration] l : int = -2
    [current iteration] l : int = -2
    [current iteration] r : int = 0
  Line 19:
    [current iteration] l : int = -2
File lib.mlw:
  Line 33:
    elts : int_array -> int -> int = [|_ => [|-2 => -1; _ => 0|]|]
    length : int_array -> int = [|_ => 1|]

** binary_search-B3
bin/why3 prove --library=bench/check-ce/petiot2018 bench/check-ce/petiot2018/experiments/binary_search-B3.mlw --apply-transform=split_vc --prover=Alt-Ergo,2.5.2,counterexamples --timelimit=15 --check-ce --rac-prover=Alt-Ergo,2.5.2 --sub-goal=:14@loop invariant preservation --stepslimit=10000
File "bench/check-ce/petiot2018/experiments/binary_search-B3.mlw", line 14, characters 50-58:
Sub-goal Loop invariant preservation of goal binary_search'vc.
Prover result is: Step limit exceeded.
The program does not comply to the verification goal, for example during the
  following execution:
File binary_search-B3.mlw:
  Line 3:
    Execution of main function `binary_search` with env:
      div = fun (arg_04:int) (arg_11:int) -> 0
      t = {length1= 2;
           elts1= fun (x:int) -> if x = 1 then 0 else if x = 0 then 3 else 0}
      x = 1
      zero = 0
      one = 1
  Line 9:
    Normal execution of function `int_ref` with args:
      i = (-1)
File lib.mlw:
  Line 12:
    Normal execution of function `int_ref'mk` with args:
      contents = (-1)
File binary_search-B3.mlw:
  Line 10:
    Normal execution of function `length` with args:
      arg = {length1= 2;
             elts1=
             fun (x:int) -> if x = 1 then 0 else if x = 0 then 3 else 0}
    Normal execution of function `(-)` with args:
      x = 2
      y = 1
File int.mlw:
  Line 23:
    Normal execution of function `(-_)` with args:
      _ = 1
    Normal execution of function `(+)` with args:
      _ = 2
      _ = (-1)
File binary_search-B3.mlw:
  Line 10:
    Normal execution of function `int_ref` with args:
      i = 1
File lib.mlw:
  Line 12:
    Normal execution of function `int_ref'mk` with args:
      contents = 1
File binary_search-B3.mlw:
  Line 11:
    Normal execution of function `(!)` with args:
      r = {contents= 1}
File lib.mlw:
  Line 23:
    Normal execution of function `contents` with args:
      arg = {contents= 1}
File binary_search-B3.mlw:
  Line 11:
    Normal execution of function `(!)` with args:
      r = {contents= (-1)}
File lib.mlw:
  Line 23:
    Normal execution of function `contents` with args:
      arg = {contents= (-1)}
File binary_search-B3.mlw:
  Line 11:
    Normal execution of function `(<)` with args:
      _ = (-1)
      _ = 1
    Normal iteration of loop
  Line 16:
    Normal execution of function `(!)` with args:
      r = {contents= 1}
File lib.mlw:
  Line 23:
    Normal execution of function `contents` with args:
      arg = {contents= 1}
File binary_search-B3.mlw:
  Line 16:
    Normal execution of function `(!)` with args:
      r = {contents= (-1)}
File lib.mlw:
  Line 23:
    Normal execution of function `contents` with args:
      arg = {contents= (-1)}
File binary_search-B3.mlw:
  Line 16:
    Normal execution of function `(+)` with args:
      _ = (-1)
      _ = 1
    Normal execution of function `(+)` with args:
      _ = 0
      _ = 1
    Normal execution of function `div` with args:
      x = 1
      y = 2
  Line 17:
    Normal execution of function `([])` with args:
      a = {length1= 2;
           elts1= fun (x:int) -> if x = 1 then 0 else if x = 0 then 3 else 0}
      i = 0
File lib.mlw:
  Line 43:
    Normal execution of function `elts` with args:
      arg = {length1= 2;
             elts1=
             fun (x:int) -> if x = 1 then 0 else if x = 0 then 3 else 0}
    Normal execution of function `(@)` with args:
      u = fun (x:int) -> if x = 1 then 0 else if x = 0 then 3 else 0
      u = 0
File binary_search-B3.mlw:
  Line 17:
    Normal execution of function `(>)` with args:
      x = 3
      y = 1
  Line 18:
    Normal execution of function `(-)` with args:
      x = 0
      y = 1
File int.mlw:
  Line 23:
    Normal execution of function `(-_)` with args:
      _ = 1
    Normal execution of function `(+)` with args:
      _ = 0
      _ = (-1)
File binary_search-B3.mlw:
  Line 18:
    Normal execution of function `(:=)` with args:
      r = {contents= 1}
      i = (-1)
  Line 14:
    Property failure at loop invariant preservation with:
      t = {length1= 2;
           elts1= fun (x:int) -> if x = 1 then 0 else if x = 0 then 3 else 0}
      x = 1
      r = {contents= (-1)}

File "bench/check-ce/petiot2018/experiments/binary_search-B3.mlw", line 14, characters 50-58:
Sub-goal Loop invariant preservation of goal binary_search'vc.
Prover result is: Valid.

** binary_search-B4
bin/why3 prove --library=bench/check-ce/petiot2018 bench/check-ce/petiot2018/experiments/binary_search-B4.mlw --apply-transform=split_vc --prover=Alt-Ergo,2.5.2,counterexamples --timelimit=15 --check-ce --rac-prover=Alt-Ergo,2.5.2 --sub-goal=:8@postcondition --stepslimit=10000
File "bench/check-ce/petiot2018/experiments/binary_search-B4.mlw", line 8, characters 50-58:
Sub-goal Postcondition of goal binary_search'vc.
Prover result is: Step limit exceeded.
The following counterexample model could not be verified
  (abstract RAC terminated because missing value for return value of call to int_ref at "bench/check-ce/petiot2018/experiments/binary_search-B4.mlw", line 9, characters 10-22):
File binary_search-B4.mlw:
  Line 3:
    t : int_array = {length = 1; elts = [|0 => 0; _ => 0|]}
    x : int = 1
  Line 8:
    i : int = 0
    t : int_array = {length = 1; elts = [|0 => 0; _ => 0|]}
    x : int = 1
  Line 9:
    l : int = -1
  Line 10:
    r : int = 0
  Line 11:
    l : int = -1
    r : int = -1
File lib.mlw:
  Line 33:
    elts : int_array -> int -> int = [|_ => [|0 => 0; _ => 0|]|]
    length : int_array -> int = [|_ => 1|]

