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

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

?? insquery.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
   /*******************************************************/   /*      "C" Language Integrated Production System      */   /*                                                     */   /*               CLIPS Version 6.24  06/05/06          */   /*                                                     */   /*                                                     */   /*******************************************************//*************************************************************//* Purpose: Query Functions for Objects                      *//*                                                           *//* Principal Programmer(s):                                  *//*      Brian L. Donnell                                     *//*                                                           *//* Contributing Programmer(s):                               *//*                                                           *//*                                                           *//* Revision History:                                         *//*      6.23: Correction for FalseSymbol/TrueSymbol. DR0859  *//*                                                           *//*            Corrected compilation errors for files         *//*            generated by constructs-to-c. DR0861           *//*                                                           *//*      6.24: Renamed BOOLEAN macro type to intBool.         *//*                                                           *//*************************************************************//* =========================================   *****************************************               EXTERNAL DEFINITIONS   =========================================   ***************************************** */#include "setup.h"#if INSTANCE_SET_QUERIES#include "argacces.h"#include "classcom.h"#include "classfun.h"#include "envrnmnt.h"#include "memalloc.h"#include "exprnpsr.h"#include "insfun.h"#include "insmngr.h"#include "insqypsr.h"#include "prcdrfun.h"#include "router.h"#include "utility.h"#define _INSQUERY_SOURCE_#include "insquery.h"/* =========================================   *****************************************      INTERNALLY VISIBLE FUNCTION HEADERS   =========================================   ***************************************** */static void PushQueryCore(void *);static void PopQueryCore(void *);static QUERY_CORE *FindQueryCore(void *,int);static QUERY_CLASS *DetermineQueryClasses(void *,EXPRESSION *,char *,unsigned *);static QUERY_CLASS *FormChain(void *,char *,DATA_OBJECT *);static void DeleteQueryClasses(void *,QUERY_CLASS *);static int TestForFirstInChain(void *,QUERY_CLASS *,int);static int TestForFirstInstanceInClass(void *,struct defmodule *,int,DEFCLASS *,QUERY_CLASS *,int);static void TestEntireChain(void *,QUERY_CLASS *,int);static void TestEntireClass(void *,struct defmodule *,int,DEFCLASS *,QUERY_CLASS *,int);static void AddSolution(void *);static void PopQuerySoln(void *);/****************************************************  NAME         : SetupQuery  DESCRIPTION  : Initializes instance query H/L                   functions and parsers  INPUTS       : None  RETURNS      : Nothing useful  SIDE EFFECTS : Sets up kernel functions and parsers  NOTES        : None ****************************************************/globle void SetupQuery(  void *theEnv)  {   AllocateEnvironmentData(theEnv,INSTANCE_QUERY_DATA,sizeof(struct instanceQueryData),NULL);#if ! RUN_TIME   InstanceQueryData(theEnv)->QUERY_DELIMETER_SYMBOL = (SYMBOL_HN *) EnvAddSymbol(theEnv,QUERY_DELIMETER_STRING);   IncrementSymbolCount(InstanceQueryData(theEnv)->QUERY_DELIMETER_SYMBOL);   EnvDefineFunction2(theEnv,"(query-instance)",'o',                  PTIEF GetQueryInstance,"GetQueryInstance",NULL);   EnvDefineFunction2(theEnv,"(query-instance-slot)",'u',                  PTIEF GetQueryInstanceSlot,"GetQueryInstanceSlot",NULL);   EnvDefineFunction2(theEnv,"any-instancep",'b',PTIEF AnyInstances,"AnyInstances",NULL);   AddFunctionParser(theEnv,"any-instancep",ParseQueryNoAction);   EnvDefineFunction2(theEnv,"find-instance",'m',                  PTIEF QueryFindInstance,"QueryFindInstance",NULL);   AddFunctionParser(theEnv,"find-instance",ParseQueryNoAction);   EnvDefineFunction2(theEnv,"find-all-instances",'m',                  PTIEF QueryFindAllInstances,"QueryFindAllInstances",NULL);   AddFunctionParser(theEnv,"find-all-instances",ParseQueryNoAction);   EnvDefineFunction2(theEnv,"do-for-instance",'u',                  PTIEF QueryDoForInstance,"QueryDoForInstance",NULL);   AddFunctionParser(theEnv,"do-for-instance",ParseQueryAction);   EnvDefineFunction2(theEnv,"do-for-all-instances",'u',                  PTIEF QueryDoForAllInstances,"QueryDoForAllInstances",NULL);   AddFunctionParser(theEnv,"do-for-all-instances",ParseQueryAction);   EnvDefineFunction2(theEnv,"delayed-do-for-all-instances",'u',                  PTIEF DelayedQueryDoForAllInstances,                  "DelayedQueryDoForAllInstances",NULL);   AddFunctionParser(theEnv,"delayed-do-for-all-instances",ParseQueryAction);#endif  }/*************************************************************  NAME         : GetQueryInstance  DESCRIPTION  : Internal function for referring to instance                    array on instance-queries  INPUTS       : None  RETURNS      : The name of the specified instance-set member  SIDE EFFECTS : None  NOTES        : H/L Syntax : ((query-instance) <index>) *************************************************************/globle void *GetQueryInstance(  void *theEnv)  {   register QUERY_CORE *core;   core = FindQueryCore(theEnv,ValueToInteger(GetpValue(GetFirstArgument())));   return(GetFullInstanceName(theEnv,core->solns[ValueToInteger(GetpValue(GetFirstArgument()->nextArg))]));  }/***************************************************************************  NAME         : GetQueryInstanceSlot  DESCRIPTION  : Internal function for referring to slots of instances in                    instance array on instance-queries  INPUTS       : The caller's result buffer  RETURNS      : Nothing useful  SIDE EFFECTS : Caller's result buffer set appropriately  NOTES        : H/L Syntax : ((query-instance-slot) <index> <slot-name>) **************************************************************************/globle void GetQueryInstanceSlot(  void *theEnv,  DATA_OBJECT *result)  {   INSTANCE_TYPE *ins;   INSTANCE_SLOT *sp;   DATA_OBJECT temp;   QUERY_CORE *core;   result->type = SYMBOL;   result->value = EnvFalseSymbol(theEnv);   core = FindQueryCore(theEnv,ValueToInteger(GetpValue(GetFirstArgument())));   ins = core->solns[ValueToInteger(GetpValue(GetFirstArgument()->nextArg))];   EvaluateExpression(theEnv,GetFirstArgument()->nextArg->nextArg,&temp);   if (temp.type != SYMBOL)     {      ExpectedTypeError1(theEnv,"get",1,"symbol");      SetEvaluationError(theEnv,TRUE);      return;     }   sp = FindInstanceSlot(theEnv,ins,(SYMBOL_HN *) temp.value);   if (sp == NULL)     {      SlotExistError(theEnv,ValueToString(temp.value),"instance-set query");      return;     }   result->type = (unsigned short) sp->type;   result->value = sp->value;   if (sp->type == MULTIFIELD)     {      result->begin = 0;      SetpDOEnd(result,GetInstanceSlotLength(sp));     }  }/* =============================================================================   =============================================================================   Following are the instance query functions :     any-instancep         : Determines if any instances satisfy the query     find-instance         : Finds first (set of) instance(s) which satisfies                               the query and stores it in a multi-field     find-all-instances    : Finds all (sets of) instances which satisfy the                               the query and stores them in a multi-field     do-for-instance       : Executes a given action for the first (set of)                               instance(s) which satisfy the query     do-for-all-instances  : Executes an action for all instances which satisfy                               the query as they are found     delayed-do-for-all-instances : Same as above - except that the list of instances                               which satisfy the query is formed before any                               actions are executed     Instance candidate search algorithm :     All permutations of first restriction class instances with other       restriction class instances (Rightmost are varied first)     All permutations of first restriction class's subclasses' instances with       other restriction class instances.     And  so on...     For any one class, instances are examined in the order they were defined     Example :     (defclass a (is-a standard-user))     (defclass b (is-a standard-user))     (defclass c (is-a standard-user))     (defclass d (is-a a b))     (make-instance a1 of a)     (make-instance a2 of a)     (make-instance b1 of b)     (make-instance b2 of b)     (make-instance c1 of c)     (make-instance c2 of c)     (make-instance d1 of d)     (make-instance d2 of d)     (any-instancep ((?a a b) (?b c)) <query>)     The permutations (?a ?b) would be examined in the following order :     (a1 c1),(a1 c2),(a2 c1),(a2 c2),(d1 c1),(d1 c2),(d2 c1),(d2 c2),     (b1 c1),(b1 c2),(b2 c1),(b2 c2),(d1 c1),(d1 c2),(d2 c1),(d2 c2)     Notice the duplication because d is a subclass of both and a and b.   =============================================================================   ============================================================================= *//******************************************************************************  NAME         : AnyInstances  DESCRIPTION  : Determines if there any existing instances which satisfy                   the query  INPUTS       : None  RETURNS      : TRUE if the query is satisfied, FALSE otherwise  SIDE EFFECTS : The query class-expressions are evaluated once,                   and the query boolean-expression is evaluated                   zero or more times (depending on instance restrictions                   and how early the expression evaulates to TRUE - if at all).  NOTES        : H/L Syntax : See ParseQueryNoAction() ******************************************************************************/globle intBool AnyInstances(  void *theEnv)  {   QUERY_CLASS *qclasses;   unsigned rcnt;   int TestResult;   qclasses = DetermineQueryClasses(theEnv,GetFirstArgument()->nextArg,                                      "any-instancep",&rcnt);   if (qclasses == NULL)     return(FALSE);   PushQueryCore(theEnv);   InstanceQueryData(theEnv)->QueryCore = get_struct(theEnv,query_core);   InstanceQueryData(theEnv)->QueryCore->solns = (INSTANCE_TYPE **) gm2(theEnv,(sizeof(INSTANCE_TYPE *) * rcnt));   InstanceQueryData(theEnv)->QueryCore->query = GetFirstArgument();   TestResult = TestForFirstInChain(theEnv,qclasses,0);   InstanceQueryData(theEnv)->AbortQuery = FALSE;   rm(theEnv,(void *) InstanceQueryData(theEnv)->QueryCore->solns,(sizeof(INSTANCE_TYPE *) * rcnt));   rtn_struct(theEnv,query_core,InstanceQueryData(theEnv)->QueryCore);   PopQueryCore(theEnv);   DeleteQueryClasses(theEnv,qclasses);   return(TestResult);  }/******************************************************************************  NAME         : QueryFindInstance  DESCRIPTION  : Finds the first set of instances which satisfy the query and                   stores their names in the user's multi-field variable  INPUTS       : Caller's result buffer  RETURNS      : TRUE if the query is satisfied, FALSE otherwise  SIDE EFFECTS : The query class-expressions are evaluated once,                   and the query boolean-expression is evaluated                   zero or more times (depending on instance restrictions                   and how early the expression evaulates to TRUE - if at all).  NOTES        : H/L Syntax : See ParseQueryNoAction() ******************************************************************************/globle void QueryFindInstance(  void *theEnv,  DATA_OBJECT *result)  {   QUERY_CLASS *qclasses;   unsigned rcnt,i;   result->type = MULTIFIELD;   result->begin = 0;   result->end = -1;   qclasses = DetermineQueryClasses(theEnv,GetFirstArgument()->nextArg,                                      "find-instance",&rcnt);   if (qclasses == NULL)     {      result->value = (void *) EnvCreateMultifield(theEnv,0L);      return;     }   PushQueryCore(theEnv);   InstanceQueryData(theEnv)->QueryCore = get_struct(theEnv,query_core);   InstanceQueryData(theEnv)->QueryCore->solns = (INSTANCE_TYPE **)                      gm2(theEnv,(sizeof(INSTANCE_TYPE *) * rcnt));   InstanceQueryData(theEnv)->QueryCore->query = GetFirstArgument();   if (TestForFirstInChain(theEnv,qclasses,0) == TRUE)     {      result->value = (void *) EnvCreateMultifield(theEnv,rcnt);      SetpDOEnd(result,rcnt);      for (i = 1 ; i <= rcnt ; i++)        {         SetMFType(result->value,i,INSTANCE_NAME);         SetMFValue(result->value,i,GetFullInstanceName(theEnv,InstanceQueryData(theEnv)->QueryCore->solns[i - 1]));        }     }   else      result->value = (void *) EnvCreateMultifield(theEnv,0L);   InstanceQueryData(theEnv)->AbortQuery = FALSE;   rm(theEnv,(void *) InstanceQueryData(theEnv)->QueryCore->solns,(sizeof(INSTANCE_TYPE *) * rcnt));   rtn_struct(theEnv,query_core,InstanceQueryData(theEnv)->QueryCore);   PopQueryCore(theEnv);   DeleteQueryClasses(theEnv,qclasses);  }/******************************************************************************  NAME         : QueryFindAllInstances  DESCRIPTION  : Finds all sets of instances which satisfy the query and                   stores their names in the user's multi-field variable                 The sets are stored sequentially :                   Number of sets = (Multi-field length) / (Set length)                 The first set is if the first (set length) atoms of the                   multi-field variable, and so on.  INPUTS       : Caller's result buffer  RETURNS      : Nothing useful  SIDE EFFECTS : The query class-expressions are evaluated once,                   and the query boolean-expression is evaluated                   once for every instance set.  NOTES        : H/L Syntax : See ParseQueryNoAction() ******************************************************************************/globle void QueryFindAllInstances(  void *theEnv,  DATA_OBJECT *result)  {   QUERY_CLASS *qclasses;   unsigned rcnt;   register unsigned i,j;   result->type = MULTIFIELD;   result->begin = 0;   result->end = -1;   qclasses = DetermineQueryClasses(theEnv,GetFirstArgument()->nextArg,                                      "find-all-instances",&rcnt);   if (qclasses == NULL)     {      result->value = (void *) EnvCreateMultifield(theEnv,0L);      return;     }   PushQueryCore(theEnv);   InstanceQueryData(theEnv)->QueryCore = get_struct(theEnv,query_core);   InstanceQueryData(theEnv)->QueryCore->solns = (INSTANCE_TYPE **) gm2(theEnv,(sizeof(INSTANCE_TYPE *) * rcnt));   InstanceQueryData(theEnv)->QueryCore->query = GetFirstArgument();   InstanceQueryData(theEnv)->QueryCore->action = NULL;   InstanceQueryData(theEnv)->QueryCore->soln_set = NULL;   InstanceQueryData(theEnv)->QueryCore->soln_size = rcnt;   InstanceQueryData(theEnv)->QueryCore->soln_cnt = 0;   TestEntireChain(theEnv,qclasses,0);   InstanceQueryData(theEnv)->AbortQuery = FALSE;   result->value = (void *) EnvCreateMultifield(theEnv,InstanceQueryData(theEnv)->QueryCore->soln_cnt * rcnt);   while (InstanceQueryData(theEnv)->QueryCore->soln_set != NULL)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲日本乱码在线观看| 成人欧美一区二区三区| 成人精品视频一区二区三区| 亚洲精品国产一区二区精华液 | 欧美二区三区91| 国产高清成人在线| 日韩黄色一级片| 亚洲欧美日韩国产综合在线| 日韩欧美一区二区视频| 色综合av在线| 粉嫩嫩av羞羞动漫久久久| 日一区二区三区| 国产精品久99| 2023国产精品| 欧美色网站导航| 99视频精品在线| 国产做a爰片久久毛片| 亚洲一本大道在线| 亚洲天堂av一区| 国产偷国产偷精品高清尤物| 日韩精品综合一本久道在线视频| 91黄色在线观看| 成人美女在线观看| 国内外成人在线| 美国十次综合导航| 日韩精品91亚洲二区在线观看| 免费在线一区观看| 一区二区三区中文在线| 中文字幕永久在线不卡| 久久精品一区四区| 久久精品亚洲乱码伦伦中文| 欧美精品一区二区三区很污很色的 | 欧美自拍丝袜亚洲| 色香色香欲天天天影视综合网| 国产91清纯白嫩初高中在线观看| 免费看精品久久片| 天天av天天翘天天综合网色鬼国产 | 日韩视频免费观看高清完整版| 在线观看免费一区| 在线看日本不卡| 91精品福利视频| 欧美亚洲国产一区二区三区 | 在线观看区一区二| 欧美性色欧美a在线播放| 91视频免费观看| 91免费版pro下载短视频| 99久久久国产精品免费蜜臀| 成人免费不卡视频| 97se亚洲国产综合自在线| 成人精品视频.| 99re视频这里只有精品| 99精品视频在线免费观看| 91日韩在线专区| 色爱区综合激月婷婷| 欧美亚洲自拍偷拍| 欧美日韩国产影片| 精品蜜桃在线看| 精品噜噜噜噜久久久久久久久试看 | 欧美二区三区91| 日韩精品一区二区三区在线播放| 欧美成人免费网站| 欧美经典一区二区三区| 日本va欧美va欧美va精品| 午夜久久久久久久久久一区二区| 蜜芽一区二区三区| 国产在线一区观看| 9人人澡人人爽人人精品| 91国产成人在线| 91精品欧美一区二区三区综合在| 日韩视频免费直播| 国产精品另类一区| 亚洲午夜激情网站| 久久电影国产免费久久电影| 国产乱码精品一品二品| a4yy欧美一区二区三区| 欧美区一区二区三区| 久久只精品国产| 亚洲色图在线播放| 日韩中文字幕一区二区三区| 国产一区二区三区在线观看精品| 成人三级伦理片| 欧美日韩在线三区| 国产亚洲一区二区三区四区 | 精品国产伦一区二区三区观看体验| 国产偷v国产偷v亚洲高清| 亚洲综合免费观看高清完整版在线 | 欧美一区二区三区精品| 久久久国产精华| 亚洲国产日日夜夜| 国产一区二区三区免费看| 91在线视频观看| 日韩视频在线你懂得| 国产精品久久久久久久久快鸭| 亚洲国产成人高清精品| 国产成人精品影视| 欧美偷拍一区二区| 国产清纯美女被跳蛋高潮一区二区久久w | 老色鬼精品视频在线观看播放| 9久草视频在线视频精品| 日韩女优av电影在线观看| 一区二区三区精品在线| 国产精品18久久久| 91精品国产综合久久精品| 成人欧美一区二区三区小说| 9l国产精品久久久久麻豆| 日韩精品一区二区三区老鸭窝| 国产精品福利一区二区三区| 麻豆高清免费国产一区| 日本韩国精品一区二区在线观看| 久久人人爽人人爽| 日韩在线卡一卡二| 在线亚洲高清视频| 中文字幕在线一区二区三区| 久久成人麻豆午夜电影| 在线中文字幕一区二区| 国产精品午夜在线观看| 精品一区二区三区久久| 欧美日韩成人综合在线一区二区| 亚洲免费观看高清在线观看| 国模大尺度一区二区三区| 7777精品久久久大香线蕉| 一区二区三区在线免费| av网站一区二区三区| 国产午夜三级一区二区三| 久久99精品网久久| 日韩亚洲欧美高清| 午夜不卡av免费| 欧美三级视频在线观看| 一区二区三区四区激情| 一道本成人在线| 国产精品麻豆久久久| 成人a级免费电影| 国产视频一区二区在线观看| 国产大片一区二区| 久久综合成人精品亚洲另类欧美| 麻豆一区二区99久久久久| 日韩欧美一区二区视频| 六月丁香综合在线视频| 欧美大片在线观看一区二区| 蜜臀av性久久久久蜜臀aⅴ| 91精品国产综合久久国产大片| 日本在线不卡一区| 日韩欧美卡一卡二| 精彩视频一区二区| 久久久久久黄色| 成人精品国产一区二区4080| 国产精品美女久久久久av爽李琼| 99久久精品免费看国产| 亚洲天堂成人网| 欧美色图12p| 人人精品人人爱| 精品国产自在久精品国产| 国产一区二区不卡| 国产三级精品在线| 成人高清免费观看| 亚洲天堂成人网| 欧美理论在线播放| 美女视频黄频大全不卡视频在线播放 | 91麻豆国产在线观看| 亚洲蜜臀av乱码久久精品| 欧美亚洲高清一区二区三区不卡| 午夜视频在线观看一区二区| 制服丝袜中文字幕一区| 国产一区二区日韩精品| 国产午夜精品久久久久久免费视| 91在线视频18| 午夜精品视频一区| www欧美成人18+| 99视频精品全部免费在线| 亚洲18影院在线观看| 精品免费99久久| av亚洲产国偷v产偷v自拍| 五月天婷婷综合| 久久午夜色播影院免费高清| av日韩在线网站| 日日夜夜精品视频免费| 国产三级欧美三级日产三级99| 色视频欧美一区二区三区| 日本特黄久久久高潮| 国产精品天天看| 欧美一区二区三区在线观看| 高清国产一区二区| 日韩va欧美va亚洲va久久| 国产日韩精品一区二区三区 | 国产精品一二三四五| √…a在线天堂一区| 91精品国产欧美日韩| 国产凹凸在线观看一区二区| 亚洲成人一二三| 久久久高清一区二区三区| 欧美日韩一级二级三级| 国产不卡视频在线播放| 日本怡春院一区二区| 亚洲人吸女人奶水| 精品国产乱码久久久久久久 | 午夜精品福利一区二区蜜股av| 久久亚洲捆绑美女| 欧美日韩激情一区| www.日本不卡| 韩国av一区二区|