Browsing by Author "Choi, W."
Now showing 1 - 2 of 2
- Results Per Page
- Sort Options
Technical reportPublication Open Access Relating Staged Computation to the Record Calculus(Özyeğin University, 2010-09-06) Aktemur, Tankut Barış; Choi, W.; Computer Science; AKTEMUR, Tankut BarişIt has been previously shown that there is a close relation between record calculus and program generation (e.g. Lisp-like quasiquotations): A translation has been defined to convert staged expressions to record calculus expressions, and it has been shown that the call-by-value semantics of the staged and the record calculi are equivalent modulo the translation and admin reductions. In this work, we investigate the relation further. The contributions are twofold: (1) We fine-tune the previously shown relation between the two operational semantics, and obtain more precise results. In particular, we show that only two kinds of admin reductions suffice, and these reductions can be applied exhaustively. (2) We define a reverse translation that converts record calculus expressions back to the staged calculus, allowing us to go back and forth between the two calculi. We believe that these results provide an important step towards reusing already-existing record calculus static analyses to reason about staged expressions.Conference ObjectPublication Metadata only Static analysis of multi-staged programs via unstaging translation(ACM, 2011) Choi, W.; Aktemur, Tankut Barış; Yi, K.; Tatsuta, M.; Computer Science; AKTEMUR, Tankut BarişStatic analysis of multi-staged programs is challenging because thebasic assumption of conventional static analysis no longer holds: the program text itself is no longer a fixed static entity, but rather a dynamically constructed value. This article presents a semanticpreserving translation of multi-staged call-by-value programs into unstaged programs and a static analysis framework based on this translation. The translation is semantic-preserving in that every small-step reduction of a multi-staged program is simulated by the evaluation of its unstaged version. Thanks to this translation we can analyze multi-staged programs with existing static analysis techniques that have been developed for conventional unstaged programs: we first apply the unstaging translation, then we apply conventional static analysis to the unstaged version, and finally we cast the analysis results back in terms of the original staged program. Our translation handles staging constructs that have beenevolved to be useful in practice (typified in Lisp’s quasi quotation): open code as values, unrestricted operations on references and intentional variable-capturing substitutions. This article omits references for which we refer the reader to our companion technical report.