LionWeb-io / lionweb-pricing-demo

0 stars 0 forks source link

LionWeb Pricing Demo

This demo project is presented in a tutorial about LionWeb.

The tutorial is available at https://tomassetti.me/using-lionweb-to-combine-jetbrain-mps-with-kotlin/.

Note that we may have updated the code with respect to the tutorial, but you can find the exact code corresponding to the tutorial under the tag first-tutorial

This demo shows how a language can be defined and used in MPS, and later exported so that an interpreter for that language can be written in Kotlin. This interpreter will also be able to receive models defined in MPS (and exported to LionWeb) and process them.

Scenario

The scenario this enables is the following:

Structure of the project

The project is composed by two modules:

  1. The MPS Pricing DSL: this defines the language and logic to export the language and the models written in that language to LionWeb
  2. The Pricing Engine: this is an interpreter for the Pricing DSL which is written in Kotlin

The two components are discussed in the respective folders.

Setup

From the root of the project run:

gradle wrapper

This will install the Gradle Wrapper.