Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added example with pictures, and boolean algebra laws that are applied

...

This rule checks whether boolean logic in an expression can be simplified. If so, the simplified expression is reported as issue.

It applies common laws of boolean algebra, like

  • the distributive law: (A OR B) AND (A OR C) = A AND (B OR C)
  • the absorption law: A OR (A AND B) = A
  • the absorption law: A AND (A OR B) = A
  • the double negation law: NOT ( NOT A ) = A
  • ...

Possible solution

See if the suggestion you get for simplification is also something equally understandable (or better) for a business engineer would understand, and if so replace the expression with the suggested expression.

Example

This example expression is quite simple, and probably easy for any business engineer to simplify. It is just to illustrate the concept, and you can imagine that it also works for bigger boolean expressions that are harder for humans to comprehend.

Image Added

The BMA detects that this expression can be simplified (by applying the absorptive law), and gives this suggestion:

Image Added