This repository contains the reference implementation of the role-based modeling language for Compartment Role Object Models (CROM) and Compartment Role Object Instances (CROI), as well as Constraint Models. The implementation is kept simple, comprehensive, and more importantly close to their formalization.
- Python >= 2.7.3 (see Python Installation for more Information.)
The repository contains three files, whereas:
- crom.py contains the full reference implementation including classes, such as CROM, CROI, ConstraintModel, and auxiliary functions
- cromtest.py is a test suite build to test the implementation of all the axioms with both positive and negative cases.
- cromexample.py implements an example model with constraints, two of its instances, and evaluates their well-formedness, compliance, and validity, respectively
- persistency contains the definitions, examples and tests for the Persistence Transformation.
The reference implementation is encapsulated in the crom.py and contains the following classes:
- CROM representing a Compartment Role Object Model,
- CROI a Compartment Role Object Instance,
- RoleGroups the notion of a Role Group, and
- ConstraintModel a Constraint Model
Please use this implementation, to apply, evaluate, and extend our formal role-based modeling language.
Make sure to have a compatible Python version installed.
-
Clone the repository in to the desired folder.
git clone https://github.com/Eden-06/formalCROM.git
-
Create and validate the example.
python cromexample.py
1.0.3