lojix/logic/src/main/com/thesett/aima/logic/fol/compiler/AnnotatingVisitor.java
public void visit(Variable variable)
    {
        SymbolKey symbolKey = variable.getSymbolKey();

        // Check if the variable has already been annotated.
        TermDomain annotation = (TermDomain) symbolTable.get(symbolKey, TERM_DOMAIN);

        if (annotation == null)
        {
            // variable is ground if it appears in a call to a predicate that always grounds that argument.
            /*log.fine("non-ground " + variable.toString(interner, true, false));*/
            symbolTable.put(symbolKey, TERM_DOMAIN, new TermDomain(false));
        }
        else
        {
            /*log.fine("already seen " + variable.toString(interner, true, false));*/
        }

        // Check if the variable domain has already been annotated for a previous occurrence of the variable.
        VarDomain varDomain = (VarDomain) symbolTable.get(symbolKey, VARIABLE_DOMAIN);

        if (varDomain == null)
        {
            varDomain = new VarDomain(traverser.isInHead());
            symbolTable.put(symbolKey, VARIABLE_DOMAIN, varDomain);
        }
        else
        {
            varDomain.isTemporary = traverser.isInHead() && varDomain.isTemporary();
        }

        /*log.fine(variable.toString(interner, true, false) +
            (varDomain.isTemporary() ? " may be temporary." : " is not temporary."));*/
    }
public void visit(Variable variable)
    {
        SymbolKey symbolKey = variable.getSymbolKey();

        // Check if the variable has already been annotated.
        TermDomain annotation = (TermDomain) symbolTable.get(symbolKey, TERM_DOMAIN);

        if (annotation == null)
        {
            // variable is ground if it appears in a call to a predicate that always grounds that argument.
            /*log.fine("non-ground " + variable.toString(interner, true, false));*/
            symbolTable.put(symbolKey, TERM_DOMAIN, new TermDomain(false));
        }
        else
        {
            /*log.fine("already seen " + variable.toString(interner, true, false));*/
        }

        // Check if the variable domain has already been annotated for a previous occurrence of the variable.
        VarDomain varDomain = (VarDomain) symbolTable.get(symbolKey, VARIABLE_DOMAIN);

        if (varDomain == null)
        {
            varDomain = new VarDomain(traverser.isInHead());
            symbolTable.put(symbolKey, VARIABLE_DOMAIN, varDomain);
        }
        else
        {
            varDomain.isTemporary = traverser.isInHead() && varDomain.isTemporary();
        }

        /*log.fine(variable.toString(interner, true, false) +
            (varDomain.isTemporary() ? " may be temporary." : " is not temporary."));*/
    }
public void visit ( Variable variable ) { SymbolKey symbolKey = variable . getSymbolKey ( ) ; // Check if the variable has already been annotated. TermDomain annotation = ( TermDomain ) symbolTable . get ( symbolKey , TERM_DOMAIN ) ; if ( annotation == null ) { // variable is ground if it appears in a call to a predicate that always grounds that argument. /*log.fine("non-ground " + variable.toString(interner, true, false));*/ symbolTable . put ( symbolKey , TERM_DOMAIN , new TermDomain ( false ) ) ; } else { /*log.fine("already seen " + variable.toString(interner, true, false));*/ } // Check if the variable domain has already been annotated for a previous occurrence of the variable. VarDomain varDomain = ( VarDomain ) symbolTable . get ( symbolKey , VARIABLE_DOMAIN ) ; if ( varDomain == null ) { varDomain = new VarDomain ( traverser . isInHead ( ) ) ; symbolTable . put ( symbolKey , VARIABLE_DOMAIN , varDomain ) ; } else { varDomain . isTemporary = traverser . isInHead ( ) && varDomain . isTemporary ( ) ; } /*log.fine(variable.toString(interner, true, false) +
            (varDomain.isTemporary() ? " may be temporary." : " is not temporary."));*/ }
{@inheritDoc}
{