使用Isabelle/HOL的非项图优化
Verifying term graph optimizations using Isabelle/HOL
摘要:
我们的目标是正式验证GraalVM编译器中使用的数百个表达式优化规则的正确性。当定义程序设计语言的语义时,表达式自然地形成抽象语法树或术语。然而,为了便于共享公共子表达式,现代编译器将表达式表示为项图。定义术语图的语义比定义其等价术语表示的语义更复杂。更重要的是,直接在术语图上定义优化并证明语义保持比在等效术语表示上复杂得多。在术语上,优化可以表示为条件项重写规则,并且重写是语义保持的证明相对简单。在本文中,我们探讨了一种方法,使用长期重写来验证GraalVM编译器内的优化项图变换。这种方法大大减少了整体验证工作,并允许更简单的编码优化规则。
英文摘要:
Our objective is to formally verify the correctness of the hundreds of expression optimization rules used within the GraalVM compiler. When defining the semantics of a programming language, expressions naturally form abstract syntax trees, or, terms. However, in order to facilitate sharing of common subexpressions, modern compilers represent expressions as term graphs. Defining the semantics of term graphs is more complicated than defining the semantics of their equivalent term representations. More significantly, defining optimizations directly on term graphs and proving semantics preservation is considerably more complicated than on the equivalent term representations. On terms, optimizations can be expressed as conditional term rewriting rules, and proofs that the rewrites are semantics preserving are relatively straightforward. In this paper, we explore an approach to using term rewrites to verify term graph transformations of optimizations within the GraalVM compiler. This approach significantly reduces the overall verification effort and allows for simpler encoding of optimization rules.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。