8 typedef std::pair<realnumber, bool>
duration;
13 #define make_duration(r, b) std::make_pair((realnumber)r, b) 16 return make_duration(lhs.first + rhs.first, lhs.second || rhs.second);
20 return make_duration(lhs.first * rhs.first, lhs.second || rhs.second);
24 #define b3_to_b4(b3) \ 25 (b3 == T_TRUE) ? FV_TRUE : ((b3 == T_FALSE) ? FV_FALSE : FV_UNKNOWN) 28 #define b4_to_b3(b4) \ 29 (b4 == FV_TRUE) ? T_TRUE : ((b4 == FV_FALSE) ? T_FALSE : T_UNKNOWN) 32 #define b3_or(b31, b32) \ 33 (b31 == T_TRUE || b32 == T_TRUE) \ 35 : ((b31 == T_FALSE && b32 == T_FALSE) ? T_FALSE : T_UNKNOWN) 39 ((b3 == T_TRUE) ? T_FALSE : ((b3 == T_FALSE) ? T_TRUE : T_UNKNOWN)) 42 #define b3_lessthan(n1, n2) \ 43 ((std::get<1>(n1) || std::get<1>(n2)) \ 45 : ((std::get<0>(n1) < std::get<0>(n2)) ? T_TRUE : T_FALSE)) 47 #define ASSERT_RMTLD3(l) assert(l) 49 #ifndef USE_DEBUGV_RMTLD3 50 #define DEBUGV_RMTLD3(...) 58 #define DEBUGV_RMTLD3(cformat, ...) \ 60 std::string str(cformat); \ 61 const char *x, *y, *z = NULL; \ 63 x = strchr(cformat, '$'); \ 65 str.erase(std::remove(str.begin(), str.end(), '$'), str.end()); \ 66 for (int i = 0; i < ident; i++) \ 71 y = strchr(cformat, '@'); \ 73 str.erase(std::remove(str.begin(), str.end(), '@'), str.end()); \ 75 for (int i = 0; i < ident; i++) \ 79 z = strchr(cformat, '\n'); \ 84 if (x == NULL && y == NULL && r == 0) { \ 87 for (int i = 0; i < ident; i++) \ 90 ::printf(str.c_str(), ##__VA_ARGS__); \ 94 #ifndef USE_DEBUG_RMTLD3 95 #define DEBUG_RTMLD3(...) 97 #define DEBUG_RTMLD3(args...) ::printf(args) 101 (res == T_TRUE) ? "true" : ((res == T_FALSE) ? "false" : "unknown") 106 : ((fv == FV_FALSE) ? "false" \ 107 : ((fv == FV_UNKNOWN) ? "unknown" : "symbol"))
duration mult_dur(const duration &lhs, const duration &rhs)
Definition: rmtld3.h:19
four_valued_type
Definition: rmtld3.h:11
std::pair< realnumber, bool > duration
Definition: rmtld3.h:8
three_valued_type
Definition: rmtld3.h:10
float realnumber
Definition: rmtld3.h:7
duration sum_dur(const duration &lhs, const duration &rhs)
Definition: rmtld3.h:15
#define make_duration(r, b)
Definition: rmtld3.h:13
int count_until_iterations
unsigned int proposition
Definition: rmtld3.h:6