2-sat generalized