lojix/interpreter/src/main/com/thesett/aima/logic/fol/interpreter/ResolutionInterpreter.java
private void evaluate(Sentence<Clause> sentence) throws SourceCodeException
    {
        Clause clause = sentence.getT();

        if (clause.isQuery())
        {
            engine.endScope();
            engine.compile(sentence);
            evaluateQuery();
        }
        else
        {
            // Check if the program clause is new, or a continuation of the current predicate.
            int name = clause.getHead().getName();

            if ((currentPredicateName == null) || (currentPredicateName != name))
            {
                engine.endScope();
                currentPredicateName = name;
            }

            addProgramClause(sentence);
        }
    }
private void evaluate(Sentence<Clause> sentence) throws SourceCodeException
    {
        Clause clause = sentence.getT();

        if (clause.isQuery())
        {
            engine.endScope();
            engine.compile(sentence);
            evaluateQuery();
        }
        else
        {
            // Check if the program clause is new, or a continuation of the current predicate.
            int name = clause.getHead().getName();

            if ((currentPredicateName == null) || (currentPredicateName != name))
            {
                engine.endScope();
                currentPredicateName = name;
            }

            addProgramClause(sentence);
        }
    }
private void evaluate ( Sentence < Clause > sentence ) throws SourceCodeException { Clause clause = sentence . getT ( ) ; if ( clause . isQuery ( ) ) { engine . endScope ( ) ; engine . compile ( sentence ) ; evaluateQuery ( ) ; } else { // Check if the program clause is new, or a continuation of the current predicate. int name = clause . getHead ( ) . getName ( ) ; if ( ( currentPredicateName == null ) || ( currentPredicateName != name ) ) { engine . endScope ( ) ; currentPredicateName = name ; } addProgramClause ( sentence ) ; } }
Evaluates a query against the resolver or adds a clause to the resolvers domain.

@param  sentence The clausal sentence to run as a query or as a clause to add to the domain.

@throws SourceCodeException If the query or domain clause fails to compile or link into the resolver.
Evaluates a query against the resolver or adds a clause to the resolvers domain .