Hostname: page-component-7479d7b7d-jwnkl Total loading time: 0 Render date: 2024-07-13T19:49:13.789Z Has data issue: false hasContentIssue false

Syntactic accidents in program analysis: on the impact of the CPS transformation

Published online by Cambridge University Press:  27 August 2003

DANIEL DAMIAN
Affiliation:
LION Bioscience Ltd., Compass House, 80-82 Newmarket Road, Cambridge CB5 8DZ, UK (e-mail: Daniel.Damian@uk.lionbioscience.com)
OLIVIER DANVY
Affiliation:
BRICS
Basic Research in Computer Science (www.brics.dk), funded by the Danish National Research Foundation.
, Department of Computer Science, University of Aarhus, Ny Munkegade, Building 540, DK-8000 Aarhus C, Denmark (e-mail: danvy@brics.dk)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

We show that a non-duplicating transformation into Continuation-Passing Style (CPS) has no effect on control-flow analysis, a positive effect on binding-time analysis for traditional partial evaluation, and no effect on binding-time analysis for continuation-based partial evaluation: a monovariant control-flow analysis yields equivalent results on a direct-style program and on its CPS counterpart, a monovariant binding-time analysis yields less precise results on a direct-style program than on its CPS counterpart, and an enhanced monovariant binding-time analysis yields equivalent results on a direct-style program and on its CPS counterpart. Our proof technique amounts to constructing the CPS counterpart of flow information and of binding times. Our results formalize and confirm a folklore theorem about traditional binding-time analysis, namely that CPS has a positive effect on binding times. What may be more surprising is that the benefit does not arise from a standard refinement of program analysis, as, for instance, duplicating continuations. The present study is symptomatic of an unsettling property of program analyses: their quality is unpredictably vulnerable to syntactic accidents in source programs, i.e., to the way these programs are written. More reliable program analyses require a better understanding of the effect of syntactic change.

Type
Article
Copyright
2003 Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.