Z3
Static Public Member Functions
Log Class Reference

Static Public Member Functions

static boolean open (String filename)
 
static void close ()
 
static void append (String s)
 
static boolean isOpen ()
 

Detailed Description

Interaction logging for Z3. Remarks: Note that this is a global, static log and if multiple Context objects are created, it logs the interaction with all of them.

Definition at line 26 of file Log.java.

Member Function Documentation

◆ append()

static void append ( String  s)
inlinestatic

Appends the user-provided string

s

to the interaction log.

Exceptions
Z3Exception

Definition at line 56 of file Log.java.

57  {
58  if (!m_is_open)
59  throw new Z3Exception("Log cannot be closed.");
60  Native.appendLog(s);
61  }

◆ close()

static void close ( )
inlinestatic

Closes the interaction log.

Definition at line 45 of file Log.java.

46  {
47  m_is_open = false;
48  Native.closeLog();
49  }

◆ isOpen()

static boolean isOpen ( )
inlinestatic

Checks whether the interaction log is opened.

Returns
True if the interaction log is open, false otherwise.

Definition at line 68 of file Log.java.

69  {
70  return m_is_open;
71  }

◆ open()

static boolean open ( String  filename)
inlinestatic

Open an interaction log file.

Parameters
filenamethe name of the file to open
Returns
True if opening the log file succeeds, false otherwise.

Definition at line 36 of file Log.java.

37  {
38  m_is_open = true;
39  return Native.openLog(filename) == 1;
40  }