【24h】

Translation Correctness for First-Order Object-Oriented Pattern Matching

机译:一阶面向对象模式匹配的翻译正确性

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

Pattern matching makes ML programs more concise and readable, and these qualities are also sought in object-oriented settings. However, objects and classes come with open class hierarchies, extensibility requirements and the need for data abstraction, which all conflict with matching on concrete data types. Extractor-based pattern matching has been proposed to address this conflict. Extractors are user-defined methods that perform the task of value discrimination and deconstruction during pattern matching. In this paper, we give the first for-malization of extractor-based matching, using a first-order object-oriented calculus. We give a direct operational semantics and prove it sound. We then present an optimizing translation to a target language without matching, and prove a correctness result stating that an expression is equivalent to its translation.
机译:模式匹配使ML程序更简洁易读,并且在面向对象的设置中也寻求这些品质。但是,对象和类具有开放类层次结构,可扩展性要求以及对数据抽象的需求,所有这些都与对具体数据类型的匹配相冲突。已经提出了基于提取器的模式匹配来解决该冲突。提取器是用户定义的方法,可在模式匹配期间执行值区分和解构的任务。在本文中,我们使用一阶面向对象演算对基于提取的匹配进行了首次形式化。我们给出了直接的操作语义,并证明了它的正确性。然后,我们在不匹配的情况下提出了针对目标语言的优化翻译,并证明了正确的结果,指出表达式等同于其翻译。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号