lojix/wam_prolog/src/main/com/thesett/aima/logic/fol/wam/optimizer/OptimizeInstructions.java
public boolean isConstant(WAMInstruction instruction)
    {
        Integer name = instruction.getFunctorNameReg1();

        if (name != null)
        {
            FunctorName functorName = interner.getDeinternedFunctorName(name);

            if (functorName.getArity() == 0)
            {
                return true;
            }
        }

        return false;
    }
public boolean isConstant(WAMInstruction instruction)
    {
        Integer name = instruction.getFunctorNameReg1();

        if (name != null)
        {
            FunctorName functorName = interner.getDeinternedFunctorName(name);

            if (functorName.getArity() == 0)
            {
                return true;
            }
        }

        return false;
    }
Checks if the term argument to an instruction was a constant.

@param  instruction The instruction to test.

@return <tt>true</tt> iff the term argument to an instruction was a constant. <tt>false</tt> will be returned if
this information was not recorded, and cannot be determined.