A logic minimizer