runtimeverification / haskell-backend

The symbolic execution engine powering the K Framework
BSD 3-Clause "New" or "Revised" License
212 stars 42 forks source link

`Proxy.hs` loses information when pruning branches #3973

Closed geo2a closed 4 months ago

geo2a commented 4 months ago

While working on https://github.com/runtimeverification/haskell-backend/pull/3960, I've discovered that we actually have a bug on master, which has to do with the process of pruning of vacuous branches.

Scenario:

This behavior is exposed in the test-issue3764-vacuous-branch integration test.

I'd expect he test-issue3764-vacuous-branch/response-branch-in-zero.json golden file to have "depth": 3 and three rules in "logs", the first of which is the jumpi.true from kore-rpc, i.e.:

"logs": [
              {
                "tag": "rewrite",
                "origin": "kore-rpc",
                "result": {
                    "tag": "success",
                    "rule-id": "0ee7a2c" <--  EVM.jumpi.true
                }
            },
            {
                "tag": "rewrite",
                "origin": "booster",
                "result": {
                    "tag": "success",
                    "rule-id": "20bc9774d59030dcada92e997351315ed198a464546f5b36d67578cfd12938d1"
                }
            },
            {
                "tag": "rewrite",
                "origin": "booster",
                "result": {
                    "tag": "success",
                    "rule-id": "d40db55be13c107a708382df2ae9cea0d6305bbf5d6804de46250d7076a392e2"
                }
            }
        ]

But instead we get "depth":2 and only the logs from Booster.