PushGoalStack() private method

private PushGoalStack ( Symbol functor, object args, ushort parentFrame ) : void
functor Symbol
args object
parentFrame ushort
return void
コード例 #1
0
ファイル: KnowledgeBase.cs プロジェクト: mantoun/MKULTRA
 /// <summary>
 /// Attempts to prove the specified goal.
 /// </summary>
 internal IEnumerable <CutState> Prove(Symbol functor, object[] args, PrologContext context, ushort parentFrame)
 {
     context.PushGoalStack(functor, args, parentFrame);
     context.NewStep();
     PrologPrimitives.PrimitiveImplementation prim;
     if (PrologPrimitives.Implementations.TryGetValue(functor, out prim))
     {
         return(CallPrimitive(functor, prim, args, context));
     }
     return(ProveFromDB(functor, args, context));
 }
コード例 #2
0
 /// <summary>
 /// Attempts to prove the specified goal.
 /// </summary>
 internal IEnumerable<CutState> Prove(Symbol functor, object[] args, PrologContext context, ushort parentFrame)
 {
     context.PushGoalStack(functor, args, parentFrame);
     context.NewStep();
     PrologPrimitives.PrimitiveImplementation prim;
     if (PrologPrimitives.Implementations.TryGetValue(functor, out prim))
     {
         return CallPrimitive(functor, prim, args, context);
     }
     return ProveFromDB(functor, args, context);
 }