egglog 12.0.0__cp313-cp313t-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- egglog/__init__.py +13 -0
- egglog/bindings.cpython-313t-powerpc64-linux-gnu.so +0 -0
- egglog/bindings.pyi +887 -0
- egglog/builtins.py +1144 -0
- egglog/config.py +8 -0
- egglog/conversion.py +290 -0
- egglog/declarations.py +964 -0
- egglog/deconstruct.py +176 -0
- egglog/egraph.py +2247 -0
- egglog/egraph_state.py +978 -0
- egglog/examples/README.rst +5 -0
- egglog/examples/__init__.py +3 -0
- egglog/examples/bignum.py +32 -0
- egglog/examples/bool.py +38 -0
- egglog/examples/eqsat_basic.py +44 -0
- egglog/examples/fib.py +28 -0
- egglog/examples/higher_order_functions.py +42 -0
- egglog/examples/jointree.py +64 -0
- egglog/examples/lambda_.py +287 -0
- egglog/examples/matrix.py +175 -0
- egglog/examples/multiset.py +60 -0
- egglog/examples/ndarrays.py +144 -0
- egglog/examples/resolution.py +84 -0
- egglog/examples/schedule_demo.py +34 -0
- egglog/exp/MoA.ipynb +617 -0
- egglog/exp/__init__.py +3 -0
- egglog/exp/any_expr.py +947 -0
- egglog/exp/any_expr_example.ipynb +408 -0
- egglog/exp/array_api.py +2019 -0
- egglog/exp/array_api_jit.py +51 -0
- egglog/exp/array_api_loopnest.py +74 -0
- egglog/exp/array_api_numba.py +69 -0
- egglog/exp/array_api_program_gen.py +510 -0
- egglog/exp/program_gen.py +427 -0
- egglog/exp/siu_examples.py +32 -0
- egglog/ipython_magic.py +41 -0
- egglog/pretty.py +566 -0
- egglog/py.typed +0 -0
- egglog/runtime.py +888 -0
- egglog/thunk.py +97 -0
- egglog/type_constraint_solver.py +111 -0
- egglog/visualizer.css +1 -0
- egglog/visualizer.js +35798 -0
- egglog/visualizer_widget.py +39 -0
- egglog-12.0.0.dist-info/METADATA +93 -0
- egglog-12.0.0.dist-info/RECORD +48 -0
- egglog-12.0.0.dist-info/WHEEL +5 -0
- egglog-12.0.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import pathlib
|
|
2
|
+
import webbrowser
|
|
3
|
+
|
|
4
|
+
import anywidget
|
|
5
|
+
import traitlets
|
|
6
|
+
from IPython.display import display
|
|
7
|
+
from ipywidgets.embed import embed_minimal_html
|
|
8
|
+
|
|
9
|
+
from .ipython_magic import IN_IPYTHON
|
|
10
|
+
|
|
11
|
+
CURRENT_DIR = pathlib.Path(__file__).parent
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class VisualizerWidget(anywidget.AnyWidget):
|
|
15
|
+
"""
|
|
16
|
+
Widget to render multiple graphs using the interactive visualizer.
|
|
17
|
+
|
|
18
|
+
The index will choose the one that is currently displayed, defaulting to the last one.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
_esm = CURRENT_DIR / "visualizer.js"
|
|
22
|
+
_css = CURRENT_DIR / "visualizer.css"
|
|
23
|
+
egraphs = traitlets.List[str]().tag(sync=True)
|
|
24
|
+
|
|
25
|
+
def display_or_open(self) -> None:
|
|
26
|
+
"""
|
|
27
|
+
Displays the widget if we are in a Jupyter environment, otherwise saves it to a file and opens it.
|
|
28
|
+
"""
|
|
29
|
+
if IN_IPYTHON:
|
|
30
|
+
display(self)
|
|
31
|
+
return
|
|
32
|
+
# 1. Create a temporary html file that will stay open after close
|
|
33
|
+
# 2. Write the widget to it with embed_minimal_html
|
|
34
|
+
# 3. Open the file using the open function from graphviz
|
|
35
|
+
file = pathlib.Path.cwd() / "tmp.html"
|
|
36
|
+
# https://github.com/manzt/anywidget/issues/339#issuecomment-1755654547
|
|
37
|
+
embed_minimal_html(file, views=[self], drop_defaults=False)
|
|
38
|
+
print("Visualizer widget saved to", file)
|
|
39
|
+
webbrowser.open(file.as_uri())
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: egglog
|
|
3
|
+
Version: 12.0.0
|
|
4
|
+
Classifier: Environment :: MacOS X
|
|
5
|
+
Classifier: Environment :: Win32 (MS Windows)
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Natural Language :: English
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Programming Language :: Rust
|
|
14
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
15
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
16
|
+
Classifier: Topic :: Software Development :: Compilers
|
|
17
|
+
Classifier: Topic :: Software Development :: Interpreters
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Dist: typing-extensions
|
|
20
|
+
Requires-Dist: black
|
|
21
|
+
Requires-Dist: graphviz
|
|
22
|
+
Requires-Dist: anywidget
|
|
23
|
+
Requires-Dist: scikit-learn ; extra == 'array'
|
|
24
|
+
Requires-Dist: array-api-compat ; extra == 'array'
|
|
25
|
+
Requires-Dist: numba>=0.59.1 ; extra == 'array'
|
|
26
|
+
Requires-Dist: llvmlite>=0.42.0 ; extra == 'array'
|
|
27
|
+
Requires-Dist: numpy>2 ; extra == 'array'
|
|
28
|
+
Requires-Dist: cloudpickle>=3 ; extra == 'array'
|
|
29
|
+
Requires-Dist: ruff ; extra == 'dev'
|
|
30
|
+
Requires-Dist: pre-commit ; extra == 'dev'
|
|
31
|
+
Requires-Dist: mypy ; extra == 'dev'
|
|
32
|
+
Requires-Dist: anywidget[dev] ; extra == 'dev'
|
|
33
|
+
Requires-Dist: egglog[docs,test] ; extra == 'dev'
|
|
34
|
+
Requires-Dist: jupyterlab ; extra == 'dev'
|
|
35
|
+
Requires-Dist: ipykernel ; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest ; extra == 'test'
|
|
37
|
+
Requires-Dist: mypy ; extra == 'test'
|
|
38
|
+
Requires-Dist: syrupy>=5 ; extra == 'test'
|
|
39
|
+
Requires-Dist: egglog[array] ; extra == 'test'
|
|
40
|
+
Requires-Dist: pytest-codspeed ; extra == 'test'
|
|
41
|
+
Requires-Dist: pytest-benchmark ; extra == 'test'
|
|
42
|
+
Requires-Dist: pytest-xdist ; extra == 'test'
|
|
43
|
+
Requires-Dist: pydata-sphinx-theme ; extra == 'docs'
|
|
44
|
+
Requires-Dist: myst-nb ; extra == 'docs'
|
|
45
|
+
Requires-Dist: sphinx-autodoc-typehints ; extra == 'docs'
|
|
46
|
+
Requires-Dist: sphinx-gallery ; extra == 'docs'
|
|
47
|
+
Requires-Dist: nbconvert ; extra == 'docs'
|
|
48
|
+
Requires-Dist: matplotlib ; extra == 'docs'
|
|
49
|
+
Requires-Dist: anywidget ; extra == 'docs'
|
|
50
|
+
Requires-Dist: seaborn ; extra == 'docs'
|
|
51
|
+
Requires-Dist: egglog[array] ; extra == 'docs'
|
|
52
|
+
Requires-Dist: line-profiler ; extra == 'docs'
|
|
53
|
+
Requires-Dist: sphinxcontrib-mermaid ; extra == 'docs'
|
|
54
|
+
Requires-Dist: ablog ; extra == 'docs'
|
|
55
|
+
Requires-Dist: jupytext ; extra == 'docs'
|
|
56
|
+
Provides-Extra: array
|
|
57
|
+
Provides-Extra: dev
|
|
58
|
+
Provides-Extra: test
|
|
59
|
+
Provides-Extra: docs
|
|
60
|
+
License-File: LICENSE
|
|
61
|
+
Summary: e-graphs in Python built around the the egglog rust library
|
|
62
|
+
License: MIT
|
|
63
|
+
Requires-Python: >=3.11
|
|
64
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
65
|
+
|
|
66
|
+
# `egglog` Python wrapper
|
|
67
|
+
|
|
68
|
+
[](https://egglog-python.readthedocs.io/latest/?badge=latest) [](https://github.com/egraphs-good/egglog-python/actions/workflows/CI.yml) [](https://pypi.org/project/egglog/) [](https://pypi.org/project/egglog/) [](https://pypi.org/project/egglog/) [](https://github.com/pre-commit/pre-commit) [](https://codspeed.io/egraphs-good/egglog-python)
|
|
69
|
+
|
|
70
|
+
`egglog` is a Python package that provides bindings to the Rust library [`egglog`](https://github.com/egraphs-good/egglog/),
|
|
71
|
+
allowing you to use e-graphs in Python for optimization, symbolic computation, and analysis.
|
|
72
|
+
|
|
73
|
+
Please see the [documentation](https://egglog-python.readthedocs.io/) for more information.
|
|
74
|
+
|
|
75
|
+
Come say hello [on the e-graphs Zulip](https://egraphs.zulipchat.com/#narrow/stream/375765-egglog/) or [open an issue](https://github.com/egraphs-good/egglog-python/issues/new/choose)!
|
|
76
|
+
|
|
77
|
+
## How to cite
|
|
78
|
+
|
|
79
|
+
If you use **egglog-python** in academic work, please cite the paper:
|
|
80
|
+
|
|
81
|
+
```bibtex
|
|
82
|
+
@misc{Shanabrook2023EgglogPython,
|
|
83
|
+
title = {Egglog Python: A Pythonic Library for E-graphs},
|
|
84
|
+
author = {Saul Shanabrook},
|
|
85
|
+
year = {2023},
|
|
86
|
+
eprint = {2305.04311},
|
|
87
|
+
archivePrefix = {arXiv},
|
|
88
|
+
primaryClass = {cs.PL},
|
|
89
|
+
doi = {10.48550/arXiv.2305.04311},
|
|
90
|
+
url = {https://arxiv.org/abs/2305.04311},
|
|
91
|
+
note = {Presented at EGRAPHS@PLDI 2023}
|
|
92
|
+
}
|
|
93
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
egglog-12.0.0.dist-info/METADATA,sha256=pxa22F7ON-sEIkEM0Hp5AgzfXTxgMtw3avn22hzF2lI,4597
|
|
2
|
+
egglog-12.0.0.dist-info/WHEEL,sha256=ZHNK11AMTtz3o6cTHKE_IEZeGfB3VW-pvmjNo37n4fY,147
|
|
3
|
+
egglog-12.0.0.dist-info/licenses/LICENSE,sha256=w7VlVv5O_FPZRo8Z-4Zb_q7D5ac3YDs8JUkMZ4Gq9CE,1070
|
|
4
|
+
egglog/__init__.py,sha256=P96wxxhNb8FN6bLbMhBnBPhuqOrPm5YrMigmrUPs3ts,375
|
|
5
|
+
egglog/bindings.cpython-313t-powerpc64-linux-gnu.so,sha256=51pUtq-FBKxvMKgmbe853kDDSCT72a09-HxQ-mwOW80,191895952
|
|
6
|
+
egglog/bindings.pyi,sha256=LexnbA0BdWp1gmSUEEcmpQ3zv8GmXL1Y_86EQs8groI,20181
|
|
7
|
+
egglog/builtins.py,sha256=xDDioO5wj_n5pvkvTgSdUA2vTV7vx4aaydCdB6yvQSM,30720
|
|
8
|
+
egglog/config.py,sha256=yM3FIcVCKnhWZmHD0pxkzx7ah7t5PxZx3WUqKtA9tjU,168
|
|
9
|
+
egglog/conversion.py,sha256=J00zfCl1v3b-7QQrJnEjIqdJlolNn05RNpbCXY2dZ34,11309
|
|
10
|
+
egglog/declarations.py,sha256=22udeLmFPtPNuoE06ZpvgS-Wt4snQzqr3UY38Q36uHc,26658
|
|
11
|
+
egglog/deconstruct.py,sha256=AlK3GHGE3pT3Y08n34OfKc1GZ_J4D-59GUrpW5uV8-U,5464
|
|
12
|
+
egglog/egraph.py,sha256=a9BdiJ8oDoyEx1jMxcRfPKeKvgnsEG6a_2V0gLpuVb8,78813
|
|
13
|
+
egglog/egraph_state.py,sha256=v00hwAbseF9w6m5QieJT_yxPXbjbuXvW7uMMLVxv6TE,44693
|
|
14
|
+
egglog/examples/README.rst,sha256=ztTvpofR0eotSqGoCy_C1fPLDPCncjvcqDanXtLHNNU,232
|
|
15
|
+
egglog/examples/__init__.py,sha256=wm9evUbMPfbtylXIjbDdRTAVMLH4OjT4Z77PCBFyaPU,31
|
|
16
|
+
egglog/examples/bignum.py,sha256=jfL57XXpQqIqizQQ3sSUCCjTrkdjtB71BmjrQIQorQk,535
|
|
17
|
+
egglog/examples/bool.py,sha256=e0z2YoYJsLlhpSADZK1yRYHzilyxSZWGiYAaM0DQ_Gw,695
|
|
18
|
+
egglog/examples/eqsat_basic.py,sha256=2xtM81gG9Br72mr58N-2BUeksR7C_UXnZJ4MvzSPplc,869
|
|
19
|
+
egglog/examples/fib.py,sha256=BOHxKWA7jGx4FURBmfmuZKfLo6xq9-uXAwAXjYid7LU,492
|
|
20
|
+
egglog/examples/higher_order_functions.py,sha256=DNLIQfPJCX_DOLbHNiaYsfvcFIYCYOsRUqp99r9bpc8,1063
|
|
21
|
+
egglog/examples/jointree.py,sha256=TLlH7TsQzWfadqDo7qeTprFhLdQmj59AQaGse81RIKk,1714
|
|
22
|
+
egglog/examples/lambda_.py,sha256=iQvwaXVhp2VNOMS7j1WwceZaiq3dqqilwUkMcW5GFBE,8194
|
|
23
|
+
egglog/examples/matrix.py,sha256=7_mPcMcgE-t_GJDyf76-nv3xhPIeN2mvFkc_p_Gnr8g,4961
|
|
24
|
+
egglog/examples/multiset.py,sha256=IBOsB80DkXQ07dYnk1odi27q77LH80Z8zysuLE-Q8F8,1445
|
|
25
|
+
egglog/examples/ndarrays.py,sha256=mfr410eletH8gfdg-P8L90vlF6TUifvYV_-ryOwvZZE,4042
|
|
26
|
+
egglog/examples/resolution.py,sha256=BJd5JClA3DBVGfiVRa-H0gbbFvIqeP3uYbhCXHblSQc,2119
|
|
27
|
+
egglog/examples/schedule_demo.py,sha256=JbXdPII7_adxtgyKVAiqCyV2sj88VZ-DhomYrdn8vuc,618
|
|
28
|
+
egglog/exp/MoA.ipynb,sha256=sZJa8yzCbTM_2fr8oJHuhyiOMmvxAVPCJsN431cPcwY,34093
|
|
29
|
+
egglog/exp/__init__.py,sha256=nPtzrH1bz1LVZhZCuS0S9Qild8m5gEikjOVqWAFIa88,49
|
|
30
|
+
egglog/exp/any_expr.py,sha256=Wwmfm2L4mvnnbU5ju1XwsqrLgKQOCekpGSSDvfz84qw,31698
|
|
31
|
+
egglog/exp/any_expr_example.ipynb,sha256=D1OO8X0ykF4maMCBsj9kvnaru-eRVdayaUKeLDgK95A,17506
|
|
32
|
+
egglog/exp/array_api.py,sha256=IPUwi2TgJRiiPpVNQ8xNuS0xOvKMbcjrtRJ6NzDukg4,65465
|
|
33
|
+
egglog/exp/array_api_jit.py,sha256=S5XGWT8a_bFNHUXbQZi6U2cmy__xjvDMNl1eUgvRDyw,1739
|
|
34
|
+
egglog/exp/array_api_loopnest.py,sha256=-kbyorlGxvlaNsLx1nmLfEZHQM7VMEBwSKtV0l-bs0g,2444
|
|
35
|
+
egglog/exp/array_api_numba.py,sha256=X3H1TnCjPL92uVm6OvcWMJ11IeorAE58zWiOX6huPv4,2696
|
|
36
|
+
egglog/exp/array_api_program_gen.py,sha256=qnve8iqklRQVyGChllG8ZAjAffRpezmdxc3IdaWytoQ,21779
|
|
37
|
+
egglog/exp/program_gen.py,sha256=6WWJd_67G4Z2xjwR_PL4NkqYtej6EY4lHw7V19I46Qw,13093
|
|
38
|
+
egglog/exp/siu_examples.py,sha256=yZ-sgH2Y12iTdwBUumP7D2OtCGL83M6pPW7PMobVFXc,719
|
|
39
|
+
egglog/ipython_magic.py,sha256=2hs3g2cSiyDmbCvE2t1OINmu17Bb8MWV--2DpEWwO7I,1189
|
|
40
|
+
egglog/pretty.py,sha256=DNj2K8QNqxv71mE4H5XLHsv8GQ4N7vsBB5eFtIdlvT4,23350
|
|
41
|
+
egglog/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
|
+
egglog/runtime.py,sha256=qsdk1wlD1TFOqohmzK0TgEPE6DvVwK2mTHAlJYJRr7M,35724
|
|
43
|
+
egglog/thunk.py,sha256=xogL6hC7kA0YwtxbiC0A0GLjwBpH739HYLp_rqGmL9w,2229
|
|
44
|
+
egglog/type_constraint_solver.py,sha256=fzmGo_xgIFpf_akXLJ38j8lYL1ew5aO2v6qK7lC67gw,4510
|
|
45
|
+
egglog/visualizer.css,sha256=FoSQkzeaPP1Ubs_EwJArSRbzBZeObqo-J8SQEPM1iT8,259448
|
|
46
|
+
egglog/visualizer.js,sha256=vMBmuOZ0zPijbOxev2a7P99i2gC1D2FT3_4fL00oRzU,3754037
|
|
47
|
+
egglog/visualizer_widget.py,sha256=LtVfzOtv2WeKtNuILQQ_9SOHWvRr8YdBYQDKQSgry_s,1319
|
|
48
|
+
egglog-12.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 E-Graphs Good
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|