You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
h: all acc. (acc -> acc, acc) -> acc
h (f, i) = f i
f1: U32 -> U32
f1 i = i+1
g: U32 -> U32
g i = h[U32](f1, i)
will cause g and h[U32] to be mutually recursive after translation to C.
The reason is that g and h[U32] have the same type and thus a common dispatcher
function is generated for them and invoked in the C implementation of h.
The effect is that although the C translation fully works, autocorres will fail on the generated C code, since it cannot
generate a nonrecursive definition for g and h[U32].
There seems to be no easy solution for this, but at least Cogent programmers should be made aware of this case.
The text was updated successfully, but these errors were encountered:
The following example code
will cause
g
andh[U32]
to be mutually recursive after translation to C.The reason is that
g
andh[U32]
have the same type and thus a common dispatcherfunction is generated for them and invoked in the C implementation of
h
.The effect is that although the C translation fully works, autocorres will fail on the generated C code, since it cannot
generate a nonrecursive definition for
g
andh[U32]
.There seems to be no easy solution for this, but at least Cogent programmers should be made aware of this case.
The text was updated successfully, but these errors were encountered: