成长的树
Trees That Grow
摘要:
我们研究了函数数据类型的可扩展性概念,作为一种新的方法来装饰抽象语法树与额外的信息集的问题。我们在重新设计GHC中表示Haskell抽象语法的数据类型时观察到了这种可扩展性的需求。具体来说,我们描述了我们的方法,在Haskell中使用一种新的语法机器来表达可扩展的数据类型的树装饰问题。我们表明,语法机器是完整的,因为它可以表达所有的语法可能的形式扩展到代数数据类型声明。然后,我们描述了一个编码的语法机制的基础上现有的功能在格拉斯哥Haskell语言(GHC)。
英文摘要:
We study the notion of extensibility in functional data types, as a new approach to the problem of decorating abstract syntax trees with additional sets of information. We observed the need for such extensibility while redesigning the data types representing Haskell abstract syntax inside GHC. Specifically, we describe our approach to the tree-decoration problem using a novel syntactic machinery in Haskell for expressing extensible data types. We show that the syntactic machinery is complete in that it can express all the syntactically possible forms of extensions to algebraic data type declarations. Then, we describe an encoding of the syntactic machinery based on the existing features in Glasgow Haskell Compiler(GHC).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。