Subject Reduction
   HOME





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 a 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 In computer science, type safety and type soundness are the extent to which a programming language discourages or prevents type errors. Type safety is sometimes alternatively considered to be a property of facilities of a computer language; that i ... 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 evaluat ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Type Theory
In mathematics and theoretical computer science, a type theory is the formal presentation of a specific type system. Type theory is the academic study of type systems. Some type theories serve as alternatives to set theory as a foundation of mathematics. Two influential type theories that have been proposed as foundations are: * Typed λ-calculus of Alonzo Church * Intuitionistic type theory of Per Martin-Löf Most computerized proof-writing systems use a type theory for their foundation. A common one is Thierry Coquand's Calculus of Inductive Constructions. History Type theory was created to avoid paradoxes in naive set theory and formal logic, such as Russell's paradox which demonstrates that, without proper axioms, it is possible to define the set of all sets that are not members of themselves; this set both contains itself and does not contain itself. Between 1902 and 1908, Bertrand Russell proposed various solutions to this problem. By 1908, Russell arrive ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Evaluation (computer Science)
In some programming languages, eval , short for evaluate, is a function which evaluates a string as though it were an expression in the language, and returns a result; in others, it executes multiple lines of code as though they had been included instead of the line including the eval. The input to eval is not necessarily a string; it may be structured representation of code, such as an abstract syntax tree (like Lisp forms), or of special type such as code (as in Python). The analog for a statement is exec, which executes a string (or code in other format) as if it were a statement; in some languages, such as Python, both are present, while in other languages only one of either eval or exec is. Security risks Using eval with data from an untrusted source may introduce security vulnerabilities. For instance, assuming that the get_data() function gets data from the Internet, this Python code is insecure: session authenticated'= False data = get_data() foo = eval(data) An a ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Expression (computer Science)
In computer science, an expression is a Syntax (programming languages), syntactic entity in a programming language that may be evaluated to determine its value (computer science), value. It is a combination of one or more Constant (programming), constants, variable (programming), variables, function (programming), functions, and operator (programming), operators that the programming language interprets (according to its particular Order of operations, rules of precedence and of Associative property, association) and computes to produce ("to return", in a state (computer science), stateful environment) another value. This process, for mathematical expressions, is called ''evaluation''. In simple settings, the return type, resulting value is usually one of various primitive data type, primitive types, such as string (computer science), string, boolean expression, boolean, or numerical (such as integer (computer science), integer, floating-point number, floating-point, or complex data t ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Type (computer Science)
In computer science and computer programming, a data type (or simply type) is a collection or grouping of data values, usually specified by a set of possible values, a set of allowed operations on these values, and/or a representation of these values as machine types. A data type specification in a program constrains the possible values that an expression, such as a variable or a function call, might take. On literal data, it tells the compiler or interpreter how the programmer intends to use the data. Most programming languages support basic data types of integer numbers (of varying sizes), floating-point numbers (which approximate real numbers), characters and Booleans. Concept A data type may be specified for many reasons: similarity, convenience, or to focus the attention. It is frequently a matter of good organization that aids the understanding of complex definitions. Almost all programming languages explicitly include the notion of data type, though the possible dat ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Haskell (programming Language)
Haskell () is a General-purpose programming language, general-purpose, static typing, statically typed, purely functional programming, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell pioneered several programming language #Features, features such as type classes, which enable type safety, type-safe operator overloading, and Monad (functional programming), monadic input/output (IO). It is named after logician Haskell Curry. Haskell's main implementation is the Glasgow Haskell Compiler (GHC). Haskell's Semantics (computer science), semantics are historically based on those of the Miranda (programming language), Miranda programming language, which served to focus the efforts of the initial Haskell working group. The last formal specification of the language was made in July 2010, while the development of GHC continues to expand Haskell via language extensions. Haskell is used in a ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Progress (type Theory)
Progress is movement towards a perceived refined, improved, or otherwise desired state. It is central to the philosophy of progressivism, which interprets progress as the set of advancements in technology, science, and social organization efficiency – the latter being generally achieved through direct societal action, as in social enterprise or through activism, but being also attainable through natural sociocultural evolution – that progressivism holds all human societies should strive towards. The concept of progress was introduced in the early-19th-century social theories, especially social evolution as described by Auguste Comte and Herbert Spencer. It was present in the Enlightenment's philosophies of history. As a goal, social progress has been advocated by varying realms of political ideologies with different theories on how it is to be achieved. Measuring progress Specific indicators for measuring progress can range from economic data, technical innovations, change ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  



MORE