Jump to content

Typing environment

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by TheseVGF (talk | contribs) at 22:44, 23 October 2024. The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In type theory, a typing environment (or typing context) represents the association between variable names and data types.

More formally, an environment is a set or ordered list of pairs , usually written as , where is a variable and its type.

The judgement

is read as " has type in context ".[1]

For each function body type checks:

Typing Rules Example:

In statically typed programming languages, these environments are used and maintained by typing rules to type check a given program or expression.

See also

[edit]

References

[edit]
  1. ^ "Simply Typed λ-calculus" (PDF).