argotorg / argotorg/act

Typechecker: Issue type errors for invalid constructor preconditions

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

Description

The following spec is accepted by the typechecker even though it makes no sense (there is no prestate when the constructor is running):

```
constructor of C
interface constructor()

iff

x == 7

creates

uint x := 2
```

We should modify the typechecker to reject specs containing storage references in constructor precondition blocks.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the typechecker entry point that processes constructor precondition blocks and trace how storage references are validated. Use the provided constructor specification as a regression case; done means the typechecker rejects it because the precondition refers to storage without a prestate.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.