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.
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篇论文的施引文献,订阅后可以查看论文全部施引文献