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
223 stars 35 forks source link

Introduce instructions `pick` + `i` and `place` + `i` #297

Open jan-ferdinand opened 4 weeks ago

jan-ferdinand commented 4 weeks ago

The two new instructions simplify manipulation of the operational stack. Instruction pick + i moves the indicated stack element to the top of the stack. Instruction place + i is its dual, moving the top of the stack to the indicated position.

old op stack new op stack
pick + i e.g., _ d x c b a e.g., _ d c b a x
place + i e.g., _ d c b a x e.g., _ d x c b a