Skip to main navigation Skip to search Skip to main content

Using Regular Approximations for Generalisation During Partial Evaluation

  • Gallagher John P.
  • , Peralta Julio C.

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

    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 applied to computation states is the most specific generalisation (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 msg will lose almost all information about its structure. Hence the second phase of computation cannot be effectively specialised. In this paper a generalisation based on regular approximations is presented. Regular approximations are recursive descriptions of term structure closely related to tree automata. A regular approximation of computation states can be built during partial evaluation. The critical point is that when generalisation is performed, the upper bound on regular descriptions can be combined with the msg, thus preserving structural information including recursively defined structure. The domain of regular approximations is infinite and hence a widening is incorporated in the generalisation to ensure termination. An algorithm for partial evaluation of logic programs, enhanced with regular approximations, along with some examples of its use will be presented.
    Translated title of the contributionUsing Regular Approximations for Generalisation During Partial Evaluation
    Original languageEnglish
    Pages (from-to)44-51
    JournalProceedings of the 2000 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM'2000), Boston, Mass., (ed. J. Lawall)
    Publication statusPublished - 2000

    Bibliographical note

    ISBN: 1581132018
    Publisher: ACM Press
    Name and Venue of Conference: Proceedings of the 2000 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM'2000), Boston, Mass., (ed. J. Lawall)
    Other identifier: 1000450

    Fingerprint

    Dive into the research topics of 'Using Regular Approximations for Generalisation During Partial Evaluation'. Together they form a unique fingerprint.

    Cite this