Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bd5c3d824c3db63ffd9226c15941e6ad > files > 1412

mozart-1.4.0-1mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>2 Inspector Basics</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.introduction">&lt;&lt; Prev</A></TD><TD><A href="index.html">- Up -</A></TD><TD><A href="node3.html#chapter.interactive">Next &gt;&gt;</A></TD></TR></TABLE><DIV id="chapter.basic"><H1><A name="chapter.basic">2 Inspector Basics</A></H1><P> This chapter provides some basic understanding about how the Inspector can be used. </P><H2><A name="label2">2.1 Simple Invocation</A></H2><P> The simplest usage of the Inspector is to execute the statement <CODE>{Inspect&nbsp;</CODE><CODE><I>X</I></CODE><CODE>}</CODE>, where <CODE><I>X</I></CODE> can be any Oz value. Unless the Inspector window is already open, this will create a new window displaying the given value. For instance, the window in <A href="node2.html#figure.usage">Figure&nbsp;2.1</A> was created using the statement </P><BLOCKQUOTE class="code"><CODE>{Inspect&nbsp;label(i&nbsp;am&nbsp;a&nbsp;sample&nbsp;tuple)}</CODE></BLOCKQUOTE><P> It is possible to inspect more than one value at the same time. By default, new values are appended to the current window. </P><DIV id="figure.usage"><HR><P><A name="figure.usage"></A></P><DIV align="center"><IMG alt="" src="use.gif"></DIV><P class="caption"><STRONG>Figure&nbsp;2.1:</STRONG> The Oz Inspector</P><HR></DIV><P> </P><H2><A name="label3">2.2 Inspecting within Multiple Widgets</A></H2><P> The Inspector can handle an arbitrarily number of viewing windows (called <EM>widgets</EM>) which can be accessed and configured independently. </P><H3><A name="label4">2.2.1 Adding and Deleting Widgets</A></H3><P> To open a new display widget, click ``Add new Widget'' from the Inspector menu as shown in <A href="node2.html#figure.panes">Figure&nbsp;2.2</A>. </P><DIV id="figure.panes"><HR><P><A name="figure.panes"></A></P><TABLE align="center" bgcolor="#f0f0e0"><TR valign="top"><TD><P></P><DIV align="center"><IMG alt="" src="panes1.gif"></DIV><P> </P></TD></TR><TR valign="top"><TD><P></P><DIV align="center"><IMG alt="" src="panes2.gif"></DIV><P> </P></TD></TR></TABLE><P class="caption"><STRONG>Figure&nbsp;2.2:</STRONG> Adding a new display widget</P><HR></DIV><P> </P><P> When more than one widget is used, the notion of the <EM>active widget</EM> becomes important. The active widget receives all work caused by applications of <CODE>Inspect</CODE>. By default, the initial widget is the active widget. This can be changed using the <SPAN class="key">TAB</SPAN> key. The active widget is indicated by a box with extra-thick line width around its viewing area. </P><P> To show the value <CODE><I>X</I></CODE> in the <CODE><I>I</I></CODE>-th window, execute the statement <CODE>{InspectN&nbsp;</CODE><CODE><I>I</I></CODE><CODE>&nbsp;</CODE><CODE><I>X</I></CODE><CODE>}</CODE>. The widgets are numbered starting from zero. </P><P> The currently active widget can be removed by clicking ``Delete active Widget'' from the Inspector menu (see <A href="node2.html#figure.panes">Figure&nbsp;2.2</A>). The widget below the active widget becomes the new active widget. If only a single widget is left, this action is ignored. </P><H2><A name="label5">2.3 Value Representation</A></H2><P> The Inspector can be configured to display values using either a tree-like or graph-like representation (see <A href="node2.html#figure.views">Figure&nbsp;2.3</A>). </P><DIV id="figure.views"><HR><P><A name="figure.views"></A></P><DIV align="center"><IMG alt="" src="views.gif"></DIV><P class="caption"><STRONG>Figure&nbsp;2.3:</STRONG> Three views on the same datastructure</P><HR></DIV><P> </P><P class="margin">Tree</P><P> The value will be shown as a tree with respect to given depth and width exploration limits. Values larger than the given limits are truncated, the cut positions being indicated by down and right arrows, respectively. </P><P class="margin">Graph</P><P> The value will be shown not only with respect to given depth and width exploration limits but also with respect to an equivalence relation: Repeatedly occurring sub-values will only be displayed once, all later occurrences being replaced by references to the first occurrence. This yields a more compact representation revealing more information about the value's structure. Equivalence is computed in a depth-first left-to-right traversal over the entire (truncated) value. </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node1.html#chapter.introduction">&lt;&lt; Prev</A></TD><TD><A href="index.html">- Up -</A></TD><TD><A href="node3.html#chapter.interactive">Next &gt;&gt;</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~bruni/">Thorsten&nbsp;Brunklaus</A><BR><SPAN class="version">Version 1.4.0 (20090610)</SPAN></ADDRESS></BODY></HTML>