6
$\begingroup$

There is so much information available for Java--the internal details of (for example) the JVM memory manager are well-documented, and the performance considerations arising from its interaction with user code have been publicly discussed. I am interested to know if there is any comparable documentation for the Mathematica kernel. Specifically:

  • What are the major steps involved in evaluation?
  • Which of these are the most important from a performance standpoint?

Is there any public documentation available about how all of this is implemented? If there is, I wasn't able to find it after searching the Internet: neither the mechanics of the evaluation process, nor the internal workings of particular functions, seem to be known outside of WRI.

$\endgroup$
12
  • 3
    $\begingroup$ Have a look here. $\endgroup$ Commented Mar 4, 2013 at 19:06
  • 7
    $\begingroup$ @Oleksandr R. quite the edit! $\endgroup$
    – Yves Klett
    Commented Mar 4, 2013 at 19:35
  • 2
    $\begingroup$ This question may be a duplicate of this one. $\endgroup$
    – m_goldberg
    Commented Mar 4, 2013 at 19:36
  • 3
    $\begingroup$ See if you can find a copy of book Power Programming With Mathematica: The Kernel by David B. Wagner, McGraw-Hill, 1996, in a library. It's out-of-print and hard to find, unfortunately, but it contains the best description I know of on how the kernel works. $\endgroup$
    – m_goldberg
    Commented Mar 4, 2013 at 19:40
  • 5
    $\begingroup$ @OleksandrR. Seeing your work I feel it should be possible to upvote edits. $\endgroup$ Commented Mar 4, 2013 at 20:16

1 Answer 1

9
$\begingroup$

To give references to the first part of your question:

The best description about the main evaluation loop I have ever read can be found in (as already stated in the comments) Power Programming with Mathematica: The Kernel by David Wagner. A free pdf version of this book can be downloaded here. Therein, he refers to the tutorial Mathematica Internals: A Tutorial by David Withoff.

Although, these documents are rather old, I'm pretty sure they are still correct since this topic covers the core evaluation process which hasn't changed.

$\endgroup$
2
  • $\begingroup$ Is there an alternative version of Withoff's article? I cannot open the postscript in the provided link, (I tried with many linux programs). $\endgroup$
    – alfC
    Commented Oct 27, 2014 at 7:19
  • $\begingroup$ Also a fresh link for the book data.wolframmathematica.ru/working-files/… (it is supposedly public domain now) $\endgroup$
    – alfC
    Commented Oct 27, 2014 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.