Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Type safety, progress, preservation?

Ook bekend als: type safety · progress · preservation · canonical form

Definition 6.4 University Computer Science — Year 3 · Hoofdstuk 6 — Type Systems and Type Inference

A type system is safe for a semantics if a well-typed closed program never reaches a stuck term. It is usually proved in two parts. Progress: a closed well-typed term is a value or can take a step. Preservation: if ⊢e:τ\vdash e : \tau and e→e′e \to e', then ⊢e′:τ\vdash e' : \tau. The canonical forms of a type are the shapes of its closed values.

Progress gives each well-typed term a next step unless it is a value; preservation carries the type  to the next term. Together they rule out the one bad outcome, a term that is neither a value nor able to step. A run may still go on forever.
Progress gives each well-typed term a next step unless it is a value; preservation carries the type τ\tau to the next term. Together they rule out the one bad outcome, a term that is neither a value nor able to step. A run may still go on forever.
Lees in het hoofdstuk →