A knowledge-based approach to the specification-based program testing