Skip to content

Reference

Tax Code "Rule-as-Code" Engine glossary

Terms used in Tax Code "Rule-as-Code" Engine and its documentation.

Applies to Tax Code "Rule-as-Code" Engine as it works today. Moraph updates the platform continuously, and this page is reviewed when it changes.

Last reviewed 4 min readReport a problem

Terms used in Tax Code "Rule-as-Code" Engine and its documentation.

TermMeaning
RuleA provision written as declared inputs and calculation steps that people can read and the engine can work through step by step.
Rule versionOne approved state of a rule, numbered and kept unchanged with its SHA-256. A new version starts from the approved one in drafting.
StepOne line of a rule: a name, an expression using the inputs and earlier steps, and the clause it implements in square brackets.
Clause citationThe clause of statute, regulation or guidance a step or input implements, written by your specialists.
Worked exampleA constructed scenario with an expected result, used to test a rule without taxpayer data.
Interpretation questionA recorded question about how a clause should be read, answered by someone other than the person who raised it and kept with the rule.
Release packageA JSON file of approved rule versions with release notes, published once and identified by its SHA-256.
Test releaseA release on the Test channel, for consuming teams to try before the same versions go into a production release.
TraceThe step-by-step explanation of a result, showing each step's value, the conditions met and the clause behind it.
Version in forceThe highest approved version whose effective dates cover a given date.
Legal sourceThe text of a provision loaded clause by clause, with each change kept as a numbered version.
Shared definitionA named number, yes/no, rate schedule or lookup table with values by date, approved once and used by rules by its name.
Clause coverageWhich clauses of a legal source have a rule or definition citing them.
Condition coverageWhether the worked examples have taken each if-condition in a rule both ways.
Consuming systemA system that loads release packages; its team reports test results and adoption.
Rate scheduleA shared definition holding brackets, each starting at an amount with a rate or value. marginal charges each slice of an amount at its bracket's rate; band gives the value of the bracket the amount falls in.
ExceptionA line under a step giving a different value when a condition holds, with its own clause. Two exceptions that apply and give different values stop the run.
Boundary checkWhether the worked examples try each comparison of two numbers with the sides equal and with the left side lower and higher.
Reading documentA rule written out in words beside the legal text, for the draft or any approved version. Each version approved from this release on keeps the words produced from its steps at approval.
What-if casesConstructed cases run against two versions of a rule to see which results a change moves. Nothing is saved unless a person with the User role keeps a case as a worked example, giving its expected result.
Lookup tableA shared definition holding an amount for each value of a choice, by date. lookup(table, choice) gives the amount on that value's row; a value with no row stops the run.
Rule result used by another ruleAn input declared as rule RULE-… takes that rule's approved result, worked out from the inputs of the same names. The rule used may itself use other rules' results (a chain, up to five rules deep). The version used, and every version in its chain, is pinned when the using rule is approved, and a release must hold them too.
Relative toleranceOn a worked example, the difference allowed as a percentage of the expected value; the larger of it and the tolerance applies.
Choice coverageFor each value of each choice input, how many worked examples try it, and whether each lookup table read with it has a row on every date.
Combination coverageFor each pair of choice inputs, how many of their value combinations the worked examples try, and the combinations none tries (for a pair with more than 100 combinations, only the count tried). Every combination, with how many examples try it, downloads as CSV. For three choice inputs with up to 60 combinations, the same is shown for all three together.
Exception conflictTwo exceptions to the same step that can both apply to one set of input values and give different results; a case meeting both stops with an error. Conditions on choice and yes or no inputs, and number inputs compared with a fixed amount, are worked out, joined with and, or and not. An earlier yes or no step with no exceptions of its own is read as its own condition, and an earlier number step with none that is one number input moved or scaled by fixed amounts (taxable = income - 1000) is read through to that input. Where a condition also tests dates, other earlier steps or numbers against each other, the pair is shown as a possible conflict. On the workbench, a number compared with a definition is read with the definition's approved value on the rule's effective date; such a pair is shown as a possible conflict with the value, and never stops legal review. A release's page reads the value pinned in each rule version instead, on the version's effective date.

Was this page helpful?

Report a problem with this page
What’s the problem?
Quote the step or heading if you can. Don’t include passwords or personal records.
Only if you’d like a reply. We use it for this report and nothing else.

Need help with your own setup rather than this page? Raise a support ticket.