home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / lib_show / directory / example011.c < prev    next >
C/C++ Source or Header  |  1999-06-05  |  79KB  |  3,485 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.78Beta#1)--
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                  http://SmallEiffel.loria.fr/                --
  7. */
  8. #include "example01.h"
  9.  
  10.  
  11. void se_prinT2135(T2135*o){
  12. fprintf(SE_ERR,"NATIVE_ARRAY[STRING]");
  13. fprintf(SE_ERR,"#%p",*o);
  14. }
  15. T660 M660={660,NULL,0};
  16.  
  17.  
  18. void se_prinT660(T660**o){
  19. if(*o==NULL){
  20. fprintf(SE_ERR,"Void");
  21. return;
  22. }
  23. fprintf(SE_ERR,"DIRECTORY");
  24. fprintf(SE_ERR,"#%p",*o);
  25. fprintf(SE_ERR,"\n\t[ ");
  26. fprintf(SE_ERR,"basic_directory = ");
  27. se_prinT0((void*)(&((*o)->_basic_directory)));
  28. fprintf(SE_ERR,"\n\t  ");
  29. fprintf(SE_ERR,"is_connected = ");
  30. se_prinT6((void*)(&((*o)->_is_connected)));
  31. fprintf(SE_ERR,"\n\t]");
  32. }
  33. T474 M474={474,0};
  34.  
  35.  
  36. void se_prinT474(T474**o){
  37. if(*o==NULL){
  38. fprintf(SE_ERR,"Void");
  39. return;
  40. }
  41. fprintf(SE_ERR,"BOOLEAN_REF");
  42. fprintf(SE_ERR,"#%p",*o);
  43. fprintf(SE_ERR,"\n\t[ ");
  44. fprintf(SE_ERR,"item = ");
  45. se_prinT6((void*)(&((*o)->_item)));
  46. fprintf(SE_ERR,"\n\t]");
  47. }
  48. T1405 M1405={1405,NULL,NULL};
  49.  
  50.  
  51. void se_prinT1405(T1405**o){
  52. if(*o==NULL){
  53. fprintf(SE_ERR,"Void");
  54. return;
  55. }
  56. fprintf(SE_ERR,"BASIC_DIRECTORY");
  57. fprintf(SE_ERR,"#%p",*o);
  58. fprintf(SE_ERR,"\n\t[ ");
  59. fprintf(SE_ERR,"path = ");
  60. se_prinT7((void*)(&((*o)->_path)));
  61. fprintf(SE_ERR,"\n\t  ");
  62. fprintf(SE_ERR,"name_list = ");
  63. se_prinT0((void*)(&((*o)->_name_list)));
  64. fprintf(SE_ERR,"\n\t]");
  65. }
  66. T701 M701={701};
  67.  
  68.  
  69. void se_prinT701(T701**o){
  70. if(*o==NULL){
  71. fprintf(SE_ERR,"Void");
  72. return;
  73. }
  74. fprintf(SE_ERR,"EXAMPLE01");
  75. fprintf(SE_ERR,"#%p",*o);
  76. }
  77. T1886 M1886={1886,NULL,0,0};
  78.  
  79.  
  80. void se_prinT1886(T1886**o){
  81. if(*o==NULL){
  82. fprintf(SE_ERR,"Void");
  83. return;
  84. }
  85. fprintf(SE_ERR,"FIXED_ARRAY[STRING]");
  86. fprintf(SE_ERR,"#%p",*o);
  87. fprintf(SE_ERR,"\n\t[ ");
  88. fprintf(SE_ERR,"storage = ");
  89. se_prinT2135((void*)(&((*o)->_storage)));
  90. fprintf(SE_ERR,"\n\t  ");
  91. fprintf(SE_ERR,"capacity = ");
  92. se_prinT2((void*)(&((*o)->_capacity)));
  93. fprintf(SE_ERR,"\n\t  ");
  94. fprintf(SE_ERR,"upper = ");
  95. se_prinT2((void*)(&((*o)->_upper)));
  96. fprintf(SE_ERR,"\n\t]");
  97. }
  98.  
  99.  
  100. void se_prinT9(T9*o){
  101. fprintf(SE_ERR,"NATIVE_ARRAY[CHARACTER]");
  102. fprintf(SE_ERR,"#%p",*o);
  103. }
  104. T7 M7={7,NULL,0,0};
  105. T878 M878={878};
  106.  
  107.  
  108. void se_prinT878(T878**o){
  109. if(*o==NULL){
  110. fprintf(SE_ERR,"Void");
  111. return;
  112. }
  113. fprintf(SE_ERR,"STD_OUTPUT");
  114. fprintf(SE_ERR,"#%p",*o);
  115. }
  116. T2074 M2074={2074};
  117.  
  118.  
  119. void se_prinT2074(T2074**o){
  120. if(*o==NULL){
  121. fprintf(SE_ERR,"Void");
  122. return;
  123. }
  124. fprintf(SE_ERR,"STD_INPUT_OUTPUT");
  125. fprintf(SE_ERR,"#%p",*o);
  126. }
  127. T714 M714={714,0};
  128.  
  129.  
  130. void se_prinT714(T714**o){
  131. if(*o==NULL){
  132. fprintf(SE_ERR,"Void");
  133. return;
  134. }
  135. fprintf(SE_ERR,"CHARACTER_REF");
  136. fprintf(SE_ERR,"#%p",*o);
  137. fprintf(SE_ERR,"\n\t[ ");
  138. fprintf(SE_ERR,"item = ");
  139. se_prinT3((void*)(&((*o)->_item)));
  140. fprintf(SE_ERR,"\n\t]");
  141. }
  142. T528 M528={528,0};
  143.  
  144.  
  145. void se_prinT528(T528**o){
  146. if(*o==NULL){
  147. fprintf(SE_ERR,"Void");
  148. return;
  149. }
  150. fprintf(SE_ERR,"INTEGER_REF");
  151. fprintf(SE_ERR,"#%p",*o);
  152. fprintf(SE_ERR,"\n\t[ ");
  153. fprintf(SE_ERR,"item = ");
  154. se_prinT2((void*)(&((*o)->_item)));
  155. fprintf(SE_ERR,"\n\t]");
  156. }
  157.  
  158.  
  159. T7*se_ms(int c,char*e){
  160. T7*s=malloc(sizeof(gc7));
  161. ((gc7*)s)->header.flag=FSOH_MARKED;
  162. s->id=7;
  163. s->_count=c;
  164. s->_capacity=c+1;
  165. s->_storage=new9(c+2);
  166. memcpy(s->_storage,e,c);
  167. return s;}
  168.  
  169.  
  170. T7*e2s(char*e){
  171. return se_ms(strlen(e),e);}
  172.  
  173.  
  174. char*s2e(T7*s){
  175. char*e=malloc(1+s->_count);
  176. memcpy(e,s->_storage,s->_count);
  177. e[s->_count]='\0';
  178. return e;}
  179. /*
  180. -- This file is  free  software, which  comes  along  with  SmallEiffel. This
  181. -- software  is  distributed  in the hope that it will be useful, but WITHOUT 
  182. -- ANY  WARRANTY;  without  even  the  implied warranty of MERCHANTABILITY or
  183. -- FITNESS  FOR A PARTICULAR PURPOSE. You can modify it as you want, provided
  184. -- this header is kept unaltered, and a notification of the changes is added.
  185. -- You  are  allowed  to  redistribute  it and sell it, alone or as a part of 
  186. -- another product.
  187. --          Copyright (C) 1994-98 LORIA - UHP - CRIN - INRIA - FRANCE
  188. --            Dominique COLNET and Suzanne COLLIN - colnet@loria.fr 
  189. --                       http://www.loria.fr/SmallEiffel
  190. --
  191. */
  192.  
  193. /*
  194.   This file (no_check.c) is automatically included when `run_control.no_check'
  195.   is true (ie. all modes ecxept -boost).
  196. */
  197.  
  198. /*
  199.   The upper most context (SmallEiffel Dump stack Top) :
  200. */
  201. se_dump_stack* se_dst=NULL;
  202.  
  203. void se_print_run_time_stack(void) {
  204.   /* GENERAL.print_run_time_stack */
  205.   se_dump_stack* ds = NULL;
  206.   se_dump_stack* ds2;
  207.   int frame_count = 1;
  208.  
  209.   ds = se_dst;
  210.   if (ds == NULL) {
  211.     fprintf(SE_ERR,"Empty stack.\n");
  212.     return ;
  213.   }
  214.   else {
  215.     while (ds->caller != NULL) {
  216.       ds = ds->caller;
  217.       frame_count++;
  218.     }
  219.   }
  220.   fprintf(SE_ERR,"%d frames in current stack.\n",frame_count);
  221.   fprintf(SE_ERR,"=====  Bottom of run-time stack  =====\n");
  222.   while (ds != NULL) {
  223.     if (ds->fd != NULL) {
  224.       se_print_one_frame(ds);
  225.     }
  226.     else {
  227.       fprintf(SE_ERR,"External CECIL call.\n");
  228.     }
  229.     /* Next frame : */
  230.     if (ds == se_dst) {
  231.       ds = NULL;
  232.     }
  233.     else {
  234.       ds2 = se_dst;
  235.       while (ds2->caller != ds) {
  236.     ds2 = ds2->caller;
  237.       }
  238.       ds = ds2;
  239.     }
  240.     if (--frame_count) {
  241.       fprintf(SE_ERR,"======================================\n");
  242.     }
  243.   }
  244.   fprintf(SE_ERR,"=====   Top of run-time stack    =====\n");
  245. }
  246.  
  247. void se_print_one_frame(se_dump_stack* ds) {
  248.   se_frame_descriptor* fd = ds->fd;
  249.   int i = 0;
  250.   int local_count = 0;
  251.   char* local_format = fd->local_format;
  252.   int expanded;
  253.   int id;
  254.   void** var;
  255.   fprintf(SE_ERR,"%s\n",fd->name);
  256.   if (fd->use_current) {
  257.     fprintf(SE_ERR,"Current = ");
  258.     i = 2;
  259.     id = 0;
  260.     while (local_format[i] != '%') {
  261.       id = (id * 10) + (local_format[i] - '0');
  262.       i++;
  263.     }
  264.     i++;
  265.     (se_prinT[id])(ds->current);
  266.     fprintf(SE_ERR,"\n");
  267.   }
  268.   while (local_count < fd->local_count) {
  269.     while (local_format[i] != '%') {
  270.       fprintf(SE_ERR,"%c",local_format[i]);
  271.       i++;
  272.     }
  273.     i++;
  274.     expanded = ((local_format[i++] == 'E')?1:0);
  275.     fprintf(SE_ERR," = ");
  276.     id = 0;
  277.     while (local_format[i] != '%') {
  278.       id = (id * 10) + (local_format[i] - '0');
  279.       i++;
  280.     }
  281.     i++;
  282.     var = (ds->locals)[local_count];
  283.     if (expanded) {
  284.       (se_prinT[id])((void**)(var));
  285.     }
  286.     else if (*var == NULL) {
  287.       fprintf(SE_ERR,"Void");
  288.     }
  289.     else {
  290.       (se_prinT[((T0*)(*var))->id])((void**)(var));
  291.     }
  292.     fprintf(SE_ERR,"\n");
  293.     local_count++;
  294.   }
  295.   fprintf(SE_ERR,"line %d ",ds->l);
  296.   fflush(SE_ERR);
  297.   fprintf(SE_ERR,"column %d ",ds->c);
  298.   fflush(SE_ERR);
  299.   fprintf(SE_ERR,"file %s \n",p[ds->f]);
  300.   fflush(SE_ERR);
  301. }
  302.  
  303. void se_core_dump(char*msg) {
  304.   if (msg != NULL) {
  305.     fprintf(SE_ERR,"%s\n",msg);
  306.   }
  307. #ifdef SE_EXCEPTIONS
  308.   print_exception();
  309. #endif
  310.   se_print_run_time_stack();
  311.   exit(1);
  312. }
  313.  
  314. int se_require_uppermost_flag;
  315.  
  316. /*
  317.   Require Last Result :
  318. */
  319. int se_require_last_result;
  320.  
  321. int se_rci(void*C) {
  322.   /* Return 1 if class invariant must be checked for Current 
  323.      before leaving the routine.
  324.   */
  325.   se_dump_stack*ds = se_dst;
  326.   ds = ds->caller;
  327.   if (ds != NULL) {
  328.     se_frame_descriptor* fd = ds->fd;
  329.     if (fd == NULL) {
  330.       /* As for example when coming via CECIL. */
  331.       return 0;
  332.     }
  333.     else {
  334.       if (fd->use_current) {
  335.     if (fd->local_format[1] == 'R') {
  336.       if (((void*)*(ds->current)) == C) {
  337.         return 0;
  338.       }
  339.     }
  340.       }
  341.     }
  342.   }
  343.   return 1;
  344. }
  345.  
  346. void error0(char*m) {
  347.   static char*f1="*** Error at Run Time *** : %s\n";
  348.   fprintf(SE_ERR,f1,m);
  349. #ifdef SE_EXCEPTIONS
  350.   print_exception();
  351. #endif
  352.   se_print_run_time_stack();
  353.   fprintf(SE_ERR,f1,m);
  354.   exit(1);
  355. }
  356.  
  357. void error1(char*m,int l,int c,int f) {
  358.   char*f1="Line : %d column %d in %s.\n";
  359.   char*f2="*** Error at Run Time *** : %s\n";
  360.   fprintf(SE_ERR,f1,l,c,p[f]);
  361.   fprintf(SE_ERR,f2,m);
  362. #ifdef SE_EXCEPTIONS
  363.   print_exception();
  364. #endif
  365.   se_print_run_time_stack();
  366.   fprintf(SE_ERR,f1,l,c,p[f]);
  367.   fprintf(SE_ERR,f2,m);
  368.   exit(1);
  369. }
  370.  
  371. void error2(T0*o,int l,int c,int f) {
  372.   char*f1="Target Type %s not legal.\n";
  373.   fprintf(SE_ERR,f1,s2e(t[o->id]));
  374.   error1("Bad target.",l,c,f);
  375. }
  376.  
  377. T0* vc(void*o,int l,int c,int f) {
  378.   /* VoidCheck for reference target.*/
  379.   if (o != NULL) {
  380.     return o;
  381.   }
  382.   else {
  383. #ifdef SE_EXCEPTIONS
  384.     internal_exception_handler(Void_call_target);
  385. #else
  386.     error1("Call with a Void target.",l,c,f);
  387. #endif
  388.     return NULL;
  389.   }
  390. }
  391.  
  392. T0* ci(int id,void*o,int l,int c,int f) {
  393.   /* Check Id for reference target. */
  394.   vc(o,l,c,f);
  395.   if (id == (((T0*)o)->id)) {
  396.     return o;
  397.   }
  398.   else {
  399. #ifdef SE_EXCEPTIONS
  400.     internal_exception_handler(Routine_failure);
  401. #else
  402.     fprintf(SE_ERR,"Line : %d column %d in %s.\n",l,c,p[f]);
  403.     fprintf(SE_ERR,"*** Error at Run Time *** : ");
  404.     fprintf(SE_ERR,"Target is not valid (not the good type).\n");
  405.     fprintf(SE_ERR,"Expected: %s, Actual: %s.\n",
  406.         s2e(t[id]),s2e(t[((T0*)o)->id]));
  407.     se_print_run_time_stack();
  408.     exit(1);
  409. #endif
  410.   }
  411. }
  412.  
  413. void ac_req(int v) {
  414.   if (!v && se_require_uppermost_flag) {
  415. #ifdef SE_EXCEPTIONS
  416.     internal_exception_handler(Precondition);
  417. #else
  418.     error0("Require Assertion Violated.");
  419. #endif
  420.   }
  421.   se_require_last_result=se_require_last_result&&v;
  422. }
  423.  
  424. void ac_ens(int v) {
  425.   if (!v) {
  426. #ifdef SE_EXCEPTIONS
  427.     internal_exception_handler(Postcondition);
  428. #else
  429.     error0("Ensure Assertion Violated.");
  430. #endif
  431.   }
  432. }
  433.  
  434. void ac_inv(int v) {
  435.   if (!v) {
  436. #ifdef SE_EXCEPTIONS
  437.     internal_exception_handler(Class_invariant);
  438. #else
  439.     error0("Class Invariant Violation.");
  440. #endif
  441.   }
  442. }
  443.  
  444. void ac_liv(int v) {
  445.   /* Assertion Check : Loop Invariant check. */
  446.   if (!v) {
  447. #ifdef SE_EXCEPTIONS
  448.     internal_exception_handler(Loop_invariant);
  449. #else
  450.     error0("Loop Invariant Violation.");
  451. #endif
  452.   }
  453. }
  454.  
  455. int ac_lvc(int lc,int lv1,int lv2) {
  456.   /* Assertion Check : Loop Variant check. */
  457.   if (lc == 0) {
  458.     if (lv2 < 0) {
  459. #ifdef SE_EXCEPTIONS
  460.       internal_exception_handler(Loop_variant);
  461. #else
  462.       se_print_run_time_stack();
  463.       fprintf(SE_ERR,"Bad First Variant Value = %d\n",lv2);
  464.       exit(1);
  465. #endif
  466.     }
  467.     else {
  468.       return lv2;
  469.     }
  470.   }
  471.   else if ((lv2 < 0) || (lv2 >= lv1)) {
  472. #ifdef SE_EXCEPTIONS
  473.     internal_exception_handler(Loop_variant);
  474. #else
  475.     se_print_run_time_stack();
  476.     fprintf(SE_ERR,"Loop Body Count = %d (done)\n",lc);
  477.     fprintf(SE_ERR,"New Variant = %d\n",lv2);
  478.     fprintf(SE_ERR,"Previous Variant = %d\n",lv1);
  479.     exit(1);
  480. #endif
  481.   }
  482.   else {
  483.     return lv2;
  484.   }
  485. }
  486.  
  487. void ac_civ(int v) {
  488.   if (!v) {
  489. #ifdef SE_EXCEPTIONS
  490.     internal_exception_handler(Check_instruction);
  491. #else
  492.     error0("Check Assertion Violated.");
  493. #endif
  494.   }
  495. }
  496.  
  497. void se_evobt(void*o,int l,int c,int f) {
  498.   /* Error Void Or Bad Type. */
  499.   if (!o) {
  500. #ifdef SE_EXCEPTIONS
  501.     internal_exception_handler(Void_call_target);
  502. #else
  503.     error1("Target is Void.",l,c,f);
  504. #endif
  505.   }
  506.   else {
  507. #ifdef SE_EXCEPTIONS
  508.     internal_exception_handler(Void_call_target);
  509. #else
  510.     error2(o,l,c,f);
  511. #endif
  512.   }
  513. }
  514.  
  515. void sigrsp(int sig) {
  516.   printf("Received signal %d (man signal).\n",sig);
  517.   se_print_run_time_stack();
  518.   exit(1);
  519. }
  520.  
  521. void se_gc_check_id(void*o,int id) {
  522.   if (id != (((T0*)o)->id)) {
  523. #ifdef SE_EXCEPTIONS
  524.     internal_exception_handler(Routine_failure);
  525. #else
  526.     fprintf(SE_ERR,"System-validity error detected during GC cycle.\n");
  527.     fprintf(SE_ERR,"Target is not valid (not the good type).\n");
  528.     fprintf(SE_ERR,"Expected: %s, Actual: %s.\n",
  529.         s2e(t[id]),s2e(t[((T0*)o)->id]));
  530.     se_print_run_time_stack();
  531.     exit(1);
  532. #endif
  533.   }
  534. }
  535. /*
  536. -- This file is  free  software, which  comes  along  with  SmallEiffel. This
  537. -- software  is  distributed  in the hope that it will be useful, but WITHOUT 
  538. -- ANY  WARRANTY;  without  even  the  implied warranty of MERCHANTABILITY or
  539. -- FITNESS  FOR A PARTICULAR PURPOSE. You can modify it as you want, provided
  540. -- this header is kept unaltered, and a notification of the changes is added.
  541. -- You  are  allowed  to  redistribute  it and sell it, alone or as a part of 
  542. -- another product.
  543. --          Copyright (C) 1994-98 LORIA - UHP - CRIN - INRIA - FRANCE
  544. --            Dominique COLNET and Suzanne COLLIN - colnet@loria.fr 
  545. --                       http://www.loria.fr/SmallEiffel
  546. --
  547. */
  548.  
  549. /*
  550.   This file (trace.c) is automatically included when `run_control.no_check' is
  551.   true (ie. all modes ecxept -boost).
  552.   This file comes after no_check.[hc] to implements the -trace flag as well as
  553.   some other printing stuff.
  554. */
  555.  
  556. /* 
  557.    To print object into the trace-stack :
  558. */
  559. void se_prinT0(T0** o) {
  560.   if (*o == NULL) {
  561.     fprintf(SE_ERR,"Void");
  562.   }
  563.   else {
  564.     fprintf(SE_ERR,"#%p",*o);
  565.   }
  566. }
  567. void se_prinT2(T2* o) {
  568.   fprintf(SE_ERR,"%d",*o);
  569. }
  570. void se_prinT3(T3* o) {
  571.   fprintf(SE_ERR,"'%c'",*o);
  572. }
  573. void se_prinT4(T4* o) {
  574.   fprintf(SE_ERR,"%f",((double)*o));
  575. }
  576. void se_prinT5(T5* o) {
  577.   fprintf(SE_ERR,"%f",*o);
  578. }
  579. void se_prinT6(T6* o) {
  580.   if (*o) {
  581.     fprintf(SE_ERR,"true");
  582.   }
  583.   else {
  584.     fprintf(SE_ERR,"false");
  585.   }
  586. }
  587. void se_prinT7(T7** o) {
  588.   if (*o == NULL) {
  589.     fprintf(SE_ERR,"Void");
  590.   }
  591.   else {
  592.     char*storage = (*o)->_storage;
  593.     int count = (*o)->_count;
  594.     int i = 0;
  595.     fprintf(SE_ERR,"\"");
  596.     while (i < count) {
  597.       fprintf(SE_ERR,"%c",storage[i]);
  598.       i++;
  599.     }
  600.     fprintf(SE_ERR,"\"");
  601.   }
  602. }
  603. void se_prinT8(T8* o) {
  604.   if (*o == NULL) {
  605.     fprintf(SE_ERR,"NULL");
  606.   }
  607.   else {
  608.     fprintf(SE_ERR,"POINTER#%p",*o);
  609.   }
  610. }
  611.  
  612. #ifndef SE_TRACE
  613.  
  614. void se_trace(se_dump_stack*ds,int l,int c,int f) {
  615.   ds->l=l;
  616.   ds->c=c;
  617.   ds->f=f;
  618. }
  619.  
  620. # endif
  621.  
  622. #ifdef SE_TRACE
  623. /*
  624.   Basic SmallEiffel step-by-step execution.
  625. */
  626.  
  627. static FILE* se_trace_file = NULL;
  628. static int se_write_trace_flag = 0;
  629. static int se_trace_ready_flag = 0;
  630. static int se_step_by_step_flag = 1;
  631.  
  632. int get_answer(void) {
  633.   int result = 0;
  634.   char c = getc(stdin);
  635.   if (c != '\n') {
  636.     result = c;
  637.   }
  638.   while (c != '\n') {
  639.     c = getc(stdin);
  640.   }
  641.   return result;
  642. }
  643.  
  644. static void sedb_help_command(void) {
  645.   printf("SmallEiffel debugger.\n");
  646.   printf("List of classes of commands:\n");
  647.   printf("   (h) Help.\n");
  648.   printf("   (s) Stack view.\n");
  649.   printf("   (q) Quit.\n");
  650.   printf("   Return to see the current Eiffel source line.");
  651.   printf("   \n");
  652.   printf("Please, feel free to debug or to complete this simple\n");
  653.   printf("step-by-step debugger (see source file in\n");
  654.   printf("\"SmallEiffel/sys/runtime/trace.c\".\n");
  655. }
  656.  
  657. static void sedb_show_source_line(int l,int c,int f) {
  658.   static int f_memo = 0;
  659.   if (p[f] == NULL) {
  660.     printf("line %d column %d of ???\t\t",l,c);
  661.   }
  662.   else {
  663.     FILE *file = fopen(p[f],"r");
  664.     if (file != NULL) {
  665.       int line = 1;
  666.       int column = 1;
  667.       char cc;
  668.       while (line < l) {
  669.     cc = fgetc(file);
  670.     if (cc == '\n') {
  671.       line++;
  672.     }
  673.       }
  674.       cc = fgetc(file);
  675.       while (cc != '\n') {
  676.     if (cc == '\t') {
  677.       printf("        ");
  678.       column+=7;
  679.     }
  680.     else {
  681.       fputc(cc,stdout);
  682.     }
  683.     cc = fgetc(file);
  684.     column++;
  685.       }
  686.       while (column < 72) {
  687.     fputc(' ',stdout);
  688.     column++;
  689.       }
  690.       printf("l%dc%d ",l,c);
  691.       if (f_memo != f) {
  692.     printf(" %s ",p[f]);
  693.       }
  694.       f_memo = f;
  695.       fclose(file);
  696.     }
  697.     else {
  698.       printf("line %d column %d of %s\t\t",l,c,p[f]);
  699.     }
  700.   }
  701. }
  702.  
  703. void se_trace(se_dump_stack*ds,int l,int c,int f) {
  704.   static char cmd_memo = 1;
  705.   static char cmd;
  706.   ds->l=l;
  707.   ds->c=c;
  708.   ds->f=f;
  709.   if (se_trace_ready_flag) {
  710.     if (se_write_trace_flag) {
  711.       fprintf(se_trace_file,"line %d column %d in %s\n",l,c,p[f]);
  712.       fflush(se_trace_file);
  713.     }
  714.   next_command:
  715.     if (se_step_by_step_flag) {
  716.       if (cmd_memo != 0) {
  717.     printf("(sedb) ");
  718.       }
  719.       fflush(stdout);
  720.       cmd = get_answer();
  721.       cmd_memo = cmd;
  722.       if ((cmd == 'h') || (cmd == 'H') || (cmd == '?')) {
  723.     sedb_help_command();
  724.     goto next_command;
  725.       }
  726.       else if ((cmd == 's') || (cmd == 'S')) {
  727.     se_print_run_time_stack();
  728.     goto next_command;
  729.       }
  730.       else if ((cmd == 'q') || (cmd == 'Q')) {
  731.     exit(1);
  732.       }
  733.       else if (cmd == 0) {
  734.     sedb_show_source_line(l,c,f);
  735.       }
  736.       else {
  737.     printf("Unknown command.\nTtype H for help\n");
  738.     goto next_command;
  739.       }
  740.     }
  741.   }
  742.   else {
  743.     se_trace_ready_flag = 1;
  744.     printf("Write the execution trace in \"trace.se\" file (y/n) ? [n]");
  745.     fflush(stdout);
  746.     if (get_answer() == 'y') {
  747.       se_write_trace_flag = 1;
  748.       se_trace_file = fopen("trace.se","w");
  749.     }
  750.     printf("Step-by-step execution (y/n) ? [y]");
  751.     fflush(stdout);
  752.     if (get_answer() == 'n') {
  753.       se_step_by_step_flag = 0;
  754.     }
  755.     else {
  756.     sedb_help_command();
  757.     }
  758.   }
  759. }
  760. # endif
  761. /*
  762. -- This file is  free  software, which  comes  along  with  SmallEiffel. This
  763. -- software  is  distributed  in the hope that it will be useful, but WITHOUT 
  764. -- ANY  WARRANTY;  without  even  the  implied warranty of MERCHANTABILITY or
  765. -- FITNESS  FOR A PARTICULAR PURPOSE. You can modify it as you want, provided
  766. -- this header is kept unaltered, and a notification of the changes is added.
  767. -- You  are  allowed  to  redistribute  it and sell it, alone or as a part of 
  768. -- another product.
  769. --          Copyright (C) 1994-98 LORIA - UHP - CRIN - INRIA - FRANCE
  770. --            Dominique COLNET and Suzanne COLLIN - colnet@loria.fr 
  771. --                       http://www.loria.fr/SmallEiffel
  772. --
  773. */
  774. /*
  775.   This file (basic_directory.c) is automatically included when some external
  776.   "SmallEiffel" feature of class BASIC_DIRECTORY is live.
  777. */
  778.  
  779. /*
  780.   The current active entry while scanning a directory :
  781. */
  782. static struct dirent* se_dir_entry = NULL;
  783.  
  784. void* se_dir_open(void* path) {
  785.   /* Try to open directory `path'. */
  786.   DIR* dirstream = opendir(((char*) path));
  787.  
  788.   if (dirstream != NULL) {
  789.     se_dir_entry = readdir((DIR*) dirstream);
  790.   }
  791.   else {
  792.     se_dir_entry = NULL;
  793.   }
  794.   return ((void*) dirstream);
  795. }
  796.  
  797. void* se_dir_name(void* dirstream) {
  798.   /* Return the name of the current entry. */
  799.   char* entry;
  800.  
  801.   if (se_dir_entry != NULL) {
  802.     entry = se_dir_entry->d_name;
  803.     return entry;
  804.   }
  805.   else {
  806.     return NULL;
  807.   }
  808. }
  809.  
  810. void* se_dir_next(void* dirstream_pointer) {
  811.   /* Try to read the next entry. */
  812.   DIR* dirstream = dirstream_pointer;
  813.  
  814.   if (se_dir_entry != NULL) {
  815.     se_dir_entry = readdir(dirstream);
  816.     if (se_dir_entry == NULL) {
  817.       closedir(dirstream);
  818.       return NULL;
  819.     }
  820.     else {
  821.       return dirstream;
  822.     }
  823.   }
  824.   else {
  825.     return NULL;
  826.   }
  827. }
  828.  
  829. void* se_dir_gcwd(int unused) {
  830.   static char* buf = NULL;
  831.   static size_t size = 0;
  832.   if (buf == NULL) {
  833.     size = 256;
  834.     buf = (char*)malloc(size);
  835.   }
  836.   if (getcwd(buf,size) != NULL) {
  837.     return buf;
  838.   }
  839.   else {
  840.     free(buf);
  841.     size = size * 2;
  842.     buf = (char*)malloc(size);
  843.     return se_dir_gcwd(0);
  844.   }
  845. }
  846. unsigned int fsoc_count_ceil=56;
  847. unsigned int rsoc_count_ceil=8;
  848. /*
  849. -- This file is  free  software, which  comes  along  with  SmallEiffel. This
  850. -- software  is  distributed  in the hope that it will be useful, but WITHOUT 
  851. -- ANY  WARRANTY;  without  even  the  implied warranty of MERCHANTABILITY or
  852. -- FITNESS  FOR A PARTICULAR PURPOSE. You can modify it as you want, provided
  853. -- this header is kept unaltered, and a notification of the changes is added.
  854. -- You  are  allowed  to  redistribute  it and sell it, alone or as a part of 
  855. -- another product.
  856. --          Copyright (C) 1994-98 LORIA - UHP - CRIN - INRIA - FRANCE
  857. --            Dominique COLNET and Suzanne COLLIN - colnet@loria.fr 
  858. --                       http://www.loria.fr/SmallEiffel
  859. --
  860. */
  861.  
  862. /* This file is automatically included when the Garbage Collector
  863.    is used (default, unless option -no_gc has been selected).
  864. */
  865.  
  866. void**stack_bottom;
  867. mch**gcmt=NULL;
  868. int gcmt_max=2048;
  869. int gcmt_used=0;
  870. fsoc*fsocfl=NULL;
  871. rsoc*rsocfl=NULL;
  872. int gc_is_off=1;
  873. unsigned int fsoc_count=0;
  874. unsigned int rsoc_count=0;
  875. void*gcmt_tail_addr=NULL;
  876.  
  877. void gc_sweep(void) {
  878.   mch** p2 = gcmt;
  879.   mch** p1 = gcmt+1;
  880.   mch**eogcmt=gcmt+gcmt_used;
  881.   if (FREE_CHUNK((*p2)->state_type)) {
  882.     if (RSO_FREE_CHUNK == ((*p2)->state_type)) {
  883.       ((rsoc*)(*p2))->next=NULL;
  884.       rsocfl=((rsoc*)(*p2));
  885.     }
  886.     else {
  887.       rsocfl=NULL;
  888.     }    
  889.   }
  890.   else {
  891.     ((*gcmt)->swfp)(*p2);
  892.     if (RSO_FREE_CHUNK==((*p2)->state_type)) {
  893.       ((rsoc*)(*p2))->next=NULL;
  894.       rsocfl=((rsoc*)(*p2));
  895.     }
  896.     else {
  897.       rsocfl=NULL;
  898.     }
  899.   }
  900.   while (p1 < eogcmt) {
  901.     if (FREE_CHUNK((*p1)->state_type)) {
  902.       if (RSO_FREE_CHUNK == ((*p1)->state_type)) {
  903.     if (RSO_FREE_CHUNK == ((*p2)->state_type)) {
  904.       if (((char*)(*p2))+(*p2)->size == ((char*)(*p1))) {
  905.         ((*p2)->size)+=((*p1)->size);
  906.         p1++;
  907.       }
  908.       else {
  909.         ((rsoc*)(*p1))->next=rsocfl;
  910.         rsocfl=((rsoc*)(*p1));
  911.         *(p2+1)=*p1; p2++; p1++;
  912.       }
  913.     }
  914.     else {
  915.       ((rsoc*)(*p1))->next=rsocfl;
  916.       rsocfl=((rsoc*)(*p1));
  917.       *(p2+1)=*p1; p2++; p1++;
  918.     }
  919.       }
  920.       else {
  921.     *(p2+1)=*p1; p2++; p1++;
  922.       }
  923.     }
  924.     else {
  925.       ((*p1)->swfp)(*p1);
  926.       if (RSO_FREE_CHUNK == ((*p1)->state_type)) {
  927.     if (RSO_FREE_CHUNK == ((*p2)->state_type)) {
  928.       if (((char*)(*p2))+(*p2)->size == ((char*)(*p1))) {
  929.         ((*p2)->size)+=((*p1)->size);
  930.         p1++;
  931.       }
  932.       else {
  933.         ((rsoc*)(*p1))->next=rsocfl;
  934.         rsocfl=((rsoc*)(*p1));
  935.         *(p2+1)=*p1; p2++; p1++;
  936.       }
  937.     }
  938.     else {
  939.       ((rsoc*)(*p1))->next=rsocfl;
  940.       rsocfl=((rsoc*)(*p1));
  941.       *(p2+1)=*p1; p2++; p1++;
  942.     }
  943.       }
  944.       else {
  945.     *(p2+1)=*p1; p2++; p1++;
  946.       }
  947.     }
  948.   }
  949.   gcmt_used=(p2-gcmt)+1;
  950. }
  951.  
  952. void gc_mark(void*p) {
  953.   if ((p>((void*)*gcmt))&&(p<=gcmt_tail_addr)) {
  954.     int i1=0;
  955.     int i2=gcmt_used-1;
  956.     int m=i2>>1;
  957.     mch*c;
  958.     for (;i2>i1;m=((i1+i2)>>1)) {
  959.       if (p<=((void*)gcmt[m+1])) {
  960.     i2=m;
  961.       }
  962.       else {
  963.     i1=m+1;
  964.       }
  965.     }
  966.     c=gcmt[i2];
  967.     if (!(FREE_CHUNK(c->state_type))) {
  968.       (c->amfp)(c,p);
  969.     }
  970.   }
  971. }
  972.  
  973. int gc_stack_size(void) {
  974.   void*stack_top[2]={NULL,NULL};
  975.   if (stack_top > stack_bottom) {
  976.     return ((void**)stack_top)-((void**)stack_bottom);
  977.   }
  978.   else {
  979.     return ((void**)stack_bottom)-((void**)stack_top);
  980.   }
  981. }
  982.  
  983. /*
  984.   To delay Garbage Collection when the stack is too large.
  985.   To allow fast increase of ceils.
  986. */
  987. #define FSOC_LIMIT (10240/((FSOC_SIZE)>>10))
  988. #define RSOC_LIMIT (10240/((RSOC_SIZE)>>10)) 
  989.  
  990. /*
  991.   When stack is too large, collection may be delayed.
  992. */
  993. #define GCLARGESTACK 50000
  994.  
  995. int garbage_delayed(void) {
  996.   if (gc_stack_size() > GCLARGESTACK) {
  997.     if (fsoc_count_ceil <= fsoc_count) {
  998.       if (rsoc_count_ceil <= rsoc_count) {
  999.     if ((fsoc_count<FSOC_LIMIT)&&(rsoc_count<RSOC_LIMIT)) {
  1000.       fsoc_count_ceil++;
  1001.       rsoc_count_ceil++;
  1002.     return 1;
  1003.     }
  1004.     else return 0;
  1005.       }
  1006.       else {
  1007.     if (fsoc_count<FSOC_LIMIT) {
  1008.       fsoc_count_ceil++;
  1009.       return 1;
  1010.     }
  1011.     else return 0;
  1012.       }
  1013.     }
  1014.     else {
  1015.       if (rsoc_count_ceil <= rsoc_count) {
  1016.     if (rsoc_count<RSOC_LIMIT) {
  1017.       rsoc_count_ceil++;
  1018.       return 1;
  1019.     }
  1020.     else return 0;
  1021.       }
  1022.       else return 0;
  1023.     }
  1024.   }
  1025.   else {
  1026.     return 0;
  1027.   }
  1028. }
  1029.  
  1030. void gc_update_ceils(void) {
  1031.   int c;
  1032.  
  1033.   /* Compute fsoc_count_ceil :
  1034.    */
  1035.   if (fsocfl==NULL) {
  1036.     if (fsoc_count >= fsoc_count_ceil) {
  1037.       if (fsoc_count_ceil<FSOC_LIMIT) {
  1038.     fsoc_count_ceil<<=1;
  1039.       }
  1040.       else { 
  1041.     c=fsoc_count+(fsoc_count/3);
  1042.     if (fsoc_count_ceil < c)
  1043.       fsoc_count_ceil=c;
  1044.       }
  1045.     }
  1046.   }
  1047.   else
  1048.     if (fsoc_count_ceil < fsoc_count)
  1049.       fsoc_count_ceil=fsoc_count;
  1050.   /* Compute rsoc_count_ceil :
  1051.    */
  1052.   if (rsocfl==NULL) {
  1053.     if (rsoc_count>=rsoc_count_ceil) {
  1054.       if (rsoc_count_ceil<RSOC_LIMIT) {
  1055.     rsoc_count_ceil<<=1;
  1056.       }
  1057.       else { 
  1058.     c=rsoc_count+(rsoc_count/3);
  1059.     if (rsoc_count_ceil < c)
  1060.       rsoc_count_ceil=c;
  1061.       }
  1062.     }
  1063.   }
  1064.   else
  1065.     if (rsoc_count_ceil < rsoc_count)
  1066.       rsoc_count_ceil=rsoc_count;
  1067. }
  1068.  
  1069. static void add_to_gcmt(mch*c) {
  1070.   mch**p;
  1071.   if (gcmt_used==gcmt_max) {
  1072.     gcmt_max<<=1;
  1073.     gcmt=realloc(gcmt,(gcmt_max+1)*sizeof(void*));
  1074.   }
  1075.   for(p=gcmt+(gcmt_used++ -1);(p>=gcmt)&&(*p>c);p--)
  1076.     *(p+1)=*p;
  1077.   *(p+1)=c;
  1078. }
  1079.  
  1080. fsoc*new_fsoc(void) {
  1081.   if(fsocfl!=NULL){
  1082.     fsoc*r=fsocfl;
  1083.     fsocfl=fsocfl->next;
  1084.     return r;
  1085.   }
  1086.   else {
  1087.     mch*r=malloc(FSOC_SIZE);
  1088.     mch**p;
  1089.     gc_update_ceils();
  1090.     fsoc_count++;
  1091.     if (gcmt_used==gcmt_max) {
  1092.       gcmt_max<<=1;
  1093.       gcmt=realloc(gcmt,(gcmt_max+1)*sizeof(void*));
  1094.     }
  1095.     for (p=gcmt+(gcmt_used++ -1);(p>=gcmt)&&(*p>r);p--)
  1096.       *(p+1)=*p;
  1097.     *(p+1)=r;
  1098.     return (fsoc*)r;
  1099.   }
  1100. }
  1101.  
  1102. static char*rso_from_store(na_env*nae,int size) {
  1103.   rsoh*r=(nae->store);
  1104.   nae->store_left-=size;
  1105.   if ((nae->store_left) > sizeof(rsoh)) {
  1106.     r->header.size=size;
  1107.     nae->store=((rsoh*)(((char*)(nae->store))+size));
  1108.   }
  1109.   else {
  1110.     r->header.size=size+nae->store_left;
  1111.     nae->store_left=0;
  1112.   }
  1113.   (r->header.magic_flag)=RSOH_UNMARKED;
  1114.   ((void)memset((r+1),0,r->header.size-sizeof(rsoh)));
  1115.   return (char*)(r+1);
  1116. }
  1117.  
  1118. static void rsoc_sweep(rsoc*c) {
  1119.   na_env*nae=c->nae;
  1120.   rsoh*gp=(rsoh*)&(c->first_header);
  1121.   rsoh*pp;
  1122.   rsoh*eoc=((rsoh*)(((char*)c)+c->header.size));
  1123.   c->free_list_of_large=NULL;
  1124.   if (c->header.size > RSOC_SIZE) {
  1125.     if (gp->header.magic_flag == RSOH_MARKED) {
  1126.       gp->header.magic_flag=RSOH_UNMARKED;
  1127.       c->next=nae->chunk_list;
  1128.       nae->chunk_list=c;
  1129.     }
  1130.     else {
  1131.       c->header.state_type=RSO_FREE_CHUNK;
  1132.     }
  1133.     return;
  1134.   }
  1135.   while (gp<eoc) {
  1136.     while (gp->header.magic_flag == RSOH_MARKED) {
  1137.       gp->header.magic_flag=RSOH_UNMARKED;
  1138.       gp=((rsoh*)(((char*)gp)+gp->header.size));
  1139.       if(gp>=eoc) {
  1140.     c->next=nae->chunk_list;
  1141.     nae->chunk_list=c;
  1142.     return;
  1143.       }
  1144.     }
  1145.     gp->header.magic_flag=RSOH_FREE;
  1146.     pp=(rsoh*)(((char*)gp)+gp->header.size);
  1147.     while ((pp<eoc)&&(pp->header.magic_flag != RSOH_MARKED)) {
  1148.       pp->header.magic_flag=RSOH_FREE;
  1149.       gp->header.size+=pp->header.size;
  1150.       pp=((rsoh*)(((char*)pp)+pp->header.size));
  1151.     }
  1152.     if (gp->header.size >= RSOC_MIN_STORE) {
  1153.       if (nae->store_left==0) {
  1154.     nae->store_left=gp->header.size;
  1155.     nae->store=gp;
  1156.     nae->store_chunk=c;
  1157.       }
  1158.       else if (nae->store->header.size < gp->header.size) {
  1159.     ((fll_rsoh*)nae->store)->nextflol=nae->store_chunk->free_list_of_large;
  1160.     nae->store_chunk->free_list_of_large=((fll_rsoh*)nae->store);
  1161.     nae->store_left=gp->header.size;
  1162.     nae->store=gp;
  1163.     nae->store_chunk=c;
  1164.       }
  1165.       else {
  1166.     ((fll_rsoh*)gp)->nextflol=c->free_list_of_large;
  1167.     c->free_list_of_large=((fll_rsoh*)gp);
  1168.       }
  1169.     }
  1170.     gp=pp;
  1171.   }
  1172.   if (((rsoh*)(&c->first_header))->header.size >= 
  1173.       (c->header.size-sizeof(rsoc)+sizeof(rsoh))){
  1174.     c->header.state_type=RSO_FREE_CHUNK;
  1175.     nae->store_chunk=NULL;
  1176.     nae->store_left=0; 
  1177.   }
  1178.   else{
  1179.     c->next=nae->chunk_list;
  1180.     nae->chunk_list=c;
  1181.   }
  1182. }
  1183.  
  1184. static rsoc MRSOC = {
  1185.     {
  1186.     RSOC_SIZE,
  1187.     RSO_USED_CHUNK,
  1188.     ((void(*)(mch*,void*))gcna_align_mark),
  1189.     ((void(*)(mch*))rsoc_sweep)
  1190.     },
  1191.     NULL,
  1192.     NULL,
  1193.     NULL,
  1194.     {
  1195.       {
  1196.     0,
  1197.     RSOH_MARKED
  1198.       }
  1199.     }
  1200. };
  1201.  
  1202. static void rsoc_malloc(na_env*nae){
  1203.   rsoc*r=malloc(RSOC_SIZE);
  1204.   rsoc_count++;
  1205.   *r=MRSOC;
  1206.   r->nae=nae;
  1207.   nae->store=(&(r->first_header));
  1208.   nae->store_left=RSOC_SIZE-sizeof(rsoc)+sizeof(rsoh);
  1209.   nae->store_chunk=r;
  1210.   r->next=nae->chunk_list;
  1211.   nae->chunk_list=r;
  1212.   add_to_gcmt((mch*)r);
  1213. }
  1214.  
  1215. static rsoc* rsocfl_best_fit(int size) {
  1216.   int best_size;
  1217.   rsoc *pc,*best_pc,*best_c, *c;
  1218.   if (rsocfl==NULL)
  1219.     return NULL;
  1220.   pc=NULL;
  1221.   best_pc=NULL;
  1222.   best_c=NULL;
  1223.   c=rsocfl;
  1224.   while ((NULL!=c)&&(NULL==best_c)){
  1225.     if (c->header.size>=size){
  1226.       best_c=c;
  1227.       best_pc=pc;
  1228.       best_size=c->header.size;
  1229.     }
  1230.     pc=c;
  1231.     c=c->next;
  1232.   }
  1233.   if (NULL==c){
  1234.     if (best_pc != NULL)
  1235.       best_pc->next=best_c->next;
  1236.     else if (best_c==rsocfl)
  1237.       rsocfl=best_c->next;
  1238.     return best_c;
  1239.   }
  1240.   do{
  1241.     if ((c->header.size>=size)&&(c->header.size<best_size)){    
  1242.       best_c=c;
  1243.       best_pc=pc;
  1244.       best_size=c->header.size;
  1245.     }
  1246.     pc=c;
  1247.     c=c->next;
  1248.   } while(c!=NULL);
  1249.   if (NULL==best_pc) {
  1250.     rsocfl = best_c->next;
  1251.   }
  1252.   else {
  1253.     best_pc->next=best_c->next;
  1254.   }
  1255.   return best_c;
  1256. }
  1257.  
  1258. static int get_store_in(rsoc*c,int size) {
  1259.   na_env*nae=c->nae;
  1260.   fll_rsoh*pf=NULL;
  1261.   fll_rsoh*f=c->free_list_of_large;
  1262.   while (f != NULL) {
  1263.     if (f->rsoh_field.size >= size) {
  1264.       nae->store_left=f->rsoh_field.size;
  1265.       nae->store=(rsoh*)f;
  1266.       nae->store_chunk=c;
  1267.       if (pf == NULL) {
  1268.     c->free_list_of_large=f->nextflol;
  1269.       }
  1270.       else {
  1271.     pf->nextflol=f->nextflol;
  1272.       }
  1273.       return 1;
  1274.     }
  1275.     pf = f;
  1276.     f = f->nextflol;
  1277.   }
  1278.   return 0;
  1279. }
  1280.  
  1281. char*new_na_from_chunk_list(na_env*nae,int size) {
  1282.   rsoc*c=nae->chunk_list;
  1283.   int csize;
  1284.   while (c != NULL) {
  1285.     if (get_store_in(c,size)) {
  1286.       return rso_from_store(nae,size);
  1287.     }    
  1288.     c = c->next;
  1289.   }
  1290.   csize=size+(sizeof(rsoc)-sizeof(rsoh));
  1291.   c=rsocfl_best_fit(csize);
  1292.   if (c != NULL){
  1293.     if ((c->header.size > RSOC_SIZE)
  1294.     &&
  1295.     (c->header.size-csize > RSOC_MIN_STORE*4)) {
  1296.       int csize_left=c->header.size-csize;
  1297.       if ((csize_left%sizeof(double))!=0) {
  1298.     csize_left-=(csize_left%sizeof(double));
  1299.     csize=c->header.size-csize_left;
  1300.       }
  1301.       c->header.size=csize_left;
  1302.       c->next=rsocfl;
  1303.       rsocfl=c;
  1304.       c=(rsoc*)(((char*)c)+csize_left);
  1305.       add_to_gcmt((mch*)c);
  1306.       c->header.amfp=(void(*)(mch*,void*))gcna_align_mark;
  1307.       c->header.swfp=(void(*)(mch*))rsoc_sweep;
  1308.     }
  1309.     else {
  1310.       csize=c->header.size;
  1311.     }
  1312.     c->header.size=csize;
  1313.     c->header.state_type=RSO_USED_CHUNK;
  1314.     c->free_list_of_large=NULL;
  1315.     c->nae=nae;
  1316.     nae->store=(&(c->first_header));
  1317.     nae->store_left=csize-sizeof(rsoc)+sizeof(rsoh);
  1318.     nae->store_chunk=c;
  1319.     c->next=nae->chunk_list;
  1320.     nae->chunk_list=c;
  1321.     return rso_from_store(nae,size);
  1322.   }
  1323.   return NULL;
  1324. }
  1325.  
  1326. char*new_na(na_env*nae,int size) { 
  1327.   if (nae->store_left>0) {
  1328.     nae->store->header.size=nae->store_left;
  1329.     nae->store->header.magic_flag=RSOH_FREE;
  1330.     if (nae->store_left >= RSOC_MIN_STORE) {
  1331.       ((fll_rsoh*)(nae->store))->nextflol=nae->store_chunk->free_list_of_large;
  1332.       nae->store_chunk->free_list_of_large=((fll_rsoh*)nae->store);
  1333.     }
  1334.     nae->store_left=0;
  1335.   }
  1336.   if ((nae->store_chunk!=NULL)&&(get_store_in(nae->store_chunk,size))) {
  1337.     return rso_from_store(nae,size);
  1338.   }
  1339.   {
  1340.     char*r=new_na_from_chunk_list(nae,size);
  1341.     if (r!=NULL)
  1342.       return r;
  1343.   }
  1344.   if (rsoc_count<rsoc_count_ceil) {
  1345.     if((size+sizeof(rsoc)-sizeof(rsoh))>RSOC_SIZE){
  1346.       rsoc*c=malloc(size+sizeof(rsoc)-sizeof(rsoh));
  1347.       rsoh*r=(&(c->first_header));
  1348.       rsoc_count++;
  1349.       *c=MRSOC;
  1350.       c->header.size=size+sizeof(rsoc)-sizeof(rsoh);
  1351.       c->nae=nae;
  1352.       c->next=nae->chunk_list;
  1353.       nae->chunk_list=c;
  1354.       add_to_gcmt((mch*)c);
  1355.       r->header.size=size;
  1356.       (r->header.magic_flag)=RSOH_UNMARKED;
  1357.       ((void)memset((r+1),0,size-sizeof(rsoh)));
  1358.       return (char*)(r+1);
  1359.     }
  1360.     else {
  1361.       rsoc_malloc(nae);
  1362.       return rso_from_store(nae,size);
  1363.     }
  1364.   }
  1365.   gc_start();
  1366.   if (size<=(nae->store_left)) {
  1367.     return rso_from_store(nae,size);
  1368.   }
  1369.   {
  1370.     char*r=new_na_from_chunk_list(nae,size);
  1371.     if (r!=NULL) {
  1372.       return r;
  1373.     }
  1374.   }
  1375.   if((size+sizeof(rsoc)-sizeof(rsoh))>RSOC_SIZE){
  1376.     rsoc*c=malloc(size+sizeof(rsoc)-sizeof(rsoh));
  1377.     rsoh*r=(&(c->first_header));
  1378.     rsoc_count++;
  1379.     *c=MRSOC;
  1380.     c->header.size=size+sizeof(rsoc)-sizeof(rsoh);
  1381.     c->nae=nae;
  1382.     c->next=nae->chunk_list;
  1383.     nae->chunk_list=c;
  1384.     add_to_gcmt((mch*)c);
  1385.     r->header.size=size;
  1386.     (r->header.magic_flag)=RSOH_UNMARKED;
  1387.     ((void)memset((r+1),0,size-sizeof(rsoh)));
  1388.     gc_update_ceils();
  1389.     return (char*)(r+1);
  1390.   }
  1391.   else {
  1392.     rsoc_malloc(nae);
  1393.     gc_update_ceils();
  1394.     return rso_from_store(nae,size);
  1395.   }
  1396. }
  1397.  
  1398. void gcna_align_mark(rsoc*c,void*o) {
  1399.   na_env* nae = c->nae;
  1400.   fll_rsoh* f;
  1401.   fll_rsoh* pf;
  1402.   char* b = (char*)&(c->first_header);
  1403.   if (((char*)o) > (((char*)c)+c->header.size)) {
  1404.       return;
  1405.   }
  1406.   if (((((char*)o)-((char*)c))%sizeof(int)) != 0) {
  1407.       return;
  1408.   }
  1409.   if ((((rsoh*)o)-1)->header.magic_flag != RSOH_UNMARKED) {
  1410.       return;
  1411.   }
  1412.   if (((char*)o) < ((char*)(c+1))) {
  1413.       return;
  1414.   }
  1415.   if (c->header.size > RSOC_SIZE) {
  1416.       if (o == (c+1)) {
  1417.       nae->gc_mark(o);
  1418.       }
  1419.       return;
  1420.   }
  1421.   pf=NULL;
  1422.   f=c->free_list_of_large;
  1423.   while ((f != NULL) && (f < ((fll_rsoh*)o))) {
  1424.       pf=f;
  1425.       f=f->nextflol;
  1426.   }
  1427.   if (pf == NULL) {
  1428.       pf=(fll_rsoh*)b;
  1429.   }
  1430.   while ((((rsoh*)pf)+1) < (rsoh*)o) {
  1431.       pf = ((fll_rsoh*)(((char*)pf)+pf->rsoh_field.size));
  1432.   }
  1433.   {void* tmp = (((rsoh*)pf)+1);
  1434.   if (o == tmp) {
  1435.       nae->gc_mark(o);
  1436.   } 
  1437.   } 
  1438. }
  1439.  
  1440. int rsocfl_count(void) {
  1441.   int r=0;
  1442.   rsoc*p=rsocfl;
  1443.   while (p!=NULL) {
  1444.     r++;
  1445.     p=p->next;
  1446.   }
  1447.   return r;
  1448. }
  1449.  
  1450. int fsocfl_count(void) {
  1451.   int r=0;
  1452.   fsoc*p=fsocfl;
  1453.   while (p!=NULL) {
  1454.     r++;
  1455.     p=p->next;
  1456.   }
  1457.   return r;
  1458. }
  1459.  
  1460. void rsocfl_info(void) {
  1461.   int max=0;
  1462.   rsoc*p=rsocfl;
  1463.   printf(" rsocfl count = %d\n",rsocfl_count());
  1464.   if (p!=NULL) {
  1465.     printf(" rsocfl = [");
  1466.     p=rsocfl;
  1467.     while (p!=NULL) {
  1468.       printf("%d",p->header.size);
  1469.       if(max < p->header.size) max=p->header.size;
  1470.       p=p->next;
  1471.       if (p!=NULL)printf(",");
  1472.     }
  1473.     printf("]\n");
  1474.     printf(" rsocfl max = %d\n",max);
  1475.   }
  1476. }
  1477. unsigned int gc_start_count=0;
  1478.  
  1479.  
  1480. T6 r2in_range(se_dump_stack*caller,T2 C,T2 a1,T2 a2){
  1481. T6 R=0;
  1482. void**locals[3];
  1483. se_dump_stack ds;
  1484. ds.fd=&f2in_range;
  1485. ds.current=((void**)&C);
  1486. ds.l=59;
  1487. ds.c=4;
  1488. ds.f=375;
  1489. ds.caller=caller;
  1490. ds.locals=locals;
  1491. locals[0]=(void**)&a1;
  1492. locals[1]=(void**)&a2;
  1493. locals[2]=(void**)&R;
  1494. se_dst=&ds;/*link*/
  1495. se_trace(&ds,62,3,375);
  1496. R=((C)>=(a1))&&((C)<=(a2));
  1497. if(f2in_range.assertion_flag){
  1498. f2in_range.assertion_flag=0;
  1499. se_trace(&ds,64,10,375);
  1500. ac_ens((R)==(r6_px_and(&ds,(C)>=(a1),(C)<=(a2))));
  1501. f2in_range.assertion_flag=1;
  1502. }
  1503. se_dst=caller;/*unlink*/
  1504. return R;
  1505. }
  1506. se_frame_descriptor f2in_range={"in_range of COMPARABLE",1,3,"%E2%lower%E2%upper%E2%Result%E6%",1};
  1507.  
  1508.  
  1509. void r2append_in(se_dump_stack*caller,T2 C,T0* a1){
  1510. T2 _i=0;
  1511. T2 _val=0;
  1512. void**locals[3];
  1513. se_dump_stack ds;
  1514. ds.fd=&f2append_in;
  1515. ds.current=((void**)&C);
  1516. ds.l=183;
  1517. ds.c=4;
  1518. ds.f=2;
  1519. ds.caller=caller;
  1520. ds.locals=locals;
  1521. locals[0]=(void**)&a1;
  1522. locals[1]=(void**)&_i;
  1523. locals[2]=(void**)&_val;
  1524. se_dst=&ds;/*link*/
  1525. se_require_uppermost_flag=1;
  1526. if(f2append_in.assertion_flag){
  1527. f2append_in.assertion_flag=0;
  1528. se_trace(&ds,188,7,2);
  1529. ac_req((a1)!=((void*)(NULL)));
  1530. f2append_in.assertion_flag=1;
  1531. }
  1532. /*[IF*/
  1533. if((se_trace(&ds,192,14,2),(C)==(0))){
  1534. se_trace(&ds,193,10,2);
  1535. r7extend(&ds,se_i7(&ds,((T7*)ci(7,a1,193,6,2))),'0');
  1536. }
  1537. else{
  1538. /*[IF*/
  1539. if((se_trace(&ds,195,17,2),(C)>(0))){
  1540. se_trace(&ds,197,5,2);
  1541. _i=((se_i7(&ds,((T7*)ci(7,a1,197,10,2))))->_count/*8*/)+(1);
  1542. se_trace(&ds,198,5,2);
  1543. _val=C;
  1544. while (!((se_trace(&ds,200,9,2),(_val)==(0)))) {
  1545. se_trace(&ds,202,9,2);
  1546. r7extend(&ds,se_i7(&ds,((T7*)ci(7,a1,202,5,2))),r2digit(&ds,(_val)%(10)));
  1547. se_trace(&ds,203,5,2);
  1548. _val=(_val)/(10);
  1549. }
  1550. }
  1551. else{
  1552. se_trace(&ds,206,13,2);
  1553. r7extend(&ds,se_i7(&ds,((T7*)ci(7,a1,206,9,2))),'\55');
  1554. se_trace(&ds,208,5,2);
  1555. _i=((se_i7(&ds,((T7*)ci(7,a1,208,10,2))))->_count/*8*/)+(1);
  1556. se_trace(&ds,209,5,2);
  1557. _val=C;
  1558. while (!((se_trace(&ds,211,9,2),(_val)==(0)))) {
  1559. se_trace(&ds,213,9,2);
  1560. r7extend(&ds,se_i7(&ds,((T7*)ci(7,a1,213,5,2))),r2digit(&ds,-((_val)%(10))));
  1561. se_trace(&ds,214,5,2);
  1562. _val=(_val)/(10);
  1563. }
  1564. }
  1565. /*FI]*/
  1566. se_trace(&ds,218,9,2);
  1567. _val=(se_i7(&ds,((T7*)ci(7,a1,218,16,2))))->_count/*8*/;
  1568. while (!((se_trace(&ds,220,11,2),(_i)>=(_val)))) {
  1569. se_trace(&ds,222,13,2);
  1570. r7swap(&ds,se_i7(&ds,((T7*)ci(7,a1,222,9,2))),_i,_val);
  1571. se_trace(&ds,223,9,2);
  1572. _val=(_val)-(1);
  1573. se_trace(&ds,224,9,2);
  1574. _i=(_i)+(1);
  1575. }
  1576. }
  1577. /*FI]*/
  1578. se_dst=caller;/*unlink*/
  1579. }
  1580. se_frame_descriptor f2append_in={"append_in of INTEGER",1,3,"%E2%str%R7%i%E2%val%E2%",1};
  1581.  
  1582.  
  1583. T3 r2digit(se_dump_stack*caller,T2 C){
  1584. T3 R=0;
  1585. void**locals[1];
  1586. se_dump_stack ds;
  1587. ds.fd=&f2digit;
  1588. ds.current=((void**)&C);
  1589. ds.l=267;
  1590. ds.c=4;
  1591. ds.f=2;
  1592. ds.caller=caller;
  1593. ds.locals=locals;
  1594. locals[0]=(void**)&R;
  1595. se_dst=&ds;/*link*/
  1596. se_require_uppermost_flag=1;
  1597. if(f2digit.assertion_flag){
  1598. f2digit.assertion_flag=0;
  1599. se_trace(&ds,270,3,2);
  1600. ac_req(r2in_range(&ds,C,0,9));
  1601. f2digit.assertion_flag=1;
  1602. }
  1603. se_trace(&ds,272,3,2);
  1604. R=((T3)((C)+(((unsigned char)'0'))));
  1605. if(f2digit.assertion_flag){
  1606. f2digit.assertion_flag=0;
  1607. se_trace(&ds,274,18,2);
  1608. ac_ens(r7has(&ds,ms2_8350,R));
  1609. se_trace(&ds,275,16,2);
  1610. ac_ens((r3value(&ds,R))==(C));
  1611. f2digit.assertion_flag=1;
  1612. }
  1613. se_dst=caller;/*unlink*/
  1614. return R;
  1615. }
  1616. se_frame_descriptor f2digit={"digit of INTEGER",1,1,"%E2%Result%E3%",1};
  1617. /*No:INTEGER.item*/
  1618.  
  1619.  
  1620. T6 r2divisible(se_dump_stack*caller,T2 a1){
  1621. T6 R=0;
  1622. void**locals[2];
  1623. se_dump_stack ds;
  1624. ds.fd=&f2divisible;
  1625. ds.current=NULL;
  1626. ds.l=104;
  1627. ds.c=4;
  1628. ds.f=528;
  1629. ds.caller=caller;
  1630. ds.locals=locals;
  1631. locals[0]=(void**)&a1;
  1632. locals[1]=(void**)&R;
  1633. se_dst=&ds;/*link*/
  1634. se_require_uppermost_flag=1;
  1635. se_trace(&ds,106,3,528);
  1636. R=(a1)!=(0);
  1637. se_dst=caller;/*unlink*/
  1638. return R;
  1639. }
  1640. se_frame_descriptor f2divisible={"divisible of INTEGER_REF",0,2,"other%E2%Result%E6%",1};
  1641.  
  1642.  
  1643. T6 r3_px_6061(se_dump_stack*caller,T3 C,T3 a1){
  1644. T6 R=0;
  1645. void**locals[2];
  1646. se_dump_stack ds;
  1647. ds.fd=&f3_px_6061;
  1648. ds.current=((void**)&C);
  1649. ds.l=46;
  1650. ds.c=4;
  1651. ds.f=3;
  1652. ds.caller=caller;
  1653. ds.locals=locals;
  1654. locals[0]=(void**)&a1;
  1655. locals[1]=(void**)&R;
  1656. se_dst=&ds;/*link*/
  1657. se_require_uppermost_flag=1;
  1658. se_trace(&ds,49,3,3);
  1659. R=(((unsigned char)C))<=(((unsigned char)a1));
  1660. if(f3_px_6061.assertion_flag){
  1661. f3_px_6061.assertion_flag=0;
  1662. se_trace(&ds,36,42,375);
  1663. ac_ens(r6_px_or(&ds,(R)==(r3_px_60(&ds,C,a1)),(C)==(a1)));
  1664. f3_px_6061.assertion_flag=1;
  1665. }
  1666. se_dst=caller;/*unlink*/
  1667. return R;
  1668. }
  1669. se_frame_descriptor f3_px_6061={"infix <= of CHARACTER",1,2,"%E3%other%E3%Result%E6%",1};
  1670.  
  1671.  
  1672. T6 r3_px_60(se_dump_stack*caller,T3 C,T3 a1){
  1673. T6 R=0;
  1674. void**locals[2];
  1675. se_dump_stack ds;
  1676. ds.fd=&f3_px_60;
  1677. ds.current=((void**)&C);
  1678. ds.l=40;
  1679. ds.c=4;
  1680. ds.f=3;
  1681. ds.caller=caller;
  1682. ds.locals=locals;
  1683. locals[0]=(void**)&a1;
  1684. locals[1]=(void**)&R;
  1685. se_dst=&ds;/*link*/
  1686. se_require_uppermost_flag=1;
  1687. se_trace(&ds,43,3,3);
  1688. R=(((unsigned char)C))<(((unsigned char)a1));
  1689. if(f3_px_60.assertion_flag){
  1690. f3_px_60.assertion_flag=0;
  1691. se_trace(&ds,26,22,375);
  1692. ac_ens((!(R))||(r6_ix_not(&ds,r3_px_60(&ds,a1,C))));
  1693. f3_px_60.assertion_flag=1;
  1694. }
  1695. se_dst=caller;/*unlink*/
  1696. return R;
  1697. }
  1698. se_frame_descriptor f3_px_60={"infix < of CHARACTER",1,2,"%E3%other%E3%Result%E6%",1};
  1699.  
  1700.  
  1701. T6 r3is_digit(se_dump_stack*caller,T3 C){
  1702. T6 R=0;
  1703. void**locals[1];
  1704. se_dump_stack ds;
  1705. ds.fd=&f3is_digit;
  1706. ds.current=((void**)&C);
  1707. ds.l=137;
  1708. ds.c=4;
  1709. ds.f=3;
  1710. ds.caller=caller;
  1711. ds.locals=locals;
  1712. locals[0]=(void**)&R;
  1713. se_dst=&ds;/*link*/
  1714. {int z1=C;
  1715.  
  1716. if(((48<=z1)&&(z1<=57))){
  1717. se_trace(&ds,143,6,3);
  1718. R=1;
  1719. }
  1720. }
  1721. if(f3is_digit.assertion_flag){
  1722. f3is_digit.assertion_flag=0;
  1723. se_trace(&ds,147,9,3);
  1724. ac_ens((!(R))||(r6_px_and(&ds,r3_px_6061(&ds,'0',C),r3_px_6061(&ds,C,'9'))));
  1725. f3is_digit.assertion_flag=1;
  1726. }
  1727. se_dst=caller;/*unlink*/
  1728. return R;
  1729. }
  1730. se_frame_descriptor f3is_digit={"is_digit of CHARACTER",1,1,"%E3%Result%E6%",1};
  1731.  
  1732.  
  1733. T2 r3value(se_dump_stack*caller,T3 C){
  1734. T2 R=0;
  1735. void**locals[1];
  1736. se_dump_stack ds;
  1737. ds.fd=&f3value;
  1738. ds.current=((void**)&C);
  1739. ds.l=69;
  1740. ds.c=4;
  1741. ds.f=3;
  1742. ds.caller=caller;
  1743. ds.locals=locals;
  1744. locals[0]=(void**)&R;
  1745. se_dst=&ds;/*link*/
  1746. se_require_uppermost_flag=1;
  1747. if(f3value.assertion_flag){
  1748. f3value.assertion_flag=0;
  1749. se_trace(&ds,72,3,3);
  1750. ac_req(r3is_digit(&ds,C));
  1751. f3value.assertion_flag=1;
  1752. }
  1753. se_trace(&ds,74,3,3);
  1754. R=(((unsigned char)C))-(48);
  1755. if(f3value.assertion_flag){
  1756. f3value.assertion_flag=0;
  1757. se_trace(&ds,76,15,3);
  1758. ac_ens(r6_px_and(&ds,(0)<=(R),(R)<=(9)));
  1759. se_trace(&ds,77,22,3);
  1760. ac_ens((R)==((((unsigned char)C))-(48)));
  1761. f3value.assertion_flag=1;
  1762. }
  1763. se_dst=caller;/*unlink*/
  1764. return R;
  1765. }
  1766. se_frame_descriptor f3value={"value of CHARACTER",1,1,"%E3%Result%E2%",1};
  1767.  
  1768.  
  1769. T6 r8is_null(se_dump_stack*caller,T8 C){
  1770. T6 R=0;
  1771. void**locals[1];
  1772. se_dump_stack ds;
  1773. ds.fd=&f8is_null;
  1774. ds.current=((void**)&C);
  1775. ds.l=28;
  1776. ds.c=4;
  1777. ds.f=8;
  1778. ds.caller=caller;
  1779. ds.locals=locals;
  1780. locals[0]=(void**)&R;
  1781. se_dst=&ds;/*link*/
  1782. se_trace(&ds,31,3,8);
  1783. R=r6_ix_not(&ds,(NULL!=C));
  1784. se_dst=caller;/*unlink*/
  1785. return R;
  1786. }
  1787. se_frame_descriptor f8is_null={"is_null of POINTER",1,1,"%E8%Result%E6%",1};
  1788.  
  1789.  
  1790. T6 r6_px_or(se_dump_stack*caller,T6 C,T6 a1){
  1791. T6 R=0;
  1792. void**locals[2];
  1793. se_dump_stack ds;
  1794. ds.fd=&f6_px_or;
  1795. ds.current=((void**)&C);
  1796. ds.l=48;
  1797. ds.c=4;
  1798. ds.f=6;
  1799. ds.caller=caller;
  1800. ds.locals=locals;
  1801. locals[0]=(void**)&a1;
  1802. locals[1]=(void**)&R;
  1803. se_dst=&ds;/*link*/
  1804. se_require_uppermost_flag=1;
  1805. se_trace(&ds,55,3,6);
  1806. R=(C)||(a1);
  1807. se_dst=caller;/*unlink*/
  1808. return R;
  1809. }
  1810. se_frame_descriptor f6_px_or={"infix or of BOOLEAN",1,2,"%E6%other%E6%Result%E6%",1};
  1811.  
  1812.  
  1813. T6 r6_ix_not(se_dump_stack*caller,T6 C){
  1814. T6 R=0;
  1815. void**locals[1];
  1816. se_dump_stack ds;
  1817. ds.fd=&f6_ix_not;
  1818. ds.current=((void**)&C);
  1819. ds.l=73;
  1820. ds.c=12;
  1821. ds.f=6;
  1822. ds.caller=caller;
  1823. ds.locals=locals;
  1824. locals[0]=(void**)&R;
  1825. se_dst=&ds;/*link*/
  1826. /*[IF*/
  1827. if(C){
  1828. }
  1829. else{
  1830. se_trace(&ds,78,6,6);
  1831. R=1;
  1832. }
  1833. /*FI]*/
  1834. se_dst=caller;/*unlink*/
  1835. return R;
  1836. }
  1837. se_frame_descriptor f6_ix_not={"prefix not of BOOLEAN",1,1,"%E6%Result%E6%",1};
  1838.  
  1839.  
  1840. T6 r6_px_and(se_dump_stack*caller,T6 C,T6 a1){
  1841. T6 R=0;
  1842. void**locals[2];
  1843. se_dump_stack ds;
  1844. ds.fd=&f6_px_and;
  1845. ds.current=((void**)&C);
  1846. ds.l=28;
  1847. ds.c=4;
  1848. ds.f=6;
  1849. ds.caller=caller;
  1850. ds.locals=locals;
  1851. locals[0]=(void**)&a1;
  1852. locals[1]=(void**)&R;
  1853. se_dst=&ds;/*link*/
  1854. se_require_uppermost_flag=1;
  1855. se_trace(&ds,35,3,6);
  1856. R=(C)&&(a1);
  1857. se_dst=caller;/*unlink*/
  1858. return R;
  1859. }
  1860. se_frame_descriptor f6_px_and={"infix and of BOOLEAN",1,2,"%E6%other%E6%Result%E6%",1};
  1861.  
  1862.  
  1863. T2135 r2135realloc(se_dump_stack*caller,T2135 C,T2 a1,T2 a2){
  1864. T2135 R=NULL;
  1865. void**locals[3];
  1866. se_dump_stack ds;
  1867. ds.fd=&f2135realloc;
  1868. ds.current=((void**)&C);
  1869. ds.l=52;
  1870. ds.c=4;
  1871. ds.f=842;
  1872. ds.caller=caller;
  1873. ds.locals=locals;
  1874. locals[0]=(void**)&a1;
  1875. locals[1]=(void**)&a2;
  1876. locals[2]=(void**)&R;
  1877. se_dst=&ds;/*link*/
  1878. se_require_uppermost_flag=1;
  1879. if(f2135realloc.assertion_flag){
  1880. f2135realloc.assertion_flag=0;
  1881. se_trace(&ds,61,3,842);
  1882. ac_req(r2135is_not_null(&ds,C));
  1883. se_trace(&ds,62,15,842);
  1884. ac_req((a1)<(a2));
  1885. f2135realloc.assertion_flag=1;
  1886. }
  1887. se_trace(&ds,64,3,842);
  1888. R=new2135(a2);
  1889. se_trace(&ds,65,10,842);
  1890. r2135copy_from(&ds,R,C,(a1)-(1));
  1891. se_dst=caller;/*unlink*/
  1892. return R;
  1893. }
  1894. se_frame_descriptor f2135realloc={"realloc of NATIVE_ARRAY",1,3,"%E2135%old_nb_elts%E2%new_nb_elts%E2%Result%E2135%",1};
  1895.  
  1896.  
  1897. T6 r2135is_not_null(se_dump_stack*caller,T2135 C){
  1898. T6 R=0;
  1899. void**locals[1];
  1900. se_dump_stack ds;
  1901. ds.fd=&f2135is_not_null;
  1902. ds.current=((void**)&C);
  1903. ds.l=467;
  1904. ds.c=4;
  1905. ds.f=842;
  1906. ds.caller=caller;
  1907. ds.locals=locals;
  1908. locals[0]=(void**)&R;
  1909. se_dst=&ds;/*link*/
  1910. se_trace(&ds,469,3,842);
  1911. R=(NULL!=((void*)C));
  1912. se_dst=caller;/*unlink*/
  1913. return R;
  1914. }
  1915. se_frame_descriptor f2135is_not_null={"is_not_null of NATIVE_ARRAY",1,1,"%E2135%Result%E6%",1};
  1916.  
  1917.  
  1918. void r2135set_all_with(se_dump_stack*caller,T2135 C,T0* a1,T2 a2){
  1919. T2 _i=0;
  1920. void**locals[3];
  1921. se_dump_stack ds;
  1922. ds.fd=&f2135set_all_with;
  1923. ds.current=((void**)&C);
  1924. ds.l=285;
  1925. ds.c=4;
  1926. ds.f=842;
  1927. ds.caller=caller;
  1928. ds.locals=locals;
  1929. locals[0]=(void**)&a1;
  1930. locals[1]=(void**)&a2;
  1931. locals[2]=(void**)&_i;
  1932. se_dst=&ds;/*link*/
  1933. se_trace(&ds,292,6,842);
  1934. _i=a2;
  1935. while (!((se_trace(&ds,294,8,842),(_i)<(0)))) {
  1936. se_trace(&ds,296,6,842);
  1937. (C)[_i]=(a1);
  1938. se_trace(&ds,297,6,842);
  1939. _i=(_i)-(1);
  1940. }
  1941. se_dst=caller;/*unlink*/
  1942. }
  1943. se_frame_descriptor f2135set_all_with={"set_all_with of NATIVE_ARRAY",1,3,"%E2135%v%R7%upper%E2%i%E2%",1};
  1944.  
  1945.  
  1946. T6 r2135equal_like(se_dump_stack*caller,T0* a1,T0* a2){
  1947. T6 R=0;
  1948. void**locals[3];
  1949. se_dump_stack ds;
  1950. ds.fd=&f2135equal_like;
  1951. ds.current=NULL;
  1952. ds.l=488;
  1953. ds.c=11;
  1954. ds.f=842;
  1955. ds.caller=caller;
  1956. ds.locals=locals;
  1957. locals[0]=(void**)&a1;
  1958. locals[1]=(void**)&a2;
  1959. locals[2]=(void**)&R;
  1960. se_dst=&ds;/*link*/
  1961. /*[IF*/
  1962. /*AF*//*AF*/if((se_trace(&ds,497,13,842),(a1)==((void*)(a2)))){
  1963. se_trace(&ds,498,6,842);
  1964. R=1;
  1965. }
  1966.  else if((se_trace(&ds,499,20,842),((a1)==((void*)(NULL)))||((a2)==((void*)(NULL))))){
  1967. }
  1968. else{
  1969. se_trace(&ds,501,6,842);
  1970. R=r7is_equal(&ds,se_i7(&ds,((T7*)ci(7,a1,501,16,842))),a2);
  1971. }
  1972. /*FI]*/
  1973. se_dst=caller;/*unlink*/
  1974. return R;
  1975. }
  1976. se_frame_descriptor f2135equal_like={"equal_like of NATIVE_ARRAY",0,3,"e1%R7%e2%R7%Result%E6%",1};
  1977.  
  1978.  
  1979. void r2135copy_from(se_dump_stack*caller,T2135 C,T2135 a1,T2 a2){
  1980. T2 _i=0;
  1981. void**locals[3];
  1982. se_dump_stack ds;
  1983. ds.fd=&f2135copy_from;
  1984. ds.current=((void**)&C);
  1985. ds.l=338;
  1986. ds.c=4;
  1987. ds.f=842;
  1988. ds.caller=caller;
  1989. ds.locals=locals;
  1990. locals[0]=(void**)&a1;
  1991. locals[1]=(void**)&a2;
  1992. locals[2]=(void**)&_i;
  1993. se_dst=&ds;/*link*/
  1994. se_trace(&ds,344,6,842);
  1995. _i=a2;
  1996. while (!((se_trace(&ds,346,8,842),(_i)<(0)))) {
  1997. se_trace(&ds,348,6,842);
  1998. (C)[_i]=((a1)[_i]);
  1999. se_trace(&ds,349,6,842);
  2000. _i=(_i)-(1);
  2001. }
  2002. se_dst=caller;/*unlink*/
  2003. }
  2004. se_frame_descriptor f2135copy_from={"copy_from of NATIVE_ARRAY",1,3,"%E2135%model%E2135%upper%E2%i%E2%",1};
  2005.  
  2006.  
  2007. T6 r2135all_cleared(se_dump_stack*caller,T2135 C,T2 a1){
  2008. T6 R=0;
  2009. T0* _model=NULL;
  2010. T2 _i=0;
  2011. void**locals[4];
  2012. se_dump_stack ds;
  2013. ds.fd=&f2135all_cleared;
  2014. ds.current=((void**)&C);
  2015. ds.l=423;
  2016. ds.c=4;
  2017. ds.f=842;
  2018. ds.caller=caller;
  2019. ds.locals=locals;
  2020. locals[0]=(void**)&a1;
  2021. locals[1]=(void**)&R;
  2022. locals[2]=(void**)&_model;
  2023. locals[3]=(void**)&_i;
  2024. se_dst=&ds;/*link*/
  2025. se_require_uppermost_flag=1;
  2026. if(f2135all_cleared.assertion_flag){
  2027. f2135all_cleared.assertion_flag=0;
  2028. se_trace(&ds,427,9,842);
  2029. ac_req((a1)>=(-(1)));
  2030. f2135all_cleared.assertion_flag=1;
  2031. }
  2032. se_trace(&ds,433,6,842);
  2033. R=1;
  2034. se_trace(&ds,434,6,842);
  2035. _i=a1;
  2036. while (!((se_trace(&ds,436,12,842),((_i)<(0))||(r6_ix_not(&ds,R))))) {
  2037. se_trace(&ds,438,6,842);
  2038. R=(_model)==((void*)((C)[_i]));
  2039. se_trace(&ds,439,6,842);
  2040. _i=(_i)-(1);
  2041. }
  2042. se_dst=caller;/*unlink*/
  2043. return R;
  2044. }
  2045. se_frame_descriptor f2135all_cleared={"all_cleared of NATIVE_ARRAY",1,4,"%E2135%upper%E2%Result%E6%model%R7%i%E2%",1};
  2046.  
  2047.  
  2048. T6 r2135memcmp(se_dump_stack*caller,T2135 C,T2135 a1,T2 a2){
  2049. T6 R=0;
  2050. T2 _i=0;
  2051. void**locals[4];
  2052. se_dump_stack ds;
  2053. ds.fd=&f2135memcmp;
  2054. ds.current=((void**)&C);
  2055. ds.l=70;
  2056. ds.c=4;
  2057. ds.f=842;
  2058. ds.caller=caller;
  2059. ds.locals=locals;
  2060. locals[0]=(void**)&a1;
  2061. locals[1]=(void**)&a2;
  2062. locals[2]=(void**)&R;
  2063. locals[3]=(void**)&_i;
  2064. se_dst=&ds;/*link*/
  2065. se_require_uppermost_flag=1;
  2066. if(f2135memcmp.assertion_flag){
  2067. f2135memcmp.assertion_flag=0;
  2068. se_trace(&ds,76,16,842);
  2069. ac_req((!((a2)>(0)))||(r2135is_not_null(&ds,a1)));
  2070. f2135memcmp.assertion_flag=1;
  2071. }
  2072. se_trace(&ds,81,6,842);
  2073. R=1;
  2074. se_trace(&ds,82,6,842);
  2075. _i=(a2)-(1);
  2076. while (!((se_trace(&ds,84,12,842),((_i)<(0))||(r6_ix_not(&ds,R))))) {
  2077. se_trace(&ds,86,6,842);
  2078. R=r2135equal_like(&ds,(C)[_i],(a1)[_i]);
  2079. se_trace(&ds,87,6,842);
  2080. _i=(_i)-(1);
  2081. }
  2082. se_dst=caller;/*unlink*/
  2083. return R;
  2084. }
  2085. se_frame_descriptor f2135memcmp={"memcmp of NATIVE_ARRAY",1,4,"%E2135%other%E2135%capacity%E2%Result%E6%i%E2%",1};
  2086.  
  2087.  
  2088. T2 r2135index_of(se_dump_stack*caller,T2135 C,T0* a1,T2 a2){
  2089. T2 R=0;
  2090. void**locals[3];
  2091. se_dump_stack ds;
  2092. ds.fd=&f2135index_of;
  2093. ds.current=((void**)&C);
  2094. ds.l=111;
  2095. ds.c=4;
  2096. ds.f=842;
  2097. ds.caller=caller;
  2098. ds.locals=locals;
  2099. locals[0]=(void**)&a1;
  2100. locals[1]=(void**)&a2;
  2101. locals[2]=(void**)&R;
  2102. se_dst=&ds;/*link*/
  2103. se_require_uppermost_flag=1;
  2104. if(f2135index_of.assertion_flag){
  2105. f2135index_of.assertion_flag=0;
  2106. se_trace(&ds,116,9,842);
  2107. ac_req((a2)>=(-(1)));
  2108. f2135index_of.assertion_flag=1;
  2109. }
  2110. while (!((se_trace(&ds,120,21,842),((R)>(a2))||(r2135equal_like(&ds,a1,(C)[R]))))) {
  2111. se_trace(&ds,122,6,842);
  2112. R=(R)+(1);
  2113. }
  2114. se_dst=caller;/*unlink*/
  2115. return R;
  2116. }
  2117. se_frame_descriptor f2135index_of={"index_of of NATIVE_ARRAY",1,3,"%E2135%element%R7%upper%E2%Result%E2%",1};
  2118.  
  2119.  
  2120. T6 r9fast_memcmp(se_dump_stack*caller,T9 C,T9 a1,T2 a2){
  2121. T6 R=0;
  2122. T2 _i=0;
  2123. void**locals[4];
  2124. se_dump_stack ds;
  2125. ds.fd=&f9fast_memcmp;
  2126. ds.current=((void**)&C);
  2127. ds.l=91;
  2128. ds.c=4;
  2129. ds.f=842;
  2130. ds.caller=caller;
  2131. ds.locals=locals;
  2132. locals[0]=(void**)&a1;
  2133. locals[1]=(void**)&a2;
  2134. locals[2]=(void**)&R;
  2135. locals[3]=(void**)&_i;
  2136. se_dst=&ds;/*link*/
  2137. se_require_uppermost_flag=1;
  2138. if(f9fast_memcmp.assertion_flag){
  2139. f9fast_memcmp.assertion_flag=0;
  2140. se_trace(&ds,94,16,842);
  2141. ac_req((!((a2)>(0)))||(r9is_not_null(&ds,a1)));
  2142. f9fast_memcmp.assertion_flag=1;
  2143. }
  2144. se_trace(&ds,99,6,842);
  2145. R=1;
  2146. se_trace(&ds,100,6,842);
  2147. _i=(a2)-(1);
  2148. while (!((se_trace(&ds,102,12,842),((_i)<(0))||(r6_ix_not(&ds,R))))) {
  2149. se_trace(&ds,104,6,842);
  2150. R=((C)[_i])==((a1)[_i]);
  2151. se_trace(&ds,105,6,842);
  2152. _i=(_i)-(1);
  2153. }
  2154. se_dst=caller;/*unlink*/
  2155. return R;
  2156. }
  2157. se_frame_descriptor f9fast_memcmp={"fast_memcmp of NATIVE_ARRAY",1,4,"%E9%other%E9%capacity%E2%Result%E6%i%E2%",1};
  2158.  
  2159.  
  2160. T9 r9realloc(se_dump_stack*caller,T9 C,T2 a1,T2 a2){
  2161. T9 R=NULL;
  2162. void**locals[3];
  2163. se_dump_stack ds;
  2164. ds.fd=&f9realloc;
  2165. ds.current=((void**)&C);
  2166. ds.l=52;
  2167. ds.c=4;
  2168. ds.f=842;
  2169. ds.caller=caller;
  2170. ds.locals=locals;
  2171. locals[0]=(void**)&a1;
  2172. locals[1]=(void**)&a2;
  2173. locals[2]=(void**)&R;
  2174. se_dst=&ds;/*link*/
  2175. se_require_uppermost_flag=1;
  2176. if(f9realloc.assertion_flag){
  2177. f9realloc.assertion_flag=0;
  2178. se_trace(&ds,61,3,842);
  2179. ac_req(r9is_not_null(&ds,C));
  2180. se_trace(&ds,62,15,842);
  2181. ac_req((a1)<(a2));
  2182. f9realloc.assertion_flag=1;
  2183. }
  2184. se_trace(&ds,64,3,842);
  2185. R=new9(a2);
  2186. se_trace(&ds,65,10,842);
  2187. r9copy_from(&ds,R,C,(a1)-(1));
  2188. se_dst=caller;/*unlink*/
  2189. return R;
  2190. }
  2191. se_frame_descriptor f9realloc={"realloc of NATIVE_ARRAY",1,3,"%E9%old_nb_elts%E2%new_nb_elts%E2%Result%E9%",1};
  2192.  
  2193.  
  2194. T6 r9is_not_null(se_dump_stack*caller,T9 C){
  2195. T6 R=0;
  2196. void**locals[1];
  2197. se_dump_stack ds;
  2198. ds.fd=&f9is_not_null;
  2199. ds.current=((void**)&C);
  2200. ds.l=467;
  2201. ds.c=4;
  2202. ds.f=842;
  2203. ds.caller=caller;
  2204. ds.locals=locals;
  2205. locals[0]=(void**)&R;
  2206. se_dst=&ds;/*link*/
  2207. se_trace(&ds,469,3,842);
  2208. R=(NULL!=((void*)C));
  2209. se_dst=caller;/*unlink*/
  2210. return R;
  2211. }
  2212. se_frame_descriptor f9is_not_null={"is_not_null of NATIVE_ARRAY",1,1,"%E9%Result%E6%",1};
  2213.  
  2214.  
  2215. T6 r9fast_has(se_dump_stack*caller,T9 C,T3 a1,T2 a2){
  2216. T6 R=0;
  2217. T2 _i=0;
  2218. void**locals[4];
  2219. se_dump_stack ds;
  2220. ds.fd=&f9fast_has;
  2221. ds.current=((void**)&C);
  2222. ds.l=157;
  2223. ds.c=4;
  2224. ds.f=842;
  2225. ds.caller=caller;
  2226. ds.locals=locals;
  2227. locals[0]=(void**)&a1;
  2228. locals[1]=(void**)&a2;
  2229. locals[2]=(void**)&R;
  2230. locals[3]=(void**)&_i;
  2231. se_dst=&ds;/*link*/
  2232. se_require_uppermost_flag=1;
  2233. if(f9fast_has.assertion_flag){
  2234. f9fast_has.assertion_flag=0;
  2235. se_trace(&ds,161,9,842);
  2236. ac_req((a2)>=(-(1)));
  2237. f9fast_has.assertion_flag=1;
  2238. }
  2239. se_trace(&ds,166,6,842);
  2240. _i=a2;
  2241. while (!((se_trace(&ds,168,13,842),(R)||((_i)<(0))))) {
  2242. se_trace(&ds,170,6,842);
  2243. R=(a1)==((C)[_i]);
  2244. se_trace(&ds,171,6,842);
  2245. _i=(_i)-(1);
  2246. }
  2247. se_dst=caller;/*unlink*/
  2248. return R;
  2249. }
  2250. se_frame_descriptor f9fast_has={"fast_has of NATIVE_ARRAY",1,4,"%E9%element%E3%upper%E2%Result%E6%i%E2%",1};
  2251.  
  2252.  
  2253. void r9copy_from(se_dump_stack*caller,T9 C,T9 a1,T2 a2){
  2254. T2 _i=0;
  2255. void**locals[3];
  2256. se_dump_stack ds;
  2257. ds.fd=&f9copy_from;
  2258. ds.current=((void**)&C);
  2259. ds.l=338;
  2260. ds.c=4;
  2261. ds.f=842;
  2262. ds.caller=caller;
  2263. ds.locals=locals;
  2264. locals[0]=(void**)&a1;
  2265. locals[1]=(void**)&a2;
  2266. locals[2]=(void**)&_i;
  2267. se_dst=&ds;/*link*/
  2268. se_trace(&ds,344,6,842);
  2269. _i=a2;
  2270. while (!((se_trace(&ds,346,8,842),(_i)<(0)))) {
  2271. se_trace(&ds,348,6,842);
  2272. (C)[_i]=((a1)[_i]);
  2273. se_trace(&ds,349,6,842);
  2274. _i=(_i)-(1);
  2275. }
  2276. se_dst=caller;/*unlink*/
  2277. }
  2278. se_frame_descriptor f9copy_from={"copy_from of NATIVE_ARRAY",1,3,"%E9%model%E9%upper%E2%i%E2%",1};
  2279.  
  2280.  
  2281. T6 r7standard_is_equal(se_dump_stack*caller,T7* C,T0* a1){
  2282. T6 R=0;
  2283. void**locals[2];
  2284. se_dump_stack ds;
  2285. ds.fd=&f7standard_is_equal;
  2286. ds.current=((void**)&C);
  2287. ds.l=120;
  2288. ds.c=11;
  2289. ds.f=1;
  2290. ds.caller=caller;
  2291. ds.locals=locals;
  2292. locals[0]=(void**)&a1;
  2293. locals[1]=(void**)&R;
  2294. se_dst=&ds;/*link*/
  2295. se_require_uppermost_flag=1;
  2296. if(f7standard_is_equal.assertion_flag){
  2297. f7standard_is_equal.assertion_flag=0;
  2298. se_trace(&ds,123,9,1);
  2299. ac_req((a1)!=((void*)(NULL)));
  2300. f7standard_is_equal.assertion_flag=1;
  2301. }
  2302. R=((C->id==a1->id)?!memcmp(C,a1,sizeof(*C)):0);if(f7standard_is_equal.assertion_flag){
  2303. f7standard_is_equal.assertion_flag=0;
  2304. se_trace(&ds,126,21,1);
  2305. ac_ens((!(R))||(r7standard_is_equal(&ds,se_i7(&ds,((T7*)ci(7,a1,126,29,1))),(T0*)C)));
  2306. f7standard_is_equal.assertion_flag=1;
  2307. }
  2308. if(se_rci(C))se_i7(&ds,C);
  2309. se_dst=caller;/*unlink*/
  2310. return R;
  2311. }
  2312. se_frame_descriptor f7standard_is_equal={"standard_is_equal of GENERAL",1,2,"%R7%other%R7%Result%E6%",1};
  2313.  
  2314.  
  2315. T8 r7to_external(se_dump_stack*caller,T7* C){
  2316. T8 R=0;
  2317. T2 o7_1163_15=0;
  2318. void**locals[2];
  2319. se_dump_stack ds;
  2320. ds.fd=&f7to_external;
  2321. ds.current=((void**)&C);
  2322. ds.l=1146;
  2323. ds.c=4;
  2324. ds.f=7;
  2325. ds.caller=caller;
  2326. ds.locals=locals;
  2327. locals[0]=(void**)&R;
  2328. locals[1]=(void**)&o7_1163_15;
  2329. se_dst=&ds;/*link*/
  2330. o7_1163_15=(C)->_count/*8*/;
  2331. /*[IF*/
  2332. if((se_trace(&ds,1152,15,7),((C)->_capacity/*12*/)>((C)->_count/*8*/))){
  2333. se_trace(&ds,1153,6,7);
  2334. C->_count=((C)->_count/*8*/)+(1);
  2335. /*[IF*/
  2336. if((se_trace(&ds,1154,21,7),(r7item(&ds,C,(C)->_count/*8*/))!=('\0'))){
  2337. se_trace(&ds,1155,9,7);
  2338. r7put(&ds,C,'\0',(C)->_count/*8*/);
  2339. }
  2340. /*FI]*/
  2341. }
  2342. else{
  2343. se_trace(&ds,1158,6,7);
  2344. r7extend(&ds,C,'\0');
  2345. }
  2346. /*FI]*/
  2347. se_trace(&ds,1160,3,7);
  2348. C->_count=((C)->_count/*8*/)-(1);
  2349. se_trace(&ds,1161,3,7);
  2350. R=((void*)(C)->_storage/*4*/);
  2351. if(f7to_external.assertion_flag){
  2352. f7to_external.assertion_flag=0;
  2353. se_trace(&ds,1163,9,7);
  2354. ac_ens(((C)->_count/*8*/)==(o7_1163_15));
  2355. se_trace(&ds,1164,10,7);
  2356. ac_ens((NULL!=R));
  2357. f7to_external.assertion_flag=1;
  2358. }
  2359. if(se_rci(C))se_i7(&ds,C);
  2360. se_dst=caller;/*unlink*/
  2361. return R;
  2362. }
  2363. se_frame_descriptor f7to_external={"to_external of STRING",1,2,"%R7%Result%E8%old l1163c15STRING%E2%",1};
  2364.  
  2365.  
  2366. void r7from_external(se_dump_stack*caller,T7* C,T8 a1){
  2367. void**locals[1];
  2368. se_dump_stack ds;
  2369. ds.fd=&f7from_external;
  2370. ds.current=((void**)&C);
  2371. ds.l=1167;
  2372. ds.c=4;
  2373. ds.f=7;
  2374. ds.caller=caller;
  2375. ds.locals=locals;
  2376. locals[0]=(void**)&a1;
  2377. se_dst=&ds;/*link*/
  2378. se_require_uppermost_flag=1;
  2379. if(f7from_external.assertion_flag){
  2380. f7from_external.assertion_flag=0;
  2381. se_trace(&ds,1175,5,7);
  2382. ac_req((NULL!=a1));
  2383. f7from_external.assertion_flag=1;
  2384. }
  2385. se_trace(&ds,1178,6,7);
  2386. C->_storage=a1;
  2387. se_trace(&ds,1179,6,7);
  2388. C->_count=0;
  2389. while (!((se_trace(&ds,1181,26,7),(((C)->_storage/*4*/)[(C)->_count/*8*/])==('\0')))) {
  2390. se_trace(&ds,1183,6,7);
  2391. C->_count=((C)->_count/*8*/)+(1);
  2392. }
  2393. se_trace(&ds,1185,3,7);
  2394. C->_capacity=((C)->_count/*8*/)+(1);
  2395. if(f7from_external.assertion_flag){
  2396. f7from_external.assertion_flag=0;
  2397. se_trace(&ds,1187,12,7);
  2398. ac_ens(((C)->_capacity/*12*/)==(((C)->_count/*8*/)+(1)));
  2399. se_trace(&ds,1188,5,7);
  2400. ac_ens((a1)==(r7to_external(&ds,C)));
  2401. f7from_external.assertion_flag=1;
  2402. }
  2403. if(se_rci(C))se_i7(&ds,C);
  2404. se_dst=caller;/*unlink*/
  2405. }
  2406. se_frame_descriptor f7from_external={"from_external of STRING",1,1,"%R7%p%E8%",1};
  2407.  
  2408.  
  2409. T6 r7has(se_dump_stack*caller,T7* C,T3 a1){
  2410. T6 R=0;
  2411. void**locals[2];
  2412. se_dump_stack ds;
  2413. ds.fd=&f7has;
  2414. ds.current=((void**)&C);
  2415. ds.l=251;
  2416. ds.c=4;
  2417. ds.f=7;
  2418. ds.caller=caller;
  2419. ds.locals=locals;
  2420. locals[0]=(void**)&a1;
  2421. locals[1]=(void**)&R;
  2422. se_dst=&ds;/*link*/
  2423. se_trace(&ds,254,3,7);
  2424. R=r9fast_has(&ds,(C)->_storage/*4*/,a1,((C)->_count/*8*/)-(1));
  2425. if(se_rci(C))se_i7(&ds,C);
  2426. se_dst=caller;/*unlink*/
  2427. return R;
  2428. }
  2429. se_frame_descriptor f7has={"has of STRING",1,2,"%R7%ch%E3%Result%E6%",1};
  2430.  
  2431.  
  2432. T6 r7is_equal(se_dump_stack*caller,T7* C,T0* a1){
  2433. T6 R=0;
  2434. void**locals[2];
  2435. se_dump_stack ds;
  2436. ds.fd=&f7is_equal;
  2437. ds.current=((void**)&C);
  2438. ds.l=184;
  2439. ds.c=4;
  2440. ds.f=7;
  2441. ds.caller=caller;
  2442. ds.locals=locals;
  2443. locals[0]=(void**)&a1;
  2444. locals[1]=(void**)&R;
  2445. se_dst=&ds;/*link*/
  2446. se_require_uppermost_flag=1;
  2447. if(f7is_equal.assertion_flag){
  2448. f7is_equal.assertion_flag=0;
  2449. se_trace(&ds,95,25,1);
  2450. ac_req((a1)!=((void*)(NULL)));
  2451. f7is_equal.assertion_flag=1;
  2452. }
  2453. /*[IF*/
  2454. if((se_trace(&ds,187,14,7),(C)==((void*)(a1)))){
  2455. se_trace(&ds,188,6,7);
  2456. R=1;
  2457. }
  2458.  else if((se_trace(&ds,189,16,7),((C)->_count/*8*/)==((se_i7(&ds,((T7*)ci(7,a1,189,18,7))))->_count/*8*/))){
  2459. se_trace(&ds,190,6,7);
  2460. R=r9fast_memcmp(&ds,(C)->_storage/*4*/,(se_i7(&ds,((T7*)ci(7,a1,190,36,7))))->_storage/*4*/,(C)->_count/*8*/);
  2461. }
  2462. /*FI]*/
  2463. if(f7is_equal.assertion_flag){
  2464. f7is_equal.assertion_flag=0;
  2465. se_trace(&ds,98,40,1);
  2466. ac_ens((!(r7standard_is_equal(&ds,C,a1)))||(R));
  2467. se_trace(&ds,99,21,1);
  2468. ac_ens((!(R))||(r7is_equal(&ds,se_i7(&ds,((T7*)ci(7,a1,99,29,1))),(T0*)C)));
  2469. f7is_equal.assertion_flag=1;
  2470. }
  2471. if(se_rci(C))se_i7(&ds,C);
  2472. se_dst=caller;/*unlink*/
  2473. return R;
  2474. }
  2475. se_frame_descriptor f7is_equal={"is_equal of STRING",1,2,"%R7%other%R7%Result%E6%",1};
  2476.  
  2477.  
  2478. T3 r7item(se_dump_stack*caller,T7* C,T2 a1){
  2479. T3 R=0;
  2480. void**locals[2];
  2481. se_dump_stack ds;
  2482. ds.fd=&f7item;
  2483. ds.current=((void**)&C);
  2484. ds.l=81;
  2485. ds.c=4;
  2486. ds.f=7;
  2487. ds.caller=caller;
  2488. ds.locals=locals;
  2489. locals[0]=(void**)&a1;
  2490. locals[1]=(void**)&R;
  2491. se_dst=&ds;/*link*/
  2492. se_require_uppermost_flag=1;
  2493. if(f7item.assertion_flag){
  2494. f7item.assertion_flag=0;
  2495. se_trace(&ds,84,3,7);
  2496. ac_req(r7valid_index(&ds,C,a1));
  2497. f7item.assertion_flag=1;
  2498. }
  2499. se_trace(&ds,86,3,7);
  2500. R=((C)->_storage/*4*/)[(a1)-(1)];
  2501. if(se_rci(C))se_i7(&ds,C);
  2502. se_dst=caller;/*unlink*/
  2503. return R;
  2504. }
  2505. se_frame_descriptor f7item={"item of STRING",1,2,"%R7%index%E2%Result%E3%",1};
  2506.  
  2507.  
  2508. T6 r7valid_index(se_dump_stack*caller,T7* C,T2 a1){
  2509. T6 R=0;
  2510. void**locals[2];
  2511. se_dump_stack ds;
  2512. ds.fd=&f7valid_index;
  2513. ds.current=((void**)&C);
  2514. ds.l=89;
  2515. ds.c=4;
  2516. ds.f=7;
  2517. ds.caller=caller;
  2518. ds.locals=locals;
  2519. locals[0]=(void**)&a1;
  2520. locals[1]=(void**)&R;
  2521. se_dst=&ds;/*link*/
  2522. se_trace(&ds,92,3,7);
  2523. R=((1)<=(a1))&&((a1)<=((C)->_count/*8*/));
  2524. if(f7valid_index.assertion_flag){
  2525. f7valid_index.assertion_flag=0;
  2526. se_trace(&ds,94,10,7);
  2527. ac_ens((R)==(((1)<=(a1))&&((a1)<=((C)->_count/*8*/))));
  2528. f7valid_index.assertion_flag=1;
  2529. }
  2530. if(se_rci(C))se_i7(&ds,C);
  2531. se_dst=caller;/*unlink*/
  2532. return R;
  2533. }
  2534. se_frame_descriptor f7valid_index={"valid_index of STRING",1,2,"%R7%index%E2%Result%E6%",1};
  2535. /*No:STRING.count*/
  2536.  
  2537.  
  2538. void r7make(se_dump_stack*caller,T7* C,T2 a1){
  2539. void**locals[1];
  2540. se_dump_stack ds;
  2541. ds.fd=&f7make;
  2542. ds.current=((void**)&C);
  2543. ds.l=42;
  2544. ds.c=4;
  2545. ds.f=7;
  2546. ds.caller=caller;
  2547. ds.locals=locals;
  2548. locals[0]=(void**)&a1;
  2549. se_dst=&ds;/*link*/
  2550. se_require_uppermost_flag=1;
  2551. if(f7make.assertion_flag){
  2552. f7make.assertion_flag=0;
  2553. se_trace(&ds,46,19,7);
  2554. ac_req((a1)>=(0));
  2555. f7make.assertion_flag=1;
  2556. }
  2557. /*[IF*/
  2558. if((se_trace(&ds,48,22,7),(a1)>(0))){
  2559. /*[IF*/
  2560. if((se_trace(&ds,49,18,7),((C)->_capacity/*12*/)<(a1))){
  2561. se_trace(&ds,50,9,7);
  2562. C->_storage=new9(a1);
  2563. se_trace(&ds,51,9,7);
  2564. C->_capacity=a1;
  2565. }
  2566. /*FI]*/
  2567. }
  2568. /*FI]*/
  2569. se_trace(&ds,54,3,7);
  2570. C->_count=0;
  2571. if(f7make.assertion_flag){
  2572. f7make.assertion_flag=0;
  2573. se_trace(&ds,56,19,7);
  2574. ac_ens((a1)<=((C)->_capacity/*12*/));
  2575. se_trace(&ds,57,9,7);
  2576. ac_ens(((C)->_count/*8*/)==(0));
  2577. f7make.assertion_flag=1;
  2578. }
  2579. if(se_rci(C))se_i7(&ds,C);
  2580. se_dst=caller;/*unlink*/
  2581. }
  2582. se_frame_descriptor f7make={"make of STRING",1,1,"%R7%needed_capacity%E2%",1};
  2583.  
  2584.  
  2585. void r7extend(se_dump_stack*caller,T7* C,T3 a1){
  2586. T2 _new_capacity=0;
  2587. T2 o7_628_19=0;
  2588. void**locals[3];
  2589. se_dump_stack ds;
  2590. ds.fd=&f7extend;
  2591. ds.current=((void**)&C);
  2592. ds.l=611;
  2593. ds.c=4;
  2594. ds.f=7;
  2595. ds.caller=caller;
  2596. ds.locals=locals;
  2597. locals[0]=(void**)&a1;
  2598. locals[1]=(void**)&_new_capacity;
  2599. locals[2]=(void**)&o7_628_19;
  2600. se_dst=&ds;/*link*/
  2601. o7_628_19=(C)->_count/*8*/;
  2602. /*[IF*/
  2603. if((se_trace(&ds,616,15,7),((C)->_capacity/*12*/)>((C)->_count/*8*/))){
  2604. }
  2605.  else if((se_trace(&ds,617,19,7),((C)->_capacity/*12*/)==(0))){
  2606. se_trace(&ds,618,6,7);
  2607. C->_capacity=32;
  2608. se_trace(&ds,619,6,7);
  2609. C->_storage=new9((C)->_capacity/*12*/);
  2610. }
  2611. else{
  2612. se_trace(&ds,621,6,7);
  2613. _new_capacity=(2)*((C)->_capacity/*12*/);
  2614. se_trace(&ds,622,6,7);
  2615. C->_storage=r9realloc(&ds,(C)->_storage/*4*/,(C)->_capacity/*12*/,_new_capacity);
  2616. se_trace(&ds,623,6,7);
  2617. C->_capacity=_new_capacity;
  2618. }
  2619. /*FI]*/
  2620. se_trace(&ds,625,3,7);
  2621. C->_count=((C)->_count/*8*/)+(1);
  2622. se_trace(&ds,626,3,7);
  2623. r7put(&ds,C,a1,(C)->_count/*8*/);
  2624. if(f7extend.assertion_flag){
  2625. f7extend.assertion_flag=0;
  2626. se_trace(&ds,628,9,7);
  2627. ac_ens(((C)->_count/*8*/)==((1)+(o7_628_19)));
  2628. se_trace(&ds,629,16,7);
  2629. ac_ens((r7item(&ds,C,(C)->_count/*8*/))==(a1));
  2630. f7extend.assertion_flag=1;
  2631. }
  2632. if(se_rci(C))se_i7(&ds,C);
  2633. se_dst=caller;/*unlink*/
  2634. }
  2635. se_frame_descriptor f7extend={"extend (add_last of STRING)",1,3,"%R7%ch%E3%new_capacity%E2%old l628c19STRING%E2%",1};
  2636.  
  2637.  
  2638. void r7from_external_copy(se_dump_stack*caller,T7* C,T8 a1){
  2639. T9 _s=NULL;
  2640. void**locals[2];
  2641. se_dump_stack ds;
  2642. ds.fd=&f7from_external_copy;
  2643. ds.current=((void**)&C);
  2644. ds.l=1191;
  2645. ds.c=4;
  2646. ds.f=7;
  2647. ds.caller=caller;
  2648. ds.locals=locals;
  2649. locals[0]=(void**)&a1;
  2650. locals[1]=(void**)&_s;
  2651. se_dst=&ds;/*link*/
  2652. se_trace(&ds,1200,3,7);
  2653. r7from_external(&ds,C,a1);
  2654. se_trace(&ds,1201,3,7);
  2655. _s=new9((C)->_capacity/*12*/);
  2656. se_trace(&ds,1202,5,7);
  2657. r9copy_from(&ds,_s,(C)->_storage/*4*/,(C)->_capacity/*12*/);
  2658. se_trace(&ds,1203,3,7);
  2659. C->_storage=_s;
  2660. if(se_rci(C))se_i7(&ds,C);
  2661. se_dst=caller;/*unlink*/
  2662. }
  2663. se_frame_descriptor f7from_external_copy={"from_external_copy of STRING",1,2,"%R7%p%E8%s%E9%",1};
  2664.  
  2665.  
  2666. void r7clear(se_dump_stack*caller,T7* C){
  2667. se_dump_stack ds;
  2668. ds.fd=&f7clear;
  2669. ds.current=((void**)&C);
  2670. ds.l=404;
  2671. ds.c=4;
  2672. ds.f=7;
  2673. ds.caller=caller;
  2674. se_dst=&ds;/*link*/
  2675. se_trace(&ds,408,3,7);
  2676. C->_count=0;
  2677. if(f7clear.assertion_flag){
  2678. f7clear.assertion_flag=0;
  2679. se_trace(&ds,410,9,7);
  2680. ac_ens(((C)->_count/*8*/)==(0));
  2681. f7clear.assertion_flag=1;
  2682. }
  2683. if(se_rci(C))se_i7(&ds,C);
  2684. se_dst=caller;/*unlink*/
  2685. }
  2686. se_frame_descriptor f7clear={"clear of STRING",1,0,"%R7%",1};
  2687.  
  2688.  
  2689. void r7swap(se_dump_stack*caller,T7* C,T2 a1,T2 a2){
  2690. T3 _tmp=0;
  2691. T3 o7_524_18=0;
  2692. T3 o7_525_18=0;
  2693. void**locals[5];
  2694. se_dump_stack ds;
  2695. ds.fd=&f7swap;
  2696. ds.current=((void**)&C);
  2697. ds.l=513;
  2698. ds.c=4;
  2699. ds.f=7;
  2700. ds.caller=caller;
  2701. ds.locals=locals;
  2702. locals[0]=(void**)&a1;
  2703. locals[1]=(void**)&a2;
  2704. locals[2]=(void**)&_tmp;
  2705. locals[3]=(void**)&o7_524_18;
  2706. locals[4]=(void**)&o7_525_18;
  2707. se_dst=&ds;/*link*/
  2708. o7_524_18=r7item(&ds,C,a2);
  2709. o7_525_18=r7item(&ds,C,a1);
  2710. se_require_uppermost_flag=1;
  2711. if(f7swap.assertion_flag){
  2712. f7swap.assertion_flag=0;
  2713. se_trace(&ds,515,3,7);
  2714. ac_req(r7valid_index(&ds,C,a1));
  2715. se_trace(&ds,516,3,7);
  2716. ac_req(r7valid_index(&ds,C,a2));
  2717. f7swap.assertion_flag=1;
  2718. }
  2719. se_trace(&ds,520,3,7);
  2720. _tmp=r7item(&ds,C,a1);
  2721. se_trace(&ds,521,3,7);
  2722. r7put(&ds,C,r7item(&ds,C,a2),a1);
  2723. se_trace(&ds,522,3,7);
  2724. r7put(&ds,C,_tmp,a2);
  2725. if(f7swap.assertion_flag){
  2726. f7swap.assertion_flag=0;
  2727. se_trace(&ds,524,12,7);
  2728. ac_ens((r7item(&ds,C,a1))==(o7_524_18));
  2729. se_trace(&ds,525,12,7);
  2730. ac_ens((r7item(&ds,C,a2))==(o7_525_18));
  2731. f7swap.assertion_flag=1;
  2732. }
  2733. if(se_rci(C))se_i7(&ds,C);
  2734. se_dst=caller;/*unlink*/
  2735. }
  2736. se_frame_descriptor f7swap={"swap of STRING",1,5,"%R7%i1%E2%i2%E2%tmp%E3%old l524c18STRING%E3%old l525c18STRING%E3%",1};
  2737.  
  2738.  
  2739. T6 r7empty(se_dump_stack*caller,T7* C){
  2740. T6 R=0;
  2741. void**locals[1];
  2742. se_dump_stack ds;
  2743. ds.fd=&f7empty;
  2744. ds.current=((void**)&C);
  2745. ds.l=75;
  2746. ds.c=4;
  2747. ds.f=7;
  2748. ds.caller=caller;
  2749. ds.locals=locals;
  2750. locals[0]=(void**)&R;
  2751. se_dst=&ds;/*link*/
  2752. se_trace(&ds,78,3,7);
  2753. R=((C)->_count/*8*/)==(0);
  2754. if(se_rci(C))se_i7(&ds,C);
  2755. se_dst=caller;/*unlink*/
  2756. return R;
  2757. }
  2758. se_frame_descriptor f7empty={"empty of STRING",1,1,"%R7%Result%E6%",1};
  2759. /*No:STRING.capacity*/
  2760.  
  2761.  
  2762. void r7put(se_dump_stack*caller,T7* C,T3 a1,T2 a2){
  2763. void**locals[2];
  2764. se_dump_stack ds;
  2765. ds.fd=&f7put;
  2766. ds.current=((void**)&C);
  2767. ds.l=503;
  2768. ds.c=4;
  2769. ds.f=7;
  2770. ds.caller=caller;
  2771. ds.locals=locals;
  2772. locals[0]=(void**)&a1;
  2773. locals[1]=(void**)&a2;
  2774. se_dst=&ds;/*link*/
  2775. se_require_uppermost_flag=1;
  2776. if(f7put.assertion_flag){
  2777. f7put.assertion_flag=0;
  2778. se_trace(&ds,506,3,7);
  2779. ac_req(r7valid_index(&ds,C,a2));
  2780. f7put.assertion_flag=1;
  2781. }
  2782. se_trace(&ds,508,11,7);
  2783. ((C)->_storage/*4*/)[(a2)-(1)]=(a1);
  2784. if(f7put.assertion_flag){
  2785. f7put.assertion_flag=0;
  2786. se_trace(&ds,510,16,7);
  2787. ac_ens((r7item(&ds,C,a2))==(a1));
  2788. f7put.assertion_flag=1;
  2789. }
  2790. if(se_rci(C))se_i7(&ds,C);
  2791. se_dst=caller;/*unlink*/
  2792. }
  2793. se_frame_descriptor f7put={"put of STRING",1,2,"%R7%ch%E3%index%E2%",1};
  2794. /*No:STRING.storage*/
  2795. se_frame_descriptor se_ifd7={"Class invariant of STRING",1,0,"%R7%",1};
  2796.  
  2797.  
  2798. T7*se_i7(se_dump_stack*caller,T7*C){
  2799. se_dump_stack ds;
  2800. ds.fd=&se_ifd7;
  2801. ds.current=((void**)&C);
  2802. ds.l=0;
  2803. ds.c=0;
  2804. ds.f=0;
  2805. ds.caller=caller;
  2806. se_dst=&ds;
  2807. if(ds.fd->assertion_flag){
  2808. ds.fd->assertion_flag=0;
  2809. se_trace(&ds,1256,6,7);
  2810. ac_inv((0)<=((C)->_count/*8*/));
  2811. se_trace(&ds,1258,10,7);
  2812. ac_inv(((C)->_count/*8*/)<=((C)->_capacity/*12*/));
  2813. se_trace(&ds,1260,17,7);
  2814. ac_inv((!(((C)->_capacity/*12*/)>(0)))||(r9is_not_null(&ds,(C)->_storage/*4*/)));
  2815. ds.fd->assertion_flag=1;
  2816. }
  2817. se_dst=caller;
  2818. return C;
  2819. }
  2820.  
  2821.  
  2822. void r1886with_capacity(se_dump_stack*caller,T1886* C,T2 a1){
  2823. void**locals[1];
  2824. se_dump_stack ds;
  2825. ds.fd=&f1886with_capacity;
  2826. ds.current=((void**)&C);
  2827. ds.l=58;
  2828. ds.c=4;
  2829. ds.f=674;
  2830. ds.caller=caller;
  2831. ds.locals=locals;
  2832. locals[0]=(void**)&a1;
  2833. se_dst=&ds;/*link*/
  2834. /*[IF*/
  2835. if((se_trace(&ds,61,15,674),((C)->_capacity/*8*/)<(a1))){
  2836. se_trace(&ds,62,6,674);
  2837. C->_storage=new2135(a1);
  2838. se_trace(&ds,63,6,674);
  2839. C->_capacity=a1;
  2840. }
  2841. /*FI]*/
  2842. se_trace(&ds,65,3,674);
  2843. C->_upper=-(1);
  2844. if(f1886with_capacity.assertion_flag){
  2845. f1886with_capacity.assertion_flag=0;
  2846. se_trace(&ds,67,12,674);
  2847. ac_ens(((C)->_capacity/*8*/)>=(a1));
  2848. se_trace(&ds,68,3,674);
  2849. ac_ens(r1886empty(&ds,C));
  2850. f1886with_capacity.assertion_flag=1;
  2851. }
  2852. if(se_rci(C))se_i1886(&ds,C);
  2853. se_dst=caller;/*unlink*/
  2854. }
  2855. se_frame_descriptor f1886with_capacity={"with_capacity of FIXED_ARRAY",1,1,"%R1886%needed_capacity%E2%",1};
  2856.  
  2857.  
  2858. T6 r1886standard_is_equal(se_dump_stack*caller,T1886* C,T0* a1){
  2859. T6 R=0;
  2860. void**locals[2];
  2861. se_dump_stack ds;
  2862. ds.fd=&f1886standard_is_equal;
  2863. ds.current=((void**)&C);
  2864. ds.l=120;
  2865. ds.c=11;
  2866. ds.f=1;
  2867. ds.caller=caller;
  2868. ds.locals=locals;
  2869. locals[0]=(void**)&a1;
  2870. locals[1]=(void**)&R;
  2871. se_dst=&ds;/*link*/
  2872. se_require_uppermost_flag=1;
  2873. if(f1886standard_is_equal.assertion_flag){
  2874. f1886standard_is_equal.assertion_flag=0;
  2875. se_trace(&ds,123,9,1);
  2876. ac_req((a1)!=((void*)(NULL)));
  2877. f1886standard_is_equal.assertion_flag=1;
  2878. }
  2879. R=((C->id==a1->id)?!memcmp(C,a1,sizeof(*C)):0);if(f1886standard_is_equal.assertion_flag){
  2880. f1886standard_is_equal.assertion_flag=0;
  2881. se_trace(&ds,126,21,1);
  2882. ac_ens((!(R))||(r1886standard_is_equal(&ds,se_i1886(&ds,((T1886*)ci(1886,a1,126,29,1))),(T0*)C)));
  2883. f1886standard_is_equal.assertion_flag=1;
  2884. }
  2885. if(se_rci(C))se_i1886(&ds,C);
  2886. se_dst=caller;/*unlink*/
  2887. return R;
  2888. }
  2889. se_frame_descriptor f1886standard_is_equal={"standard_is_equal of GENERAL",1,2,"%R1886%other%R1886%Result%E6%",1};
  2890.  
  2891.  
  2892. T6 r1886has(se_dump_stack*caller,T1886* C,T0* a1){
  2893. T6 R=0;
  2894. void**locals[2];
  2895. se_dump_stack ds;
  2896. ds.fd=&f1886has;
  2897. ds.current=((void**)&C);
  2898. ds.l=265;
  2899. ds.c=4;
  2900. ds.f=592;
  2901. ds.caller=caller;
  2902. ds.locals=locals;
  2903. locals[0]=(void**)&a1;
  2904. locals[1]=(void**)&R;
  2905. se_dst=&ds;/*link*/
  2906. se_trace(&ds,269,3,592);
  2907. R=r1886valid_index(&ds,C,r1886index_of(&ds,C,a1));
  2908. if(se_rci(C))se_i1886(&ds,C);
  2909. se_dst=caller;/*unlink*/
  2910. return R;
  2911. }
  2912. se_frame_descriptor f1886has={"has of COLLECTION",1,2,"%R1886%x%R7%Result%E6%",1};
  2913.  
  2914.  
  2915. void r1886clear_all(se_dump_stack*caller,T1886* C){
  2916. T0* _value=NULL;
  2917. T2 o592_158_15=0;
  2918. void**locals[2];
  2919. se_dump_stack ds;
  2920. ds.fd=&f1886clear_all;
  2921. ds.current=((void**)&C);
  2922. ds.l=150;
  2923. ds.c=4;
  2924. ds.f=592;
  2925. ds.caller=caller;
  2926. ds.locals=locals;
  2927. locals[0]=(void**)&_value;
  2928. locals[1]=(void**)&o592_158_15;
  2929. se_dst=&ds;/*link*/
  2930. o592_158_15=r1886count(&ds,C);
  2931. se_trace(&ds,156,3,592);
  2932. r1886set_all_with(&ds,C,_value);
  2933. if(f1886clear_all.assertion_flag){
  2934. f1886clear_all.assertion_flag=0;
  2935. se_trace(&ds,158,9,592);
  2936. ac_ens((r1886count(&ds,C))==(o592_158_15));
  2937. se_trace(&ds,159,3,592);
  2938. ac_ens(r1886all_cleared(&ds,C));
  2939. f1886clear_all.assertion_flag=1;
  2940. }
  2941. if(se_rci(C))se_i1886(&ds,C);
  2942. se_dst=caller;/*unlink*/
  2943. }
  2944. se_frame_descriptor f1886clear_all={"clear_all of COLLECTION",1,2,"%R1886%value%R7%old l158c15COLLECTION%E2%",1};
  2945.  
  2946.  
  2947. void r1886add_last(se_dump_stack*caller,T1886* C,T0* a1){
  2948. T2 _new_capacity=0;
  2949. T2 o592_180_19=0;
  2950. T2 o592_181_15=0;
  2951. T2 o592_182_19=0;
  2952. void**locals[5];
  2953. se_dump_stack ds;
  2954. ds.fd=&f1886add_last;
  2955. ds.current=((void**)&C);
  2956. ds.l=158;
  2957. ds.c=4;
  2958. ds.f=674;
  2959. ds.caller=caller;
  2960. ds.locals=locals;
  2961. locals[0]=(void**)&a1;
  2962. locals[1]=(void**)&_new_capacity;
  2963. locals[2]=(void**)&o592_180_19;
  2964. locals[3]=(void**)&o592_181_15;
  2965. locals[4]=(void**)&o592_182_19;
  2966. se_dst=&ds;/*link*/
  2967. o592_180_19=r1886count(&ds,C);
  2968. o592_181_15=0;
  2969. o592_182_19=(C)->_upper/*12*/;
  2970. /*[IF*/
  2971. if((se_trace(&ds,162,16,674),(((C)->_upper/*12*/)+(1))<=(((C)->_capacity/*8*/)-(1)))){
  2972. se_trace(&ds,163,6,674);
  2973. C->_upper=((C)->_upper/*12*/)+(1);
  2974. }
  2975.  else if((se_trace(&ds,164,19,674),((C)->_capacity/*8*/)==(0))){
  2976. se_trace(&ds,165,6,674);
  2977. C->_storage=new2135(2);
  2978. se_trace(&ds,166,6,674);
  2979. C->_capacity=2;
  2980. se_trace(&ds,167,6,674);
  2981. C->_upper=0;
  2982. }
  2983. else{
  2984. se_trace(&ds,169,6,674);
  2985. _new_capacity=(2)*((C)->_capacity/*8*/);
  2986. se_trace(&ds,170,6,674);
  2987. C->_storage=r2135realloc(&ds,(C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  2988. se_trace(&ds,171,6,674);
  2989. C->_capacity=_new_capacity;
  2990. se_trace(&ds,172,6,674);
  2991. C->_upper=((C)->_upper/*12*/)+(1);
  2992. }
  2993. /*FI]*/
  2994. se_trace(&ds,174,3,674);
  2995. r1886put(&ds,C,a1,(C)->_upper/*12*/);
  2996. if(f1886add_last.assertion_flag){
  2997. f1886add_last.assertion_flag=0;
  2998. se_trace(&ds,179,8,592);
  2999. ac_ens((r1886last(&ds,C))==((void*)(a1)));
  3000. se_trace(&ds,180,9,592);
  3001. ac_ens((r1886count(&ds,C))==((1)+(o592_180_19)));
  3002. se_trace(&ds,181,9,592);
  3003. ac_ens((0)==(o592_181_15));
  3004. se_trace(&ds,182,9,592);
  3005. ac_ens(((C)->_upper/*12*/)==((1)+(o592_182_19)));
  3006. f1886add_last.assertion_flag=1;
  3007. }
  3008. if(se_rci(C))se_i1886(&ds,C);
  3009. se_dst=caller;/*unlink*/
  3010. }
  3011. se_frame_descriptor f1886add_last={"add_last of FIXED_ARRAY",1,5,"%R1886%element%R7%new_capacity%E2%old l180c19COLLECTION%E2%old l181c15COLLECTION%E2%old l182c19COLLECTION%E2%",1};
  3012.  
  3013.  
  3014. T6 r1886is_equal(se_dump_stack*caller,T1886* C,T0* a1){
  3015. T6 R=0;
  3016. void**locals[2];
  3017. se_dump_stack ds;
  3018. ds.fd=&f1886is_equal;
  3019. ds.current=((void**)&C);
  3020. ds.l=234;
  3021. ds.c=4;
  3022. ds.f=674;
  3023. ds.caller=caller;
  3024. ds.locals=locals;
  3025. locals[0]=(void**)&a1;
  3026. locals[1]=(void**)&R;
  3027. se_dst=&ds;/*link*/
  3028. se_require_uppermost_flag=1;
  3029. if(f1886is_equal.assertion_flag){
  3030. f1886is_equal.assertion_flag=0;
  3031. se_trace(&ds,95,25,1);
  3032. ac_req((a1)!=((void*)(NULL)));
  3033. f1886is_equal.assertion_flag=1;
  3034. }
  3035. /*[IF*/
  3036. if((se_trace(&ds,236,14,674),(C)==((void*)(a1)))){
  3037. se_trace(&ds,237,6,674);
  3038. R=1;
  3039. }
  3040.  else if((se_trace(&ds,238,16,674),((C)->_upper/*12*/)==((se_i1886(&ds,((T1886*)ci(1886,a1,238,18,674))))->_upper/*12*/))){
  3041. se_trace(&ds,239,6,674);
  3042. R=r2135memcmp(&ds,(C)->_storage/*4*/,(se_i1886(&ds,((T1886*)ci(1886,a1,239,31,674))))->_storage/*4*/,((C)->_upper/*12*/)+(1));
  3043. }
  3044. /*FI]*/
  3045. if(f1886is_equal.assertion_flag){
  3046. f1886is_equal.assertion_flag=0;
  3047. se_trace(&ds,98,40,1);
  3048. ac_ens((!(r1886standard_is_equal(&ds,C,a1)))||(R));
  3049. se_trace(&ds,99,21,1);
  3050. ac_ens((!(R))||(r1886is_equal(&ds,se_i1886(&ds,((T1886*)ci(1886,a1,99,29,1))),(T0*)C)));
  3051. f1886is_equal.assertion_flag=1;
  3052. }
  3053. if(se_rci(C))se_i1886(&ds,C);
  3054. se_dst=caller;/*unlink*/
  3055. return R;
  3056. }
  3057. se_frame_descriptor f1886is_equal={"is_equal of FIXED_ARRAY",1,2,"%R1886%other%R1886%Result%E6%",1};
  3058.  
  3059.  
  3060. T0* r1886item(se_dump_stack*caller,T1886* C,T2 a1){
  3061. T0* R=NULL;
  3062. void**locals[2];
  3063. se_dump_stack ds;
  3064. ds.fd=&f1886item;
  3065. ds.current=((void**)&C);
  3066. ds.l=136;
  3067. ds.c=4;
  3068. ds.f=674;
  3069. ds.caller=caller;
  3070. ds.locals=locals;
  3071. locals[0]=(void**)&a1;
  3072. locals[1]=(void**)&R;
  3073. se_dst=&ds;/*link*/
  3074. se_require_uppermost_flag=1;
  3075. if(f1886item.assertion_flag){
  3076. f1886item.assertion_flag=0;
  3077. se_trace(&ds,73,3,592);
  3078. ac_req(r1886valid_index(&ds,C,a1));
  3079. f1886item.assertion_flag=1;
  3080. }
  3081. se_trace(&ds,138,3,674);
  3082. R=((C)->_storage/*4*/)[a1];
  3083. if(se_rci(C))se_i1886(&ds,C);
  3084. se_dst=caller;/*unlink*/
  3085. return R;
  3086. }
  3087. se_frame_descriptor f1886item={"item of FIXED_ARRAY",1,2,"%R1886%index%E2%Result%R7%",1};
  3088.  
  3089.  
  3090. void r1886set_all_with(se_dump_stack*caller,T1886* C,T0* a1){
  3091. T2 o592_126_15=0;
  3092. void**locals[2];
  3093. se_dump_stack ds;
  3094. ds.fd=&f1886set_all_with;
  3095. ds.current=((void**)&C);
  3096. ds.l=210;
  3097. ds.c=4;
  3098. ds.f=674;
  3099. ds.caller=caller;
  3100. ds.locals=locals;
  3101. locals[0]=(void**)&a1;
  3102. locals[1]=(void**)&o592_126_15;
  3103. se_dst=&ds;/*link*/
  3104. o592_126_15=r1886count(&ds,C);
  3105. se_trace(&ds,212,11,674);
  3106. r2135set_all_with(&ds,(C)->_storage/*4*/,a1,(C)->_upper/*12*/);
  3107. if(f1886set_all_with.assertion_flag){
  3108. f1886set_all_with.assertion_flag=0;
  3109. se_trace(&ds,126,9,592);
  3110. ac_ens((r1886count(&ds,C))==(o592_126_15));
  3111. f1886set_all_with.assertion_flag=1;
  3112. }
  3113. if(se_rci(C))se_i1886(&ds,C);
  3114. se_dst=caller;/*unlink*/
  3115. }
  3116. se_frame_descriptor f1886set_all_with={"set_all_with of FIXED_ARRAY",1,2,"%R1886%v%R7%old l126c15COLLECTION%E2%",1};
  3117.  
  3118.  
  3119. T6 r1886valid_index(se_dump_stack*caller,T1886* C,T2 a1){
  3120. T6 R=0;
  3121. void**locals[2];
  3122. se_dump_stack ds;
  3123. ds.fd=&f1886valid_index;
  3124. ds.current=((void**)&C);
  3125. ds.l=44;
  3126. ds.c=11;
  3127. ds.f=592;
  3128. ds.caller=caller;
  3129. ds.locals=locals;
  3130. locals[0]=(void**)&a1;
  3131. locals[1]=(void**)&R;
  3132. se_dst=&ds;/*link*/
  3133. se_trace(&ds,48,3,592);
  3134. R=((0)<=(a1))&&((a1)<=((C)->_upper/*12*/));
  3135. if(f1886valid_index.assertion_flag){
  3136. f1886valid_index.assertion_flag=0;
  3137. se_trace(&ds,50,10,592);
  3138. ac_ens((R)==(((0)<=(a1))&&((a1)<=((C)->_upper/*12*/))));
  3139. f1886valid_index.assertion_flag=1;
  3140. }
  3141. if(se_rci(C))se_i1886(&ds,C);
  3142. se_dst=caller;/*unlink*/
  3143. return R;
  3144. }
  3145. se_frame_descriptor f1886valid_index={"valid_index of COLLECTION",1,2,"%R1886%index%E2%Result%E6%",1};
  3146.  
  3147.  
  3148. T0* r1886last(se_dump_stack*caller,T1886* C){
  3149. T0* R=NULL;
  3150. void**locals[1];
  3151. se_dump_stack ds;
  3152. ds.fd=&f1886last;
  3153. ds.current=((void**)&C);
  3154. ds.l=85;
  3155. ds.c=4;
  3156. ds.f=592;
  3157. ds.caller=caller;
  3158. ds.locals=locals;
  3159. locals[0]=(void**)&R;
  3160. se_dst=&ds;/*link*/
  3161. se_require_uppermost_flag=1;
  3162. if(f1886last.assertion_flag){
  3163. f1886last.assertion_flag=0;
  3164. se_trace(&ds,88,9,592);
  3165. ac_req((r1886count(&ds,C))>=(1));
  3166. f1886last.assertion_flag=1;
  3167. }
  3168. se_trace(&ds,90,3,592);
  3169. R=r1886item(&ds,C,(C)->_upper/*12*/);
  3170. if(se_rci(C))se_i1886(&ds,C);
  3171. se_dst=caller;/*unlink*/
  3172. return R;
  3173. }
  3174. se_frame_descriptor f1886last={"last of COLLECTION",1,1,"%R1886%Result%R7%",1};
  3175. /*No:FIXED_ARRAY[STRING].lower*/
  3176.  
  3177.  
  3178. T2 r1886count(se_dump_stack*caller,T1886* C){
  3179. T2 R=0;
  3180. void**locals[1];
  3181. se_dump_stack ds;
  3182. ds.fd=&f1886count;
  3183. ds.current=((void**)&C);
  3184. ds.l=177;
  3185. ds.c=4;
  3186. ds.f=674;
  3187. ds.caller=caller;
  3188. ds.locals=locals;
  3189. locals[0]=(void**)&R;
  3190. se_dst=&ds;/*link*/
  3191. se_trace(&ds,179,3,674);
  3192. R=((C)->_upper/*12*/)+(1);
  3193. if(f1886count.assertion_flag){
  3194. f1886count.assertion_flag=0;
  3195. se_trace(&ds,59,10,592);
  3196. ac_ens((R)==((((C)->_upper/*12*/)-(0))+(1)));
  3197. f1886count.assertion_flag=1;
  3198. }
  3199. if(se_rci(C))se_i1886(&ds,C);
  3200. se_dst=caller;/*unlink*/
  3201. return R;
  3202. }
  3203. se_frame_descriptor f1886count={"count of FIXED_ARRAY",1,1,"%R1886%Result%E2%",1};
  3204.  
  3205.  
  3206. void r1886make(se_dump_stack*caller,T1886* C,T2 a1){
  3207. T2 o674_54_19=0;
  3208. void**locals[2];
  3209. se_dump_stack ds;
  3210. ds.fd=&f1886make;
  3211. ds.current=((void**)&C);
  3212. ds.l=32;
  3213. ds.c=4;
  3214. ds.f=674;
  3215. ds.caller=caller;
  3216. ds.locals=locals;
  3217. locals[0]=(void**)&a1;
  3218. locals[1]=(void**)&o674_54_19;
  3219. se_dst=&ds;/*link*/
  3220. o674_54_19=(C)->_capacity/*8*/;
  3221. se_require_uppermost_flag=1;
  3222. if(f1886make.assertion_flag){
  3223. f1886make.assertion_flag=0;
  3224. se_trace(&ds,36,13,674);
  3225. ac_req((a1)>=(0));
  3226. f1886make.assertion_flag=1;
  3227. }
  3228. /*[IF*/
  3229. if((se_trace(&ds,38,16,674),(a1)==(0))){
  3230. se_trace(&ds,39,6,674);
  3231. C->_upper=-(1);
  3232. }
  3233.  else if((se_trace(&ds,40,19,674),((C)->_capacity/*8*/)==(0))){
  3234. se_trace(&ds,41,6,674);
  3235. C->_storage=new2135(a1);
  3236. se_trace(&ds,42,6,674);
  3237. C->_capacity=a1;
  3238. se_trace(&ds,43,6,674);
  3239. C->_upper=(a1)-(1);
  3240. }
  3241.  else if((se_trace(&ds,44,19,674),((C)->_capacity/*8*/)<(a1))){
  3242. se_trace(&ds,45,6,674);
  3243. C->_storage=new2135(a1);
  3244. se_trace(&ds,46,6,674);
  3245. C->_capacity=a1;
  3246. se_trace(&ds,47,6,674);
  3247. C->_upper=(a1)-(1);
  3248. }
  3249. else{
  3250. se_trace(&ds,49,6,674);
  3251. C->_upper=(a1)-(1);
  3252. se_trace(&ds,50,6,674);
  3253. r1886clear_all(&ds,C);
  3254. }
  3255. /*FI]*/
  3256. if(f1886make.assertion_flag){
  3257. f1886make.assertion_flag=0;
  3258. se_trace(&ds,53,9,674);
  3259. ac_ens((r1886count(&ds,C))==(a1));
  3260. se_trace(&ds,54,12,674);
  3261. ac_ens(((C)->_capacity/*8*/)>=(o674_54_19));
  3262. se_trace(&ds,55,3,674);
  3263. ac_ens(r1886all_cleared(&ds,C));
  3264. f1886make.assertion_flag=1;
  3265. }
  3266. if(se_rci(C))se_i1886(&ds,C);
  3267. se_dst=caller;/*unlink*/
  3268. }
  3269. se_frame_descriptor f1886make={"make of FIXED_ARRAY",1,2,"%R1886%new_count%E2%old l54c19FIXED_ARRAY%E2%",1};
  3270.  
  3271.  
  3272. T6 r1886equal(se_dump_stack*caller,T1886* C,T0* a1,T0* a2){
  3273. T6 R=0;
  3274. void**locals[3];
  3275. se_dump_stack ds;
  3276. ds.fd=&f1886equal;
  3277. ds.current=((void**)&C);
  3278. ds.l=74;
  3279. ds.c=11;
  3280. ds.f=1;
  3281. ds.caller=caller;
  3282. ds.locals=locals;
  3283. locals[0]=(void**)&a1;
  3284. locals[1]=(void**)&a2;
  3285. locals[2]=(void**)&R;
  3286. se_dst=&ds;/*link*/
  3287. /*[IF*/
  3288. if((se_trace(&ds,78,11,1),(a1)==((void*)(a2)))){
  3289. se_trace(&ds,79,6,1);
  3290. R=1;
  3291. }
  3292.  else if((se_trace(&ds,80,15,1),(a1)==((void*)(NULL)))){
  3293. }
  3294.  else if((se_trace(&ds,81,16,1),(a2)==((void*)(NULL)))){
  3295. }
  3296. else{
  3297. se_trace(&ds,83,6,1);
  3298. R=X98is_equal(&ds,83,16,1,a1,a2);
  3299. }
  3300. /*FI]*/
  3301. if(f1886equal.assertion_flag){
  3302. f1886equal.assertion_flag=0;
  3303. se_trace(&ds,86,55,1);
  3304. ac_ens(((R)==(r6_px_and(&ds,(a1)==((void*)(NULL)),(a2)==((void*)(NULL)))))||((r6_px_and(&ds,(a1)!=((void*)(NULL)),(a2)!=((void*)(NULL))))&&(X98is_equal(&ds,88,9,1,a1,a2))));
  3305. f1886equal.assertion_flag=1;
  3306. }
  3307. if(se_rci(C))se_i1886(&ds,C);
  3308. se_dst=caller;/*unlink*/
  3309. return R;
  3310. }
  3311. se_frame_descriptor f1886equal={"equal of GENERAL",1,3,"%R1886%some%R98%other%R98%Result%E6%",1};
  3312. /*No:FIXED_ARRAY[STRING].upper*/
  3313.  
  3314.  
  3315. void r1886clear(se_dump_stack*caller,T1886* C){
  3316. T2 o674_186_18=0;
  3317. void**locals[1];
  3318. se_dump_stack ds;
  3319. ds.fd=&f1886clear;
  3320. ds.current=((void**)&C);
  3321. ds.l=182;
  3322. ds.c=4;
  3323. ds.f=674;
  3324. ds.caller=caller;
  3325. ds.locals=locals;
  3326. locals[0]=(void**)&o674_186_18;
  3327. se_dst=&ds;/*link*/
  3328. o674_186_18=(C)->_capacity/*8*/;
  3329. se_trace(&ds,184,3,674);
  3330. C->_upper=-(1);
  3331. if(f1886clear.assertion_flag){
  3332. f1886clear.assertion_flag=0;
  3333. se_trace(&ds,186,12,674);
  3334. ac_ens(((C)->_capacity/*8*/)==(o674_186_18));
  3335. se_trace(&ds,260,3,592);
  3336. ac_ens(r1886empty(&ds,C));
  3337. f1886clear.assertion_flag=1;
  3338. }
  3339. if(se_rci(C))se_i1886(&ds,C);
  3340. se_dst=caller;/*unlink*/
  3341. }
  3342. se_frame_descriptor f1886clear={"clear of FIXED_ARRAY",1,1,"%R1886%old l186c18FIXED_ARRAY%E2%",1};
  3343.  
  3344.  
  3345. T6 r1886all_cleared(se_dump_stack*caller,T1886* C){
  3346. T6 R=0;
  3347. void**locals[1];
  3348. se_dump_stack ds;
  3349. ds.fd=&f1886all_cleared;
  3350. ds.current=((void**)&C);
  3351. ds.l=243;
  3352. ds.c=4;
  3353. ds.f=674;
  3354. ds.caller=caller;
  3355. ds.locals=locals;
  3356. locals[0]=(void**)&R;
  3357. se_dst=&ds;/*link*/
  3358. se_trace(&ds,245,3,674);
  3359. R=r2135all_cleared(&ds,(C)->_storage/*4*/,(C)->_upper/*12*/);
  3360. if(se_rci(C))se_i1886(&ds,C);
  3361. se_dst=caller;/*unlink*/
  3362. return R;
  3363. }
  3364. se_frame_descriptor f1886all_cleared={"all_cleared of FIXED_ARRAY",1,1,"%R1886%Result%E6%",1};
  3365.  
  3366.  
  3367. T6 r1886empty(se_dump_stack*caller,T1886* C){
  3368. T6 R=0;
  3369. void**locals[1];
  3370. se_dump_stack ds;
  3371. ds.fd=&f1886empty;
  3372. ds.current=((void**)&C);
  3373. ds.l=62;
  3374. ds.c=4;
  3375. ds.f=592;
  3376. ds.caller=caller;
  3377. ds.locals=locals;
  3378. locals[0]=(void**)&R;
  3379. se_dst=&ds;/*link*/
  3380. se_trace(&ds,65,3,592);
  3381. R=(r1886count(&ds,C))==(0);
  3382. if(se_rci(C))se_i1886(&ds,C);
  3383. se_dst=caller;/*unlink*/
  3384. return R;
  3385. }
  3386. se_frame_descriptor f1886empty={"empty of COLLECTION",1,1,"%R1886%Result%E6%",1};
  3387.  
  3388.  
  3389. T2 r1886index_of(se_dump_stack*caller,T1886* C,T0* a1){
  3390. T2 R=0;
  3391. void**locals[2];
  3392. se_dump_stack ds;
  3393. ds.fd=&f1886index_of;
  3394. ds.current=((void**)&C);
  3395. ds.l=258;
  3396. ds.c=4;
  3397. ds.f=674;
  3398. ds.caller=caller;
  3399. ds.locals=locals;
  3400. locals[0]=(void**)&a1;
  3401. locals[1]=(void**)&R;
  3402. se_dst=&ds;/*link*/
  3403. se_trace(&ds,260,3,674);
  3404. R=r2135index_of(&ds,(C)->_storage/*4*/,a1,(C)->_upper/*12*/);
  3405. if(f1886index_of.assertion_flag){
  3406. f1886index_of.assertion_flag=0;
  3407. se_trace(&ds,286,9,592);
  3408. ac_ens((0)<=(R));
  3409. se_trace(&ds,287,10,592);
  3410. ac_ens((R)<=(((C)->_upper/*12*/)+(1)));
  3411. se_trace(&ds,288,19,592);
  3412. ac_ens((!((R)<=((C)->_upper/*12*/)))||(r1886equal(&ds,C,a1,r1886item(&ds,C,R))));
  3413. f1886index_of.assertion_flag=1;
  3414. }
  3415. if(se_rci(C))se_i1886(&ds,C);
  3416. se_dst=caller;/*unlink*/
  3417. return R;
  3418. }
  3419. se_frame_descriptor f1886index_of={"index_of of FIXED_ARRAY",1,2,"%R1886%element%R7%Result%E2%",1};
  3420. /*No:FIXED_ARRAY[STRING].capacity*/
  3421.  
  3422.  
  3423. void r1886put(se_dump_stack*caller,T1886* C,T0* a1,T2 a2){
  3424. T2 o592_102_15=0;
  3425. void**locals[3];
  3426. se_dump_stack ds;
  3427. ds.fd=&f1886put;
  3428. ds.current=((void**)&C);
  3429. ds.l=141;
  3430. ds.c=4;
  3431. ds.f=674;
  3432. ds.caller=caller;
  3433. ds.locals=locals;
  3434. locals[0]=(void**)&a1;
  3435. locals[1]=(void**)&a2;
  3436. locals[2]=(void**)&o592_102_15;
  3437. se_dst=&ds;/*link*/
  3438. o592_102_15=r1886count(&ds,C);
  3439. se_require_uppermost_flag=1;
  3440. if(f1886put.assertion_flag){
  3441. f1886put.assertion_flag=0;
  3442. se_trace(&ds,98,3,592);
  3443. ac_req(r1886valid_index(&ds,C,a2));
  3444. f1886put.assertion_flag=1;
  3445. }
  3446. se_trace(&ds,143,11,674);
  3447. ((C)->_storage/*4*/)[a2]=(a1);
  3448. if(f1886put.assertion_flag){
  3449. f1886put.assertion_flag=0;
  3450. se_trace(&ds,101,15,592);
  3451. ac_ens((r1886item(&ds,C,a2))==((void*)(a1)));
  3452. se_trace(&ds,102,9,592);
  3453. ac_ens((r1886count(&ds,C))==(o592_102_15));
  3454. f1886put.assertion_flag=1;
  3455. }
  3456. if(se_rci(C))se_i1886(&ds,C);
  3457. se_dst=caller;/*unlink*/
  3458. }
  3459. se_frame_descriptor f1886put={"put of FIXED_ARRAY",1,3,"%R1886%element%R7%index%E2%old l102c15COLLECTION%E2%",1};
  3460. /*No:FIXED_ARRAY[STRING].storage*/
  3461. se_frame_descriptor se_ifd1886={"Class invariant of FIXED_ARRAY[STRING]",1,0,"%R1886%",1};
  3462.  
  3463.  
  3464. T1886*se_i1886(se_dump_stack*caller,T1886*C){
  3465. se_dump_stack ds;
  3466. ds.fd=&se_ifd1886;
  3467. ds.current=((void**)&C);
  3468. ds.l=0;
  3469. ds.c=0;
  3470. ds.f=0;
  3471. ds.caller=caller;
  3472. se_dst=&ds;
  3473. if(ds.fd->assertion_flag){
  3474. ds.fd->assertion_flag=0;
  3475. se_trace(&ds,107,13,1626);
  3476. ac_inv(((C)->_capacity/*8*/)>=((((C)->_upper/*12*/)-(0))+(1)));
  3477. se_trace(&ds,109,17,1626);
  3478. ac_inv((!(((C)->_capacity/*8*/)>(0)))||(r2135is_not_null(&ds,(C)->_storage/*4*/)));
  3479. ds.fd->assertion_flag=1;
  3480. }
  3481. se_dst=caller;
  3482. return C;
  3483. }
  3484.  
  3485.