Documentation

According To Block

According To Block

Where Is It?

The According To block is located in the exceptions drawer of the Blawx toolbox.

What Does It Do?

The According To block is used to state that (or query whether) a given conclusion was reached by a given section of the rules. This is used in order to allow the user to specify how to deal with defaults and exceptions, and do allow the user to see how individual sections of a law would have treated a fact scenario if not for other sections that overruled them.

Technical Details

According to is a statement block, which can be stacked vertically with other statements. Its input connection accepts only a block that returns one or more sections, or a variable. Right now there is no way in blawx to assign a section value to a variable, so the only variable block that should be used is the "any" variable block. It also accepts a single statements block, which is the conclusion that the statement relates to.

When used in a conclusion or a fact, it states that the given section has reached the given conclusion. When used in a query, it searches for a matching conclusion reached by a matching section.

Tips

In order to simplify coding, a Rule block, pre-loaded with an According To and the current section's selector, is added to the primary drawer in the Code Editor. You will frequently want to use these three blocks together, so they are combined for convenience.

Even if you are not using exceptions and defaults, using the "According To" block can add links to the legislative text to the explanations generated by your code. You just need to also run queries using the "Holds" block.