[lisaac-Bugs][312423] Compiler crash on require contract

lisaac-bugs at alioth.debian.org lisaac-bugs at alioth.debian.org
Tue Mar 30 17:20:56 UTC 2010


Bugs item #312423, was opened at 30/03/2010 17:20 by Pierre-Alexandre Voye
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413092&aid=312423&group_id=100200

Status: Open
Priority: 4
Submitted By: Pierre-Alexandre Voye (ontologia-guest)
Assigned to: Benoit Sonntag (sonntag-guest)
Summary: Compiler crash on require contract 
Target Milestone: Lisaac 0.4
Category: Lisaac Compiler


Initial Comment:
I added this to collection2 :

  //
  // High Level control Structure:
  //

  - foreach action:{V; } <- do_all action;

  - do_all action:{V; } <-
  // Apply `action' to every item of `Self'.
  //
  // * See: `for_all', `exists'.
  (
    lower2.to upper2 do { j:INTEGER;
      lower1.to upper1 do { i:INTEGER;
        action.value (item i,j);
      };
    };
  );
  
  //
  // Debug
  //

  - inspect : STRING <-
  ( + res : STRING;
     res := STRING.create 4096;
     res.append "[ ";
    foreach { el : V; res.append "'"; res.append (el.to_string); res.append "' , ";};
    res.append "]";
    res
  );



I called inspect in my example.li (agent axample) :
...
clipping (x0,y0) to (x1,y1);
    //rectangle_fill (x0,y0) to (x1,y1) color black;
    //
    screen.inspect.printline
...


I get (with the debug version) :


$ lisaacdebug example
Load lip file: ./../make.lip
Warning: Slot `output_extension' not found.
Warning: Slot `is_library' not found.
Warning: Slot `output_extension' not found.
Depending pass: .....
============== BOTTOM ==============
Line #578 Column #9 in LISAAC (.../compiler/src/lisaac.li).
  - main <-
         ^
Line #647 Column #31 in LISAAC (.../compiler/src/lisaac.li).
    type_input.prototype.depend;
                               ^
Line #346 Column #5 in PROTOTYPE (.../compiler/src/type/prototype.li).
    };
     ^
Line #75 Column #5 in BLOCK (.../compiler/lib/standard/kernel/block.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #73 Column #16 in BLOCK (.../compiler/lib/standard/kernel/block.li).
      body.value;
                ^
Line #345 Column #22 in PROTOTYPE (.../compiler/src/type/prototype.li).
      NODE.extend_pass;
                      ^
Line #60 Column #5 in NODE (.../compiler/src/dispatcher/node.li).
    };
     ^
Line #75 Column #5 in BLOCK (.../compiler/lib/standard/kernel/block.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #73 Column #16 in BLOCK (.../compiler/lib/standard/kernel/block.li).
      body.value;
                ^
Line #54 Column #38 in NODE (.../compiler/src/dispatcher/node.li).
      is_ok := node_list.item j.update;
                                      ^
Line #96 Column #2 in NODE_TYPE (.../compiler/src/dispatcher/node_type.li).
  );
  ^
Line #212 Column #5 in NODE_TYPE (.../compiler/src/dispatcher/node_type.li).
    };
     ^
Line #52 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #198 Column #7 in NODE_TYPE (.../compiler/src/dispatcher/node_type.li).
      };
       ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #196 Column #59 in NODE_TYPE (.../compiler/src/dispatcher/node_type.li).
        result := data.update_branch first_code self new_type_self;
                                                                  ^
Line #101 Column #5 in DTA (.../compiler/src/dispatcher/dta.li).
    };
     ^
Line #52 Column #21 in FALSE (.../compiler/lib/standard/boolean/false.li).
    false_block.value;
                     ^
Line #100 Column #7 in DTA (.../compiler/src/dispatcher/dta.li).
      };
       ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #99 Column #27 in DTA (.../compiler/src/dispatcher/dta.li).
        node.update_link type_self;
                                  ^
Line #103 Column #2 in NODE_TYPE (.../compiler/src/dispatcher/node_type.li).
  );
  ^
Line #212 Column #5 in NODE_TYPE (.../compiler/src/dispatcher/node_type.li).
    };
     ^
Line #52 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #198 Column #7 in NODE_TYPE (.../compiler/src/dispatcher/node_type.li).
      };
       ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #196 Column #59 in NODE_TYPE (.../compiler/src/dispatcher/node_type.li).
        result := data.update_branch first_code self new_type_self;
                                                                  ^
Line #101 Column #5 in DTA (.../compiler/src/dispatcher/dta.li).
    };
     ^
Line #52 Column #21 in FALSE (.../compiler/lib/standard/boolean/false.li).
    false_block.value;
                     ^
Line #96 Column #32 in DTA (.../compiler/src/dispatcher/dta.li).
      node.update_link type_self;
                                ^
Line #116 Column #5 in NODE_STYLE (.../compiler/src/dispatcher/node_style.li).
    };
     ^
Line #52 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #91 Column #7 in NODE_STYLE (.../compiler/src/dispatcher/node_style.li).
      };
       ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #90 Column #49 in NODE_STYLE (.../compiler/src/dispatcher/node_style.li).
        first_code := call_for first_type self self_type;
                                                        ^
Line #333 Column #5 in NODE_STYLE (.../compiler/src/dispatcher/node_style.li).
    };
     ^
Line #52 Column #21 in FALSE (.../compiler/lib/standard/boolean/false.li).
    false_block.value;
                     ^
Line #291 Column #77 in NODE_STYLE (.../compiler/src/dispatcher/node_style.li).
      (my_profil, wrt_lst) := slot_cod.get_profil new_larg self new_type_self;
                                                                             ^
Line #156 Column #5 in SLOT_CODE (.../compiler/src/variable/slot_code.li).
    };
     ^
Line #52 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #153 Column #82 in SLOT_CODE (.../compiler/src/variable/slot_code.li).
      res_lst := result.make Self with (type_self, args) verify (profil.count = 1);
                                                                                  ^
Line #140 Column #34 in PROFIL_SLOT (.../compiler/src/profil_slot.li).
    slot_code.create_code is_first;
                                  ^
Line #236 Column #31 in SLOT_CODE (.../compiler/src/variable/slot_code.li).
    result := value.to_run_expr;
                               ^
Line #149 Column #5 in ITM_LIST (.../compiler/src/item/itm_list.li).
    };
     ^
Line #169 Column #5 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #167 Column #20 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
      blc.value Self;
                    ^
Line #147 Column #29 in ITM_LIST (.../compiler/src/item/itm_list.li).
      i := code.item j.to_run;
                             ^
Line #53 Column #2 in ITM_CODE (.../compiler/src/item/itm_code.li).
  );
  ^
Line #89 Column #2 in ITM_READ_ARGS (.../compiler/src/item/itm_read_args.li).
  );
  ^
Line #135 Column #2 in ITM_READ (.../compiler/src/item/itm_read.li).
  );
  ^
Line #218 Column #5 in ITM_READ (.../compiler/src/item/itm_read.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #217 Column #7 in ITM_READ (.../compiler/src/item/itm_read.li).
      };
       ^
Line #169 Column #5 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #167 Column #20 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
      blc.value Self;
                    ^
Line #216 Column #33 in ITM_READ (.../compiler/src/item/itm_read.li).
        add_arg (larg.item j.to_run_expr) to (j+1) in args for slot_msg block is_block_value;
                                        ^
Line #74 Column #34 in ITM_BLOCK (.../compiler/src/item/itm_block.li).
    tb := PROFIL_BLOCK.create Self;
                                  ^
Line #87 Column #20 in PROFIL_BLOCK (.../compiler/src/profil_block.li).
    result.make base;
                    ^
Line #178 Column #30 in PROFIL_BLOCK (.../compiler/src/profil_block.li).
    result := list.to_run_expr;
                              ^
Line #149 Column #5 in ITM_LIST (.../compiler/src/item/itm_list.li).
    };
     ^
Line #169 Column #5 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #167 Column #20 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
      blc.value Self;
                    ^
Line #147 Column #29 in ITM_LIST (.../compiler/src/item/itm_list.li).
      i := code.item j.to_run;
                             ^
Line #53 Column #2 in ITM_CODE (.../compiler/src/item/itm_code.li).
  );
  ^
Line #89 Column #2 in ITM_READ_ARGS (.../compiler/src/item/itm_read_args.li).
  );
  ^
Line #135 Column #2 in ITM_READ (.../compiler/src/item/itm_read.li).
  );
  ^
Line #218 Column #5 in ITM_READ (.../compiler/src/item/itm_read.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #217 Column #7 in ITM_READ (.../compiler/src/item/itm_read.li).
      };
       ^
Line #169 Column #5 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #167 Column #20 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
      blc.value Self;
                    ^
Line #216 Column #33 in ITM_READ (.../compiler/src/item/itm_read.li).
        add_arg (larg.item j.to_run_expr) to (j+1) in args for slot_msg block is_block_value;
                                        ^
Line #74 Column #34 in ITM_BLOCK (.../compiler/src/item/itm_block.li).
    tb := PROFIL_BLOCK.create Self;
                                  ^
Line #87 Column #20 in PROFIL_BLOCK (.../compiler/src/profil_block.li).
    result.make base;
                    ^
Line #178 Column #30 in PROFIL_BLOCK (.../compiler/src/profil_block.li).
    result := list.to_run_expr;
                              ^
Line #149 Column #5 in ITM_LIST (.../compiler/src/item/itm_list.li).
    };
     ^
Line #169 Column #5 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #167 Column #20 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
      blc.value Self;
                    ^
Line #147 Column #29 in ITM_LIST (.../compiler/src/item/itm_list.li).
      i := code.item j.to_run;
                             ^
Line #53 Column #2 in ITM_CODE (.../compiler/src/item/itm_code.li).
  );
  ^
Line #130 Column #5 in ITM_READ_ARG2 (.../compiler/src/item/itm_read_arg2.li).
    };
     ^
Line #52 Column #21 in FALSE (.../compiler/lib/standard/boolean/false.li).
    false_block.value;
                     ^
Line #129 Column #48 in ITM_READ_ARG2 (.../compiler/src/item/itm_read_arg2.li).
      result := to_run_with arg_first args l_arg;
                                                ^
Line #135 Column #2 in ITM_READ (.../compiler/src/item/itm_read.li).
  );
  ^
Line #218 Column #5 in ITM_READ (.../compiler/src/item/itm_read.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #217 Column #7 in ITM_READ (.../compiler/src/item/itm_read.li).
      };
       ^
Line #169 Column #5 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #167 Column #20 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
      blc.value Self;
                    ^
Line #216 Column #33 in ITM_READ (.../compiler/src/item/itm_read.li).
        add_arg (larg.item j.to_run_expr) to (j+1) in args for slot_msg block is_block_value;
                                        ^
Line #149 Column #5 in ITM_LIST (.../compiler/src/item/itm_list.li).
    };
     ^
Line #169 Column #5 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #167 Column #20 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
      blc.value Self;
                    ^
Line #147 Column #29 in ITM_LIST (.../compiler/src/item/itm_list.li).
      i := code.item j.to_run;
                             ^
Line #77 Column #28 in ITM_RESULT (.../compiler/src/item/itm_result.li).
    val := value.to_run_expr;
                            ^
Line #130 Column #5 in ITM_READ_ARG2 (.../compiler/src/item/itm_read_arg2.li).
    };
     ^
Line #52 Column #21 in FALSE (.../compiler/lib/standard/boolean/false.li).
    false_block.value;
                     ^
Line #129 Column #48 in ITM_READ_ARG2 (.../compiler/src/item/itm_read_arg2.li).
      result := to_run_with arg_first args l_arg;
                                                ^
Line #135 Column #2 in ITM_READ (.../compiler/src/item/itm_read.li).
  );
  ^
Line #258 Column #5 in ITM_READ (.../compiler/src/item/itm_read.li).
    };
     ^
Line #83 Column #5 in FALSE (.../compiler/lib/standard/boolean/false.li).
    };
     ^
Line #52 Column #21 in FALSE (.../compiler/lib/standard/boolean/false.li).
    false_block.value;
                     ^
Line #82 Column #22 in FALSE (.../compiler/lib/standard/boolean/false.li).
      block_else.value;
                      ^
Line #257 Column #49 in ITM_READ (.../compiler/src/item/itm_read.li).
      receiver rec with args intern implicit_self;
                                                 ^
Line #88 Column #38 in NODE (.../compiler/src/dispatcher/node.li).
    s.check_argument_type larg for dta;
                                      ^
Line #292 Column #5 in ITM_SLOT (.../compiler/src/item/itm_slot.li).
    };
     ^
Line #169 Column #5 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #167 Column #20 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
      blc.value Self;
                    ^
Line #291 Column #41 in ITM_SLOT (.../compiler/src/item/itm_slot.li).
      idx := a.check larg index idx for p;
                                         ^
Line #100 Column #5 in ITM_ARGS (.../compiler/src/item/itm_args.li).
    };
     ^
Line #169 Column #5 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
    };
     ^
Line #67 Column #20 in TRUE (.../compiler/lib/standard/boolean/true.li).
    true_block.value;
                    ^
Line #167 Column #20 in NUMERIC (.../compiler/lib/internal/portable/number/numeric.li).
      blc.value Self;
                    ^
Line #98 Column #35 in ITM_ARGS (.../compiler/src/item/itm_args.li).
      new_expr := larg.item (idx+i).check_type (type.item i.to_run_for p) with position;
                                   ^
Line #121 Column #6 in TRAVERSABLE (.../compiler/lib/standard/property/traversable.li).
    -? {valid_index i};
      ^
================ TOP ===============
Require assertion violated.


All code is in the git (master branch)


----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413092&aid=312423&group_id=100200



More information about the Lisaac-devel mailing list