Convert Egglog-style rewrite rules into formal inference rules, output as LaTeX. This package provides a tiny parser for simple rewrite files and a CLI that emits a LaTeX representation of those rules.
Install the package from PyPI using pip:
pip install eggtxYou can also install in development mode if you want to work on the source:
pip install -e .[dev]The command line interface eggtx takes a file containing rewrite rules and
prints a LaTeX representation:
eggtx path/to/rules.eg > rules.texSee examples/ for a small sample. The convert_example.py script shows
how to call the library directly:
python examples/convert_example.pyThis project uses pre-commit to run formatting and linting checks. After
installing the development dependencies with pip install -e .[dev], install the
git hooks:
pre-commit installThe CI workflow will run the same checks and the test suite using pytest.