Skip to content

Commit

Permalink
Fix Ocaml bindings FuncEntry to_string (#6639)
Browse files Browse the repository at this point in the history
Hello, I was looking at the different api string conversions for FuncEntry and I believe that the ml version is incorrect? Clearly we want the argument(`c`) to be comma separated from the accumulated string `p`. The current implementation just so happens to have most of the arguments separated, but the order is flipped and one of the commas is misplaced.
  • Loading branch information
Pat-Lafon committed Mar 27, 2023
1 parent ce09c2e commit 0a59617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/ml/z3.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1542,7 +1542,7 @@ struct

let to_string (x:func_entry) =
let a = get_args x in
let f c p = (p ^ (Expr.to_string c) ^ ", ") in
let f c p = ((Expr.to_string c) ^ ", " ^ p) in
"[" ^ List.fold_right f a ((Expr.to_string (get_value x)) ^ "]")
end

Expand Down

0 comments on commit 0a59617

Please sign in to comment.