GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

Subject reduction

In type theory, a type system has the property of subject reduction (also subject evaluation, type preservation or simply preservation) if evaluation of expressions does not cause their type to change. Formally, if ⊢ e 1 : τ and e 1 → e 2 then ⊢ e 2 : τ. Intuitively, this means one would not like to write an expression, in say Haskell, of type Int, and have it evaluate to a value v, only to find out that v is a string. Together with progress, it is an important meta-theoretical property for establishing type soundness of a type system. The opposite property, if Γ ⊢ e 2 : τ and e 1 → e 2 then Γ ⊢ e 1 : τ, is called subject expansion. It often does not hold as evaluation can erase ill-typed... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

In type theory, a type system has the property of subject reduction (also subject evaluation, type preservation or simply preservation) if evaluation of expressions does not cause their type to change. Formally, if ⊢ e 1 : τ and e 1 → e 2 then ⊢ e 2 : τ. Intuitively, this means one would not like to write an expression, in say Haskell, of type Int, and have it evaluate to a value v, only to find out that v is a string. Together with progress, it is an important meta-theoretical property for establishing type soundness of a type system. The opposite property, if Γ ⊢ e 2 : τ and e 1 → e 2 then Γ ⊢ e 1 : τ, is called subject expansion. It often does not hold as evaluation can erase ill-typed sub-terms of an expression, resulting in a well-typed one.

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Subject reduction". 1760190016. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1316290562

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·