lojix/logic/src/main/com/thesett/aima/logic/fol/TermUtils.java
public static Set<Variable> findFreeNonAnonymousVariables(Term query)
    {
        QueueBasedSearchMethod<Term, Term> freeVarSearch = new DepthFirstSearch<Term, Term>();
        freeVarSearch.reset();
        freeVarSearch.addStartState(query);
        freeVarSearch.setGoalPredicate(new FreeNonAnonymousVariablePredicate());

        return (Set<Variable>) (Set) Searches.setOf(freeVarSearch);
    }
public static Set<Variable> findFreeNonAnonymousVariables(Term query)
    {
        QueueBasedSearchMethod<Term, Term> freeVarSearch = new DepthFirstSearch<Term, Term>();
        freeVarSearch.reset();
        freeVarSearch.addStartState(query);
        freeVarSearch.setGoalPredicate(new FreeNonAnonymousVariablePredicate());

        return (Set<Variable>) (Set) Searches.setOf(freeVarSearch);
    }
public static Set < Variable > findFreeNonAnonymousVariables ( Term query ) { QueueBasedSearchMethod < Term , Term > freeVarSearch = new DepthFirstSearch < Term , Term > ( ) ; freeVarSearch . reset ( ) ; freeVarSearch . addStartState ( query ) ; freeVarSearch . setGoalPredicate ( new FreeNonAnonymousVariablePredicate ( ) ) ; return ( Set < Variable > ) ( Set ) Searches . setOf ( freeVarSearch ) ; }
Calculates the set of free and non-anonymous variables in a term. This is the set of variables that a user query
usually wants to be made aware of.

@param  query The term to calculate the free non-anonymous variable set from.

@return A set of variables that are free and non-anonymous in the term.
Calculates the set of free and non - anonymous variables in a term . This is the set of variables that a user query usually wants to be made aware of .