-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
67 lines (47 loc) · 2.18 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
---------------------------------------
CamFort v0.615
---------------------------------------
0. Prerequisites
On a Debian/Ubuntu system
sudo apt-get install ghc alex happy libghc-text-dev libghc-comonad-dev libghc-mtl-dev
cabal update
cabal install syz generic-deriving uniplate
Also required is the language-fortran package which needs to be built from source and installed. This contains the lexer and the parser.
1. Building
---------------------------------------
For development purpsoses, you probably want to load CamFort in interactive mode:
ghci Main.hs
OR compile to the binary format locally:
ghc Main.hs -o camfort -package mtl
Alternatively, to install as a library in your Haskell build
runhaskell Setup.hs configure
runhaskell Setup.hs build
runhaskell Setup.hs install
OR, for local install (depending how your Haskell install is setup), try to configure
using --user.
runhaskell Setup.hs configure --user
---------------------------------------
2. Usage
---------------------------------------
CamFort 0.615 - Cambridge Fortran Infrastructure.
Usage: camfort <MODE> <INPUT> [OUTPUT] [OPTIONS...]
Refactor functions:
common [common block elimination]
commonArg [common block elimination (to parameter passing)]
equivalence [equivalence elimination]
dataType [derived data type introduction]
dead [dead-code elimination]
units [unit-of-measure inference]
removeUnits [unit-of-measure removal]
Analysis functions:
asts [blank analysis, outputs analysis files with AST information]
lva [live-variable analysis]
loops [loop information]
count [count variable declarations]
criticalUnits [calculate the critical variables for units-of-measure inference]
ast [print the raw AST -- for development purposes]
Options:
-v, -? --version show version number
-e FILES --exclude=FILES files to exclude (comma separated list, no spaces)
-s ID --units-solver=ID units-of-measure solver. ID = Custom or LAPACK
-l ID --units-literals=ID units-of-measure literals mode. ID = Unitless, Poly, or Mixed