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
Coqis installed (typecoqcin 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/metalibcd metalib/Metalibmake install
-
Enter
coq/Calculusorcoq/Variantdirectory. -
Please make sure to run the command
eval \$(opam env)before running make if you installed the Coq via opam. -
Type
makein the terminal to build and compile the proofs.
Calculusdirectory contains the definition and proofs of \B and \BgVariantdirectory contains the definition and proofs of \BrCalculus/syntax_ott.vcontains the locally nameless definitions of \Bg.Variant/syntax_ott.vcontains the locally nameless definitions of \Br.Calculus/syntaxb_ott.vcontains the locally nameless definitions of \B.rules_inf.vandrulesb_inf.vcontains thelngengenerated code.Infrastructure.vcontains the type systems of the calculi and some lemmas.Infrastructure_b.vcontains the type systems of the blame calculi and some lemmas.Deterministic.vcontains the proofs of the determinism property.Typing.vcontains the proofs of some typing lemmas.Typing_b.vcontains the proofs of some blame calculus typing lemmas.ttyping.vcontains the proofs of some elaboration typing lemmas.criteria.vcontains the proofs of gradual guarantee theorem.Type_Safety.vcontains the proofs of the type preservation and progress properties.soundness.vcontains the proofs of the soundness theorem with respect to blame calculus.soundness_blame.vcontains the proofs of the soundness theorem with respect to blame calculus.