UnifyWithAtomicConstant() private method

private UnifyWithAtomicConstant ( object value ) : IEnumerable
value object
return IEnumerable
Exemplo n.º 1
0
        private IEnumerable <CutState> EnumerateArg1Driver(LogicVariable arg1, T2 arg2, PrologContext context)
        {
            int tracePointer = context.MarkTrace();

            foreach (var newValue in arg1Enumerator(arg2))
            {
                arg1.UnifyWithAtomicConstant(newValue, context);

                yield return(CutState.Continue);

                context.RestoreVariables(tracePointer);
            }
        }
Exemplo n.º 2
0
        private IEnumerable <CutState> EnumerateBothDriver(LogicVariable arg1, LogicVariable arg2, PrologContext context)
        {
            int tracePointer = context.MarkTrace();

            foreach (var pair in doubleEnumerator())
            {
                arg1.UnifyWithAtomicConstant(pair.Arg1, context);
                arg2.UnifyWithAtomicConstant(pair.Arg2, context);

                yield return(CutState.Continue);

                context.RestoreVariables(tracePointer);
            }
        }