+/*--------------------------------------------------------------.
+| Return true IFF the rule has a `number' smaller than NRULES. |
+`--------------------------------------------------------------*/
+
+bool
+rule_useful_p (rule_t *r)
+{
+ return r->number < nrules;
+}
+
+
+/*-------------------------------------------------------------.
+| Return true IFF the rule has a `number' higher than NRULES. |
+`-------------------------------------------------------------*/
+
+bool
+rule_useless_p (rule_t *r)
+{
+ return r->number >= nrules;
+}
+
+
+/*--------------------------------------------------------------------.
+| Return true IFF the rule is not flagged as useful *and* is useful. |
+| In other words, it was discarded because of conflicts. |
+`--------------------------------------------------------------------*/
+
+bool
+rule_never_reduced_p (rule_t *r)
+{
+ return !r->useful && r->number < nrules;
+}
+
+