Unstaging Translation of Cross-Stage Persistent Multi-Staged Programs

Daejun Park, Joonwon Choi, Jeehoon Kang, Kwangkeun Yi · 2012

We present a semantic-preserving unstaging translation of crossstage persistent multi-staged programs into context calculus. Unlike Lisp-like multi-staged programs, cross-stage persistent multistaged programs allow variables of any stage to be used in all future stages (cross-stage persistence) and do not allow intentional variable-capturing substitution. We find that cross-stage persistent multi-staged programs are naturally unstaged to the context calculus. The unstaging translation enables static analysis by 1) unstaging the source program, 2) analyzing the unstaged program using the conventional static analysis techniques, and 3) projecting the analysis result back to the source language. Coupled with Choi et al. [4], our unstaging translation provides static analysis framework for both of the two staging semantics: CSP and Lisp-like multistaged languages.

Read the paper · More papers on PaperTik