This file is indexed.

/usr/share/mozart/doc/browser/node2.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>2 Using the Browser</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="node1.html#chapter.browser">&lt;&lt; Prev</A></TD><TD><A href="index.html">- Up -</A></TD><TD><A href="node4.html#sec.browser.browsercommandsandoptions">Next &gt;&gt;</A></TD></TR></TABLE><DIV id="sec.usingthebrowser"><H1><A name="sec.usingthebrowser">2 Using the Browser</A></H1><P>In this section the functionality of the Browser is presented. Simultaneously, notions required for reading of the following sections are explained. </P><H2><A name="label2">2.1 Invoking the Browser</A></H2><P><A name="label3"></A> <A name="label4"></A> The Browser can be invoked by the predefined unary procedure <CODE>Browse</CODE>. For example, </P><BLOCKQUOTE class="code"><CODE>{Browse&nbsp;X}</CODE></BLOCKQUOTE><P> creates a browser window and shows the current constraint on the variable <CODE>X</CODE>. </P><P><A name="label6"></A> A browser window can be closed via the <SPAN class="menu">Close</SPAN> entry of the <SPAN class="menu">Browser</SPAN> menu, or by the <KBD>C-x</KBD> keyboard accelerator. </P><P>Normally the <CODE>Browse</CODE> procedure is used in the top-level computation space. Browsing from local computation spaces is not concurrent <A href="node3.html#label39"><SUP>1</SUP></A>, and there is a number of restrictions of the Browser functionality, which are considered in the <A href="node2.html#sec.browsingindeepguards">Section&nbsp;2.9</A>.</P><H2><A name="label7">2.2 The User Interface</A></H2><P><A name="label9"></A> A Browser window (<A href="node1.html#fig.browser.prime">Figure&nbsp;1.1</A>) consists of a text widget in which browsed information is shown, a menubar and scrollbars. The red button on the right side of the menubar, called the <EM>break</EM> button, is used to stop browsing as soon as possible. </P><P>Menu entries can be active or passive, depending on the Browser state. On the right side of menu entries their keyboard accelerators are specified, if any. Using an accelerator of a (currently) passive entry has no effect. </P><P>The view of the text widget can be adjusted by the scrollbars. The number of lines in the text widget depends on information that is browsed, and is limited only by the Tk implementation. Lines in text widget are never wrapped, and its width is determined automatically by the Tk library. </P><P><A name="label10"></A> The Browser automatically changes the layout of information shown in its text widget whenever the window size is changed by the user, or user changes the currently used font. </P><P><A name="label11"></A> The usual 'cut-and-paste' mechanism can be used with the Browser if you want to paste a part of a term's representation somewhere else. A text fragment is selected like in Emacs or the X11 terminal emulator (xterm), except that the <KBD>Shift</KBD> key must be kept pressed during the selection, and that there are no word- or line- selection modes. On Windows, a selected text is copied by means of <KBD>C-q</KBD></P><H2><A name="label12">2.3 Browser Module</A></H2><P>The <CODE>Browser</CODE> module exports the following values: </P><DL><DT><CODE>Browser<SPAN class="keyword">.</SPAN><SPAN class="string">'class'</SPAN></CODE> <A name="label14"></A></DT><DD><P>is an Oz class that implements the Browser.</P></DD><DT><CODE>Browser<SPAN class="keyword">.</SPAN>object</CODE> <A name="label16"></A></DT><DD><P>is an instance of <CODE>Browser<SPAN class="keyword">.</SPAN><SPAN class="string">'class'</SPAN></CODE><A href="node3.html#label40"><SUP>2</SUP></A>: </P><BLOCKQUOTE class="code"><CODE>BrowserObject&nbsp;=&nbsp;{New&nbsp;Browser<SPAN class="keyword">.</SPAN><SPAN class="string">'class'</SPAN>&nbsp;init}</CODE></BLOCKQUOTE><P></P></DD><DT><CODE>Browser<SPAN class="keyword">.</SPAN>browse</CODE> <A name="label17"></A> <A name="label18"></A></DT><DD><P>is an unary procedure used to tell <CODE>Browser<SPAN class="keyword">.</SPAN>object</CODE> to browse its argument. It is also available as procedure <CODE>Browse</CODE> in the OPI: </P><BLOCKQUOTE class="code"><CODE>Browse&nbsp;=&nbsp;<SPAN class="keyword">proc</SPAN><SPAN class="variablename">&nbsp;</SPAN>{<SPAN class="functionname">$</SPAN>&nbsp;X}&nbsp;{Browser<SPAN class="keyword">.</SPAN>object&nbsp;browse(X)}&nbsp;<SPAN class="keyword">end</SPAN></CODE></BLOCKQUOTE><P></P></DD></DL><P></P><P>Methods of the <CODE>Browser<SPAN class="keyword">.</SPAN><SPAN class="string">'class'</SPAN></CODE> are summarized in the <A href="node5.html#sec.browser.applicationbrowsers">Chapter&nbsp;4</A>.</P><HR><UL class="toc"><LI><A href="node3.html#sec.browser.browsedinformation">2.4 What Is Browsed: A Look Under The Hood</A></LI></UL><HR><DIV id="sec.browser.theoutputformat"><H2><A name="sec.browser.theoutputformat">2.5 The Basic Output Format</A></H2><P> This section describes the simplest Oz value's representation the Browser supports. In this case the Browser thinks of a value as of a tree that leaf nodes are primitive values and non-leaf nodes are records. Note that equal subtrees are represented as many times as they occur; this is a simplification with respect to the value graph described in <A href="node3.html#sec.browser.browsedinformation">Section&nbsp;2.4</A>. More concise representations are discussed in <A href="node2.html#sec.browser.detectingofcoreferencesandcycles">Section&nbsp;2.7</A>. </P><P>The description is divided into the following issues: </P><UL><LI><P>Browsing of arbitrarily deep and wide terms.</P></LI><LI><P>Using parenthesis to override the term constructor precedences.</P></LI><LI><P>Printing layout for compound terms.</P></LI></UL><P> </P><P><A name="label46"></A> <A name="label47"></A> <A name="label48"></A> <A name="label49"></A> Each (sub)term is shown in a certain <A name="label50"></A><EM>viewing form</EM>, namely, it can be drawn <A name="label51"></A><EM>completely</EM>, <A name="label52"></A><EM>partially</EM> or it can be <A name="label53"></A><EM>shrunken</EM>: </P><DL><DT>Completely</DT><DD><P>means that the term is shown if it represents a primitive value, finite domain or a variable; or all its subterm(s) are shown in some form if the term is compound. </P></DD><DT>Partially</DT><DD><P>means that only the <IMG alt="N" src="latex31.png"> first subterms of the compound term are shown, the rest of them is replaced with '<CODE><SPAN class="keyword">,,,</SPAN></CODE>'; </P></DD><DT>Shrunken</DT><DD><P>means that the term is shown in the form '<CODE><SPAN class="keyword">,,,</SPAN></CODE>'.</P></DD></DL><P> <A name="label55"></A> <A name="label57"></A> <A name="label59"></A> The form of each (sub)term is determined by values of the <A name="label60"></A><EM>width</EM> and <A name="label61"></A><EM>depth browse limits</EM>: </P><DL><DT>Width</DT><DD><P>specifies for each compound (sub)term the number of its subterms that are shown, i.&nbsp;e. the number <IMG alt="N" src="latex31.png"> from above.</P></DD><DT>Depth</DT><DD><P>specifies the depth in a term's representation where subterms are shrunken.</P></DD></DL><P> These parameters can be set via the <CODE>Display&nbsp;Parameters</CODE> submenu of the <CODE>Options</CODE> menu. Note that increasing of values <CODE>Depth</CODE> and <CODE>Width</CODE> affects all currently shown terms.</P><P>Terms shown by the Browser are built with respect to the Oz term constructor precedences as defined in Oz Notation , and uses round parentheses to override them.</P><P><A name="label62"></A> <A name="label64"></A> The Browser tries to produce the most compact printing layout for compound terms. Namely, it packs in one row as many subterms as possible, while usual minimal subterm indentation is provided. The only exception of this rule is that record subterms are shown in one column if they don't fit in one row. However, this can be switched off via turning off the option <CODE>Record&nbsp;Fields&nbsp;Aligned</CODE> of the <CODE>Layout</CODE> submenu of the <CODE>Options</CODE> menu.</P><P><A name="label65"></A> <A name="label66"></A> <A name="label67"></A> <A name="label69"></A> <A name="label71"></A> A non-shrunken (sub)term can be <A name="label72"></A><EM>shrunken</EM> explicitly by means of the <CODE>Shrink</CODE> commands of the <CODE>Selection</CODE> menu. The command is applied to a selection, which is described in <A href="node2.html#sec.browser.actions">Section&nbsp;2.8</A>. A partially shown or shrunken (sub)term can be <A name="label73"></A><EM>expanded</EM>: </P><UL><LI><P>If a (sub)term was shrunken, it is replaced by a subterm which is <A name="label75"></A> <A name="label76"></A> <CODE>Depth</CODE> deep, where <CODE>Depth</CODE> is the Browser's current <A name="label77"></A><EM>expansion limit</EM>. The expansion limits can be set by means of the <CODE>Display&nbsp;Parameters</CODE> submenu of the <CODE>Options</CODE> menu. <A name="label79"></A> <A name="label80"></A></P></LI><LI><P>If a (sub)term was partially shown, its further <CODE>Width</CODE> subterms are viewed, where <CODE>Width</CODE> is the Browser's expansion limit.</P></LI></UL><P></P></DIV><H2><A name="label81">2.6 Controlling Browsing</A></H2><P><A name="label83"></A> Browser draws terms sequentially, in the depth-first, left-to-right fashion, one term after each other. Drawing process can be stopped nearly all the time by pressing the <EM>break</EM> button (or by using the <CODE>Break</CODE> entry of the <CODE>Browser</CODE> menu). When browsing is being stopped, (sub)term(s) yet to be drawn appear in shrunken form, and started but not yet completed (sub)term(s) appear partially.</P><P><A name="label85"></A> <A name="label87"></A> <A name="label89"></A> More than term can be shown simultaneously in a Browser window. The Browser contains a first-in-first-out buffer where information about browsed terms is kept. The buffer size limits the number of simultaneously shown terms; it can be set via the <CODE>Buffer</CODE> submenu of the <CODE>Options</CODE> menu. All terms in the buffer can be removed via the <CODE>Clear</CODE> entry of the <CODE>Browser</CODE> menu. All terms except the last one can be removed via the <CODE>Clear&nbsp;All&nbsp;But&nbsp;Last</CODE> entry.</P><DIV id="sec.browser.detectingofcoreferencesandcycles"><H2><A name="sec.browser.detectingofcoreferencesandcycles">2.7 Represntation of Rational Trees</A></H2><P>The Browser can represent a cyclic tree, i.e. a tree-like graph that contains ``backward'' edges (edges starting in a node below its target). A cyclic tree representation is built as follows: </P><UL><LI><P>A subterm representing a target node obtains a unique prefix of the form <CODE>C</CODE><IMG alt="N" src="latex31.png"><CODE>=</CODE>, where <IMG alt="N" src="latex31.png"> is a number.</P></LI><LI><P>For all backward to that node edges pseudo-nodes are created, which are represented as <CODE>C</CODE><IMG alt="N" src="latex31.png">.</P></LI></UL><P> For example, the value of <IMG alt="X" src="latex11.png"> determined by the expression </P><BLOCKQUOTE class="code"><CODE>&nbsp;&nbsp;<SPAN class="keyword">declare</SPAN>&nbsp;&nbsp;<BR>&nbsp;&nbsp;N&nbsp;=&nbsp;{NewName}<BR>&nbsp;&nbsp;X&nbsp;=&nbsp;a(f1:X&nbsp;f2:N&nbsp;f3:N)<BR>&nbsp;&nbsp;<SPAN class="keyword">in</SPAN>&nbsp;{Browse&nbsp;X}</CODE></BLOCKQUOTE><P> is browsed as <CODE>&nbsp;C1=a(f1:C1&nbsp;f2:<SPAN class="keyword">&lt;</SPAN>N:&nbsp;<SPAN class="string">`N`</SPAN><SPAN class="keyword">&gt;</SPAN>&nbsp;f3:<SPAN class="keyword">&lt;</SPAN>N:&nbsp;<SPAN class="string">`N`</SPAN><SPAN class="keyword">&gt;</SPAN>)&nbsp;</CODE>. </P><P>A textual representation of a value graph described in <A href="node3.html#sec.browser.browsedinformation">Section&nbsp;2.4</A> is generated using the ``minimal graph'' representation option. Informally speaking, in this mode equal subgraphs are represented only once; all subsequent subgraphs that are equal to an already created one <A href="node2.html#label150"><SUP>1</SUP></A> are represented as a reference to it. For instance, the Browser output for the example above would be <CODE>R1=a(f1:R1&nbsp;f2:R2<SPAN class="keyword">=&lt;</SPAN>N:&nbsp;<SPAN class="string">`N`</SPAN><SPAN class="keyword">&gt;</SPAN>&nbsp;f3:R2)&nbsp;</CODE>.</P><P><A name="label91"></A> <A name="label93"></A> <A name="label95"></A> The representation options are set by means of the <CODE>Representation</CODE> submenu of the <CODE>Options</CODE> menu, by choosing one of the <CODE>Tree</CODE>, <CODE>Graph</CODE> and <CODE>Minimal&nbsp;Graph</CODE>.</P><P>Note that additional parenthesis are inserted around textual representation of (sub)terms with the prefixes <CODE>R</CODE><IMG alt="N" src="latex31.png"><CODE>=</CODE> or <CODE>C</CODE><IMG alt="N" src="latex31.png"><CODE>=</CODE>, if necessary. For instance, the Browser output of the example: </P><BLOCKQUOTE class="code"><CODE>&nbsp;&nbsp;<SPAN class="keyword">declare</SPAN>&nbsp;<BR>&nbsp;&nbsp;X&nbsp;=&nbsp;a(1<SPAN class="keyword">|</SPAN>2<SPAN class="keyword">|</SPAN>3<SPAN class="keyword">|</SPAN>b(c)&nbsp;b(c))<BR>&nbsp;&nbsp;<SPAN class="keyword">in</SPAN>&nbsp;{Browse&nbsp;X}</CODE></BLOCKQUOTE><P> is <CODE>a(1<SPAN class="keyword">|</SPAN>2<SPAN class="keyword">|</SPAN>3<SPAN class="keyword">|</SPAN>(R1=b(c))&nbsp;R1)</CODE>.</P><P><A name="label97"></A> <A name="label98"></A> The only operation defined on reference names is <A name="label99"></A><EM>dereferencing</EM>. Its effect is scrolling to a term tagged with the reference name, and selecting it. The <CODE>Deref</CODE> command can be invoked from the <CODE>Selection</CODE> menu or by the keyboard accelerator, similarly to <CODE>Expand</CODE> and <CODE>Shrink</CODE> commands. </P></DIV><DIV id="sec.browser.actions"><H2><A name="sec.browser.actions">2.8 Actions</A></H2><P><A name="label100"></A> <A name="label102"></A> An arbitrary shown (sub)term can be <A name="label103"></A><EM>selected</EM>. This is achieved by clicking the left mouse button. Deselection proceeds by clicking the right one. Selected (sub)terms are shown in the text widget on a wheat colored background. Selected (sub)terms are targets for both pre-defined browser operations (like <CODE>Shrink</CODE> and <CODE>Expand</CODE> described in Section<A href="node2.html#sec.browser.theoutputformat">Section&nbsp;2.5</A>) and user-defined <A name="label104"></A><EM>actions</EM>.</P><P><A name="label105"></A> <A name="label107"></A> The <EM>Actions</EM> mechanism provide for application of unary procedures with the current selection as an argument. There are two predefined actions: <CODE>Show</CODE> and <CODE>Browse</CODE>. There can be <A name="label108"></A><EM>user-defined actions</EM>, which are added by means of the <CODE>add</CODE>, <CODE>set</CODE> and <CODE>delete</CODE> methods of <CODE>BrowserClass</CODE>: <A name="label110"></A> <A name="label112"></A> <A name="label114"></A> </P><BLOCKQUOTE class="code"><CODE>&nbsp;&nbsp;%%<SPAN class="comment">&nbsp;<BR></SPAN>&nbsp;&nbsp;<SPAN class="keyword">declare</SPAN>&nbsp;&nbsp;<BR>&nbsp;&nbsp;P&nbsp;=&nbsp;<SPAN class="keyword">proc</SPAN><SPAN class="variablename">&nbsp;</SPAN>{<SPAN class="functionname">$</SPAN>&nbsp;S}&nbsp;{Browse&nbsp;{Value<SPAN class="keyword">.</SPAN>status&nbsp;S}}&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="keyword">in</SPAN>&nbsp;<BR>&nbsp;&nbsp;{Browser&nbsp;add(P&nbsp;label:<SPAN class="string">'Show&nbsp;Status'</SPAN>)}<BR>&nbsp;&nbsp;{Browser&nbsp;set(P)}<BR>&nbsp;&nbsp;%%&nbsp;<SPAN class="comment">use&nbsp;the&nbsp;action&nbsp;now!<BR></SPAN>&nbsp;&nbsp;{Browser&nbsp;delete(P)}&nbsp;&nbsp;%&nbsp;<SPAN class="comment">delete(all)<BR></SPAN>&nbsp;&nbsp;{Browser&nbsp;set(Show)}</CODE></BLOCKQUOTE><P> <A name="label116"></A></P><P>In this example a new action <CODE>P</CODE> is created (which effect is printing the status of a selection), then it is added (<CODE>add</CODE>) and set (<CODE>set</CODE>) as the current one. At this point user can either click the middle mouse button or use the <CODE>Apply&nbsp;Action</CODE> entry of the <CODE>Selection</CODE> menu in order to invoke it. After that the action is removed, and the predefined <CODE>Show</CODE> is set as the current.</P><P>A useful application of this mechanism is the action which equates two subsequent selections: </P><BLOCKQUOTE class="code"><CODE>&nbsp;&nbsp;<SPAN class="keyword">declare</SPAN>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="keyword">class</SPAN>&nbsp;<SPAN class="type">UnifyTwoClass</SPAN>&nbsp;<SPAN class="keyword">from</SPAN><SPAN class="type">&nbsp;Object.base</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">prop</SPAN>&nbsp;final&nbsp;locking<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">attr</SPAN>&nbsp;first:&nbsp;_&nbsp;state:&nbsp;start<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">meth</SPAN>&nbsp;<SPAN class="functionname">click</SPAN>(S)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">case</SPAN>&nbsp;<SPAN class="keyword">@</SPAN>state&nbsp;<SPAN class="keyword">==</SPAN>&nbsp;start&nbsp;<SPAN class="keyword">then</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{Show&nbsp;<SPAN class="string">'First...'</SPAN>}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;first&nbsp;<SPAN class="keyword">:=</SPAN>&nbsp;S<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state&nbsp;<SPAN class="keyword">:=</SPAN>&nbsp;continue<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">else</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{Show&nbsp;<SPAN class="string">'Unify!'</SPAN>}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S&nbsp;=&nbsp;<SPAN class="keyword">@</SPAN>first<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state&nbsp;<SPAN class="keyword">:=</SPAN>&nbsp;start<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;<BR>&nbsp;&nbsp;UnifyTwo&nbsp;=&nbsp;{New&nbsp;UnifyTwoClass&nbsp;noop}<BR>&nbsp;&nbsp;<SPAN class="keyword">proc</SPAN><SPAN class="variablename">&nbsp;</SPAN>{<SPAN class="functionname">UnifyAction</SPAN>&nbsp;S}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{UnifyTwo&nbsp;click(S)}<BR>&nbsp;&nbsp;<SPAN class="keyword">end</SPAN>&nbsp;&nbsp;<BR>&nbsp;&nbsp;<SPAN class="keyword">in</SPAN>&nbsp;<SPAN class="keyword">skip</SPAN></CODE></BLOCKQUOTE><P></P><P>Now we can set this action and browse, for instance, a list constructor with two variables: <A name="label118"></A> <A name="label120"></A> <A name="label122"></A> <A name="label124"></A> </P><BLOCKQUOTE class="code"><CODE>&nbsp;&nbsp;{Browser&nbsp;createWindow}<BR>&nbsp;&nbsp;{Browser&nbsp;add(UnifyAction)}<BR>&nbsp;&nbsp;{Browser&nbsp;set(UnifyAction)}<BR>&nbsp;&nbsp;{Browser&nbsp;option(representation&nbsp;mode:graph)}<BR>&nbsp;&nbsp;%%<SPAN class="comment">&nbsp;<BR></SPAN>&nbsp;&nbsp;{Browse&nbsp;_<SPAN class="keyword">|</SPAN>_}</CODE></BLOCKQUOTE><P></P><P>If we will click the middle mouse button subsequently on the list constructor and the second variable, we will get a cyclic list: <CODE>C1=_<SPAN class="keyword">|</SPAN>C1</CODE>.</P></DIV><DIV id="sec.browsingindeepguards"><H2><A name="sec.browsingindeepguards">2.9 Browsing in Local Computation Spaces</A></H2><P>There are the following distinguishing features of using the Browser in a computation space: </P><UL><LI><P>Browsing in a computation space <EM>is not</EM> concurrent. <A name="label125"></A></P></LI><LI><P>Print names of variables, (Oz) names, procedures, cells, chunks, spaces and threads are quoted. For instance, a variable <CODE>A</CODE> will be browsed as <CODE><SPAN class="string">`A`</SPAN></CODE>, and not as <CODE>A</CODE>. <A name="label127"></A> <A name="label129"></A> <A name="label130"></A></P></LI><LI><P>Print names of mentioned above objects are always generated in the extended format, without any respect to the current value of the options <CODE>Variable&nbsp;Status</CODE> and <CODE>Names&nbsp;And&nbsp;Procedures</CODE>. </P></LI><LI><P>Feature constraints are converted to records, that is, their representation does not contain ellipses just before the closing parentheses. </P></LI><LI><P>Generally, builiding <CODE>graph</CODE> and <CODE>minimal&nbsp;graph</CODE> representation yields <EM>wrong</EM> results. For instance, two equal variables are not detected as being equal; whereas two tuples <CODE>a(_)</CODE> and <CODE>a(_)</CODE> are detected as being equal. </P><DIV class="danger"><P class="margin"><IMG align="top" alt="Danger" src="danger.gif"></P><P></P></DIV></LI><LI><P>The Browser needs much more memory and runtime to perform browsing, in particular when large lists are browsed. </P><DIV class="danger"><P class="margin"><IMG align="top" alt="Danger" src="danger.gif"></P><P></P></DIV></LI><LI><P>Continuous browsing of big different terms leads to significant memory leakage in the Oz Emulator, which is limited by the total size of a textual representation of all browsed terms. </P></LI></UL><P> </P><DIV class="danger"><P class="margin"><IMG align="top" alt="Danger" src="danger.gif"></P><P>The differences mentioned above are straightforward once there is the understanding how the Browser works in that case.</P></DIV><P>The point here is that the Browser operates in the top-level computation space, whereas a constraint describing a value of a given variable can contain variables, names, procedures and so on that belong to the local computation space. These variables cannot occur in constraints in the top-level one; therefore, each constraint browsed in a local computation space is converted to a constraint which <EM>does not contain</EM> any variables, names and so on this transformation, called here <EM>reflection</EM>, takes place in the local computation space, where <CODE>Browse</CODE> call was issued. After that the reflected constraint is passed to the top-level computation space by a special builtin, and actually browsed.</P><P>The reflection step can take place only once for a browsed constraint; that is, browsing is not concurrent in this case.</P><P>Objects of mentioned above types are replaced by atoms during reflection. The number of new atoms created this way is limited by the size of a constraint graph to be browsed. Since atoms are not a subject for garbage collection in the Oz System, the memory consumed by the System grows up.</P><P>Since the reflection process must terminate, the Browser builds a minimal graph representation of a constraint, which is passed to the top-level computation space. This explains the computational complexity of browsing in local computation spaces.</P></DIV><H2><A name="label131">2.10 Setting Options</A></H2><P><A name="label133"></A> Every Browser option that can be set by means of the <CODE>Options</CODE> menu can be set also by means of the <CODE>option</CODE> method of the <CODE>BrowserClass</CODE>. Its format is </P><BLOCKQUOTE class="code"><CODE>&nbsp;&nbsp;option(</CODE><I>group</I><CODE>&nbsp;</CODE><I>option</I><CODE>:&nbsp;</CODE><I>value</I><CODE>)</CODE></BLOCKQUOTE><P></P><P><A name="label134"></A> <A name="label135"></A> <A name="label136"></A> <A name="label137"></A> <A name="label138"></A> <A name="label139"></A> <A name="label140"></A> <A name="label141"></A> <A name="label142"></A> <A name="label143"></A> <A name="label144"></A> <A name="label145"></A> <A name="label146"></A> <A name="label147"></A> <A name="label148"></A> <A name="label149"></A> There is the complete list of possible options with example values: </P><BLOCKQUOTE class="code"><CODE>&nbsp;&nbsp;option(buffer&nbsp;size:1)<BR>&nbsp;&nbsp;option(buffer&nbsp;separateBufferEntries:<SPAN class="keyword">false</SPAN>)<BR>&nbsp;&nbsp;option(representation&nbsp;mode:minGraph)<BR>&nbsp;&nbsp;option(representation&nbsp;detailedChunks:<SPAN class="keyword">true</SPAN>)<BR>&nbsp;&nbsp;option(representation&nbsp;detailedNamesAndProcedures:<SPAN class="keyword">false</SPAN>)<BR>&nbsp;&nbsp;option(representation&nbsp;detailedVarStatus:<SPAN class="keyword">false</SPAN>)<BR>&nbsp;&nbsp;option(representation&nbsp;strings:<SPAN class="keyword">true</SPAN>)<BR>&nbsp;&nbsp;option(representation&nbsp;virtualStrings:<SPAN class="keyword">false</SPAN>)<BR>&nbsp;&nbsp;option(display&nbsp;depth:100)<BR>&nbsp;&nbsp;option(display&nbsp;width:2000)<BR>&nbsp;&nbsp;option(display&nbsp;depthInc:2)<BR>&nbsp;&nbsp;option(display&nbsp;widthInc:5)<BR>&nbsp;&nbsp;option(layout&nbsp;size:14)<BR>&nbsp;&nbsp;option(layout&nbsp;bold:<SPAN class="keyword">false</SPAN>)<BR>&nbsp;&nbsp;option(layout&nbsp;alignRecordFields:<SPAN class="keyword">true</SPAN>)</CODE></BLOCKQUOTE><P></P><P>There is an additional group <CODE>special</CODE> which allows to control the geometry of the Browser window: </P><BLOCKQUOTE class="code"><CODE>&nbsp;&nbsp;option(special&nbsp;xSize:800)<BR>&nbsp;&nbsp;option(special&nbsp;ySize:600)<BR>&nbsp;&nbsp;option(special&nbsp;xMinSize:300)<BR>&nbsp;&nbsp;option(special&nbsp;yMinSize:200)</CODE></BLOCKQUOTE><P></P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node1.html#chapter.browser">&lt;&lt; Prev</A></TD><TD><A href="index.html">- Up -</A></TD><TD><A href="node4.html#sec.browser.browsercommandsandoptions">Next &gt;&gt;</A></TD></TR></TABLE><HR align="left" width="30%"><DIV class="footnote"><A name="label150">1. </A>Two graphs are equal here iff they are unifiable.</DIV><HR><ADDRESS><A href="http://www.sics.se/~kost/">Konstantin&nbsp;Popov</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>