Generate boolean formula and build it's table