#7001: [reported upstream] Sage's GAP interface not properly leaving GAP's
break
loop
------------------------+---------------------------------------------------
Reporter: SimonKing | Owner: SimonKing
Type: defect | Status: assigned
Priority: major | Milestone: sage-4.1.2
Component: interfaces | Keywords: gap interface recursion depth trap
Reviewer: | Author:
Merged: |
------------------------+---------------------------------------------------
Comment(by SimonKing):
It turned out that it is a bug in GAP, not in Sage, as was pointed out by
Frank Lübeck, whose message to me I post here with his permission:
----
...
Second, your previous code does actually show a bug in GAP: if a function
call in GAP is not properly finished (by running into an error and
quiting the break loop) an internal counter for the recursion depth is not
reset. Here is a short GAP session that demonstrates the effect:
{{{
gap> f := function() return 1/0; end;;
gap> SetRecursionTrapInterval(3);
gap> f();
Rational operations: <divisor> must not be zero at
return 1 / 0;
called from
<function>( <arguments> ) called from read-eval-loop
Entering break read-eval-print loop ...
you can 'quit;' to quit to outer loop, or
you can replace <divisor> via 'return <divisor>;' to continue
brk> quit;
gap> f();
Rational operations: <divisor> must not be zero at
return 1 / 0;
called from
<function>( <arguments> ) called from read-eval-loop
Entering break read-eval-print loop ...
you can 'quit;' to quit to outer loop, or
you can replace <divisor> via 'return <divisor>;' to continue
brk> quit;
recursion depth trap (3)
at
return 1 / 0;
called from
<function>( <arguments> ) called from read-eval-loop
Entering break read-eval-print loop ...
you can 'quit;' to quit to outer loop, or
you may 'return;' to continue
brk_02>
}}}
I will try to fix this.
Thanks and best regards,
Frank
----
So, I label this ticket as "reported upstream", and think that the ticket
should be closed as invalid by some administrator.
Cheers,
Simon
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7001#comment:2>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---