gipplab / LaCASt

LaCASt - A LaTeX Translator for Computer Algebra Systems
MIT License
7 stars 1 forks source link

Maple SIGSEGV errors #205

Closed AndreG-P closed 3 years ago

AndreG-P commented 3 years ago

Maple often runs into SIGSEGV errors. This is due to bugs in Maple or at least bugs within the implementation of the OpenMaple API (which is native). Finally, I was able to find a case that actually produces the bug once I start the computation.

Obviously, we can/should inform Maplesoft about it but this gives me the opportunity to finally try to find ways to recover from that. Usually, this is impossible from our side. If Maple does not catch that bug and properly returns an exception, we are lost. SIGSEGV is pretty heavy, the damn entire VM crashes!

So the only way around would be to start a second VM just to communicate with Maple and in case of a SIGSEGV (or other signals different to 0) we can restart the VM.

This brings two problems:

At least for the second option, RMI (remote method invocation) looks like a promising option: https://www.baeldung.com/java-rmi

As our use case that cases the crash. Run our numeric evaluation with:

nTest := evalf((sum(JacobiP(n, alpha, beta, z)*(t)^(n), n = 0..infinity))-((2)^(alpha + beta)* (R)^(- 1)*(1 - t + R)^(- alpha)*(1 + t + R)^(- beta)));
nTestVals := [[R = Exp[1/6*I*Pi], alpha = 3/2, beta = 3/2, t = -3/2, z = 3/2], [R = Exp[1/6*I*Pi], alpha = 3/2, beta = 3/2, t = -3/2, z = 1/2], [R = Exp[1/6*I*Pi], alpha = 3/2, beta = 3/2, t = -3/2, z = 2]];
numResults := SpecialNumericalTesterTimeLimit(10.0, nTest, nTestVals, 10);