Despite recent advances in communication and automation, regulations are still written in natural-language prose, subject to ambiguity, inconsistency, and incompleteness. How can we craft regulations with precision? Our solution is embodied in Eiger, a domain-specific programming language embedded in Haskell. A domain expert pairs with a software engineer to write regulations in Eiger. The domain expert needs only to read and audit the code, but not write it. A first, limited, user study suggests that this works well in practice because Eiger code mostly looks like Excel formulas with simple SQL queries. Eiger forms the kernel of a new strategy to deliver value to clients in our professional services business with increased automation and precision. The framework is executable: based on client data, we can use Eiger both to deduce how best to adapt to a new regulation and then maintain compliance. This paper reviews the design of Eiger and walks through its implementation. To preserve a straightforward surface syntax but with monadic semantics, we have leveraged advanced features, including GHC.Generics, the new OverloadedRecordDot extension, and a novel approach to performing class instance selection at run-time.
翻译:尽管通信和自动化方面最近有所进展,但条例仍以自然语言编成,但有模棱两可、不一致和不完整之处。 我们如何精确地制定条例? 我们的解决方案体现在Haskell内嵌的域内编程语言Eiger。 域专家与软件工程师一起在Eiger内写条例。 域专家只需要阅读和审计守则, 而不是写成。 首先, 有限, 用户研究表明, 这在实践上是行之有效的, 因为Eiger 代码主要看起来像具有简单 SQL 查询的Excel 公式。 Eiger 形成新战略的核心, 以更高的自动化和精确度向专业服务业务客户提供价值。 框架可以执行: 根据客户数据, 我们可以使用 Eiger 来推断如何最好地适应新条例, 然后保持遵守。 本文审查了Eiger 的设计, 并检查其执行过程。 为了保持直截面的表面语法, 但与微调的语义学, 我们利用了先进的特征, 包括 GHC. Generics, 新的超载记录Dot 扩展, 以及一个在运行时进行类选择的新方法。