egraphs-good / eggcc

MIT License
42 stars 8 forks source link

Add tree shared IR and unique-to-shared conversion #266

Closed rtjoa closed 7 months ago

rtjoa commented 8 months ago

Generates the following addition to the schema:

(datatype SExpr) ; shared expressions
(datatype ListSExpr)
(function SArg () SExpr) ; note: no ID
(function SAdd (SExpr SExpr) SExpr)
... etc ...

And the following conversion functions:

(function ToSExpr (Expr) SExpr)
(function ToListSExpr (Expr) ListSExpr)