Commit 92dc9ece authored by Ronny Wichers Schreur's avatar Ronny Wichers Schreur

Initial import

parent 390e24d4
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="Dynamics%200.2_files/filelist.xml">
<title>INTRODUCTION</title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>Martijn Vervoort</o:Author>
<o:LastAuthor>Martijn Vervoort</o:LastAuthor>
<o:Revision>2</o:Revision>
<o:TotalTime>592</o:TotalTime>
<o:LastPrinted>2002-11-21T11:48:00Z</o:LastPrinted>
<o:Created>2002-11-21T13:00:00Z</o:Created>
<o:LastSaved>2002-11-21T13:00:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>1463</o:Words>
<o:Characters>8051</o:Characters>
<o:Company>KUN</o:Company>
<o:Lines>67</o:Lines>
<o:Paragraphs>18</o:Paragraphs>
<o:CharactersWithSpaces>9496</o:CharactersWithSpaces>
<o:Version>10.2625</o:Version>
</o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-ansi-language:EN-GB;
mso-fareast-language:EN-US;}
h1
{mso-style-next:Normal;
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
page-break-after:avoid;
mso-outline-level:1;
font-size:16.0pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman";
mso-font-kerning:0pt;
mso-ansi-language:EN-GB;
mso-fareast-language:EN-US;}
h2
{mso-style-next:Normal;
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
page-break-after:avoid;
mso-outline-level:2;
font-size:12.0pt;
font-family:"Times New Roman";
mso-ansi-language:EN-GB;
mso-fareast-language:EN-US;
font-weight:normal;
text-decoration:underline;
text-underline:single;}
h3
{mso-style-next:Normal;
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
mso-pagination:widow-orphan;
page-break-after:avoid;
mso-outline-level:3;
font-size:12.0pt;
font-family:"Times New Roman";
mso-ansi-language:EN-GB;
mso-fareast-language:EN-US;
text-decoration:underline;
text-underline:single;}
h4
{mso-style-next:Normal;
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
page-break-after:avoid;
mso-outline-level:4;
font-size:12.0pt;
font-family:"Times New Roman";
mso-ansi-language:EN-GB;
mso-fareast-language:EN-US;
text-decoration:underline;
text-underline:single;}
p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-ansi-language:EN-GB;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:410353114;
mso-list-type:hybrid;
mso-list-template-ids:142630634 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
@list l1
{mso-list-id:548955436;
mso-list-type:hybrid;
mso-list-template-ids:797876306 68354049 68354051 68354053 68354049 68354051 68354053 68354049 68354051 68354053;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l2
{mso-list-id:847981818;
mso-list-type:hybrid;
mso-list-template-ids:1840513396 1093539782 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l2:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:\F0E8;
mso-level-tab-stop:162.0pt;
mso-level-number-position:left;
margin-left:162.0pt;
text-indent:-18.0pt;
font-family:Wingdings;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
@list l3
{mso-list-id:929895108;
mso-list-type:hybrid;
mso-list-template-ids:-1195365726 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l3:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
@list l4
{mso-list-id:1672023976;
mso-list-type:hybrid;
mso-list-template-ids:-701698224 -1978352540 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l4:level1
{mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
@list l5
{mso-list-id:2125229295;
mso-list-type:hybrid;
mso-list-template-ids:494161696 68354049 68354051 68354053 68354049 68354051 68354053 68354049 68354051 68354053;}
@list l5:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
<body lang=NL link=blue vlink=purple style='tab-interval:36.0pt'>
<div class=Section1>
<h1 style='text-align:justify'><span lang=EN-GB style='font-size:20.0pt;
mso-bidi-font-size:12.0pt;font-weight:normal'>Dynamics 0.2 (21<sup>th</sup> of November
2002)<o:p></o:p></span></h1>
<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><u><span lang=EN-GB>Changes<o:p></o:p></span></u></b></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l5 level1 lfo5;
tab-stops:list 36.0pt'><span lang=EN-GB>A lot of bugs have been fixed. The
basic implementation is now being debugged.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l5 level1 lfo5;
tab-stops:list 36.0pt'><span lang=EN-GB>Polymorphic dynamics are allowed.
For example and more information, please refer to the reference manual and
the Unify-folder within the examples folder.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l5 level1 lfo5;
tab-stops:list 36.0pt'><span lang=EN-GB>Support for type synonyms</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l5 level1 lfo5;
tab-stops:list 36.0pt'><span lang=EN-GB>Object IO support</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l5 level1 lfo5;
tab-stops:list 36.0pt'><span lang=EN-GB>Various small bug fixes and
changes </span></li>
</ul>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><u><span lang=EN-GB>Changes
(Dynamics 0.1, 25<sup>th</sup> of June 2002) <o:p></o:p></span></u></b></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='mso-list:l5 level1 lfo5;tab-stops:list 36.0pt'><span
lang=EN-GB>A lot of bugs have been fixed. The basic implementation is now
being debugged.</span></li>
<li class=MsoNormal style='mso-list:l5 level1 lfo5;tab-stops:list 36.0pt'><span
lang=EN-GB>More support for lazy dynamics by eliminating the three former
restrictions in the section about Dynamic Pattern matches.</span></li>
<li class=MsoNormal style='mso-list:l5 level1 lfo5;tab-stops:list 36.0pt'><span
lang=EN-GB>Garbage collection on dynamics and their libraries.</span></li>
<li class=MsoNormal style='mso-list:l5 level1 lfo5;tab-stops:list 36.0pt'><span
lang=EN-GB>Dynamics now have (nearly) unique identifications which mean
that they can move them as you wish.</span></li>
</ul>
<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<h4><span lang=EN-GB>Install</span></h4>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='mso-list:l3 level1 lfo4;tab-stops:list 36.0pt'><span
lang=EN-GB>Unpack the dynamic-package in the root of the already unpacked
Clean base distribution.</span></li>
<li class=MsoNormal style='mso-list:l3 level1 lfo4;tab-stops:list 36.0pt'><span
lang=EN-GB>Move the dynamic link libraries DynamicLink.dll and
ServerChannel.dll to your Windows-system directory.</span></li>
<li class=MsoNormal style='mso-list:l3 level1 lfo4;tab-stops:list 36.0pt'><span
lang=EN-GB>Enter the proper path names for the dynamic projects by
changing the definition of the p-function in the where clause of the
Start-rule. Do not forget that slashes need to be escaped by putting
another slash in front.</span></li>
<li class=MsoNormal style='mso-list:l3 level1 lfo4;tab-stops:list 36.0pt'><span
lang=EN-GB>If you installed Dynamics 0.{0,1} and you want to use
dumpDynamic on your dynamic, then delete HKEY_CLASSES_ROOT\prjfile\Shell\dynamic
link-key.</span></li>
</ul>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<h2 style='text-align:justify'><b><span lang=EN-GB>Introduction<o:p></o:p></span></b></h2>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>Dynamics are
still under development. It is therefore important to note that dynamics are
released for experiments only. Please re-read the last sentence.</span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>At least the
following restrictions apply:</span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>Unsupported release. It is mainly
intended for small experiments and to satisfy the curiosity.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>Overloaded types, unique types,
universally quantified types, existentially quantified types, abstract
types cannot be packed and/or unpacked.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>For the time being, windows only.
It has been tested on windows 95/98. It has also been run under windows
2000/XP.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>Binary compatibility is not
guaranteed i.e. you may need to recompile every dynamic when a next
release occurs. To be sure delete and recompile your old dynamics.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>Lazy dynamics i.e. a dynamic
containing at least one reference into another different dynamic are not
fully implemented.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>Probably a lot of small bugs. </span></li>
</ul>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>However algebraic,
record, function and array typed objects can be safely packed and/or unpacked.</span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>The rest of this
text is a practical guide on using dynamics and its supporting tools. </span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<h3><span lang=EN-GB>Short introduction to dynamics</span></h3>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>A dynamic (of
static type <b>Dynamic)</b> consists of:</span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>a value i.e. dynamic expression</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>the static type of the value i.e.
dynamic type.</span></li>
</ul>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoBodyText><span lang=EN-GB>Basic operations on dynamics:</span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>packing an object into a dynamic
by using the <b>dynamic</b>-keyword.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>unpacking an object from a dynamic
by using a dynamic pattern match.</span></li>
</ul>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>In addition
there are type dependent functions i.e. the context determines the type of the
packed object.</span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>Please see the
Examples-folder for concrete syntax and examples.</span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<h3><span lang=EN-GB>Creating a dynamic project</span></h3>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>In addition to
the normal procedure to create a new Clean project:</span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>Use an environment containing a
Clean 2.0 compiler.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>Mark it as the project as a
dynamic project by marking Enable Dynamics in the Project Options-menu
of CleanIDE.</span></li>
</ul>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<h3><span lang=EN-GB>Creating a dynamic</span></h3>
<p class=MsoNormal><span lang=EN-GB>A dynamic is created using the following
syntax:</span></p>
<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal><span lang=EN-GB><span style='mso-tab-count:1'> </span>dynamic
&lt;an arbitrarily Clean object&gt; :: &lt;external type&gt;</span></p>
<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoBodyText><span lang=EN-GB>Eventually most typed Clean objects can
be injected into a dynamic. Only for some objects e.g. World, File, natural
restrictions will apply.</span></p>
<p class=MsoBodyText><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoBodyText><span lang=EN-GB>The external type of a dynamic is the
static type of the object injected into the dynamic. The internal type of a
dynamic are the types of all objects which help to create an object of the
external type. </span></p>
<p class=MsoBodyText><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoBodyText><span lang=EN-GB>An example (Clean fragment):</span></p>
<p class=MsoBodyText><span lang=EN-GB>dynamic (length [a,b,c]) :: Int</span></p>
<p class=MsoBodyText><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>The current
implementation need not perform the rather costly internal type check because
it is done at compile-time and the use of code repositories preserves the
validity of the compile-time check.</span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<h3><span lang=EN-GB>Building a dynamic project</span></h3>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>After a dynamic
project has been compiled and linked without errors, the static linker has
created:</span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>a type and code repository. In
contrast to an executable, a code repository contains symbolic definitions
and references.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>a batch-file to start the project
from the code repository.</span></li>
</ul>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>Only the
batch-file is visible for the user and it replaces the executable that would
normally be generated by the linker.</span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>The code and
type repositories for the dynamic project have been stored in the
libraries-subfolder of the dynamic linker folder which has been set in the
Clean IDE.</span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<h4 style='text-align:justify'><span lang=EN-GB>Starting a dynamic project</span></h4>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>There are two
ways to start a dynamic project:</span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>using the normal Run-option<span
style='mso-spacerun:yes'> </span>of the Clean IDE which uses the
batch-file to start the project.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>clicking on the generated
batch-file.</span></li>
</ul>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoBodyText><span lang=EN-GB>The batch-file starts the dynamic linker
by giving it the code repository for the dynamic application. The dynamic
linker then starts the application at its normal entry point. </span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<h3><span lang=EN-GB>Writing a dynamic using writeDynamic </span></h3>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>Each object in
Clean conceptually is a graph rewriting system. The graph at run-time consists
of:</span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>a data graph i.e. that part of the
graph containing constructors which is actually built at run-time.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>descriptors which reference code
for functions which implicitly rewrite the graph according to the
reduction strategy.</span></li>
</ul>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoBodyText><span lang=EN-GB>In order to encode a dynamic e.g. write
it to disk the above components of the run-time graph need to be encoded:</span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>the data graph is encoded using a
top-down, left-to-right traversal.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>a descriptors is encoded as: its
code repository name, its module name and the descriptor name itself. </span></li>
</ul>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>In addition lazy
dynamics are supported. The dynamic version of the standard apply-function (see
also Examples-folder) creates references to other dynamics. These references
can be viewed using the dumpDynamic-tool. At run-time only those pieces of the
dynamic are constructed which are actually needed. This improves efficiency.</span></p>
<h3><span lang=EN-GB><o:p><span style='text-decoration:none'>&nbsp;</span></o:p></span></h3>
<h3><span lang=EN-GB>Reading a dynamic using readDynamic</span><span
lang=EN-GB style='font-weight:normal;mso-bidi-font-weight:bold;text-decoration:
none;text-underline:none'><o:p></o:p></span></h3>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>An object packed
into a dynamic on disk can be retrieved using the readDynamic-function. This
function converts the disk representation of a dynamic to its run-time
representation. The necessary functions are linked by a dynamic linker. As said
the retrieval of dynamic happens in pieces to increase efficiency.<o:p></o:p></span></p>
<h3><span lang=EN-GB><o:p><span style='text-decoration:none'>&nbsp;</span></o:p></span></h3>
<h3><span lang=EN-GB>Dynamic pattern matches</span></h3>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>A dynamic
pattern is transformed into the following actions that are performed in the
order of enumeration:</span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>Unification of the dynamic pattern
and type component in a dynamic. The unification of a variable with
another variable or a type constructor name will always succeed. In case
of two type constructor names, their names must be the same. The dynamic
library implements the unification.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>A type definition check for
equally named type constructors. The dynamic linker implements the
definition check and processes its results even further.</span></li>
</ul>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>Two type
constructors are considered equal if their implementations are syntactically
exactly the same modulo alpha-conversion. In case of an algebraic data-type the
constructor order is insignificant.</span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>The multiple
occurrence of a type pattern variable on the left hand side of a function
definition can be views as a means to do unification between different
dynamics. </span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><span
style='mso-spacerun:yes'></span></span></p>
<p class=MsoNormal style='text-align:justify'><b style='mso-bidi-font-weight:
normal'><u><span lang=EN-GB>Garbage collection for dynamics and libraries<o:p></o:p></span></u></b></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>The garbage
collector collects dynamics and libraries starting from some root mentioned on
the first line of the rootDir.txt-file in your Dynamics 0.1-folder. Only a
single root can be handled at the moment. You need to adapt the path for your
machine. The garbage collector itself is in the utilities folder.</span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='text-align:justify'><b style='mso-bidi-font-weight:
normal'><u><span lang=EN-GB>Practical tips<o:p></o:p></span></u></b></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB>Some practical
tips are given below:</span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>There is a bug in the up-to-date
cycle in the CleanIDE. Try a force recompile by shift+control+U on your
dynamic projects.</span></li>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB>Dont mix different releases
because they are binary incompatible.</span></li>
</ul>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<h3><span lang=EN-GB>Further references</span></h3>
<p class=MsoBodyText><span lang=EN-GB>From the paper-page (<a
href="http://www.cs.kun.nl/st/Onderzoek/Publicaties/publicaties.html">http://www.cs.kun.nl/st/Onderzoek/Publicaties/publicaties.html</a>):</span></p>
<p class=MsoBodyText><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoBodyText><b style='mso-bidi-font-weight:normal'><span lang=EN-GB>Papers
about dynamics:<o:p></o:p></span></b></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB><a
href="ftp://ftp.cs.kun.nl/pub/Clean/papers/2002/verm2002-LazyDynamicIO2.pdf">ftp://ftp.cs.kun.nl/pub/Clean/papers/2002/verm2002-LazyDynamicIO2.pdf</a>
</span></li>
</ul>
<p class=MsoNormal style='margin-left:36.0pt;text-align:justify'><span
lang=EN-GB>This paper describes the Input/Output of dynamics. This is called
dynamic I/O. It illustrates the most interesting problems and their solutions
to realize dynamic I/O.</span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB><a
href="ftp://ftp.cs.kun.nl/pub/Clean/papers/1999/pilm99-DynTypesIFL98.ps.gz">ftp://ftp.cs.kun.nl/pub/Clean/papers/1999/pilm99-DynTypesIFL98.ps.gz</a>
</span></li>
</ul>
<p class=MsoNormal style='margin-left:36.0pt;text-align:justify'><span
lang=EN-GB>This paper describes type dependent functions. A type dependent
function can be use to enforce the static type context of the function upon a
dynamic.</span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l0 level1 lfo1;
tab-stops:list 36.0pt'><span lang=EN-GB><a
href="ftp://ftp.cs.kun.nl/pub/Clean/papers/1997/pilm97-FstClassIOIFL.96.ps.gz">ftp://ftp.cs.kun.nl/pub/Clean/papers/1997/pilm97-FstClassIOIFL.96.ps.gz</a></span></li>
</ul>
<p class=MsoNormal style='margin-left:36.0pt;text-align:justify'><span
lang=EN-GB>This paper introduces the notion of a dynamic and its two basic
operations for the lazy functional programming language Clean.</span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style='text-align:justify'><b style='mso-bidi-font-weight:
normal'><span lang=EN-GB>Papers about the applications of dynamics:</span></b><span
lang=EN-GB><o:p></o:p></span></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='text-align:justify;mso-list:l1 level1 lfo6;
tab-stops:list 36.0pt'><span lang=EN-GB><a
href="ftp://ftp.cs.kun.nl/pub/Clean/papers/2002/achp2002-GenericDynamics2.pdf">ftp://ftp.cs.kun.nl/pub/Clean/papers/2002/achp2002-GenericDynamics2.pdf</a><o:p></o:p></span></li>
</ul>
<p class=MsoNormal style='margin-left:36.0pt;text-align:justify'><span
lang=EN-GB>This paper describes the combination of dynamics and generics. The
combination allows writing pretty printers and parser for dynamic in an easy
way.<o:p></o:p></span></p>
<ul style='margin-top:0cm' type=disc>