fix mutex_trylock bug
[c11tester.git] / predicate.h
index 0512835f6aadfbcab4ce7689dfd3e43ce689a863..cc9f714d567208a743876a894fe276bff1aa1b60 100644 (file)
@@ -28,7 +28,7 @@ public:
        void set_weight(double weight_) { weight = weight_; }
        void copy_predicate_expr(Predicate * other);
 
-       Predicate * get_single_child(FuncInst * inst);
+       Predicate * follow_write_child(FuncInst * inst);
        ModelVector<Predicate *> * get_children() { return &children; }
        Predicate * get_parent() { return parent; }
        Predicate * get_exit() { return exit; }
@@ -38,20 +38,19 @@ public:
        bool is_entry_predicate() { return entry_predicate; }
        void set_entry_predicate() { entry_predicate = true; }
 
-       void alloc_pre_exit_predicates();
-       void add_pre_exit_predicate(Predicate * pred);
-
        /* Whether func_inst does write or not */
        bool is_write() { return does_write; }
        void set_write(bool is_write) { does_write = is_write; }
 
-       ConcretePredicate * evaluate(inst_act_map_t * inst_act_map, thread_id_t tid);
+       ConcretePredicate * evaluate(thread_id_t tid);
 
        uint32_t get_expl_count() { return exploration_count; }
+       uint32_t get_fail_count() { return failure_count; }
        uint32_t get_store_visible_count() { return store_visible_count; }
        uint32_t get_total_checking_count() { return total_checking_count; }
 
        void incr_expl_count() { exploration_count++; }
+       void incr_fail_count() { failure_count++; }
        void incr_store_visible_count() { store_visible_count++; }
        void incr_total_checking_count() { total_checking_count++; }
 
@@ -73,6 +72,7 @@ private:
        double weight;
 
        uint32_t exploration_count;
+       uint32_t failure_count;
        uint32_t store_visible_count;
        uint32_t total_checking_count;  /* The number of times the store visibility is checked */
 
@@ -84,9 +84,6 @@ private:
        Predicate * parent;
        Predicate * exit;
 
-       /* Predicates precede exit nodes. Only used by exit predicates */
-       ModelVector<Predicate *> * pre_exit_predicates;
-
        /* May have multiple back edges, e.g. nested loops */
        PredSet backedges;
 };