lojix/logic/src/main/com/thesett/aima/logic/fol/compiler/AnnotatingVisitor.java
public void visit(Functor functor)
    {
        // functor is ground if all of its arguments are ground.
        boolean ground = true;

        if (functor.getArguments() != null)
        {
            for (Term argument : functor.getArguments())
            {
                SymbolKey symbolKey = argument.getSymbolKey();
                TermDomain annotation = (TermDomain) symbolTable.get(symbolKey, TERM_DOMAIN);

                if ((annotation == null) || !annotation.ground)
                {
                    ground = false;

                    break;
                }
            }
        }

        /*log.fine((ground ? "ground " : "non-ground ") + functor.toString(interner, true, false));*/
        symbolTable.put(functor.getSymbolKey(), TERM_DOMAIN, new TermDomain(ground));
    }
public void visit(Functor functor)
    {
        // functor is ground if all of its arguments are ground.
        boolean ground = true;

        if (functor.getArguments() != null)
        {
            for (Term argument : functor.getArguments())
            {
                SymbolKey symbolKey = argument.getSymbolKey();
                TermDomain annotation = (TermDomain) symbolTable.get(symbolKey, TERM_DOMAIN);

                if ((annotation == null) || !annotation.ground)
                {
                    ground = false;

                    break;
                }
            }
        }

        /*log.fine((ground ? "ground " : "non-ground ") + functor.toString(interner, true, false));*/
        symbolTable.put(functor.getSymbolKey(), TERM_DOMAIN, new TermDomain(ground));
    }
public void visit ( Functor functor ) { // functor is ground if all of its arguments are ground. boolean ground = true ; if ( functor . getArguments ( ) != null ) { for ( Term argument : functor . getArguments ( ) ) { SymbolKey symbolKey = argument . getSymbolKey ( ) ; TermDomain annotation = ( TermDomain ) symbolTable . get ( symbolKey , TERM_DOMAIN ) ; if ( ( annotation == null ) || ! annotation . ground ) { ground = false ; break ; } } } /*log.fine((ground ? "ground " : "non-ground ") + functor.toString(interner, true, false));*/ symbolTable . put ( functor . getSymbolKey ( ) , TERM_DOMAIN , new TermDomain ( ground ) ) ; }
{@inheritDoc}
{