Open grosu opened 8 years ago
I think I found the culprit. It is this rule:
https://github.com/grosu/k/blob/krun-exception/k-distribution/tutorial/2_languages/2_kool/2_typed/2_static/kool-typed-static.k#L547-L557
Here it is, again:
rule <task> <k> class C:Id extends C':Id { S:Stmts } => stmt ...</k> </task>
(.Bag => <class>...
<className> C </className>
<extends> C' </extends>
...</class>)
// <br/>
(.Bag => <task>
<k> checkType(class(C')) ~> S </k>
<inClass> C </inClass>
<ctenvT> .Map </ctenvT>
</task>) [structural]
If you comment it out, you get a stuck configuration as you expect. If you modify it minimally to apply and then stuck the computation, for example by adding a new type stmtStuck
and replacing stmt
with stmtStuck
in the first line, then you get the exception again. So it really has a problem applying such a rule, probably because of the configuration abstraction.
I'll debug some more and try to find an alternative rule, but I wanted you to know the above so that you can fix the bugs.
I tried lots of different ways to fix this: reordering the cells, using parentheses for grouping, even adding one more layer of cells, <tasks/>
and <classes>
, and everything failed with the same exception thrown because of the same rule.
I don't know how to continue, so I need help here asap, otherwise we are not going to make it with KOOL.
@daejunpark , since you spent a lot of time with KOOL and with configuration abstraction, can you please step in and help here? Maybe we have the same problem reported in this commit?
https://github.com/kframework/k/commit/2230bb3947c34b34b09e44eaa2ea2dfbd46b31cf
This is a bug probably due to associative matching. I think I am the best person to look into it.
@andreistefanescu thanks. Let me know if you need my help. I can work again after classes, around 2pm.