A compiler architecture for domain-specific type error diagnosis

Author:

Serrano Alejandro1,Hage Jurriaan1

Affiliation:

1. 1Utrecht University,Utrecht. The Netherlands

Abstract

Abstract Domain-specific languages (DSLs) permeate current programming practices. An important kind of DSLs includes those developed and integrated within a host language, which we call embedded or internal DSLs. Unfortunately, embedded DSLs usually fall short on domain-specific error diagnosis, that is, they do not give control to DSL authors over how errors are reported to the programmer. As a consequence, implementation details of the DSL leak through in error messages, and programmers need to understand the internals of the DSL implementation to fix their code in a productive way. This paper addresses the challenge of building a compiler with integrated support for domain-specific error diagnosis. We assume that the type system is described using a constraint-based approach, and constraint solving is specified using rewrite rules. Domain information can then be injected at constraint gathering time via type rules, during constraint solving via specialized rules and axioms, and finally at blaming and reparation time via transformations. Furthermore, we define error contexts as a way to control the order in which solving and blaming proceeds. We engineer domain-specific error diagnosis in such a way that the compiler can also reuse the techniques for improving general error diagnosis.

Publisher

Walter de Gruyter GmbH

Subject

General Computer Science

Reference35 articles.

1. Elm Team Source code for Elm type checker file Type Solve hs,2018

2. Modular type inference with local Assumptions of Functional;Vytiniotis;Journal Programming,2011

3. Team Docs for scala annotation implicitNotFound Retrieved from https www scala lang org api scala annotation implicitNotFound html;Scala

4. Wies Practical - based type error localization In Proceedings of the th SIGPLAN International Conference on Functional Programming;Pavlinovic

5. Understanding Functional Dependencies via Constraint Handling Rules of Functional;Sulzmann;Journal Programming,2007

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

1. Imagine There’s No Source Code: Replay Diagnostic Location Information in Dynamic EDSL Meta-programming;Proceedings of the 21st ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes;2024-09-13

2. Artificial Intelligence and User Experience in reciprocity: Contributions and state of the art;Intelligent Decision Technologies;2023-04-20

3. A Lightweight and Chip-Level Reconfigurable Architecture for Next-Generation IoT End Devices;IEEE Transactions on Computers;2023

4. Describing microservices using modern Haskell (experience report);Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell;2020-08-09

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

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

www.globalauthorid.com

TOP

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