Z3
Global.cs
Go to the documentation of this file.
1 /*++
2 Copyright (c) 2012 Microsoft Corporation
3 
4 Module Name:
5 
6  Global.cs
7 
8 Abstract:
9 
10  Z3 Managed API: Global Functions
11 
12 Author:
13 
14  Christoph Wintersteiger (cwinter) 2013-01-15
15 
16 Notes:
17 
18 --*/
19 
20 using System;
21 using System.Runtime.InteropServices;
22 using System.Diagnostics.Contracts;
23 
24 namespace Microsoft.Z3
25 {
33  public static class Global
34  {
51  public static void SetParameter(string id, string value)
52  {
53  Native.Z3_global_param_set(id, value);
54  }
55 
65  public static string GetParameter(string id)
66  {
67  IntPtr t;
68  if (Native.Z3_global_param_get(id, out t) == 0)
69  return null;
70  else
71  return Marshal.PtrToStringAnsi(t);
72  }
73 
74 
82  public static void ResetParameters()
83  {
84  Native.Z3_global_param_reset_all();
85  }
86 
92  public static void ToggleWarningMessages(bool enabled)
93  {
94  Native.Z3_toggle_warning_messages((enabled) ? 1 : 0);
95  }
96 
104  public static void EnableTrace(string tag)
105  {
106  Native.Z3_enable_trace(tag);
107  }
108 
116  public static void DisableTrace(string tag)
117  {
118  Native.Z3_disable_trace(tag);
119  }
120  }
121 }
using System