Simplify Expression

Where possible, simplifies the Boolean expression.


  • Code readability can be greatly improved by reorganizing long Boolean expressions that are often found within if statements, return statement or variable assignments. This reorganization involves removing unnecessary parentheses, toggling negations, parameter reordering and so on without affecting the expression’s return value but making the entire expression easier to read.


Available from the context menu or via shortcuts:

  • when the edit cursor, or caret is on an if statement whose condition can be simplified.
  • when the caret is on a return statement which has a Boolean expression that can be simplified.
  • when a Boolean expression that can be simplified is selected.


  • This refactoring uses the Quine/McClasky simplification algorithm.


return a | b & a | c;
Return a Or b And a Or c


return a | c
Return a Or c



See Also