Making effect inclusion constraints minimal before submitting to prolog