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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? instantiatei.c

?? intel ipp4.1性能庫的一些例子。
?? C
?? 第 1 頁 / 共 3 頁
字號:
/********************************************************************* * File: instantiateI.c * Description: code for instantiating operators, first part. *              - transforms PlNodes to CodeNodes *              - performs syntax check *              - builds gobal tuple tables *              - encodes unary inertia as types * * Author: Joerg Hoffmann 1999 * *********************************************************************/ /********************************************************************* * (C) Copyright 1998 Albert Ludwigs University Freiburg *     Institute of Computer Science * * All rights reserved. Use of this software is permitted for  * non-commercial research purposes, and it may be copied only  * for that use.  All copies must include this copyright message. * This software is made available AS IS, and neither the authors * nor the  Albert Ludwigs University Freiburg make any warranty * about the software or its performance.  *********************************************************************//********************************************************************* * * one thing that I'd like to say about the instantiation code is this: * *      it might look terrible to have four big files of C code just *      to instantiate the operators, and in fact, it is. * *      on the other hand, this is only the result of the terrible *      things that the domain designer is allowed to define in  *      full scale PDDL. * *      though the code produces a very tight domain representation *      in all cases, see Technical Report 122  *      "Handling of Inertia in a Planning System" on the IPP homepage, *      there are quite some cases where it could be made far more *      efficient. At the very least, if one is facing a simple STRIPS *      domain, it's better to skip the whole thing and use a specialised *      algorithm which will be faster than this code by factors in the order *      of hundreds... * **********************************************************************/#include "ipp.h"#include "output.h"#include "utilities.h"#include "memory.h"#include "instantiateI.h"  /* *  ----------------------------- SET UP GLOBAL STRING ARRAYS ---------------------------- */void collect_all_strings( void ){  FactList *f;  TokenList *t;  int p_num, type_num, c_num, i, j, ar;  Integers *tmp, *g;  for ( f = gorig_constant_list; f; f = f->next ) {    if ( (type_num = position_in_types_table( f->item->next->item )) == -1 ) {      if ( gtypes_table_size == MAX_TYPES_TABLE ) {	printf("\ntoo many types! increase MAX_TYPES_TABLE (currently %d)\n\n",	       MAX_TYPES_TABLE);	exit( 1 );      }      gtypes_table[gtypes_table_size].name = copy_string( f->item->next->item );      gtypes_table[gtypes_table_size].integers = NULL;      type_num = gtypes_table_size++;    }    if ( (c_num = position_in_constants_table( f->item->item )) == -1 ) {      if ( gconstants_table_size == MAX_CONSTANTS_TABLE ) {	printf("\ntoo many constants! increase MAX_CONSTANTS_TABLE (currently %d)\n\n",	       MAX_CONSTANTS_TABLE);	exit( 1 );      }      gconstants_table[gconstants_table_size] = copy_string( f->item->item );      c_num = gconstants_table_size++;    }        tmp = new_integers( c_num );    for ( g = gtypes_table[type_num].integers; g; g = g->next ) {      if ( g->index == c_num ) break;    }    if ( !g ) {      tmp->next = gtypes_table[type_num].integers;      gtypes_table[type_num].integers = tmp;    }  }  for ( f = gpredicates_and_types; f; f = f->next ) {    if ( (p_num = position_in_predicates_table( f->item->item )) != -1 ) {      printf("\npredicate %s declared twice!\n\n", f->item->item);      exit(BADDOMAIN_ERROR_CODE);    }    if ( gpredicates_table_size == MAX_PREDICATES_TABLE ) {      printf("\ntoo many predicates! increase MAX_PREDICATES_TABLE (currently %d)\n\n",	     MAX_PREDICATES_TABLE);      exit( 1 );    }    gpredicates_table[gpredicates_table_size] = copy_string( f->item->item );    ar = 0;    for ( t = f->item->next; t; t = t->next ) {      if ( (type_num = position_in_types_table( t->item )) == -1 ) {	printf("\nwarning: predicate %s uses unknown or empty type %s\n\n", 	       f->item->item, t->item);      }      gpredicates_args_type[gpredicates_table_size][ar++] = type_num;    }    garity[gpredicates_table_size++] = ar;  }  free_complete_fact_list( gorig_constant_list );  free_complete_fact_list( gpredicates_and_types );  if ( gcmd_line.display_info == 2 ||       gcmd_line.display_info == 3 ) {    printf("\nconstant table:");    for ( i = 0; i < gconstants_table_size; i++ ) {      printf("\n%d --> %s", i, gconstants_table[i]);    }    printf("\n\ntypes table:");    for ( i = 0; i < gtypes_table_size; i++ ) {      printf("\n%d --> %s: ", i, gtypes_table[i].name);      for ( tmp=gtypes_table[i].integers; tmp; tmp=tmp->next ) {	printf("%d ", tmp->index);      }    }    printf("\n\npredicates table:");    for ( i = 0; i < gpredicates_table_size; i++ ) {      printf("\n%d --> %s: ", i, gpredicates_table[i]);      for ( j = 0; j < garity[i]; j++ ) {	printf("%s ", gtypes_table[gpredicates_args_type[i][j]].name);      }    }    printf("\n\n");  }}int position_in_types_table( char *str ){  int i;  for ( i=0; i<gtypes_table_size; i++ ) {    if ( str == gtypes_table[i].name || 	 (strcmp( str, gtypes_table[i].name ) == SAME) ) {      break;    }  }  return ( i == gtypes_table_size ) ? -1 : i;}int position_in_constants_table( char *str ){  int i;  for ( i=0; i<gconstants_table_size; i++ ) {    if ( str == gconstants_table[i] || 	 strcmp( str, gconstants_table[i] ) == SAME ) {      break;    }  }  return ( i == gconstants_table_size ) ? -1 : i;}int position_in_predicates_table( char *str ){  int i;  for ( i=0; i<gpredicates_table_size; i++ ) {    if ( str == gpredicates_table[i] || 	 strcmp( str, gpredicates_table[i] ) == SAME ) {      break;    }  }  return ( i == gpredicates_table_size ) ? -1 : i;}  /* *  ----------------------- TRANSLATE TO CODE NODES + SYNTAX CHECK ------------------------ */char *lvar_str[MAX_VARS];int lvar_types[MAX_VARS];void transform_PlNodes_to_CodeNodes( void ){  PlOperator *op;  CodeOperator *tmp, *j;  if ( !normalize_initial( &gorig_initial_facts ) ) {    printf("\nillegal initial state!\n\n");    exit(BADDOMAIN_ERROR_CODE);  }  if ( !is_legal_condition( gorig_goal_facts ) ) {    printf("\nillegal goal state!\n\n");    exit(BADDOMAIN_ERROR_CODE);  }  for ( op = gloaded_ops; op; op = op->next ) {    if ( !is_legal_condition( op->preconds ) ) {      printf("\nop %s has illegal precondition\n\n", op->name->item);      exit(BADDOMAIN_ERROR_CODE);    }    if ( !normalize_effects( &op->effects ) ) {      printf("\nop %s has illegal effects\n\n", op->name->item);      exit(BADDOMAIN_ERROR_CODE);    }  }  gcode_initial_state = transform_Pl_to_Code( gorig_initial_facts, 0 );  gcode_goal_state = transform_Pl_to_Code( gorig_goal_facts, 0 );  for ( op = gloaded_ops; op; op = op->next ) {    tmp = transform_PlOp_to_CodeOp( op );    if ( tmp != NULL ) {      tmp->next = gcode_operators;      gcode_operators = tmp;    }  }  if ( gcmd_line.display_info == 3 ) {    printf("\ntranslation to CodeNodes complete.");    printf("\ncoded initial state is:\n");    print_CodeNode( gcode_initial_state, 0 );    printf("\ncoded goal state is:\n");    print_CodeNode( gcode_goal_state, 0 );    printf("\ncoded operators are:\n");    for ( j = gcode_operators; j; j = j->next ) {      print_CodeOperator( j );    }  }}  Bool normalize_initial( PlNode **n ){  PlNode *i, *tmp;  TokenList *t;  if ( !(*n) ) {    return TRUE;  }  if ( (*n)->connective != AND ) {    tmp = copy_pl_node( *n );    tmp->sons = (*n)->sons;    tmp->next = (*n)->next;    (*n)->connective = AND;    (*n)->sons = tmp;    (*n)->next = NULL;    return normalize_initial( n );  }  for ( i = (*n)->sons; i; i=i->next ) {    if ( i->connective != ATOM ) {      printf("\nnon ATOM in initial state");      return FALSE;    }    if ( i->sons != NULL ) {      printf("\ninitial atom has sons");      return FALSE;    }    if ( (strcmp( i->atom->item, "EQ" ) == SAME) ||	 (strcmp( i->atom->item, "eq" ) == SAME) ) {      printf("\neq predicate in initial state");      return FALSE;    }    for ( t = i->atom->next; t; t = t->next ) {      if ( t->item[0] == '?' ) {	printf("\nvariable in initial state");	return FALSE;      }    }  }  return TRUE;}Bool is_legal_condition( PlNode *n ){  PlNode *i;  if ( !n ) {    return TRUE;  }  switch ( n->connective ) {  case ATOM:    if ( n->sons != NULL ) {      printf("\nATOM has son");      return FALSE;    }    return TRUE;  case ALL:  case EX:  case NOT:    if ( !(n->sons) ) {      printf("\n%s without sons",	     gconnectives[n->connective]);    }    if ( !is_legal_condition( n->sons ) ) {      return FALSE;    }    return TRUE;  case AND:  case OR:    if ( !(n->sons) ) {      printf("\n%s without sons",	     gconnectives[n->connective]);      return FALSE;    }    for ( i=n->sons; i; i = i->next ) {      if ( !is_legal_condition( i ) ) {	return FALSE;      }    }    return TRUE;  case TRU:  case FAL:    if ( n->sons ) {      printf("\n%s with sons", 	     gconnectives[n->connective]);      return FALSE;    }    return TRUE;  default:    printf("\nillegal connective in condition: %s", 	   gconnectives[n->connective]);    return FALSE;  }  return TRUE;}Bool normalize_effects( PlNode **n ){  PlNode *i, *j, *tmp;  if ( !(*n) ) {    return TRUE;  }  if ( (*n)->connective != AND ) {    tmp = copy_pl_node( *n );    tmp->sons = (*n)->sons;    tmp->next = (*n)->next;    (*n)->connective = AND;    (*n)->sons = tmp;    (*n)->next = NULL;    return normalize_effects( n );  }  for ( i = (*n)->sons; i; i = i->next ) {    for ( j = i; j; j = j->sons ) {      if ( j->connective == WHEN ) {	break;      }      if ( j->connective != ALL ) {	printf("\nnon ALL before WHEN");	return FALSE;      }    }    if ( !j ) {      printf("\neffect without WHEN");      return FALSE;    }    if ( !j->sons ) {      printf("\neffect has neither condition nor postconds");      return FALSE;    }    if ( !j->sons->next ) {      printf("\neffect has empty postconds");      return FALSE;    }    if ( !is_legal_condition( j->sons ) ) {      printf("\neffect condition illegal");      return FALSE;    }    if ( !normalize_effect( &(j->sons->next) ) ) {      printf("\neffect illegal");      return FALSE;    }  }  return TRUE;}Bool normalize_effect( PlNode **n ){  PlNode *i, *tmp;  if ( !(*n) ) {    return FALSE;  }  if ( (*n)->connective != AND ) {    tmp = copy_pl_node( *n );    tmp->sons = (*n)->sons;    tmp->next = (*n)->next;    (*n)->connective = AND;    (*n)->sons = tmp;    (*n)->next = NULL;    return normalize_effect( n );  }  for ( i = (*n)->sons; i; i = i->next ) {    if ( i->connective != ATOM ) {      if ( i->connective != NOT ) {	printf("\nnon literal in effect");	return FALSE;      }      if ( !i->sons ) {	printf("NOT without son");	return FALSE;      }      if ( i->sons->connective != ATOM ) {	printf("\nnon literal in effect");	return FALSE;      }      if ( i->sons->sons ||	   i->sons->next ) {	printf("\nnegated atom with sons/next");	return FALSE;      }      if ( (strcmp( i->sons->atom->item, "EQ" ) == SAME) ||	   (strcmp( i->sons->atom->item, "eq" ) == SAME) ) {	printf("\neq predicate in effect");	return FALSE;      }    } else {      if ( (strcmp( i->atom->item, "EQ" ) == SAME) ||	   (strcmp( i->atom->item, "eq" ) == SAME) ) {	printf("\neq predicate in effect");	return FALSE;      }      if ( i->sons ) {	printf("\natom with sons");	return FALSE;      }    }  }     return TRUE;}   

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一卡二卡三卡四卡无卡| 日韩一级成人av| 综合欧美亚洲日本| 91色婷婷久久久久合中文| 1024成人网| 欧美日韩亚洲另类| 九九九精品视频| 久久网站热最新地址| 成人免费观看av| 伊人色综合久久天天人手人婷| 在线观看三级视频欧美| 午夜精品久久久| 日韩欧美一区二区视频| 粉嫩在线一区二区三区视频| 亚洲欧美偷拍三级| 日韩一区国产二区欧美三区| 国产另类ts人妖一区二区| 国产精品激情偷乱一区二区∴| 色琪琪一区二区三区亚洲区| 全国精品久久少妇| 中文字幕一区二区三区在线不卡| 色av综合在线| 久久国产成人午夜av影院| 国产精品免费丝袜| 欧美男男青年gay1069videost| 黑人巨大精品欧美一区| 亚洲欧洲精品一区二区精品久久久| 欧美日韩精品一区视频| 精品亚洲aⅴ乱码一区二区三区| 国产精品久久二区二区| 日韩亚洲欧美一区| 91一区一区三区| 精品一区二区三区在线观看国产| 亚洲免费在线电影| 精品理论电影在线| 一本大道久久a久久综合婷婷| 麻豆精品精品国产自在97香蕉| 日本一区二区视频在线观看| 在线成人免费视频| 91免费精品国自产拍在线不卡| 免费观看日韩电影| 一区二区三区蜜桃网| 久久久精品天堂| 日韩午夜精品电影| 在线一区二区三区四区五区| 国产成人午夜精品5599| 蜜桃视频在线一区| 亚洲图片有声小说| ...中文天堂在线一区| 久久亚洲一区二区三区四区| 欧美人牲a欧美精品| 一本大道久久a久久精品综合| 国产风韵犹存在线视精品| 免费成人在线影院| 亚洲成人动漫一区| 亚洲一区视频在线| 亚洲欧美一区二区视频| 久久久久久久综合| 欧美电影免费观看高清完整版在线 | 91视频国产观看| 国产馆精品极品| 国产一区二区三区免费播放| 蜜桃av一区二区| 日韩电影免费在线看| 亚洲午夜av在线| 亚洲综合久久久久| 亚洲已满18点击进入久久| 中文字幕一区二区三区在线不卡| 国产欧美日韩不卡| 国产三级欧美三级日产三级99| 欧美本精品男人aⅴ天堂| 日韩欧美色电影| 日韩欧美亚洲国产精品字幕久久久| 欧美精品1区2区| 欧美麻豆精品久久久久久| 欧美日韩色一区| 欧美乱妇23p| 日韩视频一区二区三区在线播放 | 久久精品欧美一区二区三区不卡 | 欧美一区二区三区啪啪| 制服丝袜激情欧洲亚洲| 91超碰这里只有精品国产| 7799精品视频| 欧美电影免费观看高清完整版 | 色香蕉久久蜜桃| 欧美午夜不卡视频| 欧美日韩国产天堂| 日韩欧美在线观看一区二区三区| 精品少妇一区二区三区| 国产日产亚洲精品系列| 最好看的中文字幕久久| 亚洲国产乱码最新视频| 麻豆精品视频在线| 成人激情开心网| 日本黄色一区二区| 欧美女孩性生活视频| 精品伦理精品一区| 亚洲欧洲99久久| 偷拍与自拍一区| 精品伊人久久久久7777人| 成人一区二区视频| 欧美亚洲动漫精品| www国产亚洲精品久久麻豆| 国产精品美女久久久久久| 一区二区理论电影在线观看| 日本伊人精品一区二区三区观看方式| 激情六月婷婷综合| 91丝袜国产在线播放| 日韩一卡二卡三卡四卡| 国产欧美综合在线观看第十页| 亚洲精品免费在线观看| 午夜精品一区在线观看| 黄页视频在线91| 色婷婷综合久久| 精品日产卡一卡二卡麻豆| 亚洲人123区| 久久精品国产免费| 色综合色狠狠综合色| 精品日韩一区二区| 亚洲精品第一国产综合野| 久久精品国产亚洲a| 色婷婷亚洲综合| 久久久99久久| 日本中文字幕一区二区视频| www.成人在线| 欧美成人a∨高清免费观看| 国产精品福利av| 免费人成精品欧美精品 | 亚洲va天堂va国产va久| 国产精品一线二线三线| 欧美日韩在线播放| 国产精品国产三级国产| 精品中文字幕一区二区| 欧美色中文字幕| 国产精品欧美久久久久无广告| 日韩1区2区3区| 在线观看成人小视频| 国产农村妇女精品| 韩日欧美一区二区三区| 欧美乱妇23p| 一二三区精品福利视频| 成人av电影在线网| 精品久久久久久无| 人禽交欧美网站| 欧美人与禽zozo性伦| 一区二区三区美女视频| 91在线免费看| 国产三级精品三级| 韩国精品免费视频| 日韩一区二区影院| 午夜影院久久久| 欧洲另类一二三四区| 亚洲天堂av一区| 成人av电影在线观看| 国产精品丝袜一区| 国产成人自拍高清视频在线免费播放| 欧美一区二区三区公司| 亚洲第一综合色| 欧美日韩在线播放| 亚洲成人av福利| 欧美午夜影院一区| 亚洲综合色丁香婷婷六月图片| 色综合久久中文字幕综合网| 国产精品视频yy9299一区| 国产酒店精品激情| 国产情人综合久久777777| 粉嫩高潮美女一区二区三区 | 亚洲欧美日韩国产手机在线 | 欧美激情在线观看视频免费| 久久99蜜桃精品| 精品福利一区二区三区| 久久激五月天综合精品| 日韩一二在线观看| 另类人妖一区二区av| 精品日韩在线观看| 国产一区二区三区在线观看精品 | 麻豆久久一区二区| 久久综合视频网| 丁香网亚洲国际| 亚洲人吸女人奶水| 欧美亚洲一区三区| 天堂成人国产精品一区| 欧美成人乱码一区二区三区| 国产精品综合一区二区三区| 中文字幕av一区二区三区免费看 | 26uuu亚洲| jiyouzz国产精品久久| 夜夜嗨av一区二区三区网页| 3d动漫精品啪啪一区二区竹菊 | 制服丝袜在线91| 精品一区二区三区av| 欧美国产乱子伦| 欧洲精品在线观看| 久久99久久99精品免视看婷婷 | 精品视频免费看| 极品少妇xxxx精品少妇| 国产精品欧美精品| 7777精品伊人久久久大香线蕉的 | 日韩一卡二卡三卡四卡| 国产福利不卡视频|