forked from melsman/mlkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME_BARRY
72 lines (54 loc) · 2.65 KB
/
README_BARRY
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
This is file README_BARRY mael 2002-10-29
INTRODUCTION
------------
Barry is a barifier (i.e., simplifier) for Standard ML, based on the
frontend of the MLKit. Barry transforms Standard ML, including
Modules, into a subset of Core Standard ML. Barry has the following
features:
* Static interpretation of Modules. All Modules language constructs
are eliminated by Barry, including functors, functor applications,
and signature constraints.
* Pattern match compilation. Barry transforms complex patterns into
simple ones.
* Optimization. By default, Barry performs various optimizations,
including function inlining and specialization of higher-order
recursive functions, such as map and foldl. Optimizations can be
controlled using compile-time flags.
COMPILATION
-----------
Barry is known to work on a Debian Linux box with SML/NJ 110.0.7
installed. To compile Barry from the MLKit sources, simply type
# make barry
from within the kit/ directory. If compilation succeeds, an executable
file kit/bin/barry should now be available. If you wish to install
Barry on your system, type (as user root)
$ make install_barry
HOW IT WORKS
------------
Started without arguments, Barry introduces itself with a rudimentary
70's-style menu system. Using this menu system, it is possible to
toggle flags (e.g., to control optimization) and compile projects and
SML files. For detailed information about the menu system, consult the
MLKit user's manual in kit/doc/manual/.
If you do not want to use the manu system, all flags can be controlled
by passing options to the barry executable at the command line. To see
a list of all possible options, type
# bin/barry -help
Notice that the present version of Barry supports a series of options
that are irrelevant to Barry; in future versions of Barry, this
nuisance way disappear. In its simplest form, Barry works by passing
it a project file or a Standard ML file on the command line:
# bin/barry kitdemo/Set.pm
Output is written to files in the PM/ directory. To avoid inclusion of
the Standard ML Basis Library, which comes with Barry, use the option
-no_basislib. You may wish to inspect some of the output from
compiling the Basis Library, to learn how Barry deals with primitives.
MODIFYING THE BARRY PRETTY-PRINTER
----------------------------------
Barry works by pretty-printing LambdaExp fragments (LambdaExp is an
intermediate language in the MLKit) as Standard ML code. If you want
to look at the code, see the file kit/src/Compiler/Lambda/LambdaExp.sml.
COPYRIGHT AND LICENSE
---------------------
See the file kit/copyright for the copyright notice, including license
information.