Sophie

Sophie

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

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

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>3.1 Basic Usage</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="node7.html">- Up -</A></TD><TD><A href="node9.html#section.linker.include">Next &gt;&gt;</A></TD></TR></TABLE><DIV id="section.linker.basic"><H2><A name="section.linker.basic">3.1 Basic Usage</A></H2><P> The linker can be invoked on the input functor <CODE><I>In</I></CODE> in order to create an output functor <CODE><I>Out</I></CODE> as follows: </P><BLOCKQUOTE class="code"><CODE>%&nbsp;ozl&nbsp;</CODE><CODE><I>In</I></CODE><CODE>&nbsp;-o&nbsp;</CODE><CODE><I>Out</I></CODE></BLOCKQUOTE><P> </P><P> Consider for example the pickled functors <CODE>A.ozf</CODE>, <CODE>B.ozf</CODE>, and <CODE>subdir/C.ozf</CODE>, where <CODE>A.ozf</CODE> has been created from the following functor definition: </P><BLOCKQUOTE class="code"><CODE><SPAN class="keyword">functor</SPAN>&nbsp;<BR><SPAN class="keyword">import</SPAN>&nbsp;B<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C&nbsp;<SPAN class="keyword">at</SPAN>&nbsp;<SPAN class="string">'subdir/C.ozf'</SPAN>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Application<BR><SPAN class="keyword">end</SPAN></CODE></BLOCKQUOTE><P> and the other functors have empty imports. By executing </P><BLOCKQUOTE class="code"><CODE>%&nbsp;ozl&nbsp;A.ozf&nbsp;-o&nbsp;D.ozf</CODE></BLOCKQUOTE><P> a new pickled functor <CODE>D.ozf</CODE> is created that contains both the functors contained in <CODE>B.ozf</CODE> and <CODE>subdir/C.ozf</CODE> but not the system functor <CODE>Application</CODE>. </P><P> If the linker is invoked in verbose mode as </P><BLOCKQUOTE class="code"><CODE>%&nbsp;ozl&nbsp;--verbose&nbsp;A.ozf&nbsp;-o&nbsp;D.ozf</CODE></BLOCKQUOTE><P> or </P><BLOCKQUOTE class="code"><CODE>%&nbsp;ozl&nbsp;-v&nbsp;A.ozf&nbsp;-o&nbsp;D.ozf</CODE></BLOCKQUOTE><P> for short, it prints the following information on which functors are in fact included and which are still imported by the newly created functor. </P><BLOCKQUOTE class="code"><CODE>Include:<BR>&nbsp;&nbsp;&nbsp;A.ozf,&nbsp;B.ozf,&nbsp;subdir/C.ozf.<BR>Import:<BR>&nbsp;&nbsp;&nbsp;x-oz://system/Application.</CODE></BLOCKQUOTE><P> </P><P> If we now invoke the linker on the newly created pickled functor <CODE>D.ozf</CODE> in verbose mode as follows: </P><BLOCKQUOTE class="code"><CODE>%&nbsp;ozl&nbsp;-v&nbsp;D.ozf</CODE></BLOCKQUOTE><P> it only prints the following information without creating a new functor: </P><BLOCKQUOTE class="code"><CODE>Include:<BR>&nbsp;&nbsp;&nbsp;D.ozf.<BR>Import:<BR>&nbsp;&nbsp;&nbsp;x-oz://system/Application.</CODE></BLOCKQUOTE><P> </P><P> By default, the linker includes (or links) all functors that are referred to by relative urls as in our previous example. How to change this behaviour is discussed in <A href="node9.html#section.linker.include">Section&nbsp;3.2</A>. </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node7.html">- Up -</A></TD><TD><A href="node9.html#section.linker.include">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 (20090610)</SPAN></ADDRESS></BODY></HTML>