-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ReadRef, WriteRef, [Unpack & UnpackGeneric] (commented because of mutual dependency in impl_values.v) definitions. #622
Add ReadRef, WriteRef, [Unpack & UnpackGeneric] (commented because of mutual dependency in impl_values.v) definitions. #622
Conversation
…Value Global Instance
| Bytecode.WriteRef => | ||
letS!? reference := liftS! Interpreter.Lens.lens_state_self ( | ||
liftS! Interpreter.Lens.lens_operand_stack $ Stack.Impl_Stack.pop_as Reference.t) in | ||
letS!? value := liftS! Interpreter.Lens.lens_state_self ( | ||
liftS! Interpreter.Lens.lens_operand_stack Stack.Impl_Stack.pop) in | ||
letS!? _ := returnS! $ Impl_ReferenceImpl.write_ref reference value in | ||
returnS! $ Result.Ok InstrRet.Ok |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With one more level of indentation
@@ -1,4 +1,6 @@ | |||
Require Import CoqOfRust.CoqOfRust. | |||
Require Import Coq.Lists.List. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not need this line, as we prefix all the calls to list functions with List.
to help to know where they are from when reading the code.
@@ -1,4 +1,6 @@ | |||
Require Import CoqOfRust.CoqOfRust. | |||
Require Import Coq.Lists.List. | |||
Import ListNotations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These notations should already be in Require Import CoqOfRust.CoqOfRust.
.
@@ -7,6 +9,7 @@ Import simulations.M.Notations. | |||
Require CoqOfRust.move_sui.simulations.move_binary_format.errors. | |||
Module PartialVMResult := errors.PartialVMResult. | |||
Module PartialVMError := errors.PartialVMError. | |||
Import PartialVMResult. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should avoid this Import
otherwise it is too unclear where the calls are from.
Module ReferenceImpl. | ||
Inductive t : Set := | ||
| IndexedRef : IndexedRef.t -> t | ||
| ContainerRef : ContainerRef.t -> t | ||
. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not have an empty line at the end of modules actually, even if this is often the case in our current code.
I will put these changes to effect. What about the L. 687 in values_impl.v ? |
No description provided.