A Type-Directed Operational Semantics for a Calculus with a Merge Operator
Our Coq proofs are verified in Coq 8.9.1. We rely on two Coq libraries:
metalib
for the locally nameless
representation in our proofs; and
LibTactics.v
,
which is included in the directory.
-
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 sure the version is correct by
git checkout 04b7aea
make install
-
Note to compile the
variant
, it is necessary to replaceLibLNgen.v
inMetalib
by the file in the same name provided in the directory.cd metalib/Metalib
- copy the
LibLNgen.v
into it for replacement make clean && make && make install
-
Enter either
main_version/coq
orvariant/coq
directory. -
Type
make
in the terminal to build and compile the proofs. -
You should see something like the following (suppose
>
is the prompt):coq_makefile -arg '-w -variable-collision,-meta-collision,-require-in-module' -f _CoqProject -o CoqSrc.mk COQDEP VFILES COQC LibTactics.v COQC syntax_ott.v COQC rules_inf.v COQC Subtyping_inversion.v COQC Infrastructure.v COQC Deterministic.v COQC Type_Safety.v COQC rules_inf2.v COQC dunfield.v COQC icfp.v
main_version
directory contains the definition and proofs of the main calculusvariant
directory contains the definition and proofs of the simple variant (discussed in the Appendix). Its subtyping relation is known to be reflexive and transitive.bidirectional_lambdai
directory containsicfp_bidirectional.v
. It extends the bidirectional type system of lambdai by a fixpoint rule, and has a different comleteness theorem proved.syntax_ott.v
contains the locally nameless definitions of the calculi and Dunfield's calculus.rules_inf.v
andrules_inf2.v
contains thelngen
generated code.Infrastructure.v
contains the type systems of the calculi and some lemmas.Subtyping_inversion.v
contains some properties of the subtyping relation.Deterministic.v
contains the proofs of the determinism property.Type_Safety.v
contains the proofs of the type preservation and progress properties.dunfield.v
contains the proofs of the soundness theorem with respect to Dunfield's calculus.icfp.v
contains the proofs of the completeness theorem with respect to lambdai.