Skip to main navigation Skip to search Skip to main content

Regular Tree Languages as an Abstract Domain in Program Specialisation

  • JP Gallagher
  • , JC Peralta

    Research output: Contribution to journalArticle (Academic Journal)peer-review

    13 Citations (Scopus)

    Abstract

    On-line partial evaluation algorithms include a generalisation step, which is needed to ensure termination. In partial evaluation of logic and functional programs, the usual generalisation operation is the most specific generalisation (\it msg) of expressions. This can cause loss of information, which is especially serious in programs whose computations first build some internal data structure, which is then used to control a subsequent phase of execution - a common pattern of computation. If the size of the intermediate data is unbounded at partial evaluation time then the \it msg will lose almost all information about its structure. Hence subsequent phases of computation cannot be effectively specialised. In this paper the problem is tackled by introducing regular trees into a partial evaluation algorithm. Regular trees are recursive descriptions of term structure closely related to tree automata. In the algorithm, regular approximations of computation states encountered during partial evaluation are constructed. The critical point is that when generalisation is performed, the upper bound on regular trees can be combined with the \it msg, thus preserving recursive structural information. It also allows the specialisation of programs with respect to goals whose arguments range over sets described by regular trees. The first algorithm is presented as an instance of Leuschel's scheme for abstract specialisation of logic programs. This provides a generic algorithm parameterised by an abstract domain - regular trees in this case. The correctness requirements from his scheme are established. The extension of the first algorithm to propagate regular approximations of answers as well as calls is also presented, increasing the amount of specialisation that can be obtained. Finally a technique for increasing precision based on ``wrapper functions"" is introduced.
    Translated title of the contributionRegular Tree Languages as an Abstract Domain in Program Specialisation
    Original languageEnglish
    Pages (from-to)143 - 172
    Number of pages29
    JournalHigher-Order and Symbolic Computation
    Volume14 (2-3)
    Publication statusPublished - Nov 2001

    Fingerprint

    Dive into the research topics of 'Regular Tree Languages as an Abstract Domain in Program Specialisation'. Together they form a unique fingerprint.

    Cite this