File assert.hh¶
Assertion utilities for Mata.
This file provides macros for assertions with helpful error messages.
Defines
-
MATA_ASSERT(cond, ...)¶
Assert that a condition is true, and if not, print an error message and abort the program.
Usage:
In release builds (whenMATA_ASSERT(state < num_states, "state={}, num_states={}", state, num_states); MATA_ASSERT(state < num_states);
NDEBUGis defined), the assertions are disabled and have no effect.- Parameters:
cond – The condition to assert.
... – Optional format string and arguments for the error message.
-
namespace mata
Main namespace including structs and algorithms for all automata.
In particular, this includes:
Alphabets,
Formula graphs and nodes,
Closed sets.
-
namespace internal¶