Z3
src
api
dotnet
Log.cs
Go to the documentation of this file.
1
/*++
2
Copyright (c) 2012 Microsoft Corporation
3
4
Module Name:
5
6
Log.cs
7
8
Abstract:
9
10
Z3 Managed API: Log
11
12
Author:
13
14
Christoph Wintersteiger (cwinter) 2012-03-15
15
16
Notes:
17
18
--*/
19
20
using
System.Diagnostics;
21
using
System;
22
23
namespace
Microsoft.Z3
24
{
32
public
static
class
Log
33
{
34
private
static
bool
m_is_open =
false
;
35
41
public
static
bool
Open(
string
filename)
42
{
43
m_is_open =
true
;
44
return
Native.Z3_open_log(filename) == 1;
45
}
46
50
public
static
void
Close()
51
{
52
m_is_open =
false
;
53
Native.Z3_close_log();
54
}
55
59
public
static
void
Append(
string
s)
60
{
61
Debug.Assert(isOpen());
62
63
if
(!m_is_open)
64
throw
new
Z3Exception(
"Log cannot be closed."
);
65
Native.Z3_append_log(s);
66
}
67
72
public
static
bool
isOpen()
73
{
74
return
m_is_open;
75
}
76
}
77
}
Microsoft.Z3
Definition:
AlgebraicNum.cs:27
Generated on Sat Jun 4 2022 15:24:57 for Z3 by
1.9.3