First and foremost, if OCaml is not installed on your machine, please visit this link to set up OCaml. Full credit to Professor Michael Clarkson, Cornell's CS 3110 instructor, for his tremendous work on building this textbook.
If not yet installed, please make sure the following packages are installed via opam:
- ANSITerminal
- ounit2
- csv
- download from https://github.com/Chris00/ocaml-csv
- follow instructions on github linked on above webpage and do opam install csv
- unix
- lablgl
- download from http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgl.html
- follow instructions on github linked on above webpage and do opam install lablgl
- if you have trouble installing this, just skip and test program with CLI
- if skipping, delete interface.ml and interface.mli to have
make run
be able to run
The appropriate command is
opam install [package name]
.
Other packages that may be necessary for you to build, run, and test this
project should have been installed with OCaml, but if not installed, the
terminal should give you a warning on missing packages, and you should be able
to do opam install
command as above to install what's needed.
The Makefile configures the following commands which you can run in the main project directory:
make build
which runs dune buildmake utop
which launches the top level with src filesmake run
which launches the REPL to interact with our database management systemmake test
to run unit testsmake linecount
which runscloc --by-file --include-lang=OCaml .
to count the number of OCaml code lines for grading purposes. Note that this also runsocamlbuild -clean
, which cleans out the directory including _build, do you'll need to build the project again before doing other things with the project.