doc-src/Codegen/Thy/Evaluation.thy
changeset 40350 1ef7ee8dd165
parent 39745 3aa2bc9c5478
child 40751 6975c4d83ffd
equal deleted inserted replaced
40349:131cf8790a1c 40350:1ef7ee8dd165
    16 
    16 
    17 
    17 
    18 subsection {* Evaluation techniques *}
    18 subsection {* Evaluation techniques *}
    19 
    19 
    20 text {*
    20 text {*
    21   The existing infrastructure provides a rich palett of evaluation
    21   The existing infrastructure provides a rich palette of evaluation
    22   techniques, each comprising different aspects:
    22   techniques, each comprising different aspects:
    23 
    23 
    24   \begin{description}
    24   \begin{description}
    25 
    25 
    26     \item[Expressiveness.]  Depending on how good symbolic computation
    26     \item[Expressiveness.]  Depending on how good symbolic computation
   133 
   133 
   134     \item Evaluation of @{term t} terminates with a result @{term
   134     \item Evaluation of @{term t} terminates with a result @{term
   135       "t'"}.
   135       "t'"}.
   136 
   136 
   137     \item Evaluation of @{term t} terminates which en exception
   137     \item Evaluation of @{term t} terminates which en exception
   138       indicating a pattern match failure or a not-implemented
   138       indicating a pattern match failure or a non-implemented
   139       function.  As sketched in \secref{sec:partiality}, this can be
   139       function.  As sketched in \secref{sec:partiality}, this can be
   140       interpreted as partiality.
   140       interpreted as partiality.
   141      
   141      
   142     \item Evaluation raises any other kind of exception.
   142     \item Evaluation raises any other kind of exception.
   143      
   143      
   146   \noindent For conversions, the first case yields the equation @{term
   146   \noindent For conversions, the first case yields the equation @{term
   147   "t = t'"}, the second defaults to reflexivity @{term "t = t"}.
   147   "t = t'"}, the second defaults to reflexivity @{term "t = t"}.
   148   Exceptions of the third kind are propagated to the user.
   148   Exceptions of the third kind are propagated to the user.
   149 
   149 
   150   By default return values of plain evaluation are optional, yielding
   150   By default return values of plain evaluation are optional, yielding
   151   @{text "SOME t'"} in the first case, @{text "NONE"} and in the
   151   @{text "SOME t'"} in the first case, @{text "NONE"} in the
   152   second propagating the exception in the third case.  A strict
   152   second, and propagating the exception in the third case.  A strict
   153   variant of plain evaluation either yields @{text "t'"} or propagates
   153   variant of plain evaluation either yields @{text "t'"} or propagates
   154   any exception, a liberal variant caputures any exception in a result
   154   any exception, a liberal variant caputures any exception in a result
   155   of type @{text "Exn.result"}.
   155   of type @{text "Exn.result"}.
   156   
   156   
   157   For property conversion (which coincides with conversion except for
   157   For property conversion (which coincides with conversion except for