计算机科学 > 程序设计语言
[提交于 2017年7月14日]
标题:One Tool, Many Languages: Language-Parametric Transformation with Incremental Parametric Syntax
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:We present a new approach for building source-to-source transformations that can run on multiple programming languages, based on a new way of representing programs called incremental parametric syntax. We implement this approach in Haskell in our Cubix system, and construct incremental parametric syntaxes for C, Java, JavaScript, Lua, and Python. We demonstrate a whole-program refactoring tool that runs on all of them, along with three smaller transformations that each run on several. Our evaluation shows that (1) once a transformation is written, little work is required to configure it for a new language (2) transformations built this way output readable code which preserve the structure of the original, according to participants in our human study, and (3) our transformations can still handle language corner-cases, as validated on compiler test suites.
提交历史
来自:James Koppel[v1] 2017年7月14日 星期五 18:26:41 UTC