extract function template for uint type registration
begin to add semantics for self-recursion