Go to the documentation of this file.
32 #ifndef TESLA_MACROS_H
33 #define TESLA_MACROS_H
47 #define TESLA_WITHIN(function, expression) \
49 callee(called(function)), \
50 callee(returned(function)), \
55 #define TESLA_ASSERT(locality, start, end, expression) \
56 __tesla_inline_assertion( \
57 __FILE__, __LINE__, __COUNTER__, \
58 locality, start, end, expression \
62 #define TESLA_GLOBAL(...) TESLA_ASSERT(__tesla_global, __VA_ARGS__)
65 #define TESLA_PERTHREAD(...) TESLA_ASSERT(__tesla_perthread, __VA_ARGS__)
68 #define TIGNORE __tesla_ignore
71 #define TSEQUENCE(...) __tesla_sequence(TIGNORE, __VA_ARGS__)
73 #define called(...) __tesla_call(((void)__VA_ARGS__, TIGNORE))
74 #define returned(...) __tesla_return(__VA_ARGS__)
76 #define callee(...) __tesla_callee(TIGNORE, __VA_ARGS__)
77 #define caller(...) __tesla_caller(TIGNORE, __VA_ARGS__)
78 #define strict(...) __tesla_strict(TIGNORE, __VA_ARGS__)
79 #define conditional(...) __tesla_conditional(TIGNORE, __VA_ARGS__)
81 #define flags(...) __tesla_flags(__VA_ARGS__)
82 #define bitmask(...) __tesla_mask(__VA_ARGS__)
84 #define TESLA_NOW __tesla_now
87 #define TESLA_STRUCT_AUTOMATON(...) __tesla_struct_usage(__VA_ARGS__)
89 #define automaton(name, ...) __tesla_automaton(name, __VA_ARGS__)
90 #define tesla_done return (__tesla_automaton_done())
92 #define optional(...) __tesla_optional(TIGNORE, __VA_ARGS__)
93 #define ANY_REP INT_MAX
94 #define REPEAT(m, n, ...) __tesla_repeat(m, n, __VA_ARGS__)
95 #define UPTO(n, ...) __tesla_repeat(0, n, __VA_ARGS__)
96 #define ATLEAST(n, ...) __tesla_repeat(n, ANY_REP, __VA_ARGS__)
97 #define ANY(int_type) __tesla_any(int_type)
100 #define previously(...) TSEQUENCE(__VA_ARGS__, TESLA_NOW)
103 #define eventually(...) TSEQUENCE(TESLA_NOW, __VA_ARGS__)