亚洲欧美第一页_禁久久精品乱码_粉嫩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蝌蚪porny| 久久免费偷拍视频| 国产一区不卡精品| 丰满放荡岳乱妇91ww| 色综合天天综合网天天狠天天 | 亚洲一区二区三区三| 久久久午夜电影| 成人久久18免费网站麻豆| 国产欧美久久久精品影院| 国产精品综合在线视频| 久久久精品影视| 天堂成人免费av电影一区| 青娱乐精品视频在线| 91精品国产综合久久婷婷香蕉| 午夜一区二区三区在线观看| 欧美日韩国产欧美日美国产精品| 日本中文字幕一区二区视频| 久久影音资源网| 色噜噜狠狠一区二区三区果冻| 亚洲成a人片在线观看中文| 久久亚洲一级片| 色婷婷亚洲婷婷| 激情小说亚洲一区| 亚洲精品美腿丝袜| 精品理论电影在线观看 | 91麻豆精品久久久久蜜臀| 欧美男生操女生| 七七婷婷婷婷精品国产| 678五月天丁香亚洲综合网| 成人涩涩免费视频| 日本少妇一区二区| 亚洲人成伊人成综合网小说| 国产成人免费在线视频| 2024国产精品视频| 日韩av一级片| 欧美日韩精品欧美日韩精品一| 亚洲精选视频免费看| 亚洲精品少妇30p| 在线成人av网站| 久久成人av少妇免费| 免费av网站大全久久| 日韩国产成人精品| 九九精品一区二区| 亚洲高清一区二区三区| 国产精品伦理在线| 久久精品这里都是精品| 蜜臀精品一区二区三区在线观看 | 国产91色综合久久免费分享| 一区二区三区四区av| 欧美视频一区二区三区| 国产综合久久久久久鬼色| 亚洲精品视频一区二区| 国产精品你懂的在线欣赏| 91麻豆精品91久久久久久清纯| 美女www一区二区| 亚洲精品成a人| 国产欧美一区二区三区在线老狼| 欧美在线观看视频在线| 91亚洲男人天堂| 粉嫩绯色av一区二区在线观看| 日韩视频永久免费| 91蝌蚪国产九色| 激情综合五月天| 久久av资源网| 日本一不卡视频| 国产福利视频一区二区三区| 亚洲色大成网站www久久九九| 国产日韩精品一区| 精品成人a区在线观看| 色综合天天综合网天天看片| 国产激情精品久久久第一区二区| 国产成人三级在线观看| 久久久久久久免费视频了| 蓝色福利精品导航| 久久99九九99精品| 麻豆国产精品视频| 久久精品国产99国产精品| 韩国视频一区二区| 国产一区 二区 三区一级| 国产精品一卡二卡| 国产成+人+日韩+欧美+亚洲| 成人性生交大合| 99久久婷婷国产综合精品| 欧美日韩一级二级三级| 欧美色综合天天久久综合精品| 欧美男男青年gay1069videost| 日韩一级大片在线| 日韩免费性生活视频播放| 久久亚洲二区三区| 欧美国产视频在线| 91猫先生在线| 色偷偷成人一区二区三区91| 国产欧美日韩视频一区二区| 日韩一级欧美一级| 成人免费av网站| 一本色道久久综合亚洲91| 国产成人综合自拍| 欧日韩精品视频| 亚洲成人av福利| 日本精品免费观看高清观看| 色噜噜偷拍精品综合在线| 欧美日韩一区二区三区免费看| 久久久综合九色合综国产精品| 婷婷丁香久久五月婷婷| 日本 国产 欧美色综合| 成人性生交大合| 不卡高清视频专区| 日韩一区二区在线观看视频播放| 91福利在线看| 精品国产乱码久久| 久久久久88色偷偷免费| 成人免费视频在线观看| 亚洲在线免费播放| 成人精品高清在线| 欧美视频一区二区三区四区| 日本一区二区综合亚洲| 国产精品蜜臀av| 国产成人精品在线看| 久久夜色精品国产欧美乱极品| 99久久国产综合精品色伊| 欧美mv日韩mv国产网站app| 蜜臀av一区二区| 欧美日韩免费观看一区二区三区| 午夜精品123| 成人av免费在线观看| 久久网这里都是精品| 亚洲成av人片| 欧美日韩在线精品一区二区三区激情 | 久久狠狠亚洲综合| 欧美视频在线不卡| 日韩专区在线视频| 91精品国产综合久久福利软件 | 国产精品国产三级国产普通话三级 | 麻豆精品一二三| 欧美一区二区日韩| 国产一区二区三区在线看麻豆| 国产日韩欧美综合在线| 亚洲女女做受ⅹxx高潮| 国产传媒欧美日韩成人| 日韩视频在线你懂得| 懂色av一区二区在线播放| 国产精品三级av| 一本大道综合伊人精品热热 | 91免费观看视频| 国产人成亚洲第一网站在线播放| 北条麻妃国产九九精品视频| 图片区小说区国产精品视频| 久久综合九色综合欧美亚洲| 欧美在线啊v一区| 日韩国产精品久久久| 欧美年轻男男videosbes| 免费成人你懂的| 久久久精品2019中文字幕之3| 99视频有精品| 国产精品久久精品日日| 日韩一区二区精品葵司在线| 色综合色综合色综合色综合色综合 | 日本不卡中文字幕| 精品免费日韩av| 樱桃国产成人精品视频| 色国产精品一区在线观看| 亚洲国产精品成人久久综合一区| caoporn国产精品| 亚洲小说欧美激情另类| 欧美日韩国产在线观看| 日韩国产高清影视| 久久伊人蜜桃av一区二区| 欧美在线观看一区二区| 国产精品午夜免费| 国产美女av一区二区三区| 欧美xingq一区二区| 国产精品久久久久久久久快鸭 | 天堂精品中文字幕在线| 日韩视频免费观看高清完整版在线观看 | 精品一区二区三区影院在线午夜| 一区二区三区精品在线观看| 成人午夜碰碰视频| 夜色激情一区二区| 欧美一区二区视频观看视频| 日韩国产一区二| 中文字幕乱码久久午夜不卡| 精品国产乱码久久久久久蜜臀| 在线免费观看日本欧美| 欧美又粗又大又爽| 国产盗摄女厕一区二区三区| 精品欧美乱码久久久久久| 亚洲女人的天堂| 国产精品国产a| 欧美一三区三区四区免费在线看| 国产成人av福利| 麻豆精品久久久| 亚洲欧美乱综合| 日韩一区二区免费高清| 精品日韩一区二区三区| 中文一区二区在线观看| 久久久国产一区二区三区四区小说| 国产99久久久国产精品潘金| 欧美午夜电影网| 国产精品青草综合久久久久99| 成人av免费在线|