Explore chapters and articles related to this topic
Simple type system for call-by-value calculus with first-class continuations and environments
Published in Shin-ya Nishizaki, Masayuki Numao, Jaime Caro, Merlin Teodosia Suarez, Theory and Practice of Computation, 2019
As future works, there are several issues on theoretical study of our calculus. First, we should show the strong normalization theorem, which means that there is no infinite reduction path for every typed term. Second, we should study other kinds of reduction strategy, such as call-by-name and call-by-need. In the call-by-value evaluation strategy, the bound values in an environment are values, which makes the calculus simpler. However, call-by-name and call-by need evaluation strategies are the theoretical basis of the lazy funcitonal languages such as Haskell.
Mixed-language automatic differentiation
Published in Optimization Methods and Software, 2018
Valérie Pascual, Laurent Hascoët
Inside a given language, parameter-passing may use one of a few classical strategies: call by value, call by reference, call by value-result, call by sharing, call by name, etc. Call by value is the most common strategy. In call by value, the argument expression is evaluated, and the resulting value is copied to the corresponding variable in the function. If the called function overwrites one of its formal arguments, this affects only a local copy of the actual argument, so that the argument passed into the function call is unchanged when the function returns. In call by reference, a procedure receives a reference to a variable and can therefore modify the variable passed as actual argument. Call by value-result, also named call by copy-restore, is a special case of call by reference. It differs from call by reference when two arguments alias one another. Under call by reference, writing to one will affect the other. Call by value-result gives the function distinct copies, but the result in the callers' environment depends on which of the aliased arguments is copied back first. Call by sharing is a terminology used by languages such as Python, Java, and other object-oriented languages. It is analogous to call by value where the passed value is either the argument when it is of a primitive type or its address when it is an object. Call by name is a strategy where each occurrence of the formal argument is replaced with the actual argument in the style of macro-expansion. This paper only focuses on the parameter-passing strategies used by Fortran and C.