当前位置: 首页>>代码示例>>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;未经允许,请勿转载。