kframework / k-legacy

The K tools (deprecated, see README)

Home Page:http://kframework.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix configuration fragments

dwightguth opened this issue · comments

$ cat test.k
module TEST

  syntax Foo ::= "foo"

  configuration <k> $PGM:K </k> <state> .Map </state> <storedState> .K </storedState> <exit exit=""> 0 </exit>

  syntax KItem ::= savedState(StateCell)

  rule <k> foo => .K ...</k> <state> M::Map </state> <storedState> _ => savedState(<state> M </state>) </storedState>
       requires bar(<state> M </state>)

  syntax Bool ::= bar(StateCell) [function]

  rule bar(<state> .Map </state>) => true

endmodule
$ kompile test.k
$ krun -cPGM="foo"

This should succeed and output <generatedTop> <k> . </k> <state> .Map </state> <storedState> savedState ( <state> .Map </state> ) </storedState> <exit> 0 </exit> </generatedTop>.

However, it currently fails due to lack of support for saved cells in the configuration.