亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? agenda.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
   /*******************************************************/   /*      "C" Language Integrated Production System      */   /*                                                     */   /*             CLIPS Version 6.30  10/19/06            */   /*                                                     */   /*                    AGENDA MODULE                    */   /*******************************************************//*************************************************************//* Purpose:                                                  *//*   Provides functionality for examining, manipulating,     *//*   adding, and removing activations from the agenda.       *//*                                                           *//* Principal Programmer(s):                                  *//*      Gary D. Riley                                        *//*                                                           *//* Contributing Programmer(s):                               *//*      Brian L. Donnell                                     *//*                                                           *//* Revision History:                                         *//*      6.23: Corrected compilation errors for files         *//*            generated by constructs-to-c. DR0861           *//*                                                           *//*      6.24: Removed CONFLICT_RESOLUTION_STRATEGIES         *//*            and DYNAMIC_SALIENCE compilation flags.        *//*                                                           *//*            Renamed BOOLEAN macro type to intBool.         *//*                                                           *//*            Added EnvGetActivationBasisPPForm function.    *//*                                                           *//*      6.30: Added salience groups to improve performance   *//*            with large numbers of activations of different *//*            saliences.                                     *//*                                                           *//*************************************************************/#define _AGENDA_SOURCE_#include <stdio.h>#define _STDIO_INCLUDED_#include <string.h>#include "setup.h"#if DEFRULE_CONSTRUCT#include "argacces.h"#include "constant.h"#include "crstrtgy.h"#include "engine.h"#include "envrnmnt.h"#include "extnfunc.h"#include "memalloc.h"#include "moduldef.h"#include "modulutl.h"#include "multifld.h"#include "reteutil.h"#include "retract.h"#include "router.h"#include "rulebsc.h"#include "ruledef.h"#include "strngrtr.h"#include "sysdep.h"#include "watch.h"#include "agenda.h"/***************************************//* LOCAL INTERNAL FUNCTION DEFINITIONS *//***************************************/   static void                    PrintActivation(void *,char *,void *);   static void                    AgendaClearFunction(void *);   static char                   *SalienceEvaluationName(int);   static int                     EvaluateSalience(void *,void *);   static struct salienceGroup   *ReuseOrCreateSalienceGroup(void *,struct defruleModule *,int);   static struct salienceGroup   *FindSalienceGroup(struct defruleModule *,int);   static void                    RemoveActivationFromGroup(void *,struct activation *,struct defruleModule *);   /*************************************************//* InitializeAgenda: Initializes the activations *//*   watch item and the H/L commands for         *//*   manipulating the agenda.                    *//*************************************************/globle void InitializeAgenda(  void *theEnv)  {      AllocateEnvironmentData(theEnv,AGENDA_DATA,sizeof(struct agendaData),NULL);      AgendaData(theEnv)->SalienceEvaluation = WHEN_DEFINED;   AgendaData(theEnv)->Strategy = DEFAULT_STRATEGY;      EnvAddClearFunction(theEnv,"agenda",AgendaClearFunction,0);#if DEBUGGING_FUNCTIONS   AddWatchItem(theEnv,"activations",1,&AgendaData(theEnv)->WatchActivations,40,DefruleWatchAccess,DefruleWatchPrint);#endif#if ! RUN_TIME   EnvDefineFunction2(theEnv,"refresh", 'v', PTIEF RefreshCommand, "RefreshCommand", "11w");   EnvDefineFunction2(theEnv,"refresh-agenda",'v',                   PTIEF RefreshAgendaCommand,"RefreshAgendaCommand", "01w");   EnvDefineFunction2(theEnv,"get-salience-evaluation",'w',                   PTIEF GetSalienceEvaluationCommand,                   "GetSalienceEvaluationCommand", "00");   EnvDefineFunction2(theEnv,"set-salience-evaluation",'w',                   PTIEF SetSalienceEvaluationCommand,                   "SetSalienceEvaluationCommand",                   "11w");#if DEBUGGING_FUNCTIONS   EnvDefineFunction2(theEnv,"agenda", 'v', PTIEF AgendaCommand, "AgendaCommand", "01w");#endif#endif  }/*****************************************************************//* AddActivation: Creates a rule activation to be added to the   *//*   Agenda and links the activation with its associated partial *//*   match. The function PlaceActivation is then called to place *//*   the activation on the Agenda. Typically called when all     *//*   patterns on the LHS of a rule have been satisfied.          *//*****************************************************************/globle void AddActivation(  void *theEnv,  void *vTheRule,  void *vBinds)  {   struct activation *newActivation;   struct defrule *theRule = (struct defrule *) vTheRule;   struct partialMatch *binds = (struct partialMatch *) vBinds;   struct defruleModule *theModuleItem;   struct salienceGroup *theGroup;   /*=======================================*/   /* Focus on the module if the activation */   /* is from an auto-focus rule.           */   /*=======================================*/   if (theRule->autoFocus)     { EnvFocus(theEnv,(void *) theRule->header.whichModule->theModule); }   /*=======================================================*/   /* Create the activation. The activation stores pointers */   /* to its associated partial match and defrule. The      */   /* activation is given a time tag, its salience is       */   /* evaluated, and it is assigned a random number for use */   /* with the random conflict resolution strategy.         */   /*=======================================================*/   newActivation = get_struct(theEnv,activation);   newActivation->theRule = theRule;   newActivation->basis = binds;   newActivation->timetag = AgendaData(theEnv)->CurrentTimetag++;   newActivation->salience = EvaluateSalience(theEnv,theRule);   newActivation->randomID = genrand();   newActivation->prev = NULL;   newActivation->next = NULL;   AgendaData(theEnv)->NumberOfActivations++;   /*=======================================================*/   /* Point the partial match to the activation to complete */   /* the link between the join network and the agenda.     */   /*=======================================================*/   binds->marker = (void *) newActivation;   /*====================================================*/   /* If activations are being watch, display a message. */   /*====================================================*/#if DEBUGGING_FUNCTIONS   if (newActivation->theRule->watchActivation)     {      EnvPrintRouter(theEnv,WTRACE,"==> Activation ");      PrintActivation(theEnv,WTRACE,(void *) newActivation);      EnvPrintRouter(theEnv,WTRACE,"\n");     }#endif    /*=====================================*/    /* Place the activation on the agenda. */    /*=====================================*/    theModuleItem = (struct defruleModule *) theRule->header.whichModule;        theGroup = ReuseOrCreateSalienceGroup(theEnv,theModuleItem,newActivation->salience);        PlaceActivation(theEnv,&(theModuleItem->agenda),newActivation,theGroup);   }/***************************************************************//* ReuseOrCreateSalienceGroup: *//***************************************************************/static struct salienceGroup *ReuseOrCreateSalienceGroup(  void *theEnv,  struct defruleModule *theRuleModule,  int salience)  {   struct salienceGroup *theGroup, *lastGroup, *newGroup;      for (lastGroup = NULL, theGroup = theRuleModule->groupings;        theGroup != NULL;        lastGroup = theGroup, theGroup = theGroup->next)     {      if (theGroup->salience == salience)        { return(theGroup); }              if (theGroup->salience < salience)        { break; }     }        newGroup = get_struct(theEnv,salienceGroup);   newGroup->salience = salience;   newGroup->first = NULL;   newGroup->last = NULL;   newGroup->next = theGroup;   newGroup->prev = lastGroup;      if (newGroup->next != NULL)     { newGroup->next->prev = newGroup; }   if (newGroup->prev != NULL)     { newGroup->prev->next = newGroup; }      if (lastGroup == NULL)     { theRuleModule->groupings = newGroup; }        return newGroup;  }/***************************************************************//* FindSalienceGroup: *//***************************************************************/static struct salienceGroup *FindSalienceGroup(  struct defruleModule *theRuleModule,  int salience)  {   struct salienceGroup *theGroup;      for (theGroup = theRuleModule->groupings;        theGroup != NULL;        theGroup = theGroup->next)     {      if (theGroup->salience == salience)        { return(theGroup); }              if (theGroup->salience < salience)        { break; }     }        return NULL;  }  /***************************************************************//* ClearRuleFromAgenda: Clears the agenda of a specified rule. *//***************************************************************/globle void ClearRuleFromAgenda(  void *theEnv,  void *vTheRule)  {   struct defrule *theRule = (struct defrule *) vTheRule;   struct defrule *tempRule;   struct activation *agendaPtr, *agendaNext;   /*============================================*/   /* Get a pointer to the agenda for the module */   /* in which the rule is contained.            */   /*============================================*/   agendaPtr = ((struct defruleModule *) theRule->header.whichModule)->agenda;   /*==============================================*/   /* Loop through every activation on the agenda. */   /*==============================================*/   while (agendaPtr != NULL)     {      agendaNext = agendaPtr->next;      /*========================================================*/      /* Check each disjunct of the rule against the activation */      /* to determine if the activation points to the rule. If  */      /* it does, then remove the activation from the agenda.   */      /*========================================================*/      for (tempRule = theRule;           tempRule != NULL;           tempRule = tempRule->disjunct)        {         if (agendaPtr->theRule == tempRule)           {            RemoveActivation(theEnv,agendaPtr,TRUE,TRUE);            break;           }        }      agendaPtr = agendaNext;     }  }/****************************************************************//* EnvGetNextActivation: Returns an activation from the Agenda. *//*   If its argument is NULL, then the first activation on the  *//*   Agenda is returned. If its argument is not NULL, the next  *//*   activation after the argument is returned.                 *//****************************************************************/globle void *EnvGetNextActivation(  void *theEnv,  void *actPtr)  {   struct defruleModule *theModuleItem;      if (actPtr == NULL)     {      theModuleItem = (struct defruleModule *) GetModuleItem(theEnv,NULL,DefruleData(theEnv)->DefruleModuleIndex);      if (theModuleItem == NULL) return(NULL);      return((void *) theModuleItem->agenda);     }   else     { return((void *) (((struct activation *) actPtr)->next)); }  }/*********************************************//* EnvGetActivationName: Returns the name of *//*   the rule associated with an activation. *//*********************************************/#if IBM_TBC

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品久久一区二区| 亚洲综合色视频| 一区二区三区精品在线| 国内久久精品视频| 欧美中文字幕一二三区视频| 国产欧美精品在线观看| 久久成人精品无人区| 99精品久久免费看蜜臀剧情介绍| 日韩精品一区二区三区在线观看 | 亚洲777理论| 国产91精品精华液一区二区三区| 91精品蜜臀在线一区尤物| 亚洲日本免费电影| 国产成人av电影在线观看| 9191久久久久久久久久久| 一区二区三区免费在线观看| 成人的网站免费观看| 精品国产91久久久久久久妲己| 天天色天天操综合| 色婷婷精品久久二区二区蜜臀av| 久久久久久久久久久电影| 蜜臀av性久久久久蜜臀aⅴ四虎 | 日韩欧美视频一区| 香蕉成人啪国产精品视频综合网| 不卡视频免费播放| 欧美国产日韩一二三区| 国产成人无遮挡在线视频| 精品动漫一区二区三区在线观看| 日韩精品一区第一页| 欧美一区二区性放荡片| 五月综合激情婷婷六月色窝| 欧美在线观看一区| 亚洲国产cao| 欧美日韩国产片| 日韩精品一二三四| 日韩免费看的电影| 久久99久久99| 26uuu亚洲| 国产精品一区二区久久不卡 | 欧美日韩的一区二区| 亚洲与欧洲av电影| 欧美男女性生活在线直播观看| 亚洲第一搞黄网站| 制服丝袜亚洲精品中文字幕| 日日摸夜夜添夜夜添亚洲女人| 欧美一区二区三区啪啪| 热久久国产精品| 久久亚洲综合av| 成a人片国产精品| 亚洲综合小说图片| 91精品免费在线| 国产91精品久久久久久久网曝门| 中文字幕欧美一区| 欧洲人成人精品| 久久国产精品第一页| 中文字幕av在线一区二区三区| 91小视频在线观看| 日本亚洲电影天堂| 国产精品久久久久久久第一福利| 99久久99久久综合| 亚洲va在线va天堂| 久久久三级国产网站| 91丝袜国产在线播放| 天堂久久久久va久久久久| 久久噜噜亚洲综合| 色天使久久综合网天天| 五月天网站亚洲| 久久精品欧美日韩精品| 91福利资源站| 精品中文字幕一区二区小辣椒| 亚洲欧洲性图库| 91精品国产综合久久精品| 国产91精品久久久久久久网曝门| 亚洲国产精品久久久久秋霞影院 | 激情丁香综合五月| 亚洲久本草在线中文字幕| 日韩亚洲欧美一区二区三区| aaa亚洲精品一二三区| 日韩电影在线免费看| 国产精品另类一区| 日韩午夜激情av| 色狠狠色狠狠综合| 国内精品嫩模私拍在线| 亚洲高清视频在线| 成人欧美一区二区三区黑人麻豆| 欧美丰满一区二区免费视频| av不卡在线播放| 国产aⅴ综合色| 免费观看一级特黄欧美大片| 亚洲综合在线观看视频| 国产精品丝袜一区| 亚洲精品在线免费观看视频| 91精品国产色综合久久ai换脸| 日本高清不卡在线观看| 成人黄色免费短视频| 狠狠色2019综合网| 日日夜夜精品视频免费| 亚洲综合色丁香婷婷六月图片| 国产精品网站在线观看| 精品国产凹凸成av人网站| 欧美日韩精品一区二区三区四区| 91农村精品一区二区在线| 国产成人在线免费| 国产91精品露脸国语对白| 国产真实精品久久二三区| 日韩不卡手机在线v区| 亚洲曰韩产成在线| 一区二区三区在线观看欧美 | 国产欧美中文在线| 久久综合资源网| 精品国产免费视频| 精品美女在线播放| 久久综合国产精品| 国产欧美精品一区二区色综合朱莉 | 99综合电影在线视频| 国产麻豆精品theporn| 极品瑜伽女神91| 久久国产精品免费| 国产伦精品一区二区三区免费| 精品综合免费视频观看| 九九国产精品视频| 国产剧情一区二区| 成人精品一区二区三区中文字幕| 成人一级视频在线观看| 国产精品一区二区果冻传媒| 懂色一区二区三区免费观看| 丁香五精品蜜臀久久久久99网站| 懂色av一区二区在线播放| 成人福利在线看| 一本色道a无线码一区v| 欧美性猛交xxxx黑人交| 欧美日韩成人在线一区| 精品少妇一区二区三区在线视频| 日韩你懂的在线观看| 精品成人一区二区三区| 中文字幕巨乱亚洲| 亚洲乱码日产精品bd| 亚洲福中文字幕伊人影院| 亚洲第一狼人社区| 麻豆国产精品视频| 国产91精品一区二区麻豆网站| 9人人澡人人爽人人精品| 欧美色涩在线第一页| 日韩精品一区二区三区在线| 国产精品久久久久久久久快鸭| 亚洲国产va精品久久久不卡综合| 久久精品久久99精品久久| 成人激情免费网站| 欧美日本高清视频在线观看| 久久在线观看免费| 一级日本不卡的影视| 六月丁香婷婷色狠狠久久| 99久久伊人久久99| 欧美放荡的少妇| 国产精品美女久久久久aⅴ国产馆| 亚洲日本免费电影| 免费观看日韩电影| 91年精品国产| 国产日产精品一区| 丝袜美腿成人在线| 91网上在线视频| 久久综合成人精品亚洲另类欧美 | 亚洲私人影院在线观看| 免费一级片91| 91久久线看在观草草青青| 欧美精品一区二| 亚洲成国产人片在线观看| 国产91对白在线观看九色| 欧美一级高清大全免费观看| 亚洲乱码日产精品bd| 国产精品夜夜爽| 欧美在线一区二区| 国产精品短视频| 国产一区二区免费在线| 69堂国产成人免费视频| 一区二区在线观看免费| 国产黄色91视频| 精品国产人成亚洲区| 视频一区二区欧美| 欧美在线小视频| 亚洲人成7777| 色综合久久中文综合久久牛| 国产欧美日韩麻豆91| 国产精品一区久久久久| 欧美变态口味重另类| 日本不卡123| 欧美一级黄色录像| 天天色图综合网| 欧美人xxxx| 亚洲午夜三级在线| 欧美专区在线观看一区| 一区二区三区在线观看网站| 色国产精品一区在线观看| 国产精品久久久久一区二区三区| 国产综合色产在线精品| 精品国一区二区三区| 蜜桃精品视频在线观看| 日韩午夜小视频| 精品一区二区三区在线观看| 日韩女优毛片在线|