implement exact linear booleanwidth algorithm
Add tree and optimize booldim