亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美一区二区三区性视频| 国产日韩精品视频一区| 亚洲国产成人精品视频| 欧美疯狂性受xxxxx喷水图片| 综合色天天鬼久久鬼色| 成人午夜激情影院| 中文字幕欧美日本乱码一线二线 | 欧美一区二区三区免费大片| 丝袜脚交一区二区| 欧美乱熟臀69xxxxxx| 免费观看日韩av| 精品日韩99亚洲| 国产 欧美在线| 亚洲日本青草视频在线怡红院| 色av综合在线| 日韩成人免费电影| 国产精品污污网站在线观看| 99久久99久久精品国产片果冻| 亚洲精品乱码久久久久久| 欧美精品777| 丰满亚洲少妇av| 亚洲国产毛片aaaaa无费看| 日韩欧美成人一区| 97久久超碰国产精品| 日韩不卡在线观看日韩不卡视频| 国产精品久久精品日日| 欧美性大战xxxxx久久久| 久久99精品国产麻豆不卡| 国产精品国产精品国产专区不片 | 欧美怡红院视频| 国产精品影视网| 日韩高清在线电影| 亚洲码国产岛国毛片在线| 亚洲精品一区二区三区精华液 | 亚洲女女做受ⅹxx高潮| 91精品国产欧美一区二区18| 91在线观看污| 成人黄色小视频| 国产黄色精品视频| 另类综合日韩欧美亚洲| 日本在线观看不卡视频| 夜夜精品视频一区二区| 综合自拍亚洲综合图不卡区| 久久久久久久电影| 精品少妇一区二区三区在线视频| 91免费看视频| 99热这里都是精品| 91老师国产黑色丝袜在线| 国产精品99久久久久久有的能看| 男人的天堂亚洲一区| 久久国产乱子精品免费女| 丝袜亚洲精品中文字幕一区| 日韩精品一级中文字幕精品视频免费观看| 秋霞av亚洲一区二区三| 亚洲男女一区二区三区| 亚洲亚洲精品在线观看| 午夜精品久久久久影视| 视频一区二区三区入口| 日韩激情一区二区| 国产专区欧美精品| 成人国产在线观看| 色久优优欧美色久优优| 91精品国产综合久久久蜜臀粉嫩 | 亚洲欧美日本韩国| 亚洲一区视频在线观看视频| 亚洲国产精品尤物yw在线观看| 午夜视频在线观看一区| 国内成人自拍视频| 91亚洲永久精品| 日韩欧美国产综合一区| 日本一区二区三区四区| 亚洲永久精品大片| 国产综合色在线| 91福利在线看| 国产欧美精品一区二区色综合 | 蜜臀av性久久久久蜜臀av麻豆| 狠狠久久亚洲欧美| 欧美色图免费看| 久久精品欧美日韩| 午夜精品爽啪视频| 92精品国产成人观看免费| 26uuu国产在线精品一区二区| 亚洲欧美日韩小说| 国产成人精品三级| 欧美videossexotv100| 亚洲一区免费视频| 99精品久久只有精品| 久久视频一区二区| 免费观看在线综合色| 欧美日韩第一区日日骚| 久久狠狠亚洲综合| 欧美日韩国产一级| 一区二区三区丝袜| 成人av在线一区二区| 久久久久久影视| 韩国精品主播一区二区在线观看| 正在播放亚洲一区| 丝袜亚洲另类丝袜在线| 欧美久久久影院| 三级久久三级久久| 欧美一级久久久久久久大片| 亚洲国产日韩在线一区模特| 在线亚洲免费视频| 亚洲成av人片在线观看| 欧美精品xxxxbbbb| 日韩精品午夜视频| 久久久亚洲精品一区二区三区| 精品在线一区二区| 国产精品入口麻豆九色| 91日韩一区二区三区| 婷婷开心激情综合| 精品久久久久久久久久久久包黑料 | 精品国内片67194| 国产高清在线观看免费不卡| 国产精品久久久久一区二区三区| 成人aa视频在线观看| 亚洲成国产人片在线观看| 欧美日韩亚洲综合在线| 国产在线看一区| 亚洲精选免费视频| 国产亚洲综合在线| 精品久久久久久久人人人人传媒| 日韩欧美成人激情| 91精品蜜臀在线一区尤物| 欧美日本国产视频| 日韩欧美激情一区| 久久综合99re88久久爱| 成人免费在线视频观看| 国产精品激情偷乱一区二区∴| 色婷婷综合五月| 国产欧美一区二区精品久导航| 99精品欧美一区二区三区小说| 成人免费视频一区| 91丨九色丨尤物| 欧美亚一区二区| 91.xcao| 日韩限制级电影在线观看| 2021中文字幕一区亚洲| 亚洲国产精品黑人久久久| 国产精品国产三级国产| 亚洲麻豆国产自偷在线| 日产国产欧美视频一区精品| 韩国一区二区三区| caoporen国产精品视频| 欧美性大战久久久久久久蜜臀| 在线成人小视频| 国产精品你懂的在线欣赏| 亚洲亚洲人成综合网络| 国产精品一区二区久久不卡| 91一区二区三区在线播放| 欧美大片在线观看一区二区| 国产精品美女久久福利网站| 日韩av网站免费在线| 成人国产精品免费网站| 91精品国产色综合久久不卡蜜臀 | 成人精品亚洲人成在线| 91黄色免费网站| 国产欧美一区二区三区在线看蜜臀 | 高清不卡一二三区| 欧美一级日韩免费不卡| 亚洲色图20p| av电影天堂一区二区在线观看| 91麻豆精品91久久久久同性| 亚洲欧美成aⅴ人在线观看| 激情都市一区二区| 日韩限制级电影在线观看| 亚洲欧美日韩国产综合| 91福利小视频| 国产精品无遮挡| 国产一区二区不卡| 日韩精品在线网站| 日本女优在线视频一区二区| 欧美精品自拍偷拍动漫精品| 亚洲国产中文字幕在线视频综合 | 国产在线精品视频| 日韩精品最新网址| 精品一区二区精品| 久久综合久久综合久久综合| 久久成人免费电影| 精品欧美黑人一区二区三区| 国内欧美视频一区二区| 亚洲精品在线免费观看视频| 黄一区二区三区| 久久免费的精品国产v∧| 国产福利一区二区三区在线视频| 精品美女在线播放| 国产成人精品aa毛片| 欧美国产精品专区| 色乱码一区二区三区88| 亚洲风情在线资源站| 欧美一区二区高清| 国产黑丝在线一区二区三区| 亚洲免费资源在线播放| 91精品国产麻豆| 成人夜色视频网站在线观看| 亚洲精品欧美激情| 日韩欧美精品在线视频| 99精品久久只有精品| 麻豆91精品视频| 一区二区三区四区乱视频|