Todos os livros

Profissional

Apps Sobre Coach Entrar Começar a ler

Computer Science · Glossário

O que é Type safety, progress, preservation?

Também chamado de: type safety · progress · preservation · canonical form

Definition 6.4 University Computer Science — Year 3 · Capítulo 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.
Ler no capítulo →