uwescience / raco

Compilation and rule-based optimization framework for relational algebra. Raco is the language, optimization, and query translation layer for the Myria project.
Other
72 stars 19 forks source link

Better logic simplification in RA #105

Open bmyerz opened 10 years ago

bmyerz commented 10 years ago

I'd at least like to cover cases where the parser produces things like $0 = $1 and $0 = $1

Perhaps we can use something like Sympy

bmyerz commented 10 years ago

Yes the following works in sympy

In [23]: And(Eq(x,y), Eq(x,y))
Out[23]: x == y
bmyerz commented 10 years ago

Not yet clear where the optimization belongs.

bmyerz commented 10 years ago

Depending on the backend, it might also support this optimization. Taking C++ as an example, however, there could be cases in the c-compiler where some expression simplifications are not recognized given the lower level of the code.

bmyerz commented 10 years ago

https://github.com/uwescience/datalogcompiler/tree/bmyerz-logic-simpl

bmyerz commented 10 years ago