Conversation
|
I could use another pair of eyes on this now, or two: I can't see the cause of the current issue. All the (non-dfinity) tests pass for me, save for this one (part of In particular, I get an IR type error saying that Strangely, when I remove the "extra block" in I'm not exactly sure why yet. I noticed that the parser does some pattern-matching on the case where a |
|
None of the variations use |
|
According to the stack trace The IR (dumped by And indeed: It has a type Now I regret having asked for this to be merged into Just checking …The bug is not yet in master. Hmm,
Ok, there are a bunch of bugs in |
|
Pushed to #193 (please review, so that we can merge this first) and also merged into this PR, so that you can continue your work. |
|
Thank you @nomeata! So, I'm a bit confused about the next steps to get this totally sorted. Are my transformations incorrect in some way, or are they merely using some (still) buggy Aside: I know that we want the OCaml source to stand in for a LaTeX document with inference rules (for stepping and typing judgements); I had a difficult time imagining the typing rules from looking at these cases. I submit that it may have been easier to have these bugs here because they were obscured by the (mostly minor) OCaml syntactical noise. Perhaps they would have been more apparent if we had some inference rules to stare at and compare against? Would it be worth writing these out sometime soon? The IR is fairly small, and it shouldn't take more than part of an afternoon. I think it would help me a lot in the future, and cement the IR's static semantics more in my mind. |
|
Well, I sorted out one problem (and the fix
Not sure. There is too much risk of it going stale if they cannot be executed in some way. |
|
Sounds good. In a more ideal world, |
The AST is typed, so there it is a typing derivation of sorts. You can write a pretty-printer for it that includes all the annotations. Also see https://dfinity.atlassian.net/browse/AST-61 |
|
Cool. I added a comment there (on Jira) with my thoughts; I wish I could give you a direct link, but that's either missing as a Jira feature, or I haven't yet found it. |
|
Just looked at the Jenkins output again. It seems there are merely IR dumps in the expected test output that need to be updated. Let me do that for you. |
|
Done. I guess what is left to do now is to reap the benefit of the exercise and remove all those loop forms from |
src/construct.ml
Outdated
| expD (ifE exp2 | ||
| (tupE []) | ||
| (breakE lab (tupE []) ty1) | ||
| ty1 |
There was a problem hiding this comment.
Very minor nit: Can you just write Type.unit here? I find it easier to read if I don’t have to see what ty1 is.
There was a problem hiding this comment.
Yep, will do.
|
Awesome; thanks again, @nomeata! Shall we do that refactoring/simplification of Assuming you agree, can we merge this now? (I think you have the ability to approve, right?) |
|
I mean now, after fixing that nit. :) |
nomeata
left a comment
There was a problem hiding this comment.
Let’s remove these comments and if true statements, and then merge. The IR cleanup may happen separately, if you want.
(Also, I am experimenting with GithHub’s “suggested change” feature.)
Co-Authored-By: matthewhammer <matthew.hammer@gmail.com>
Co-Authored-By: matthewhammer <matthew.hammer@gmail.com>
Co-Authored-By: matthewhammer <matthew.hammer@gmail.com>
Co-Authored-By: matthewhammer <matthew.hammer@gmail.com>
Co-Authored-By: matthewhammer <matthew.hammer@gmail.com>
|
Oops: I forgot about that temp stuff; thanks! Aside: That new feature (suggested changes) was somewhat nice. I clicked a button, and the change was made for me. How hard was it to propose these changes? You didn't need to do the edits in your browser, did you? |
You can also apply the changes in a batch commit: https://help.github.com/en/articles/incorporating-feedback-in-your-pull-request (but less important if we squash before merging, or if we simply don’t care too much about the tidynes of |
|
Look like |
to make life easier for arithmetic on Word8/Word16 (#216) (This is with GC disabled.)
Co-Authored-By: nomeata <mail@joachim-breitner.de>
and improve comments a bit.
Tag pointers, not scalars
* remove tab * Update compile.ml
[FileCheck](https://llvm.org/docs/CommandGuide/FileCheck.html) is a tool created by the LLVM folks to embed textual assertions about the output code in test cases. This comment sets up our test suite so that we can put `CHECK` directives into the test files, and `run.sh` will use `FileCheck` to see if the resulting `.wat` file matchs the specs. I am using this in one example to assert that the mutually recursive functions in `mutrec2.as` are compiled to direct calls (and not closures). This requires you to have `FileCheck` in your PATH. The easiest way of doing that is to run nix-env -i -f . -A filecheck
add newline for unix police
Extend testsuite to allow for FileCheck assertions
* clean result of `shift_right`s * testcase
* In the makefile there is now 'parallel' which runs all the tests in parallel, * and 'quick' which does the same, but without the `dvm` tests. * regression tests (via `nix`) are now running the `quick` target (with unlimited parallelism) * for testing also `dvm`, we run in `run-dfinity/` parallel with at most 8 jobs, as unlimited jobs cause problems It should be checked why `-j` for the latter causes failure (some traps appear duplicated in the logs).
## Changelog for ic-hs: Branch: master Commits: [dfinity/ic-hs@52369fa1...f092a2d5](dfinity/ic-hs@52369fa...f092a2d) * [`12590345`](dfinity/ic-hs@1259034) bump cachix/install-nix-action ([dfinity/ic-hs#201](https://github.com/dfinity/ic-hs/issues/201)) * [`2ef5690c`](dfinity/ic-hs@2ef5690) Bump openssl from 0.10.48 to 0.10.55 in /httpbin-rs ([dfinity/ic-hs#202](https://github.com/dfinity/ic-hs/issues/202)) * [`46af8266`](dfinity/ic-hs@46af826) sync httpbin implementation with ic repo ([dfinity/ic-hs#193](https://github.com/dfinity/ic-hs/issues/193)) * [`1fd276eb`](dfinity/ic-hs@1fd276e) implement Call context removal transition ([dfinity/ic-hs#191](https://github.com/dfinity/ic-hs/issues/191)) * [`11c00d2a`](dfinity/ic-hs@11c00d2) catch HTTP exception from HTTPS outcalls ([dfinity/ic-hs#195](https://github.com/dfinity/ic-hs/issues/195)) * [`9eb5bf48`](dfinity/ic-hs@9eb5bf4) deleted call contexts prevent canister from stopping (again) ([dfinity/ic-hs#190](https://github.com/dfinity/ic-hs/issues/190)) * [`f092a2d5`](dfinity/ic-hs@f092a2d) implement and test canister history ([dfinity/ic-hs#198](https://github.com/dfinity/ic-hs/issues/198))
## Changelog for ic-hs: Branch: master Commits: [dfinity/ic-hs@52369fa1...f092a2d5](dfinity/ic-hs@52369fa...f092a2d) * [`12590345`](dfinity/ic-hs@1259034) bump cachix/install-nix-action ([dfinity/ic-hs#201](https://github.com/dfinity/ic-hs/issues/201)) * [`2ef5690c`](dfinity/ic-hs@2ef5690) Bump openssl from 0.10.48 to 0.10.55 in /httpbin-rs ([dfinity/ic-hs#202](https://github.com/dfinity/ic-hs/issues/202)) * [`46af8266`](dfinity/ic-hs@46af826) sync httpbin implementation with ic repo ([dfinity/ic-hs#193](https://github.com/dfinity/ic-hs/issues/193)) * [`1fd276eb`](dfinity/ic-hs@1fd276e) implement Call context removal transition ([dfinity/ic-hs#191](https://github.com/dfinity/ic-hs/issues/191)) * [`11c00d2a`](dfinity/ic-hs@11c00d2) catch HTTP exception from HTTPS outcalls ([dfinity/ic-hs#195](https://github.com/dfinity/ic-hs/issues/195)) * [`9eb5bf48`](dfinity/ic-hs@9eb5bf4) deleted call contexts prevent canister from stopping (again) ([dfinity/ic-hs#190](https://github.com/dfinity/ic-hs/issues/190)) * [`f092a2d5`](dfinity/ic-hs@f092a2d) implement and test canister history ([dfinity/ic-hs#198](https://github.com/dfinity/ic-hs/issues/198))
In the
Desugarmodule, transform eachforloop,whileloop andloop ... whileloop into an equivalent unconditionalloopform, with compensatinglabels andbreaks.