In a programming language, an evaluation strategy is a set of rules for evaluating expressions.[1] The term is often used to refer to the more specific notion of a parameter-passing strategy[2] that defines the kind of value that is passed to the function for each parameter (the binding strategy)[3] and whether to evaluate the parameters of a function call, and if so in what order (the evaluation order).[4] The notion of reduction strategy is distinct,[5] although some authors conflate the two terms and the definition of each term is not widely agreed upon.[6]
To illustrate, executing a function call f(a,b) may first evaluate the arguments a and b, store the results in references or memory locations ref_a and ref_b, then evaluate the function's body with those references passed in. This gives the function the ability to look up the argument values, to modify them via assignment as if they were local variables, and to return values via the references. This is the call-by-reference evaluation strategy.[7]
Evaluation strategy is part of the semantics of the programming language definition. Some languages, such as PureScript, have variants with different evaluation strategies. Some declarative languages, such as Datalog, support multiple evaluation strategies. Some languages define a calling convention.[clarification needed]
^Araki, Shota; Nishizaki, Shin-ya (November 2014). "Call-by-name evaluation of RPC and RMI calculi". Theory and Practice of Computation. p. 1. doi:10.1142/9789814612883_0001. ISBN 978-981-4612-87-6. Retrieved 21 August 2021.
^Turbak, Franklyn; Gifford, David (18 July 2008). Design Concepts in Programming Languages. MIT Press. p. 309. ISBN 978-0-262-30315-6.
^Crank, Erik; Felleisen, Matthias (1991). "Parameter-passing and the lambda calculus". Proceedings of the 18th ACM SIGPLAN-SIGACT symposium on Principles of programming languages - POPL '91. p. 2. CiteSeerX 10.1.1.23.4385. doi:10.1145/99583.99616. ISBN 0897914198. S2CID 5782416.
^Wilhelm, Reinhard; Seidl, Helmut (10 November 2010). Compiler Design: Virtual Machines. Springer Science & Business Media. p. 61. ISBN 978-3-642-14909-2.
^Nita, Stefania Loredana; Mihailescu, Marius (2017). "Introduction". Practical Concurrent Haskell. p. 3. doi:10.1007/978-1-4842-2781-7_1. ISBN 978-1-4842-2780-0.
^Pierce, Benjamin C. (2002). Types and Programming Languages. MIT Press. p. 56. ISBN 0-262-16209-1.
^Daniel P. Friedman; Mitchell Wand (2008). Essentials of Programming Languages (third ed.). Cambridge, MA: The MIT Press. ISBN 978-0262062794.
and 20 Related for: Evaluation strategy information
In a programming language, an evaluationstrategy is a set of rules for evaluating expressions. The term is often used to refer to the more specific notion...
Robert Stake's Responsive Evaluation. Responsive evaluation provides a naturalistic and humanistic approach to program evaluation. In expanding beyond the...
deduced. Naïve evaluation produces the entire minimal model of the program. Semi-naïve evaluation is a bottom-up evaluationstrategy that can be asymptotically...
evaluation, or call-by-need, is an evaluationstrategy which delays the evaluation of an expression until its value is needed (non-strict evaluation)...
forwarding. The evaluationstrategy of futures, which may be termed call by future, is non-deterministic: the value of a future will be evaluated at some time...
non-strict evaluation, an evaluationstrategy where the arguments to a function are not immediately evaluated. This form of non-strict evaluation is also...
is of value." From this perspective, evaluation "is a contested term", as "evaluators" use the term evaluation to describe an assessment, or investigation...
(1993). Partial Evaluation and Automatic Program Generation. Prentice Hall. ISBN 9780130202499. Danvy, O., ed. (1999). "Partial Evaluation and Semantics-Based...
Risk Evaluation and Mitigation Strategies (REMS) is a program of the US Food and Drug Administration for the monitoring of medications with a high potential...
Simon Peyton; Ennals, Robert (1 August 2003). "Optimistic Evaluation: a fast evaluationstrategy for non-strict programs". Retrieved 15 May 2019 – via www...
to refer to an evaluationstrategy. Formally, for an abstract rewriting system ( A , → ) {\displaystyle (A,\to )} , a reduction strategy → S {\displaystyle...
defined as having a strict evaluationstrategy, although there are non-conforming back ends which implement a lazy evaluationstrategy. PureScript was initially...
practitioners can make more informed decisions about strategy and tactics. As monitoring and evaluation data become available, stakeholders can periodically...
produced a series of lazy evaluation programming languages in which some variant of call-by-name is the standard evaluationstrategy. Compilers for these languages...
the client. Remote evaluation belongs to the family of mobile code, within the field of code mobility. An example for remote evaluation is grid computing:...
that evaluation (β-reduction) can be carried out in any order, even in parallel. This means that various nondeterministic evaluationstrategies are relevant...
seconds, this expression should always evaluate to a true value. Unfortunately, this can depend on the order of evaluation. When seconds changes, two expressions...
programs are evaluated, since eager evaluation will return the same result as lazy evaluation. However, it is still possible that an eager evaluation may not...
James; Mintzberg, Henry; James, Robert M. (1988). "The Evaluation of Business Strategy". The strategy process: concepts, contexts, and cases. Englewood Cliffs...