/doc/avram.html/Error-Messages.html
HTML | 182 lines | 146 code | 12 blank | 24 comment | 0 complexity | d1cb23cd60c954916b0967f7fd27c15f MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
- <html>
- <!-- Created on December 10, 2012 by texi2html 1.82
- texi2html was written by:
- Lionel Cons <Lionel.Cons@cern.ch> (original author)
- Karl Berry <karl@freefriends.org>
- Olaf Bachmann <obachman@mathematik.uni-kl.de>
- and many others.
- Maintained by: Many creative people.
- Send bugs and suggestions to <texi2html-bug@nongnu.org>
- -->
- <head>
- <title>avram - a virtual machine code interpreter: 2.7.15.3 Error Messages</title>
- <meta name="description" content="avram - a virtual machine code interpreter: 2.7.15.3 Error Messages">
- <meta name="keywords" content="avram - a virtual machine code interpreter: 2.7.15.3 Error Messages">
- <meta name="resource-type" content="document">
- <meta name="distribution" content="global">
- <meta name="Generator" content="texi2html 1.82">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <style type="text/css">
- <!--
- a.summary-letter {text-decoration: none}
- blockquote.smallquotation {font-size: smaller}
- pre.display {font-family: serif}
- pre.format {font-family: serif}
- pre.menu-comment {font-family: serif}
- pre.menu-preformatted {font-family: serif}
- pre.smalldisplay {font-family: serif; font-size: smaller}
- pre.smallexample {font-size: smaller}
- pre.smallformat {font-family: serif; font-size: smaller}
- pre.smalllisp {font-size: smaller}
- span.roman {font-family:serif; font-weight:normal;}
- span.sansserif {font-family:sans-serif; font-weight:normal;}
- ul.toc {list-style: none}
- -->
- </style>
- </head>
- <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
- <a name="Error-Messages"></a>
- <table cellpadding="1" cellspacing="1" border="0">
- <tr><td valign="middle" align="left">[<a href="Operator-Generalization.html#Operator-Generalization" title="Previous section in reading order"> < </a>]</td>
- <td valign="middle" align="left">[<a href="Expedient-Error-Messages.html#Expedient-Error-Messages" title="Next section in reading order"> > </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="Virtual-Machine-Specification.html#Virtual-Machine-Specification" title="Beginning of this chapter or previous chapter"> << </a>]</td>
- <td valign="middle" align="left">[<a href="Exception-Handling.html#Exception-Handling" title="Up section"> Up </a>]</td>
- <td valign="middle" align="left">[<a href="Library-Reference.html#Library-Reference" title="Next chapter"> >> </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
- <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
- <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
- <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
- </tr></table>
- <hr size="1">
- <a name="Error-Messages-1"></a>
- <h4 class="subsubsection">2.7.15.3 Error Messages</h4>
- <p>The basic strategy for representing the results of exceptional
- conditions arising from the evaluation of operands on a given level of
- the hierarchy will be to use an error message corresponding to the image
- of a list of character strings on the level above.
- </p>
- <p>Unfortunately, the official <code>silly</code> standard does not
- define character constants, but they are available as a vendor specific
- extension in <code>silly-me</code> (millennium edition), where character strings
- <a name="index-silly_002dme"></a>
- <a name="index-strings-2"></a>
- <a name="index-character-strings-3"></a>
- may be enclosed in single quotes. The value of the semantic
- <a name="index-semantic-function-1"></a>
- function [[…]] in the case of a character string is the list
- of representations of the characters, based on <a href="Character-Table.html#Character-Table">Character Table</a>
- and <a href="Representation-of-Numeric-and-Textual-Data.html#Representation-of-Numeric-and-Textual-Data">Representation of Numeric and Textual Data</a>.
- </p>
- <p>For the sake of consistency, each standard error message is a list of
- character strings, even though the list has only one string in it. If
- any exceptional condition is the result of a computation, it is written
- to standard error by <code>avram</code> as the list of character strings it
- represents.
- </p>
- <dl compact="compact">
- <dt> <em>P45</em></dt>
- <dd><p>([[<code>compare</code>]] <code>nil</code>)<code>_<var>n</var></code> = [[<code>('invalid comparison',nil)</code>]]<code>_(<var>n</var>+1)</code>
- </p></dd>
- <dt> <em>P46</em></dt>
- <dd><p>([[<code>left</code>]] <code>nil</code>)<code>_<var>n</var></code> = [[<code>('invalid deconstruction',nil)</code>]]<code>_(<var>n</var>+1)</code>
- </p></dd>
- <dt> <em>P47</em></dt>
- <dd><p>([[<code>right</code>]] <code>nil</code>)<code>_<var>n</var></code> = [[<code>('invalid deconstruction',nil)</code>]]<code>_(<var>n</var>+1)</code>
- </p></dd>
- <dt> <em>P48</em></dt>
- <dd><p>(([[<code>fan</code>]] <code><var>f</var></code>)
- <code>nil</code>)<code>_<var>n</var></code> = [[<code>('invalid deconstruction',nil)</code>]]<code>_(<var>n</var>+1)</code>
- </p></dd>
- <dt> <em>P49</em></dt>
- <dd><p>([[<code>member</code>]] <code>nil</code>)<code>_<var>n</var></code> = [[<code>('invalid membership',nil)</code>]]<code>_(<var>n</var>+1)</code>
- </p></dd>
- <dt> <em>P50</em></dt>
- <dd><p>([[<code>distribute</code>]] <code>nil</code>)<code>_<var>n</var></code> = [[<code>('invalid distribution',nil)</code>]]<code>_(<var>n</var>+1)</code>
- </p></dd>
- <dt> <em>P51</em></dt>
- <dd><p>([[<code>cat</code>]] <code>nil</code>)<code>_<var>n</var></code> = [[<code>('invalid concatenation',nil)</code>]]<code>_(<var>n</var>+1)</code>
- </p></dd>
- <dt> <em>P52</em></dt>
- <dd><p>([[<code>meta</code>]] <code>nil</code>)<code>_<var>n</var></code> = [[<code>('invalid recursion',nil)</code>]]<code>_(<var>n</var>+1)</code>
- </p></dd>
- </dl>
- <p>Note that by virtue of property <em>P44</em>, there is no need for an
- application to make explicit checks for exceptional results at any
- point, because the exceptional result propagates through to the output
- of any function composed with the one that incurred it. For example, an
- application of the form <code>h = compose(f,right)</code>, which will cause an
- invalid deconstruction error if applied in filter mode to an empty file,
- imposes no requirement that <code>f</code> be written to accommodate that
- possibility (i.e., by checking for it) in order for the error to be
- reported properly. The following proof demonstrates that the meaning of <code>f</code>
- is irrelevant to the result.
- </p><table><tr><td> </td><td><pre class="format">[[<code>compose(f,right)</code>]]<code>_0</code> <code>nil_0</code>
- = [[<code>f</code>]]<code>_0</code> [[<code>right</code>]]<code>_0</code> <code>nil</code><code>_0</code>
- = [[<code>f</code>]]<code>_0</code> [[<code>('invalid deconstruction',nil)</code>]]<code>_1</code>
- = [[<code>('invalid deconstruction',nil)</code>]]<code>_1</code>
- </pre></td></tr></table>
- <p>In an application <code>h = compose(f,g)</code>, the input
- validation therefore may be confined to the “front end”, <code>g</code>.
- </p>
- <p>It will be recalled from the discussions of <code>recur</code> (<a href="Recur.html#Recur">Recur</a>)
- <a name="index-recur-1"></a>
- <a name="index-transpose-1"></a>
- and <code>transpose</code> (<a href="Transpose.html#Transpose">Transpose</a>) that the semantics of
- virtual code involving these forms is defined in terms of the
- <code>field</code> format for deconstruction functions (<a href="Field.html#Field">Field</a>),
- <a name="index-field-2"></a>
- which depends implicitly on the semantics of <code>left</code> and
- <code>right</code>, being a generalization of them. An invalid deconstruction
- <a name="index-left-2"></a>
- <a name="index-right-3"></a>
- message could therefore result from applications incorporating any of
- the forms of <code>recur</code>, <code>transpose</code>, or <code>field</code>. Invalid
- deconstructions could also arise from the <code>replace</code> operation
- <a name="index-replace-1"></a>
- <a name="index-assignment-1"></a>
- (<a href="Replace.html#Replace">Replace</a>), which is used for assignment (<a href="Assignment.html#Assignment">Assignment</a>), because
- <code>replace</code> is defined by virtual code, except as noted next.
- </p>
- <hr size="1">
- <table cellpadding="1" cellspacing="1" border="0">
- <tr><td valign="middle" align="left">[<a href="Operator-Generalization.html#Operator-Generalization" title="Previous section in reading order"> < </a>]</td>
- <td valign="middle" align="left">[<a href="Expedient-Error-Messages.html#Expedient-Error-Messages" title="Next section in reading order"> > </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="Virtual-Machine-Specification.html#Virtual-Machine-Specification" title="Beginning of this chapter or previous chapter"> << </a>]</td>
- <td valign="middle" align="left">[<a href="Exception-Handling.html#Exception-Handling" title="Up section"> Up </a>]</td>
- <td valign="middle" align="left">[<a href="Library-Reference.html#Library-Reference" title="Next chapter"> >> </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
- <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
- <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
- <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
- </tr></table>
- <p>
- <font size="-1">
- This document was generated on <i>December 10, 2012</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.82</i></a>.
- </font>
- <br>
- </p>
- </body>
- </html>