/// <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)); }
/// <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); }