Getting Started
This class, we'll do an exercise on reflection in Coq. The exercise can be found in this file. Throughout, it is likely that you will find the demo file from Tuesday's class helpful!
Thanks again to our wonderful TA, there's a Gitpod link here! Otherwise, please follow the installation instructions below. Either way, please get the artifact running before class. If you have any trouble, please post your questions in this class forum thread. You can also drop any installation tips you have in that thread.
Installation Instructions
If you already have Coq 8.14.0 installed, you do not need to do anything. It is OK if you are on a different OCaml installation, or if you are using a different IDE for proof development. If you do not have Coq installed, though, please follow these instructions:
- If you do not have opam, install it.
- Otherwise, if you do have opam, run
opam update
to fetch the latest versions of packages from the repository. - Run
opam switch create 4.12.0
to install OCaml 4.12.0 in a switch. - Run
eval $(opam env)$
to configure your environment to use that switch. - Install Coq 8.14.0 by running
opam pin add coq 8.14.0
. - Install CoqIDE---the default IDE for Coq---by running
opam pin coqide 8.14.0
. - Run
eval $(opam env)$
again to update the shell environment. - Download Hello.v, the hello world file.
- Compile Hello.v (
coqc Hello.v
from the command line) to test your Coq setup. - Open
Hello.v
in CoqIDE (coqide Hello.v
from the command line), and step to the bottom to check your CoqIDE setup. - Download this file, which we will work on in class.
If installation fails, and the class forums are no help, do not panic; we will try to match you with someone in class for whom installation worked. (Folks last semester had particular trouble with the latest Apple computers---please let me know if this applies to you.)
You can find the exercise we will do together in class below.