Return to search

Guidance during program composition in a Prolog techniques editor

It is possible to build complex programs by repeated combination of pairs of simpler programs. However, naive combination often produces programs that are far too inefficient. We would like to have a system that would produce the optimal combination of two programs, and also work with minimal supervision by the user. In this thesis we make a significant step towards such an ideal, with the presentation of an interactive system based on program transformation complemented with knowledge of the program development. The first contribution of this thesis is to recognise that knowledge contained in the <I>program history</I> can be used in program transformation, reducing the need for user interaction. The interactive composition system presented can automatically take major decisions, such as the selection of which subgoal should be unfolded or the laws to be applied in order to get a more efficient combined program. Furthermore, a component of our system called the <I>selection procedure</I> can decide automatically which is the most suitable combination method by analysing the characteristics of the initial pair of programs as given by their program histories. Approaches that do not use the program history suffer from the problem that it is not always practical to extract the required information about the structure of the program. Our second contribution is to provide a range of new methods which exploit the program history in order to produce more efficient programs, and to deal with a wider range of combination problems. The new methods not only combine programs with the same control flow, but can also deal with some cases in which the control flows are different. All of these methods are completely automatic with the exception of our "mutant" method in which the combined clause needs to be approved by the user. The third contribution is to present relevant properties in our composition system. These properties fall into the following three groups: (i) properties which hold after applying each combination method. (ii) properties about the type of program which is obtained after the combination. (iii) properties of the join specification which defines the characteristics of the combined program.

Identiferoai:union.ndltd.org:bl.uk/oai:ethos.bl.uk:663190
Date January 1994
CreatorsVargas-Vera, M. de S.
PublisherUniversity of Edinburgh
Source SetsEthos UK
Detected LanguageEnglish
TypeElectronic Thesis or Dissertation

Page generated in 0.0016 seconds