Module output

Source
Expand description

Unified routines to print data

We choose to print everything to stdout. This makes sense for a tool like a proof checker whose output consists of error messages and diagnostics, not data. It is less suited for pure data processing programs like drat2bdrat, however those fail only on fatal errors where we cannot guarantee that they did not print garbage (e.g., incomplete clauses), so the user needs to handle the exit code anyway.

Structs§

Timer
A RAII object that prints a timing message when it is destroyed.

Functions§

current_executable
The basename of the current executable.
install_signal_handler
We handle SIGPIPE ourselves to avoid printing errors.
is_a_tty
Check whether we are writing to a terminal.
panic_on_error
Unwraps a result, panicking on error.
print_key_value
Write a key-value pair to stdout.
print_solution
Write a solution line ("s ...") to stdout.
unreachable
Our version of std::unreachable(), unsafe if invariants are disabled.