On the automatic simplification of computer programs
暂无分享,去创建一个
A fact confirmed by experience is that, presented with any program of a certain minimal complexity, an experienced programmer can always improve the program, make it shorter, faster or reduce the amount of temporary storage it needs. Since it may take a person anywhere front minutes to weeks to perform such an improvement, and since experienced programmers are rare, the very practical question arises whether such improvements could be made automatically by a computer program. The question is not whether this could be done in pr inciple-one can always resort to exhaustive procedures like examining all possible programs which fit, into a given memory-bu t whether it is practically feasible. A person certainly does not resort to exhaustive proeedures in simplifying a program. But his way of proceeding is based mainly on a feature which one cannot, at present, hope to incorporate into a simplifying program. He heavily relies on his understanding of the program: He knows the meaning of the variables (or memory locations) occurring, where they are used and where they are "dead." I te knows the structure of data (e.g. that a certain region of memmT contains a square matrix). And finally, he has a large lore of mathematical identities at his disposal which he can readily use to transform expressions. We make no a t tempt here to automate this kind of program simplification, and we restrict ourselves to those simplifications which depend on the form of the program only, i.e. can be detected and proved to lead to an equivalent
[1] Joseph D. Rutledge. On Ianov's Program Schemata , 1964, JACM.