11Require Import CoqOfRust.CoqOfRust.
2- Require Import Coq.Lists.List.
3- Import ListNotations.
42Require Import CoqOfRust.simulations.M.
53Require Import CoqOfRust.lib.lib.
64
@@ -9,7 +7,6 @@ Import simulations.M.Notations.
97Require CoqOfRust.move_sui.simulations.move_binary_format.errors.
108Module PartialVMResult := errors.PartialVMResult.
119Module PartialVMError := errors.PartialVMError.
12- Import PartialVMResult.
1310
1411Require CoqOfRust.move_sui.simulations.move_core_types.vm_status.
1512Module StatusCode := vm_status.StatusCode.
@@ -209,7 +206,6 @@ Module ReferenceImpl.
209206 | IndexedRef : IndexedRef.t -> t
210207 | ContainerRef : ContainerRef.t -> t
211208 .
212-
213209End ReferenceImpl.
214210
215211(*
@@ -661,15 +657,15 @@ Module Impl_IndexedRef.
661657 let idx := Z.to_nat self.(IndexedRef.idx) in
662658 let container := ContainerRef.container self.(IndexedRef.container_ref) in
663659 match container with
664- | Container.VecBool r => Result.Ok $ ValueImpl.Bool (nth idx r false)
665- | Container.VecAddress r => Result.Ok $ ValueImpl.Address (nth idx r default_address)
660+ | Container.VecBool r => Result.Ok $ ValueImpl.Bool (List. nth idx r false)
661+ | Container.VecAddress r => Result.Ok $ ValueImpl.Address (List. nth idx r default_address)
666662 | _ => match container with
667- | Container.VecU8 r => Result.Ok $ ValueImpl.U8 (nth idx r 0)
668- | Container.VecU16 r => Result.Ok $ ValueImpl.U16 (nth idx r 0)
669- | Container.VecU32 r => Result.Ok $ ValueImpl.U32 (nth idx r 0)
670- | Container.VecU64 r => Result.Ok $ ValueImpl.U64 (nth idx r 0)
671- | Container.VecU128 r => Result.Ok $ ValueImpl.U128 (nth idx r 0)
672- | Container.VecU256 r => Result.Ok $ ValueImpl.U256 (nth idx r 0)
663+ | Container.VecU8 r => Result.Ok $ ValueImpl.U8 (List. nth idx r 0)
664+ | Container.VecU16 r => Result.Ok $ ValueImpl.U16 (List. nth idx r 0)
665+ | Container.VecU32 r => Result.Ok $ ValueImpl.U32 (List. nth idx r 0)
666+ | Container.VecU64 r => Result.Ok $ ValueImpl.U64 (List. nth idx r 0)
667+ | Container.VecU128 r => Result.Ok $ ValueImpl.U128 (List. nth idx r 0)
668+ | Container.VecU256 r => Result.Ok $ ValueImpl.U256 (List. nth idx r 0)
673669 | _ => Result.Err $ PartialVMError.new StatusCode.UNKNOWN_INVARIANT_VIOLATION_ERROR
674670 end
675671 end .
0 commit comments