On 10/15/2019 10:51 AM, Reuben Staley wrote: > On 10/14/19 11:01 PM, Kerim Aydin wrote: >> But are the dependencies you've identified truly circular? Many rules have >> multiple independent clauses that could very well be separated into smaller >> rules. If the "circularity" is created by a link to two entirely separate >> clauses within a rule, that could easily be separated without any change of >> function, is it really a circular reference to be concerned about? > In the dependency cycle [869, 2141, 1051, 1006], > rule 869 uses the definition of rule from 2141, > rule 2141 uses the definition of Rulekeepor from 1051, > rule 1051 uses the definition of Office from 1006, and > rule 1006 uses the definition of person from 2141. > > In three of these cases, the dependency lies not in the definition of what > is being referenced, but in phrases outside of the definition itself. For > me, it helped to model these as header files. > > 869.h > ~~~~~~~ > #include "2141.h" > ... > struct person; // doesn't reference rules here > ~~~~~~~ > > 2141.h > ~~~~~~~ > #include "1051.h" > ... > struct rule; // doesn't reference rulekeepor here > ~~~~~~~ > > 1051.h > ~~~~~~~ > #include "1006.h" > ... > struct office rulekeepor; > ~~~~~~~ > > 1006.h > ~~~~~~~ > #include "869.h" > ... > struct office; // doesn't reference persons here > ~~~~~~~ > > In this case, it's obvious that these dependencies are circular. If we do as > G. suggests and separate the definition of an entity completely from what we > can do with that entity, perhaps by moving the last three paragraphs of rule > 2141 to a new rule called "Tracking the Ruleset" most of the dependency > cycles should go away. This may give rise to new dependency cycles, but I > doubt the new situation could possibly be worse. 2141 depending on 1051 is > the cause of well over half of our current dependency cycles.
This was an interesting loop to look at. I wonder how much of this is due to rule consolidation? After all, no one sets out to write loops. For example, Person used to have a standalone Rule (R2150) devoted entirely to defining a Person (this was when we allowed corporate/contract personhood so we defined different types of persons, which made for a more complicated definition). Then it was added to R869 during a rules consolidation - where a subject was originally complicated (e.g. corporate personhood), then we remove the complicated bits (we decided to outlaw corporate personhood) and are left with a single sentence or two containing the basic concept of a natural person based on common definitions. But then thinking "this is too short to be in its own rule" we stick the text in a different rule that's somehow related (R869) - but the resulting rule ends up as an amalgam of different concepts, which increases looping. So a question (just as an example) - is the ruleset "better" if the first paragraph of R869 is a standalone rule defining a basic concept "a person is an X" where X is entirely common definitions with no ruleset references? (It can't be completely referent-free because we need a "rules to the contrary notwithstanding" in there, but does it improve things?) Cases like this are definitely worth considering for breakout IMO. -G.