FACTOID # 26: Most Zambians don't live to see their 40th birthday.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Partial evaluation
Programming
evaluation

Eager
Lazy
Partial
Remote
Short-circuit
Strategy Computer programming (often shortened to programming or coding) is the process of writing, testing, and maintaining the source code of computer programs. ... Eager evaluation is the evaluation model in most traditional programming languages. ... In computer programming, lazy evaluation is a technique that attempts to delay computation of expressions until the results of the computation are known to be needed. ... In computer science, remote evaluation is a general term for any technology that involves the transmission of executable software programs from a client computer to a server computer for subsequent exection at the server. ... Short-circuit evaluation or minimal evaluation denotes the semantics of some boolean operators in some programming languages in which the second argument is only executed or evaluated if the first argument does not suffice to determine the value of the expression: when the first argument of and evaluates to false... In computer science, an evaluation strategy is a set of (usually deterministic) rules for determining the evaluation of expressions in a programming language. ...

In computing, partial evaluation is a technique for program optimization by specialization. RAM (Random Access Memory) Look up computing in Wiktionary, the free dictionary. ... In computing, optimization is the process of modifying a system to make some aspect of it work more efficiently or use fewer resources. ... Specialization is an important way to generate propositional knowledge, by applying general knowledge, such as the theory of gravity, to specific instances, such as when I release this apple, it will fall to the floor. Specialization is the opposite of generalization. ...


A computer program is seen as a mapping prog of input data into output data: A computer program is a collection of instructions that describe a task, or set of tasks, to be carried out by a computer. ...

prog: {Istatic, Idynamic} rightarrow O

Istatic, the static data, is the part of the input data known at compile time.


The partial evaluator transforms {prog, Istatic} into prog* i.e. precomputes all static input at compile time. prog* is called the "residual program", and the act of partial evaluation is said to "residualize" prog to prog*.


prog: {Istatic, Idynamic} rightarrow O becomes prog*: Idynamic rightarrow O which in general runs more efficiently.

Contents

Futamura projections

A particularly interesting example of this, first described in the 1970s by Yoshihiko Futamura, is when prog is an interpreter for a programming language. The 1970s decade refers to the years from 1970 to 1979, also called The Seventies. ...


If Istatic is source code designed to run inside said interpreter, then partial evaluation of the interpreter with respect to this data/program produces prog*, a version of the interpreter that only runs that source code, is written in the implementation language of the interpreter, does not require the source code to be resupplied, and runs faster than the original combination of the interpreter and the source. In this case prog* is effectively a compiled version of Istatic.


This technique is known as the first Futamura projection, of which there are three:

  1. Compiling by specializing an interpreter
  2. Compiler generation by self-application
  3. Compiler generator generation by double self-application

References

  • Yoshihiko Futamura. Partial Evaluation of Computation Process -- An Approach to a Compiler-Compiler Systems . Computers . Controls 2(5):45-50, 1971. Reprinted in Higher-Order and Symbolic Computation 12(4):381-391, 1999, with a foreword
  • Charles Consel and Olivier Danvy. Tutorial Notes on Partial Evaluation Proceedings of the Twentieth Annual ACM Symposium on Principles of Programming Languages pp. 493-501, 1993

See also

C++ (pronounced see plus plus, IPA: ) is a general-purpose, programming language with high-level and low-level capabilities. ... Template metaprogramming is a programming technique in which templates are used by a compiler to generate temporary source code, which is merged by the compiler with the rest of the source code and then compiled. ... In computer science, Run-time algorithm specialisation is a methodology for creating efficient algorithms for costly computation tasks of certain kinds. ...

External links

  • Neil D. Jones, Carsten K. Gomard, and Peter Sestoft: Partial Evaluation and Automatic Program Generation (1993) Book, full text available online.
  • partial-eval.org - a large "Online Bibliography of Partial Evaluation Research".
  • 1999 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM'99)
  • C++ Templates as Partial Evaluation, 1999 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM'99)
  • C++ Templates as Partial Evaluation a different version including Catat (pdf)
  • Applying Dynamic Partial Evaluation to dynamic, reflective programming languages

  Results from FactBites:
 
Evaluation strategy - Wikipedia, the free encyclopedia (1293 words)
Under church encoding, eager evaluation of operators maps to strict evaluation of functions; for this reason, strict evaluation is sometimes called "eager".
Under church encoding, lazy evaluation of operators maps to non-strict evaluation of functions; for this reason, non-strict evaluation is sometimes referred to as "lazy".
Optimistic evaluation is another variant of call-by-need in which the function's argument is partially evaluated for some amount of time (which may be adjusted at runtime), after which evaluation is aborted and the function is applied using call-by-need.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.