8. Type Systems Flashcards
What is the purpose of a type system?
Reduce bugs by checking for logic errors. (e.g. adding an integer to a string)
In addition to being useful in and of itself, type systems also make possible dataflow analysis, symbolic execution, etc.
What is a type?
A type is an abstraction that represents a set of concrete values.
What is an inference rule schema vs an axiom schema?
An inference rule schema has more than 0 hypotheses whereas an axiom schema does not.
What is a free variable?
An environment gives a type for free variables.
A variable is free in an expression if not defined within the expression; otherwise it is bound.
An environment is a function from variables to types.