z-logo
open-access-imgOpen Access
A Simple CPS Transformation of Control-Flow Information
Author(s) -
Daniel Damian,
Olivier Danvy
Publication year - 2001
Publication title -
brics report series
Language(s) - English
Resource type - Journals
eISSN - 1601-5355
pISSN - 0909-0878
DOI - 10.7146/brics.v8i55.21716
Subject(s) - transformation (genetics) , information flow , control flow , computer science , continuation , corollary , flow (mathematics) , constraint (computer aided design) , construct (python library) , theoretical computer science , simple (philosophy) , algorithm , mathematics , programming language , discrete mathematics , philosophy , biochemistry , chemistry , linguistics , geometry , epistemology , gene
We build on Danvy and Nielsen's first-order program transformation into continuation-passing style (CPS) to design a new CPS transformation of flow information that is simpler and more efficient than what has been presented in previous work. The key to simplicity and efficiency is that our CPS transformation constructs the flow information in one go, instead of first computing an intermediate result and then exploiting it to construct the flow information. More precisely, we show how to compute control-flow information for CPS-transformed programs from control-flow information for direct-style programs and vice-versa. As a corollary, we confirm that CPS transformation has no effect on the control-flow information obtained by constraint-based control-flow analysis. The transformation has immediate applications in assessing the effect of the CPS transformation over other analyses such as, for instance, binding-time analysis.

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here