Deriving efficient program transformations from rewrite rules
Deriving efficient program transformations from rewrite rules
复制标题
从重写规则中导出有效的程序转换
DOI:
10.1145/3473579
复制
发表时间:
2021
影响因子:
--
通讯作者:
Appel, Andrew W.
中科院分区:
文献类型:
--
作者:
Li, John M.;Appel, Andrew W.
An efficient optimizing compiler can perform many cascading rewrites in a single pass, using auxiliary data structures such as variable binding maps, delayed substitutions, and occurrence counts. Such optimizers often perform transformations according to relatively simple rewrite rules, but the subtle interactions between the data structures needed for efficiency make them tricky to write and trickier to prove correct. We present a system for semi-automatically deriving both an efficient program transformation and its correctness proof from a list of rewrite rules and specifications of the auxiliary data structures it requires. Dependent types ensure that the holes left behind by our system (for the user to fill in) are filled in correctly, allowing the user low-level control over the implementation without having to worry about getting it wrong. We implemented our system in Coq (though it could be implemented in other logics as well), and used it to write optimization passes that perform uncurrying, inlining, dead code elimination, and static evaluation of case expressions and record projections. The generated implementations are sometimes faster, and at most 40% slower, than hand-written counterparts on a small set of benchmarks; in some cases, they require significantly less code to write and prove correct.
登录
查看更多内容
DOI:
--
发表时间:
2015
期刊:
ACM SIGPLAN International Conference on Functional Programming
影响因子:
--
作者:
Georg Neis;C. Hur;Jan;Craig McLaughlin;Derek Dreyer;Viktor Vafeiadis
通讯作者:
Viktor Vafeiadis
影响因子:
1.1
作者:
E. Kohlbecker;M. Wand
通讯作者:
M. Wand
影响因子:
1.1
作者:
S. Jones;S. Marlow
通讯作者:
S. Marlow
DOI:
10.1007/978-3-642-24452-0_8
发表时间:
2011
期刊:
--
影响因子:
--
作者:
Giorgidze G
通讯作者:
Giorgidze G
影响因子:
3.3
作者:
S. Tjiang;J. Hennessy
通讯作者:
J. Hennessy