Recursive programming through table look-up
暂无分享,去创建一个
The maintenance of arbitrarily large tables of previously computed values for functions on integer domains becomes practical when those tables are built using constructor functions which suspend evaluation of their arguments. Two styles of programming with such tables are presented. The first results from replacing recursive invocations within standard recursive function definitions with a reference into a table which is predefined to be all the possible results of the function. The second, more sophisticated, style requires that the table be defined strictly through a generation scheme. In either case the table may be available to the user as a data structure exclusive of the function definition with entries still being manifested only when they are actually used.
[1] Gérard Berry. Bottom-Up Computation of Recursive Programs , 1976, RAIRO Theor. Informatics Appl..
[2] John McCarthy,et al. Recursive functions of symbolic expressions and their computation by machine, Part I , 1960, Commun. ACM.
[3] Daniel P. Friedman,et al. CONS Should Not Evaluate its Arguments , 1976, ICALP.
[4] Peter Henderson,et al. A lazy evaluator , 1976, POPL.
[5] William H. Burge,et al. Recursive Programming Techniques , 1975 .