lojix/wam_prolog/src/main/com/thesett/aima/logic/fol/wam/compiler/PositionAndOccurrenceVisitor.java
private boolean isTopLevel(PositionalContext context)
    {
        Term term = context.getTerm();

        if (term.getSymbolKey() == null)
        {
            return false;
        }

        Boolean isTopLevel = (Boolean) symbolTable.get(term.getSymbolKey(), SymbolTableKeys.SYMKEY_TOP_LEVEL_FUNCTOR);

        return (isTopLevel == null) ? false : isTopLevel;
    }
private boolean isTopLevel(PositionalContext context)
    {
        Term term = context.getTerm();

        if (term.getSymbolKey() == null)
        {
            return false;
        }

        Boolean isTopLevel = (Boolean) symbolTable.get(term.getSymbolKey(), SymbolTableKeys.SYMKEY_TOP_LEVEL_FUNCTOR);

        return (isTopLevel == null) ? false : isTopLevel;
    }
private boolean isTopLevel ( PositionalContext context ) { Term term = context . getTerm ( ) ; if ( term . getSymbolKey ( ) == null ) { return false ; } Boolean isTopLevel = ( Boolean ) symbolTable . get ( term . getSymbolKey ( ) , SymbolTableKeys . SYMKEY_TOP_LEVEL_FUNCTOR ) ; return ( isTopLevel == null ) ? false : isTopLevel ; }
Functors are considered top-level when they appear at the top-level within a clause, or directly beneath a parent
conjunction or disjunction that is considered to be top-level.

@param  context The position context to examine.

@return <tt>true</tt> iff the current position is a top-level functor.
Functors are considered top - level when they appear at the top - level within a clause or directly beneath a parent conjunction or disjunction that is considered to be top - level .