arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2109.06114cs.PL
收藏

One Down,699 to Go:或者,合成合成脱糖

One Down, 699 to Go: or, synthesising compositional desugarings

Sándor Bartha, James Cheney, Vaishak Belle

摘要:

在现实世界的系统中使用的编程或脚本语言很少从一开始就考虑到正式的语义。因此,为这些系统开发基础良好的分析工具,第一步需要逆向工程的正式语义。这可能需要数月或数年的努力。我们可以(至少部分地)自动化这个过程吗?虽然可取,但从实现中自动逆向工程语义规则是非常具有挑战性的,正如Krishnamurthi等人所发现的那样。在本文中,我们强调,由于状态空间爆炸,随着语言大小的缩放方法是非常困难的,所以我们建议增量学习语义。我们给克里希那穆提等人的形式化。的去糖学习框架,以便阐明增量学习算法可行所必需的假设。我们表明,这种重新制定使我们能够扩展的搜索空间和表达规则,Krishnamurthi等人。描述为具有挑战性的,同时仍然保留可行性。我们评估枚举合成作为一个基线算法,并证明,与我们的问题的重新表述,它是可能的学习正确的desugaring规则的例子源和核心语言提出的Krishnamurthi等人,在大多数情况下与预期的规则相同。此外,在用户的指导下,我们的系统能够合成去糖列表解析和try/catch/finally结构的规则。

英文摘要:

Programming or scripting languages used in real-world systems are seldom designed with a formal semantics in mind from the outset. Therefore, developing well-founded analysis tools for these systems requires reverse-engineering a formal semantics as a first step. This can take months or years of effort. Can we (at least partially) automate this process? Though desirable, automatically reverse-engineering semantics rules from an implementation is very challenging, as found by Krishnamurthi et al. [2019]. In this paper, we highlight that scaling methods with the size of the language is very difficult due to state space explosion, so we propose to learn semantics incrementally. We give a formalisation of Krishnamurthi et al.'s desugaring learning framework in order to clarify the assumptions necessary for an incremental learning algorithm to be feasible. We show that this reformulation allows us to extend the search space and express rules that Krishnamurthi et al. described as challenging, while still retaining feasibility. We evaluate enumerative synthesis as a baseline algorithm, and demonstrate that, with our reformulation of the problem, it is possible to learn correct desugaring rules for the example source and core languages proposed by Krishnamurthi et al., in most cases identical to the intended rules. In addition, with user guidance, our system was able to synthesize rules for desugaring list comprehensions and try/catch/finally constructs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑