Re: lib singular idLift behavior in corner case

15 views
Skip to first unread message

Martin Albrecht

unread,
Nov 3, 2012, 12:50:18 PM11/3/12
to Charles Bouillaguet, libsingular-devel
Hi Charles (CC: libsingular-devel),

On Friday 02 Nov 2012, you wrote:
> Hi Martin,
>
> I am trying to a) understand and b) fix
> http://trac.sagemath.org/sage_trac/ticket/13671
>
> It seems that things are going awfully wrong in libsingular (I can't
> explain the non-deterministic behavior of this function otherwise).

From the ticket it doesn't look non-deterministic. It returns (0,0,...,0)
instead of raising an error, but (0,0,....,0) can only be true if test == 0.
What am I missing.

> However, the singular manual advertises that idLift should somehow return
> a warning if the "lifted" sub-ideal is not contain in the (larger) ideal.
> I would like, in this case, to throw an exception. The thing is that I
> don't know how to catch the warning. Where should I look at ?

I see idLift calls:

WerrorS("2nd module does not lie in the first");

If I recall correctly, this calls WerrorS_callback which we fill with:

cdef void libsingular_error_callback(const_char_ptr s):
_s = s
error_messages.append(_s)

Hence, error_messages should contain the error message afterwards.

Cheers,
Martin

--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: martinr...@jabber.ccc.de

Martin Albrecht

unread,
Nov 3, 2012, 1:26:44 PM11/3/12
to charles.b...@gmail.com, libsingular-devel
Ah, right. Sorry for missing that. Indeed, it seems some flag or so is set in
idLift when it fails once, meaning it will always fail afterwards. I checked
with what the Singular interpreter does and that doesn't look too different:

static BOOLEAN jjLIFT(leftv res, leftv u, leftv v)
{
ideal m;
BITSET save_test=test;
int ul= IDELEMS((ideal)u->Data());
int vl= IDELEMS((ideal)v->Data());
m = idLift((ideal)u->Data(),(ideal)v-
>Data(),NULL,FALSE,hasFlag(u,FLAG_STD));
res->data = (char *)idModule2formatedMatrix(m,ul,vl);
test=save_test;
return FALSE;
}

(Adding that save_test <=> test business doesn't seem to help.)

On Saturday 03 Nov 2012, you wrote:
> Hi. Look at the 3rd answer from the ticket. This is crazy! It should be the
> same as the first one...
>
> Charles
> ---
> Charles Bouillaguet
> http://www.di.ens.fr/~bouillaguet/

han...@mathematik.uni-kl.de

unread,
Nov 5, 2012, 7:25:42 AM11/5/12
to libsingu...@googlegroups.com
On Sat, Nov 03, 2012 at 04:50:18PM +0000, Martin Albrecht wrote:
> I see idLift calls:
>
> WerrorS("2nd module does not lie in the first");
>
> If I recall correctly, this calls WerrorS_callback which we fill with:
>
> cdef void libsingular_error_callback(const_char_ptr s):
> _s = s
> error_messages.append(_s)
>
> Hence, error_messages should contain the error message afterwards.
>
> Cheers,
> Martin
>
An additional comment:
WerrorS also sets the global variable errorreported,
which is used at many places to abort after an error
(and to avoid general error message if there was already one
(hopefully more specific)).
errorreported is reset to 0 in the error handling branch of the singular
interpreter.
Maybe something equivalent is missing for the routine from libsingular
not called via the singular interpreter?

Hans

Charles Bouillaguet

unread,
Nov 15, 2012, 12:00:47 PM11/15/12
to libsingu...@googlegroups.com
Hi all,

Apparently this is not over yet :(


In this ticket, it is demonstrated that a call to "lift" with a polynomial that is not in the ideal modifies some internal state in a way that prevents the primary decomposition of the ideal to be computed.

It SEGFAULTs in sage 5.3, and hangs forever with a weird message in sage 5.4...

Any help would be greatly appreciated...

Charles
Reply all
Reply to author
Forward
0 new messages