{"_id":"SLYw4y8xbz68bqyWv","bibbaseid":"marriott-sndergaard-differencelisttransformationforprolog-1993","author_short":["Marriott, K.","Søndergaard, H."],"bibdata":{"bibtype":"article","type":"article","author":[{"firstnames":["Kim"],"propositions":[],"lastnames":["Marriott"],"suffixes":[]},{"firstnames":["Harald"],"propositions":[],"lastnames":["Søndergaard"],"suffixes":[]}],"title":"Difference-List Transformation for Prolog","journal":"New Generation Computing","volume":"11","number":"2","pages":"125–157","year":"1993","doi":"10.1007/BF03037156","abstract":"Difference-lists are terms that represent lists. The use of difference-lists can speed up most list-processing programs considerably. Prolog programmers routinely use ``difference-list versions'' of programs, but very little investigation has taken place into difference-list transformation. Thus, to most programmers it is either unknown that the use of difference-lists is far from safe in all contexts, or else this fact is known but attributed to Prolog's infamous ``occur check problem.'' In this paper we study the transformation of list-processing programs into programs that use difference-lists. In particular we are concerned with finding circumstances under which the transformation is safe. We show that dataflow analysis can be used to determine whether the transformation is applicable to a given program, thereby allowing for automatic transformation. We prove that our transformation preserves strong operational equivalence.","keywords":"Program transformation, Static analysis, Logic programming, Prolog","bibtex":"@Article{Mar-Son_NGC93,\n author = {Kim Marriott and \n\t\tHarald S{\\o}ndergaard},\n title\t = {Difference-List Transformation for {Prolog}},\n journal = {New Generation Computing},\n volume = {11},\n number = {2},\n pages = {125--157}, \n year\t = {1993},\n doi = {10.1007/BF03037156},\n abstract = {Difference-lists are terms that represent lists.\n\t\tThe use of difference-lists can speed up most list-processing \n\t\tprograms considerably. Prolog programmers routinely use \n\t\t``difference-list versions'' of programs, but very little \n\t\tinvestigation has taken place into difference-list \n\t\ttransformation. Thus, to most programmers it is either \n\t\tunknown that the use of difference-lists is far from safe in \n\t\tall contexts, or else this fact is known but attributed to \n\t\tProlog's infamous ``occur check problem.'' In this paper we \n\t\tstudy the transformation of list-processing programs into \n\t\tprograms that use difference-lists. In particular we are \n\t\tconcerned with finding circumstances under which the \n\t\ttransformation is safe. We show that dataflow analysis can \n\t\tbe used to determine whether the transformation is applicable \n\t\tto a given program, thereby allowing for automatic \n\t\ttransformation. We prove that our transformation preserves \n\t\tstrong operational equivalence.},\n keywords = {Program transformation, Static analysis, Logic programming, Prolog},\n}\n\n","author_short":["Marriott, K.","Søndergaard, H."],"key":"Mar-Son_NGC93","id":"Mar-Son_NGC93","bibbaseid":"marriott-sndergaard-differencelisttransformationforprolog-1993","role":"author","urls":{},"keyword":["Program transformation","Static analysis","Logic programming","Prolog"],"metadata":{"authorlinks":{}},"html":""},"bibtype":"article","biburl":"https://people.eng.unimelb.edu.au/harald/bibbase.bib","dataSources":["yWvm3kzg5vKQAPLm7","ofmsZryxNDBSpE7j5","9aC4cxLD8D6oJ3FLN","wpkuJrZJJtqra3FbL","W7ih7WyQivP4EDh83","BNGFBQQncqevukxoe","q5pWX4XZgAS4TQBof","yb3uN577XrYa7qf57","9jmvjAEoFta6emcgS","XqcrNTrCCBr9mSd37"],"keywords":["program transformation","static analysis","logic programming","prolog"],"search_terms":["difference","list","transformation","prolog","marriott","søndergaard"],"title":"Difference-List Transformation for Prolog","year":1993}