Lecture B2
Lecture B2
Lecture B2
Lecture B2
Holger Hermanns
by Gert Smolka
- Programmer produces character representation.
- Typing judgements
Assume : and f : ∗ → .
Assume : and f : ∗ → .
[ : ,f: ∗ → ]
- Environments are functional. ... in that they describe a partial function from identifiers to types.
[ : , : ] , (z : )=[ : , : , : ]
[ : , : ] , ( : bool) , ( : ) = [ : bool, : , : ]
Assume E = [ : ,f: ∗ → ].
Another example:
Another example:
Assume E = [ : ,f: ∗ → ].
has type t
if e1 has type t1 in E,
and e2 has type t in E
where x is updated to have type t1.
has type t
if e2 has type t in E
where f is updated to have type t1 →t2
and e1 has type t2 in E
where f is updated to have type t1 →t2 , and
where x is updated to have type t1.
2) Type checking.
Works with
syntax tree
- unique representation
- no parentheses
Works with
syntax tree
- unique representation
- no parentheses
The interpreter collects information about identifiers declared upfront in a value environment.