3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-19 23:14:40 +00:00

Add set_ast_print_mode() to Python, C#, and TypeScript bindings (#8166)

* Initial plan

* Add set_ast_print_mode to Python and PrintMode getter to C#

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Add setPrintMode to TypeScript Context API

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
Copilot 2026-01-11 21:20:32 -08:00 committed by Nikolaj Bjorner
parent aaec2e032e
commit 7bb05374a4
4 changed files with 45 additions and 1 deletions

View file

@ -3569,7 +3569,12 @@ namespace Microsoft.Z3
/// <seealso cref="Sort.ToString()"/>
public Z3_ast_print_mode PrintMode
{
set { Native.Z3_set_ast_print_mode(nCtx, (uint)value); }
get { return m_print_mode; }
set
{
Native.Z3_set_ast_print_mode(nCtx, (uint)value);
m_print_mode = value;
}
}
#endregion
@ -5117,6 +5122,7 @@ namespace Microsoft.Z3
internal Native.Z3_error_handler m_n_err_handler = null;
internal static Object creation_lock = new Object();
internal IntPtr nCtx { get { return m_ctx; } }
private Z3_ast_print_mode m_print_mode = Z3_ast_print_mode.Z3_PRINT_SMTLIB2_COMPLIANT;
internal void NativeErrorHandler(IntPtr ctx, Z3_error_code errorCode)
{