On Nov 19, 2007 8:29 AM, Jason Grout <[EMAIL PROTECTED]> wrote: > > William Stein wrote: > > > 3. Dumb question -- Where is the actual source code of anything in Maple? > > I'm skimming through my Maple install to see some actual source code > > and > > I can't find anything. The lib/ directory has lots of .mla > > files, but these are all > > pre-compiled binary files -- no source code. Is there some tool > > included with > > Maple to decompile them? (I'm not being rhetorical, I simply don't > > know > > how to actually view source code of Maple functions, even if I wanted > > to.) > > Some links dealing with this: > > http://www.mapleprimes.com/blog/jacquesc/old-timer-techniques > > http://www.mapleprimes.com/forum/algorithms-used-in-maple > > http://thproxy.jinr.ru/Documents/MapleV/qa/section3_4.html > > I've used the printlevel and I think the showstat techniques before. > Unfortunately, I can't test them because I no longer have access to > Maple (at least on my home machine). I guess that's they whole point > again---even if there is some way for someone to get the output of the > procedure, it doesn't do me any good because I don't have Maple and > can't check it anyway.
This *does* work in Maple 11: sage: maple_console() |\^/| Maple 11 (APPLE UNIVERSAL OSX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2007 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > print(gcd); proc(aa, bb, cofa::name, cofb::name) ... end proc > interface(verboseproc=2); 1 > print(gcd); proc(aa, bb, cofa::name, cofb::name) local Z, GCD, a, b; option `Copyright (c) 1992 by the University of Waterloo. All rights reserved.`; if 2 < nargs and member(cofa, indets(aa) union indets(bb)) then error "The optional 3rd argument given to `\ ... I wonder what proportion of the 1300 or so top-level functions in Maple (according to a sage's maple.[tab]) actually have source code. Interestingly, I bet I can make it so sage: maple.gcd?? will show the source code using one you suggest above. Trac ticket: http://trac.sagemath.org/sage_trac/ticket/1209 > Whether or not using printlevel or showstat is legal (in light of Josh's > response from Maple) is an interesting question. They are built-in > capabilities meant for introspection. They were also encouraged by the > Maple people in the above posts. <tinfoil hat> Maybe it is a trap. :-) </tinfoil hat> - William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---