6 replaced http://stackoverflow.com/ with https://stackoverflow.com/
source | link
  • Evaluate CellProlog, if defined for a given cell (LS: CellProlog is an option for the cell which defines a piece of code to evaluate, not a function of the input).

  • Evaluate CellEvaluationFunction, if defined for a given cell

    • In a StandardForm or TraditionalForm cell, CellEvaluationFunction is applied to the BoxData expression representing the input to be evaluated.
    • In an InputForm cell, it is applied to the string corresponding to the input to be evaluated.

    LS: In all cases, this is a function which is applied to the input (string or boxes). At this point, one can divert the entire evaluation loop as one wants, including evaluations not involving Mathematica kernel at all (e.g. code in other languages, processed externally. See this excellent answer by WReachthis excellent answer by WReach for the exposition of the possibilities this offers).

    All the steps below assume the default CellEvaluationFunction, which is Identity

  • Read in input (LS: in a string or boxes form, presumably depends on the cell type).

  • Apply $PreRead function, if defined, to the input string (LS: also for a box expression if an input is read as boxes. Note that if CellEvaluationFunction has been defined and still calls the kernel to evaluate the result, then $PreRead is applied to the result of CellEvaluationFunction execution).

  • Print syntax warnings if necessary.

  • Apply $SyntaxHandler function if there is a syntax error.

  • LS: Call MakeExpression to create an expression from boxes

  • LS: As a part of expression creation, call $NewSymbol on every new symbol to be created, then create that symbol. The choice of context where the symbol is created is based on the current (at the time of symbol's creation) values of $Context and $ContextPath. Obviously, cell and notebook contexts, when enabled, must be communicated to the kernel as a part of the cell evaluation process. That this is indeed the case, you can confirm by evaluating $Context variable in such a cell. How and at which stage this is done I don't know, perhaps someone will add this info.

  • Assign InString[n].

  • Apply $Pre function, if defined, to the input expression.

  • Assign In[n].

  • Evaluate expression which is a process with many steps as explained at here.

  • Apply $Post function, if defined.

  • Assign Out[n], stripping off any formatting wrappers.

  • Apply $PrePrint function, if defined.

  • Assign MessageList[n] and clear $MessageList.

  • Print expression, if it is not Null.

  • Increment $Line.

  • Clear any pending aborts.

  • Evaluate CellEpilog, if defined for a given cell.

  • Reference pages for the functions or options such as CellProlog,CellEpilog, CellEvaluationFunction, etc.
  • A good brief (but dated) description is the 1992 WRI technical report "Mathematica internals" by David Withoff (available online as .pdf).
  • Some interesting investigations on the order of some of the operations here were carried out by Alexey Popkov in this questionthis question.
  • Evaluate CellProlog, if defined for a given cell (LS: CellProlog is an option for the cell which defines a piece of code to evaluate, not a function of the input).

  • Evaluate CellEvaluationFunction, if defined for a given cell

    • In a StandardForm or TraditionalForm cell, CellEvaluationFunction is applied to the BoxData expression representing the input to be evaluated.
    • In an InputForm cell, it is applied to the string corresponding to the input to be evaluated.

    LS: In all cases, this is a function which is applied to the input (string or boxes). At this point, one can divert the entire evaluation loop as one wants, including evaluations not involving Mathematica kernel at all (e.g. code in other languages, processed externally. See this excellent answer by WReach for the exposition of the possibilities this offers).

    All the steps below assume the default CellEvaluationFunction, which is Identity

  • Read in input (LS: in a string or boxes form, presumably depends on the cell type).

  • Apply $PreRead function, if defined, to the input string (LS: also for a box expression if an input is read as boxes. Note that if CellEvaluationFunction has been defined and still calls the kernel to evaluate the result, then $PreRead is applied to the result of CellEvaluationFunction execution).

  • Print syntax warnings if necessary.

  • Apply $SyntaxHandler function if there is a syntax error.

  • LS: Call MakeExpression to create an expression from boxes

  • LS: As a part of expression creation, call $NewSymbol on every new symbol to be created, then create that symbol. The choice of context where the symbol is created is based on the current (at the time of symbol's creation) values of $Context and $ContextPath. Obviously, cell and notebook contexts, when enabled, must be communicated to the kernel as a part of the cell evaluation process. That this is indeed the case, you can confirm by evaluating $Context variable in such a cell. How and at which stage this is done I don't know, perhaps someone will add this info.

  • Assign InString[n].

  • Apply $Pre function, if defined, to the input expression.

  • Assign In[n].

  • Evaluate expression which is a process with many steps as explained at here.

  • Apply $Post function, if defined.

  • Assign Out[n], stripping off any formatting wrappers.

  • Apply $PrePrint function, if defined.

  • Assign MessageList[n] and clear $MessageList.

  • Print expression, if it is not Null.

  • Increment $Line.

  • Clear any pending aborts.

  • Evaluate CellEpilog, if defined for a given cell.

  • Reference pages for the functions or options such as CellProlog,CellEpilog, CellEvaluationFunction, etc.
  • A good brief (but dated) description is the 1992 WRI technical report "Mathematica internals" by David Withoff (available online as .pdf).
  • Some interesting investigations on the order of some of the operations here were carried out by Alexey Popkov in this question.
  • Evaluate CellProlog, if defined for a given cell (LS: CellProlog is an option for the cell which defines a piece of code to evaluate, not a function of the input).

  • Evaluate CellEvaluationFunction, if defined for a given cell

    • In a StandardForm or TraditionalForm cell, CellEvaluationFunction is applied to the BoxData expression representing the input to be evaluated.
    • In an InputForm cell, it is applied to the string corresponding to the input to be evaluated.

    LS: In all cases, this is a function which is applied to the input (string or boxes). At this point, one can divert the entire evaluation loop as one wants, including evaluations not involving Mathematica kernel at all (e.g. code in other languages, processed externally. See this excellent answer by WReach for the exposition of the possibilities this offers).

    All the steps below assume the default CellEvaluationFunction, which is Identity

  • Read in input (LS: in a string or boxes form, presumably depends on the cell type).

  • Apply $PreRead function, if defined, to the input string (LS: also for a box expression if an input is read as boxes. Note that if CellEvaluationFunction has been defined and still calls the kernel to evaluate the result, then $PreRead is applied to the result of CellEvaluationFunction execution).

  • Print syntax warnings if necessary.

  • Apply $SyntaxHandler function if there is a syntax error.

  • LS: Call MakeExpression to create an expression from boxes

  • LS: As a part of expression creation, call $NewSymbol on every new symbol to be created, then create that symbol. The choice of context where the symbol is created is based on the current (at the time of symbol's creation) values of $Context and $ContextPath. Obviously, cell and notebook contexts, when enabled, must be communicated to the kernel as a part of the cell evaluation process. That this is indeed the case, you can confirm by evaluating $Context variable in such a cell. How and at which stage this is done I don't know, perhaps someone will add this info.

  • Assign InString[n].

  • Apply $Pre function, if defined, to the input expression.

  • Assign In[n].

  • Evaluate expression which is a process with many steps as explained at here.

  • Apply $Post function, if defined.

  • Assign Out[n], stripping off any formatting wrappers.

  • Apply $PrePrint function, if defined.

  • Assign MessageList[n] and clear $MessageList.

  • Print expression, if it is not Null.

  • Increment $Line.

  • Clear any pending aborts.

  • Evaluate CellEpilog, if defined for a given cell.

  • Reference pages for the functions or options such as CellProlog,CellEpilog, CellEvaluationFunction, etc.
  • A good brief (but dated) description is the 1992 WRI technical report "Mathematica internals" by David Withoff (available online as .pdf).
  • Some interesting investigations on the order of some of the operations here were carried out by Alexey Popkov in this question.
5 edited body
source | link
  • Reference pages for the functions or options such as CellProlog,CellEpilog, CellEvaluationFunction, etc.
  • A good brief (but dated) description is the 1992 WRI technical report "Mathematica internals" by David Withoff (available online as .pdf).
  • Some interesting investigations on the order of some of the operations here were carried out by AlexeiAlexey Popkov in this question.
  • Reference pages for the functions or options such as CellProlog,CellEpilog, CellEvaluationFunction, etc.
  • A good brief (but dated) description is the 1992 WRI technical report "Mathematica internals" by David Withoff (available online as .pdf).
  • Some interesting investigations on the order of some of the operations here were carried out by Alexei Popkov in this question.
  • Reference pages for the functions or options such as CellProlog,CellEpilog, CellEvaluationFunction, etc.
  • A good brief (but dated) description is the 1992 WRI technical report "Mathematica internals" by David Withoff (available online as .pdf).
  • Some interesting investigations on the order of some of the operations here were carried out by Alexey Popkov in this question.
4 Added a link that explain the many steps in 'Evaluate expression'.
source | link
  • Evaluate CellProlog, if defined for a given cell (LS: CellProlog is an option for the cell which defines a piece of code to evaluate, not a function of the input).

  • Evaluate CellEvaluationFunction, if defined for a given cell

    • In a StandardForm or TraditionalForm cell, CellEvaluationFunction is applied to the BoxData expression representing the input to be evaluated.
    • In an InputForm cell, it is applied to the string corresponding to the input to be evaluated.

    LS: In all cases, this is a function which is applied to the input (string or boxes). At this point, one can divert the entire evaluation loop as one wants, including evaluations not involving Mathematica kernel at all (e.g. code in other languages, processed externally. See this excellent answer by WReach for the exposition of the possibilities this offers).

    All the steps below assume the default CellEvaluationFunction, which is Identity

  • Read in input (LS: in a string or boxes form, presumably depends on the cell type).

  • Apply $PreRead function, if defined, to the input string (LS: also for a box expression if an input is read as boxes. Note that if CellEvaluationFunction has been defined and still calls the kernel to evaluate the result, then $PreRead is applied to the result of CellEvaluationFunction execution).

  • Print syntax warnings if necessary.

  • Apply $SyntaxHandler function if there is a syntax error.

  • LS: Call MakeExpression to create an expression from boxes

  • LS: As a part of expression creation, call $NewSymbol on every new symbol to be created, then create that symbol. The choice of context where the symbol is created is based on the current (at the time of symbol's creation) values of $Context and $ContextPath. Obviously, cell and notebook contexts, when enabled, must be communicated to the kernel as a part of the cell evaluation process. That this is indeed the case, you can confirm by evaluating $Context variable in such a cell. How and at which stage this is done I don't know, perhaps someone will add this info.

  • Assign InString[n].

  • Apply $Pre function, if defined, to the input expression.

  • Assign In[n].

  • Evaluate expression. which is a process with many steps as explained at here.

  • Apply $Post function, if defined.

  • Assign Out[n], stripping off any formatting wrappers.

  • Apply $PrePrint function, if defined.

  • Assign MessageList[n] and clear $MessageList.

  • Print expression, if it is not Null.

  • Increment $Line.

  • Clear any pending aborts.

  • Evaluate CellEpilog, if defined for a given cell.

  • Evaluate CellProlog, if defined for a given cell (LS: CellProlog is an option for the cell which defines a piece of code to evaluate, not a function of the input).

  • Evaluate CellEvaluationFunction, if defined for a given cell

    • In a StandardForm or TraditionalForm cell, CellEvaluationFunction is applied to the BoxData expression representing the input to be evaluated.
    • In an InputForm cell, it is applied to the string corresponding to the input to be evaluated.

    LS: In all cases, this is a function which is applied to the input (string or boxes). At this point, one can divert the entire evaluation loop as one wants, including evaluations not involving Mathematica kernel at all (e.g. code in other languages, processed externally. See this excellent answer by WReach for the exposition of the possibilities this offers).

    All the steps below assume the default CellEvaluationFunction, which is Identity

  • Read in input (LS: in a string or boxes form, presumably depends on the cell type).

  • Apply $PreRead function, if defined, to the input string (LS: also for a box expression if an input is read as boxes. Note that if CellEvaluationFunction has been defined and still calls the kernel to evaluate the result, then $PreRead is applied to the result of CellEvaluationFunction execution).

  • Print syntax warnings if necessary.

  • Apply $SyntaxHandler function if there is a syntax error.

  • LS: Call MakeExpression to create an expression from boxes

  • LS: As a part of expression creation, call $NewSymbol on every new symbol to be created, then create that symbol. The choice of context where the symbol is created is based on the current (at the time of symbol's creation) values of $Context and $ContextPath. Obviously, cell and notebook contexts, when enabled, must be communicated to the kernel as a part of the cell evaluation process. That this is indeed the case, you can confirm by evaluating $Context variable in such a cell. How and at which stage this is done I don't know, perhaps someone will add this info.

  • Assign InString[n].

  • Apply $Pre function, if defined, to the input expression.

  • Assign In[n].

  • Evaluate expression.

  • Apply $Post function, if defined.

  • Assign Out[n], stripping off any formatting wrappers.

  • Apply $PrePrint function, if defined.

  • Assign MessageList[n] and clear $MessageList.

  • Print expression, if it is not Null.

  • Increment $Line.

  • Clear any pending aborts.

  • Evaluate CellEpilog, if defined for a given cell.

  • Evaluate CellProlog, if defined for a given cell (LS: CellProlog is an option for the cell which defines a piece of code to evaluate, not a function of the input).

  • Evaluate CellEvaluationFunction, if defined for a given cell

    • In a StandardForm or TraditionalForm cell, CellEvaluationFunction is applied to the BoxData expression representing the input to be evaluated.
    • In an InputForm cell, it is applied to the string corresponding to the input to be evaluated.

    LS: In all cases, this is a function which is applied to the input (string or boxes). At this point, one can divert the entire evaluation loop as one wants, including evaluations not involving Mathematica kernel at all (e.g. code in other languages, processed externally. See this excellent answer by WReach for the exposition of the possibilities this offers).

    All the steps below assume the default CellEvaluationFunction, which is Identity

  • Read in input (LS: in a string or boxes form, presumably depends on the cell type).

  • Apply $PreRead function, if defined, to the input string (LS: also for a box expression if an input is read as boxes. Note that if CellEvaluationFunction has been defined and still calls the kernel to evaluate the result, then $PreRead is applied to the result of CellEvaluationFunction execution).

  • Print syntax warnings if necessary.

  • Apply $SyntaxHandler function if there is a syntax error.

  • LS: Call MakeExpression to create an expression from boxes

  • LS: As a part of expression creation, call $NewSymbol on every new symbol to be created, then create that symbol. The choice of context where the symbol is created is based on the current (at the time of symbol's creation) values of $Context and $ContextPath. Obviously, cell and notebook contexts, when enabled, must be communicated to the kernel as a part of the cell evaluation process. That this is indeed the case, you can confirm by evaluating $Context variable in such a cell. How and at which stage this is done I don't know, perhaps someone will add this info.

  • Assign InString[n].

  • Apply $Pre function, if defined, to the input expression.

  • Assign In[n].

  • Evaluate expression which is a process with many steps as explained at here.

  • Apply $Post function, if defined.

  • Assign Out[n], stripping off any formatting wrappers.

  • Apply $PrePrint function, if defined.

  • Assign MessageList[n] and clear $MessageList.

  • Print expression, if it is not Null.

  • Increment $Line.

  • Clear any pending aborts.

  • Evaluate CellEpilog, if defined for a given cell.

3 Added a note on symbol's contexts
source | link
2 Added a sub-section on Notation package
source | link
1
source | link
    Post Made Community Wiki by Leonid Shifrin