Features

/Features
Features 2015-11-14T20:11:39+00:00

DSLFORGE is a framework for the development of domain-specific language (DSL) editors for web applications and cloud IDEs. It is proposed to two main categories of users:

  • Tooling for language developers, and
  • Workbench for language users.

The Tooling allows to generate full-featured web editors ready to be embedded into your web application should it be pure JavaScript or Java-based application. The Workbench is a free online platform hosting examples of language editors for demonstration purposes only. It lets users create, edit, and launch transformations, and execute generated artefacts, making it possible to work simultaneously with classmates, partners or colleagues on the same resources.

Tooling

The usual way to define a language is to specify a grammar. A grammar is a set of rules (or productions) that specifies the syntax of the language (i.e. what is a valid sentence in the language). Given a language grammar -should it be in ANTLR or in Xtext- the Tooling allows generating web editors with the following features bound by default

  • Syntax Highlighting (keywords, strings, comments, annotations, etc.),
  • Syntax validation (using generated parser and lexer),
  • Content assist (keywords and references),
  • Sever-side validation (aka semantic validation),
  • Scoping (global and local)
  • Template proposals (snippets),
  • Text hovering (display documentation),
  • Default Key bindings,
  • Undo/Redo Support,
  • Code Folding.

All these features are easily customizable.

By leveraging the powerful features of ACE on the client side, we are able to minimize the charge of resource processing on the server which is highly required for large scale applications. The following table explains how resource processing is dispatched between the client and the server. For more information about client/server interactions, refer to our paper at MoDELS 2014.

blog-img1

Notice parsing and lexing is proposed on both sides, you could think this is duplicate. The fact is they are not performed simultaneously, depending on the level of performance you are seeking, you can either:

  • Trigger server-side parsing at each user input, or
  • Delegate to client-side parser, and trigger server-side parsing on demand.

Workbench

The Workbench is a free online platform hosting examples of generated language editors for demonstration purposes only. The workbench makes it possible to edit models, generate code, compile and run the generated artefacts.

The Workbench is built on Eclipse Remote Application Platform (RAP). The interaction between the client and the server is governed by the standard RAP life-cycle. The communication between the client and the server is based on HTTP/JSON. Multi-threading is used on the client side to handle the computationally expensive resource processing. On the server side, parsing and validation can be triggered on demand or systematically at each user interaction (both scenarios are handled). Moreover, asynchronous server pushes are used to notify the client about workspace change events and server-side resource validation.

User Accounts

To access the Workbench, you need to register via the mailing list. Users are given the ability to manage their accounts directly from the Workbench.  To update your account, select Manage Account from the Tools menu.

blog-img2

Language Catalog

The following language editors are integrated to the Workbench together with resource creation wizards and code generators. Today, the catalog contains the following languages:

Entities and Relationships (DomainModel)

Domain Modeling is a way to describe and model real world entities and the relationships between them, which represent a problem domain space. Identifying domain entities and their relationships provides a basis for understanding and helps stakeholders to better design systems.

Arithmetic Expressions (Arithmetics)

Arithmetics is a small language for parsing mathematical expressions. It comes with an interpreter which runs on server and is automatically triggered on save. Together with syntax validation, the interpreter assists user in writing correct expressions.

Embedded Systems (HummingBird)

Hummingbird is a language used in Sphinx platform, frequently used in the automotive domain for demonstration purposes. It focuses on components and interface connections, as most of the embedded systems are made of physical components and connections between components. It has commonly used domain abstractions: components, ports, provided/required interfaces.

State Machines (Statemachine)

Statemachine is a basic language for modeling finite state machines: states, transitions, events, etc. The language comes with a code generator which produces a basic Java class from models. The class can then be compiled and executed on the server.

Workspace

The Workspace is a component which manages the persistency of resources on remote servers. It is based on Eclipse RAP and JPA EclipseLink (Gemini). It stores metadata on resources in a separate database, which together with the file system provides a comprehensive and clean API for performing common workspace operations in the browser (managing projects, folders, resources, user accounts, etc.). The component can be easily embedded into any Eclipse RAP application, simply by configuration.

blog-img25