runtimeverification / runtimeverification/haskell-backend
Simplification rule with `symbolic` attribute applied on concrete input
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 224
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
The issue is reported by @lucasmt pn Slack, see the thread. I'm quoting the message here:
This is really weird, I tried adding the normalization rule suggested for
*Int:rule A *Int B => B *Int A [concrete(A), symbolic(B), simplification(40)]But now there's something odd happening when calling the
freshUIntcheatcode. The ensures clause should be introducing the constraint?WORD <Int 2 ^Int (8 *Int #asWord(ARGS)). But when callingkevm.freshUInt(32), it looks like this constraint is getting simplified to?WORD <Int #powByteLen(32), which then causes the tool to crash. But this shouldn't be happening because the rule that introduces#powByteLenshould only apply when the size is symbolic:rule 2 ^Int (SIZE *Int 8) => #powByteLen(SIZE) [symbolic(SIZE), simplification]Is it possible the the backend is ignoring the symbolic attribute?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the kevm.freshUInt(32) case from the issue and inspect the two quoted simplification rules, especially their symbolic and concrete attributes. Done means concrete SIZE input is not rewritten by the symbolic rule and the resulting constraint no longer causes the tool to crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100