Note: This repository is a fork of The Plutus Certification project at https://github.com/JaccoKrijnen/plutus-cert and therefore there are other authors to this codebase. Below I focus on my contributions.
Master Thesis: A terminating type checker for the Plutus smart contracting language in Rocq
Author: Richard A. Koetschruyter
- Run
nix develop. - Run
make
- Run
nix developin a shell. - Run
make - Run
codein that same shell - Run
which coq-lsp - Enter this path in vscode coq-lsp plugin settings.
Apart from the files below, I made changes to existing files, such as those in the compatibility lemmas when changing the typing rules.
Many trivial facts unproved. Some untrivial facts unproved: Admits explain why.
MaybeFun- Compiler dumps of the MaybeFun programTypeCheckTest- Type check term with type computationTypeCheckTest.hs- Corresponding extracted Haskell code
KindingKinding of annotated STLC: same rules as PIRSTLCAnnotated STLC definition and capture-avoiding substitutions
alpha_freshness
Free and bound variable preservation under α-equivalencealpha_kinding
α-equivalence preserves kinding (typing of types)alpha_rename
Characterization of renaming of α-equivalencealpha_sub
Core substitution rules and their interaction with α-equivalencealpha_subs
α-equivalent multi-substitutionsalpha_vacuousα-equivalence and adding vacuous (unnecessary) renamings to contexts. In its own file because it requires construction proofs inScoping/alphaα-equivalence, equivalence relation, lookup behaviour, basic properties.
IdSubstIdentity substitutions and relevant properties for strong normalizationpsubsParallel multi-substitutionsSN_STLC_GUStrong normalization proof using globally uniquifying reductionsSN_STLC_ndStrong normalization proof using non-deterministic reductionsstep_guGlobally uniquifying reductionsstep_naiveNaive reductions
construct_GU_RConstructing representatives with α-equivalence requirements with non-empty renaming context: renaming free variablesconstruct_GUConstruction procedures for constructing globally unique representatives with different properties.GU_NCGlobal uniqueness and No capture judgments and their propertiesvariablesTrivial properties about free and bound type variables
BigStepBig step normalization relationnormaliseNormalizer_sound_completeSound and completeness proof of the normalizerNormalizerThe terminating normalizerPreservationPreservation of the type-languageProgressProgress of the type-languageSmallStepSmall step reduction relation of PIR's type languageSN_PIRStrong normalization proof by embedding into ASTLC
Binders_wellkindedAll type variables bound in let terms are well-kindeddrop_contextProperties of removing variables from context (in TyAbs and Let rules)TypecheckerType checking procedureTyping_sound_completeSound and completeness of the type checking procedureTypingImproved typing relation
PreservationFormalized preservation up to errorsBaseKindednessThe type of a well-typed term is of kind *
AnnotationSubstitutionConjectured formulation of annotation substitution preservation.SubstituteTCAPreservation of capture-avoiding type substitutionsTermSubstitutionPreservation of substitution on the term levelTypeSubstitutionPreservation of naive type substitutions