forked from cjohnson19/teyjus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQUICKSTART
233 lines (169 loc) · 8.01 KB
/
QUICKSTART
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
QUICK START
===========
You must have the following software installed
OCaml http://caml.inria.fr/
Dune https://dune.build/
These standard tools are also required: a C compiler, lex, and yacc.
To build teyjus, execute 'make install' from the teyjus directory.
This will put tjcc, tjlink, tjsim, tjdepend, and tjdis in your opam
folder under the 'bin' directory.
Documentation for Teyjus can be found at http://teyjus.cs.umn.edu/
The rest of this file gives detailed instructions for compiling teyjus
on various platforms. The instructions for *nix apply to both Linux
and Mac OS X.
DEPENDENCIES
============
---*nix---
The following dependencies must be in the path:
OCaml
Dune
flex
bison
---Windows---
Teyjus can be compiled with either the Cygwin toolchain or the MS
toolchain.
Cygwin:
The following software must be installed.
OCaml for the MinGW toolchain http://caml.inria.fr/
Dune https://dune.build/
Cygwin http://www.cygwin.com/
When installing Cygwin, you must select the following packages
Devel: bison
Devel: gcc
Devel: flex
After Cygwin is installed, you must put Cygwin's binary directory
in your path. For example, 'C:\cygwin\bin'
Microsoft Visual Studio 2008:
The following dependencies must be in the path. Listed is a place
to get either the actual dependency, or information on procuring it.
OCaml http://caml.inria.fr/
Dune https://dune.build/
Microsoft Visual Studio 2008 http://msdn.microsoft.com/vstudio/
flex http://gnuwin32.sourceforge.net/
bison http://gnuwin32.sourceforge.net/
BUILD SYSTEM
============
---*nix and Cygwin---
To build the system in a *nix or Cygwin environment, use omake:
component command path
-----------------------------------------------------------------
compiler omake tjcc teyjus/source
simulator omake tjsim teyjus/source
disassembler omake tjdis teyjus/source
linker omake tjlink teyjus/source
dependency analyzer omake tjdepend teyjus/source
all omake all teyjus/source
---Windows: Microsoft Visual Studio 2008---
Installing dependencies:
Make sure that O'Caml is installed and in your path.
Make sure that flex and bison are in your path.
Building the System:
To build the system in a Windows environment, use the provided
Microsoft Visual Studio 2008 solution file, (/source/VisualStudio/Teyjus.sln).
To build the system, first set the number of parallel build threads to 1, by
clicking Tools > Options, and then selecting Project Solutions > Build and Run,
and finally changing "maximum number of parallel project builds" to 1.
Then, simply "Build All" (Ctrl + Alt + F7).
The result should be "8 succeeded, 0 failed, 0 skipped." The produced
binaries will be written to /source/VisualStudio/Debug, to /bin, and to
/source. In addition, the file /source/prebuilt will be create; this will
allow the tests to run correctly.
Alternatively, it should be possible to build projects individually by
simply building a particular project using "Build Project" (Ctrl + Shift + B).
If you have trouble building the solution, try running the script
/source/VisualStudio/clean.bat. It removes O'Caml object files that Visual
Studio doesn't know about.
Note that there is no support for building Teyjus using omake on Windows as
of yet.
SYSTEM USAGE
============
1. compiler (teyjus/source/tjcc)
--------------------------------
Usage: tjcc <options> <module-names>
options are:
-o Specifies the name of the output bytecode file
--output Specifies the name of the output bytecode file
-p Add PATH to the search path.
--path Add PATH to the search path.
--log Enable logging information.
--log Enable logging information.
-v Return the system version
--version Return the system version
-help Display this list of options
--help Display this list of options
2. simulator (teyjus/source/tjsim)
---------------------------------
Usage: tjsim -b <options> <module-name>
options are:
-p Add PATH to the search path.
--path Add PATH to the search path.
-s Solve the given query on startup. Several queries may be specified
--solve Solve the given query on startup. Several queries may be specified
-e Expect at least this many solutions from each query;
error if fewer. Valid only in batch mode
--expect Expect at least this many solutions from each query;
error if fewer. Valid only in batch mode
-m Halt after this many solutions to the query have been found.
Valid only in batch mode
--maximum Halt after this many solutions to the query have been found.
Valid only in batch mode
-q Suppress all non-error output from the system,
except variable bindings on query success
--quiet Suppress all non-error output from the system,
except variable bindings on query success
-b Suppress system interaction; send all output without stopping
--batch Suppress system interaction; send all output without stopping
-k Allocate a heap of the given size (K)
--heap Allocate a heap of the given size (K)
-v Return the system version
--version Return the system version
-help Display this list of options
--help Display this list of options
Note that the interactive interface is not implemented. The simulator only
works in batch mode (with option -b specified).
3. disassembler (teyjus/source/tjdis)
-------------------------------------
Usage: tjdis <options> <object-file>
options are:
-t Only print tables
--table Only print tables
-i Only print instructions
--instr Only print instructions
-v Return the system version
--version Return the system version
-help Display this list of options
--help Display this list of options
4. linker (teyjus/source/tjlink)
--------------------------------
Usage: tjlink <module-name>
-V Produce verbose output - use multiple times to increase verbosity
--verbose Produce verbose output - use multiple times to increase verbosity
-v Return the system version
--version Return the system version
-help Display this list of options
--help Display this list of options
5. dependency analyzer (teyjus/source/tjdepend)
-----------------------------------------------
Usage: tjdepend <options> <module-files>
options are:
-v Return the system version
--version Return the system version
-help Display this list of options
--help Display this list of options
6. parser (teyjus/source/tjparse)
-----------------------------------------------
Usage: tjparse [options] <file>
options are:
-o Specifies the name of the output module
--output Specifies the name of the output module
-v Return the system version
--version Return the system version
-help Display this list of options
--help Display this list of options
TESTING
=======
---*nix and Cygwin---
Run all tests with
make test
or
dune runtest