modness
A model-driven framework to perform fairness assessments
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.5%) to scientific vocabulary
Repository
A model-driven framework to perform fairness assessments
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
MODNESS
This repository contains the implementation of the MODNESS framework described in the paper How fair are we? From conceptualization to automated assessment of fairness definitions
Table of contents
Project structure
The project is structured as follows:
modness: contains the implementation of the MODNESS framework (refer to the README.md file in the folder for more details)assets: contains pictures of the MODNESS metamodel and of the models implemented for the considered use casesbaselines: contains the MANILA and FairML implementations of the use cases used in the evaluationdata: contains the datasets used in the evaluationeclipse.zip: contains an Eclipse bundle with all the required plugins to run the metamodel and generate the code
Evaluation reproduction
Follow these instructions to reproduce the evaluation performed to answer the RQ2 of the paper.
Screencast
A screencast of the evaluation reproduction is available at the following link: https://youtu.be/_cNsGT5KUms
1. How to import the metamodel, the models and generate the code
In the following, we report the steps to import the metamodel and the models, and to generate the code.
1.1 Requirements
To open the EMF editor and generate the code and the DSL, you have to download:
Java version 17: https://adoptium.net/
Eclipse Modeling Tools 2024-03:
- Download the installer from https://www.eclipse.org/downloads/
- From the installer click on advanced mode:

- From the opened window select Eclipse Modeling Tools 2024-03 and the Java 17 version installed as shown in the image and click Next:

- Ignore all the other windows and click Finish
- Eventually, the Eclipse application should start.
Acceleo 3.7: from the Eclipse Marketplace (inside the editor go to Help -> Eclipse Marketplace -> Type Acceleo)
Xtext 2.34.0: follow the download and installation instructions at https://eclipse.dev/Xtext/download.html
1.2 Import the metamodel and models
- Open Eclipse and select
modnessas workspace - Import the projects by clicking on New -> Import -> Existing projects into workspace and select
modnessas root directory. The following projects should be listed (you can avoid to select themodelsandDSLfolders):

- After the import, you should see the projects in the sidebar
- Right-click the
metamodelproject and click Run as...-> Run configuration - In the opened window, create a new Eclipse Application and specify the following Location:

- Click Run and wait for the new Eclipse instance to open
- In the new Eclipse instance, click File -> Import -> Existing projects into workspace and select the
metamodel.runtimefolder as root directory. Then, themodelsandDSLfolders should be listed:

- The implemented models should appear in the sidebar
2. Generate the code
- Run the
generate.mtlfile located insideorg.eclipse.acceleo.modness.generator.commonwith right click -> Run as -> Launch Acceleo application by setting the following parameters:


where the Model is the one produced with the EMF editor and located in the metamodel.runtime folder (i.e., test) and Target is the folder that contains the generated code.
- The generated code should appear in the
generatedfolder

Troubleshooting:
It might be necessary to programmatically register the metamodel and link the metamodel project with the Acceleo one (please note that we already added the needed lines of code in the repository).
- Right-click on the Acceleo project and select Build path -> Configure Build Path..., then add the modeling project to the Classpath;
- Modify the method public void
registerResourceFactories(ResourceSet resourceSet)in theGenerate.javafile by adding:
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(FairnessPackage.eINSTANCE.getNsURI(), FairnessPackage.eINSTANCE);
In addition, you need to modify the method's annotation from @generated to @generated NOT.
2.1 Run the generated code
In the following, we report the steps to run the generated code.
2.1.1 Requirements
- Minicoda 3 (https://docs.conda.io/en/latest/miniconda.html)
- Install the following Python libraries:
2.1.2 Run the code
- Open a terminal in the
modenessfolder - Run the following command:
bash
python modness/org.eclipse.acceleo.fairness.generator/generated/<PYTHON_FILE>.py
Where <PYTHON FILE> is the name of one of the generated Python files (i.e., compas.py, GerCredit.py, PopularityBias.py)
- The results should appear in the terminal (ignore the WARNING messages)
3. Run the Xtext editor
- From the
modnessproject, right click on theorg.example.xtext.modnessfolder and select Run as -> New Configuration and set themetamodel.runtimeas workspace like done in points 4 and 5 of Section 1.2. Then, click Run and wait for the new Eclipse instance to open:

In the new Eclipse instance, the
DSLfolder should appear in the sidebar. If not, click on File -> Import -> Existing projects into workspace and select themetamodel.runtimefolder as root directory. Then, theDSLfolder should be listed.Right click on the
DSLfolder and select New -> File and create a new file with the.modnessextension. The editor should open and you can start writing the code. By clicking on Ctrl + Space (Cmd + Space on Mac) you can see the available keywords.The
DSLfolder contains all the use cases described in the paper, which can be used as a reference to write new models:

Troubleshooting:
If you see an error in the Xtext grammar file such as Couldn't resolve reference to EPackage 'http://www.example.org/fairness', you should convert the Ecore project to an Xtext project. To do so, right-click on the metamodel project and select Configure -> Convert to Xtext project.
Citation
Please cite our work if you use MODNESS in your work:
bibtex
@article{d2025fair,
title={How fair are we? From conceptualization to automated assessment of fairness definitions},
author={d’Aloisio, Giordano and Di Sipio, Claudio and Di Marco, Antinisca and Di Ruscio, Davide},
journal={Software and Systems Modeling},
pages={1--27},
year={2025},
publisher={Springer Berlin Heidelberg}
}
License
This work is released under GPL-3.0 license
Owner
- Name: Giordano d'Aloisio
- Login: giordanoDaloisio
- Kind: user
- Website: giordanodaloisio.github.io
- Repositories: 24
- Profile: https://github.com/giordanoDaloisio
Citation (CITATION.cff)
cff-version: 1.2.0
authors:
- family-names: "d'Aloisio"
given-names: "Giordano"
- family-names: "Di Sipio"
given-names: "Claudio"
- family-names: "Di Marco"
given-names: "Antinisca"
- family-names: "Di Ruscio"
given-names: "Davide"
title: "MODNESS"
version: "1.0.0"
date-released: "2024-04-08"
url: "https://github.com/giordanoDaloisio/MODNESS"
license: "GPL-3.0"
GitHub Events
Total
- Push event: 8
Last Year
- Push event: 8
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| giordano.daloisio | g****o@g****m | 57 |
| claudioDsi | c****4@g****m | 16 |
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 0
- Total pull requests: 4
- Average time to close issues: N/A
- Average time to close pull requests: 1 minute
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 3
- Average time to close issues: N/A
- Average time to close pull requests: 1 minute
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 3
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- giordanoDaloisio (6)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- pandas
- pip
- python 3.9.*
- scikit-learn
- scipy
- pandas
- pip
- python 3.9.*
- scikit-learn
- scipy
- aif360 *
- aif360 *