3
$\begingroup$

Say that you have a program with only total functions, or if that is impossible, consider a subset of the program with only total functions. Is it theoretically possible to statically determine the maximum size of the stack frame at runtime? The language may have other characteristics that are relevant/necessary (such as a specific type system).

$\endgroup$

1 Answer 1

3
$\begingroup$

No. That would allow you to determine the runtime of any given (recursive) program (assuming it always terminates), but that is not a computable problem.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.