lojix/wam_prolog/src/main/com/thesett/aima/logic/fol/wam/builtins/Cut.java
public SizeableLinkedList<WAMInstruction> compileBodyCall(Functor expression, boolean isFirstBody,
        boolean isLastBody, boolean chainRule, int permVarsRemaining)
    {
        SizeableLinkedList<WAMInstruction> instructions = new SizeableLinkedList<WAMInstruction>();

        if (isFirstBody)
        {
            instructions.add(new WAMInstruction(NeckCut));
        }
        else
        {
            Integer cutLevelVarAllocation =
                (Integer) defaultBuiltIn.getSymbolTable().get(CutLevelVariable.CUT_LEVEL_VARIABLE.getSymbolKey(),
                    SymbolTableKeys.SYMKEY_ALLOCATION);

            instructions.add(new WAMInstruction(Cut, (byte) (cutLevelVarAllocation & 0xff)));
        }

        return instructions;
    }
public SizeableLinkedList<WAMInstruction> compileBodyCall(Functor expression, boolean isFirstBody,
        boolean isLastBody, boolean chainRule, int permVarsRemaining)
    {
        SizeableLinkedList<WAMInstruction> instructions = new SizeableLinkedList<WAMInstruction>();

        if (isFirstBody)
        {
            instructions.add(new WAMInstruction(NeckCut));
        }
        else
        {
            Integer cutLevelVarAllocation =
                (Integer) defaultBuiltIn.getSymbolTable().get(CutLevelVariable.CUT_LEVEL_VARIABLE.getSymbolKey(),
                    SymbolTableKeys.SYMKEY_ALLOCATION);

            instructions.add(new WAMInstruction(Cut, (byte) (cutLevelVarAllocation & 0xff)));
        }

        return instructions;
    }
public SizeableLinkedList < WAMInstruction > compileBodyCall ( Functor expression , boolean isFirstBody , boolean isLastBody , boolean chainRule , int permVarsRemaining ) { SizeableLinkedList < WAMInstruction > instructions = new SizeableLinkedList < WAMInstruction > ( ) ; if ( isFirstBody ) { instructions . add ( new WAMInstruction ( NeckCut ) ) ; } else { Integer cutLevelVarAllocation = ( Integer ) defaultBuiltIn . getSymbolTable ( ) . get ( CutLevelVariable . CUT_LEVEL_VARIABLE . getSymbolKey ( ) , SymbolTableKeys . SYMKEY_ALLOCATION ) ; instructions . add ( new WAMInstruction ( Cut , ( byte ) ( cutLevelVarAllocation & 0xff ) ) ) ; } return instructions ; }
{@inheritDoc}
{