public void consultInputStream ( InputStream stream ) throws SourceCodeException { // Create a token source to read from the specified input stream. Source < Token > tokenSource = TokenSource . getTokenSourceForInputStream ( stream ) ; getParser ( ) . setTokenSource ( tokenSource ) ; // Consult the type checking rules and add them to the knowledge base. while ( true ) { Sentence < S > sentence = getParser ( ) . parse ( ) ; if ( sentence == null ) { break ; } getCompiler ( ) . compile ( sentence ) ; } }
Consults an input stream reading first order logic clauses from it and inserting them into the resolvers knowledge base .