http:^^www.cs.cornell.edu^info^people^tt^research^incremental-computation^derivation.html
来自「This data set contains WWW-pages collect」· HTML 代码 · 共 166 行
HTML
166 行
MIME-Version: 1.0
Server: CERN/3.0
Date: Sunday, 24-Nov-96 21:33:34 GMT
Content-Type: text/html
Content-Length: 6703
Last-Modified: Wednesday, 06-Mar-96 16:34:02 GMT
<TITLE>Incremental Compuation: Deriving Incremental Programs</TITLE><H2>Deriving Incremental Programs</H2><P> <HR> <P><h3>Objectives</h3><OL><li> We are engaged in an ambitious effort to <i>derive</i> incrementalprograms automatically (or semi-automatically) fromnon-incremental programs written in standard programming languages.This approach contrasts with our earlier approaches that aimed toincrementally <i>evaluate</i> non-incremental programs.<p> <LI> In essence, every program computes by fixed-point iteration,expressed as recursive functions or loops. This is why loopoptimizations are so important. A loop body can be regarded as aprogram <i>f</i> parameterized by an induction variable <i>x</i> thatis incremented on each iteration by a change operation <i>+</i>.Efficient iterative computation relies on effective use of state,i.e., computing the result of each iteration using stored results ofprevious iterations. This is why strength reduction and relatedtechniques are crucial for performance.<p> <LI> Given a program <i>f</i> and an input change operation<i>+</i>, a program <i>f'</i> that computes <i>f(x+y)</i> efficientlyby using the result of the previous computation of <i>f(x)</i> iscalled an <i>incremental version</i> of <i>f</i> under <i>+</i>.Sometimes, information other than the result of <i>f(x)</i> needs tobe maintained and used for efficient incremental computation of<i>f(x+y)</i>. We call a function that computes such information an<i>extended version</i> of <i>f</i>. Thus, the goal of computingloops efficiently corresponds to constructing an extended version of aprogram <i>f</i> and deriving an incremental version of the extendedversion under an input change operation <i>+</i>.<p> <li> In general, incremental computation aims to solve a problemon a sequence of inputs that differ only slightly from one another,making use of the previously computed output in computing a newoutput, instead of computing the new output from scratch. Incrementalcomputation is a fundamental issue relevant throughout computersoftware, e.g., optimizing compilers, transformational programdevelopment, and interactive systems.</OL><P> <HR> <P><h3>Results</h3><P><!Comment: following is an ordered list ><!Comment: each new item in the list starts with a 'LI' at the left margin ><OL><li> Thus far, we have partitioned the problem of deriving incrementalprograms into three subproblems:<p><ul><li> <b>P1.</b> Exploiting the <i>result</i>, i.e., the return value,of <i>f(x)</i>. <p><li> <b>P2.</b> Caching, maintaining, and exploiting <i>intermediateresults</i> of the computation <i>f(x)</i>.<p><li> <b>P3.</b> Discovering, computing, maintaining, and exploiting<i>auxiliary information</i> about <i>x</i>, i.e., information notcomputed by <i>f(x)</i>.</ul><p>We summarize here the essence of our methods:<p><li><b>P1.</b> In <ahref="ftp://ftp.cs.cornell.edu/pub/yanhong/Inc-SCP95.ps.Z">"Systematic Derivation of Incremental Programs"</a>,we gave a systematic transformational approach for deriving anincremental version <i>f'</i> of a program <i>f</i> under an inputchange <i>+</i>. The basic idea is to identify in the computation of<i>f(x+y)</i> those subcomputations that are also performed in thecomputation of <i>f(x)</i> and whose values can be retrieved from thecached result <i>r</i> of <i>f(x)</i>. The computation of<i>f(x+y)</i> is symbolically transformed to avoid re-performing thesesubcomputations by replacing them with corresponding retrievals. Thisefficient way of computing <i>f(x+y)</i> is captured in the definitionof <i>f'(x,y,r)</i>.<p> <li><b>P2.</b> In <a href="ftp://ftp.cs.cornell.edu/pub/yanhong/Cir-PEPM95.ps.Z">"Caching Intermediate Results for Program Improvement"</a>,we gave a method, called <i>cache-and-prune</i>, for staticallytransforming programs to cache all intermediate results useful forincremental computation. The basic idea is to (I) extend the program<i>f</i> to a program <i>f-bar</i> that returns all intermediateresults, (II) incrementalize the program <i>f-bar</i> under <i>+</i>to obtain an incremental version <i>f-bar'</i> of <i>f-bar</i> usingour method for P1, and (III) analyze the dependencies in<i>f-bar'</i>, then prune the extended program <i>f-bar</i> to aprogram <i>f-hat</i> that returns only the useful intermediateresults, and prune the program <i>f-bar'</i> to obtain a program<i>f-hat'</i> that incrementally maintains only the usefulintermediate results.<p><p> <li><b>P3.</b> In <a href="ftp://ftp.cs.cornell.edu/pub/yanhong/Dai-POPL96.ps.Z">"Discovering Auxiliary Information for Incremental Computation"</a>,we proposed a novel approach for finding auxiliary information.Auxiliary information is, by definition, useful information about<i>x</i> that is <i>not</i> computed by <i>f(x)</i>. Where, then, canone find it? The key insight of our proposal is: <p> <ul><b>A.</b> Consider, as candidate auxiliary information for <i>f</i>, allintermediate computations of an incremental version of <i>f</i> thatdepend only on <i>x</i>; such an incremental version can be obtainedusing some techniques we developed for solving P1 andP2. (We use techniques developed for solving P1 and P2,instead of just P1, so that the candidate auxiliary informationincludes auxiliary information useful for efficiently maintainingthe intermediate results.)</ul><p>How can one discover which pieces of candidate auxiliary informationare useful and how they can be used? We proposed:<p><ul><b>B.</b> Extend <i>f</i> with all candidate auxiliaryinformation, then apply some techniques used in our methods for P1 andP2 to obtain an extended version and an incremental extended versionthat together compute, exploit, and maintain only useful intermediateresults and useful auxiliary information. </ul><p><li>Thus, on the one hand, one can regard the method for P3 as anextension to methods for P1 and P2. On the other hand, one can regardmethods for P1 and P2 (suitably revised for their differentapplications here) as aids for solving P3. The modular componentscomplement one another to form a comprehensive principled approach forincremental computation and therefore also for efficient iterativecomputation generally. Although the entire approach seems complex,each module or step is simple.<p><li>In <a href="ftp://ftp.cs.cornell.edu/pub/yanhong/Cachet-KBSE95.ps.Z">"CACHET: An Interactive, Incremental-Attribution-Based ProgramTransformation System For Deriving Incremental Programs"</a>we describe our prototype implementation of these ideas.</OL><P> <HR> <P>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?