STAMINA/STORM 0.1
Infinite state-space truncator which generates a probability within a window
StaminaMessages.h
1#ifndef STAMINA_CORE_STAMINAMESSAGES_H
2#define STAMINA_CORE_STAMINAMESSAGES_H
3
4#include <string>
5#include <stdint.h>
6#include <fstream>
7#include <iostream>
8
9// #define DEBUG_PRINTS
10// #define DEBUG_PRINTS_VERBOSE
11
12#ifdef DEBUG_PRINTS_VERBOSE
13 #define DEBUG_PRINTS
14#endif
15
16// Efficient debug printing method to std::cout that can be easily turned off without having to get
17// rid of all instances of StaminaMessages::debugPrint("Some message") or whatever
18#ifdef DEBUG_PRINTS
19 #define STAMINA_DEBUG_MESSAGE(x) std::cout << x << std::endl;
20#endif // DEBUG_PRINTS
21
22namespace stamina {
23 namespace core {
24 /* ERRORS WE CAN GET */
25 enum STAMINA_ERRORS {
26 ERR_GENERAL = 1
27 , ERR_SEVERE = 2
28 , ERR_MEMORY_EXCEEDED = 137
29 };
30 /* All result information */
32 double pMin;
33 double pMax;
34 uint32_t numberStates;
35 uint8_t numberInitial;
36 std::string property;
37 };
39 public:
43 static void errorAndExit(std::string err, uint8_t err_num = STAMINA_ERRORS::ERR_GENERAL);
47 static void error(std::string err, uint8_t err_num = STAMINA_ERRORS::ERR_GENERAL);
51 static void warning(std::string warn);
55 static void info(std::string info);
59 static void good(std::string good);
60 #ifdef DEBUG_PRINTS
64 static void debugPrint(std::string msg);
65 #endif
66 static void writeResults(ResultInformation resultInformation, std::ostream out);
67 protected:
68 static const std::string horizontalSeparator;
69 };
70 } // namespace core
71 typedef core::StaminaMessages StaminaMessages; // Allow users to use messages without the `core` namespace
72} // namespace stamina
73
74/* Logging and debugging messages */
75#ifdef DEBUG_PRINTS
76 #define STAMINA_DEBUG_LOG(x)
77#else
78
79#endif // DEBUG_PRINTS
80#endif // STAMINA_CORE_STAMINAMESSAGES_H
Definition: StaminaMessages.h:38
static void errorAndExit(std::string err, uint8_t err_num=STAMINA_ERRORS::ERR_GENERAL)
Definition: StaminaMessages.cpp:18
static void info(std::string info)
Definition: StaminaMessages.cpp:38
static void error(std::string err, uint8_t err_num=STAMINA_ERRORS::ERR_GENERAL)
Definition: StaminaMessages.cpp:26
static void warning(std::string warn)
Definition: StaminaMessages.cpp:33
static void good(std::string good)
Definition: StaminaMessages.cpp:43
Definition: ExplicitTruncatedModelBuilder.cpp:40
Definition: StaminaMessages.h:31