File: Features

package info (click to toggle)
mlton 20130715-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 60,900 kB
  • ctags: 69,386
  • sloc: xml: 34,418; ansic: 17,399; lisp: 2,879; makefile: 1,605; sh: 1,254; pascal: 256; python: 143; asm: 97
file content (496 lines) | stat: -rw-r--r-- 11,945 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="AsciiDoc 8.6.8">
<title>Features</title>
<link rel="stylesheet" href="./asciidoc.css" type="text/css">
<link rel="stylesheet" href="./pygments.css" type="text/css">


<script type="text/javascript" src="./asciidoc.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
asciidoc.install();
/*]]>*/
</script>
<link rel="stylesheet" href="./mlton.css" type="text/css"/>
</head>
<body class="article">
<div id="banner">
<div id="banner-home">
<a href="./Home">MLton 20130715</a>
</div>
</div>
<div id="header">
<h1>Features</h1>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>MLton has the following features.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_portability">Portability</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
Runs on a variety of platforms.
</p>
<div class="ulist"><ul>
<li>
<p>
<a href="RunningOnARM">ARM</a>:
</p>
<div class="ulist"><ul>
<li>
<p>
<a href="RunningOnLinux">Linux</a> (Debian)
</p>
</li>
</ul></div>
</li>
<li>
<p>
<a href="RunningOnAlpha">Alpha</a>:
</p>
<div class="ulist"><ul>
<li>
<p>
<a href="RunningOnLinux">Linux</a> (Debian)
</p>
</li>
</ul></div>
</li>
<li>
<p>
<a href="RunningOnAMD64">AMD64</a>:
</p>
<div class="ulist"><ul>
<li>
<p>
<a href="RunningOnDarwin">Darwin</a> (Mac OS X)
</p>
</li>
<li>
<p>
<a href="RunningOnFreeBSD">FreeBSD</a>
</p>
</li>
<li>
<p>
<a href="RunningOnLinux">Linux</a> (Debian, Fedora, &#8230;)
</p>
</li>
<li>
<p>
<a href="RunningOnSolaris">Solaris</a> (10 and above)
</p>
</li>
</ul></div>
</li>
<li>
<p>
<a href="RunningOnHPPA">HPPA</a>:
</p>
<div class="ulist"><ul>
<li>
<p>
<a href="RunningOnHPUX">HPUX</a> (11.11 and above)
</p>
</li>
<li>
<p>
<a href="RunningOnLinux">Linux</a> (Debian)
</p>
</li>
</ul></div>
</li>
<li>
<p>
<a href="RunningOnIA64">IA64</a>:
</p>
<div class="ulist"><ul>
<li>
<p>
<a href="RunningOnHPUX">HPUX</a> (11.11 and above)
</p>
</li>
<li>
<p>
<a href="RunningOnLinux">Linux</a> (Debian)
</p>
</li>
</ul></div>
</li>
<li>
<p>
<a href="RunningOnPowerPC">PowerPC</a>:
</p>
<div class="ulist"><ul>
<li>
<p>
<a href="RunningOnAIX">AIX</a> (5.2 and above)
</p>
</li>
<li>
<p>
<a href="RunningOnDarwin">Darwin</a> (Mac OS X)
</p>
</li>
<li>
<p>
<a href="RunningOnLinux">Linux</a> (Debian, Fedora)
</p>
</li>
</ul></div>
</li>
<li>
<p>
<a href="RunningOnPowerPC64">PowerPC64</a>:
</p>
<div class="ulist"><ul>
<li>
<p>
<a href="RunningOnAIX">AIX</a> (5.2 and above)
</p>
</li>
</ul></div>
</li>
<li>
<p>
<a href="RunningOnS390">S390</a>
</p>
<div class="ulist"><ul>
<li>
<p>
<a href="RunningOnLinux">Linux</a> (Debian)
</p>
</li>
</ul></div>
</li>
<li>
<p>
<a href="RunningOnSparc">Sparc</a>
</p>
<div class="ulist"><ul>
<li>
<p>
<a href="RunningOnLinux">Linux</a> (Debian)
</p>
</li>
<li>
<p>
<a href="RunningOnSolaris">Solaris</a> (8 and above)
</p>
</li>
</ul></div>
</li>
<li>
<p>
<a href="RunningOnX86">X86</a>:
</p>
<div class="ulist"><ul>
<li>
<p>
<a href="RunningOnCygwin">Cygwin</a>/Windows
</p>
</li>
<li>
<p>
<a href="RunningOnDarwin">Darwin</a> (Mac OS X)
</p>
</li>
<li>
<p>
<a href="RunningOnFreeBSD">FreeBSD</a>
</p>
</li>
<li>
<p>
<a href="RunningOnLinux">Linux</a> (Debian, Fedora, &#8230;)
</p>
</li>
<li>
<p>
<a href="RunningOnMinGW">MinGW</a>/Windows
</p>
</li>
<li>
<p>
<a href="RunningOnNetBSD">NetBSD</a>
</p>
</li>
<li>
<p>
<a href="RunningOnOpenBSD">OpenBSD</a>
</p>
</li>
<li>
<p>
<a href="RunningOnSolaris">Solaris</a> (10 and above)
</p>
</li>
</ul></div>
</li>
</ul></div>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_robustness">Robustness</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
Supports the full SML 97 language as given in <a href="DefinitionOfStandardML">The Definition of Standard ML (Revised)</a>.
</p>
<div class="paragraph"><p>If there is a program that is valid according to the
<a href="DefinitionOfStandardML">Definition</a> that is rejected by MLton, or a
program that is invalid according to the
<a href="DefinitionOfStandardML">Definition</a> that is accepted by MLton, it is
a bug.  For a list of known bugs, see <a href="UnresolvedBugs">UnresolvedBugs</a>.</p></div>
</li>
<li>
<p>
A complete implementation of the <a href="BasisLibrary">Basis Library</a>.
</p>
<div class="paragraph"><p>MLton&#8217;s implementation matches latest <a href="BasisLibrary">Basis Library</a>
<a href="http://www.standardml.org/Basis">specification</a>, and includes a
complete implementation of all the required modules, as well as many
of the optional modules.</p></div>
</li>
<li>
<p>
Generates standalone executables.
</p>
<div class="paragraph"><p>No additional code or libraries are necessary in order to run an
executable, except for the standard shared libraries.  MLton can also
generate statically linked executables.</p></div>
</li>
<li>
<p>
Compiles large programs.
</p>
<div class="paragraph"><p>MLton is sufficiently efficient and robust that it can compile large
programs, including itself (over 140K lines).  The distributed version
of MLton was compiled by MLton.</p></div>
</li>
<li>
<p>
Support for large amounts of memory (up to 4G on 32-bit systems; more on 64-bit systems).
</p>
</li>
<li>
<p>
Support for large array lengths (up to 2<sup>31</sup>-1 on 32-bit systems; up to 2<sup>63</sup>-1 on 64-bit systems).
</p>
</li>
<li>
<p>
Support for large files, using 64-bit file positions.
</p>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_performance">Performance</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
Executables have <a href="Performance">excellent running times</a>.
</p>
</li>
<li>
<p>
Generates small executables.
</p>
<div class="paragraph"><p>MLton takes advantage of whole-program compilation to perform very
aggressive dead-code elimination, which often leads to smaller
executables than with other SML compilers.</p></div>
</li>
<li>
<p>
Untagged and unboxed native integers, reals, and words.
</p>
<div class="paragraph"><p>In MLton, integers and words are 8 bits, 16 bits, 32 bits, and 64 bits
and arithmetic does not have any overhead due to tagging or boxing.
Also, reals (32-bit and 64-bit) are stored unboxed, avoiding any
overhead due to boxing.</p></div>
</li>
<li>
<p>
Unboxed native arrays.
</p>
<div class="paragraph"><p>In MLton, an array (or vector) of integers, reals, or words uses the
natural C-like representation.  This is fast and supports easy
exchange of data with C.  Monomorphic arrays (and vectors) use the
same C-like representations as their polymorphic counterparts.</p></div>
</li>
<li>
<p>
Multiple <a href="GarbageCollection">garbage collection</a> strategies.
</p>
</li>
<li>
<p>
Fast arbitrary precision arithmetic (<span class="monospaced">IntInf</span>) based on the <a href="GnuMP">GnuMP</a>.
</p>
<div class="paragraph"><p>For <span class="monospaced">IntInf</span> intensive programs, MLton can be an order of magnitude or
more faster than Poly/ML or SML/NJ.</p></div>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_tools">Tools</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
Source-level <a href="Profiling">Profiling</a> of both time and allocation.
</p>
</li>
<li>
<p>
<a href="MLLex">MLLex</a> lexer generator
</p>
</li>
<li>
<p>
<a href="MLYacc">MLYacc</a> parser generator
</p>
</li>
<li>
<p>
<a href="MLNLFFIGen">MLNLFFIGen</a> foreign-function-interface generator
</p>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_extensions">Extensions</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
A simple and fast C <a href="ForeignFunctionInterface">ForeignFunctionInterface</a> that supports calling from SML to C and from C to SML.
</p>
</li>
<li>
<p>
The <a href="MLBasis">ML Basis system</a> for programming in the very large, separate delivery of library sources, and more.
</p>
</li>
<li>
<p>
A number of extension libraries that provide useful functionality
that cannot be implemented with the <a href="BasisLibrary">Basis Library</a>.
See below for an overview and <a href="MLtonStructure">MLtonStructure</a> for details.
</p>
<div class="ulist"><ul>
<li>
<p>
<a href="MLtonCont">continuations</a>
</p>
<div class="paragraph"><p>MLton supports continuations via <span class="monospaced">callcc</span> and <span class="monospaced">throw</span>.</p></div>
</li>
<li>
<p>
<a href="MLtonFinalizable">finalization</a>
</p>
<div class="paragraph"><p>MLton supports finalizable values of arbitrary type.</p></div>
</li>
<li>
<p>
<a href="MLtonItimer">interval timers</a>
</p>
<div class="paragraph"><p>MLton supports the functionality of the C <span class="monospaced">setitimer</span> function.</p></div>
</li>
<li>
<p>
<a href="MLtonRandom">random numbers</a>
</p>
<div class="paragraph"><p>MLton has functions similar to the C <span class="monospaced">rand</span> and <span class="monospaced">srand</span> functions, as well as support for access to <span class="monospaced">/dev/random</span> and <span class="monospaced">/dev/urandom</span>.</p></div>
</li>
<li>
<p>
<a href="MLtonRlimit">resource limits</a>
</p>
<div class="paragraph"><p>MLton has functions similar to the C <span class="monospaced">getrlimit</span> and <span class="monospaced">setrlimit</span> functions.</p></div>
</li>
<li>
<p>
<a href="MLtonRusage">resource usage</a>
</p>
<div class="paragraph"><p>MLton supports a subset of the functionality of the C <span class="monospaced">getrusage</span> function.</p></div>
</li>
<li>
<p>
<a href="MLtonSignal">signal handlers</a>
</p>
<div class="paragraph"><p>MLton supports signal handlers written in SML.  Signal handlers run in
a separate MLton thread, and have access to the thread that was
interrupted by the signal.  Signal handlers can be used in conjunction
with threads to implement preemptive multitasking.</p></div>
</li>
<li>
<p>
<a href="MLtonStructure">size primitive</a>
</p>
<div class="paragraph"><p>MLton includes a primitive that returns the size (in bytes) of any
object.  This can be useful in understanding the space behavior of a
program.</p></div>
</li>
<li>
<p>
<a href="MLtonSyslog">system logging</a>
</p>
<div class="paragraph"><p>MLton has a complete interface to the C <span class="monospaced">syslog</span> function.</p></div>
</li>
<li>
<p>
<a href="MLtonThread">threads</a>
</p>
<div class="paragraph"><p>MLton has support for its own threads, upon which either preemptive or
non-preemptive multitasking can be implemented.  MLton also has
support for <a href="ConcurrentML">Concurrent ML</a> (CML).</p></div>
</li>
<li>
<p>
<a href="MLtonWeak">weak pointers</a>
</p>
<div class="paragraph"><p>MLton supports weak pointers, which allow the garbage collector to
reclaim objects that it would otherwise be forced to keep.  Weak
pointers are also used to provide finalization.</p></div>
</li>
<li>
<p>
<a href="MLtonWorld">world save and restore</a>
</p>
<div class="paragraph"><p>MLton has a facility for saving the entire state of a computation to a
file and restarting it later.  This facility can be used for staging
and for checkpointing computations.  It can even be used from within
signal handlers, allowing interrupt driven checkpointing.</p></div>
</li>
</ul></div>
</li>
</ul></div>
</div>
</div>
</div>
<div id="footnotes"><hr></div>
<div id="footer">
<div id="footer-text">
</div>
<div id="footer-badges">
</div>
</div>
</body>
</html>