This file is indexed.

/usr/share/mozart/doc/base/node13.html is in mozart-doc 1.4.0-8ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

1
2
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>10.1 General</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node12.html">- Up -</A></TD><TD><A href="loop.html#section.control.loops">Next &gt;&gt;</A></TD></TR></TABLE><DIV id="section.control.general"><H2><A name="section.control.general">10.1 General</A></H2><P> The module <A name="label674"></A><SPAN class="index"><CODE>Value</CODE></SPAN> contains the following general control procedures. </P><DL><DT><A name="label675"></A><SPAN class="index"><CODE>Wait</CODE></SPAN> <A name="label676"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Value<SPAN class="keyword">.</SPAN>wait&nbsp;</CODE><CODE>+<I>X</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>blocks until <CODE><I>X</I></CODE> is determined. This statement makes&nbsp;<CODE><I>X</I></CODE> needed, causing all by-need computations on&nbsp;<CODE><I>X</I></CODE> to be triggered. If&nbsp;<CODE><I>X</I></CODE> is or becomes bound to a failed value, then its encapsulated exception is raised. </P></DD><DT><A name="label677"></A><SPAN class="index"><CODE>WaitOr</CODE></SPAN> <A name="label678"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Value<SPAN class="keyword">.</SPAN>waitOr&nbsp;</CODE><CODE><I>X</I></CODE><CODE>&nbsp;</CODE><CODE><I>Y</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>blocks until at least one of <CODE><I>X</I></CODE> or&nbsp;<CODE><I>Y</I></CODE> is determined. </P></DD><DT><A name="label679"></A><SPAN class="index"><CODE>waitQuiet</CODE></SPAN> <A name="label680"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Value<SPAN class="keyword">.</SPAN>waitQuiet&nbsp;</CODE><CODE>+<I>X</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>blocks until <CODE><I>X</I></CODE> is determined or failed. Contrary to <CODE>Wait</CODE>, <CODE>Value<SPAN class="keyword">.</SPAN>waitQuiet</CODE> does not make&nbsp;<CODE><I>X</I></CODE> needed. Also, if&nbsp;<CODE><I>X</I></CODE> is or becomes bound to a failed value, no exception is raised. </P></DD><DT><A name="label681"></A><SPAN class="index"><CODE><SPAN class="keyword">!!</SPAN></CODE></SPAN> <A name="label682"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Value<SPAN class="keyword">.</SPAN><SPAN class="string">'!!'</SPAN>&nbsp;</CODE><CODE><I>X</I></CODE><CODE>&nbsp;</CODE><CODE><I>Y</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>returns a <EM>future</EM>&nbsp;<CODE><I>Y</I></CODE> for&nbsp;<CODE><I>X</I></CODE>, i.&nbsp;e., a read-only placeholder for&nbsp;<CODE><I>X</I></CODE>. If&nbsp;<CODE><I>Y</I></CODE> becomes needed, <CODE><I>X</I></CODE> is made needed too. </P></DD><DT><A name="label683"></A><SPAN class="index"><CODE>WaitNeeded</CODE></SPAN> <A name="label684"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Value<SPAN class="keyword">.</SPAN>waitNeeded&nbsp;</CODE><CODE><I>X</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>blocks until <CODE><I>X</I></CODE> is <A name="label685"></A><SPAN class="index">needed</SPAN>. This operation is the <A name="label686"></A><SPAN class="index">by-need synchronization</SPAN>. </P></DD><DT><A name="label687"></A><SPAN class="index"><CODE>IsNeeded</CODE></SPAN> <A name="label688"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Value<SPAN class="keyword">.</SPAN>isNeeded&nbsp;</CODE><CODE><I>X</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>tests whether <CODE><I>X</I></CODE> is needed. </P></DD><DT><CODE>makeNeeded</CODE> <A name="label690"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Value<SPAN class="keyword">.</SPAN>makeNeeded&nbsp;</CODE><CODE><I>X</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>makes <CODE><I>X</I></CODE> needed. This statement is useful for triggering by-need computations on&nbsp;<CODE><I>X</I></CODE> with having to suspend on&nbsp;<CODE><I>X</I></CODE>. </P></DD><DT><A name="label691"></A><SPAN class="index"><CODE>ByNeed</CODE></SPAN> <A name="label692"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Value<SPAN class="keyword">.</SPAN>byNeed&nbsp;</CODE><CODE><I>P</I></CODE><CODE>&nbsp;</CODE><CODE><I>X</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>concurrently evaluates <CODE>{P&nbsp;X}</CODE> as soon as&nbsp;<CODE><I>X</I></CODE> becomes needed. It can be defined as follows: </P><BLOCKQUOTE class="code"><CODE><SPAN class="keyword">proc</SPAN><SPAN class="variablename">&nbsp;</SPAN>{<SPAN class="functionname">ByNeed</SPAN>&nbsp;P&nbsp;X}<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">thread</SPAN>&nbsp;{WaitNeeded&nbsp;X}&nbsp;{P&nbsp;X}&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR><SPAN class="keyword">end</SPAN></CODE></BLOCKQUOTE><P> </P></DD><DT><A name="label693"></A><SPAN class="index"><CODE>ByNeedFuture</CODE></SPAN> <A name="label694"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Value<SPAN class="keyword">.</SPAN>byNeedFuture&nbsp;</CODE><CODE><I>P</I></CODE><CODE>&nbsp;</CODE><CODE><I>X</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>creates a by-need computation that evaluates the expression <CODE>{P}</CODE>, and returns a future&nbsp;<CODE><I>X</I></CODE> of its result. If the call to&nbsp;<CODE><I>P</I></CODE> raises an exception&nbsp;<CODE><I>E</I></CODE>, then&nbsp;<CODE><I>X</I></CODE> is bound to a failed value (see below) that encapsulates&nbsp;<CODE><I>E</I></CODE>. It can be defined as follows: </P><BLOCKQUOTE class="code"><CODE><SPAN class="keyword">fun</SPAN><SPAN class="variablename">&nbsp;</SPAN>{<SPAN class="functionname">ByNeedFuture</SPAN>&nbsp;P}<BR>&nbsp;&nbsp;&nbsp;<SPAN class="keyword">!!</SPAN>{ByNeed&nbsp;<SPAN class="keyword">fun</SPAN><SPAN class="variablename">&nbsp;</SPAN>{<SPAN class="functionname">$</SPAN>}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">try</SPAN>&nbsp;{P}&nbsp;<SPAN class="keyword">catch</SPAN>&nbsp;E&nbsp;<SPAN class="keyword">then</SPAN>&nbsp;{Value<SPAN class="keyword">.</SPAN>failed&nbsp;E}&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>}<BR><SPAN class="keyword">end</SPAN></CODE></BLOCKQUOTE><P> </P></DD><DT><CODE>failed</CODE> <A name="label696"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{Value<SPAN class="keyword">.</SPAN>failed&nbsp;</CODE><CODE><I>E</I></CODE><CODE>&nbsp;</CODE><CODE><I>X</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>creates a <A name="label697"></A><SPAN class="index">failed value</SPAN>&nbsp;<CODE><I>X</I></CODE> encapsulating exception&nbsp;<CODE><I>E</I></CODE>. Whenever a statement needs&nbsp;<CODE><I>X</I></CODE>, in particular, whenever a thread synchronizes on&nbsp;<CODE><I>X</I></CODE>, exception term&nbsp;<CODE><I>E</I></CODE> is raised. This is convenient in concurrent designs: if a concurrent generator encounters a problem while computing a value, it may catch the corresponding exception, package it as a failed value and return the latter instead. Thus each consumer will be able to synchronously handle the exception when it attempts to use the ``failed'' value. For example, the module manager returns failed futures for modules that cannot be found or linked. </P><P> The failed value&nbsp;<CODE><I>X</I></CODE> can only unify to itself. An attempt to unify&nbsp;<CODE><I>X</I></CODE> to any other value results in exception&nbsp;<CODE><I>E</I></CODE> to be raised. Unifying two distinct failed values causes one of them to raise its exception, the choice of which being nondeterministic. </P></DD></DL><P> </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node12.html">- Up -</A></TD><TD><A href="loop.html#section.control.loops">Next &gt;&gt;</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~duchier/">Denys&nbsp;Duchier</A>, <A href="http://www.ps.uni-sb.de/~kornstae/">Leif&nbsp;Kornstaedt</A> and&nbsp;<A href="http://www.ps.uni-sb.de/~schulte/">Christian&nbsp;Schulte</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>