essential-contributions / pint

Pint, the constraint-based programming language for declarative blockchains
Apache License 2.0
17 stars 5 forks source link

Sanitize `ArrayElementAccess` in `IntermediateIntent` #533

Closed lethalgem closed 2 months ago

lethalgem commented 7 months ago

Many tests are leaving ArrayElementAccess in the final intermediate intent. Although the final ii is solvable, not all ArrayElementAccesss are being removed.

Likely related to #528, though not confirmed yet

For example: non_const_index.yrt fails with

...
compiler internal error: array element access present in final intent exprs slotmap
@40..44: array element access present in final intent exprs slotmap

The test is below.

let n: int;
let a: int[10];

constraint a[n] == 3;

solve satisfy;
mohammadfawaz commented 2 months ago

This is fine now since the asm gen does support array accesses.