This artifact contains the Coq formulation of \B, \Bg and \Br calculus associated with the paper "Type-Directed Operational Semantics for Gradual Typing". This document explains how to run the Coq formulations and Coq files briefly. Artifact can either be compiled in the pre-built docker image with all the dependencies installed or it could be built from the scratch.
This section explains how to pull the docker image of artifact from docker repo and use it. Run the following commands one by one in terminal:
$ docker pull ecoop2021/ecoop2021
$ docker run -it ecoop2021/ecoop2021
$ eval $(opam env)
The artifact is located in /home/coq/ecoop2021/ directory.
There are two folders in the artifact, with make file in each:
- Calculus → contains \B and \Bg formulation
- Variant → contains \Br formulation
Go to each folder and run make:
$ cd /home/coq/ecoop2021/Calculus
$ eval $(opam env)
$ make
$ cd /home/coq/ecoop2021/Variant
$ eval $(opam env)
$ make
This section explains how to build the artifact from scratch
-
Install Coq 8.10.2. The recommended way to install Coq is via
OPAM
. Refer to here for detailed steps. Or one could download the pre-built packages for Windows and MacOS via here. Choose a suitable installer according to your platform. -
Make sure
Coq
is installed (typecoqc
in the terminal, if you see "command not found" this means you have not properly installed Coq), then installMetalib
:- Open terminal
git clone https://github.com/plclub/metalib
cd metalib/Metalib
make install
-
Enter
coq/Calculus
orcoq/Variant
directory. -
Please make sure to run the command
eval \$(opam env)
before running make if you installed the Coq via opam. -
Type
make
in the terminal to build and compile the proofs.
Calculus
directory contains the definition and proofs of \B and \BgVariant
directory contains the definition and proofs of \BrCalculus/syntax_ott.v
contains the locally nameless definitions of \Bg.Variant/syntax_ott.v
contains the locally nameless definitions of \Br.Calculus/syntaxb_ott.v
contains the locally nameless definitions of \B.rules_inf.v
andrulesb_inf.v
contains thelngen
generated code.Infrastructure.v
contains the type systems of the calculi and some lemmas.Infrastructure_b.v
contains the type systems of the blame calculi and some lemmas.Deterministic.v
contains the proofs of the determinism property.Typing.v
contains the proofs of some typing lemmas.Typing_b.v
contains the proofs of some blame calculus typing lemmas.ttyping.v
contains the proofs of some elaboration typing lemmas.criteria.v
contains the proofs of gradual guarantee theorem.Type_Safety.v
contains the proofs of the type preservation and progress properties.soundness.v
contains the proofs of the soundness theorem with respect to blame calculus.soundness_blame.v
contains the proofs of the soundness theorem with respect to blame calculus.