TritonVM / triton-vm

Triton is a virtual machine that comes with Algebraic Execution Tables (AET) and Arithmetic Intermediate Representations (AIR) for use in combination with a STARK proof system.
https://triton-vm.org
Apache License 2.0
247 stars 37 forks source link

Implement `Index<Range<…>>` for `OpStack` #322

Open jan-ferdinand opened 2 months ago

jan-ferdinand commented 2 months ago

The operational stack can be indexed into to fetch individual elements through its implementations of Index<usize> and Index<OpStackElement> (and the corresponding IndexMut<…>). It can be useful to get a slice from the op stack.

Implement the combinations {Index, IndexMut} $\times$ {Range, RangeInclusive} $\times$ {usize, OpStackElement} for OpStack.