ontologies

Parsing procedure maps with step types

We are in the process of redesigning the Procedure Ontology to use typed steps rather than route types.

The step can be a business step, a decision step, a summation step, a type of logic step or a type of arithmetic step. Logic steps have a type of NOT, AND or OR. Arithmetic steps have a type of SUM, INCREMENT or EQUALS.

Labels for non-business steps are not in themselves meaningful. The labels facilitate conversations about the routes between steps, for example ‘the step AA NOT is linked to BA AND’.

Business steps in a work package are in one of four current states and in one of four potential states. Current states are determined by actualisation and potential states as a result of parsing.

Any combination of one current state and one potential state is possible.

Current states of a business step

Business steps are in one of three current states:

Parsing work packages

Ruby code for the parsing of a work package with step types is here.

Routes from business steps

A business step with an input being UNTRAVERSABLE has all outputs being UNTRAVERSABLE.

A business step without an input being UNTRAVERSABLE …

Decision steps

Decision steps modify routes to distinguish between target business steps that are allowed to be actualised and those that are caused to be actualised, for example: a statutory instrument being laid into the House of Commons and the House of Lords will cause the Joint Committee on Statutory Instruments to consider that instrument. The JCSI having considered the instrument, or scrutiny reserve for the JCSI being dispensed with, allows the Government to table an approval motion.

A decision step with an input value of TRUE will output a value of ALLOWS. A decision step with an input value of NULL, FALSE or UNTRAVERSABLE, will act as transparent - the output being the same as the input.

The truth table for a decision step is:

Decision step
TRUE ALLOWS
FALSE FALSE
NULL NULL
UNTRAVERSABLE UNTRAVERSABLE

It is expected that decision steps will output a route directly into a business step without any intervening logic, arithmetic or summation steps: these will never have an input with a value of ALLOWS.

A business step with an input value of TRUE is caused to happen. A business step with an input value of ALLOWS is allowed to happen. A business step with an input value of FALSE, NULL or UNTRAVERSABLE, is neither allowed nor caused to happen.

Logic steps

The logic steps take one input or two inputs and emit one output. A value is called NULL, TRUE, FALSE or UNTRAVERSABLE. Truth tables for the logic steps are:

NOT steps

NOT
TRUE FALSE
FALSE TRUE
NULL NULL
UNTRAVERSABLE UNTRAVERSABLE

AND steps

AND
TRUE FALSE NULL UNTRAVERSABLE
TRUE TRUE FALSE TRUE UNTRAVERSABLE
FALSE FALSE FALSE FALSE UNTRAVERSABLE
NULL TRUE FALSE NULL UNTRAVERSABLE
UNTRAVERSABLE UNTRAVERSABLE UNTRAVERSABLE UNTRAVERSABLE UNTRAVERSABLE

OR steps

OR
TRUE FALSE NULL UNTRAVERSABLE
TRUE TRUE TRUE TRUE TRUE
FALSE TRUE FALSE FALSE UNTRAVERSABLE
NULL TRUE FALSE NULL UNTRAVERSABLE
untraversable TRUE UNTRAVERSABLE UNTRAVERSABLE UNTRAVERSABLE

A NULL value entering a logic step renders that step ‘transparent’:

Arithmetic steps

An arithmetic step is a SUM step, an INCREMENT step or an EQUALS step.

Arithmetic steps take the actualisation counts from business steps and - by means of an EQUALS step - output a TRUE or FALSE as an input to a business step, a decision step, a logic step or a summation step.

A SUM step directly follows a business step, a SUM step or an INCREMENT step, having no intervening steps. A SUM step takes two input routes and sums the two counts. The summed count is emitted on the outbound route of the SUM step. The target of the outbound route of a SUM step is an arithmetic step or a summation step.

An INCREMENT step directly follows a business step, a SUM step or an INCREMENT step, having no intervening steps. An INCREMENT step takes one input route and adds one to the count. The incremented count is emitted on the outbound route of the INCREMENT step. The target of the outbound route of an INCREMENT step is an arithmetic step or a summation step.

An EQUALS step takes two input routes - each route from a business step, a SUM step or an INCREMENT step - and evaluates whether the two counts are equal. If the two counts are equal, the EQUALS step emits a TRUE. If the two counts are not equal, the EQUALS step emits a FALSE. The target of the outbound route of an EQUALS step is a business step, a decision step, a logic step or a summation step.

Summation steps

A summation step ‘points backwards’ at the routes leading to it, describing a condition that may be reached depending on the actualisation state of preceding business steps, routes traversed and operations of logical or arithmetic steps encountered.

The description of a summation step describes a condition that is true if the input route to that step is TRUE.

Summation steps take one input and have one or more outputs.

Summation steps are ‘transparent’, taking the ‘current’, ‘status’, ‘parsed’ and ‘actualisation count’ attributes of the inbound route and emitting the same values on all outbound routes.

Routes to business steps

Business steps are in one of four potential states:

Parse passes

The parsing code will always make a parse pass along any route it encounters regardless of whether all inbound routes to its source step have been completely parsed. This processing leads to a distinction between a route having been subject to a parse pass and a route being completely parsed.

A route is only available to be completely parsed when all inbound routes to the source step of that route have been completely parsed.

AND steps, OR steps and SUM steps have two inbound routes: both are required to be completely parsed before the outbound route can be completely parsed.

Multiple parse passes are required in order to completely parse a route whose source is an AND step, an OR step or an EQUALS step.

Visualising a work package

A work package can be visualised using the procedure maps: this allows a view of what has already occurred, what is scheduled to occur and what the procedure map says must or may occur.

Visualisation of a work package has four layers: the procedure map, the parsing logic, the control over what to show and the visual appearance.

Parsing a work package assigns values to routes and potential states to steps. Both routes and steps can be shown or hidden according to the assigned values and states.

Showing or hiding routes and steps

It is possible to show or hide a set of business steps which share the same current or potential states, for example: ‘show all business steps which have the state ALLOW TO BE ACTUALISED’.

It is possible to show or hide a set of non-business steps which share an input route or routes with the same values, for example: ‘hide all AND steps with one or both input routes having a value of NULL’.

It is possible to show or hide a set of routes which share the same state, for example: ‘show all routes which have the value TRUE’.

Examples of visibility control

Validating inputs and outputs to steps

Each type of step has a fixed number of inputs and a fixed number of outputs.

Step type Input count Output count
Business step 1 0, 1 or more than 1
Decision step 1 1
Logical NOT 1 1
Logical AND 2 1
Logical OR 2 1
Arithmetic SUM 2 1
Arithmetic INCREMENT 1 1
Arithmetic EQUALS 2 1
Summation 1 1 or more than 1

Why are some steps redundant?

Some business steps may appear redundant, for example: the draft negative statutory instrument map has an ‘Instrument made (signed into law)’ step preceded by a decision step. The route to the decision step being true, this allows making.

Preceding the decision step is a business step labelled ‘Instrument can be made (signed into law)’ which is a duplication of the logic described above.

This latter step exists because the website does not yet display future possible steps. If it were to do so, such steps would no longer be needed and would be removed from the procedure maps and data.

Procedure conclusion

Procedure conclusion steps can only be brought into play by a route from a procedural step happening within Parliament. This may be a step in the House of Commons or a step in the House of Lords or a bicameral step. Procedure conclusion steps should not be brought into play by steps happening outside of Parliament, for example: an ‘Instrument remains law’ step.