-
Notifications
You must be signed in to change notification settings - Fork 73
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
ref.i31
is both an administrative instruction and an instruction
#470
Comments
Yeah, this is analogous to |
Indeed, that would help in some cases. I'm writing a proof and I either have to explain that there are two instruction with the same name (which I'd like to avoid because it's disturbing the reader) or use another name (likely |
The only convention I could think of so far is to add a prime to the administrative versions, which we e.g. used in the OOPSLA'19 memory model paper. How about going with that for your paper as well? |
That could be a solution. I'm going to think about it and see if I can think of something else. I believe it would be good to also harmonize the script format. For instance, here: (assert_return (invoke "f") (ref.i31)) The |
Hm, yeah, but then all ref patterns should still follow a consistent naming scheme as well. |
Here are a few possibilities:
The one I like the most is probably the |
Well, we should find a convention that works uniformly for more than just references. For example, we have |
I can't find the |
It's currently called |
Ideally yes, but I'm not sure we can find a convention that is not confusing. To me, adding a prime is confusing because these are not variables but instruction literals. I believe it would make everything simpler if we were to find a proper name for each of them - of course, that may not always be easy. If we want to distinguish allocating instructions, we could have I knew the For EDIT: Quoting your answer in #478:
OK, so we probably won't be able to fix the issue in the way I propose by having proper name for each instructions. Still, I believe we could fix those that are not yet fully part of a released standard such as |
Since the renaming of
i31.new
toref.i31
,ref.i31
appears twice in the set of instructions (when including administrative instructions) with each having a different syntax (one made of an integer in the case of the administrative one).Then, the reduction rule for
ref.i31
is quite confusing:(i32.const n) ref.i31 -> ref.i31 (n mod 2^31)
On the left side you have the
ref.i31
syntax and on the other side theref.i31 int
syntax.Is there any plan to change one of them again to try to clarifies things ?
The text was updated successfully, but these errors were encountered: