Let's say we have the following business requirement for a derivation:
rule: On any given date, a person is considered to be a
lone parent of a minor if, on that date, the person is:
- not married; and
- has a dependent who is younger than 16 years of age.
From this simple requirement, it is possible to construct a simple truth table for whether a person is considered to be a lone parent of a minor, on a given date:
Figure 1. Truth Table for Lone parent of a minor rule
Let's introduce a narrative for an example real-world change of circumstances. On 1st January 2001, Mary and Joe marry. Joe has a son, James, from a previous marriage which ended in divorce on 30th November 1998. James was born on 1st June 1990. On 30th April 2004, Joe sadly dies (and so Mary's marriage ends in widowhood).
We can use the truth table above to determine whether each of the persons is considered to be a lone parent of a minor on various dates:
- On 1st October 1997 (to pick a date somewhat at random), Mary is not a lone parent of a minor because on that date she is not married, but she does not have any dependents;
- On 2nd October 1997 Mary is still not a lone parent of a minor, as her circumstances haven't changed since the day before;
- On 30th November 1998 Joe is not a lone parent of a minor, because on that date his son was under 16 but Joe was still married;
- On 1st December 1998 Joe becomes a lone parent of a minor, because on that date his son was still under 16 but Joe was no longer married;
- On 1st January 2001 Mary is still not a lone parent of a minor; although she now has a dependent under 16, she is now married, so for slightly different reasons that earlier she is still not a lone parent;
- On 1st January 2001 Joe is no longer a lone parent of a minor; although he still has a dependent under 16, he is now married again;
- On 1st May 2004 Mary becomes a lone parent of a minor, because her marriage ended due to Joe's death, but James is still her dependent and is under 16;
- On 1st June 2006 Mary stops being a lone parent of a minor, because James turns 16;
- On 1st March 2009 (again somewhat at random) James is not a lone parent of a minor because although he is unmarried, he has no dependents.
Note that we have to evaluate the truth table for various dates in order to build up a picture of when each person is or is not a lone parent of a minor. To some extent, we either have to try dates which we suspect might be "interesting", or try out dates somewhat at random. For example, we suspected that Mary's date of marriage might be interesting, but it turns out that her marriage to Joe does not affect her lone-parent-of-a-minor status. However, Joe's lone-parent-of-a-minor status does change when he marries Mary. We didn't think to test whether Joe was a lone parent of a minor on dates before James was born.