-
Notifications
You must be signed in to change notification settings - Fork 9
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
WASM: Priority list of runtime & operators #133
Comments
The array operators are missing on this list. They are probably important? RuntimeArray is n-ary and the n is not known locally. I need to know the n for compilation. |
Just updated the list to reflect the latest state. Also added the non-runtime operators. |
I made some progress in 9578251. |
hm. that's a really good question. And no, we don't have anything of the kind even for JS. This would be super great though. I think one question is whether those tests are written in imp_ejson or are they written against the runtime itself (i.e., in JS, AssemblyScript). |
I'd implement them in imp_ejson. Makes them reusable for other backends / runtime implementations. |
agreed. Not sure how to make those systematic, would we like a syntax for those things. |
Your imp_ejson parser undestands runtime operators like Currently, I do not fully understand the semantics of imp_ejson. Maybe such a change will help. |
🤔 I forgot we had two kinds of operators in Imp... Let me look at the parser, I think there was a reason why I only did it for runtime operators, but let me double check. |
Now I get what you meant with "syntax for those things". I think we could do something like this. { "name": "Runtime Operator Equal",
"operator": "EJsonRuntimeEqual",
"type": "ejson_runtime_op",
"inputs": [ [ ejson_test0_arg0, ejson_test0_arg1 ],
[ ejson_test1_arg1, ejson_test1_arg2 ],
...
]} The
That would be super useful. Requires some plumping on your side, though. |
yes that's what I was wondering!
Sounds good. Let me see if I can get some traction on this, will need to page in current status. Thanks for a concrete proposal! I'll see if I can start with that. Will need to figure out how to write |
Yes in JSON. I think you already have serializer/parsers? That's my main reason for writing the tests in JSON. I'd appreciate another format for writing the tests. Something supporting comments. But I guess that would be more work? |
JSON = 👍 proper syntax would be more work, but yes I'd love that too. main factor will be available time I'm afraid. |
Coming back to the operator unit test proposed above. I think we save a lot of time by coding the tests in OCaml. I've a basic proof-of-concept working. I compose small Imp functions with one expression and one operator. Then I evaluate these function using Imp's eval and Wasm's eval and compare the result. In my opinion, the syntax is effective. Lines 87 to 99 in fd57281
|
Part of #153.
Operators
Runtime
Record
Array
Sum
Brand
runtimeRecDot "$data"
? *)Collection
String
Integer
Float
Foreign
The text was updated successfully, but these errors were encountered: