Many properties of parametric,polymorphic functins can be determiend simply by iinspection fo their tyeps.Such results are usually proven using Reynolds's parametricity theorem.However,Reynolds's theorem cna be difficult to show in some settings,particularly ones involving ocmputational effects.I present an alternative thecnique for proving some parametericity results.This technique is considerabley simpler and easily geernalizes to effectful settings.it wroks by instantiating polymorphic functions with singleton types that fully specify the behavior of the functions.using htis techique,I show that callers' stacks re protected from corruption during function calls in Typed Assembly language programs.
展开▼