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

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

?? factmngr.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
   /*******************************************************/   /*      "C" Language Integrated Production System      */   /*                                                     */   /*             CLIPS Version 6.30  10/19/06            */   /*                                                     */   /*                 FACT MANAGER MODULE                 */   /*******************************************************//*************************************************************//* Purpose: Provides core routines for maintaining the fact  *//*   list including assert/retract operations, data          *//*   structure creation/deletion, printing, slot access,     *//*   and other utility functions.                            *//*                                                           *//* Principal Programmer(s):                                  *//*      Gary D. Riley                                        *//*                                                           *//* Contributing Programmer(s):                               *//*      Brian L. Donnell                                     *//*                                                           *//* Revision History:                                         *//*      6.23: Added support for templates maintaining their  *//*            own list of facts.                             *//*                                                           *//*      6.24: Removed LOGICAL_DEPENDENCIES compilation flag. *//*                                                           *//*            Renamed BOOLEAN macro type to intBool.         *//*                                                           *//*            AssignFactSlotDefaults function does not       *//*            properly handle defaults for multifield slots. *//*            DR0869                                         *//*                                                           *//*            Support for ppfact command.                    *//*                                                           *//*************************************************************/#define _FACTMNGR_SOURCE_#include <stdio.h>#define _STDIO_INCLUDED_#include "setup.h"#if DEFTEMPLATE_CONSTRUCT && DEFRULE_CONSTRUCT#include "constant.h"#include "symbol.h"#include "memalloc.h"#include "exprnpsr.h"#include "argacces.h"#include "scanner.h"#include "router.h"#include "strngrtr.h"#include "match.h"#include "factbld.h"#include "factqury.h"#include "reteutil.h"#include "retract.h"#include "factcmp.h"#include "filecom.h"#include "factfun.h"#include "factcom.h"#include "constrct.h"#include "factrhs.h"#include "factmch.h"#include "watch.h"#include "utility.h"#include "factbin.h"#include "factmngr.h"#include "facthsh.h"#include "default.h"#include "commline.h"#include "envrnmnt.h"#include "sysdep.h"#include "engine.h"#include "lgcldpnd.h"#include "drive.h"#include "ruledlt.h"#include "tmpltbsc.h"#include "tmpltdef.h"#include "tmpltutl.h"#include "tmpltfun.h"/***************************************//* LOCAL INTERNAL FUNCTION DEFINITIONS *//***************************************/   static void                    ResetFacts(void *);   static int                     ClearFactsReady(void *);   static void                    RemoveGarbageFacts(void *);   static void                    DeallocateFactData(void *);/**************************************************************//* InitializeFacts: Initializes the fact data representation. *//*   Facts are only available when both the defrule and       *//*   deftemplate constructs are available.                    *//**************************************************************/globle void InitializeFacts(  void *theEnv)  {   struct patternEntityRecord factInfo = { { "FACT_ADDRESS", FACT_ADDRESS,1,0,0,                                                     PrintFactIdentifier,                                                     PrintFactIdentifierInLongForm,                                                     EnvRetract,                                                     NULL,                                                     EnvGetNextFact,                                                     EnvIncrementFactCount,                                                     EnvDecrementFactCount,NULL,NULL,NULL,NULL,NULL                                                   },                                                   DecrementFactBasisCount,                                                   IncrementFactBasisCount,                                                   MatchFactFunction,                                                   NULL                                                 };                                                    struct fact dummyFact = { { NULL, NULL, 0, 0L }, NULL, NULL, -1L, 0, 0, 1,                                  NULL, NULL, NULL, NULL, { 1, 0, 0UL, NULL, { { 0, NULL } } } };      AllocateEnvironmentData(theEnv,FACTS_DATA,sizeof(struct factsData),DeallocateFactData);   memcpy(&FactData(theEnv)->FactInfo,&factInfo,sizeof(struct patternEntityRecord));    dummyFact.factHeader.theInfo = &FactData(theEnv)->FactInfo;       memcpy(&FactData(theEnv)->DummyFact,&dummyFact,sizeof(struct fact));     FactData(theEnv)->LastModuleIndex = -1;   /*=========================================*/   /* Initialize the fact hash table (used to */   /* quickly determine if a fact exists).    */   /*=========================================*/   InitializeFactHashTable(theEnv);   /*============================================*/   /* Initialize the fact callback functions for */   /* use with the reset and clear commands.     */   /*============================================*/   EnvAddResetFunction(theEnv,"facts",ResetFacts,60);   AddClearReadyFunction(theEnv,"facts",ClearFactsReady,0);   /*=============================*/   /* Initialize periodic garbage */   /* collection for facts.       */   /*=============================*/   AddCleanupFunction(theEnv,"facts",RemoveGarbageFacts,0);   /*===================================*/   /* Initialize fact pattern matching. */   /*===================================*/   InitializeFactPatterns(theEnv);   /*==================================*/   /* Initialize the facts keyword for */   /* use with the watch command.      */   /*==================================*/#if DEBUGGING_FUNCTIONS   AddWatchItem(theEnv,"facts",0,&FactData(theEnv)->WatchFacts,80,DeftemplateWatchAccess,DeftemplateWatchPrint);#endif   /*=========================================*/   /* Initialize fact commands and functions. */   /*=========================================*/   FactCommandDefinitions(theEnv);   FactFunctionDefinitions(theEnv);      /*==============================*/   /* Initialize fact set queries. */   /*==============================*/  #if FACT_SET_QUERIES   SetupFactQuery(theEnv);#endif   /*==================================*/   /* Initialize fact patterns for use */   /* with the bload/bsave commands.   */   /*==================================*/#if (BLOAD || BLOAD_ONLY || BLOAD_AND_BSAVE) && (! RUN_TIME)   FactBinarySetup(theEnv);#endif   /*===================================*/   /* Initialize fact patterns for use  */   /* with the constructs-to-c command. */   /*===================================*/#if CONSTRUCT_COMPILER && (! RUN_TIME)   FactPatternsCompilerSetup(theEnv);#endif  }  /***********************************//* DeallocateFactData: Deallocates *//*   environment data for facts.   *//***********************************/static void DeallocateFactData(  void *theEnv)  {   struct factHashEntry *tmpFHEPtr, *nextFHEPtr;   struct fact *tmpFactPtr, *nextFactPtr;   unsigned long i;   struct patternMatch *theMatch, *tmpMatch;      for (i = 0; i < FactData(theEnv)->FactHashTableSize; i++)      {      tmpFHEPtr = FactData(theEnv)->FactHashTable[i];            while (tmpFHEPtr != NULL)        {         nextFHEPtr = tmpFHEPtr->next;         rtn_struct(theEnv,factHashEntry,tmpFHEPtr);         tmpFHEPtr = nextFHEPtr;        }     }     rm3(theEnv,FactData(theEnv)->FactHashTable,       sizeof(struct factHashEntry *) * FactData(theEnv)->FactHashTableSize);                    tmpFactPtr = FactData(theEnv)->FactList;   while (tmpFactPtr != NULL)     {      nextFactPtr = tmpFactPtr->nextFact;      theMatch = (struct patternMatch *) tmpFactPtr->list;              while (theMatch != NULL)        {         tmpMatch = theMatch->next;         rtn_struct(theEnv,patternMatch,theMatch);         theMatch = tmpMatch;        }      ReturnEntityDependencies(theEnv,(struct patternEntity *) tmpFactPtr);      ReturnFact(theEnv,tmpFactPtr);      tmpFactPtr = nextFactPtr;      }        tmpFactPtr = FactData(theEnv)->GarbageFacts;   while (tmpFactPtr != NULL)     {      nextFactPtr = tmpFactPtr->nextFact;      ReturnFact(theEnv,tmpFactPtr);      tmpFactPtr = nextFactPtr;      }  }/**********************************************//* PrintFactWithIdentifier: Displays a single *//*   fact preceded by its fact identifier.    *//**********************************************/globle void PrintFactWithIdentifier(  void *theEnv,  char *logicalName,  struct fact *factPtr)  {   char printSpace[20];   gensprintf(printSpace,"f-%-5lld ",factPtr->factIndex);   EnvPrintRouter(theEnv,logicalName,printSpace);   PrintFact(theEnv,logicalName,factPtr,FALSE,FALSE);  }/****************************************************//* PrintFactIdentifier: Displays a fact identifier. *//****************************************************/globle void PrintFactIdentifier(  void *theEnv,  char *logicalName,  void *factPtr)  {   char printSpace[20];   gensprintf(printSpace,"f-%lld",((struct fact *) factPtr)->factIndex);   EnvPrintRouter(theEnv,logicalName,printSpace);  }/********************************************//* PrintFactIdentifierInLongForm: Display a *//*   fact identifier in a longer format.    *//********************************************/globle void PrintFactIdentifierInLongForm(  void *theEnv,  char *logicalName,  void *factPtr)  {   if (PrintUtilityData(theEnv)->AddressesToStrings) EnvPrintRouter(theEnv,logicalName,"\"");   if (factPtr != (void *) &FactData(theEnv)->DummyFact)     {      EnvPrintRouter(theEnv,logicalName,"<Fact-");      PrintLongInteger(theEnv,logicalName,((struct fact *) factPtr)->factIndex);      EnvPrintRouter(theEnv,logicalName,">");     }   else     { EnvPrintRouter(theEnv,logicalName,"<Dummy Fact>"); }   if (PrintUtilityData(theEnv)->AddressesToStrings) EnvPrintRouter(theEnv,logicalName,"\"");  }/*******************************************//* DecrementFactBasisCount: Decrements the *//*   partial match busy count of a fact    *//*******************************************/globle void DecrementFactBasisCount(  void *theEnv,  void *vFactPtr)  {   struct fact *factPtr = (struct fact *) vFactPtr;   struct multifield *theSegment;   int i;   EnvDecrementFactCount(theEnv,factPtr);   theSegment = &factPtr->theProposition;   for (i = 0 ; i < (int) theSegment->multifieldLength ; i++)     {      AtomDeinstall(theEnv,theSegment->theFields[i].type,theSegment->theFields[i].value);     }  }/*******************************************//* IncrementFactBasisCount: Increments the *//*   partial match busy count of a fact.   *//*******************************************/globle void IncrementFactBasisCount(  void *theEnv,  void *vFactPtr)  {   struct fact *factPtr = (struct fact *) vFactPtr;   struct multifield *theSegment;   int i;   EnvIncrementFactCount(theEnv,factPtr);   theSegment = &factPtr->theProposition;   for (i = 0 ; i < (int) theSegment->multifieldLength ; i++)     {      AtomInstall(theEnv,theSegment->theFields[i].type,theSegment->theFields[i].value);     }  }/**************************************************//* PrintFact: Displays the printed representation *//*   of a fact containing the relation name and   *//*   all of the fact's slots or fields.           *//**************************************************/globle void PrintFact(  void *theEnv,  char *logicalName,  struct fact *factPtr,  int seperateLines,  int ignoreDefaults)  {   struct multifield *theMultifield;   /*=========================================*/   /* Print a deftemplate (non-ordered) fact. */   /*=========================================*/   if (factPtr->whichDeftemplate->implied == FALSE)     {      PrintTemplateFact(theEnv,logicalName,factPtr,seperateLines,ignoreDefaults);      return;     }   /*==============================*/   /* Print an ordered fact (which */   /* has an implied deftemplate). */   /*==============================*/   EnvPrintRouter(theEnv,logicalName,"(");   EnvPrintRouter(theEnv,logicalName,factPtr->whichDeftemplate->header.name->contents);   theMultifield = (struct multifield *) factPtr->theProposition.theFields[0].value;   if (theMultifield->multifieldLength != 0)     {      EnvPrintRouter(theEnv,logicalName," ");      PrintMultifield(theEnv,logicalName,theMultifield,0,                      (long) (theMultifield->multifieldLength - 1),                      FALSE);     }   EnvPrintRouter(theEnv,logicalName,")");  }/*********************************************/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
4438x成人网最大色成网站| 久久99久国产精品黄毛片色诱| 丰满白嫩尤物一区二区| 久久久国产精华| 国产成人午夜精品影院观看视频| 久久先锋影音av鲁色资源| 国产传媒日韩欧美成人| 国产日韩三级在线| 99国产精品国产精品毛片| 自拍偷拍国产精品| 色婷婷综合久久久久中文 | 精品一区二区三区免费| 欧美一级片免费看| 国产真实精品久久二三区| 精品三级av在线| 国产精品18久久久久久vr| 亚洲va欧美va人人爽| 成人免费视频播放| 亚洲欧美另类久久久精品2019| 色婷婷av一区二区三区软件| 亚洲123区在线观看| www久久精品| 99久久国产综合精品麻豆| 丝袜国产日韩另类美女| 久久免费美女视频| 99精品欧美一区二区蜜桃免费| 香蕉影视欧美成人| 久久精品一区蜜桃臀影院| 在线免费观看日本欧美| 日韩av不卡一区二区| 国产婷婷精品av在线| 欧洲av在线精品| 激情文学综合丁香| 亚洲欧洲日产国产综合网| 欧美在线一区二区三区| 午夜精品福利视频网站| 精品美女被调教视频大全网站| 国产大陆精品国产| 亚洲激情五月婷婷| 欧美一区二区三区免费| 国产福利电影一区二区三区| 久久综合久色欧美综合狠狠| 成人性生交大片免费看中文| 亚洲午夜激情网站| 久久久久久久久久久久久久久99| 成人精品国产免费网站| 亚洲在线视频免费观看| 精品国产网站在线观看| 99久久国产综合精品麻豆| 日本美女一区二区| 国产精品视频麻豆| 欧美天天综合网| 美女视频免费一区| 亚洲激情一二三区| 国产欧美日韩三区| 欧美精品久久99久久在免费线| 国产精品77777| 日韩高清不卡一区二区三区| 国产精品高潮呻吟| 精品欧美久久久| 在线亚洲高清视频| 经典三级视频一区| 亚洲一线二线三线视频| 国产日韩欧美一区二区三区综合| 欧美色精品天天在线观看视频| 国产在线不卡视频| 五月激情综合色| 亚洲色图欧洲色图| 日韩欧美国产一区二区在线播放| 欧美天堂亚洲电影院在线播放| 粉嫩一区二区三区在线看| 日本欧美在线观看| 一区二区三区四区不卡视频 | 欧美日韩高清一区二区不卡| www.日韩精品| 国产在线国偷精品产拍免费yy| 亚洲精品国产第一综合99久久| 久久精品夜色噜噜亚洲a∨| 欧美一区二区三区在线| 欧洲一区二区av| 91女厕偷拍女厕偷拍高清| 国内精品在线播放| 老司机免费视频一区二区| 亚洲综合激情小说| 日韩毛片精品高清免费| 欧美国产精品专区| 日韩精品一区二区三区在线| 欧美人妖巨大在线| 91麻豆国产福利在线观看| 从欧美一区二区三区| 国产乱码精品一区二区三区av| 麻豆精品国产91久久久久久| 日本va欧美va瓶| 青青草国产精品97视觉盛宴| 视频一区二区三区在线| 亚洲一区二区三区在线播放| 亚洲欧美经典视频| 亚洲欧美日韩久久| 最新不卡av在线| 亚洲欧洲国产日韩| 自拍偷拍亚洲综合| 亚洲精品乱码久久久久久久久| 亚洲欧洲在线观看av| 26uuu色噜噜精品一区二区| 欧美日韩精品一区二区| 欧美三级乱人伦电影| 欧美日韩国产高清一区| 欧美日韩专区在线| 在线播放国产精品二区一二区四区| 欧美日韩三级一区| 欧美成va人片在线观看| 欧美一级片免费看| 久久伊人蜜桃av一区二区| 国产日韩欧美制服另类| 最新国产精品久久精品| 亚洲黄色性网站| 亚洲成av人片观看| 极品少妇一区二区三区精品视频| 寂寞少妇一区二区三区| 国产一区二区在线观看免费| av资源站一区| 欧美日本免费一区二区三区| 精品国产a毛片| 中文字幕在线观看不卡| 亚洲综合在线第一页| 奇米在线7777在线精品| 国产一区二区按摩在线观看| 麻豆精品一区二区三区| 成人av资源站| 欧美丰满一区二区免费视频 | 麻豆精品精品国产自在97香蕉| 久久99精品一区二区三区三区| 成人不卡免费av| 91精品免费在线观看| 欧美美女直播网站| 中文字幕一区二区三区不卡在线| 中文字幕一区二区不卡| 肉色丝袜一区二区| 风间由美中文字幕在线看视频国产欧美| 91影院在线免费观看| 欧美一级理论性理论a| 中文字幕高清不卡| 五月天亚洲精品| 成人在线一区二区三区| 欧美麻豆精品久久久久久| 国产日本亚洲高清| 五月天丁香久久| av成人免费在线| 欧美中文字幕久久| 国产精品久久久久久久午夜片| 日本午夜精品一区二区三区电影| 成人免费福利片| 日韩三级视频在线看| 亚洲欧美日韩国产成人精品影院| 蜜桃视频第一区免费观看| 91视视频在线观看入口直接观看www | 色94色欧美sute亚洲13| 精品国产乱码久久久久久久| 亚洲综合在线电影| 成人免费高清视频| 26uuu精品一区二区| 午夜精品福利一区二区三区av| a4yy欧美一区二区三区| 久久欧美一区二区| 奇米色777欧美一区二区| 亚洲在线视频网站| 91在线视频播放地址| 久久免费的精品国产v∧| 《视频一区视频二区| 日日夜夜精品视频免费| 成人高清在线视频| 精品国免费一区二区三区| 首页欧美精品中文字幕| 日本高清无吗v一区| 中文字幕av不卡| 国产在线一区二区综合免费视频| 99精品国产热久久91蜜凸| 国产校园另类小说区| 狠狠狠色丁香婷婷综合激情| 91精品啪在线观看国产60岁| 亚洲观看高清完整版在线观看| jlzzjlzz亚洲日本少妇| 中文字幕国产精品一区二区| 国产福利一区二区| 国产女主播在线一区二区| 国产福利一区二区三区视频在线| 久久综合成人精品亚洲另类欧美| 久久99久久久久久久久久久| 日韩你懂的电影在线观看| 日韩精品欧美精品| 7777精品伊人久久久大香线蕉经典版下载 | 日韩精品一区二区三区老鸭窝| 老司机精品视频线观看86| 日韩精品一区二区在线观看| 激情国产一区二区| 久久久久99精品国产片| 国产suv精品一区二区三区| 国产日产亚洲精品系列| 成人午夜视频免费看| 亚洲欧美偷拍另类a∨色屁股|