rindPHI / GrammarGraph

Creation of Graphs from Context-Free Grammars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GrammarGraph

Creating graphs from context-free grammars for fun and profit.

Features

  • Creating sub graphs
  • Export back to grammars
  • Reachability
  • Filter abstraction
  • Dijkstra's algorithm for shortest paths between nodes
  • Checking whether a (sub) graph represents a tree
  • Computing k-paths (paths of exactly length k) in grammars and derivation trees, and a k-path coverage measure (see this paper) of derivation trees based on that.

Have a look at our feature demo!

Install

GrammarGraph requires at least Python 3.9.

We recommend to install GrammarGraph in a virtual environment. Example usage (inside project directory):

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Run tests
python3 -m pytest -n 16

Author: Dominic Steinhöfel.

About

Creation of Graphs from Context-Free Grammars

License:GNU General Public License v3.0


Languages

Language:Jupyter Notebook 58.4%Language:Python 41.6%