1 #ifndef _ANNOTATIONACTION_H
2 #define _ANNOTATIONACTION_H
4 // Annotation type definition
5 enum anno_type {PotentialCommitPoint, CommitPointDefine, CommitPointDefineCheck,
6 HBConditionCheck, InterfaceID, InterfaceCond, InterfaceCheck,
9 typedef struct cond_args {
15 This class abstracts the execution of the condition check for the
16 happpens-before relationship. For example, PutIfMatch(__RET__ != NULL) ->
17 Get. The "__RET__ != NULL" here is the HB condition.
19 class HBConditionExecutor {
21 HBConditionExecutor(void *_func_ptr, void **_args) :
27 virtual bool execute() = 0;
34 // Function pointers that abstract ID, condition, checks and actions of the
35 // interface to be done by the model checker internally
36 typedef (uint64_t) (*interface_ID_t)();
37 typedef (bool) (*interface_cond_t)();
38 typedef (void) (*interface_action_t)();
40 class InterfaceAction {
42 interface_ID_t getIDAction();
43 interface_cond_t getCondAction();
44 // If the returned action is NULL, it means no need for checking!!
45 interface_action_t getCheckAction();
46 interface_action_t getPostCheckAction();