Improve the revision formula (#587) and test the boolean transformation rules

Improve the revision formula (#587) and test the boolean transformation rules