Simply Typed Lambda-Calculus with a small-step, allocation semantics.
This is an attempt to get a feel for #Twelf with a problem somewhere
between the trivial simply typed lambda-calculus with a large-step
semantics (a Twelf documentation example) and Karl Crary's TALT
formalization (which is too complex to be useful for a novice).
Problems from the basic metatheory of System F<::
1a Transitivity of Subtyping
1b Transitivity of Subtyping with Records
2a Type Safety for Pure F<:
2b Type Safety for with Records and Pattern Matching
3 Testing and Animating with Respect to the Semantics
Problems from the basic metatheory of System F<::
1a Transitivity (559 lines)
1b with Records (1227 lines)
2a Type Safety (745 lines)
2b with Records and Pattern Matching (4176 lines)
Type checking: higher-order abstract syntax, judgments-as-types.
• Unification-based argument synthesis, definition mechanism.
• Logic programming interpretation: backchaining (cf λ-Prolog)
• Coverage and totality checking: a prover for ∀∃ formulae.
tatics via Judgments-as-Types:
• Typing: of : tm → tp → Type.
• Example: arr-I : (x : tm → of x T1 → of (F x) T2) → of (lam F ) (arr T1 T2).
Dynamics via Plotkin’s SOS:
• Transition: step : tm → tm → Type.
• Example: beta : step (ap (lam F ) M) (F M)
https://www.cs.cornell.edu/people/fluet/twelf/alloc-sem/README.txt
https://www.cs.cornell.edu/people/fluet/twelf/
https://www.cs.cmu.edu/~rwh/talks/FP22.pdf