1 #ifndef __PREDICTAE_H__
2 #define __PREDICATE_H__
7 unsigned int pred_expr_hash (struct pred_expr *);
8 bool pred_expr_equal(struct pred_expr *, struct pred_expr *);
9 typedef HashSet<struct pred_expr *, uintptr_t, 0, model_malloc, model_calloc, model_free, pred_expr_hash, pred_expr_equal> PredSet;
10 typedef HSIterator<struct pred_expr *, uintptr_t, 0, model_malloc, model_calloc, model_free, pred_expr_hash, pred_expr_equal> PredSetIter;
12 typedef enum predicate_token {
16 /* If token is EQUALITY, then the predicate asserts whether
17 * this load should read the same value as the last value
18 * read at memory location specified in predicate_expr.
21 pred_expr(token_t token, void * location, bool value) :
37 Predicate(FuncInst * func_inst);
40 FuncInst * get_func_inst() { return func_inst; }
41 PredSet * get_predicates() { return &predicates; }
42 void add_predicate(token_t token, void * location, bool value);
43 void add_child(Predicate * child);
45 void print_predicate();
46 void print_pred_subtree();
51 /* may have multiple precicates */
53 ModelVector<Predicate *> children;
56 #endif /* __PREDICATE_H__ */