【24h】

Reconciling Exhaustive Pattern Matching with Objects

机译:协调与对象匹配的详尽模式

获取原文

摘要

Pattern matching, an important feature of functional languages, is in conflict with data abstraction and extensibility, which are central to object-oriented languages. Modal abstraction offers an integration of deep pattern matching and convenient iteration abstractions into an object-oriented setting; however, because of data abstraction, it is challenging for a compiler to statically verify properties such as exhaustiveness. In this work, we extend modal abstraction in the JMatch language to support static, modular reasoning about exhaustiveness and redundancy. New matching specifications allow these properties to be checked using an SMT solver. We also introduce expressive pattern-matching constructs. Our evaluation shows that these new features enable more concise code and that the performance of checking exhaustiveness and redundancy is acceptable.
机译:模式匹配是功能语言的重要特征,与数据抽象和可扩展性相冲突,这是面向对象语言的核心。模态抽象提供深度模式匹配和方便的迭代抽象集成到面向对象的设置;但是,由于数据抽象,对编译器来静态验证诸如详尽性等性质的挑战。在这项工作中,我们在JMATCH语言中扩展了模态抽象,以支持静态,模块化推理,了解详细信息和冗余。新的匹配规范允许使用SMT求解器检查这些属性。我们还引入了表现力的模式匹配构造。我们的评估表明,这些新功能使得更简洁的代码能够接受更简洁的代码,并且可以接受检查详细程度和冗余的性能。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号