argotorg / argotorg/act

Unify the approach of integer bounds assertions

Open
#171 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
279
Forks
51
Avg merge
17h 42m
Merged PRs (30d)
1

Description

We need to have a more principled approach to generate arithmetic bounds for storage variables.

Right now:
- `inRange` assertions in preconditions might generate duplicate bounds assertions as Enrich already adds some go them
- `inRange` assertion can be implicit and generated automatically using type information, though we need to be careful to with the semantics of this. For example for a storage variable `uint128 x` , writing the following update
```x => (x + 1234) + 5678```
will implicitly add the precondition `inRange(uint128, (x + 1234) + 5678)` which implies that every subexpression never goes out of `uint128` bound.

Issue #109 describes how an inferring-bounds analysis can be performed.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading issue #109, then trace how `inRange` preconditions and Enrich-generated bounds are currently handled. The issue provides no files or tests; done would require an agreed unified approach that avoids duplicate assertions and preserves the intended semantics of implicit bounds.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.