Recognizing Non-Floundering Logic Programs and Goals