Generalized Planning with Positive and Negative Examples