egglog
rfcs
egglog | rfcs | |
---|---|---|
4 | 1 | |
337 | 2 | |
3.3% | - | |
9.5 | 0.0 | |
8 days ago | about 1 year ago | |
Rust | ||
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
egglog
-
Towards a New SymPy
The herbie project using egraphs to explore different ways of rewriting floating point expressions. https://herbie.uwplse.org/ One can also write custom rulesets in egglog (a new egraph rewriting system / language / datalog) https://egraphs-good.github.io/egglog/?example=herbie
The approach is not yet anywhere near being able to touch all the domains sympy can handle. Destructive term rewriting tends to be a bit more forgiving to unsoundness in the rules and still returning roughly meaningful results. EGraph rewriting (and other automated reasoning systems) tend to just return junk as soon as you aren't careful about your semantics. Associativity and commutativity are ubiquitous in CAS applications and encoding these concepts in general purpose terms is rather unsatisfying. The post above emphasizes specialty methods for polynomials, which it would be desirable to find a clean way to integrate into egraph techniques. Variable binding (which is treated in a rather mangled form in CAS systems) is seemingly important for treating summation, differentiation, and integration correctly. The status of doing variable binding efficiently and correctly in egraphs is also unclear imo.
-
What is the state of the art for creating domain-specific languages (DSLs) with Rust?
For semantic analyzers, check out egg and egglog. They're custom data structures for representing compiler rewrite rules in a non-destructive way.
-
Ask HN: What is new in Algorithms / Data Structures these days?
The recent work on relational, datalog-inspired egraphs in PLDI this year ("Unifying Datalog and Equality Saturation") is actually interesting because it can solve cases like the y/x*x -> y identity example, by the power of an interval analysis on x (among other things.) Sort of like adding a postulate but instead it's by adding relations between terms in the graph.
https://github.com/egraphs-good/egglog
https://arxiv.org/pdf/2304.04332.pdf
-
Better Together: Unifying Datalog and Equality Saturation
Close, but the link is on Page 13, and it points here: https://github.com/mwillsey/egg-smol
Unfortunately the naming is all a bit confusing, isn't it....
rfcs
-
Ask HN: What is new in Algorithms / Data Structures these days?
In compilers, there's been a recent uptick in industry research and adoption into using equivalency classes and graphs (egraphs) for doing optimization passes in a way that preserves information and solves the phase ordering problem. Egg[0] was one of the big libraries that came out of it, but can only handle term rewriting without guards, and so can't express y/x*x -> y because it's unsound when x=0, or optimization passes that are across control flow points and thus some of the eclasses are only valid in some locations. The Cranelift developers adapted it into a construction they call aegraphs[1] that handles this, and are migrating Cranelift to use these passes for all optimizations, which is (hopefully) faster and achieves more optimization opportunitie; Chris Fallin is presenting about their aegraph work at PLDI this year.
0: https://egraphs-good.github.io/
1: https://github.com/cfallin/rfcs/blob/main/accepted/cranelift...
What are some alternatives?
ezno - A JavaScript compiler and TypeScript checker written in Rust with a focus on static analysis and runtime performance
libclc - Cache Line Container - C11
scryer-prolog - A modern Prolog implementation written mostly in Rust.
automerge - A JSON-like data structure (a CRDT) that can be modified concurrently by different users, and merged again automatically.
flix - The Flix Programming Language
yjs - Shared data types for building collaborative software
peritext - A CRDT for asynchronous rich-text collaboration, where authors can work independently and then merge their changes.
mpack - MPack - A C encoder/decoder for the MessagePack serialization format / msgpack.org[C]
terminusdb - TerminusDB is a distributed database with a collaboration model