This algorithm implements simple boolean identities and add them to the conditional
statements of the user's code.