當前位置: 首頁>>代碼示例>>C#>>正文


C# PrologContext.WakeUpGoal方法代碼示例

本文整理匯總了C#中Prolog.PrologContext.WakeUpGoal方法的典型用法代碼示例。如果您正苦於以下問題:C# PrologContext.WakeUpGoal方法的具體用法?C# PrologContext.WakeUpGoal怎麽用?C# PrologContext.WakeUpGoal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Prolog.PrologContext的用法示例。


在下文中一共展示了PrologContext.WakeUpGoal方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: MetaMetaUnify

        internal override Metastructure MetaMetaUnify(Metastructure theirMetaStructure, PrologContext context)
        {
            var s = theirMetaStructure as Suspension;
            if (s == null) throw new ArgumentTypeException("MetaMetaUnify", "theirMetaStructure", theirMetaStructure, typeof(Suspension));
            if (context != s.context) throw new ArgumentException("Can't unify suspended goals across PrologContexts.");

            context.WakeUpGoal(CombineGoals(DelayedGoal, s.DelayedGoal));
            return MakeSuspension(null, CombineGoals(FrozenGoal, s.FrozenGoal));
        }
開發者ID:rzubek,項目名稱:MKULTRA,代碼行數:9,代碼來源:Metastructure.cs

示例2: MetaVarUnify

 /// <summary>
 /// Called after the variable bound to this Metastructure is unified with an unbound variable
 /// that is not (itself) bound to a Metastructure.
 /// </summary>
 /// <param name="l">The logic variable with which to Unify.</param>
 /// <param name="context">Context in which to execute suspended goals.</param>
 /// <returns>The Metastructure to bind to the newly aliased variables.</returns>
 public Metastructure MetaVarUnify(LogicVariable l, PrologContext context)
 {
     if (DelayedGoal != null)
         context.WakeUpGoal(DelayedGoal);
     return MakeSuspension(null, FrozenGoal);
 }
開發者ID:ianhorswill,項目名稱:UnityProlog,代碼行數:13,代碼來源:Metastructure.cs

示例3: MetaTermUnify

 /// <summary>
 /// Called after the variable bound to this Metastructure is unified with a non-variable term.
 /// </summary>
 /// <param name="value">The term to which to unify</param>
 /// <param name="contextOfBinding">Context in which to execute suspended goals.</param>
 public void MetaTermUnify(object value, PrologContext contextOfBinding)
 {
     Debug.Assert(contextOfBinding == Context, "Delayed goal woken in a different context than it was created in.");
     contextOfBinding.WakeUpGoal(CombineGoals(DelayedGoal, FrozenGoal));
 }
開發者ID:ianhorswill,項目名稱:UnityProlog,代碼行數:10,代碼來源:Metastructure.cs

示例4: MetaMetaUnify

        /// <summary>
        /// Merge the information from two Metastructures into one new metastructure.
        /// </summary>
        /// <param name="theirMetaStructure">The Metastructure to merge with.</param>
        /// <param name="context">Context in which to execute suspended goals.</param>
        /// <returns>The merged Metastructure.</returns>
        public Metastructure MetaMetaUnify(Metastructure theirMetaStructure, PrologContext context)
        {
            if (theirMetaStructure == null) throw new ArgumentTypeException("MetaMetaUnify", "theirMetaStructure", theirMetaStructure, typeof(Metastructure));
            if (context != theirMetaStructure.Context) throw new ArgumentException("Can't unify suspended goals across PrologContexts.");

            context.WakeUpGoal(CombineGoals(DelayedGoal, theirMetaStructure.DelayedGoal));
            return MakeSuspension(null, CombineGoals(FrozenGoal, theirMetaStructure.FrozenGoal));
        }
開發者ID:ianhorswill,項目名稱:UnityProlog,代碼行數:14,代碼來源:Metastructure.cs


注:本文中的Prolog.PrologContext.WakeUpGoal方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。