0%

Words starting with referentialint

Unfortunately we didn’t found any matching words.
Maybe these words will be useful:
  • referentiality — the quality or state of being referential or containing references
  • referential integrity — (database)   A collection of properties which should be possessed by data in a relational database. For example, in a database of family members, if we enter A as a spouse of B, we should also enter B as a spouse of A. Similarly, if we remove one end of the relationship we should also remove the other.
  • referential transparency — (programming)   An expression E is referentially transparent if any subexpression and its value (the result of evaluating it) can be interchanged without changing the value of E. This is not the case if the value of an expression depends on global state which can change value. The most common example of changing global state is assignment to a global variable. For example, if y is a global variable in: f(x) { return x+y; } g(z) { a = f(1); y = y + z; return a + f(1); } function g has the "side-effect" that it alters the value of y. Since f's result depends on y, the two calls to f(1) will return different results even though the argument is the same. Thus f is not referentially transparent. Changing the order of evaluation of the statements in g will change its result. We could make f above referentially transparent by passing in y as an argument: f(x, y) = x+y Similarly, g would need to take y as an argument and return its new value as part of the result: g(z, y) { a = f(1, y); y' = y+z; return (a + f(1, y'), y'); } Referentially transparent programs are more amenable to formal methods and easier to reason about because the meaning of an expression depends only on the meaning of its subexpressions and not on the order of evaluation or side-effects of other expressions. We can stretch the concept of referential transparency to include input and output if we consider the whole program to be a function from its input to its output. The program as a whole is referentially transparent because it will always produce the same output when given the same input. This is stretching the concept because the program's input may include what the user types, the content of certain files or even the time of day. If we do not consider global state like the contents of files as input, then writing to a file and reading what was written behaves just like assignment to a global variable. However, if we must consider the state of the universe as an input rather than global state then any deterministic system would be referentially transparent! See also extensional equality, observational equivalence.
  • referentially transparent — referential transparency
  • referential — having reference: referential to something.
  • referentially — having reference: referential to something.