Skip to content

Stuck in interleavedx from the structured async paper #639

Answered by TimWhiting
osa1 asked this question in Q&A
Discussion options

You must be logged in to vote

Divergence analysis is very basic in Koka, and very conservative. See this paper, section 2.7 for the particular reasons why divergence is inferred here: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/koka-effects-2013.pdf.

TLDR; heaps can store cyclic references that could cause divergence. Although this does not happen for non-function types, since the return value is polymorphic we cannot make guarantees. You can of course try arguing specific cases, such as if you aren't calling a heap-read value, but how is that knowledge of the fact that a function came from a heap propagated to a polymorphic return value? You would need a flow sensitive analysis to get more pre…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by osa1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants