PushArguments() private method

Copies args to a arguments position for the next stack frame.
private PushArguments ( IList args ) : void
args IList
return void
Beispiel #1
0
        internal IEnumerable <CutState> Prove(object[] args, PrologContext context)
        {
            var myFrame = context.CurrentFrame;

            if (KnowledgeBase.Trace || Trace)
            {
                context.TraceOutput("Goal: {0}", new Structure(Name, args));
            }
            if (Compiled)
            {
                context.PushArguments(args);
                return(StackCall(context));
            }
            if (context.Randomize && Randomizable && Entries.Count > 1)
            {
                return(TestShuffledClauses(args, context, myFrame));
            }
            return(TestClausesInOrder(args, context, myFrame));
        }
Beispiel #2
0
 internal IEnumerable<CutState> Prove(object[] args, PrologContext context)
 {
     var myFrame = context.CurrentFrame;
     if (KnowledgeBase.Trace || Trace)
         context.TraceOutput("Goal: {0}", new Structure(Name, args));
     if (Compiled)
     {
         context.PushArguments(args);
         return StackCall(context);
     }
     if (context.Randomize && Randomizable && Entries.Count > 1)
         return TestShuffledClauses(args, context, myFrame);
     return TestClausesInOrder(args, context, myFrame);
 }