论文标题

部分可观测时空混沌系统的无模型预测

Decomposition Without Regret

论文作者

Zhang, Weixin, David, Cristina, Wang, Meng

论文摘要

编程语言正在拥抱功能和面向对象的范例。两个范式之间的关键区别是实现数据抽象的方法。也就是说,如何通过相关操作组织数据。就可扩展性和表现力而言,功能和面向对象的分解之间存在重要的权衡。不幸的是,程序员通常被迫在编程的早期阶段选择特定的分解样式。一旦做出了错误的设计决定,切换到其他分解样式的价格可能会很高,因为通常需要使用普遍的手动重构。为了解决这个问题,本文介绍了功能和面向对象的分解之间的双向转换系统。我们在食物微积分中正式化了系统的核心,该核算捕获了功能和面向对象的分解的本质。我们证明转换保留了原始程序的类型和语义。我们进一步在Scala中实施了一种称为Cook的翻译工具,并进行了几个案例研究,以证明Cook的适用性和有效性。

Programming languages are embracing both functional and object-oriented paradigms. A key difference between the two paradigms is the way of achieving data abstraction. That is, how to organize data with associated operations. There are important tradeoffs between functional and object-oriented decomposition in terms of extensibility and expressiveness. Unfortunately, programmers are usually forced to select a particular decomposition style in the early stage of programming. Once the wrong design decision has been made, the price for switching to the other decomposition style could be rather high since pervasive manual refactoring is often needed. To address this issue, this paper presents a bidirectional transformation system between functional and object-oriented decomposition. We formalize the core of the system in the FOOD calculus, which captures the essence of functional and object-oriented decomposition. We prove that the transformation preserves the type and semantics of the original program. We further implement FOOD in Scala as a translation tool called Cook and conduct several case studies to demonstrate the applicability and effectiveness of Cook.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源