Type Systems Flashcards
Hypotheses
state facts about sub-expressions
Conclusions
state facts about entire expression
Free variables
if not defined within the expression
Bound variables
defined within the expression
An environment
is a function from variables to types. Maps variables to types.
Sound analysis
verifies absence of a class of errors
False positives
always terminates must occasionally generate spurious errors or
warnings
False negatives
failed to detect errors
Side conditions
They are constraints that must be solved – that is, satisfied – in
order to verify that the inference rule is properly applied.
Abstract values
+, 0, - (Sets), TOP {all integers}, BOT = {}
Flow insensitive analysis
independent of ordering of sub-expressions - analysis result unaffected by permuting statements
Usually very efficient and scalable
Cane be imprecise
Flow-sensitive
analysis of sub-expressions ordered by environments - analysis result depends on order of statements