This file is indexed.

/usr/share/mozart/doc/browser/node3.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
3
4
5
6
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>2.4 What Is Browsed: A Look Under The Hood</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="node2.html">- Up -</A></TD></TR></TABLE><DIV id="sec.browser.browsedinformation"><H2><A name="sec.browser.browsedinformation">2.4 What Is Browsed: A Look Under The Hood</A></H2><P>Oz Browser displays the current information about values of variables. This information is stated by means of constraints stored in constraint stores. Constraint that describes a value of a variable can be represented as a directed graph which is shown in textual form.</P><P>Due to the properties of the Kernel Oz<A href="node3.html#label41"><SUP>3</SUP></A>, a constraint in the store can be only a conjunction of the following types of formulae: </P><UL><LI><P>Equations of the form <IMG alt="x\deq y" src="latex1.png">, where <IMG alt="x" src="latex2.png"> and <IMG alt="y" src="latex3.png"> are distinct variables. </P></LI><LI><P>Equations of the form <IMG alt="x\deq s" src="latex4.png">, where <IMG alt="s" src="latex5.png"> is either a primitive value or a record <IMG alt="l(l_1\col x_1,\;\ldots,\;l_n\col x_n)" src="latex6.png">, and <IMG alt="x,\;x_1,\ldots,x_n" src="latex7.png"> are variables. </P></LI><LI><P>Disjunctive constraints of the form <IMG alt="x\deq n_1\lor\ldots\lor x\deq n_k" src="latex8.png">, where <IMG alt="x" src="latex2.png"> is a variable and <IMG alt="n_1,\ldots,n_k" src="latex9.png"> are integers which are allowed to be an element of a finite domain. </P></LI><LI><P>Feature constraints of the form <IMG alt="x\deq l(l_1\col x_1,\;\ldots,\;l_n\col x_n\;\ldots)" src="latex10.png">, where <IMG alt="x,\;x_1,\ldots,x_n" src="latex7.png"> are variables. </P></LI></UL><P> For instance, the value of the variable <IMG alt="X" src="latex11.png"> from the example </P><BLOCKQUOTE class="code"><CODE>&nbsp;&nbsp;X&nbsp;=&nbsp;a(1&nbsp;b(r:2))&nbsp;</CODE></BLOCKQUOTE><P> is described as follows: <IMG alt="x\deq a(x_1,\; x_2)\;\land\;
x_1\deq 1\;\land\;
x_2\deq b(r\col x_3)\;\land\;
x_3\deq 2" src="latex12.png"> Since a store keeps its constraint only up to logical equivalence in the Oz Universe, one can say that for every variable <IMG alt="x" src="latex2.png"> there is at most one binding for <IMG alt="x" src="latex2.png">, i.&nbsp;e. a formula of the forms mentioned just above.</P><P>Additionally, during the elaboration of an expression the Oz System imposes a total order '<IMG alt="\prec" src="latex13.png">' on all variables, which occur in it<A href="node3.html#label42"><SUP>4</SUP></A>, so that a constraint can only contain either <IMG alt="x\deq y" src="latex1.png"> if <IMG alt="x\prec y" src="latex14.png">, or <IMG alt="y\deq x" src="latex15.png"> otherwise.</P><P>Informally, a graph representation of a constraint on a variable <IMG alt="x" src="latex2.png"> emerges when that constraint is traversed up to primitive values or yet unbound variables. Leaf nodes of a graph denote those primitive values and unbound variables, non-leaf nodes denote records, and edges of the graph model occurrences of variables in records.</P><P>A graph shown by the Browser is constructed as follows. Let us denote the set of variables to be browsed as <IMG alt="\V" src="latex16.png">, whereat initially <IMG alt="\V" src="latex16.png"> contains the variable <IMG alt="x" src="latex2.png"> passed to <CODE>Browse</CODE>: <IMG alt="\V = \{x\}" src="latex17.png">; the set of already browsed variables as <IMG alt="\P" src="latex18.png"><A href="node3.html#label43"><SUP>5</SUP></A>, initially <IMG alt="\P=\emptyset" src="latex19.png">, and the set of couples <IMG alt="\langle x,y\rangle" src="latex20.png"> as <IMG alt="\E" src="latex21.png">, initially <IMG alt="\E=\emptyset" src="latex22.png">. Each node carry an auxiliary label &nbsp; -  a variable it represents; couples from <IMG alt="\E" src="latex21.png"> denote edges between nodes labeled by its variables. Nodes of a graph are created iteratively; at each step a variable <IMG alt="y" src="latex3.png"> is extracted from <IMG alt="\V" src="latex16.png">, and one of the following rules is applied:</P><P></P><UL><LI><P>If the constraint store does not contain any binding for or a constraint on <IMG alt="y" src="latex3.png">, then a leaf node labeled by <IMG alt="y" src="latex3.png"> is created that represent the variable itself. The variable <IMG alt="y" src="latex3.png"> is added to <IMG alt="\P" src="latex18.png">. </P></LI><LI><P>If there is an equation of the form <IMG alt="y\deq z" src="latex23.png">, then <IMG alt="\{z\}\cap\P" src="latex24.png"> is adjoined to <IMG alt="\V" src="latex16.png">, and <IMG alt="y" src="latex3.png"> is replaced by <IMG alt="z" src="latex25.png"> in every couple of <IMG alt="\E" src="latex21.png"> and among nodes' labels. This step can be seen informally as ``dereferencing''; it serves for minimizing the graph representation of a constraint. </P></LI><LI><P>If there is an equation of the form <IMG alt="y\deq s" src="latex26.png">, where <IMG alt="s" src="latex5.png"> is a primitive value, then a leaf node labeled by <IMG alt="y" src="latex3.png"> is created that represent that value. The variable <IMG alt="y" src="latex3.png"> is added to <IMG alt="\P" src="latex18.png">. </P></LI><LI><P>If there is an equation of the form <IMG alt="y\deq s" src="latex26.png">, where <IMG alt="s" src="latex5.png"> is a record <IMG alt="l(l_1\col x_1,\;\ldots,\;l_n\col x_n)" src="latex6.png">, then a non-leaf node labeled by <IMG alt="y" src="latex3.png"> is created that represent that record. The variable <IMG alt="y" src="latex3.png"> is added to <IMG alt="\P" src="latex18.png">. The set <IMG alt="\{x_1,\ldots,x_n\}\cap\P" src="latex27.png"> is adjoined to <IMG alt="\V" src="latex16.png">, and <IMG alt="n" src="latex28.png"> new couples <IMG alt="\langle y,x_i\rangle" src="latex29.png"> are added to <IMG alt="\E" src="latex21.png">. </P></LI><LI><P>If there is a disjunctive constraint on <IMG alt="y" src="latex3.png">, then a leaf node labeled by <IMG alt="y" src="latex3.png"> is created that represent the corresponding finite domain. The variable <IMG alt="y" src="latex3.png"> is added to <IMG alt="\P" src="latex18.png">. </P></LI><LI><P>If there is an feature constraint of the form <IMG alt="y\deq
l(l_1\col x_1,\;\ldots,\;l_n\col x_n\;\ldots)" src="latex30.png">, then a non-leaf node labeled by <IMG alt="y" src="latex3.png"> is created that represent that partially known record. The variable <IMG alt="y" src="latex3.png"> is added to <IMG alt="\P" src="latex18.png">. The set <IMG alt="\{x_1,\ldots,x_n\}\cap\P" src="latex27.png"> is adjoined to <IMG alt="\V" src="latex16.png">, and <IMG alt="n" src="latex28.png"> new couples <IMG alt="\langle y,x_i\rangle" src="latex29.png"> are added to <IMG alt="\E" src="latex21.png">.</P></LI></UL><P> Construction of the graph is stopped whet the set <IMG alt="\V" src="latex16.png"> becomes empty. It is continued automatically when additional constraints are added to the store.</P><P><A name="label19"></A> In the scope of this documentation, the textual representation of a (sub)graph is called (sub)<A name="label20"></A><EM>term</EM><A href="node3.html#label44"><SUP>6</SUP></A>. A (sub)term can be <A name="label21"></A><EM>primitive</EM> or <A name="label22"></A><EM>compound</EM>, similarly to the Oz values.</P><P>Numbers and records are shown as one would expect. Procedures, cells, chunks, spaces and threads are shown by their <A name="label23"></A><EM>print names</EM>. Finite domains have a special representation: for instance, if an FD variable is constrained to the domain {1,2,3,7,8,9}, then it is shown as <CODE>_{&nbsp;1<SPAN class="keyword">..</SPAN>3&nbsp;7<SPAN class="keyword">..</SPAN>9&nbsp;}</CODE>. Partially known records are represented as records, but with additional ellipses just before the closing parentheses: <CODE>ofs(a:&nbsp;1&nbsp;b:&nbsp;2&nbsp;<SPAN class="keyword">...</SPAN>)</CODE>.</P><P>Additionally, the following Oz data types are treated specially: </P><DL><DT>Lists <A name="label25"></A></DT><DD><P>have two representations&nbsp; -  a sequence of cons cells (like <CODE>1<SPAN class="keyword">|</SPAN>2<SPAN class="keyword">|</SPAN>A</CODE>) and the representation of well-formed lists in square brackets (like <CODE>[1&nbsp;2&nbsp;3]</CODE>). The second representation is choosen whenever a list can be decided to be well-formed when only <IMG alt="N" src="latex31.png"> its elements are considered. <IMG alt="N" src="latex31.png"> is double of the current value of the <CODE>Width</CODE> browse limit, described in <A href="node2.html#sec.browser.theoutputformat">Section&nbsp;2.5</A>. <A name="label27"></A></P></DD><DT>Chunks</DT><DD><P>that constructed from non-primitive values (like classes and objects) are represented as compound terms if the <CODE>Chunks</CODE> representation detail option is set, and if this option is not set then the string <CODE>(?)</CODE> is added to the representation. <A name="label29"></A> <A name="label31"></A></P></DD><DT>Strings, Virtual Strings</DT><DD><P>are shown in readable form, i.&nbsp;e. by enclosed in quotes ASCII strings, if the corresponding <CODE>Strings</CODE> or <CODE>Virtual&nbsp;strings</CODE> option, repectively, is set.</P><P>Note that browsing of virtual strings is not monotonic. For instance, constraints on the variable <CODE>&nbsp;S</CODE> </P><BLOCKQUOTE class="code"><CODE>&nbsp;&nbsp;<SPAN class="keyword">declare</SPAN>&nbsp;S&nbsp;<SPAN class="keyword">in</SPAN>&nbsp;S&nbsp;=&nbsp;_<SPAN class="keyword">#</SPAN>[101&nbsp;108&nbsp;108&nbsp;111]</CODE></BLOCKQUOTE><P> is browsed in this case as <CODE>_<SPAN class="keyword">#</SPAN>ello</CODE> <A href="node3.html#label45"><SUP>7</SUP></A>. If the additional Oz line <A name="label33"></A> </P><BLOCKQUOTE class="code"><CODE>&nbsp;&nbsp;S&nbsp;=&nbsp;[72]<SPAN class="keyword">#</SPAN>_</CODE></BLOCKQUOTE><P> is feeded, the Browser changes the term's respresentation to <CODE>H<SPAN class="keyword">#</SPAN>ello</CODE> and <EM>not</EM> to <CODE>Hello</CODE>; you have to issue the <CODE>Rebrowse</CODE> command to obtain 'Hello'.</P></DD></DL><P> <A name="label35"></A> <A name="label37"></A> <A name="label38"></A> An extended format of print names of variables, procedures, cell, chunks, spaces and threads can be requested by setting the <CODE>Variable<BR>Status</CODE> and <CODE>Names&nbsp;And&nbsp;Procedures</CODE> options.</P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node2.html">- Up -</A></TD></TR></TABLE><HR align="left" width="30%"><DIV class="footnote"><A name="label39">1. </A>That is, incrementally imposed constraints are not reflected by the Browser. One could say that a browser makes a 'snapshot' of constraints.</DIV><DIV class="footnote"><A name="label40">2. </A>Actually, two <EM>distinct</EM> things are called 'Browser' here: first, this is the tool described in this chapter itself, and, second, this is a particular instance of the tool (a <CODE>Browser<SPAN class="keyword">.</SPAN><SPAN class="string">'class'</SPAN></CODE> object).</DIV><DIV class="footnote"><A name="label41">3. </A>Namely, due to the constraint system itself and restricted use of constraint predicates in the Kernel Oz.</DIV><DIV class="footnote"><A name="label42">4. </A>Informally, <IMG alt="x^\beta\prec_\alpha y^\gamma" src="latex32.png">, where <IMG alt="\alpha" src="latex33.png">, <IMG alt="\beta" src="latex34.png"> and <IMG alt="\gamma" src="latex35.png"> are computation spaces, so that <IMG alt="\alpha\preceq\beta" src="latex36.png"> and <IMG alt="\alpha\preceq\gamma" src="latex37.png"> (that is, <IMG alt="\alpha" src="latex33.png"> is below or equal both <IMG alt="\beta" src="latex34.png"> and <IMG alt="\gamma" src="latex35.png">), if <IMG alt="\beta\preceq\gamma" src="latex38.png"> and either <EM>(i)</EM> <IMG alt="\alpha\neq\gamma" src="latex39.png">, <EM>(ii)</EM> <IMG alt="x" src="latex2.png"> is an unconstrained variable while <IMG alt="y" src="latex3.png"> is a constrained one, or <EM>(iii)</EM> <IMG alt="y" src="latex3.png"> was created earlier than <IMG alt="x" src="latex2.png">. Otherwise, an <EM>arbitrary</EM> order is chosen by the Oz Engine. Note that the order on local to a computation space variables changes unpredictably during the garbage collection.</DIV><DIV class="footnote"><A name="label43">5. </A>The set <IMG alt="\P" src="latex18.png"> is needed to handle constraints over rational trees, which allow graphs described here to be cyclic.</DIV><DIV class="footnote"><A name="label44">6. </A>Browser terms are similar to Oz (syntactic) terms as defined in <A href="../notation/index.html">``The Oz Notation''</A>, but they have different origins.</DIV><DIV class="footnote"><A name="label45">7. </A>The string <CODE>[101&nbsp;108&nbsp;108&nbsp;111]</CODE> is a string of the ascii codes for the characters <EM>e</EM>, <EM>l</EM>, <EM>l</EM> and <EM>o</EM> respectively.</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>