Global Information Lookup Global Information

Defunctionalization information


In programming languages, defunctionalization is a compile-time transformation which eliminates higher-order functions, replacing them by a single first-order apply function. The technique was first described by John C. Reynolds in his 1972 paper, "Definitional Interpreters for Higher-Order Programming Languages". Reynolds' observation was that a given program contains only finitely many function abstractions, so that each can be assigned and replaced by a unique identifier. Every function application within the program is then replaced by a call to the apply function with the function identifier as the first argument. The apply function's only job is to dispatch on this first argument, and then perform the instructions denoted by the function identifier on the remaining arguments.

One complication to this basic idea is that function abstractions may reference free variables. In such situations, defunctionalization must be preceded by closure conversion (lambda lifting), so that any free variables of a function abstraction are passed as extra arguments to apply. In addition, if closures are supported as first-class values, it becomes necessary to represent these captured bindings by creating data structures.

Instead of having a single apply function dispatch on all function abstractions in a program, various kinds of control flow analysis (including simple distinctions based on arity or type signature) can be employed to determine which function(s) may be called at each function application site, and a specialized apply function may be referenced instead. Alternatively, the target language may support indirect calls through function pointers, which may be more efficient and extensible than a dispatch-based approach.

Besides its use as a compilation technique for higher-order functional languages, defunctionalization has been studied (particularly by Olivier Danvy and collaborators) as a way of mechanically transforming interpreters into abstract machines. Defunctionalization is also related to the technique from object-oriented programming of representing functions by function objects (as an alternative to closures).

and 14 Related for: Defunctionalization information

Request time (Page generated in 0.5638 seconds.)

Defunctionalization

Last Update:

In programming languages, defunctionalization is a compile-time transformation which eliminates higher-order functions, replacing them by a single first-order...

Word Count : 640

Capsaicin

Last Update:

burning and painful sensations associated with capsaicin result from "defunctionalization" of nociceptor nerve fibers by causing a topical hypersensitivity...

Word Count : 5983

Currying

Last Update:

the dual transformation to currying, and can be seen as a form of defunctionalization. It takes a function f {\displaystyle f} whose return value is another...

Word Count : 5015

Abietane

Last Update:

heated and pressurized in sediments. The first of these patterns is defunctionalization. In particular, the reducing conditions of diagenesis are believed...

Word Count : 1567

Carbonyl reduction

Last Update:

hydrogenolysis. This result is often undesirable because it involves defunctionalization. Some reactions for this transformation include the Clemmensen reduction...

Word Count : 2716

List of programmers

Last Update:

simulation John C. Reynolds – continuations, definitional interpreters, defunctionalization, Forsythe, Gedanken language, intersection types, polymorphic lambda...

Word Count : 3725

CEK Machine

Last Update:

converse derivation (closure conversion, CPS transformation, and defunctionalization) is documented in John Reynolds's article "Definitional Interpreters...

Word Count : 1846

Lobeline

Last Update:

G, Dwoskin LP, Deaciuc AG, Norrholm SD, Crooks PA (August 2005). "Defunctionalized lobeline analogues: structure-activity of novel ligands for the vesicular...

Word Count : 1249

Mutual recursion

Last Update:

self as appropriate. This can be seen as a limited application of defunctionalization. This translation may be useful when any of the mutually recursive...

Word Count : 2013

List of computer scientists

Last Update:

pattern John C. Reynolds – continuations, definitional interpreters, defunctionalization, Forsythe, Gedanken language, intersection types, polymorphic lambda...

Word Count : 5134

Shuttle catalysis

Last Update:

mediated by a transition metal catalyst, which serves to functionalize or defunctionalize a compound of interest. An advantage to this process is that it excludes...

Word Count : 1197

List of programming language researchers

Last Update:

calculus (System F), clarified early work on continuations, introduced defunctionalization, worked on a separation logic, ACM SIGPLAN 2003 PL Achievement Award...

Word Count : 5830

Multitier programming

Last Update:

passing style: Using continuation passing style transformation and defunctionalization, remote calls are implemented by passing the name of a function for...

Word Count : 2772

Jejunoileal bypass

Last Update:

end-to-side technique was used, reflux of bowel content back up the defunctionalized small intestine allowed absorption of some of the refluxed material...

Word Count : 1225

PDF Search Engine © AllGlobal.net