Reconciling exhaustive pattern matching with objects

PLDI(2013)

引用 11|浏览334
暂无评分
摘要
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.
更多
查看译文
关键词
new matching specification,modal abstraction,deep pattern matching,data abstraction,object-oriented language,convenient iteration abstraction,exhaustive pattern,jmatch language,new feature,object-oriented setting,pattern matching,java,technical report,subtyping,redundancy
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要