Tool for building graph-based hierarchical knowledge representation systems
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A graph rewriting library. Documentation is available at

About project

The ReGraph Python library is a generic framework for modelling graph-based systems. In this context models are viewed as graphs and graph transformations - as a tool to describe both the system evolution and the model evolution read more about the approach.

ReGraph provides various utilities for graph rewriting which can be used for modelling the evolution of a system represented by a graph subject to rewriting. The rewriting functionality is based on the sesqui-pushout rewriting procedure [7]. In addition, the library enables a user to define a typing for models (graphs) that gives specifications for the structure of the models. This later functionality allows both to preserve the specified structure during rewriting and to propagate the changes to the specifications up to the models.

ReGraph contains a collection of utilities for graph rewriting on NetworkX(version 1) graph objects, both undirected graphs (networkx.Graph) and directed ones (networkx.DiGraph).

Environment configs


The required Python 3 packages are given inside the requirements.txt file

To avoid manual installation and to easily set up development environment you may consider following the instructions below:

(Optional ) Setup virtual environment

Create a new virtual environment

virtualenv venv -p path/to/your/python3

To activate the environment

source venv/bin/activate


In order to install the ReGraph library you have to clone this repository using SSH

git clone

or using HTTPS

Install the library with

python install

Run tests


nosetests -v -s