Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

"Future-proof" Sage documents

I'm writing a paper and will be using a bundle of Sage scripts to help with various computations. I plan to post the script to the arxiv and submit it to a journal along with the paper.

I am curious whether there are any guidelines for writing Sage that is intended to be readable (and verifiable) in the medium- to long-term. Even assuming Sage is still around in 30 years, I am doubtful that current files will run. (For that matter, most of my programs won't run as soon as Sage switches to python3 due to the new print syntax.) I'd like to write the code in such a way that it could easily be adapted to whatever Sage-like software exists in the future, or such that future readers will at least be able trust the results of the computations.

In addition to generous comments, I plan to provide a human-readable file containing output of the main objects computed in the course of the work (matrices, algebraic expressions, ...). In my case, this is probably enough; the calculations are mostly just linear algebra at the end of the day. What else should I do? Has anyone ever worked with a university library or archive on for advice on writing future-proof Sage code?

Of course, this question applies to any paper relying on computer algebra calculations, not just those in Sage. I would also appreciate pointers to more broadly applicable articles on this topic.

I realize that old versions of Sage will probably still be accessible, and that a suitably-motivated mathematical historian might be able to get my code to compile. But this paper is not such a big deal -- I am looking for a solution that would lead someone to be able to reconstruct the results without so much effort.