You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
: interpreter error: Args number mismatch for algorithm CVTOP (interpreting CaseV(CVTOP, [CaseV(I64, []), CaseV(I64, []), CaseV(EXTEND, [CaseV(S, [])])]))
I was confused for a while, since I had adapted all rules and also all conversion functions hard-coded in convert.ml. I was not able to tell what "algorithm CVTOP" was referring to concretely with no source position. It took me a while to notice that this was due to me not having changed the 1.0/2.0 specs accordingly, which now were inconsistent with convert.ml.
Could the above message be improved to give a source position and use the actual source-level identifier of the corresponding definition?
The text was updated successfully, but these errors were encountered:
The "algorithm CVTOP" is an automatically generated psuedo-code from the two reduction rules for CVTOP,
;; spec/wasm-2.0/8-reduction.watsup:201.1-207.50
rule Step_pure/cvtop-val:
(CONST nt_1 c_1) (CVTOP nt_2 nt_1 cvtop sx?) ~> (CONST nt_2 c)
-- if $cvtop(nt_1, nt_2, cvtop, sx?, c_1) = c ;; TODO
rule Step_pure/cvtop-trap:
(CONST nt_1 c_1) (CVTOP nt_2 nt_1 cvtop sx?) ~> TRAP
-- if $cvtop(nt_1, nt_2, cvtop, sx?, c_1) = eps ;; TODO
-->
execution_of_CVTOP nt_2 nt_1 cvtop sx?
1. Assert: Due to validation, a value of value type nt_1 is on the top of the stack.
2. Pop the value (nt_1.CONST c_1) from the stack.
3. If (|$cvtop(nt_1, nt_2, cvtop, sx?, c_1)| is 1), then:
a. Let [c] be $cvtop(nt_1, nt_2, cvtop, sx?, c_1).
b. Push the value (nt_2.CONST c) to the stack.
4. If ($cvtop(nt_1, nt_2, cvtop, sx?, c_1) is []), then:
a. Trap.
and I think that the error message that explicitly denotes "which part of the spec files is converted in to the algorithm in interest", as in below message, would be sufficient for the user to understand the situation better.
: interpreter error: Expected 4 arguments for the algorithm `CVTOP` (spec/wasm-2.0/8-reduction.watsup:201.1-207.50) but 3 arguments are given (interpreting CaseV(CVTOP, [CaseV(I64, []), CaseV(I64, []), CaseV(EXTEND, [CaseV(S, [])])]))
While working on #105 I got this error:
I was confused for a while, since I had adapted all rules and also all conversion functions hard-coded in convert.ml. I was not able to tell what "algorithm CVTOP" was referring to concretely with no source position. It took me a while to notice that this was due to me not having changed the 1.0/2.0 specs accordingly, which now were inconsistent with convert.ml.
Could the above message be improved to give a source position and use the actual source-level identifier of the corresponding definition?
The text was updated successfully, but these errors were encountered: