Polymorphism checks #628

Merged
zxq9 merged 4 commits from polymorpism-checks into master 2019-08-30 22:48:35 +09:00
zxq9 commented 2019-08-30 18:59:42 +09:00 (Migrated from gitlab.com)

Created by: UlfNorell

Enforces

  • No higher-order entrypoints
  • No polymorphic entrypoints (AEVM only)
  • No polymorphic or higher-order oracles or AENS.resolve calls
*Created by: UlfNorell* - [PT-168026330](https://www.pivotaltracker.com/story/show/168026330) - [PT-166785003](https://www.pivotaltracker.com/story/show/166785003) - [PT-166786491](https://www.pivotaltracker.com/story/show/166786491) - [PT-168216899](https://www.pivotaltracker.com/story/show/168216899) Enforces - No higher-order entrypoints - No polymorphic entrypoints (AEVM only) - No polymorphic or higher-order oracles or `AENS.resolve` calls
zxq9 commented 2019-08-30 19:04:05 +09:00 (Migrated from gitlab.com)

Created by: hanssv

I see... To synchronize with aeternity repo.

*Created by: hanssv* I see... To synchronize with `aeternity` repo.
zxq9 commented 2019-08-30 20:42:16 +09:00 (Migrated from gitlab.com)

Created by: radrow

Why are polymorphic entrypoints banned?

*Created by: radrow* Why are polymorphic entrypoints banned?
zxq9 commented 2019-08-30 20:54:32 +09:00 (Migrated from gitlab.com)

Created by: UlfNorell

They're only banned in the AEVM where they don't work (unless you instantiate all type variables to word).

*Created by: UlfNorell* They're only banned in the AEVM where they don't work (unless you instantiate all type variables to `word`).
zxq9 commented 2019-08-30 21:04:56 +09:00 (Migrated from gitlab.com)

Created by: radrow

Review: Dismissed

fate compilation of entrypoint f(a) = a(1) + 2 throws internal error with stacktrace and no stdout. aevm does print something and doesn't show stacktrace, but gives this instead (don't look at the filename):

Code errors
{entrypoint_argument_must_have_simple_type,
    [{file,"aens"},{line,5},{col,19}],
    {id,[{file,"aens"},{line,5},{col,14}],"tttt"},
    {id,[{file,"aens"},{line,5},{col,19}],"a"},
    {fun_t,[],[],
        [{id,[{file,"aens"},{line,6},{col,7}],"int"}],
        {id,[{file,"aens"},{line,6},{col,10}],"int"}}}

which imo should be pretty printed. Same thing happens when someone tries to have polymorphic entrypoint on aevm.

*Created by: radrow* **Review:** Dismissed fate compilation of `entrypoint f(a) = a(1) + 2` throws internal error with stacktrace and no stdout. aevm does print something and doesn't show stacktrace, but gives this instead (don't look at the filename): ``` Code errors {entrypoint_argument_must_have_simple_type, [{file,"aens"},{line,5},{col,19}], {id,[{file,"aens"},{line,5},{col,14}],"tttt"}, {id,[{file,"aens"},{line,5},{col,19}],"a"}, {fun_t,[],[], [{id,[{file,"aens"},{line,6},{col,7}],"int"}], {id,[{file,"aens"},{line,6},{col,10}],"int"}}} ``` which imo should be pretty printed. Same thing happens when someone tries to have polymorphic entrypoint on aevm.
zxq9 commented 2019-08-30 21:11:33 +09:00 (Migrated from gitlab.com)

Created by: UlfNorell

Making sure error messages are nice and uniform is not part of this PR. Currently errors from the FATE backend are not being caught and returned gracefully. @hanssv is working on this.

*Created by: UlfNorell* Making sure error messages are nice and uniform is not part of this PR. Currently errors from the FATE backend are not being caught and returned gracefully. @hanssv is working on this.
zxq9 commented 2019-08-30 21:26:41 +09:00 (Migrated from gitlab.com)

Created by: UlfNorell

Now also fixes #112.

*Created by: UlfNorell* Now also fixes #112.
zxq9 commented 2019-08-30 21:38:32 +09:00 (Migrated from gitlab.com)

Created by: radrow

I moved it to PT https://www.pivotaltracker.com/story/show/168216899, may be mentioned instead of #112

*Created by: radrow* I moved it to PT https://www.pivotaltracker.com/story/show/168216899, may be mentioned instead of #112
zxq9 commented 2019-08-30 22:02:24 +09:00 (Migrated from gitlab.com)

Created by: radrow

Review: Approved

*Created by: radrow* **Review:** Approved
zxq9 commented 2019-08-30 22:47:18 +09:00 (Migrated from gitlab.com)

Created by: hanssv

Review: Approved

*Created by: hanssv* **Review:** Approved
zxq9 commented 2019-08-30 22:48:35 +09:00 (Migrated from gitlab.com)

Merged by: UlfNorell at 2019-08-30 13:48:35 UTC

*Merged by: UlfNorell at 2019-08-30 13:48:35 UTC*
Sign in to join this conversation.
No description provided.