/usr/share/mozart/doc/system/node10.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>4.1 Basic Search Engines</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="node9.html">- Up -</A></TD><TD><A href="node11.html#generalsearch">Next >></A></TD></TR></TABLE><DIV id="vanillasearch"><H2><A name="vanillasearch">4.1 Basic Search Engines</A></H2><A name="label47"></A><P>All these engines take a script as input and return a list of its solutions.</P><P> </P><DL><DT><CODE>base<SPAN class="keyword">.</SPAN>one</CODE></DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Search<SPAN class="keyword">.</SPAN>base<SPAN class="keyword">.</SPAN>one </CODE><CODE>+<I>ScriptP</I></CODE><CODE> </CODE><CODE>?<I>Xs</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P>returns a singleton list containing the first solution of the script <CODE>+<I>ScriptP</I></CODE> (a unary procedure) obtained by depth-first search. If no solution exists, <CODE>nil</CODE> is returned.</P><P>As an example, </P><BLOCKQUOTE class="code"><CODE>{Search<SPAN class="keyword">.</SPAN>base<SPAN class="keyword">.</SPAN>one <SPAN class="keyword">proc</SPAN><SPAN class="variablename"> </SPAN>{<SPAN class="functionname">$</SPAN> X}<BR> <SPAN class="keyword">choice</SPAN> <BR> <SPAN class="keyword">choice</SPAN> X=ape <SPAN class="keyword">[]</SPAN> X=bear <SPAN class="keyword">end</SPAN> <BR> <SPAN class="keyword">[]</SPAN> X=cat <BR> <SPAN class="keyword">end</SPAN> <BR> <SPAN class="keyword">end</SPAN>}</CODE></BLOCKQUOTE><P> returns the list <CODE>[ape]</CODE>. </P></DD><DT><CODE>base<SPAN class="keyword">.</SPAN>all</CODE></DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Search<SPAN class="keyword">.</SPAN>base<SPAN class="keyword">.</SPAN>all </CODE><CODE>+<I>ScriptP</I></CODE><CODE> </CODE><CODE>?<I>Xs</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P>returns the list of all solutions of the script <CODE>+<I>ScriptP</I></CODE> (a unary procedure) obtained by depth-first serach. As an example, </P><BLOCKQUOTE class="code"><CODE>{Search<SPAN class="keyword">.</SPAN>base<SPAN class="keyword">.</SPAN>all <SPAN class="keyword">proc</SPAN><SPAN class="variablename"> </SPAN>{<SPAN class="functionname">$</SPAN> X}<BR> <SPAN class="keyword">choice</SPAN> <BR> <SPAN class="keyword">choice</SPAN> X=ape <SPAN class="keyword">[]</SPAN> X=bear <SPAN class="keyword">end</SPAN> <BR> <SPAN class="keyword">[]</SPAN> X=cat <BR> <SPAN class="keyword">end</SPAN> <BR> <SPAN class="keyword">end</SPAN>}</CODE></BLOCKQUOTE><P> returns the list <CODE>[ape bear cat]</CODE>. </P></DD><DT><CODE>Search<SPAN class="keyword">.</SPAN>base<SPAN class="keyword">.</SPAN>best</CODE></DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Search<SPAN class="keyword">.</SPAN>base<SPAN class="keyword">.</SPAN>best </CODE><CODE>+<I>ScriptP</I></CODE><CODE> </CODE><CODE>+<I>OrderP</I></CODE><CODE> </CODE><CODE>?<I>Xs</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P>returns a singleton list containing the best solution with respect to the order <CODE>+<I>OrderP</I></CODE> (a binary procedure) of the script <CODE>+<I>ScriptP</I></CODE> (a unary procedure) obtained by branch and bound search. If no solution does exist, <CODE>nil</CODE> is returned.</P><P>The branch and bound strategy works as follows. When a solution is found, all the remaining alternatives are constrained to be <EM>better</EM> with respect to the order <CODE>+<I>OrderP</I></CODE>. The binary procedure <CODE>+<I>OrderP</I></CODE> is applied with its first argument being the previous solution, and its second argument the root variable of a space for one of the remaining alternatives. </P><P>For instance, the following script constrains its root variable to a pair of integers, such that a certain equation holds between its components. </P><BLOCKQUOTE class="code"><CODE><SPAN class="keyword">proc</SPAN><SPAN class="variablename"> </SPAN>{<SPAN class="functionname">Script</SPAN> Root}<BR> X={FD<SPAN class="keyword">.</SPAN>int 1<SPAN class="keyword">#</SPAN>10} Y={FD<SPAN class="keyword">.</SPAN>int 1<SPAN class="keyword">#</SPAN>10}<BR><SPAN class="keyword">in</SPAN> <BR> Y <SPAN class="keyword">=:</SPAN> 10 <SPAN class="keyword">-</SPAN> X <SPAN class="keyword">-</SPAN> 2<SPAN class="keyword">*</SPAN>Y<BR> Root = X<SPAN class="keyword">#</SPAN>Y<BR> {FD<SPAN class="keyword">.</SPAN>distribute split Root}<BR><SPAN class="keyword">end</SPAN></CODE></BLOCKQUOTE><P> </P><P>With the order </P><BLOCKQUOTE class="code"><CODE><SPAN class="keyword">proc</SPAN><SPAN class="variablename"> </SPAN>{<SPAN class="functionname">MaxSum</SPAN> Old New}<BR> Old<SPAN class="keyword">.</SPAN>1 <SPAN class="keyword">+</SPAN> Old<SPAN class="keyword">.</SPAN>2 <SPAN class="keyword"><:</SPAN> New<SPAN class="keyword">.</SPAN>1 <SPAN class="keyword">+</SPAN> New<SPAN class="keyword">.</SPAN>2<BR><SPAN class="keyword">end</SPAN></CODE></BLOCKQUOTE><P> we can search for a solution with maximal sum of <CODE>X</CODE> and <CODE>Y</CODE> by </P><BLOCKQUOTE class="code"><CODE>{SearchBest Script MaxSum}</CODE></BLOCKQUOTE><P> This returns the singleton list <CODE>[7<SPAN class="keyword">#</SPAN>1]</CODE>. </P><P>Similarly, we can search for the solution with the maximal product, by using the order: </P><BLOCKQUOTE class="code"><CODE><SPAN class="keyword">proc</SPAN><SPAN class="variablename"> </SPAN>{<SPAN class="functionname">MaxProduct</SPAN> Old New}<BR> Old<SPAN class="keyword">.</SPAN>1 <SPAN class="keyword">*</SPAN> Old<SPAN class="keyword">.</SPAN>2 <SPAN class="keyword"><:</SPAN> New<SPAN class="keyword">.</SPAN>1 <SPAN class="keyword">*</SPAN> New<SPAN class="keyword">.</SPAN>2<BR><SPAN class="keyword">end</SPAN></CODE></BLOCKQUOTE><P> in: </P><BLOCKQUOTE class="code"><CODE>{SearchBest Script MaxProduct}</CODE></BLOCKQUOTE><P> This returns the singleton list <CODE>[4<SPAN class="keyword">#</SPAN>2]</CODE>.</P></DD></DL><P></P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node9.html">- Up -</A></TD><TD><A href="node11.html#generalsearch">Next >></A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~duchier/">Denys Duchier</A>, <A href="http://www.ps.uni-sb.de/~kornstae/">Leif Kornstaedt</A>, <A href="http://www.ps.uni-sb.de/~homik/">Martin Homik</A>, <A href="http://www.ps.uni-sb.de/~tmueller/">Tobias Müller</A>, <A href="http://www.ps.uni-sb.de/~schulte/">Christian Schulte</A> and <A href="http://www.info.ucl.ac.be/~pvr">Peter Van Roy</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|