Equivalent transformation has been proposed as a methodology for providing programs with appropriate data structures. For instance, logic programs which use lists are transformed into equivalent programs that use difference-lists. However lists and difference-lists are both usual terms and in this sense no new data structures are introduced in the transformation. Since logic programming has fixed data structure called terms, no one can develop theoretical foundations for introducing new data structures into programs as far as only logic programs are discussed. In this paper we develop a theoretical foundation of equivalent transformation that introduces new data structures. We introduce a parameter G for data structures, by which many languages with different data structures are characterized. By changing this parameter (say from G1 to G2) we can discuss data structure change for programs. We define a concept ofsaf e extension ofdata structures, and prove that the meaning ofa program on a data structure is preserved by safe extension of the data structure.
[1]
Christopher J. Hogger,et al.
Compiling Associativity into Logic Programs
,
1987,
J. Log. Program..
[2]
John Wylie Lloyd,et al.
Foundations of Logic Programming
,
1987,
Symbolic Computation.
[3]
Kiyoshi Akama,et al.
Semantic Interpretation of Natural Language Descriptions by Program Transformation.
,
1995
.
[4]
Hassan Aït-Kaci,et al.
LOGIN: A Logic Programming Language with Built-In Inheritance
,
1986,
J. Log. Program..
[5]
Pascal Van Hentenryck.
Constraint satisfaction in logic programming
,
1989,
Logic programming.
[6]
J. Zhang,et al.
An Automatic Difference-List Transformation Algorithm for Prolog
,
1988,
ECAI.
[7]
Alberto Pettorossi,et al.
Transformation of Logic Programs: Foundations and Techniques
,
1994,
J. Log. Program..
[8]
J. W. Lloyd,et al.
Foundations of logic programming; (2nd extended ed.)
,
1987
.
[9]
Niklaus Wirth,et al.
Algorithms + Data Structures = Programs
,
1976
.