"ERROR: maximum memory usage computed to be XYZ MB, which is higher than the speicified limit of 500MB"
Now that would help keep the RAM bloat down!
"ERROR: maximum memory usage computed to be XYZ MB, which is higher than the speicified limit of 500MB"
Now that would help keep the RAM bloat down!
Edit: I'll add that there are lots of programs the prover can't effectively handle right now, so can't compute a good memory bound. It works fine for some relatively simple programs however.
And always will be, due to Rice's Theorem. Can still be useful though - various formal methods techniques are like this.
if (sz < 1e6)
vec = vector<int>(sz)
else
throw "Size exceeds upper limit"That means the language isn't always crippled, but you can get compiler enforcement for certain embedded programs.
It basically ensures at compile-time that every allocation in the program will succeed given some expected usable footprint, which also has the benefit of ensuring that we kill the kernel/OS immediately at bootstrapping if the machine/environment doesn't have enough memory to make sure our proof-carrying code can meet its expectations.
One huge problem with this approach though is that it doesn't scale well. Where "scale" is in the dimension of revising your programs because the type-parameters tend to bleed all over the place and don't compose well/at-all. So, it's great if you're sure you've got your design locked-in, but it's kind of a nightmare if you're still prototyping & refactoring.