The declaration (if any) of an identifier use.
The environment of an expression is the list of variable names that are visible in that expression and their types.
The variables that are free in the given expression.
For a given variable reference, return the lambda node that binds it if there is one, otherwise return None.
The type of an expression.
The type of an expression. Checks constituent names and types. Uses the env attribute to get the bound variables and their types.
The type of an expression.
The type of an expression. Checks constituent names and types. Uses the lookup attribute to get the lambda node that binds a name. For other cases it behaves like tipe.
Analyses for typed lambda calculus expressions. A simple free variable analysis plus name and type analysis. There are two versions of the latter here: one (tipe) that constructs an explicit environment separate from the AST, and one (tipe2) that represents names by references to the nodes of their binding lambda expressions.