Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[K-Bug] Broken condition for heating rules with result #4683

Open
1 of 6 tasks
virgil-serbanuta opened this issue Nov 13, 2024 · 0 comments · May be fixed by #4685
Open
1 of 6 tasks

[K-Bug] Broken condition for heating rules with result #4683

virgil-serbanuta opened this issue Nov 13, 2024 · 0 comments · May be fixed by #4685

Comments

@virgil-serbanuta
Copy link
Contributor

What component is the issue in?

Front-End

Which command

  • kompile
  • kast
  • krun
  • kprove
  • kprovex
  • ksearch

What K Version?

v7.1.164-0-g459fdd7b84

Operating System

Linux

K Definitions (If Possible)

module A
  imports BOOL

  syntax KResult

  syntax Stuff ::= "a" | "b" | "c"
  syntax KItem ::= thing(Stuff, Stuff)  [seqstrict, result(MyResult)]

  rule thing(c, c) => .K

  rule b => c
  rule a => c

  syntax Bool ::= isMyResult(K)  [function, total, symbol(isMyResult)]
  rule isMyResult(_) => false  [owise]
  rule isMyResult(c) => true


endmodule

Steps to Reproduce

echo "thing(a, b)" > a.in
kompile a.k
krun a.in

Note that execution stops without heating the second argument of "thing". As far as I can tell, this happens because the second heating rule (the one for "b") requires that the first argument is KResult instead of MyResult.

Expected Results

The second argument of "thing" should be heated, then evaluated to "c" and put back, then "thing(c, c)" should be rewritten to ".K". That is, the end result should be:

<k>
  .K
</k>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant