patternMinor
Say that a stack frame only contains total functions: could the maximum stack size be statically determined?
Viewed 0 times
totalthemaximumstacksizesaycouldstaticallythatcontains
Problem
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).
Solution
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.
Context
StackExchange Computer Science Q#16592, answer score: 3
Revisions (0)
No revisions yet.