3 ms·
Right but "guaranteed to terminate" is not a useful property. You could write a program that terminates... after a billion years.
by IshKebab 9mo ago
Right but "guaranteed to terminate" is not a useful property. You could write a program that terminates... after a billion years.
- dilyevsky 9mo agoYou can estimate cost of CEL program using static analysis before running it. "estimate" only because size of runtime data is generally unknown (but obv you could limit that).
- IshKebab 9mo ago"You can" - in theory, or does this actually exist?
- dilyevsky 9mo agohttps://pkg.go.dev/github.com/google/cel-go/cel#Env.EstimateCost https://pkg.go.dev/github.com/google/cel-go/cel#Env.Estimate...
- AlecBG 9mo agoWith certain macros disabled like .map the runtime is O(code length)!
- akshayshah 9mo agoThere’s a whole section on this on TFA: https://celbyexample.com/execution-cost/ https://celbyexample.com/execution-cost/