Rewriting for sound and complete union, intersection and negation types

Author:

Pearce David J.1

Affiliation:

1. Victoria University of Wellington, New Zealand

Abstract

Implementing the type system of a programming language is a critical task that is often done in an ad-hoc fashion. Whilst this makes it hard to ensure the system is sound, it also makes it difficult to extend as the language evolves. We are interested in describing type systems using declarative rewrite rules from which an implementation can be automatically generated. Whilst not all type systems are easily expressed in this manner, those involving unions, intersections and negations are well-suited for this. In this paper, we consider a relatively complex type system involving unions, intersections and negations developed previously. This system was not developed with rewriting in mind, though clear parallels are immediately apparent from the original presentation. For example, the system presented required types be first converted into a variation on Disjunctive Normal Form. We identify that the original system can, for the most part, be reworked to enable a natural expression using declarative rewrite rules. We present an implementation of our rewrite rules in the Whiley Rewrite Language (WyRL), and report performance results compared with a hand-coded solution.

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference74 articles.

1. Ceylon Homepage. Retrieved 2017 from http://ceylon-lang.org/ Ceylon Homepage. Retrieved 2017 from http://ceylon-lang.org/

2. Facebook Flow. Retrieved 2017 from https://flowtype.org/ Facebook Flow. Retrieved 2017 from https://flowtype.org/

3. Kotlin Homepage. Retrieved 2017 from http://kotlinlang.org/ Kotlin Homepage. Retrieved 2017 from http://kotlinlang.org/

4. What's new in Groovy 2.0? Retrieved 2017 from http://www.infoq.com/articles/new-groovy-20 What's new in Groovy 2.0? Retrieved 2017 from http://www.infoq.com/articles/new-groovy-20

5. Whiley Compiler Respository on GitHub. Retrieved 2017 from http://github.com/Whiley/WhileyCompiler Whiley Compiler Respository on GitHub. Retrieved 2017 from http://github.com/Whiley/WhileyCompiler

Cited by 1 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3