Able to evaluate predicate expression against a 'context' and generate concrete predi...
[c11tester.git] / predicate.h
index 4243a0d..6c83683 100644 (file)
@@ -44,6 +44,19 @@ struct half_pred_expr {
        SNAPSHOTALLOC
 };
 
+struct concrete_pred_expr {
+       concrete_pred_expr(token_t token, uint64_t value, bool equality) :
+               token(token),
+               value(value),
+               equality(equality)
+       {}
+
+       token_t token;
+       uint64_t value;
+       bool equality;
+
+       SNAPSHOTALLOC
+};
 
 class Predicate {
 public:
@@ -70,6 +83,8 @@ public:
        bool is_write() { return does_write; }
        void set_write(bool is_write) { does_write = is_write; }
 
+       SnapVector<struct concrete_pred_expr> evaluate(inst_act_map_t * inst_act_map);
+
        void print_predicate();
        void print_pred_subtree();