Skip to content

Help! Two extremely similar functions, yet one is forced to be div #371

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

You must be logged in to vote

Divergence inference is rather conservative. Koka still has room for improvement in this area, and this particular issue seems worth looking into. However, annotating with divergence isn't the end of the world. In general it is hard(impossible) to determine if a program will ever diverge (the halting problem). That doesn't mean that for certain programs it can't be done, but that in general you will likely end up having to annotate divergence, even where you know as a programmer that it will never diverge. Program analyzers are getting better at figuring out some invariants similar to humans, but there is definitely more work to be done.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@AZMCode
Comment options

@AZMCode
Comment options

@chtenb
Comment options

@AZMCode
Comment options

@chtenb
Comment options

Answer selected by AZMCode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants