Skip to content

CEA-LIST/Arachne

Repository files navigation

Arachne

Arachne is a Rust-based code generator that compiles Domain-Specific Modeling Languages (DSMLs) defined with Ecore metamodels into Conflict-free Replicated Data Types (CRDTs), leveraging the Moirai library.

Overview

This code generator bridges the gap between high-level domain models (defined in Ecore) and distributed, eventually consistent data structures (CRDTs). It automatically generates Rust code that leverages the Moirai library to provide conflict-free replication semantics for your domain models.

Project Organization

  • arachne-parser: an Ecore-to-Rust parser, forked from ecore.rs.
  • arachne-codegen: core component that generates a composition of CRDTs from a parsed Ecore metamodel.
  • arachne-cli: Command Line Interface tool.

Running the generator

Rust must be installed on your machine: https://rust-lang.org/tools/install. You must have this project and PureOpLib in the same root folder. You can change the path of these dependencies in Cargo.toml. Replace XXXX-1 by the name of PureOpLib.

RUST_LOG=debug cargo run generate -vv -o <WHERE_TO_GENERATE_PROJECT> <PATH_TO_ECORE_METAMODEL>

Testing the generator on ModelSet

ModelSet is a dataset of +5,000 Ecore and UML models. We provide a simple Python script (modelset_coverage.py) to automatically pass the models from ModelSet into Arachne to assess its capabilities. For each model, the script if 1. the model was correctly parsed, 2. the model was correctly generated by Arachne, and 3. the generated code compiles.

The script assumes that the dataset lives in ~/Downloads/modelset. Change the path if necessary.

Examples

RUST_LOG=debug cargo run generate -vv -o ../class_hierarchy ./examples/class_hierarchy.ecore
RUST_LOG=debug cargo run generate -vv -o ../behavior_tree ./examples/bt.ecore
RUST_LOG=debug cargo run generate -vv -o ../json ./examples/json.ecore

About

Arachne is a Rust-based code generator that compiles Domain-Specific Modeling Languages (DSMLs) defined with Ecore metamodels into Conflict-free Replicated Data Types (CRDTs), leveraging the Moirai library.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors