public void reset()
    {
        // Reset the resolver to completely clear out its domain.
        resolver.reset();

        // Create a token source to load the model rules from.
        Source<Token> tokenSource =
            TokenSource.getTokenSourceForInputStream(WAMEngine.class.getClassLoader().getResourceAsStream(
                    BUILT_IN_LIB));

        // Set up a parser on the token source.
        Parser<Clause, Token> libParser = new SentenceParser(interner);
        libParser.setTokenSource(tokenSource);

        // Load the built-ins into the domain.
        try
        {
            while (true)
            {
                Sentence<Clause> sentence = libParser.parse();

                if (sentence == null)
                {
                    break;
                }

                compiler.compile(sentence);
            }

            compiler.endScope();
        }
        catch (SourceCodeException e)
        {
            // There should not be any errors in the built in library, if there are then the prolog engine just
            // isn't going to work, so report this as a bug.
            throw new IllegalStateException("Got an exception whilst loading the built-in library.", e);
        }
    }
public void reset ( ) { resolver . reset ( ) ; Source < Token > tokenSource = TokenSource . getTokenSourceForInputStream ( WAMEngine . class . getClassLoader ( ) . getResourceAsStream ( BUILT_IN_LIB ) ) ; Parser < Clause , Token > libParser = new SentenceParser ( interner ) ; libParser . setTokenSource ( tokenSource ) ; try { while ( true ) { Sentence < Clause > sentence = libParser . parse ( ) ; if ( sentence == null ) { break ; } compiler . compile ( sentence ) ; } compiler . endScope ( ) ; } catch ( SourceCodeException e ) { throw new IllegalStateException ( "Got an exception whilst loading the built-in library." , e ) ; } }
{@inheritDoc}

<p/>Loads the built-in library resource specified by {@link #BUILT_IN_LIB}.