scalan / scalan

Generic framework for development of domain-specific compilers in Scala
https://groups.google.com/d/forum/scalan
Apache License 2.0
96 stars 19 forks source link

Better API for ProgramGraph testing #71

Open alexeyr opened 9 years ago

alexeyr commented 9 years ago

Add TestPass which should wrap a graph pass with a test on it, and AbstractGraphPassSuite (name?) which allows ProgramGraph tests in simple terms. Rewrite SelectiveInvokeTest using it and see where else it can be used.

aslesarenko commented 9 years ago

We can formulate expectations about transformations using graph matching in a form of the method of ProgramGraph

def contains[T](pattern: PatternGraph[T]): Option[Subst]

Where PatternGraph is similar to RRewrite[T] with only lhs defined.

Similar to how Rewrite rules now work.