Check sizes/bounds symbolically at compile-time
Open
Nobody has claimed this yet.
optimization
- Dominant language
- OCaml
- Stars
- 160
- Forks
- 59
- Avg merge
- 21h 45m
- Merged PRs (30d)
- 26
Description
I think we should be able to do some neat bounds checking even though we often only know the sizes of various containers in terms of variables. For example, we could have the compiler alert the user that something like this won't work at compile-time:
data {
int N;
vector[N] y;
}
model {
for (i in 1:N+1) {
y[n] ~ normal(0, 1);
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by locating the compiler's handling of symbolic container sizes and index bounds, then determine how the example should be diagnosed at compile time and what tests would define the completed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100