> > a) what the heck are priorities, who sets them, and do they really have
any
> > justifiable purpose?  Ie: can they just quietly vanish into the night
with
> > nobody being any the wiser?
>
> They order the rules -- or more correctly, sets of rules.
>
> Most rules are priority 500 (iirc), but some need to run earlier and some
> need to run later (e.g. AWL needs to run after all other rules).  Running
> rules earlier is how we propose to implement early-exit -- certain rules
> can run before all others, and cause an early-exit if they fire.
>
> They cannot just vanish. ;)

Let me challenge or at least prod around the edges of this a bit to further
my understanding.

I think what you are saying is that priority is used (at least in part) to
do the ordering that is known or believed to be required.  However, there
seems to be some ordering built into PMS itself, such as firing the net
rules first and then harvesting the results later.

That makes me believe that we probably have two methods of the same thing:
some rules are ordered because the pms code is written to do them in a given
order, and some rules are ordered because someone assigned a priority
somewhere.

I guess I'm mostly wondering if 'priority' as a number (at least one with a
seemingly rather fine granularity) is necessarily the way to do this.  It is
certainly general.  But I'm wondering if this is over-general, and can end
up forcing a rule ordering algorithm to make potentially bad ordering
decisions.

Might it be reasonable to do the enforced ordering based on a small set of
known rule types, and just flag the unusual rules of each special type?  The
unusual rules that come to mind just at the instant are net, bayes, and awl.
Maybe there are more, but I can't think what they would be at the moment.

While it could be argued that an enumeration is just a form of priority that
doesn't use numbers, it seems to me to have an advantage - you can change
the order that you look at the enumerated values without having to change
the values themselves.  Also, it would prevent assigning 'useless'
classifications such as priorities of 501, 502 and 503 to three user rules.

An example of why I think an enumeration might be better:  Right now all net
rules are started first, since they take longest.  But suppose we have a
rule that will score -100 and the total positive score, including net rules,
is only 100.  Clearly it makes more sense to evaluate that single -100 rule
before firing any of the net rules -- if the -100 rule triggers the net rule
scores are moot, and we have wasted significant system resources.  Doing
that with priorities would be awkward.

So: do we *really* need the existing priority structure?  Or do we just need
a method of identifying a very small number of rule classifications, eg:
bayes, awl, net?  (Anything else?)

        Loren


Reply via email to