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
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/Metalib- Make sure the version is correct by
git checkout 04b7aea make install
-
Note to compile the
variant, it is necessary to replaceLibLNgen.vinMetalibby the file in the same name provided in the directory.cd metalib/Metalib- copy the
LibLNgen.vinto it for replacement make clean && make && make install
-
Enter either
main_version/coqorvariant/coqdirectory. -
Type
makein 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_versiondirectory contains the definition and proofs of the main calculusvariantdirectory contains the definition and proofs of the simple variant (discussed in the Appendix). Its subtyping relation is known to be reflexive and transitive.bidirectional_lambdaidirectory containsicfp_bidirectional.v. It extends the bidirectional type system of lambdai by a fixpoint rule, and has a different comleteness theorem proved.syntax_ott.vcontains the locally nameless definitions of the calculi and Dunfield's calculus.rules_inf.vandrules_inf2.vcontains thelngengenerated code.Infrastructure.vcontains the type systems of the calculi and some lemmas.Subtyping_inversion.vcontains some properties of the subtyping relation.Deterministic.vcontains the proofs of the determinism property.Type_Safety.vcontains the proofs of the type preservation and progress properties.dunfield.vcontains the proofs of the soundness theorem with respect to Dunfield's calculus.icfp.vcontains the proofs of the completeness theorem with respect to lambdai.