lojix/wam_prolog/src/main/com/thesett/aima/logic/fol/wam/machine/WAMResolvingJavaMachine.java
private void bind(int a1, int a2)
    {
        // <t1, _> <- STORE[a1]
        int t1 = (byte) (data.get(a1) >>> TSHIFT);

        // <t2, _> <- STORE[a2]
        int t2 = (byte) (data.get(a2) >>> TSHIFT);

        // if (t1 = REF) /\ ((t2 != REF) \/ (a2 < a1))
        if ((t1 == WAMInstruction.REF) && ((t2 != WAMInstruction.REF) || (a2 < a1)))
        {
            //  STORE[a1] <- STORE[a2]
            //data.put(a1, refTo(a2));
            data.put(a1, data.get(a2));

            //  trail(a1)
            trail(a1);
        }
        else if (t2 == WAMInstruction.REF)
        {
            //  STORE[a2] <- STORE[a1]
            //data.put(a2, refTo(a1));
            data.put(a2, data.get(a1));

            //  tail(a2)
            trail(a2);
        }
    }
private void bind(int a1, int a2)
    {
        // <t1, _> <- STORE[a1]
        int t1 = (byte) (data.get(a1) >>> TSHIFT);

        // <t2, _> <- STORE[a2]
        int t2 = (byte) (data.get(a2) >>> TSHIFT);

        // if (t1 = REF) /\ ((t2 != REF) \/ (a2 < a1))
        if ((t1 == WAMInstruction.REF) && ((t2 != WAMInstruction.REF) || (a2 < a1)))
        {
            //  STORE[a1] <- STORE[a2]
            //data.put(a1, refTo(a2));
            data.put(a1, data.get(a2));

            //  trail(a1)
            trail(a1);
        }
        else if (t2 == WAMInstruction.REF)
        {
            //  STORE[a2] <- STORE[a1]
            //data.put(a2, refTo(a1));
            data.put(a2, data.get(a1));

            //  tail(a2)
            trail(a2);
        }
    }
private void bind ( int a1 , int a2 ) { // <t1, _> <- STORE[a1] int t1 = ( byte ) ( data . get ( a1 ) >>> TSHIFT ) ; // <t2, _> <- STORE[a2] int t2 = ( byte ) ( data . get ( a2 ) >>> TSHIFT ) ; // if (t1 = REF) /\ ((t2 != REF) \/ (a2 < a1)) if ( ( t1 == WAMInstruction . REF ) && ( ( t2 != WAMInstruction . REF ) || ( a2 < a1 ) ) ) { //  STORE[a1] <- STORE[a2] //data.put(a1, refTo(a2)); data . put ( a1 , data . get ( a2 ) ) ; //  trail(a1) trail ( a1 ) ; } else if ( t2 == WAMInstruction . REF ) { //  STORE[a2] <- STORE[a1] //data.put(a2, refTo(a1)); data . put ( a2 , data . get ( a1 ) ) ; //  tail(a2) trail ( a2 ) ; } }
Creates a binding of one variable onto another. One of the supplied addresses must be an unbound variable. If
both are unbound variables, the higher (newer) address is bound to the lower (older) one.

@param a1 The address of the first potential unbound variable to bind.
@param a2 The address of the second potential unbound variable to bind.
Creates a binding of one variable onto another . One of the supplied addresses must be an unbound variable . If both are unbound variables the higher ( newer ) address is bound to the lower ( older ) one .