Instead of stating rules, I will just give a few examples. More will be said later.
Computing the length of a given list:
fun list_length(xs: list(a)): sint
Nothing special here. The full name of the function should be list_length_sint
Computing the length of a given linear list:
fun list_vt_length0(xs: list_vt(a)): sint // xs is freed after the call
fun list_vt_length1(xs: !list_vt(a)): sint // xs is still available after the call
Linear list reverse-append:
fun list_vt_rappend01(xs: list_vt(a), ys: !list_vt(a)): list_vt(a)
The full name of the function should be: list_vt_rappend0_llist__llist1.
This name along indicates that the first argument (xs) is consumed;
the second argument (ys) is kept (llist1); the return value is a linear list
(llist).
Enough beans are spilled here :)
Cheers,
--Hongwei