Because it is a builtin function, so it only accesses to the info at compilation time.
It is quite common to check the values behind these variables. So we could record the cell var index at the backend, and print out the relevant witness values when generating witnesses.
I think at some point we'll want a real format syntax like in rust (e.g. log("{sum}"))
we should distinguish debugging runtime value and type information, here it looks more like a log("{}", typeof(sum)) (or perhaps we could have a separate log_type function)
This is a logging feature to help debugging.
Usage:
It should print something like:
Because it is a builtin function, so it only accesses to the info at compilation time.
It is quite common to check the values behind these variables. So we could record the cell var index at the backend, and print out the relevant witness values when generating witnesses.