Skip to content

Expose multiIndexArray to Plinth (CIP-0156)#7845

Draft
Unisay wants to merge 6 commits into
yura/issue-1675-multi-index-arrayfrom
yura/issue-2265-multi-index-array-plinth
Draft

Expose multiIndexArray to Plinth (CIP-0156)#7845
Unisay wants to merge 6 commits into
yura/issue-1675-multi-index-arrayfrom
yura/issue-2265-multi-index-array-plinth

Conversation

@Unisay

@Unisay Unisay commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Exposes the multiIndexArray builtin (CIP-0156) to Plinth: adds the PlutusTx.Builtins.multiIndexArray wrapper and the plugin mapping that replaces the no-op arm left by #7844. The wrapper mirrors indexArray: indices out of range fail, in index-list order with duplicates preserved.

Stacked on #7844 (targets its branch, not master). Draft — not ready for review.

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Execution Budget Golden Diff

b088b82 (master) vs 4bca134

output

This comment will get updated when changes are made.

@Unisay
Unisay requested a review from Copilot July 15, 2026 12:35
@Unisay Unisay self-assigned this Jul 15, 2026

This comment was marked as outdated.

@Unisay
Unisay force-pushed the yura/issue-1675-multi-index-array branch from 32c205d to eaeb73f Compare July 16, 2026 09:11
@Unisay
Unisay force-pushed the yura/issue-2265-multi-index-array-plinth branch 2 times, most recently from ee70ddb to 8d116ee Compare July 16, 2026 13:21
@Unisay
Unisay force-pushed the yura/issue-1675-multi-index-array branch from eaeb73f to b088b82 Compare July 17, 2026 11:29
Unisay added 6 commits July 17, 2026 13:29
Adds the PlutusTx.Builtins.multiIndexArray wrapper (mirroring
indexArray: out-of-range indices fail, results in index-list order with
duplicates preserved) and maps it to the MultiIndexArray builtin in the
plugin, replacing the no-op arm. Golden tests cover the compiled PIR,
UPLC, and CEK evaluation under GHC 9.6 and 9.12.

Issue: IntersectMBO/plutus-private#2265
…y wrapper

The Haskell simulation now matches the builtin: an index exceeding
maxBound::Int is out-of-bounds instead of wrapping on conversion, and
any out-of-bounds index fails the whole call regardless of how much of
the result list is demanded.

Issue: IntersectMBO/plutus-private#2265
Pins the Haskell definition to the builtin semantics: index-list order
with duplicates, eager Integer-domain bounds checking (an index
exceeding maxBound::Int fails rather than wrapping), and whole-call
failure regardless of how much of the result is demanded.

Issue: IntersectMBO/plutus-private#2265
Adding a name to the plugin's builtin table shifts unique allocation,
which changes CSE tie-breaking in the readable-UPLC goldens of the two
largest compiled programs; budgets and sizes are unchanged.

Issue: IntersectMBO/plutus-private#2265
Builds the index list as a lifted list constant via toBuiltin instead of
an mkCons chain, matching the liftCodeDef idiom used for the other
array-test inputs.

Issue: IntersectMBO/plutus-private#2265
@Unisay
Unisay force-pushed the yura/issue-2265-multi-index-array-plinth branch from 8d116ee to 4bca134 Compare July 17, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants