Decision tables are a concise visual representation for specifying which actions to perform depending on given conditions wikipedia.
outlook | temperature | precipitation | wind | outcome |
---|---|---|---|---|
any | unbearable | any | any | don't play |
overcast | any | any | stormy | don't play |
sunny | positive | any | calm | play |
any | positive | showers | any | don't play |
Default | play |
The columns in such table represent decision domains. Cells represent a predicate about such domain. This should be a node in the domain representation tree:
outlooks | temperatures | precipitations | winds |
---|---|---|---|
|
|
|
|
So we can always test with some exact (leaf in the tree) conditions:
- overcast, +17˚C, light showers, light breeze – results in "don't play" since the 4th line
- sunny, +5˚C, heavy showers, calm – results in "play" despite line 4, since matches line 3