/usr/share/mozart/doc/apptut/node7.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>6 Application Deployment</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="node6.html#chapter.mof"><< Prev</A></TD><TD><A href="node1.html">- Up -</A></TD></TR></TABLE><DIV id="chapter.deployment"><H1><A name="chapter.deployment">6 Application Deployment</A></H1><DIV id="section.deployment.linking"><H2><A name="section.deployment.linking">6.1 Linking Functors</A></H2><P> Application development can be considerably eased by splitting the application in a large number of orthogonal and reusable functors. However, deployment of an application gets harder in the presence of a large number of functors: </P><OL type="1"><LI><P>Installing the application requires correct installation of a large number of functors. </P></LI><LI><P>Execution might be slow due to frequent file- or even network accesses. </P></LI></OL><P> </P><P> The commandline tool <KBD>ozl</KBD> eases deployment by creating a new functor that includes imported functors in a prelinked fashion: it is possible to collapse a collection of functors into a single equivalent one. The model that should be kept in mind, is that the newly created functor employs an internal, private module manager that executes the toplevel application functor together with all included functors. </P><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>ozl </CODE><CODE><I>In</I></CODE><CODE> -o </CODE><CODE><I>Out</I></CODE></BLOCKQUOTE><P> </P><P> For example, from the pickled toplevel functor <CODE>LMF.ozf</CODE> a new functor can be created as follows: </P><BLOCKQUOTE class="code"><CODE>ozl LMF.ozf -o LMF.oza</CODE></BLOCKQUOTE><P> where the pickled functor <CODE>LMF.ozf</CODE> is created by compilation as follows: </P><BLOCKQUOTE class="code"><CODE>ozc -c LMF.oz -o LMF.ozf</CODE></BLOCKQUOTE><P> </P><P> Now the newly created pickled functor <CODE>LMF.oza</CODE> can be installed everywhere, the functors stored in <CODE>DB.ozf</CODE> and <CODE>Form.ozf</CODE> are included in <CODE>LMF.oza</CODE>. </P><P> The linker can be used in verbose mode with the option <CODE>--verbose</CODE> (or <CODE>-v</CODE> as abbreviation). In verbose mode the linker prints information on which functors are included and which functors are imported by the newly created functor. For example, </P><BLOCKQUOTE class="code"><CODE>ozl -v LMF.ozf -o LMF.oza</CODE></BLOCKQUOTE><P> prints something like </P><BLOCKQUOTE class="code"><CODE>Include:<BR> /home/schulte/DB.ozf, /home/schulte/Form.ozf,<BR> /home/schulte/LMF.ozf.<BR>Import:<BR> x-oz://system/Application.ozf, x-oz://system/System.ozf, <BR> x-oz://system/Tk.ozf.</CODE></BLOCKQUOTE><P> </P><P> The linker also supports options that control which functors are included, for more information see <A href="../tools/node7.html#chapter.linker">Chapter 3 of ``Oz Shell Utilities''</A>. </P></DIV><DIV id="section.deployment.compressed"><H2><A name="section.deployment.compressed">6.2 Compressed Pickled Functors</A></H2><P> Pickles created by the compiler and linker can also take advantage of compression. For that matter, both tools support the <CODE>--compress</CODE> (or <CODE>-z</CODE> as shortcut) option that must be followed by a single digit that defines the compression level to be used. </P><P> For example, the pickled functor <CODE>LMF.oza</CODE> can be created compressed by </P><BLOCKQUOTE class="code"><CODE>ozl --compress 9 LMF.ozf -o LMF.oza</CODE></BLOCKQUOTE><P> This reduces the used disk space by 50%. </P></DIV><DIV id="section.deployment.execute"><H2><A name="section.deployment.execute">6.3 Executing Functors</A></H2><P> This section shows a convenient form to execute functors. </P><P> The option <CODE>--exec</CODE> (or <CODE>-x</CODE> as shortcut) can be supplied to both compiler and linker. Functors that are created with that option can be directly executed. For example, the file <CODE>lmf.exe</CODE> created with </P><BLOCKQUOTE class="code"><CODE>ozl -x LMF.ozf -o lmf.exe</CODE></BLOCKQUOTE><P> can be directly executed: </P><BLOCKQUOTE class="code"><CODE>lmf.exe</CODE></BLOCKQUOTE><P> The pickled functor <CODE>lmf.exe</CODE> just features a particular header that allows direct execution. It can still be used together with the <CODE>ozengine</CODE> program: </P><BLOCKQUOTE class="code"><CODE>ozengine lmf.exe</CODE></BLOCKQUOTE><P> </P><P> Naturally, the extension <CODE>.exe</CODE> can be omitted under Unix. </P></DIV></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node6.html#chapter.mof"><< Prev</A></TD><TD><A href="node1.html">- Up -</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> and <A href="http://www.ps.uni-sb.de/~schulte/">Christian Schulte</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|