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

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

?? rulebin.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
   /*******************************************************/   /*      "C" Language Integrated Production System      */   /*                                                     */   /*             CLIPS Version 6.30  10/19/06            */   /*                                                     */   /*              DEFRULE BSAVE/BLOAD MODULE             */   /*******************************************************//*************************************************************//* Purpose: Implements the binary save/load feature for the  *//*    defrule construct.                                     *//*                                                           *//* Principal Programmer(s):                                  *//*      Gary D. Riley                                        *//*                                                           *//* Contributing Programmer(s):                               *//*      Brian L. Donnell                                     *//*      Barry Cameron                                        *//*                                                           *//* Revision History:                                         *//*                                                           *//*      6.24: Removed CONFLICT_RESOLUTION_STRATEGIES,        *//*            DYNAMIC_SALIENCE, and LOGICAL_DEPENDENCIES     *//*            compilation flags.                             *//*                                                           *//*      6.30: Added support for hashed alpha memories.       *//*                                                           *//*            Added salience groups to improve performance   *//*            with large numbers of activations of different *//*            saliences.                                     *//*                                                           *//*************************************************************/#define _RULEBIN_SOURCE_#include "setup.h"#if DEFRULE_CONSTRUCT && (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE) && (! RUN_TIME)#include <stdio.h>#define _STDIO_INCLUDED_#include <string.h>#include "memalloc.h"#include "bload.h"#include "bsave.h"#include "envrnmnt.h"#include "reteutil.h"#include "agenda.h"#include "engine.h"#include "retract.h"#include "rulebsc.h"#include "pattern.h"#include "moduldef.h"#include "rulebin.h"/***************************************//* LOCAL INTERNAL FUNCTION DEFINITIONS *//***************************************/#if BLOAD_AND_BSAVE   static void                    BsaveFind(void *);   static void                    BsaveExpressions(void *,FILE *);   static void                    BsaveStorage(void *,FILE *);   static void                    BsaveBinaryItem(void *,FILE *);   static void                    BsaveJoins(void *,FILE *);   static void                    BsaveJoin(void *,FILE *,struct joinNode *);   static void                    BsaveDisjuncts(void *,FILE *,struct defrule *);   static void                    BsaveTraverseJoins(void *,FILE *,struct joinNode *);   static void                    BsaveLinks(void *,FILE *);   static void                    BsaveTraverseLinks(void *,FILE *,struct joinNode *);   static void                    BsaveLink(void *,FILE *,struct joinLink *);#endif   static void                    BloadStorage(void *);   static void                    BloadBinaryItem(void *);   static void                    UpdateDefruleModule(void *,void *,long);   static void                    UpdateDefrule(void *,void *,long);   static void                    UpdateJoin(void *,void *,long);   static void                    UpdateLink(void *,void *,long);   static void                    ClearBload(void *);   static void                    DeallocateDefruleBloadData(void *);/*****************************************************//* DefruleBinarySetup: Installs the binary save/load *//*   feature for the defrule construct.              *//*****************************************************/globle void DefruleBinarySetup(  void *theEnv)  {   AllocateEnvironmentData(theEnv,RULEBIN_DATA,sizeof(struct defruleBinaryData),DeallocateDefruleBloadData);#if BLOAD_AND_BSAVE   AddBinaryItem(theEnv,"defrule",20,BsaveFind,BsaveExpressions,                             BsaveStorage,BsaveBinaryItem,                             BloadStorage,BloadBinaryItem,                             ClearBload);#endif#if BLOAD || BLOAD_ONLY   AddBinaryItem(theEnv,"defrule",20,NULL,NULL,NULL,NULL,                             BloadStorage,BloadBinaryItem,                             ClearBload);#endif  }/*******************************************************//* DeallocateDefruleBloadData: Deallocates environment *//*    data for the defrule bsave functionality.        *//*******************************************************/static void DeallocateDefruleBloadData(  void *theEnv)  {#if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE) && (! RUN_TIME)   size_t space;   long i;   struct defruleModule *theModuleItem;   struct activation *theActivation, *tmpActivation;   struct salienceGroup *theGroup, *tmpGroup;   for (i = 0; i < DefruleBinaryData(theEnv)->NumberOfJoins; i++)     {       DestroyBetaMemory(theEnv,&DefruleBinaryData(theEnv)->JoinArray[i],LHS);       DestroyBetaMemory(theEnv,&DefruleBinaryData(theEnv)->JoinArray[i],RHS);       ReturnLeftMemory(theEnv,&DefruleBinaryData(theEnv)->JoinArray[i]);      ReturnRightMemory(theEnv,&DefruleBinaryData(theEnv)->JoinArray[i]);     }   for (i = 0; i < DefruleBinaryData(theEnv)->NumberOfDefruleModules; i++)     {      theModuleItem = &DefruleBinaryData(theEnv)->ModuleArray[i];            theActivation = theModuleItem->agenda;      while (theActivation != NULL)        {         tmpActivation = theActivation->next;                  rtn_struct(theEnv,activation,theActivation);                  theActivation = tmpActivation;        }      theGroup = theModuleItem->groupings;      while (theGroup != NULL)        {         tmpGroup = theGroup->next;                  rtn_struct(theEnv,salienceGroup,theGroup);                  theGroup = tmpGroup;        }     }        space = DefruleBinaryData(theEnv)->NumberOfDefruleModules * sizeof(struct defruleModule);   if (space != 0) genfree(theEnv,(void *) DefruleBinaryData(theEnv)->ModuleArray,space);      space = DefruleBinaryData(theEnv)->NumberOfDefrules * sizeof(struct defrule);   if (space != 0) genfree(theEnv,(void *) DefruleBinaryData(theEnv)->DefruleArray,space);      space = DefruleBinaryData(theEnv)->NumberOfJoins * sizeof(struct joinNode);   if (space != 0) genfree(theEnv,(void *) DefruleBinaryData(theEnv)->JoinArray,space);   space = DefruleBinaryData(theEnv)->NumberOfLinks * sizeof(struct joinLink);   if (space != 0) genfree(theEnv,(void *) DefruleBinaryData(theEnv)->LinkArray,space);      if (Bloaded(theEnv))     { rm3(theEnv,DefruleData(theEnv)->AlphaMemoryTable,sizeof(ALPHA_MEMORY_HASH *) * ALPHA_MEMORY_HASH_SIZE); }#endif  }#if BLOAD_AND_BSAVE/*************************************************************//* BsaveFind: Determines the amount of memory needed to save *//*   the defrule and joinNode data structures in addition to *//*   the memory needed for their associated expressions.     *//*************************************************************/static void BsaveFind(  void *theEnv)  {   struct defrule *theDefrule, *theDisjunct;   struct defmodule *theModule;   /*=======================================================*/   /* If a binary image is already loaded, then temporarily */   /* save the count values since these will be overwritten */   /* in the process of saving the binary image.            */   /*=======================================================*/   SaveBloadCount(theEnv,DefruleBinaryData(theEnv)->NumberOfDefruleModules);   SaveBloadCount(theEnv,DefruleBinaryData(theEnv)->NumberOfDefrules);   SaveBloadCount(theEnv,DefruleBinaryData(theEnv)->NumberOfJoins);   SaveBloadCount(theEnv,DefruleBinaryData(theEnv)->NumberOfLinks);   /*====================================================*/   /* Set the binary save ID for defrule data structures */   /* and count the number of each type.                 */   /*====================================================*/   TagRuleNetwork(theEnv,&DefruleBinaryData(theEnv)->NumberOfDefruleModules,                         &DefruleBinaryData(theEnv)->NumberOfDefrules,                         &DefruleBinaryData(theEnv)->NumberOfJoins,                         &DefruleBinaryData(theEnv)->NumberOfLinks);   /*===========================*/   /* Loop through each module. */   /*===========================*/   for (theModule = (struct defmodule *) EnvGetNextDefmodule(theEnv,NULL);        theModule != NULL;        theModule = (struct defmodule *) EnvGetNextDefmodule(theEnv,theModule))     {      /*============================*/      /* Set the current module to  */      /* the module being examined. */      /*============================*/      EnvSetCurrentModule(theEnv,(void *) theModule);      /*==================================================*/      /* Loop through each defrule in the current module. */      /*==================================================*/      for (theDefrule = (struct defrule *) EnvGetNextDefrule(theEnv,NULL);           theDefrule != NULL;           theDefrule = (struct defrule *) EnvGetNextDefrule(theEnv,theDefrule))        {         /*================================================*/         /* Initialize the construct header for the binary */         /* save. The binary save ID has already been set. */         /*================================================*/         MarkConstructHeaderNeededItems(&theDefrule->header,theDefrule->header.bsaveID);         /*===========================================*/         /* Count and mark data structures associated */         /* with dynamic salience.                    */         /*===========================================*/         ExpressionData(theEnv)->ExpressionCount += ExpressionSize(theDefrule->dynamicSalience);         MarkNeededItems(theEnv,theDefrule->dynamicSalience);         /*==========================================*/         /* Loop through each disjunct of the rule   */         /* counting and marking the data structures */         /* associated with RHS actions.             */         /*==========================================*/         for (theDisjunct = theDefrule;              theDisjunct != NULL;              theDisjunct = theDisjunct->disjunct)           {            ExpressionData(theEnv)->ExpressionCount += ExpressionSize(theDisjunct->actions);            MarkNeededItems(theEnv,theDisjunct->actions);           }        }     }   /*===============================*/   /* Reset the bsave tags assigned */   /* to defrule data structures.   */   /*===============================*/   MarkRuleNetwork(theEnv,1);  }/************************************************//* BsaveExpressions: Saves the expressions used *//*   by defrules to the binary save file.       *//************************************************/static void BsaveExpressions(  void *theEnv,  FILE *fp)  {   struct defrule *theDefrule, *theDisjunct;   struct defmodule *theModule;   /*===========================*/   /* Loop through each module. */   /*===========================*/   for (theModule = (struct defmodule *) EnvGetNextDefmodule(theEnv,NULL);        theModule != NULL;        theModule = (struct defmodule *) EnvGetNextDefmodule(theEnv,theModule))     {      /*======================================================*/      /* Set the current module to the module being examined. */      /*======================================================*/      EnvSetCurrentModule(theEnv,(void *) theModule);      /*==================================================*/      /* Loop through each defrule in the current module. */      /*==================================================*/      for (theDefrule = (struct defrule *) EnvGetNextDefrule(theEnv,NULL);           theDefrule != NULL;           theDefrule = (struct defrule *) EnvGetNextDefrule(theEnv,theDefrule))        {         /*===========================================*/         /* Save the dynamic salience of the defrule. */         /*===========================================*/         BsaveExpression(theEnv,theDefrule->dynamicSalience,fp);         /*===================================*/         /* Loop through each disjunct of the */         /* defrule and save its RHS actions. */         /*===================================*/         for (theDisjunct = theDefrule;              theDisjunct != NULL;              theDisjunct = theDisjunct->disjunct)           { BsaveExpression(theEnv,theDisjunct->actions,fp); }        }     }   /*==============================*/   /* Set the marked flag for each */   /* join in the join network.    */   /*==============================*/   MarkRuleNetwork(theEnv,1);  }/*****************************************************//* BsaveStorage: Writes out storage requirements for *//*   all defrule structures to the binary file       *//*****************************************************/static void BsaveStorage(  void *theEnv,  FILE *fp)  {   size_t space;   long int value;   space = sizeof(long) * 5;   GenWrite(&space,sizeof(size_t),fp);   GenWrite(&DefruleBinaryData(theEnv)->NumberOfDefruleModules,sizeof(long int),fp);   GenWrite(&DefruleBinaryData(theEnv)->NumberOfDefrules,sizeof(long int),fp);   GenWrite(&DefruleBinaryData(theEnv)->NumberOfJoins,sizeof(long int),fp);   GenWrite(&DefruleBinaryData(theEnv)->NumberOfLinks,sizeof(long int),fp);   if (DefruleData(theEnv)->RightPrimeJoins == NULL)     { value = -1; }   else     { value = DefruleData(theEnv)->RightPrimeJoins->bsaveID; }      GenWrite(&value,sizeof(long int),fp);   if (DefruleData(theEnv)->LeftPrimeJoins == NULL)     { value = -1; }   else     { value = DefruleData(theEnv)->LeftPrimeJoins->bsaveID; }      GenWrite(&value,sizeof(long int),fp);  }/*******************************************//* BsaveBinaryItem: Writes out all defrule *//*   structures to the binary file.        *//*******************************************/static void BsaveBinaryItem(  void *theEnv,  FILE *fp)  {   size_t space;   struct defrule *theDefrule;   struct defmodule *theModule;   struct defruleModule *theModuleItem;   struct bsaveDefruleModule tempDefruleModule;   /*===============================================*/   /* Write out the space required by the defrules. */   /*===============================================*/   space = (DefruleBinaryData(theEnv)->NumberOfDefrules * sizeof(struct bsaveDefrule)) +           (DefruleBinaryData(theEnv)->NumberOfJoins * sizeof(struct bsaveJoinNode)) +

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品美女www爽爽爽| 日本欧美在线看| 精品一区二区久久| 日韩亚洲欧美成人一区| 亚洲乱码精品一二三四区日韩在线| 日本三级亚洲精品| 色综合中文字幕国产| 国产色综合一区| 国产精品一区二区你懂的| 日韩欧美成人一区| 看片的网站亚洲| 欧美一卡二卡在线观看| 午夜国产精品一区| 日韩欧美一级片| 香蕉成人伊视频在线观看| 国产69精品久久久久毛片| 精品欧美黑人一区二区三区| 有坂深雪av一区二区精品| 一区二区三区加勒比av| 日韩高清欧美激情| 91精品国产综合久久香蕉麻豆| 亚洲国产另类av| 日韩一级欧美一级| 国产成人在线观看免费网站| 国产精品丝袜久久久久久app| fc2成人免费人成在线观看播放| 国产精品久久久久aaaa| 欧美巨大另类极品videosbest | 亚洲国产激情av| 色欧美片视频在线观看| 男女激情视频一区| 日韩三级中文字幕| 国产成人精品亚洲777人妖| 国产精品欧美久久久久一区二区| 成人精品国产一区二区4080| 亚洲国产精品ⅴa在线观看| 欧美日韩国产在线播放网站| 久久国产精品99精品国产| 国产精品日产欧美久久久久| 日韩欧美色综合网站| 色婷婷国产精品久久包臀| 男人的j进女人的j一区| 亚洲在线免费播放| 国产欧美一区二区精品性色| 97se亚洲国产综合自在线观| 青草国产精品久久久久久| 中文字幕日韩精品一区| 国产欧美va欧美不卡在线| 日韩免费视频一区| 精品乱码亚洲一区二区不卡| 67194成人在线观看| 欧美精品乱人伦久久久久久| 91啦中文在线观看| av一二三不卡影片| 国产成人在线视频网站| 91啦中文在线观看| av在线不卡免费看| 国产不卡免费视频| 成人一区二区视频| 99精品久久只有精品| 99久久免费视频.com| 国产精品18久久久| www.欧美.com| 欧美午夜电影网| 日韩精品一区二区三区中文不卡| 777亚洲妇女| 国产欧美精品一区| 亚洲理论在线观看| 亚洲综合区在线| 美女视频一区二区三区| 国产伦理精品不卡| 91国产精品成人| 91精品婷婷国产综合久久 | 韩国av一区二区三区| 9l国产精品久久久久麻豆| 欧美性猛交xxxx黑人交| 精品三级av在线| 久久久久久久久岛国免费| 亚洲特黄一级片| 亚洲一二三专区| 国产精品18久久久久久久久久久久| 九一九一国产精品| av资源网一区| 日韩精品一区二区三区在线观看 | 久久精品国产澳门| 91视频国产观看| 91精品国产综合久久久蜜臀图片| 久久久久亚洲综合| 久久综合精品国产一区二区三区| 国产欧美日韩在线看| 免费在线视频一区| 欧美日韩免费视频| 99re热视频精品| 色婷婷激情一区二区三区| 日韩小视频在线观看专区| 亚洲成人免费视| 欧美在线你懂得| 一区二区在线观看不卡| 国产成人精品免费| 久久伊人蜜桃av一区二区| 九九九精品视频| 337p粉嫩大胆色噜噜噜噜亚洲| 蜜桃精品在线观看| 欧美一卡二卡在线| 美女脱光内衣内裤视频久久网站| 欧美裸体bbwbbwbbw| 日韩影院免费视频| 欧美一级片在线观看| 亚洲激情图片qvod| 91免费在线视频观看| 亚洲精品你懂的| 欧美人体做爰大胆视频| 奇米精品一区二区三区在线观看 | **欧美大码日韩| 成人av中文字幕| 亚洲综合在线第一页| 欧美日本在线观看| 国产一区二区三区美女| 国产精品久久久久久亚洲毛片 | 久久99精品久久久久久| 久久影视一区二区| 在线国产亚洲欧美| 久久精品久久精品| 亚洲人成网站精品片在线观看| 97se亚洲国产综合自在线观| 亚洲午夜日本在线观看| 精品精品国产高清a毛片牛牛| 国产福利精品一区| 日本成人超碰在线观看| 国产精品久久久久久久裸模| 欧美日韩视频在线第一区| 国内不卡的二区三区中文字幕| 自拍偷拍亚洲激情| 日韩女优电影在线观看| 在线观看成人小视频| 看片的网站亚洲| 青青草国产成人99久久| 亚洲精品欧美激情| 国产精品色哟哟网站| 精品久久久网站| 在线电影一区二区三区| 欧美午夜宅男影院| 91蜜桃在线免费视频| 国产成人在线免费观看| 国产乱人伦偷精品视频不卡 | 99国产精品久久久久| 国产在线观看一区二区| 免费看欧美美女黄的网站| 婷婷久久综合九色国产成人| 亚洲激情五月婷婷| 一区二区三区加勒比av| 亚洲最新视频在线播放| 亚洲高清免费观看| 丝袜美腿亚洲一区| 美脚の诱脚舐め脚责91| 麻豆91在线播放免费| 久久精品国产一区二区三| 精品影视av免费| 成人在线视频一区| 日本高清视频一区二区| 欧美性大战久久久久久久蜜臀| 欧美日韩国产小视频| 欧美xxxx老人做受| 国产精品久久久久久亚洲毛片| 亚洲欧美日韩精品久久久久| 亚洲一区在线观看视频| 日本成人在线视频网站| 国产成人在线视频网站| 91麻豆国产精品久久| 欧美在线观看视频一区二区三区| 在线不卡免费欧美| 久久精品欧美日韩精品| 亚洲一区二区美女| 高清不卡在线观看av| 欧美日韩精品系列| 欧美国产欧美亚州国产日韩mv天天看完整| 国产精品丝袜一区| 日韩精品一区第一页| 成人免费视频免费观看| 日韩精品一区二区三区在线| 亚洲欧洲综合另类在线| 九一九一国产精品| 久久精品国产免费| 国产一区在线不卡| 国产成人精品影院| 日韩精品一区二区三区在线播放| 国产精品久久久久久久岛一牛影视| 亚洲综合小说图片| av亚洲精华国产精华| 国产三级欧美三级| 欧美aaaaaa午夜精品| 欧美日韩在线电影| 日韩美女视频一区| 成人免费高清视频在线观看| 久久天天做天天爱综合色| 五月天国产精品| 91精品欧美久久久久久动漫| 亚洲精品久久久久久国产精华液| 国产99久久久国产精品免费看| 精品国产凹凸成av人网站|