Semantics-Based Analysis and Transformation of Logic Programs. Søndergaard, H. Ph.D. Thesis, University of Copenhagen, Denmark, 1989. Also available as: Technical Report 89/21, Department of Computer Science, The University of Melbourne, 1990, DIKU Report 89/22, Department of Computer Science, University of Copenhagen, 1990, and Technical Report #12, Key Center for Knowledge Based Systems, RMIT and the University of Melbourne, 1990abstract bibtex Dataflow analysis is an essential component of many programming tools. One use of dataflow information is to identify errors in a program, as done by program ``debuggers'' and type checkers. Another is in compilers and other program transformers, where the analysis may guide various optimisations. The correctness of a programming tool's dataflow analysis component is usually of paramount importance. The theory of abstract interpretation, originally developed by P. and R. Cousot aims at providing a framework for the development of correct analysis tools. In this theory, dataflow analysis is viewed as ``non-standard'' semantics, and abstract interpretation prescribes certain relations between standard and non-standard semantics, in order to guarantee the correctness of the non-standard semantics with respect to the standard semantics. The increasing acceptance of Prolog as a practical programming language has motivated widespread interest in dataflow analysis of logic programs and especially in abstract interpretation. Logic programmming languages are attractive from a semantical point of view, but dataflow analysis of logic programs is more complex than that of more traditional programming languages, since dataflow is bi-directional (owing to unification) and control flow is in terms of backtracking. The present thesis is concerned with semantics-based dataflow analysis of logic programs. We first set up a theory for dataflow analysis which is basically that of abstract interpretation as introduced by P. and R. Cousot. We do, however, relax the classical theory of abstract interpretation somewhat, by giving up the demand for (unique) best approximations. Two different kinds of analysis of logic programs are then identified: a bottom-up analysis yields an approximation to the success set (and possibly the failure set) of a program, whereas a top-down analysis yields an approximation to the call patterns that would appear during an execution based on SLD resolution. We investigate some of the uses of the two kinds of analysis. In the bottom-up case, we pay special attention to (bottom-up) type inference and its use in program specialisation. In the top-down case, we present a generic ``dataflow semantics'' that encompasses many useful dataflow analyses. As an instance of the generic semantics, a groundness analysis is detailed, and a series of other applications are mentioned. We finally present a transformation technique, based on top-down analysis, for introducing difference-lists in a list-manipulating program, without changing the program's semantics. This may lead to substantial improvement in a program's execution time.
@Phdthesis{Son_phd89,
author = {Harald S{\o}ndergaard},
title = {Semantics-Based Analysis and Transformation of Logic Programs},
school = {University of Copenhagen, Denmark},
year = {1989},
note = {Also available as: Technical Report 89/21,
Department of Computer Science,
The University of Melbourne, 1990,
DIKU Report 89/22, Department of Computer Science,
University of Copenhagen, 1990,
and Technical Report \#12,
Key Center for Knowledge Based Systems,
RMIT and the University of Melbourne, 1990},
abstract = {Dataflow analysis is an essential component of many programming
tools. One use of dataflow information is to identify errors in
a program, as done by program ``debuggers'' and type checkers.
Another is in compilers and other program transformers, where
the analysis may guide various optimisations.
The correctness of a programming tool's dataflow analysis
component is usually of paramount importance. The theory of
abstract interpretation, originally developed by P. and R.
Cousot aims at providing a framework for the development of
correct analysis tools. In this theory, dataflow analysis is
viewed as ``non-standard'' semantics, and abstract
interpretation prescribes certain relations between standard
and non-standard semantics, in order to guarantee the
correctness of the non-standard semantics with respect to the
standard semantics.
The increasing acceptance of Prolog as a practical programming
language has motivated widespread interest in dataflow analysis
of logic programs and especially in abstract interpretation.
Logic programmming languages are attractive from a semantical
point of view, but dataflow analysis of logic programs is more
complex than that of more traditional programming languages,
since dataflow is bi-directional (owing to unification) and
control flow is in terms of backtracking.
The present thesis is concerned with semantics-based dataflow
analysis of logic programs. We first set up a theory for
dataflow analysis which is basically that of abstract
interpretation as introduced by P. and R. Cousot. We do,
however, relax the classical theory of abstract interpretation
somewhat, by giving up the demand for (unique) <i>best</i>
approximations.
Two different kinds of analysis of logic programs are then
identified: a <i>bottom-up</i> analysis yields an approximation
to the success set (and possibly the failure set) of a program,
whereas a <i>top-down</i> analysis yields an approximation to
the call patterns that would appear during an execution based
on SLD resolution. We investigate some of the uses of the two
kinds of analysis. In the bottom-up case, we pay special
attention to (bottom-up) type inference and its use in program
specialisation. In the top-down case, we present a generic
``dataflow semantics'' that encompasses many useful dataflow
analyses. As an instance of the generic semantics, a groundness
analysis is detailed, and a series of other applications are
mentioned.
We finally present a transformation technique, based on
top-down analysis, for introducing difference-lists in a
list-manipulating program, without changing the program's
semantics. This may lead to substantial improvement in a
program's execution time.},
keywords = {Abstract interpretation, Abstract domains, Logic programming, Semantics, Many-valued logic, Unification, Groundness analysis, Program transformation},
}
Downloads: 0
{"_id":"5bwwzLTsS5Zdqv4MF","bibbaseid":"sndergaard-semanticsbasedanalysisandtransformationoflogicprograms-1989","author_short":["Søndergaard, H."],"bibdata":{"bibtype":"phdthesis","type":"phdthesis","author":[{"firstnames":["Harald"],"propositions":[],"lastnames":["Søndergaard"],"suffixes":[]}],"title":"Semantics-Based Analysis and Transformation of Logic Programs","school":"University of Copenhagen, Denmark","year":"1989","note":"Also available as: Technical Report 89/21, Department of Computer Science, The University of Melbourne, 1990, DIKU Report 89/22, Department of Computer Science, University of Copenhagen, 1990, and Technical Report #12, Key Center for Knowledge Based Systems, RMIT and the University of Melbourne, 1990","abstract":"Dataflow analysis is an essential component of many programming tools. One use of dataflow information is to identify errors in a program, as done by program ``debuggers'' and type checkers. Another is in compilers and other program transformers, where the analysis may guide various optimisations. The correctness of a programming tool's dataflow analysis component is usually of paramount importance. The theory of abstract interpretation, originally developed by P. and R. Cousot aims at providing a framework for the development of correct analysis tools. In this theory, dataflow analysis is viewed as ``non-standard'' semantics, and abstract interpretation prescribes certain relations between standard and non-standard semantics, in order to guarantee the correctness of the non-standard semantics with respect to the standard semantics. The increasing acceptance of Prolog as a practical programming language has motivated widespread interest in dataflow analysis of logic programs and especially in abstract interpretation. Logic programmming languages are attractive from a semantical point of view, but dataflow analysis of logic programs is more complex than that of more traditional programming languages, since dataflow is bi-directional (owing to unification) and control flow is in terms of backtracking. The present thesis is concerned with semantics-based dataflow analysis of logic programs. We first set up a theory for dataflow analysis which is basically that of abstract interpretation as introduced by P. and R. Cousot. We do, however, relax the classical theory of abstract interpretation somewhat, by giving up the demand for (unique) <i>best</i> approximations. Two different kinds of analysis of logic programs are then identified: a <i>bottom-up</i> analysis yields an approximation to the success set (and possibly the failure set) of a program, whereas a <i>top-down</i> analysis yields an approximation to the call patterns that would appear during an execution based on SLD resolution. We investigate some of the uses of the two kinds of analysis. In the bottom-up case, we pay special attention to (bottom-up) type inference and its use in program specialisation. In the top-down case, we present a generic ``dataflow semantics'' that encompasses many useful dataflow analyses. As an instance of the generic semantics, a groundness analysis is detailed, and a series of other applications are mentioned. We finally present a transformation technique, based on top-down analysis, for introducing difference-lists in a list-manipulating program, without changing the program's semantics. This may lead to substantial improvement in a program's execution time.","keywords":"Abstract interpretation, Abstract domains, Logic programming, Semantics, Many-valued logic, Unification, Groundness analysis, Program transformation","bibtex":"@Phdthesis{Son_phd89,\n author = {Harald S{\\o}ndergaard},\n title\t = {Semantics-Based Analysis and Transformation of Logic Programs},\n school = {University of Copenhagen, Denmark},\n year\t = {1989},\n note\t = {Also available as: Technical Report 89/21,\n\t\tDepartment of Computer Science, \n\t\tThe University of Melbourne, 1990,\n\t\tDIKU Report 89/22, Department of Computer Science, \n\t\tUniversity of Copenhagen, 1990,\n\t\tand Technical Report \\#12,\n\t\tKey Center for Knowledge Based Systems,\n\t\tRMIT and the University of Melbourne, 1990},\n abstract = {Dataflow analysis is an essential component of many programming \n\t\ttools. One use of dataflow information is to identify errors in\n\t\ta program, as done by program ``debuggers'' and type checkers.\n\t\tAnother is in compilers and other program transformers, where \n\t\tthe analysis may guide various optimisations.\n\n\t\tThe correctness of a programming tool's dataflow analysis \n\t\tcomponent is usually of paramount importance. The theory of \n\t\tabstract interpretation, originally developed by P. and R. \n\t\tCousot aims at providing a framework for the development of \n\t\tcorrect analysis tools. In this theory, dataflow analysis is \n\t\tviewed as ``non-standard'' semantics, and abstract \n\t\tinterpretation prescribes certain relations between standard\n\t\tand non-standard semantics, in order to guarantee the \n\t\tcorrectness of the non-standard semantics with respect to the \n\t\tstandard semantics.\n\n\t\tThe increasing acceptance of Prolog as a practical programming \n\t\tlanguage has motivated widespread interest in dataflow analysis\n\t\tof logic programs and especially in abstract interpretation.\n\t\tLogic programmming languages are attractive from a semantical \n\t\tpoint of view, but dataflow analysis of logic programs is more \n\t\tcomplex than that of more traditional programming languages, \n\t\tsince dataflow is bi-directional (owing to unification) and \n\t\tcontrol flow is in terms of backtracking.\n\n\t\tThe present thesis is concerned with semantics-based dataflow \n\t\tanalysis of logic programs. We first set up a theory for \n\t\tdataflow analysis which is basically that of abstract \n\t\tinterpretation as introduced by P. and R. Cousot. We do, \n\t\thowever, relax the classical theory of abstract interpretation\n\t\tsomewhat, by giving up the demand for (unique) <i>best</i> \n\t\tapproximations.\n\n\t\tTwo different kinds of analysis of logic programs are then \n\t\tidentified: a <i>bottom-up</i> analysis yields an approximation\n\t\tto the success set (and possibly the failure set) of a program,\n\t\twhereas a <i>top-down</i> analysis yields an approximation to \n\t\tthe call patterns that would appear during an execution based \n\t\ton SLD resolution. We investigate some of the uses of the two \n\t\tkinds of analysis. In the bottom-up case, we pay special \n\t\tattention to (bottom-up) type inference and its use in program \n\t\tspecialisation. In the top-down case, we present a generic \n\t\t``dataflow semantics'' that encompasses many useful dataflow \n\t\tanalyses. As an instance of the generic semantics, a groundness\n\t\tanalysis is detailed, and a series of other applications are \n\t\tmentioned.\n\n\t\tWe finally present a transformation technique, based on \n\t\ttop-down analysis, for introducing difference-lists in a \n\t\tlist-manipulating program, without changing the program's \n\t\tsemantics. This may lead to substantial improvement in a \n\t\tprogram's execution time.},\n keywords = {Abstract interpretation, Abstract domains, Logic programming, Semantics, Many-valued logic, Unification, Groundness analysis, Program transformation},\n}\n\n","author_short":["Søndergaard, H."],"key":"Son_phd89","id":"Son_phd89","bibbaseid":"sndergaard-semanticsbasedanalysisandtransformationoflogicprograms-1989","role":"author","urls":{},"keyword":["Abstract interpretation","Abstract domains","Logic programming","Semantics","Many-valued logic","Unification","Groundness analysis","Program transformation"],"metadata":{"authorlinks":{}},"html":""},"bibtype":"phdthesis","biburl":"https://people.eng.unimelb.edu.au/harald/bibbase.bib","dataSources":["yWvm3kzg5vKQAPLm7","ofmsZryxNDBSpE7j5","9aC4cxLD8D6oJ3FLN","wpkuJrZJJtqra3FbL","W7ih7WyQivP4EDh83","BNGFBQQncqevukxoe","q5pWX4XZgAS4TQBof","yb3uN577XrYa7qf57","9jmvjAEoFta6emcgS","XqcrNTrCCBr9mSd37"],"keywords":["abstract interpretation","abstract domains","logic programming","semantics","many-valued logic","unification","groundness analysis","program transformation"],"search_terms":["semantics","based","analysis","transformation","logic","programs","søndergaard"],"title":"Semantics-Based Analysis and Transformation of Logic Programs","year":1989}