Journal of Universal Computer Science, vol. 5, no. 4 (1999), 243-286 submitted: 12/4/99, accepted: 23/4/99, appeared: 28/4/99 Springer Pub. Co. Automatic Data Restructuring Seymour Ginsburg घComputer Science Department, University of Southern California, Los Angeles, California, 90089 e-mail: ginsburg@p ollux.usc.eduङ Nan C. Shu घIBM Los Angeles Scienti c Center, Los Angeles,Californiaङ Dan A. Simovici घUniversity of Massachusetts at Boston, Department of Mathematics and Computer Science, Boston, Massachusetts 02125 e-mail:
[email protected]ङ Abstract: Data restructuring is often an integral but non-trivial part of informa- tion pro cessing, esp ecially when the data structures are fairly complicated. This pap er describ es the underpinnings of a program, called the Restructurer, that relieves the user of the \thinking and co ding" pro cess normally asso ciated with writing pro cedural programs for data restructuring. The pro cess is accomplished by the Restructurer in two stages. In the rst, the di erences in the input and output data structures are recognized and the applicabilityofvarious transformation rules analyzed. The result is a plan for mapping the sp eci ed input to the desired output. In the second stage, the plan is executed using emb edded knowledge ab out b oth the target language and run-time eciency considerations. The emphasis of this pap er is on the planning stage. The restructuring op erations and the mapping strategies are informally describ ed and explained with mathematical formalism. The notion of solution of a set of instantiated forms with resp ect to an output form is then intro duced.