Concrete syntax for objects: domain-specific language embedding and assimilation without restrictions

Concrete syntax for objects: domain-specific language embedding and assimilation without restrictions
复制标题

对象的具体语法:无限制的特定领域语言嵌入和同化

DOI:
--
复制
发表时间:
2004
期刊:
Conference on Object-Oriented Programming Systems, Languages, and Applications
影响因子:
--
通讯作者:
E. Visser
E. Visser
中科院分区:
--
文献类型:
--
作者:
Martin Bravenboer;E. Visser

文献摘要

被引文献

相似文献

应用程序编程器的接口可访问对类库中封装的域知识,而无需提供适当的表示域组成的符号。由于面向对象的语言是为了扩展性和重复使用而设计的,因此语言构造通常足以在语义层面表达域抽象。但是,它们在句法层面没有提供正确的抽象。在本文中,我们描述了Metaborg,这是一种为应用程序程序员提供域抽象的具体语法的方法。该方法包括将特定于域的语言嵌入通用主机语言中,并将嵌入式域代码吸收到周围的主机代码中。同化阶段没有扩展主机语言的实现,而是根据现有的API来实现域抽象,使宿主语言不受干扰。确实,可以将Metaborg视为一种将API推广到语言层面的方法。该方法由经过验证和可用技术支持,即语法定义形式主义SDF以及程序转换语言和工具集策略/XT。我们用三个域中的应用程序说明了该方法:代码生成,XML生成和用户界面构建。
Application programmer's interfaces give access to domain knowledge encapsulated in class libraries without providing the appropriate notation for expressing domain composition. Since object-oriented languages are designed for extensibility and reuse, the language constructs are often sufficient for expressing domain abstractions at the semantic level. However, they do not provide the right abstractions at the syntactic level. In this paper we describe MetaBorg, a method for providing concrete syntax for domain abstractions to application programmers. The method consists of embedding domain-specific languages in a general purpose host language and assimilating the embedded domain code into the surrounding host code. Instead of extending the implementation of the host language, the assimilation phase implements domain abstractions in terms of existing APIs leaving the host language undisturbed. Indeed, MetaBorg can be considered a method for promoting APIs to the language level. The method is supported by proven and available technology, i.e. the syntax definition formalism SDF and the program transformation language and toolset Stratego/XT. We illustrate the method with applications in three domains: code generation, XML generation, and user-interface construction.