Comments (6)
I'm pretty sure this error has to with the #badJumpDest? rule, specifically clauses like this:
rule <k> #badJumpDest? [ JUMP ] => #end EVMC_BAD_JUMP_DESTINATION ... </k>
<wordStack> DEST : WS </wordStack>
<program> ... DEST |-> OP ... </program>
requires OP =/=K JUMPDEST
seem to be comparing JUMPDEST (with sort NullStackOp) with a general OP (of sort K)
from evm-semantics.
Hmmmm, we could add extra operator ==OpCode
and =/=OpCode
which insert the additional sort-checks needed. I wonder if this would cut down on how many "missing SMTLIB translation" errors people get.
from evm-semantics.
@MrChico I'm trying some other optimizations on another branch (just local for now), but I'm running into a (potentially) similar issue. Can you try changing <program> ... DEST |-> OP ... </program>
to <program> ... DEST |-> OP:OpCode ... </program>
for both the JUMP
and JUMPI
cases of your semantics of #badJumpDest?
and see if it changes the behavior on this example?
from evm-semantics.
Yes, @ehildenb , I did some experimentation with that before which did change the example.
After spending some time thinking about this, my hypothesis is that this mainly becomes an issue in trying to prove very general specs that end up having the jumpdestination as a symbolic value, forcing K to evaluate whether an OP-code at an arbitrary position is a JUMPDEST or not.
Another behavior I just noticed with #badjumpdest is that there is an unnecessary branching when checking #badJumpDest?[JUMPI ], see screenshots from @mhhf 's kdebugger (WIP)
from evm-semantics.
@yzhang90 has noticed the same. You can try out branch opcode-basic-blocks
, which should remove this unnecessary branching. #badJumpDest?
is removed altogether, and instead the semantics are given directly over JUMP
and JUMPI
. Be warned though, the tests do not pass yet on that branch. I'm working on getting these branches merged, but it's 3 PRs back.
from evm-semantics.
I believe this was solved by delaying checking for bad jump destinations until we semantic execution time (instead of a pre-check).
from evm-semantics.
Related Issues (20)
- Add `--port`, `--maude-port` to `rpc_args`
- KEVM build instructions are out of date
- `#parseHexBytes` should be declared total HOT 6
- Opt in to new type inference method HOT 2
- Constructor calls with symbolic parameters HOT 1
- De-duplicate rules introduced as part of the no-gas PR
- Segfaults on arm64 macOS
- Add option to break on every basic block HOT 1
- Fix warnings on non-exhaustive matches for rules HOT 2
- Duplicate lemmas between two different files HOT 2
- Default Behavior for Lemma File and Module Import in Kontrol
- Tests missing from Pytest harness HOT 1
- Examples in `VERIFICATION.md` do not work as expected
- `fast_check_subsumption` causes `Could not convert ML predicate to sort Bool` error
- Rule coverage and configuration well-formedness HOT 1
- Turn off `fast_check_subsumption` in CLI by default
- Investigate SMT timeout in `test-arithmetictest-test_wmul_wdiv_inverse_underflow-uint256-uint256-0-spec.k`
- Outdated examples in KEVM HOT 2
- Failure to make libcryptopp libff libsecp256k1 HOT 3
- Add Dencun upgrade changes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evm-semantics.