Skip to content

Could the backend report vacuous nodes through the execute response ? #3630

@iFrostizz

Description

@iFrostizz

This issue originates from runtimeverification/evm-semantics#1944
We would like if possible the backend to report if the current executed node is vacuous.

A minimal example written in the Foundry integration of KEVM was tested.

// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.13;

import "forge-std/Test.sol";

contract VacuousTest is Test {
    function test_unreachable(bool flag) public {
        vm.assume(false);
        assert(false);
    }
}

It can be stored in evm-semantics/tests/foundry/test
Then

kevm foundry-kompile
kevm foundry-prove --test VacuousTest.test_unreachable

It features a call to vm.assume(false) which stucks the execution at this line, when the K cell is roughly:

<k> #foundry_assume ~> false </k>

Currently, the next_cterms that is decoded from pyk is an empty list, so pyk deduces that the execution is stuck at this point. But we would like, if possible, the backend to be able to automatically return a new status code vacuous (or related) if the current node is vacuous.

I attached the return of the test ran with the kevm foundry integration and adding the --debug to be able to see the requests and response with the haskell backend (split in 2 to circumvent the Github file size limit). We can see that the depth-bound status code is returned with a first depth of 2, then of 0 in the last response that contains the depth-bound status code. In the two cases the response contains the #foundry_assume false.

dump_part1.txt
dump_part2.txt

Please ask me for additional information / files if needed.

Thanks !

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions