lojix/wam_prolog/src/main/com/thesett/aima/logic/fol/wam/compiler/DefaultBuiltIn.java
protected boolean isLocalVariable(VarIntroduction introduction, byte addrMode)
    {
        if (WAMInstruction.STACK_ADDR == addrMode)
        {
            return (introduction == VarIntroduction.Get) || (introduction == VarIntroduction.Put);
        }
        else
        {
            return introduction == VarIntroduction.Get;
        }
    }
protected boolean isLocalVariable(VarIntroduction introduction, byte addrMode)
    {
        if (WAMInstruction.STACK_ADDR == addrMode)
        {
            return (introduction == VarIntroduction.Get) || (introduction == VarIntroduction.Put);
        }
        else
        {
            return introduction == VarIntroduction.Get;
        }
    }
protected boolean isLocalVariable ( VarIntroduction introduction , byte addrMode ) { if ( WAMInstruction . STACK_ADDR == addrMode ) { return ( introduction == VarIntroduction . Get ) || ( introduction == VarIntroduction . Put ) ; } else { return introduction == VarIntroduction . Get ; } }
Determines whether a variable is local, that is, it may only exist on the stack. When variables are introduced
into clauses, the way in which they are introduced is recorded using the {@link VarIntroduction} enum. When a
variable is being written to the heap for the first time, this check may be used to see if a 'local' variant of
an instruction is needed, in order to globalize the variable on the heap.

<p/>The conditions for a variable being deemed local are:

<ul>
<li>For a permanent variable, not initialized in this clause with set_var or unify_var instruction.</li>
<li>For a temporary variable, not initialized in this clause with set_var or unify_var or put_var instruction.
</li>
</ul>

@param  introduction The type of instruction that introduced the variable into the clause.
@param  addrMode     The addressing mode of the variable, permanent variables are stack allocated.

@return <tt>true</tt> iff the variable is unsafe.
Determines whether a variable is local that is it may only exist on the stack . When variables are introduced into clauses the way in which they are introduced is recorded using the { @link VarIntroduction } enum . When a variable is being written to the heap for the first time this check may be used to see if a local variant of an instruction is needed in order to globalize the variable on the heap .