Rename OpLogic to ResLogic, name used in the cairo whitepaper
Rename RegisterFlag to Register (seems ok but RegisterFlag might actually be more clear and should be kept)
Cleanup of unused import/errors previously missed out
Rename 'unconstrained' to ResLogic.Unused as in the cairo whitepaper, which is easier to understand
However, this entry might be removed in a future refactor on the operand computation (currently 'compute/deduce' vs more straightforward as in the cairo vm gs)
Export instruction instantiation in const objects in virtualMachine.test.ts to reduce duplicate code and provide cleaner test cases
Constant called from the class rather than the instance (this.BIAS --> Instruction.BIAS)
Add JSDoc to enums with their Cairo Assembly equivalent (as in the Cairo whitepaper State transition, except for Jnz which uses a js ternary operator to show the if-else control flow)
The classes Instruction and VirtualMachine still need to be refactored but it is for another PR, as well as adding proper JSDoc to the different classes.
Solves #51, using enums
OpLogic
toResLogic
, name used in the cairo whitepaperRegisterFlag
toRegister
(seems ok butRegisterFlag
might actually be more clear and should be kept)'unconstrained'
toResLogic.Unused
as in the cairo whitepaper, which is easier to understand However, this entry might be removed in a future refactor on the operand computation (currently 'compute/deduce' vs more straightforward as in the cairo vm gs)virtualMachine.test.ts
to reduce duplicate code and provide cleaner test casesthis.BIAS
-->Instruction.BIAS
)The classes
Instruction
andVirtualMachine
still need to be refactored but it is for another PR, as well as adding proper JSDoc to the different classes.