k-legacy icon indicating copy to clipboard operation
k-legacy copied to clipboard

Uncaught exception thrown of type AssertionError

Open ZhuXiaoran07 opened this issue 8 years ago • 1 comments

When kompiling the following definition:

module TEST-SYNTAX 
  syntax Stmt  ::= "COUNTER" "=" Id ";"   
endmodule
module TEST
  imports TEST-SYNTAX
  syntax KResult ::= Int | Bool | String
  configuration <T color="yellow">
                    <k> $PGM:Stmt</k>
                  <counters>
                  <counter multiplicity="*"> .K </counter>
                  </counters> 
                </T>

    rule <k> COUNTER=I; =>. ...</k>
         <counters> CT:Bag(.Bag =><counter> I </counter>) </counters> 
endmodule

it results in [Error] Internal: Uncaught exception thrown of type AssertionError. Please rerun your program with the --debug flag to generate a stack trace, and file a bug report at https://github.com/kframework/k/issues.

But if modify the counters cell in the rule as following:

module TEST-SYNTAX 
  syntax Stmt  ::= "COUNTER" "=" Id ";"   
endmodule
module TEST
  imports TEST-SYNTAX
  syntax KResult ::= Int | Bool | String
  configuration <T color="yellow">
                    <k> $PGM:Stmt</k>
                  <counters>
                  <counter multiplicity="*"> .K </counter>
                  </counters> 
                </T>

    rule <k> COUNTER=I; =>. ...</k>
         <counters> CT:Bag =>CT (<counter> I </counter>) </counters>
endmodule

works well when being kompiled.

┆Issue is synchronized with this Asana task

ZhuXiaoran07 avatar Oct 06 '16 22:10 ZhuXiaoran07

it looks like a bug in concretization. thanks for submitting!

cos avatar Oct 20 '16 17:10 cos