tombrus / DclareForMPS

Adding declarative, reactive and incremental rules to MPS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DclareForMPS License: LGPL v3 Actions Status

DclareForMPS adds a language aspect named 'rules' to MPS.
A rule typically derives some part of a model.
Rules can trigger other rules.
A rule runs when something changes in the models that is read by this rule (reactive).
The system terminates on a fixpoint (if no changes occure anymore).
The regular MPS base-language can be used to specify the rules.
Rules definitions typically use quotations (light or not) to define the derivations.
The rules are executed incrementally, meaning they perform a minimal amount of changes to derive the defined patterns (expressed in quotations).

Standard MPS plugin

DclareForMPS is in constant progress. It is available as a standard plugin in MPS, without the need to download it here.
All feedback, functional or technical, is appreciated.

dclareForJava

DclareForMPS uses the dclare engine of the Modeling Value Group.
The dclare project can be found here: dclare on GitHub

Installation

In an installation of JetBrains MPS (2019.3.4 or higher) ...

  1. install the DclareForMPS.zip plugin
  2. open one of the example MPS-Projects (see below)
  3. switch on the Dclare engine (Settings... > Dclare)
    check the engine checkbox
  4. rebuild the example project
  5. play with the sandbox-models in the example-project

Examples

Multiple MPS-project examples can be found on GitHub:

Sudoku on GitHub

EntityClassJava on GitHub

NiamToOO on GitHub

FlattenAndCopy on GitHub

For more info, please read the README.md files that are part of these examples.

About

Adding declarative, reactive and incremental rules to MPS

License:GNU Lesser General Public License v3.0


Languages

Language:Java 97.6%Language:Shell 2.4%