3,937 research outputs found

    Automatic autoprojection of recursive equations with global variables and abstract data types

    Get PDF
    AbstractSelf-applicable partial evaluation has been implemented for half a decade now, but many problems remain open. This paper addresses and solves the problems of automating call unfolding, having an open-ended set of operators, and processing global variables updated by side effects. The problems of computation duplication and termination of residual programs are addressed and solved: residual programs never duplicate computations of the source program; residual programs do not terminate more often than source programs.This paper describes the automatic autoprojector (self-applicable partial evaluator) Similix; it handles programs with user-defined primitive abstract data type operators which may process global variables. Abstract data types make it possible to hide actual representations of data and prevent specializing operators over these representations. The formally sound treatment of global variables makes Similix fit well in an applicative order programming environment.We present a new method for automatic call unfolding which is simpler, faster, and sometimes more effective than existing methods: it requires neither recursion analysis of the source program, nor call graph analysis of the residual program.To avoid duplicating computations and preserve termination properties, we introduce an abstract interpretation of the source program, abstract occurence counting analysis, which is performed during preprocessing. We express it formally and simplify it
    • …
    corecore