Chris Condrat on Sun, 23 Oct 2005 07:04:02 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Lifting and handling errors

I'm coding a program that generates a very long multivariate polynomial with a great number of polynomial and integer modulo operations.  The program, and amount of data fed to it, is such that I expect that the stack will overflow, in fact that's part of the design--a sort of work-as-far-as-you-can design.  When a stack-overflow is encountered, I'd like to be able to dump out the polynomial before the stack-overflow-causing operation, as is, to a text file, so I can feed it to a different program.  I'd also like to be able to apply lift() operations to the polynomial to "clean it up" before it is dumped, but I'm afraid that because of the stack overflow, there may not be enough room to complete that operation without another stack-overflow.
Any hints on how these tasks could be accomplished would be appreciated.  Thank you.