Comments (9)
I'm concerned that these can't be algebraically simplified because of the nonlinear / 64
from klab.
I disagree, see the structure of it and my proposed rule where:
A := (VGas - 17080)
B := 700
C := ((VGas - 17780) - ((VGas - 17780) / 64))
D := 636
the simplified version after the rule applied would be:
((VGas - 17080) - 700) - 636
which would further simplify
similar stuff can be done to nested #if
things.
mr. martin noted tho that we would get problems with the gas analyzer due to this lemma since the gas behaves non-monotonic. But We can recover this information (C
) in a different way when we scan all #refund
rules.
we need to spend some time on all this :/
from klab.
You're right, I didn't see that there was actually repetition there, so the expression can be simplified.
@MrChico is right that the gas analyser works by detecting these / 64
subexpressions and making sure they are all >= 0
to ensure there is no OOG inside of a call.
What if we keep this stuff unsimplified during a run but have the gas analyser apply this simplification to the post-gas, after it has already used the unsimplified / 64
subexpressions for solving?
How do you want to keep track of the #refund
rules? I think we discussed once adding a cell to evm-semantics
that tracks a list of ending gas expressions in every message call: that would be very useful here...
from klab.
What if we keep this stuff unsimplified during a run but have the gas analyser apply this simplification to the post-gas, after it has already used the unsimplified / 64 subexpressions for solving?
the whole point of this issue is to supply k with lemmas which reduce the gas DURING a run not after.
the #refund
rules could be marked and gathered in the same way we do it with evm step
s.
Then depending on what we need we would get either a list of them or a branching tree.
from klab.
@mhhf OK, then what we will need is every time the #refund
rule is applied, with <gas> GAVAIL </gas>
, save the GAVAIL
into a list.
from klab.
@livnev how would you like to receive this?
is an array of json objects containing the arithmetic expression ok?
from klab.
@mhhf Yes. And you will keep them in json form right, without printing them?
from klab.
yep, raw json
looks like the pr is getting merged soon
i'll update klab and evm-semantics right after so you should be able to play around with it on thursday
from klab.
I believe we have resolved this with the new lemmas plus the improvements to the solver.
from klab.
Related Issues (20)
- Fast way to look up dapp.ci/<project>/<hash> for a given branch from github
- Adapt PC extractor to work with library functions HOT 2
- Deal with ASTs produced by Waffle HOT 1
- Filter out unrelated constraint changes HOT 4
- Use wall-clock time in timeouts
- Document failure heading
- Document resources/k.json
- klab fetch shouldn't focus HOT 4
- fetch running proofs
- Document dirty lemmas feature
- Investigate .git requirements in klab-prove-all
- klab debug's rule view uses hardcoded paths HOT 5
- Show lemmas in r view HOT 2
- Strip metadata before calculating proof hash HOT 7
- report: make 'not-specified' rows more distinguishable
- report: fetch url is editable
- report: split methods into accessors and mutators in overview
- Document files in KLAB_OUT
- act2 migration
- Using eDSL instead of ACT as spec
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 klab.