Logical Boltzmann Machines