-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
123 lines (82 loc) · 3.47 KB
/
README
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
The generalized intensional compiler
====================================
A compiler for a subset of Haskell based on the intensional transformation and
modular polymorphic defunctionalization. Under development, version 0.10.
Features:
* Separate module compilation.
* Parametric polymorphism, GADTs.
* A dataflow interpreter.
* A compiler to the rewriting logic of Maude.
See the examples under /Examples for the language features supported.
Requirements
------------
To build the compiler, you need:
* GHC 8.0.2
* ghc-paths
* haskell-src-exts 1.18.2
* For the C back-end:
* GCC (with OpenMP support if the parallel runtime is enabled)
* The Boehm-Demers-Weiser garbage collector from:
(http://www.hpl.hp.com/personal/Hans_Boehm/gc/)
Note: configure with --enable-parallel-mark/-DTHREAD_LOCAL_ALLOC for the parallel runtime.
* Optional: libgmp (is the `HAS_GMP` macro is enabled) for big integers
(the Integer data type, see `run_lar.sh`).
* Optional: libunwind if using the semi-space collector (needed for the compact
representation back-end).
* For the Erlang back-end: Erlang/OTP R16 or greater.
* For the Maude back-end: Maude 2.6 and Full Maude.
* Optional: the GHC profiling libs (if HPROFILE is set in the Makefile),
to support stack traces in the compiler executable.
Building the compiler (stack)
-----------------------------
stack setup
stack build
Building the compiler (make)
----------------------------
* To disable type checking with the GHC API, comment out the `USE_GHC` flag in
the Makefile.
* To build the compiler on Linux or Windows with Cygwin, run the following command
at the top-level directory (where Main.hs is located):
make
To build gic in Windows without Cygwin, use buildwin.bat.
Using the compiler
------------------
To use the Boehm-Demers-Weiser garbage collector change macros
`GC_INCLUDE` and `GC_LIB` in `run_libgc.sh` to point to the location
of the collector.
To compile and run an example `Main.hs`, run:
./run_libgc.sh Main.hs
The result binary will be in `./a.out`. To use the GHC-based type checker, run:
GICFLAGS="-ghc-tc" ./run_libgc.sh Main.hs
To compile and run an example `Test.hs` using the type checker of the GHC API, run:
./run_lar.sh -ghc-tc Test.hs
The module must have all types filled in by the user with explicit type signatures.
To display the options that can be used with `gic`, run:
./gic -help
To compile a program using the OpenMP-based runtime, set the OMP environment variable:
OMP=1 ./run_libgc.sh Fibpar.hs
Using the built-in interpreter
------------------------------
The built-in interpreter is invoked with `-e`, for example:
./gic -e Examples/Data/addsx.hs
This transforms the input program to a 0-order intensional one and runs it
using a warehouse for laziness.
Documentation
-------------
To generate the code documentation using haddock, run:
make haddock
The resulting documentation is in `doc/haddock`.
Contributors
------------
* Angelos Charalambidis <[email protected]>
* Georgios Fourtounis <[email protected]>
* Nikolaos Papaspyrou <[email protected]>
* Panos Rondogiannis <[email protected]>
* Panagiotis Theofilopoulos
License
-------
The compiler is licensed under the terms of the GNU LGPL.
If the compiler is linked with libgmp or the GHC API, the restrictions of their
respective licenses apply.
Copyright 2009-2014, Georgios Fourtounis, Software Engineering Laboratory,
National Technical University of Athens.