dapphub / dapphub/dapptools

HEVM prove: "Unexpected response from the solver, context: define-fun"

Open
#671 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
2.1k
Forks
320
PR merge metrics
No merged PRs in 30d

Description

When running a simple symbolic test that deposits into a contract which transfers and mints a token, the SMTChecker will error out with this cryptic message:

```
hevm:
*** Data.SBV: Unexpected response from the solver, context: define-fun:
***
*** Sent : (define-fun array_51 () (Array (_ BitVec 256) (_ BitVec 256)) ((as const (Array (_ BitVec 256) (_ BitVec 256))) s32))
*** Expected : success
*** Received : (error "Parse Error: :1.115: expected constant term inside array constant, but found nonconstant term:
*** the term: s32")
***
*** Executable: /nix/store/2jfvasr5572wa0mm44ssakrp4a6mgm9d-cvc4-1.8/bin/cvc4
*** Options : --lang=smt --incremental --interactive --no-interactive-prompt --model-witness-value --tlimit-per=30000
```

Here's a reproduction test-case:

https://github.com/Rari-Capital/vaults/blob/65b2de14363a1481ca2e251d308d1100fcfacb8c/src/tests/Vault.t.sol#L30

The issue is demonstrated in CI: https://github.com/Rari-Capital/vaults/runs/2919981668

To play around yourself simply clone the branch and run `make`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.