Re: Import "HeldExpression" element of MX file
- To: mathgroup at smc.vnet.net
- Subject: [mg103324] Re: Import "HeldExpression" element of MX file
- From: dr DanW <dmaxwarren at gmail.com>
- Date: Tue, 15 Sep 2009 04:26:09 -0400 (EDT)
- References: <200909101125.HAA18361@smc.vnet.net> <h8d54o$112$1@smc.vnet.net>
I have been looking at this for a couple of weeks (I may be the poster of the "previous question" that started this thread). I started this with the mistaken impression that a .mx file was simply a binary form of a .m file, but I am coming to appreciate that the nature of the data stored in these files is fundamentally different. Most of Mathematica input is in the form of expressions; a .m file stores a literal, ASCII representation of these expressions as could be input directly from a keyboard. However, Mathematica interprets input expressions to build internal tables of values and attributes, which we can get a peek at using Information[], ??, UpValues[], or DownValues[]. DumpSave[] creates a binary dump of these internal value tables to a .mx file, in a format I am presuming is a close mirror of the internal memory registers. So, when we read in a .mx file, we should not expect to get the expressions the programmer typed in (in Held form or otherwise), but the somewhat pre-digested form that Mathematica uses internally. This may still provide us some insight into how a function works, but not as insightful as seeing the original code. Daniel
- References:
- Import "HeldExpression" element of MX file
- From: Szabolcs Horvát <szhorvat@gmail.com>
- Import "HeldExpression" element of MX file