From 0a59617bac66ceda59f50d67ea036ec75bb72bb7 Mon Sep 17 00:00:00 2001 From: Patrick LaFontaine <32135464+Pat-Lafon@users.noreply.github.com> Date: Mon, 27 Mar 2023 16:04:32 -0400 Subject: [PATCH] Fix Ocaml bindings FuncEntry to_string (#6639) 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. --- src/api/ml/z3.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/ml/z3.ml b/src/api/ml/z3.ml index ac21902fe6c..4c8b0322a95 100644 --- a/src/api/ml/z3.ml +++ b/src/api/ml/z3.ml @@ -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