Sirius Web: Insights in Language Workbenches An Experience Report

Abstraction

Sirius Web is an open-source, web-based language workbench maintained by Obeo and hosted under the Eclipse Foundation. It is the successor of Sirius Desktop, an Eclipse-based language workbench used for producing numerous industrial graphical modeling workbenches in the past decades. Leveraging on this valuable experience, in this article we provide an overview of Sirius Web and document the rationales and good practices that have shaped its development. Specifically, we focus on: 1/ the rationales behind modeling and usability features; 2/ their impact on the development lifecycle of tool-supported modeling languages; 3/ the software architecture of the language workbench and the resulting modeling environments. Concrete examples illustrate both the detailed rationales and the use of the tool. We also discuss alternative approaches Obeo considered. In addition to introducing Sirius Web, this paper also aims to help language workbench developers make informed design choices for the future development of web-based language workbenches. It also identifies current open questions for the software language engineering community. Moreover, by addressing current open questions in software language engineering, this study contributes to the ongoing dialogue in the community, potentially steering future research directions.

本文关注:基本原理、对软工的影响和作用、语言工作台软件架构。

Introduction

Sirius Web(后文简称SW)是一种基于Web的语言工作台(language workbench)。

本文的一作Théo Giraudet是开发人员、二作Mélanie Bats是Obeo的CTO、五作Pierre-Charles David是Sirius Desktop的项目负责人。

Sirius Web

Overview of the tool

SW is a web application that can be accessed through a web browser client.
The server part is developed using Java, Spring Boot, and EMF, and the client is made with TypeScript and React.
SW uses GraphQL for defining the communication protocol between the server and client.
作用:SW is agnostic of the application domain and mainly targets domain experts. It may be useful for any domain that has to build graphical DSMLs for their own concerns.

SW的使用者分为两个类型:studio maker和end user。

基本概念

SW提供了两个源语言来定义领域模型和领域视图。语言设计者可以通过GEMOC Studio或Epsilon使用Java API或SW来定义语法semantics。抽象语法符合Ecore。

To describe the mapping between the concrete syntax elements and the abstract syntax elements, the studio maker uses from the View DSL an embeded query language called AQL (Acceleo Query Language) and inspired by OCL (Object Constraint Language).

SW also proposes to create languages with its Java APIs, enabling the use of Ecore to develop abstract syntax.

效果图

  • explorer view
  • representation editor
  • details view
  • model root

当前使用SW的工具:

Sirius Web team

SW由七个工程师开发!Mélanie Bats和Benoît Combemale都有十年工作经验。

Overview of the main considered requirements

We elicited six main requirements to fulfill for developing language workbenches dedicated to graphical modeling environments.

  • Heterogeneous Modeling: Language workbenches must be able to deal with different models in a coordinated and usable way.
  • Collaborative modeling: Each studio maker has different domain expertise but needs to work together to build a unique system.
  • Agile language development: The language workbench must provide a way to ease the iteration during the language development process between these two roles.
  • Separation of Concerns: For example, a studio maker may design the abstract syntax once, to then let other studio makers work on various concrete syntaxes on the same abstract syntax and over different periods (e.g., different projects over time).
  • Deployment: This requirement follows the DevOps approach, aiming to bridge the gap between the development and the production.
  • Interoperability: Developed studios usually have to interoperate with other tools of the end users.

Rationales

Language workbench development features

Rationale 1: Adapting the language workbench to the studio maker expertise

Sirius Web offers three different development interfaces:

  • the low-code facilities in the browser;
  • a Java-based API based on the Domain and View DSLs;
  • a Java-based API directly based on EMF.

Each interface provides different abstractions, each with varying degrees of customization possibilities. Through one specific interface, the studio maker can contribute to extending the other interfaces with new services.

Rationale 2: Enabling heterogeneous representations

A language workbench should propose the development of multiple representations from different representation types (e.g., diagram, form) for a DSL.

Sirius Web proposes different representation types (diagrams, forms) for which a studio maker can create a representation type description.Moreover, from the Java API the studio maker can create new representation types and use them from the low-code interface.

新的问题:语言工作台应该支持模型变体表示法。

Rationale 3: Bootstrapping the language workbench

The features available in the language workbench (representations, interactive features such as completion, layouting) should also be available or even customizable for the developed studios.
In other words, the language workbench should mainly be a specific studio that proposes meta-languages.

Bootstrapping is a common technique when designing a language workbench. For example, Xtext (Efftinge & Völter 2006), MPS (Pech et al 2013), Spoofax (Wachsmuth et al. 2014) are bootstrapped.

新的问题:A current challenge is how to help developers in reporting issues as they develop their language workbench.

Rationale 4: Bridging the gap between the concrete and the abstract syntax

AQL is the language that Obeo provides in Sirius Desktop and Sirius Web for navigating the model. In particular, it is used to describe the mapping from the abstract syntax elements to the concrete syntax elements in the View DSL. The mapping can be conditional to be applied only when an abstract syntax element’s property has a specific value, for instance, enabling more dynamic concrete syntax. Finally, it is also used to describe the behavior of the different tools.

AQL is inspired by OCL (OMG 2014) and has a very similar syntax, with the following specific difference: AQL has a static typing system like OCL, but the type system checking is separated from the execution phase. This enables to type check on demand: enabled for validation at design time, for the studio maker; and disabled in the studio, to avoid performance overhead and thus execute AQL queries faster. AQL supports union types to avoid falling back on a top type such as Object when a variable can have different types. This allows the list of common attributes of the possible types to be collected and provided to the studio maker via auto-completion.

Language Development Lifecycle

Rationale 5: Uncoupling abstract syntax and concrete syntax development lifecycles

The abstract and concrete syntaxes should be developed as independently as possible, even at different times when possible.

In Sirius Web, the development of abstract syntax and concrete syntax are two different activities with their own lifecycle. This rationale follows the classical separation of concerns between views and models as widely adopted in the human-computer interaction domain (the MV* pattern). However, this requires the co-evolution of the abstract syntax and the concrete syntax: each time the studio maker modifies the abstract syntax, they might have to modify the concrete syntax and vice versa.

Rationale 6: Enabling seamless studio deployment

When a studio maker creates or modifies a studio, Sirius Web automatically and seamlessly deploys this studio on the current Sirius Web instance.

Software Architecture

Rationale 7: Enabling model edition by interacting with the concrete syntax elements

三种具体语法和抽象语法的解析方式

XtextLangium是第一种方案。 In this approach, the instance of the abstract syntax (AST) is directly inferred from the manipulation of the model through the concrete syntax.

MPSFreon是第三种方案。which is used only to project the AST to the end user.

Obeo的SW使用的是第二种方案。

Rationale 8: Relying on a cloud-native architecture

The language workbench and the developed studios should be accessible without any installation on the devices of the different users.

Sirius Web云架构

Rationale 9: Integrating the studios with other tools and vice versa

Sirius Web provides mechanisms to be integrated with, or to integrate, other environments. Since the Sirius Web front-end is web-based, it can work with other environments that support web view or are web-based, e.g., Eclipse RCP, Visual Studio Code, documentation websites. Moreover, as being cloud-native, Sirius Web uses a standardized protocol between its front-end and its back-end, namely GraphQL over HTTP. So, integration can be performed with environments that use this protocol to get data from and send data to a Sirius Web server. Finally, other web-based environments can be integrated in Sirius Web as a representation type for instance.

The Sirius Web project development since 2020

Sirius Web是一种通用工具,因此大多数设置都涉及其支持大多数DSML常见的大型工业模型和通用功能的能力。关于可扩展性,Sirius Web旨在支持数百万个元素的模型,这些模型通过具有数千个节点的图形表示显示。这些不同的价值来自与其不同客户的OBEO体验。关于最常见功能的支持,其中一部分来自Sirius桌面和用户要求。其他人来自客户要求或开发特定的独立工作室,例如Syson,其他工作室可能感兴趣的功能是Sirius Web本身的上游。

Discussion

三类开放性问题:

  • several usability concerns of the language workbench and produced studios低代码复用和具体语法交互
  • co-evolutioin between the studio and the language, as well as between the language and the models
  • operation in an open ecosystem where there is a distinction between the clients and the server如何像Eclipse IDE一样发展

Use Cases

简单案例Tax Studio和复杂案例SysON。

例子

例子

例子

例子

例子

Language workbenches

Sirius Web与其他非文本语言工作台的比较

个人总结:Sirius Web的开山之作,搞MDE的要认真阅读。