Identities compactly describe properties of a mathematical expression and can be leveraged into faster and more accurate function implementations. However, identities must currently be discovered manually, which requires a lot of expertise. We propose a two-phase synthesis and deduplication pipeline that discovers these identities automatically. In the synthesis step, a set of rewrite rules is composed, using an e-graph, to discover candidate identities. However, most of these candidates are duplicates, which a secondary deduplication step discards using integer linear programming and another e-graph. Applied to a set of 61 benchmarks, the synthesis phase generates 7215 candidate identities which the deduplication phase then reduces down to 125 core identities.
翻译:符号描述数学表达式的特性,并可用于更快、更精确的功能执行。但是,身份目前必须手工发现,这需要大量专门知识。我们建议分两阶段合成和分解管道,自动发现这些身份。在综合步骤中,一套重写规则是使用电子图解来发现候选身份。然而,大多数候选人是重复的,这是使用整数线性编程和另一个电子图解的二次拆分步骤丢弃。综合阶段适用于一套61个基准,综合阶段产生7215个候选人身份,然后将解析阶段减少到125个核心身份。