lojix/prolog/src/main/com/thesett/aima/logic/fol/prolog/StackVariableTransform.java
public Variable transform(Variable variable)
    {
        StackVariable stackVar = varMapping.get(variable);

        // Check if a stack variable for the variable has not been created yet, and if so create a new stack variable,
        // setting the clause that it is in as its binding context supplier.
        if (stackVar == null)
        {
            stackVar = new StackVariable(variable.getName(), null, variable.isAnonymous(), offset++, context);
            varMapping.put(variable, stackVar);
        }

        return stackVar;
    }
public Variable transform(Variable variable)
    {
        StackVariable stackVar = varMapping.get(variable);

        // Check if a stack variable for the variable has not been created yet, and if so create a new stack variable,
        // setting the clause that it is in as its binding context supplier.
        if (stackVar == null)
        {
            stackVar = new StackVariable(variable.getName(), null, variable.isAnonymous(), offset++, context);
            varMapping.put(variable, stackVar);
        }

        return stackVar;
    }
public Variable transform ( Variable variable ) { StackVariable stackVar = varMapping . get ( variable ) ; // Check if a stack variable for the variable has not been created yet, and if so create a new stack variable, // setting the clause that it is in as its binding context supplier. if ( stackVar == null ) { stackVar = new StackVariable ( variable . getName ( ) , null , variable . isAnonymous ( ) , offset ++ , context ) ; varMapping . put ( variable , stackVar ) ; } return stackVar ; }
{@inheritDoc}

<p/>Replaces all of the free variables in the clause with stack variables.
{ @inheritDoc }