Opened 15 years ago

Closed 15 years ago

#1274 closed enhancement (fixed)

[with patch, with positive review] modify singular interface to allow for verbose output

Reported by: David Joyner Owned by: Martin Albrecht
Priority: major Milestone: sage-2.10.1
Component: commutative algebra Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Simon King:

Now, another question on the Singular interface:

In Singular, doing matrix P,S,IS = invariant_ring(A,1); would make Singular to additionally print information about the progress of computations (which, in big examples, might be nice to have). However, when i use the Singular interface, i can not see such informations. Where are they gone?

Martin Albrecht: The information is printed but ignored because pexpect expects Singular 'output' and ignores the rest. I am no pexpect expert so I don't know how to fix it. It would very very useful though. Anyone else has any idea?

William Stein: I think this would be possible to implement, by modifying interfaces/singular.py. It's easiest if we just have it print out the result of all the verbose output, rather than all of it along the way as it is output by singular, though the latter would also be possible. With pseudo-tty's it is possible to do anything you could really imagine doing by hand while physically using a terminal to interact with singular. Anything.

Attachments (1)

trac_1274.patch (3.3 KB) - added by Martin Albrecht 15 years ago.

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by Martin Albrecht

Attachment: trac_1274.patch added

comment:1 Changed 15 years ago by Martin Albrecht

Summary: modify singular interface to allow for verbose output[with patch, needs review] modify singular interface to allow for verbose output

comment:2 Changed 15 years ago by Martin Albrecht

This works now:

sage: r = singular.ring(0,'(x,y,z)','dp')
sage: i = singular.ideal(['x^2','y^2','z^2'])
sage: s = i.std()
sage: singular.eval('hilb(%s)'%(s.name()))
'// 1 t^0\n// -3 t^2\n// 3 t^4\n// -1 t^6\n\n// 1 t^0\n//
3 t^1\n// 3 t^2\n// 1 t^3\n// dimension (affine) = 0\n//
degree (affine) = 8'

sage: set_verbose(1)
sage: singular.eval('hilb(%s)'%(s.name()))
//         1 t^0
//        -3 t^2
//         3 t^4
//        -1 t^6
//         1 t^0
//         3 t^1
//         3 t^2
//         1 t^3
// dimension (affine) = 0
// degree (affine)  = 8
''

sage: o = s.hilb()
//         1 t^0
//        -3 t^2
//         3 t^4
//        -1 t^6
//         1 t^0
//         3 t^1
//         3 t^2
//         1 t^3
// dimension (affine) = 0
// degree (affine)  = 8
// ** right side is not a datum, assignment ignored

sage: set_verbose(0)
sage: o = s.hilb()

comment:3 Changed 15 years ago by ncalexan

Summary: [with patch, needs review] modify singular interface to allow for verbose output[with patch, with positive review] modify singular interface to allow for verbose output

Looks fine to me, should be applied.

comment:4 Changed 15 years ago by Michael Abshoff

Resolution: fixed
Status: newclosed

Merged in Sage 2.10.1.alpha1

Note: See TracTickets for help on using tickets.