Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Simply typed λ-calculus?

Dikenal juga sebagai: simply typed lambda-calculus

Definition 6.3 University Computer Science — Year 3 · Bab 6 — Type Systems and Type Inference

The simply typed λ\lambda-calculus is the λ\lambda-calculus restricted to terms that have a type under rules var, abs and app, with each parameter annotated by its type and a set of base types.

 x:int⊢x:int var x:int⊢2:intx:int⊢x×2:int op⊢λx:int. x×2:int→int abs\begin{gather*}{\dfrac{{\dfrac{{\dfrac{\ }{x : \mathtt{int} \vdash x : \mathtt{int}}\,\scriptstyle\text{var}} \qquad {\dfrac{\ }{x : \mathtt{int} \vdash 2 : \mathtt{int}}}}{x : \mathtt{int} \vdash x \times 2 : \mathtt{int}}\,\scriptstyle\text{op}}}{\vdash \lambda x{:}\mathtt{int}.\,x \times 2 : \mathtt{int} \to \mathtt{int}}\,\scriptstyle\text{abs}}\end{gather*}
Four judgements, the last four lines of Output 6.1, as a tree. The leaves need no premise: a variable is looked up in the context, a constant has its type.
Baca dalam konteks →