You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ats-lan...@googlegroups.com
In the ATS book, it says:
"Therefore, a non-recursive function is just a special kind of of recursive
function: the kind that does not make any calls to itself in its body."
But then a recursive function is defined differently than a non-recursive (fun
vs fn). Why is that? Is this to help the compiler?
What would be the impact of bind a non-recursive function with "fun"?
Thanks.
--
Yves.
gmhwxi
unread,
Apr 11, 2014, 10:10:40 AM4/11/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ats-lan...@googlegroups.com
In ATS, non-termination (ntm) is considered a kind of effect. Any function declared using the keyword 'fun' is assumed to have the ntm effect unless a termination metric is provided.
fn foo (...) ...
is just a shorthand for
fun foo .<>. (...) ...
where .<>. is the empty termination metric.
For most uses, the difference btween fn and fun is probably irrelevant.
Yves Dorfsman
unread,
Apr 11, 2014, 2:47:56 PM4/11/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ats-lan...@googlegroups.com
Thanks, that actually makes more sense. Would it make sense to explain it like
that in the book, rather than recursive vs. non-recursive?