This proposal has been approved and the Eclipse Xsemantics™ project has been created.
Visit the project page for the latest information and development.

Eclipse Xsemantics

Tuesday, July 11, 2017 - 06:04 by Jens Von Pilgrim
This proposal is in the Project Proposal Phase (as defined in the Eclipse Development Process) and is written to declare its intent and scope. We solicit additional participation and input from the community. Please login and add your feedback in the comments section.
Parent Project
Proposal State
Created
Background

Xtext simplifies the creation of DSLs. This is particularly true for syntax and basic aspects of semantics such as scoping and validation in general. An important part of validation are static type systems. In computer science, formal type systems are a well-known concept and they are defined using operational semantics. Eclipse Xsemantics aims at minimizing the gap between the formalization of a language and the actual implementation in Xtext. It is thought to be used by people who are at least somewhat familiar with formal type systems and operational semantics: it aims at providing a syntax which resembles how deduction rules are written in a formal setting.

Scope

The scope of Eclipse Xsemantics is to provide a DSL for writing rules for languages implemented in Xtext, particularly the static semantics (type system), the dynamic semantics (operational semantics) and relation rules (subtyping), and it provides a generator to create a Java implementation based on these rules to be used in Xtext validations.

Description

Eclipse Xsemantics is a DSL (implemented in Xtext itself) for writing type systems, reduction rules, interpreters and general relation rules for languages implemented in Xtext. A system definition in Xsemantics is a set of judgment rules which have a conclusion and a set of premises. Xsemantics then generates Java code that can be used in your Xtext-based language for scoping and validation.

Why Here?

Eclipse Xsemantics is based on Eclipse Xtext (and Xbase in particular). It is to be used for Xtext-based languages and, as such, it is dependent on, and provides support for, this Eclipse project. Other Eclipse projects using Xtext may use Xsemantics to model the type system of their DSL. This is already true for Eclipse N4JS which heavily relies on Xsemantics.
Hosting Xsemantics at Eclipse dramatically simplifies using it in other Eclipse projects such as N4JS.

Future Work

The current version is already stable (the first version has been created in 2012) and has been in production mode (as part of other projects, e.g., Eclipse N4JS) for years. Fixing bugs and adding minor improvements is ongoing work, of course. Adding new features highly depends on the needs of projects using Xsemantics. Simplifying cooperation with existing (or new) projects within Eclipse or related to Eclipse/Xtext is one of the goals of bringing Xsemantics to Eclipse.

Project Scheduling

A build process similar to other Eclipse projects is already in use, so it should be possible to quickly set up an Eclipse project with a nightly build once approval has been granted and the initial contribution has gone through the due diligence process.

Committers
Mentors
Interested Parties

Projects:

  • Eclipse N4JS
  • Eclipse Xtext

Companies:

  • NumberFour AG
Initial Contribution

The current code that will be contributed to the project is currently hosted at GitHub (see https://github.com/LorenzoBettini/xsemantics) and has already been made available under the Eclipse Public License. Almost the entire codebase has been written by Lorenzo Bettini who is also the copyright holder. Other contributors are identifiable via the GitHub contributors. The project does not use any other third-party libraries (except for Eclipse Xtext).

Source Repository Type