home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / SmallEiffel 0.3.3 / SmallEiffel 68k / lib_msg / bad_generic21.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-13  |  44.9 KB  |  1,894 lines  |  [TEXT/KAHL]

  1. /* ANSI C code generated by SmallEiffel. */
  2. /*
  3. -- SmallEiffel  -- Release (- 0.94 Beta)    --      FRANCE
  4. -- Copyright (C), 1994 - Dominique COLNET and Suzanne COLLIN 
  5. -- University Henri Poincare' - Nancy 1 - email colnet@loria.fr 
  6. -- CRIN (Centre de Recherche en Informatique de Nancy)
  7. -- FRANCE 
  8. */
  9. #include "bad_generic2.h"
  10. T0 *se_new(int id){
  11. int sz=s[id];
  12. T0 *n=malloc(sz);
  13. memset(n,0,sz);
  14. n->id=id;
  15. return n;
  16. }
  17. char tag_pos_1[]="assignment";
  18. char tag_pos_2[]="boolean exp.";
  19. char tag_pos_3[]="instruction";
  20. char tag_pos_4[]="assertion";
  21. char tag_pos_5[]="creation call";
  22. char tag_pos_6[]="variant exp.";
  23. char Current[]="Current";
  24. char Result[]="Result";
  25. void **rs_bot;
  26. void **rs;
  27. void **rs_lb;
  28. void **rs_top;
  29. void rs_need(int size){
  30. if (rs+size < rs_top) return;
  31. printf("Stack must grow.\n");
  32. if ((rs_top-rs_bot)>262144) {
  33. error0("Stack Overflow.");}
  34. {int new_size=(rs_top-rs_bot+1)*2;
  35. void **new_rs_bot=(void **)realloc(rs_bot,new_size*sizeof(void **));
  36. printf("New size for stack is %d\n",new_size);
  37. if (new_rs_bot==rs_bot) {
  38. rs_top=rs_bot+new_size-1;
  39. return;}
  40. if (new_rs_bot==NULL) error0("Stack Overflow.");
  41. rs_top=new_rs_bot+new_size-1;
  42. rs=new_rs_bot+(rs-rs_bot);
  43. rs_lb=new_rs_bot+(rs_lb-rs_bot);
  44. rs_bot=new_rs_bot;}
  45. }
  46. void rs_link(char *tag){
  47. rs_need(4);
  48. *rs++=(void *)linkId;
  49. *rs=(void *)(rs-rs_lb);
  50. rs_lb=rs++;
  51. *rs++=(void *)featureTagId;
  52. *rs++=(void *)tag;
  53. }
  54. void rs_unlink(void){
  55. rs=rs_lb-1;
  56. rs_lb=rs_lb-(int)(*rs_lb);
  57. }
  58. void rs_pPOS(char* tp,int l,int c,int f){
  59. rs_need(8);
  60. *rs++=(void *)lineId;
  61. *rs++=(void *)l;
  62. *rs++=(void *)columnId;
  63. *rs++=(void *)c;
  64. *rs++=(void *)pathId;
  65. *rs++=(void *)f;
  66. *rs++=(void *)doingWhatId;
  67. *rs++=(void *)tp;
  68. }
  69. int rs_pop_int(int e){
  70. rs-=8;
  71. return e;
  72. }
  73. void rs_pINT(int *i,char *n){
  74. rs_need(4);
  75. *rs++=(void *)nameId;
  76. *rs++=(void *)n;
  77. *rs++=(void *)integerId;
  78. *rs++=(void *)i;
  79. }
  80. void rs_pCHA(char *c,char *n){
  81. rs_need(4);
  82. *rs++=(void *)nameId;
  83. *rs++=(void *)n;
  84. *rs++=(void *)characterId;
  85. *rs++=(void *)c;
  86. }
  87. void rs_pBOO(int *b,char *n){
  88. rs_need(4);
  89. *rs++=(void *)nameId;
  90. *rs++=(void *)n;
  91. *rs++=(void *)booleanId;
  92. *rs++=(void *)b;
  93. }
  94. void rs_pREA(float *r,char *n){
  95. rs_need(4);
  96. *rs++=(void *)nameId;
  97. *rs++=(void *)n;
  98. *rs++=(void *)realId;
  99. *rs++=(void *)r;
  100. }
  101. void rs_pDOU(double *d,char *n){
  102. rs_need(4);
  103. *rs++=(void *)nameId;
  104. *rs++=(void *)n;
  105. *rs++=(void *)doubleId;
  106. *rs++=(void *)d;
  107. }
  108. void rs_pPOI(void*p,char *n){
  109. rs_need(4);
  110. *rs++=(void *)nameId;
  111. *rs++=(void *)n;
  112. *rs++=(void *)pointerId;
  113. *rs++=(void *)p;
  114. }
  115. void rs_pREF(void **r,char *n){
  116. rs_need(4);
  117. *rs++=(void *)nameId;
  118. *rs++=(void *)n;
  119. *rs++=(void *)referenceId;
  120. *rs++=(void *)r;
  121. }
  122. void rs_pEXP(void *e,char *n){
  123. rs_need(4);
  124. *rs++=(void *)nameId;
  125. *rs++=(void *)n;
  126. *rs++=(void *)expandedId;
  127. *rs++=(void *)e;
  128. }
  129. int req_last_chance;
  130. int req_last_result;
  131. int af_req=0;
  132. void ac_req(int v){
  133. if (!v && req_last_chance)
  134. error0("Require Assertion Violated.");
  135. req_last_result=req_last_result&&v;
  136. rs-=8;
  137. }
  138. int af_ens=0;
  139. void ac_ens(int v){
  140. if (!v) error0("Ensure Assertion Violated.");
  141. rs-=8;
  142. }
  143. int af_inv=0;
  144. void ac_inv(int v){
  145. if (!v) error0("Class Invariant Violation.");
  146. rs-=8;
  147. }
  148. int af_liv=0;
  149. void ac_liv(int v){
  150. if (!v) error0("Loop Invariant Violation.");
  151. rs-=8;
  152. }
  153. int lvc(int lc,int lv1,int lv2){
  154. if (lc==0){if (lv2 < 0){
  155. rsp();
  156. printf("Bad First Variant Value = %d\n",lv2);}
  157. else {rs-=8;return lv2;}}
  158. else if ((lv2 < 0)||(lv2 >= lv1)){
  159. rsp();
  160. printf("Loop Body Count = %d (done)\nNew Variant = %d\nPrevious Variant = %d\n",lc,lv2,lv1);}
  161. else {rs-=8;return lv2;}
  162. printf("*** Error at Run Time *** : Bad Loop Variant.\n");
  163. exit(1);
  164. }
  165. int af_civ=0;
  166. void ac_civ(int v){
  167. if (!v) error0("Check Assertion Violated.");
  168. rs-=8;
  169. }
  170. char trT35out_in_tagged_out_memory[]="out_in_tagged_out_memory of GENERAL";
  171. void rT35out_in_tagged_out_memory(T35 *C){
  172. rs_link(trT35out_in_tagged_out_memory);
  173. rs_pREF((void **)&C,Current);
  174. /*IF*//*AF*//*AE*/
  175. rs_pPOS(tag_pos_3,360,24,1);
  176. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,360,6,1))),((T0 *)(gt[(C)->id])));
  177. rs-=8;
  178. /*IF*/{/*AT*/rs_pPOS(tag_pos_3,362,27,1);
  179. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,362,9,1))),'\43');
  180. rs-=8;
  181. rs_pPOS(tag_pos_3,363,19,1);
  182. rT2append_in(rT35object_id(C),oRBC1tagged_out_memory);
  183. rs-=8;
  184. }
  185. /*FI*/rs_pPOS(tag_pos_3,365,24,1);
  186. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,365,6,1))),'\133');
  187. rs-=8;
  188. rs_pPOS(tag_pos_3,366,6,1);
  189. rT35fill_tagged_out_memory();
  190. rs-=8;
  191. rs_pPOS(tag_pos_3,367,24,1);
  192. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,367,6,1))),'\135');
  193. rs-=8;
  194. /*FI*/rs_unlink();
  195. }
  196. char trT35object_id[]="object_id of GENERAL";
  197. int rT35object_id(T35 *C){
  198. int R=0;
  199. rs_link(trT35object_id);
  200. rs_pREF((void **)&C,Current);
  201. rs_pINT(&R,Result);
  202. req_last_chance=1;
  203. if (!af_req){af_req=1;
  204. af_req=0;}
  205. rs_pPOS(tag_pos_3,38,3,1);
  206. R=((int)C);
  207. rs-=8;
  208. rs_unlink();
  209. return R;
  210. }
  211. char trT35fill_tagged_out_memory[]="fill_tagged_out_memory of GENERAL";
  212. void rT35fill_tagged_out_memory(/*C*/void){
  213. rs_link(trT35fill_tagged_out_memory);
  214. rs_unlink();
  215. }
  216. T0*oRBC1tagged_out_memory;
  217. char trT35print_on[]="print_on of GENERAL";
  218. void rT35print_on(T35 *C,T0* a1){
  219. rs_link(trT35print_on);
  220. rs_pREF((void **)&C,Current);
  221. rs_pREF((void **)&a1,"file");
  222. rs_pPOS(tag_pos_3,329,21,1);
  223. rT7clear(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,329,3,1))));
  224. rs-=8;
  225. rs_pPOS(tag_pos_3,330,3,1);
  226. rT35out_in_tagged_out_memory(C);
  227. rs-=8;
  228. rs_pPOS(tag_pos_3,331,8,1);
  229. XrT33put_string(331,3,1,a1,oRBC1tagged_out_memory);
  230. rs-=8;
  231. rs_unlink();
  232. }
  233. char trT35print[]="print of GENERAL";
  234. void rT35print(/*C*/T0* a1){
  235. rs_link(trT35print);
  236. rs_pREF((void **)&a1,"some");
  237. /*IF*/if (rs_pPOS(tag_pos_2,319,11,1),rs_pop_int(!(a1))) {
  238. rs_pPOS(tag_pos_3,320,17,1);
  239. rT32put_string(((T32 *)ci(32,oRBC1std_output,320,6,1)),(T0 *)ms5);
  240. rs-=8;
  241. }
  242. else {
  243. rs_pPOS(tag_pos_3,322,11,1);
  244. XrT1print_on(322,6,1,a1,oRBC1std_output);
  245. rs-=8;
  246. }
  247. /*FI*/rs_unlink();
  248. }
  249. T0*oRBC1std_output;
  250. char trT26out_in_tagged_out_memory[]="out_in_tagged_out_memory of GENERAL";
  251. void rT26out_in_tagged_out_memory(T26 *C){
  252. rs_link(trT26out_in_tagged_out_memory);
  253. rs_pREF((void **)&C,Current);
  254. /*IF*//*AF*//*AE*/
  255. rs_pPOS(tag_pos_3,360,24,1);
  256. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,360,6,1))),((T0 *)(gt[(C)->id])));
  257. rs-=8;
  258. /*IF*/{/*AT*/rs_pPOS(tag_pos_3,362,27,1);
  259. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,362,9,1))),'\43');
  260. rs-=8;
  261. rs_pPOS(tag_pos_3,363,19,1);
  262. rT2append_in(rT26object_id(C),oRBC1tagged_out_memory);
  263. rs-=8;
  264. }
  265. /*FI*/rs_pPOS(tag_pos_3,365,24,1);
  266. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,365,6,1))),'\133');
  267. rs-=8;
  268. rs_pPOS(tag_pos_3,366,6,1);
  269. rT26fill_tagged_out_memory();
  270. rs-=8;
  271. rs_pPOS(tag_pos_3,367,24,1);
  272. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,367,6,1))),'\135');
  273. rs-=8;
  274. /*FI*/rs_unlink();
  275. }
  276. char trT26object_id[]="object_id of GENERAL";
  277. int rT26object_id(T26 *C){
  278. int R=0;
  279. rs_link(trT26object_id);
  280. rs_pREF((void **)&C,Current);
  281. rs_pINT(&R,Result);
  282. req_last_chance=1;
  283. if (!af_req){af_req=1;
  284. af_req=0;}
  285. rs_pPOS(tag_pos_3,38,3,1);
  286. R=((int)C);
  287. rs-=8;
  288. rs_unlink();
  289. return R;
  290. }
  291. char trT26fill_tagged_out_memory[]="fill_tagged_out_memory of GENERAL";
  292. void rT26fill_tagged_out_memory(/*C*/void){
  293. rs_link(trT26fill_tagged_out_memory);
  294. rs_unlink();
  295. }
  296. char trT26print_on[]="print_on of GENERAL";
  297. void rT26print_on(T26 *C,T0* a1){
  298. rs_link(trT26print_on);
  299. rs_pREF((void **)&C,Current);
  300. rs_pREF((void **)&a1,"file");
  301. rs_pPOS(tag_pos_3,329,21,1);
  302. rT7clear(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,329,3,1))));
  303. rs-=8;
  304. rs_pPOS(tag_pos_3,330,3,1);
  305. rT26out_in_tagged_out_memory(C);
  306. rs-=8;
  307. rs_pPOS(tag_pos_3,331,8,1);
  308. XrT33put_string(331,3,1,a1,oRBC1tagged_out_memory);
  309. rs-=8;
  310. rs_unlink();
  311. }
  312. char trT26print[]="print of GENERAL";
  313. void rT26print(/*C*/T0* a1){
  314. rs_link(trT26print);
  315. rs_pREF((void **)&a1,"some");
  316. /*IF*/if (rs_pPOS(tag_pos_2,319,11,1),rs_pop_int(!(a1))) {
  317. rs_pPOS(tag_pos_3,320,17,1);
  318. rT32put_string(((T32 *)ci(32,oRBC1std_output,320,6,1)),(T0 *)ms5);
  319. rs-=8;
  320. }
  321. else {
  322. rs_pPOS(tag_pos_3,322,11,1);
  323. XrT1print_on(322,6,1,a1,oRBC1std_output);
  324. rs-=8;
  325. }
  326. /*FI*/rs_unlink();
  327. }
  328. char trT26make[]="make of BAD_GENERIC2";
  329. void rT26make(/*C*/void){
  330. T0* _dctn=NULL;
  331. rs_link(trT26make);
  332. rs_pREF((void **)&_dctn,"dctn");
  333. rs_pPOS(tag_pos_5,14,3,26);
  334. {T31 *n=((T31*)se_new(31));
  335. rT31make(n,1);
  336. _dctn=(T0 *)n;}
  337. rs-=8;
  338. rs_unlink();
  339. }
  340. char trT38out_in_tagged_out_memory[]="out_in_tagged_out_memory of GENERAL";
  341. void rT38out_in_tagged_out_memory(T38 *C){
  342. rs_link(trT38out_in_tagged_out_memory);
  343. rs_pREF((void **)&C,Current);
  344. /*IF*//*AF*//*AE*/
  345. rs_pPOS(tag_pos_3,360,24,1);
  346. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,360,6,1))),((T0 *)(gt[(C)->id])));
  347. rs-=8;
  348. /*IF*/{/*AT*/rs_pPOS(tag_pos_3,362,27,1);
  349. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,362,9,1))),'\43');
  350. rs-=8;
  351. rs_pPOS(tag_pos_3,363,19,1);
  352. rT2append_in(rT38object_id(C),oRBC1tagged_out_memory);
  353. rs-=8;
  354. }
  355. /*FI*/rs_pPOS(tag_pos_3,365,24,1);
  356. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,365,6,1))),'\133');
  357. rs-=8;
  358. rs_pPOS(tag_pos_3,366,6,1);
  359. rT38fill_tagged_out_memory();
  360. rs-=8;
  361. rs_pPOS(tag_pos_3,367,24,1);
  362. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,367,6,1))),'\135');
  363. rs-=8;
  364. /*FI*/rs_unlink();
  365. }
  366. char trT38object_id[]="object_id of GENERAL";
  367. int rT38object_id(T38 *C){
  368. int R=0;
  369. rs_link(trT38object_id);
  370. rs_pREF((void **)&C,Current);
  371. rs_pINT(&R,Result);
  372. req_last_chance=1;
  373. if (!af_req){af_req=1;
  374. af_req=0;}
  375. rs_pPOS(tag_pos_3,38,3,1);
  376. R=((int)C);
  377. rs-=8;
  378. rs_unlink();
  379. return R;
  380. }
  381. char trT38fill_tagged_out_memory[]="fill_tagged_out_memory of GENERAL";
  382. void rT38fill_tagged_out_memory(/*C*/void){
  383. rs_link(trT38fill_tagged_out_memory);
  384. rs_unlink();
  385. }
  386. char trT38die_with_code[]="die_with_code of GENERAL";
  387. void rT38die_with_code(/*C*/int a1){
  388. rs_link(trT38die_with_code);
  389. rs_pINT(&a1,"code");
  390. req_last_chance=1;
  391. if (!af_req){af_req=1;
  392. rs_pPOS(tag_pos_4,508,28,1);
  393. ac_req(((a1)==(0))||((a1)==(1)));
  394. af_req=0;}
  395. rs_pPOS(tag_pos_3,511,3,1);
  396. exit(a1);
  397. rs-=8;
  398. rs_unlink();
  399. }
  400. char trT38put_string[]="put_string of STD_FILE_WRITE";
  401. void rT38put_string(T38 *C,T0* a1){
  402. int _i=0;
  403. rs_link(trT38put_string);
  404. rs_pREF((void **)&C,Current);
  405. rs_pREF((void **)&a1,"s");
  406. rs_pINT(&_i,"i");
  407. req_last_chance=1;
  408. if (!af_req){af_req=1;
  409. rs_pPOS(tag_pos_4,53,5,33);
  410. ac_req(((int)a1));
  411. af_req=0;}
  412. _i=1;
  413. while (!(rs_pPOS(tag_pos_2,60,8,33),rs_pop_int((_i)>((ivT7(((T7 *)ci(7,a1,60,10,33))))->_count)))) {
  414. rs_pPOS(tag_pos_3,62,6,33);
  415. rT38put_character(C,rT7item(ivT7(((T7 *)ci(7,a1,62,20,33))),_i));
  416. rs-=8;
  417. rs_pPOS(tag_pos_1,63,6,33);
  418. _i=(_i)+(1);
  419. rs-=8;
  420. }
  421. rs_unlink();
  422. }
  423. char trT38print_on[]="print_on of GENERAL";
  424. void rT38print_on(T38 *C,T0* a1){
  425. rs_link(trT38print_on);
  426. rs_pREF((void **)&C,Current);
  427. rs_pREF((void **)&a1,"file");
  428. rs_pPOS(tag_pos_3,329,21,1);
  429. rT7clear(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,329,3,1))));
  430. rs-=8;
  431. rs_pPOS(tag_pos_3,330,3,1);
  432. rT38out_in_tagged_out_memory(C);
  433. rs-=8;
  434. rs_pPOS(tag_pos_3,331,8,1);
  435. XrT33put_string(331,3,1,a1,oRBC1tagged_out_memory);
  436. rs-=8;
  437. rs_unlink();
  438. }
  439. char trT38print[]="print of GENERAL";
  440. void rT38print(/*C*/T0* a1){
  441. rs_link(trT38print);
  442. rs_pREF((void **)&a1,"some");
  443. /*IF*/if (rs_pPOS(tag_pos_2,319,11,1),rs_pop_int(!(a1))) {
  444. rs_pPOS(tag_pos_3,320,17,1);
  445. rT32put_string(((T32 *)ci(32,oRBC1std_output,320,6,1)),(T0 *)ms5);
  446. rs-=8;
  447. }
  448. else {
  449. rs_pPOS(tag_pos_3,322,11,1);
  450. XrT1print_on(322,6,1,a1,oRBC1std_output);
  451. rs-=8;
  452. }
  453. /*FI*/rs_unlink();
  454. }
  455. char trT38is_connected[]="is_connected of STD_FILE";
  456. int rT38is_connected(T38 *C){
  457. int R=0;
  458. rs_link(trT38is_connected);
  459. rs_pREF((void **)&C,Current);
  460. rs_pBOO(&R,Result);
  461. rs_pPOS(tag_pos_1,44,3,34);
  462. R=((int)(C)->_path);
  463. rs-=8;
  464. rs_unlink();
  465. return R;
  466. }
  467. T0*oRBC1std_error;
  468. char trT38crash[]="crash of GENERAL";
  469. void rT38crash(/*C*/void){
  470. rs_link(trT38crash);
  471. rs_pPOS(tag_pos_3,500,3,1);
  472. rsp();
  473. rs-=8;
  474. rs_pPOS(tag_pos_3,501,3,1);
  475. rT38die_with_code(1);
  476. rs-=8;
  477. rs_unlink();
  478. }
  479. char trT38put_character[]="put_character of STD_FILE_WRITE";
  480. void rT38put_character(T38 *C,char a1){
  481. char _err=0;
  482. rs_link(trT38put_character);
  483. rs_pREF((void **)&C,Current);
  484. rs_pCHA(&a1,"c");
  485. rs_pCHA(&_err,"err");
  486. rs_pPOS(tag_pos_1,43,3,33);
  487. _err=fputc(a1,(C)->_output_stream);
  488. rs-=8;
  489. /*IF*/if (rs_pPOS(tag_pos_2,44,10,33),rs_pop_int((_err)!=(a1))) {
  490. rs_pPOS(tag_pos_3,45,16,33);
  491. rT38put_string(((T38 *)ci(38,oRBC1std_error,45,6,33)),(T0 *)ms1);
  492. rs-=8;
  493. rs_pPOS(tag_pos_3,46,6,33);
  494. rT38crash();
  495. rs-=8;
  496. }
  497. /*FI*/rs_unlink();
  498. }
  499. char trT38make[]="make of STD_ERROR";
  500. void rT38make(T38 *C){
  501. rs_link(trT38make);
  502. rs_pREF((void **)&C,Current);
  503. rs_pPOS(tag_pos_1,25,3,38);
  504. C->_output_stream=stderr;
  505. rs-=8;
  506. if (!af_ens){af_ens=1;
  507. rs_pPOS(tag_pos_4,27,3,38);
  508. ac_ens(rT6_px110111116(rT38is_connected(C)));
  509. af_ens=0;}
  510. rs_unlink();
  511. }
  512. char trT7out_in_tagged_out_memory[]="out_in_tagged_out_memory of STRING";
  513. void rT7out_in_tagged_out_memory(T7 *C){
  514. rs_link(trT7out_in_tagged_out_memory);
  515. rs_pREF((void **)&C,Current);
  516. rs_pPOS(tag_pos_3,823,21,7);
  517. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,823,3,7))),'\42');
  518. rs-=8;
  519. rs_pPOS(tag_pos_3,824,21,7);
  520. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,824,3,7))),(T0 *)C);
  521. rs-=8;
  522. rs_pPOS(tag_pos_3,825,21,7);
  523. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,825,3,7))),'\42');
  524. rs-=8;
  525. rs_unlink();
  526. }
  527. char trT7object_id[]="object_id of GENERAL";
  528. int rT7object_id(T7 *C){
  529. int R=0;
  530. rs_link(trT7object_id);
  531. rs_pREF((void **)&C,Current);
  532. rs_pINT(&R,Result);
  533. req_last_chance=1;
  534. if (!af_req){af_req=1;
  535. af_req=0;}
  536. rs_pPOS(tag_pos_3,38,3,1);
  537. R=((int)C);
  538. rs-=8;
  539. rs_unlink();
  540. return R;
  541. }
  542. char trT7extend[]="add_last of STRING";
  543. void rT7extend(T7 *C,char a1){
  544. T2 o1=(C)->_count;
  545. rs_link(trT7extend);
  546. rs_pREF((void **)&C,Current);
  547. rs_pCHA(&a1,"ch");
  548. /*IF*/if (rs_pPOS(tag_pos_2,497,15,7),rs_pop_int(((C)->_capacity)>((C)->_count))) {
  549. }
  550.  else if (rs_pPOS(tag_pos_2,498,19,7),rs_pop_int(((C)->_capacity)==(0))) {
  551. C->_capacity=32;
  552. rs_pPOS(tag_pos_1,500,6,7);
  553. C->_storage=rT7malloc((C)->_capacity);
  554. rs-=8;
  555. }
  556. else {
  557. rs_pPOS(tag_pos_1,502,6,7);
  558. C->_capacity=((C)->_capacity)+(32);
  559. rs-=8;
  560. rs_pPOS(tag_pos_1,503,6,7);
  561. C->_storage=rT7realloc((C)->_storage,(C)->_capacity);
  562. rs-=8;
  563. }
  564. /*FI*/rs_pPOS(tag_pos_1,505,3,7);
  565. C->_count=((C)->_count)+(1);
  566. rs-=8;
  567. rs_pPOS(tag_pos_3,506,3,7);
  568. rT7put(C,a1,(C)->_count);
  569. rs-=8;
  570. if (!af_ens){af_ens=1;
  571. rs_pPOS(tag_pos_4,508,9,7);
  572. ac_ens(((C)->_count)==((1)+(o1)));
  573. rs_pPOS(tag_pos_4,509,16,7);
  574. ac_ens((rT7item(C,(C)->_count))==(a1));
  575. af_ens=0;}
  576. rs_unlink();
  577. }
  578. char trT7fill_tagged_out_memory[]="fill_tagged_out_memory of STRING";
  579. void rT7fill_tagged_out_memory(T7 *C){
  580. rs_link(trT7fill_tagged_out_memory);
  581. rs_pREF((void **)&C,Current);
  582. rs_pPOS(tag_pos_3,830,21,7);
  583. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,830,3,7))),(T0 *)ms17);
  584. rs-=8;
  585. rs_pPOS(tag_pos_3,831,9,7);
  586. rT2append_in((C)->_count,oRBC1tagged_out_memory);
  587. rs-=8;
  588. rs_pPOS(tag_pos_3,832,21,7);
  589. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,832,3,7))),(T0 *)ms18);
  590. rs-=8;
  591. rs_pPOS(tag_pos_3,833,12,7);
  592. rT2append_in((C)->_capacity,oRBC1tagged_out_memory);
  593. rs-=8;
  594. rs_pPOS(tag_pos_3,834,21,7);
  595. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,834,3,7))),(T0 *)ms19);
  596. rs-=8;
  597. rs_pPOS(tag_pos_3,835,21,7);
  598. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,835,3,7))),(T0 *)C);
  599. rs-=8;
  600. rs_pPOS(tag_pos_3,836,21,7);
  601. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,836,3,7))),'\42');
  602. rs-=8;
  603. rs_unlink();
  604. }
  605. char trT7clear[]="clear of STRING";
  606. void rT7clear(T7 *C){
  607. rs_link(trT7clear);
  608. rs_pREF((void **)&C,Current);
  609. C->_count=0;
  610. if (!af_ens){af_ens=1;
  611. rs_pPOS(tag_pos_4,292,9,7);
  612. ac_ens(((C)->_count)==(0));
  613. af_ens=0;}
  614. rs_unlink();
  615. }
  616. char trT7print_on[]="print_on of GENERAL";
  617. void rT7print_on(T7 *C,T0* a1){
  618. rs_link(trT7print_on);
  619. rs_pREF((void **)&C,Current);
  620. rs_pREF((void **)&a1,"file");
  621. rs_pPOS(tag_pos_3,329,21,1);
  622. rT7clear(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,329,3,1))));
  623. rs-=8;
  624. rs_pPOS(tag_pos_3,330,3,1);
  625. rT7out_in_tagged_out_memory(C);
  626. rs-=8;
  627. rs_pPOS(tag_pos_3,331,8,1);
  628. XrT33put_string(331,3,1,a1,oRBC1tagged_out_memory);
  629. rs-=8;
  630. rs_unlink();
  631. }
  632. char trT7print[]="print of GENERAL";
  633. void rT7print(/*C*/T0* a1){
  634. rs_link(trT7print);
  635. rs_pREF((void **)&a1,"some");
  636. /*IF*/if (rs_pPOS(tag_pos_2,319,11,1),rs_pop_int(!(a1))) {
  637. rs_pPOS(tag_pos_3,320,17,1);
  638. rT32put_string(((T32 *)ci(32,oRBC1std_output,320,6,1)),(T0 *)ms5);
  639. rs-=8;
  640. }
  641. else {
  642. rs_pPOS(tag_pos_3,322,11,1);
  643. XrT1print_on(322,6,1,a1,oRBC1std_output);
  644. rs-=8;
  645. }
  646. /*FI*/rs_unlink();
  647. }
  648. char trT7item[]="item of STRING";
  649. char rT7item(T7 *C,int a1){
  650. char R=0;
  651. rs_link(trT7item);
  652. rs_pREF((void **)&C,Current);
  653. rs_pINT(&a1,"index");
  654. rs_pCHA(&R,Result);
  655. req_last_chance=1;
  656. if (!af_req){af_req=1;
  657. rs_pPOS(tag_pos_4,80,3,7);
  658. ac_req(rT7valid_index(C,a1));
  659. af_req=0;}
  660. /*IF*//*AF*//*AE*/
  661. /*FI*/rs_pPOS(tag_pos_3,83,3,7);
  662. R=(C->_storage)[a1-1];
  663. rs-=8;
  664. rs_unlink();
  665. return R;
  666. }
  667. char trT7realloc[]="realloc of STRING";
  668. char * rT7realloc(/*C*/char * a1,int a2){
  669. char * R=0;
  670. rs_link(trT7realloc);
  671. rs_pPOI(&a1,"pointer");
  672. rs_pINT(&a2,"size");
  673. rs_pPOI(&R,Result);
  674. req_last_chance=1;
  675. if (!af_req){af_req=1;
  676. rs_pPOS(tag_pos_4,1001,8,7);
  677. ac_req((a2)>(0));
  678. af_req=0;}
  679. rs_pPOS(tag_pos_3,1003,3,7);
  680. R=(char*)realloc(a1,(size_t)a2);
  681. rs-=8;
  682. rs_unlink();
  683. return R;
  684. }
  685. char trT7valid_index[]="valid_index of STRING";
  686. int rT7valid_index(T7 *C,int a1){
  687. int R=0;
  688. rs_link(trT7valid_index);
  689. rs_pREF((void **)&C,Current);
  690. rs_pINT(&a1,"index");
  691. rs_pBOO(&R,Result);
  692. rs_pPOS(tag_pos_1,89,3,7);
  693. R=((1)<=(a1))&&((a1)<=((C)->_count));
  694. rs-=8;
  695. if (!af_ens){af_ens=1;
  696. rs_pPOS(tag_pos_4,91,10,7);
  697. ac_ens((R)==(rT6_ix97110100((1)<=(a1),(a1)<=((C)->_count))));
  698. af_ens=0;}
  699. rs_unlink();
  700. return R;
  701. }
  702. char trT7append[]="append of STRING";
  703. void rT7append(T7 *C,T0* a1){
  704. int _i=0;
  705. rs_link(trT7append);
  706. rs_pREF((void **)&C,Current);
  707. rs_pREF((void **)&a1,"other");
  708. rs_pINT(&_i,"i");
  709. req_last_chance=1;
  710. if (!af_req){af_req=1;
  711. rs_pPOS(tag_pos_4,334,9,7);
  712. ac_req(((int)a1));
  713. af_req=0;}
  714. _i=1;
  715. while (!(rs_pPOS(tag_pos_2,341,8,7),rs_pop_int((_i)>((ivT7(((T7 *)ci(7,a1,341,10,7))))->_count)))) {
  716. rs_pPOS(tag_pos_3,343,6,7);
  717. rT7extend(C,rT7item(ivT7(((T7 *)ci(7,a1,343,13,7))),_i));
  718. rs-=8;
  719. rs_pPOS(tag_pos_1,344,6,7);
  720. _i=(_i)+(1);
  721. rs-=8;
  722. }
  723. rs_unlink();
  724. }
  725. char trT7malloc[]="malloc of STRING";
  726. char * rT7malloc(/*C*/int a1){
  727. char * R=0;
  728. rs_link(trT7malloc);
  729. rs_pINT(&a1,"size");
  730. rs_pPOI(&R,Result);
  731. req_last_chance=1;
  732. if (!af_req){af_req=1;
  733. rs_pPOS(tag_pos_4,994,8,7);
  734. ac_req((a1)>(0));
  735. af_req=0;}
  736. rs_pPOS(tag_pos_3,996,3,7);
  737. R=(char*)malloc((size_t)a1);
  738. rs-=8;
  739. rs_unlink();
  740. return R;
  741. }
  742. char trT7index_of[]="index_of of STRING";
  743. int rT7index_of(T7 *C,char a1){
  744. int R=0;
  745. rs_link(trT7index_of);
  746. rs_pREF((void **)&C,Current);
  747. rs_pCHA(&a1,"ch");
  748. rs_pINT(&R,Result);
  749. R=1;
  750. while (!(rs_pPOS(tag_pos_2,209,23,7),rs_pop_int(((R)>((C)->_count))||((a1)==(rT7item(C,R)))))) {
  751. rs_pPOS(tag_pos_1,211,6,7);
  752. R=(R)+(1);
  753. rs-=8;
  754. }
  755. if (!af_ens){af_ens=1;
  756. rs_pPOS(tag_pos_4,214,25,7);
  757. ac_ens((!((R)!=(((C)->_count)+(1))))||((rT7item(C,R))==(a1)));
  758. af_ens=0;}
  759. rs_unlink();
  760. return R;
  761. }
  762. char trT7put[]="put of STRING";
  763. void rT7put(T7 *C,char a1,int a2){
  764. rs_link(trT7put);
  765. rs_pREF((void **)&C,Current);
  766. rs_pCHA(&a1,"ch");
  767. rs_pINT(&a2,"index");
  768. req_last_chance=1;
  769. if (!af_req){af_req=1;
  770. rs_pPOS(tag_pos_4,388,3,7);
  771. ac_req(rT7valid_index(C,a2));
  772. af_req=0;}
  773. /*IF*//*AF*//*AE*/
  774. /*FI*/rs_pPOS(tag_pos_3,391,3,7);
  775. (C->_storage)[a2-1]=a1;
  776. rs-=8;
  777. if (!af_ens){af_ens=1;
  778. rs_pPOS(tag_pos_4,393,16,7);
  779. ac_ens((rT7item(C,a2))==(a1));
  780. af_ens=0;}
  781. rs_unlink();
  782. }
  783. char trT7swap[]="swap of STRING";
  784. void rT7swap(T7 *C,int a1,int a2){
  785. char _tmp=0;
  786. T3 o3=rT7item(C,a2);
  787. T3 o2=rT7item(C,a1);
  788. rs_link(trT7swap);
  789. rs_pREF((void **)&C,Current);
  790. rs_pINT(&a1,"i1");
  791. rs_pINT(&a2,"i2");
  792. rs_pCHA(&_tmp,"tmp");
  793. req_last_chance=1;
  794. if (!af_req){af_req=1;
  795. rs_pPOS(tag_pos_4,398,3,7);
  796. ac_req(rT7valid_index(C,a1));
  797. rs_pPOS(tag_pos_4,399,3,7);
  798. ac_req(rT7valid_index(C,a2));
  799. af_req=0;}
  800. rs_pPOS(tag_pos_1,403,3,7);
  801. _tmp=rT7item(C,a1);
  802. rs-=8;
  803. rs_pPOS(tag_pos_3,404,3,7);
  804. rT7put(C,rT7item(C,a2),a1);
  805. rs-=8;
  806. rs_pPOS(tag_pos_3,405,3,7);
  807. rT7put(C,_tmp,a2);
  808. rs-=8;
  809. if (!af_ens){af_ens=1;
  810. rs_pPOS(tag_pos_4,407,12,7);
  811. ac_ens((rT7item(C,a1))==(o3));
  812. rs_pPOS(tag_pos_4,408,12,7);
  813. ac_ens((rT7item(C,a2))==(o2));
  814. af_ens=0;}
  815. rs_unlink();
  816. }
  817. char trT7has[]="has of STRING";
  818. int rT7has(T7 *C,char a1){
  819. int R=0;
  820. rs_link(trT7has);
  821. rs_pREF((void **)&C,Current);
  822. rs_pCHA(&a1,"ch");
  823. rs_pBOO(&R,Result);
  824. rs_pPOS(tag_pos_1,220,3,7);
  825. R=(rT7index_of(C,a1))!=(((C)->_count)+(1));
  826. rs-=8;
  827. rs_unlink();
  828. return R;
  829. }
  830. char trT7make[]="make of STRING";
  831. void rT7make(T7 *C,int a1){
  832. rs_link(trT7make);
  833. rs_pREF((void **)&C,Current);
  834. rs_pINT(&a1,"needed_capacity");
  835. req_last_chance=1;
  836. if (!af_req){af_req=1;
  837. rs_pPOS(tag_pos_4,38,19,7);
  838. ac_req((a1)>=(0));
  839. af_req=0;}
  840. /*IF*/if (rs_pPOS(tag_pos_2,40,22,7),rs_pop_int((a1)>(0))) {
  841. /*IF*/if (rs_pPOS(tag_pos_2,41,18,7),rs_pop_int(((C)->_capacity)<(a1))) {
  842. /*IF*/if (rs_pPOS(tag_pos_2,42,21,7),rs_pop_int(((C)->_capacity)==(0))) {
  843. rs_pPOS(tag_pos_1,43,5,7);
  844. C->_storage=rT7malloc(a1);
  845. rs-=8;
  846. }
  847. else {
  848. rs_pPOS(tag_pos_1,45,5,7);
  849. C->_storage=rT7realloc((C)->_storage,a1);
  850. rs-=8;
  851. }
  852. /*FI*/C->_capacity=a1;
  853. }
  854. /*FI*/}
  855. /*FI*/C->_count=0;
  856. if (!af_ens){af_ens=1;
  857. rs_pPOS(tag_pos_4,52,19,7);
  858. ac_ens((a1)<=((C)->_capacity));
  859. rs_pPOS(tag_pos_4,53,9,7);
  860. ac_ens(((C)->_count)==(0));
  861. af_ens=0;}
  862. rs_unlink();
  863. }
  864. T7 *ivT7(T7 *C){
  865. *rs++=(void *)doingInvariantId;*rs++=(void *)p[7];
  866. if (!af_inv){af_inv=1;
  867. rs_pPOS(tag_pos_4,1042,6,7);
  868. ac_inv((0)<=((C)->_count));
  869. rs_pPOS(tag_pos_4,1044,6,7);
  870. ac_inv((0)<=((C)->_capacity));
  871. rs_pPOS(tag_pos_4,1046,10,7);
  872. ac_inv(((C)->_count)<=((C)->_capacity));
  873. af_inv=0;}
  874. rs-=2;return C;}
  875. char trT36out_in_tagged_out_memory[]="out_in_tagged_out_memory of GENERAL";
  876. void rT36out_in_tagged_out_memory(T36 *C){
  877. rs_link(trT36out_in_tagged_out_memory);
  878. rs_pREF((void **)&C,Current);
  879. /*IF*//*AF*//*AE*/
  880. rs_pPOS(tag_pos_3,360,24,1);
  881. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,360,6,1))),((T0 *)(gt[(C)->id])));
  882. rs-=8;
  883. /*IF*/{/*AT*/rs_pPOS(tag_pos_3,362,27,1);
  884. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,362,9,1))),'\43');
  885. rs-=8;
  886. rs_pPOS(tag_pos_3,363,19,1);
  887. rT2append_in(rT36object_id(C),oRBC1tagged_out_memory);
  888. rs-=8;
  889. }
  890. /*FI*/rs_pPOS(tag_pos_3,365,24,1);
  891. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,365,6,1))),'\133');
  892. rs-=8;
  893. rs_pPOS(tag_pos_3,366,6,1);
  894. rT36fill_tagged_out_memory(C);
  895. rs-=8;
  896. rs_pPOS(tag_pos_3,367,24,1);
  897. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,367,6,1))),'\135');
  898. rs-=8;
  899. /*FI*/rs_unlink();
  900. }
  901. char trT36object_id[]="object_id of GENERAL";
  902. int rT36object_id(T36 *C){
  903. int R=0;
  904. rs_link(trT36object_id);
  905. rs_pREF((void **)&C,Current);
  906. rs_pINT(&R,Result);
  907. req_last_chance=1;
  908. if (!af_req){af_req=1;
  909. af_req=0;}
  910. rs_pPOS(tag_pos_3,38,3,1);
  911. R=((int)C);
  912. rs-=8;
  913. rs_unlink();
  914. return R;
  915. }
  916. char trT36fill_tagged_out_memory[]="fill_tagged_out_memory of BOOLEAN_REF";
  917. void rT36fill_tagged_out_memory(T36 *C){
  918. rs_link(trT36fill_tagged_out_memory);
  919. rs_pREF((void **)&C,Current);
  920. rs_pPOS(tag_pos_3,87,21,36);
  921. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,87,3,36))),(T0 *)ms13);
  922. rs-=8;
  923. /*IF*/if (rs_pPOS(tag_pos_2,88,6,36),rs_pop_int((C)->_item)) {
  924. rs_pPOS(tag_pos_3,89,24,36);
  925. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,89,6,36))),(T0 *)ms14);
  926. rs-=8;
  927. }
  928. else {
  929. rs_pPOS(tag_pos_3,91,24,36);
  930. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,91,6,36))),(T0 *)ms15);
  931. rs-=8;
  932. }
  933. /*FI*/rs_unlink();
  934. }
  935. char trT36print_on[]="print_on of GENERAL";
  936. void rT36print_on(T36 *C,T0* a1){
  937. rs_link(trT36print_on);
  938. rs_pREF((void **)&C,Current);
  939. rs_pREF((void **)&a1,"file");
  940. rs_pPOS(tag_pos_3,329,21,1);
  941. rT7clear(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,329,3,1))));
  942. rs-=8;
  943. rs_pPOS(tag_pos_3,330,3,1);
  944. rT36out_in_tagged_out_memory(C);
  945. rs-=8;
  946. rs_pPOS(tag_pos_3,331,8,1);
  947. XrT33put_string(331,3,1,a1,oRBC1tagged_out_memory);
  948. rs-=8;
  949. rs_unlink();
  950. }
  951. char trT36print[]="print of GENERAL";
  952. void rT36print(/*C*/T0* a1){
  953. rs_link(trT36print);
  954. rs_pREF((void **)&a1,"some");
  955. /*IF*/if (rs_pPOS(tag_pos_2,319,11,1),rs_pop_int(!(a1))) {
  956. rs_pPOS(tag_pos_3,320,17,1);
  957. rT32put_string(((T32 *)ci(32,oRBC1std_output,320,6,1)),(T0 *)ms5);
  958. rs-=8;
  959. }
  960. else {
  961. rs_pPOS(tag_pos_3,322,11,1);
  962. XrT1print_on(322,6,1,a1,oRBC1std_output);
  963. rs-=8;
  964. }
  965. /*FI*/rs_unlink();
  966. }
  967. char trT6_ix111114[]="infix or of BOOLEAN";
  968. int rT6_ix111114(T6 C,int a1){
  969. int R=0;
  970. rs_link(trT6_ix111114);
  971. rs_pBOO(&C,Current);
  972. rs_pBOO(&a1,"other");
  973. rs_pBOO(&R,Result);
  974. req_last_chance=1;
  975. if (!af_req){af_req=1;
  976. af_req=0;}
  977. rs_pPOS(tag_pos_1,37,3,6);
  978. R=(C)||(a1);
  979. rs-=8;
  980. rs_unlink();
  981. return R;
  982. }
  983. char trT6_px110111116[]="prefix not of BOOLEAN";
  984. int rT6_px110111116(T6 C){
  985. int R=0;
  986. rs_link(trT6_px110111116);
  987. rs_pBOO(&C,Current);
  988. rs_pBOO(&R,Result);
  989. /*IF*/if (C) {
  990. }
  991. else {
  992. R=1;
  993. }
  994. /*FI*/rs_unlink();
  995. return R;
  996. }
  997. char trT6_ix97110100[]="infix and of BOOLEAN";
  998. int rT6_ix97110100(T6 C,int a1){
  999. int R=0;
  1000. rs_link(trT6_ix97110100);
  1001. rs_pBOO(&C,Current);
  1002. rs_pBOO(&a1,"other");
  1003. rs_pBOO(&R,Result);
  1004. req_last_chance=1;
  1005. if (!af_req){af_req=1;
  1006. af_req=0;}
  1007. rs_pPOS(tag_pos_1,21,3,6);
  1008. R=(C)&&(a1);
  1009. rs-=8;
  1010. rs_unlink();
  1011. return R;
  1012. }
  1013. char trT2digit[]="digit of INTEGER";
  1014. char rT2digit(T2 C){
  1015. char R=0;
  1016. rs_link(trT2digit);
  1017. rs_pINT(&C,Current);
  1018. rs_pCHA(&R,Result);
  1019. req_last_chance=1;
  1020. if (!af_req){af_req=1;
  1021. rs_pPOS(tag_pos_4,259,5,2);
  1022. ac_req((0)<=(C));
  1023. rs_pPOS(tag_pos_4,260,11,2);
  1024. ac_req((C)<=(9));
  1025. af_req=0;}
  1026. rs_pPOS(tag_pos_1,262,3,2);
  1027. R=rT7item(ivT7(((T7*)ms10)),(C)+(1));
  1028. rs-=8;
  1029. if (!af_ens){af_ens=1;
  1030. rs_pPOS(tag_pos_4,264,18,2);
  1031. ac_ens(rT7has(ivT7(((T7*)ms12)),R));
  1032. rs_pPOS(tag_pos_4,265,16,2);
  1033. ac_ens((rT3value(R))==(C));
  1034. af_ens=0;}
  1035. rs_unlink();
  1036. return R;
  1037. }
  1038. char trT2append_in[]="append_in of INTEGER";
  1039. void rT2append_in(T2 C,T0* a1){
  1040. int _i=0;
  1041. int _val=0;
  1042. rs_link(trT2append_in);
  1043. rs_pINT(&C,Current);
  1044. rs_pREF((void **)&a1,"str");
  1045. rs_pINT(&_val,"val");
  1046. rs_pINT(&_i,"i");
  1047. req_last_chance=1;
  1048. if (!af_req){af_req=1;
  1049. rs_pPOS(tag_pos_4,185,7,2);
  1050. ac_req(((int)a1));
  1051. af_req=0;}
  1052. /*IF*/if (rs_pPOS(tag_pos_2,189,14,2),rs_pop_int((C)==(0))) {
  1053. rs_pPOS(tag_pos_3,190,10,2);
  1054. rT7extend(ivT7(((T7 *)ci(7,a1,190,6,2))),'0');
  1055. rs-=8;
  1056. }
  1057. else {
  1058. /*IF*/if (rs_pPOS(tag_pos_2,192,17,2),rs_pop_int((C)<(0))) {
  1059. rs_pPOS(tag_pos_3,193,13,2);
  1060. rT7extend(ivT7(((T7 *)ci(7,a1,193,9,2))),'\55');
  1061. rs-=8;
  1062. rs_pPOS(tag_pos_3,194,21,2);
  1063. rT2append_in(-(C),a1);
  1064. rs-=8;
  1065. }
  1066. else {
  1067. rs_pPOS(tag_pos_1,197,5,2);
  1068. _i=((ivT7(((T7 *)ci(7,a1,197,10,2))))->_count)+(1);
  1069. rs-=8;
  1070. _val=C;
  1071. while (!(rs_pPOS(tag_pos_2,200,9,2),rs_pop_int((_val)==(0)))) {
  1072. rs_pPOS(tag_pos_3,202,9,2);
  1073. rT7extend(ivT7(((T7 *)ci(7,a1,202,5,2))),rT2digit((_val)%(10)));
  1074. rs-=8;
  1075. rs_pPOS(tag_pos_1,203,5,2);
  1076. _val=(_val)/(10);
  1077. rs-=8;
  1078. }
  1079. rs_pPOS(tag_pos_1,206,5,2);
  1080. _val=(ivT7(((T7 *)ci(7,a1,206,12,2))))->_count;
  1081. rs-=8;
  1082. while (!(rs_pPOS(tag_pos_2,208,7,2),rs_pop_int((_i)>=(_val)))) {
  1083. rs_pPOS(tag_pos_3,210,9,2);
  1084. rT7swap(ivT7(((T7 *)ci(7,a1,210,5,2))),_i,_val);
  1085. rs-=8;
  1086. rs_pPOS(tag_pos_1,211,5,2);
  1087. _val=(_val)-(1);
  1088. rs-=8;
  1089. rs_pPOS(tag_pos_1,212,5,2);
  1090. _i=(_i)+(1);
  1091. rs-=8;
  1092. }
  1093. }
  1094. /*FI*/}
  1095. /*FI*/rs_unlink();
  1096. }
  1097. char trT31out_in_tagged_out_memory[]="out_in_tagged_out_memory of GENERAL";
  1098. void rT31out_in_tagged_out_memory(T31 *C){
  1099. rs_link(trT31out_in_tagged_out_memory);
  1100. rs_pREF((void **)&C,Current);
  1101. /*IF*//*AF*//*AE*/
  1102. rs_pPOS(tag_pos_3,360,24,1);
  1103. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,360,6,1))),((T0 *)(gt[(C)->id])));
  1104. rs-=8;
  1105. /*IF*/{/*AT*/rs_pPOS(tag_pos_3,362,27,1);
  1106. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,362,9,1))),'\43');
  1107. rs-=8;
  1108. rs_pPOS(tag_pos_3,363,19,1);
  1109. rT2append_in(rT31object_id(C),oRBC1tagged_out_memory);
  1110. rs-=8;
  1111. }
  1112. /*FI*/rs_pPOS(tag_pos_3,365,24,1);
  1113. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,365,6,1))),'\133');
  1114. rs-=8;
  1115. rs_pPOS(tag_pos_3,366,6,1);
  1116. rT31fill_tagged_out_memory();
  1117. rs-=8;
  1118. rs_pPOS(tag_pos_3,367,24,1);
  1119. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,367,6,1))),'\135');
  1120. rs-=8;
  1121. /*FI*/rs_unlink();
  1122. }
  1123. char trT31object_id[]="object_id of GENERAL";
  1124. int rT31object_id(T31 *C){
  1125. int R=0;
  1126. rs_link(trT31object_id);
  1127. rs_pREF((void **)&C,Current);
  1128. rs_pINT(&R,Result);
  1129. req_last_chance=1;
  1130. if (!af_req){af_req=1;
  1131. af_req=0;}
  1132. rs_pPOS(tag_pos_3,38,3,1);
  1133. R=((int)C);
  1134. rs-=8;
  1135. rs_unlink();
  1136. return R;
  1137. }
  1138. char trT31fill_tagged_out_memory[]="fill_tagged_out_memory of GENERAL";
  1139. void rT31fill_tagged_out_memory(/*C*/void){
  1140. rs_link(trT31fill_tagged_out_memory);
  1141. rs_unlink();
  1142. }
  1143. char trT31print_on[]="print_on of GENERAL";
  1144. void rT31print_on(T31 *C,T0* a1){
  1145. rs_link(trT31print_on);
  1146. rs_pREF((void **)&C,Current);
  1147. rs_pREF((void **)&a1,"file");
  1148. rs_pPOS(tag_pos_3,329,21,1);
  1149. rT7clear(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,329,3,1))));
  1150. rs-=8;
  1151. rs_pPOS(tag_pos_3,330,3,1);
  1152. rT31out_in_tagged_out_memory(C);
  1153. rs-=8;
  1154. rs_pPOS(tag_pos_3,331,8,1);
  1155. XrT33put_string(331,3,1,a1,oRBC1tagged_out_memory);
  1156. rs-=8;
  1157. rs_unlink();
  1158. }
  1159. char trT31print[]="print of GENERAL";
  1160. void rT31print(/*C*/T0* a1){
  1161. rs_link(trT31print);
  1162. rs_pREF((void **)&a1,"some");
  1163. /*IF*/if (rs_pPOS(tag_pos_2,319,11,1),rs_pop_int(!(a1))) {
  1164. rs_pPOS(tag_pos_3,320,17,1);
  1165. rT32put_string(((T32 *)ci(32,oRBC1std_output,320,6,1)),(T0 *)ms5);
  1166. rs-=8;
  1167. }
  1168. else {
  1169. rs_pPOS(tag_pos_3,322,11,1);
  1170. XrT1print_on(322,6,1,a1,oRBC1std_output);
  1171. rs-=8;
  1172. }
  1173. /*FI*/rs_unlink();
  1174. }
  1175. char trT31make[]="make of INTEGER_REF";
  1176. void rT31make(T31 *C,int a1){
  1177. rs_link(trT31make);
  1178. rs_pREF((void **)&C,Current);
  1179. rs_pINT(&a1,"value");
  1180. C->_item=a1;
  1181. rs_unlink();
  1182. }
  1183. char trT32out_in_tagged_out_memory[]="out_in_tagged_out_memory of GENERAL";
  1184. void rT32out_in_tagged_out_memory(T32 *C){
  1185. rs_link(trT32out_in_tagged_out_memory);
  1186. rs_pREF((void **)&C,Current);
  1187. /*IF*//*AF*//*AE*/
  1188. rs_pPOS(tag_pos_3,360,24,1);
  1189. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,360,6,1))),((T0 *)(gt[(C)->id])));
  1190. rs-=8;
  1191. /*IF*/{/*AT*/rs_pPOS(tag_pos_3,362,27,1);
  1192. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,362,9,1))),'\43');
  1193. rs-=8;
  1194. rs_pPOS(tag_pos_3,363,19,1);
  1195. rT2append_in(rT32object_id(C),oRBC1tagged_out_memory);
  1196. rs-=8;
  1197. }
  1198. /*FI*/rs_pPOS(tag_pos_3,365,24,1);
  1199. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,365,6,1))),'\133');
  1200. rs-=8;
  1201. rs_pPOS(tag_pos_3,366,6,1);
  1202. rT32fill_tagged_out_memory();
  1203. rs-=8;
  1204. rs_pPOS(tag_pos_3,367,24,1);
  1205. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,367,6,1))),'\135');
  1206. rs-=8;
  1207. /*FI*/rs_unlink();
  1208. }
  1209. char trT32object_id[]="object_id of GENERAL";
  1210. int rT32object_id(T32 *C){
  1211. int R=0;
  1212. rs_link(trT32object_id);
  1213. rs_pREF((void **)&C,Current);
  1214. rs_pINT(&R,Result);
  1215. req_last_chance=1;
  1216. if (!af_req){af_req=1;
  1217. af_req=0;}
  1218. rs_pPOS(tag_pos_3,38,3,1);
  1219. R=((int)C);
  1220. rs-=8;
  1221. rs_unlink();
  1222. return R;
  1223. }
  1224. char trT32fill_tagged_out_memory[]="fill_tagged_out_memory of GENERAL";
  1225. void rT32fill_tagged_out_memory(/*C*/void){
  1226. rs_link(trT32fill_tagged_out_memory);
  1227. rs_unlink();
  1228. }
  1229. char trT32die_with_code[]="die_with_code of GENERAL";
  1230. void rT32die_with_code(/*C*/int a1){
  1231. rs_link(trT32die_with_code);
  1232. rs_pINT(&a1,"code");
  1233. req_last_chance=1;
  1234. if (!af_req){af_req=1;
  1235. rs_pPOS(tag_pos_4,508,28,1);
  1236. ac_req(((a1)==(0))||((a1)==(1)));
  1237. af_req=0;}
  1238. rs_pPOS(tag_pos_3,511,3,1);
  1239. exit(a1);
  1240. rs-=8;
  1241. rs_unlink();
  1242. }
  1243. char trT32put_string[]="put_string of STD_FILE_WRITE";
  1244. void rT32put_string(T32 *C,T0* a1){
  1245. int _i=0;
  1246. rs_link(trT32put_string);
  1247. rs_pREF((void **)&C,Current);
  1248. rs_pREF((void **)&a1,"s");
  1249. rs_pINT(&_i,"i");
  1250. req_last_chance=1;
  1251. if (!af_req){af_req=1;
  1252. rs_pPOS(tag_pos_4,53,5,33);
  1253. ac_req(((int)a1));
  1254. af_req=0;}
  1255. _i=1;
  1256. while (!(rs_pPOS(tag_pos_2,60,8,33),rs_pop_int((_i)>((ivT7(((T7 *)ci(7,a1,60,10,33))))->_count)))) {
  1257. rs_pPOS(tag_pos_3,62,6,33);
  1258. rT32put_character(C,rT7item(ivT7(((T7 *)ci(7,a1,62,20,33))),_i));
  1259. rs-=8;
  1260. rs_pPOS(tag_pos_1,63,6,33);
  1261. _i=(_i)+(1);
  1262. rs-=8;
  1263. }
  1264. rs_unlink();
  1265. }
  1266. char trT32print_on[]="print_on of GENERAL";
  1267. void rT32print_on(T32 *C,T0* a1){
  1268. rs_link(trT32print_on);
  1269. rs_pREF((void **)&C,Current);
  1270. rs_pREF((void **)&a1,"file");
  1271. rs_pPOS(tag_pos_3,329,21,1);
  1272. rT7clear(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,329,3,1))));
  1273. rs-=8;
  1274. rs_pPOS(tag_pos_3,330,3,1);
  1275. rT32out_in_tagged_out_memory(C);
  1276. rs-=8;
  1277. rs_pPOS(tag_pos_3,331,8,1);
  1278. XrT33put_string(331,3,1,a1,oRBC1tagged_out_memory);
  1279. rs-=8;
  1280. rs_unlink();
  1281. }
  1282. char trT32print[]="print of GENERAL";
  1283. void rT32print(/*C*/T0* a1){
  1284. rs_link(trT32print);
  1285. rs_pREF((void **)&a1,"some");
  1286. /*IF*/if (rs_pPOS(tag_pos_2,319,11,1),rs_pop_int(!(a1))) {
  1287. rs_pPOS(tag_pos_3,320,17,1);
  1288. rT32put_string(((T32 *)ci(32,oRBC1std_output,320,6,1)),(T0 *)ms5);
  1289. rs-=8;
  1290. }
  1291. else {
  1292. rs_pPOS(tag_pos_3,322,11,1);
  1293. XrT1print_on(322,6,1,a1,oRBC1std_output);
  1294. rs-=8;
  1295. }
  1296. /*FI*/rs_unlink();
  1297. }
  1298. char trT32is_connected[]="is_connected of STD_FILE";
  1299. int rT32is_connected(T32 *C){
  1300. int R=0;
  1301. rs_link(trT32is_connected);
  1302. rs_pREF((void **)&C,Current);
  1303. rs_pBOO(&R,Result);
  1304. rs_pPOS(tag_pos_1,44,3,34);
  1305. R=((int)(C)->_path);
  1306. rs-=8;
  1307. rs_unlink();
  1308. return R;
  1309. }
  1310. char trT32crash[]="crash of GENERAL";
  1311. void rT32crash(/*C*/void){
  1312. rs_link(trT32crash);
  1313. rs_pPOS(tag_pos_3,500,3,1);
  1314. rsp();
  1315. rs-=8;
  1316. rs_pPOS(tag_pos_3,501,3,1);
  1317. rT32die_with_code(1);
  1318. rs-=8;
  1319. rs_unlink();
  1320. }
  1321. char trT32put_character[]="put_character of STD_FILE_WRITE";
  1322. void rT32put_character(T32 *C,char a1){
  1323. char _err=0;
  1324. rs_link(trT32put_character);
  1325. rs_pREF((void **)&C,Current);
  1326. rs_pCHA(&a1,"c");
  1327. rs_pCHA(&_err,"err");
  1328. rs_pPOS(tag_pos_1,43,3,33);
  1329. _err=fputc(a1,(C)->_output_stream);
  1330. rs-=8;
  1331. /*IF*/if (rs_pPOS(tag_pos_2,44,10,33),rs_pop_int((_err)!=(a1))) {
  1332. rs_pPOS(tag_pos_3,45,16,33);
  1333. rT38put_string(((T38 *)ci(38,oRBC1std_error,45,6,33)),(T0 *)ms1);
  1334. rs-=8;
  1335. rs_pPOS(tag_pos_3,46,6,33);
  1336. rT32crash();
  1337. rs-=8;
  1338. }
  1339. /*FI*/rs_unlink();
  1340. }
  1341. char trT32make[]="make of STD_OUTPUT";
  1342. void rT32make(T32 *C){
  1343. rs_link(trT32make);
  1344. rs_pREF((void **)&C,Current);
  1345. rs_pPOS(tag_pos_1,25,3,32);
  1346. C->_output_stream=stdout;
  1347. rs-=8;
  1348. if (!af_ens){af_ens=1;
  1349. rs_pPOS(tag_pos_4,27,3,32);
  1350. ac_ens(rT6_px110111116(rT32is_connected(C)));
  1351. af_ens=0;}
  1352. rs_unlink();
  1353. }
  1354. char trT37out_in_tagged_out_memory[]="out_in_tagged_out_memory of GENERAL";
  1355. void rT37out_in_tagged_out_memory(T37 *C){
  1356. rs_link(trT37out_in_tagged_out_memory);
  1357. rs_pREF((void **)&C,Current);
  1358. /*IF*//*AF*//*AE*/
  1359. rs_pPOS(tag_pos_3,360,24,1);
  1360. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,360,6,1))),((T0 *)(gt[(C)->id])));
  1361. rs-=8;
  1362. /*IF*/{/*AT*/rs_pPOS(tag_pos_3,362,27,1);
  1363. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,362,9,1))),'\43');
  1364. rs-=8;
  1365. rs_pPOS(tag_pos_3,363,19,1);
  1366. rT2append_in(rT37object_id(C),oRBC1tagged_out_memory);
  1367. rs-=8;
  1368. }
  1369. /*FI*/rs_pPOS(tag_pos_3,365,24,1);
  1370. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,365,6,1))),'\133');
  1371. rs-=8;
  1372. rs_pPOS(tag_pos_3,366,6,1);
  1373. rT37fill_tagged_out_memory(C);
  1374. rs-=8;
  1375. rs_pPOS(tag_pos_3,367,24,1);
  1376. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,367,6,1))),'\135');
  1377. rs-=8;
  1378. /*FI*/rs_unlink();
  1379. }
  1380. char trT37object_id[]="object_id of GENERAL";
  1381. int rT37object_id(T37 *C){
  1382. int R=0;
  1383. rs_link(trT37object_id);
  1384. rs_pREF((void **)&C,Current);
  1385. rs_pINT(&R,Result);
  1386. req_last_chance=1;
  1387. if (!af_req){af_req=1;
  1388. af_req=0;}
  1389. rs_pPOS(tag_pos_3,38,3,1);
  1390. R=((int)C);
  1391. rs-=8;
  1392. rs_unlink();
  1393. return R;
  1394. }
  1395. char trT37fill_tagged_out_memory[]="fill_tagged_out_memory of CHARACTER_REF";
  1396. void rT37fill_tagged_out_memory(T37 *C){
  1397. rs_link(trT37fill_tagged_out_memory);
  1398. rs_pREF((void **)&C,Current);
  1399. rs_pPOS(tag_pos_3,66,21,37);
  1400. rT7append(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,66,3,37))),(T0 *)ms16);
  1401. rs-=8;
  1402. rs_pPOS(tag_pos_3,67,8,37);
  1403. rT3fill_tagged_out_memory((C)->_item);
  1404. rs-=8;
  1405. rs_unlink();
  1406. }
  1407. char trT37print_on[]="print_on of GENERAL";
  1408. void rT37print_on(T37 *C,T0* a1){
  1409. rs_link(trT37print_on);
  1410. rs_pREF((void **)&C,Current);
  1411. rs_pREF((void **)&a1,"file");
  1412. rs_pPOS(tag_pos_3,329,21,1);
  1413. rT7clear(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,329,3,1))));
  1414. rs-=8;
  1415. rs_pPOS(tag_pos_3,330,3,1);
  1416. rT37out_in_tagged_out_memory(C);
  1417. rs-=8;
  1418. rs_pPOS(tag_pos_3,331,8,1);
  1419. XrT33put_string(331,3,1,a1,oRBC1tagged_out_memory);
  1420. rs-=8;
  1421. rs_unlink();
  1422. }
  1423. char trT37print[]="print of GENERAL";
  1424. void rT37print(/*C*/T0* a1){
  1425. rs_link(trT37print);
  1426. rs_pREF((void **)&a1,"some");
  1427. /*IF*/if (rs_pPOS(tag_pos_2,319,11,1),rs_pop_int(!(a1))) {
  1428. rs_pPOS(tag_pos_3,320,17,1);
  1429. rT32put_string(((T32 *)ci(32,oRBC1std_output,320,6,1)),(T0 *)ms5);
  1430. rs-=8;
  1431. }
  1432. else {
  1433. rs_pPOS(tag_pos_3,322,11,1);
  1434. XrT1print_on(322,6,1,a1,oRBC1std_output);
  1435. rs-=8;
  1436. }
  1437. /*FI*/rs_unlink();
  1438. }
  1439. char trT3fill_tagged_out_memory[]="fill_tagged_out_memory of CHARACTER";
  1440. void rT3fill_tagged_out_memory(T3 C){
  1441. rs_link(trT3fill_tagged_out_memory);
  1442. rs_pCHA(&C,Current);
  1443. rs_pPOS(tag_pos_3,150,21,3);
  1444. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,150,3,3))),'\47');
  1445. rs-=8;
  1446. rs_pPOS(tag_pos_3,151,21,3);
  1447. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,151,3,3))),C);
  1448. rs-=8;
  1449. rs_pPOS(tag_pos_3,152,21,3);
  1450. rT7extend(ivT7(((T7 *)ci(7,oRBC1tagged_out_memory,152,3,3))),'\47');
  1451. rs-=8;
  1452. rs_unlink();
  1453. }
  1454. char trT3is_digit[]="is_digit of CHARACTER";
  1455. int rT3is_digit(T3 C){
  1456. int R=0;
  1457. rs_link(trT3is_digit);
  1458. rs_pCHA(&C,Current);
  1459. rs_pBOO(&R,Result);
  1460. {int iv1=C;
  1461. if ((48<=iv1)&&(iv1<=57)) goto l2;
  1462. goto l3;
  1463.  l2: ;
  1464. R=1;
  1465. goto l1;
  1466.  l3: ;
  1467.  l1: ;
  1468. }
  1469. if (!af_ens){af_ens=1;
  1470. rs_pPOS(tag_pos_4,132,9,3);
  1471. ac_ens((!(R))||(rT6_ix97110100(rT3_ix6061('0',C),rT3_ix6061(C,'9'))));
  1472. af_ens=0;}
  1473. rs_unlink();
  1474. return R;
  1475. }
  1476. char trT3is_equal[]="is_equal of COMPARABLE";
  1477. int rT3is_equal(T3 C,char a1){
  1478. int R=0;
  1479. rs_link(trT3is_equal);
  1480. rs_pCHA(&C,Current);
  1481. rs_pCHA(&a1,"other");
  1482. rs_pBOO(&R,Result);
  1483. req_last_chance=1;
  1484. if (!af_req){af_req=1;
  1485. af_req=0;}
  1486. /*IF*/if (rs_pPOS(tag_pos_2,59,14,30),rs_pop_int(rT3_ix60(C,a1))) {
  1487. }
  1488.  else if (rs_pPOS(tag_pos_2,60,16,30),rs_pop_int(rT3_ix60(a1,C))) {
  1489. }
  1490. else {
  1491. R=1;
  1492. }
  1493. /*FI*/if (!af_ens){af_ens=1;
  1494. rs_pPOS(tag_pos_4,65,22,30);
  1495. ac_ens((R)==(rT6_ix97110100(rT6_px110111116(rT3_ix60(C,a1)),rT6_px110111116(rT3_ix60(a1,C)))));
  1496. rs_pPOS(tag_pos_4,121,40,1);
  1497. ac_ens((!(rT3standard_is_equal(C,a1)))||(R));
  1498. rs_pPOS(tag_pos_4,124,21,1);
  1499. ac_ens((!(R))||(rT3is_equal(a1,C)));
  1500. af_ens=0;}
  1501. rs_unlink();
  1502. return R;
  1503. }
  1504. char trT3_ix6061[]="infix <= of CHARACTER";
  1505. int rT3_ix6061(T3 C,char a1){
  1506. int R=0;
  1507. rs_link(trT3_ix6061);
  1508. rs_pCHA(&C,Current);
  1509. rs_pCHA(&a1,"other");
  1510. rs_pBOO(&R,Result);
  1511. req_last_chance=1;
  1512. if (!af_req){af_req=1;
  1513. af_req=0;}
  1514. rs_pPOS(tag_pos_1,31,3,3);
  1515. R=(((unsigned char)C))<=(((unsigned char)a1));
  1516. rs-=8;
  1517. if (!af_ens){af_ens=1;
  1518. rs_pPOS(tag_pos_4,34,42,30);
  1519. ac_ens(rT6_ix111114((R)==(rT3_ix60(C,a1)),rT3is_equal(C,a1)));
  1520. af_ens=0;}
  1521. rs_unlink();
  1522. return R;
  1523. }
  1524. char trT3standard_is_equal[]="standard_is_equal of GENERAL";
  1525. int rT3standard_is_equal(T3 C,char a1){
  1526. int R=0;
  1527. rs_link(trT3standard_is_equal);
  1528. rs_pCHA(&C,Current);
  1529. rs_pCHA(&a1,"other");
  1530. rs_pBOO(&R,Result);
  1531. req_last_chance=1;
  1532. if (!af_req){af_req=1;
  1533. af_req=0;}
  1534. /*IF*/{/*AT*/rs_pPOS(tag_pos_1,151,6,1);
  1535. R=(a1)==(C);
  1536. rs-=8;
  1537. }
  1538. /*FI*/if (!af_ens){af_ens=1;
  1539. rs_pPOS(tag_pos_4,160,21,1);
  1540. ac_ens((!(R))||(rT3standard_is_equal(a1,C)));
  1541. af_ens=0;}
  1542. rs_unlink();
  1543. return R;
  1544. }
  1545. char trT3_ix60[]="infix < of CHARACTER";
  1546. int rT3_ix60(T3 C,char a1){
  1547. int R=0;
  1548. rs_link(trT3_ix60);
  1549. rs_pCHA(&C,Current);
  1550. rs_pCHA(&a1,"other");
  1551. rs_pBOO(&R,Result);
  1552. req_last_chance=1;
  1553. if (!af_req){af_req=1;
  1554. af_req=0;}
  1555. rs_pPOS(tag_pos_1,25,3,3);
  1556. R=(((unsigned char)C))<(((unsigned char)a1));
  1557. rs-=8;
  1558. if (!af_ens){af_ens=1;
  1559. rs_pPOS(tag_pos_4,24,22,30);
  1560. ac_ens((!(R))||(rT6_px110111116(rT3_ix60(a1,C))));
  1561. af_ens=0;}
  1562. rs_unlink();
  1563. return R;
  1564. }
  1565. char trT3value[]="value of CHARACTER";
  1566. int rT3value(T3 C){
  1567. int R=0;
  1568. rs_link(trT3value);
  1569. rs_pCHA(&C,Current);
  1570. rs_pINT(&R,Result);
  1571. req_last_chance=1;
  1572. if (!af_req){af_req=1;
  1573. rs_pPOS(tag_pos_4,58,3,3);
  1574. ac_req(rT3is_digit(C));
  1575. af_req=0;}
  1576. rs_pPOS(tag_pos_1,60,3,3);
  1577. R=(((unsigned char)C))-(48);
  1578. rs-=8;
  1579. if (!af_ens){af_ens=1;
  1580. rs_pPOS(tag_pos_4,62,15,3);
  1581. ac_ens(rT6_ix97110100((0)<=(R),(R)<=(9)));
  1582. rs_pPOS(tag_pos_4,63,22,3);
  1583. ac_ens((R)==((((unsigned char)C))-(48)));
  1584. af_ens=0;}
  1585. rs_unlink();
  1586. return R;
  1587. }
  1588. void ANYprint(void *C,void *a1){
  1589. XrT27print(0,0,0,C,a1);
  1590. }
  1591. int se_argc;
  1592. char **se_argv;
  1593. void main(int argc,char *argv[]){
  1594. se_sz_initialize();{
  1595. T26 *n=((T26*)se_new(26));
  1596. se_argc=argc;
  1597. se_argv=argv;
  1598. signal(SIGINT,sigrsp);
  1599. signal(SIGQUIT,sigrsp);
  1600. signal(SIGKILL,sigrsp);
  1601. se_manifest_strings();
  1602. #define rs_init_size 16384
  1603. rs=rs_bot=(void **)malloc(rs_init_size*sizeof(void **));
  1604. rs_top=rs_bot+rs_init_size-1;
  1605. rs_lb=NULL;
  1606. {T0* R;
  1607. rs_pPOS(tag_pos_5,373,3,1);
  1608. {T7 *n=((T7*)se_new(7));
  1609. rT7make(n,1024);
  1610. R=(T0 *)n;}
  1611. ivT7((T7*)R);rs-=8;
  1612. oRBC1tagged_out_memory=R;}/*PCO*/
  1613. {T0* R;
  1614. rs_pPOS(tag_pos_5,300,3,1);
  1615. {T32 *n=((T32*)se_new(32));
  1616. rT32make(n);
  1617. R=(T0 *)n;}
  1618. rs-=8;
  1619. oRBC1std_output=R;}/*PCO*/
  1620. {T0* R;
  1621. rs_pPOS(tag_pos_5,306,3,1);
  1622. {T38 *n=((T38*)se_new(38));
  1623. rT38make(n);
  1624. R=(T0 *)n;}
  1625. rs-=8;
  1626. oRBC1std_error=R;}/*PCO*/
  1627. rT26make();
  1628. if (rs != rs_bot){
  1629. printf("\n***Internal SmallEiffel Stack Error.\n");
  1630. rsp();}
  1631. exit(0);}}
  1632. Tstring *ms19;
  1633. Tstring *ms18;
  1634. Tstring *ms17;
  1635. Tstring *ms16;
  1636. Tstring *ms15;
  1637. Tstring *ms14;
  1638. Tstring *ms13;
  1639. Tstring *ms12;
  1640. Tstring *ms11;
  1641. Tstring *ms10;
  1642. Tstring *ms5;
  1643. Tstring *ms1;
  1644. void se_manifest_strings(void){
  1645. ms19=e2s("storage: \"");
  1646. ms18=e2s("capacity: ");
  1647. ms17=e2s("count: ");
  1648. ms16=e2s("item: ");
  1649. ms15=e2s("false");
  1650. ms14=e2s("true");
  1651. ms13=e2s("item: ");
  1652. ms12=e2s("0123456789");
  1653. ms11=e2s("R=!memcmp(C,a1,s[C->id]);");
  1654. ms10=e2s("0123456789");
  1655. ms5=e2s("Void");
  1656. ms1=e2s("Error while writing character.");
  1657. }
  1658. char *s2e(Tstring *s){
  1659. char *e=(char*)malloc((s->_count)+1);
  1660. memcpy(e,s->_storage,s->_count);
  1661. e[s->_count]='\0';
  1662. return e;
  1663. }
  1664. Tstring *e2s(char *e){
  1665. Tstring *s=(Tstring*)se_new(7);
  1666. if (e!=NULL) {
  1667. s->_capacity=strlen(e)+1;
  1668. s->_count=(s->_capacity)-1;
  1669. s->_storage=(char *)malloc(sizeof(char)*s->_capacity);
  1670. strcpy(s->_storage,e);}
  1671. return s;
  1672. }
  1673. void rsp(void){
  1674. AF_1;
  1675. printf("Eiffel program crash at run time.\n");
  1676. printf("Final Run Stack :\n");
  1677. {void **sp=(rs_bot-1);
  1678. while (1) {
  1679. sp++;
  1680. if (sp >= rs) break;
  1681. if (sp > rs_top) break;
  1682. switch ((int)*sp++){
  1683. case linkId: continue;
  1684. case featureTagId:{
  1685. printf("==============================================================\n");
  1686. printf("------ %s\n",(char *)*sp);
  1687. continue;}
  1688. case nameId:{
  1689. printf("%s = ",(char *)*sp);
  1690. continue;}
  1691. case pointerId:{
  1692. printf("External POINTER `%p'.\n",**(void ***)sp);
  1693. continue;}
  1694. case referenceId:{void *o=(**(T0 ***)sp);
  1695. if (o) {ANYprint(o,o); printf("\n");}
  1696. else printf("Void\n");continue;}
  1697. case expandedId:{
  1698. printf("expanded object\n");continue;}
  1699. case integerId:{
  1700. printf("%d\n",**(int **)sp);continue;}
  1701. case characterId:{
  1702. printf("'%c'\n",**(char **)sp);continue;}
  1703. case booleanId:{
  1704. if (**(int **)sp) printf("true\n");
  1705. else printf("false\n");continue;}
  1706. case realId:{
  1707. printf("%f\n",(double)**(float **)sp);
  1708. continue;}
  1709. case doubleId:{
  1710. printf("%f\n",**(double **)sp);continue;}
  1711. case lineId:{
  1712. printf("line %d ",*(int *)sp);
  1713. continue;}
  1714. case columnId:{
  1715. printf("column %d ",*(int *)sp);
  1716. continue;}
  1717. case pathId:{
  1718. printf("file %s ",p[*(int *)sp]);
  1719. continue;}
  1720. case doingWhatId:{
  1721. printf("(%s)\n",*(char **)sp);continue;}
  1722. case doingInvariantId:{
  1723. printf("Class Invariant of %s\n",*(char **)sp);
  1724. continue;}
  1725. default:{
  1726. printf("Stack Damaged ... Sorry.\n");
  1727. exit(1);}}}
  1728. printf("===================== End of Run Stack ==========================\n\n");AF_0;}
  1729. }
  1730. void error0(char *m){
  1731. rsp();
  1732. printf("*** Error at Run Time *** : %s\n",m);
  1733. exit(1);
  1734. }
  1735. void error1(char *m,int l,int c,int f){
  1736. rsp();
  1737. printf("Line : %d column %d in %s.\n",l,c,p[f]);
  1738. printf("*** Error at Run Time *** : %s\n",m);
  1739. exit(1);
  1740. }
  1741. void error2(T0 *o,int l,int c,int f){
  1742. printf("Target Type %s not legal.\n",s2e(gt[o->id]));
  1743. error1("Bad target.",l,c,f);
  1744. }
  1745. T0 *vc(void *o,int l,int c,int f){
  1746. if (!o) error1("Call with a Void target.",l,c,f);
  1747. return o;
  1748. }
  1749. T0 *ci(int id,void *o,int l,int c,int f){
  1750. if (id == (vc(o,l,c,f)->id)) return o;
  1751. rsp();
  1752. printf("Line : %d column %d in %s.\n",l,c,p[f]);
  1753. printf("*** Error at Run Time *** : ");
  1754. printf("Target is not valid (not the good type).\n");
  1755. printf("Expected :%s, Actual :%s.\n",
  1756. s2e(gt[id]),s2e(gt[((T0 *)o)->id]));
  1757. exit(1);
  1758. }
  1759. void evobt(void *o,int l,int c,int f){
  1760. if (!o) error1("Target is Void.",l,c,f);
  1761. else error2(o,l,c,f);
  1762. }
  1763. void sigrsp(int sig){
  1764. printf("Received signal %d (man signal).\n",sig);
  1765. rsp();
  1766. exit(1);
  1767. }
  1768. void  XrT1print_on(int l,int c,int f, void *C,T0* a1){
  1769. int id=vc(C,l,c,f)->id;
  1770. if (id <= 32) {
  1771. if (id <= 26) {
  1772. if (id <= 7) {
  1773. rT7print_on(ivT7((T7 *)C),a1);
  1774. } else {
  1775. rT26print_on((T26 *)C,a1);
  1776. }} else {
  1777. if (id <= 31) {
  1778. rT31print_on((T31 *)C,a1);
  1779. } else {
  1780. rT32print_on((T32 *)C,a1);
  1781. }}} else {
  1782. if (id <= 36) {
  1783. if (id <= 35) {
  1784. rT35print_on((T35 *)C,a1);
  1785. } else {
  1786. rT36print_on((T36 *)C,a1);
  1787. }} else {
  1788. if (id <= 37) {
  1789. rT37print_on((T37 *)C,a1);
  1790. } else {
  1791. rT38print_on((T38 *)C,a1);
  1792. }}}}
  1793. void  XrT27print(int l,int c,int f, void *C,T0* a1){
  1794. int id=vc(C,l,c,f)->id;
  1795. if (id <= 32) {
  1796. if (id <= 26) {
  1797. if (id <= 7) {
  1798. rT7print(a1);
  1799. } else {
  1800. rT26print(a1);
  1801. }} else {
  1802. if (id <= 31) {
  1803. rT31print(a1);
  1804. } else {
  1805. rT32print(a1);
  1806. }}} else {
  1807. if (id <= 36) {
  1808. if (id <= 35) {
  1809. rT35print(a1);
  1810. } else {
  1811. rT36print(a1);
  1812. }} else {
  1813. if (id <= 37) {
  1814. rT37print(a1);
  1815. } else {
  1816. rT38print(a1);
  1817. }}}}
  1818. void  XrT33put_string(int l,int c,int f, void *C,T0* a1){
  1819. int id=vc(C,l,c,f)->id;
  1820. if (id <= 32) {
  1821. rT32put_string((T32 *)C,a1);
  1822. } else {
  1823. rT38put_string((T38 *)C,a1);
  1824. }}
  1825. size_t s[39];
  1826. Tstring * gt[39];
  1827. Tstring * g[39];
  1828. char * p[39];
  1829. void se_sz_initialize(void){
  1830. s[35]=sizeof(T35);
  1831. s[8]=sizeof(T8);
  1832. s[26]=sizeof(T26);
  1833. s[38]=sizeof(T38);
  1834. s[7]=sizeof(T7);
  1835. s[36]=sizeof(T36);
  1836. s[6]=sizeof(T6);
  1837. s[2]=sizeof(T2);
  1838. s[31]=sizeof(T31);
  1839. s[32]=sizeof(T32);
  1840. s[37]=sizeof(T37);
  1841. s[3]=sizeof(T3);
  1842. p[0]="???";
  1843. p[29]="/u/genielog/colnet/SmallEiffel/lib_std/numeric.e";
  1844. p[27]="/u/genielog/colnet/SmallEiffel/lib_std/any.e";
  1845. p[35]="/u/genielog/colnet/SmallEiffel/lib_std/pointer_ref.e";
  1846. p[8]="/u/genielog/colnet/SmallEiffel/lib_std/pointer.e";
  1847. p[26]="bad_generic2.e";
  1848. p[38]="/u/genielog/colnet/SmallEiffel/lib_std/std_error.e";
  1849. p[7]="/u/genielog/colnet/SmallEiffel/lib_std/string.e";
  1850. p[34]="/u/genielog/colnet/SmallEiffel/lib_std/std_file.e";
  1851. p[33]="/u/genielog/colnet/SmallEiffel/lib_std/std_file_write.e";
  1852. p[30]="/u/genielog/colnet/SmallEiffel/lib_std/comparable.e";
  1853. p[36]="/u/genielog/colnet/SmallEiffel/lib_std/boolean_ref.e";
  1854. p[6]="/u/genielog/colnet/SmallEiffel/lib_std/boolean.e";
  1855. p[1]="/u/genielog/colnet/SmallEiffel/lib_std/general.e";
  1856. p[2]="/u/genielog/colnet/SmallEiffel/lib_std/integer.e";
  1857. p[28]="/u/genielog/colnet/SmallEiffel/lib_std/integer_ref.e";
  1858. p[32]="/u/genielog/colnet/SmallEiffel/lib_std/std_output.e";
  1859. p[37]="/u/genielog/colnet/SmallEiffel/lib_std/character_ref.e";
  1860. p[3]="/u/genielog/colnet/SmallEiffel/lib_std/character.e";
  1861. p[31]=p[28];
  1862. g[29]=e2s("NUMERIC");
  1863. g[27]=e2s("ANY");
  1864. g[35]=e2s("POINTER_REF");
  1865. g[8]=e2s("POINTER");
  1866. g[26]=e2s("BAD_GENERIC2");
  1867. g[38]=e2s("STD_ERROR");
  1868. g[7]=e2s("STRING");
  1869. g[34]=e2s("STD_FILE");
  1870. g[33]=e2s("STD_FILE_WRITE");
  1871. g[30]=e2s("COMPARABLE");
  1872. g[36]=e2s("BOOLEAN_REF");
  1873. g[6]=e2s("BOOLEAN");
  1874. g[1]=e2s("GENERAL");
  1875. g[2]=e2s("INTEGER");
  1876. g[28]=e2s("INTEGER_REF");
  1877. g[32]=e2s("STD_OUTPUT");
  1878. g[37]=e2s("CHARACTER_REF");
  1879. g[3]=e2s("CHARACTER");
  1880. g[31]=g[28];
  1881. gt[35]=g[35];
  1882. gt[8]=g[8];
  1883. gt[26]=g[26];
  1884. gt[38]=g[38];
  1885. gt[7]=g[7];
  1886. gt[36]=g[36];
  1887. gt[6]=g[6];
  1888. gt[2]=g[2];
  1889. gt[31]=e2s("INTEGER_REF[STRING]");
  1890. gt[32]=g[32];
  1891. gt[37]=g[37];
  1892. gt[3]=g[3];
  1893. }
  1894.